diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index c32086271..000000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,17 +0,0 @@ -# What does this PR resolve? πŸš€ - - - -# Details πŸ“ - - - -# Checklist βœ… - -- [ ] Merged latest `master` and resolved conflicts -- [ ] `npm run build` succeeds -- [ ] Links checked (`npm run check:links`) where relevant -- [ ] `static/llms.txt` updated if pages were added / renamed / deleted -- [ ] Content follows [CODING.md](../CODING.md) conventions (`Swarm` vs `swarm`, ..) -- [ ] Self-reviewed the diff -- [ ] Commits are signed off (`git commit -s`) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml deleted file mode 100644 index 6fed74d63..000000000 --- a/.github/workflows/build.yaml +++ /dev/null @@ -1,28 +0,0 @@ -name: build - -on: - push: - branches: - - master - pull_request: - branches: - - master - -jobs: - build: - - runs-on: ubuntu-22.04 - - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - uses: actions/setup-node@v1 - with: - node-version: '20' - - - name: Build - run: | - npm ci - npm run build diff --git a/.github/workflows/gh-pages.yaml b/.github/workflows/gh-pages.yaml deleted file mode 100644 index 67aee6a37..000000000 --- a/.github/workflows/gh-pages.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: github pages - -on: - push: - branches-ignore: - - '**' - tags: - - 'v*.*.*' - -jobs: - deploy: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - uses: actions/setup-node@v1 - with: - node-version: '20' - - - name: Build for gh-pages - run: | - npm ci - npm run-script build - echo "docs.ethswarm.org" > ./build/CNAME - rm ./build/.nojekyll - - - name: Deploy to gh-pages - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./build diff --git a/.github/workflows/swarm-upload.yaml b/.github/workflows/swarm-upload.yaml deleted file mode 100644 index 5d97426c9..000000000 --- a/.github/workflows/swarm-upload.yaml +++ /dev/null @@ -1,68 +0,0 @@ -name: Swarm Upload - -on: - push: - branches: - - 'master' - -jobs: - deploy: - # Must be self-hosted: the bee gateway ingress enforces a source-IP - # allowlist (nginx server-snippet), and the self-hosted runners are on it. - # GitHub-hosted runners have dynamic IPs and get HTTP 403 from the upload, - # even with a valid PRIVATE_API_TOKEN. - runs-on: [self-hosted, Linux, bee] - steps: - - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - - uses: actions/setup-node@v6 - with: - node-version: '24' - # No-op for caching here (package.json declares no packageManager / - # devEngines field), but it also skips setup-node's `npm --version` - # probe, which is known to hang on the self-hosted runners if this - # job is ever moved there. - package-manager-cache: false - - - name: Build - run: | - npm ci - npm run build - - - name: Upload to Swarm - uses: ethersphere/swarm-actions/upload-dir@latest - id: upload - with: - dir: ./build - index-document: index.html - postage-batch-id: ${{ secrets.PRIVATE_POSTAGE_BATCH_ID }} - bee-url: ${{ secrets.PRIVATE_BEE_URL }} - timeout: 300000 - deferred: false - headers: | - authorization: ${{ secrets.PRIVATE_API_TOKEN }} - - - name: Setup feed - uses: ethersphere/swarm-actions/write-feed@latest - id: feed - with: - reference: ${{ steps.upload.outputs.reference }} - topic: "swarm-docs" - postage-batch-id: ${{ secrets.PRIVATE_POSTAGE_BATCH_ID }} - bee-url: ${{ secrets.PRIVATE_BEE_URL }} - signer: ${{ secrets.PRIVATE_SIGNER }} - headers: | - authorization: ${{ secrets.PRIVATE_API_TOKEN }} - - - uses: ethersphere/swarm-actions/reference-to-cid@v0 - id: cid - with: - reference: ${{ steps.feed.outputs.manifest }} - - - run: | - echo 'Chunk Reference: ${{ steps.upload.outputs.reference }}' - echo 'Feed Reference: ${{ steps.feed.outputs.reference }}' - echo 'Feed Manifest: ${{ steps.feed.outputs.manifest }}' - echo 'Feed Bzz.link: https://${{ steps.cid.outputs.cid }}.bzz.link' diff --git a/.github/workflows/tag-on-openapi-merge.yaml b/.github/workflows/tag-on-openapi-merge.yaml deleted file mode 100644 index 639c26e56..000000000 --- a/.github/workflows/tag-on-openapi-merge.yaml +++ /dev/null @@ -1,56 +0,0 @@ -name: tag on openapi merge - -# When an openapi-auto-update PR (from update-openapi.yaml) is merged, tag the merge -# commit with the matching Bee version (vX.Y.Z). That tag is what gh-pages.yaml deploys on. -# -# Requires the BOT_PAT secret (same token as update-openapi.yaml). It is used so the tag -# push triggers gh-pages.yaml β€” a tag pushed with the default GITHUB_TOKEN does NOT trigger -# other workflows. The job fails loudly if BOT_PAT is missing/expired. - -on: - pull_request: - types: [closed] - -permissions: - contents: write - -jobs: - tag: - if: >- - github.event.pull_request.merged == true && - contains(github.event.pull_request.labels.*.name, 'openapi-auto-update') && - startsWith(github.event.pull_request.head.ref, 'bot/update-openapi-') - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.base.ref }} - fetch-depth: 0 - token: ${{ secrets.BOT_PAT }} - - - name: Derive tag from branch - id: tag - env: - HEAD_REF: ${{ github.event.pull_request.head.ref }} - run: | - set -euo pipefail - NEW_TAG="${HEAD_REF#bot/update-openapi-}" - if ! echo "$NEW_TAG" | grep -qE '^v[0-9]+\.[0-9]+\.[0-9]+$'; then - echo "Refusing to tag: '$NEW_TAG' is not a vX.Y.Z tag" >&2 - exit 1 - fi - echo "new_tag=$NEW_TAG" >> "$GITHUB_OUTPUT" - - - name: Create and push tag - env: - NEW_TAG: ${{ steps.tag.outputs.new_tag }} - run: | - set -euo pipefail - if git rev-parse -q --verify "refs/tags/${NEW_TAG}" >/dev/null; then - echo "Tag ${NEW_TAG} already exists β€” nothing to do." - exit 0 - fi - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - git tag "$NEW_TAG" - git push origin "$NEW_TAG" diff --git a/.github/workflows/update-openapi.yaml b/.github/workflows/update-openapi.yaml deleted file mode 100644 index ae5c77f5c..000000000 --- a/.github/workflows/update-openapi.yaml +++ /dev/null @@ -1,139 +0,0 @@ -name: update openapi - -# Detects a new STABLE ethersphere/bee release tag, pulls its OpenAPI specs into -# openapi/, bumps the Bee version strings in the install docs, and opens (or updates) -# a PR. Prereleases (-rc*, -beta, v2.7.1a, v2.5.0-v8, ...) are ignored. -# -# Requires the GHA_PAT_ADVANCED secret (a classic PAT with public_repo scope, or a fine-grained PAT -# with contents + pull-requests write). It is used so the auto-PR triggers build.yaml CI β€” -# PRs opened with the default GITHUB_TOKEN do NOT trigger other workflows. The job fails -# loudly if GHA_PAT_ADVANCED is missing/expired rather than silently skipping CI. - -on: - schedule: - - cron: "0 6 * * *" # daily 06:00 UTC - workflow_dispatch: - inputs: - tag: - description: "Force a specific Bee tag (e.g. v2.9.0); blank = latest stable" - required: false - -concurrency: - group: update-openapi - cancel-in-progress: true - -permissions: - contents: write - pull-requests: write - -jobs: - update-openapi: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Resolve latest stable Bee tag - id: resolve - run: | - set -euo pipefail - if [ -n "${{ github.event.inputs.tag }}" ]; then - NEW_TAG="${{ github.event.inputs.tag }}" - else - NEW_TAG="$(git ls-remote --tags --refs https://github.com/ethersphere/bee.git \ - | awk '{print $2}' | sed 's#refs/tags/##' \ - | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' \ - | sort -V | tail -1)" - fi - if [ -z "$NEW_TAG" ]; then - echo "Could not resolve a stable Bee tag" >&2 - exit 1 - fi - NEW_VER="${NEW_TAG#v}" - echo "new_tag=$NEW_TAG" >> "$GITHUB_OUTPUT" - echo "new_ver=$NEW_VER" >> "$GITHUB_OUTPUT" - echo "Latest stable Bee tag: $NEW_TAG (version $NEW_VER)" - - - name: Determine current docs version - id: current - run: | - set -euo pipefail - OLD_VER="$(grep -oE 'TAG=v[0-9]+\.[0-9]+\.[0-9]+' docs/bee/installation/quick-start.md \ - | head -1 | sed 's/^TAG=v//')" - if [ -z "$OLD_VER" ]; then - echo "Could not determine current docs version anchor" >&2 - exit 1 - fi - echo "old_ver=$OLD_VER" >> "$GITHUB_OUTPUT" - echo "Current docs version: $OLD_VER" - - - name: Fetch OpenAPI specs from the tag - env: - NEW_TAG: ${{ steps.resolve.outputs.new_tag }} - run: | - set -euo pipefail - for f in Swarm.yaml SwarmCommon.yaml; do - curl -fsSL \ - "https://raw.githubusercontent.com/ethersphere/bee/${NEW_TAG}/openapi/$f" \ - -o "openapi/$f" - done - - - name: Bump Bee version strings in docs - if: ${{ steps.current.outputs.old_ver != steps.resolve.outputs.new_ver }} - env: - OLD_VER: ${{ steps.current.outputs.old_ver }} - NEW_VER: ${{ steps.resolve.outputs.new_ver }} - run: | - set -euo pipefail - FILES=( - docs/bee/installation/build-from-source.md - docs/bee/installation/docker.md - docs/bee/installation/quick-start.md - docs/bee/installation/shell-script.md - docs/bee/working-with-bee/bee-api.md - docs/bee/working-with-bee/configuration.md - docs/bee/working-with-bee/staking.md - ) - # Literal substring swap of the semver. This deliberately also rewrites the - # vX.Y.Z, bee:X.Y.Z and X.Y.Z- forms (the version is a substring of each), - # and is safe because the old version never appears inside an unrelated number - # in these files. ESC_OLD escapes the dots so they match literally. - ESC_OLD="${OLD_VER//./\\.}" - sed -i "s/${ESC_OLD}/${NEW_VER}/g" "${FILES[@]}" - - - name: Detect changes - id: changes - run: | - set -euo pipefail - if git diff --quiet; then - echo "changed=false" >> "$GITHUB_OUTPUT" - echo "No changes β€” already up to date with the latest stable Bee release." - else - echo "changed=true" >> "$GITHUB_OUTPUT" - fi - - - name: Create or update PR - if: ${{ steps.changes.outputs.changed == 'true' }} - uses: peter-evans/create-pull-request@v6 - with: - token: ${{ secrets.GHA_PAT_ADVANCED }} - branch: bot/update-openapi-${{ steps.resolve.outputs.new_tag }} - commit-message: "chore: update OpenAPI specs and version refs to Bee ${{ steps.resolve.outputs.new_tag }}" - title: "Update OpenAPI specs to Bee ${{ steps.resolve.outputs.new_tag }}" - labels: openapi-auto-update - delete-branch: true - body: | - Automated update to Bee **${{ steps.resolve.outputs.new_tag }}**. - - Source: https://github.com/ethersphere/bee/tree/${{ steps.resolve.outputs.new_tag }}/openapi - - ## What changed - - `openapi/Swarm.yaml` and `openapi/SwarmCommon.yaml` pulled from the tagged commit. - - Bee version strings bumped `${{ steps.current.outputs.old_ver }}` β†’ `${{ steps.resolve.outputs.new_ver }}` in the install docs. - - ## ⚠️ Please review before merging - The version-string replacement is **best-effort** (literal semver swap in a fixed set - of doc files) and can miss or over-match. Skim the doc diff. Merging this PR triggers - the `tag-on-openapi-merge` workflow, which tags the merge commit `${{ steps.resolve.outputs.new_tag }}` - and (with a PAT configured) kicks off the gh-pages deploy. diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 942a52497..000000000 --- a/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -examples -.docusaurus -.claude -node_modules -.DS_Store -build -public -resources -.netlify -/src/pages/awesome-swarm.mdx -/static/openapi.yaml -/static/cheatsheets -test -docs/references/awesome-list.mdx -*.zip -*.csv -link-reports/ diff --git a/.link-checker-ignore b/.link-checker-ignore deleted file mode 100644 index 3b619606d..000000000 --- a/.link-checker-ignore +++ /dev/null @@ -1,7 +0,0 @@ -# URLs to ignore in link checker -# One URL pattern per line (substring matching, case-sensitive). -# These URLs are still checked and reported separately, but don't block the check. -# Lines starting with # are comments. - -# Example hash from desktop/publish-a-website.md β€” just an example of URL format -https://api.gateway.ethswarm.org/bzz/bc9b942212421e2a19fe1ffdf0add641ae530923041ea8f549381747b14b2f2d/ diff --git a/static/.nojekyll b/.nojekyll similarity index 100% rename from static/.nojekyll rename to .nojekyll diff --git a/.nvmrc b/.nvmrc deleted file mode 100644 index 92bc26a42..000000000 --- a/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -20.20.2 \ No newline at end of file diff --git a/static/.well-known/agent-card.json b/.well-known/agent-card.json similarity index 100% rename from static/.well-known/agent-card.json rename to .well-known/agent-card.json diff --git a/404.html b/404.html new file mode 100644 index 000000000..c7a8822e0 --- /dev/null +++ b/404.html @@ -0,0 +1,26 @@ + + + + + +Page Not Found | Swarm Documentation + + + + + + + + + + + + + + + + + +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

+ + \ No newline at end of file diff --git a/static/Andrena_nasonii._female.jpg b/Andrena_nasonii._female.jpg similarity index 100% rename from static/Andrena_nasonii._female.jpg rename to Andrena_nasonii._female.jpg diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index 8a7286f09..000000000 --- a/CLAUDE.md +++ /dev/null @@ -1,63 +0,0 @@ -# CLAUDE.md - -This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. - -## What this is - -Documentation website for the [Swarm Bee client](https://github.com/ethersphere/bee), built with **Docusaurus 3** and deployed at [docs.ethswarm.org](https://docs.ethswarm.org). Content lives in `docs/` as Markdown/MDX; everything else is site config, build tooling, and a few React components. - -## Commands - -```bash -npm ci # install exact deps (preferred over npm install) -npm start # local dev server with live reload -npm run build # production build into build/ (runs prebuild first) -npm run build:quiet # build with noisy Node deprecation warnings suppressed -npm run serve # serve a built site locally - -npm run check:links # check links against an existing local build -npm run build:check # build + check links in one step -``` - -Link checker flags pass through after `--`: - -```bash -npm run check:links -- --mode local --no-external --threads 16 -npm run check:links -- --mode live --site-domain docs.ethswarm.org -``` - -Node >=20, npm >=9.6 (see `.nvmrc` / `package.json` engines). - -There is **no test suite and no linter** β€” validation is the build, the `llms.txt` validator (runs in `prebuild`), and the link checker. - -## Build pipeline gotchas - -The `prebuild` npm hook runs automatically before `build` and does three things, in order: -1. Copies `openapi/Swarm.yaml` β†’ `static/openapi.yaml`. -2. `scripts/fetch-awesome-swarm.mjs` β€” fetches external content at build time. -3. `scripts/validate-llms-txt.mjs` β€” validates `static/llms.txt` coverage (informational, **always exit 0**, never blocks the build). - -`onBrokenLinks: 'warn'` β€” broken internal links warn rather than fail the build. Use the link checker to catch them. - -## Architecture / where things live - -- **`docs/`** β€” all documentation content, grouped into top-level sections: `bee/`, `concepts/`, `desktop/`, `develop/`, `references/`. Page ordering and the sidebar tree are defined manually in **`sidebars.js`** (not auto-generated) β€” adding a doc file requires adding it to `sidebars.js`. -- **`docusaurus.config.mjs`** β€” single source of site config: plugins, presets, redirects (`@docusaurus/plugin-client-redirects`), the OpenAPI integration (`redocusaurus`), and three `docusaurus-plugin-llms` slice configs (`llms-api.txt`, `llms-node-ops.txt`, etc.). -- **`openapi/`** β€” `Swarm.yaml` + `SwarmCommon.yaml`. The API reference page is compiled from these at build time via redocusaurus. Kept in sync with the [OpenAPI specs in the Bee repo](https://github.com/ethersphere/bee/tree/master/openapi) by the `update-openapi` workflow (see below) β€” they are **not** edited by hand. -- **`.github/workflows/`** β€” `build.yaml` (build on push/PR), `gh-pages.yaml` (deploy on `v*.*.*` tag push), and two Bee-sync workflows: `update-openapi.yaml` (daily; pulls openapi specs + bumps version strings from the latest stable Bee tag and opens a PR labelled `openapi-auto-update`) and `tag-on-openapi-merge.yaml` (tags the merge commit `vX.Y.Z` when that PR merges, triggering the deploy). Both need the `BOT_PAT` secret and fail loudly without it. -- **`src/components/`** β€” interactive calculators embedded in docs via MDX (e.g. `AmountAndDepthCalc.js`, `RedundancyCalc.js`, `VolumeAndDurationCalc.js`). `src/config/globalVariables.js` holds shared constants. -- **`src/theme/SearchBar/`** β€” a **swizzled** component (ejected from the theme). See the README: upgrading the Docusaurus theme does NOT upgrade swizzled components and can break search; re-swizzle after theme upgrades. -- **`scripts/`** β€” TypeScript (`tsx`, no separate install) build/CI helpers: link checkers (`check_links.ts`, `check_live_links.ts`) and the build-time `.mjs` scripts above. - -## llms.txt (AI-agent docs) - -- `static/llms.txt` β€” **hand-curated** index of every doc page, one line each. Edit by hand when pages are added/renamed/deleted. -- `/llms-full.txt` and the sliced variants β€” **auto-generated** at build time; do not hand-edit. -- When the prebuild validator warns about a stale link or missing coverage, fix `static/llms.txt` (update the path or add a `- [Title](url): description` line in the right section). A few navigation-only landing pages are intentionally excluded β€” those warnings are expected. - -## Content conventions (from CODING.md) - -- **One sentence per line** β€” put a newline after every sentence instead of hard-wrapping at a fixed width; keeps git diffs small and reduces merge conflicts. -- **Minimize unrelated edits** (e.g. don't reflow a whole paragraph to fix one typo) for the same reason. -- **`Swarm` vs `swarm`**: capital `Swarm` = the project / main network; lowercase `swarm` = a swarm of bee nodes (Bee supports running multiple). Capital `Bee` = the Go client; lowercase `bee` = any Swarm-protocol client. -- **Version bumps**: automated by the `update-openapi` workflow on each new stable Bee release (literal find-and-replace of the semver in the install docs). Only bump by hand for out-of-band corrections, across the whole `docs/` folder. diff --git a/CNAME b/CNAME new file mode 100644 index 000000000..58cfdce3d --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +docs.ethswarm.org diff --git a/CODING.md b/CODING.md deleted file mode 100644 index fff641d90..000000000 --- a/CODING.md +++ /dev/null @@ -1,42 +0,0 @@ -# Coding guide - -- Write each sentence on its own line: put a newline after every sentence, rather than hard-wrapping lines at a fixed column width. - This keeps `git` line diffs small and produces fewer merge conflicts, without the awkward mid-sentence breaks that fixed-width wrapping causes. - -- Don't change things unnecessarily (e.g. if you reindent an entire paragraph when you're fixing a single typo, then you unnecessarily increase the probability for merge conflicts). - -- Prefer `npm ci` instead of `npm install`, and only include the `package-lock.json` file in your commit when you know what you are doing. - For further explanation see this [stackoverflow question](https://stackoverflow.com/questions/48524417/should-the-package-lock-json-file-be-added-to-gitignore). - -## Swarm vs. swarm, and uppercasing in general - -`Swarm`, with a capital, refers to the project and the main network, e.g.: - - > Swarm uses the content hashes as addresses - - > As of today, the Swarm mainnet consists of `n` number of nodes - -`swarm`, in lower case, refers to a swarm of bee nodes. -Note that the Bee client supports running/forming multiple Swarm swarms, i.e. you can even run your own! - - > when your node joins the designated swarm - -[`Bee`](https://github.com/ethersphere/bee), with a capital, refers to a specific bee client, written in the `go` programming language, while `bee`, in lower case, refers to any worker that can join a swarm (e.g. any client implementation that speaks the Swarm protocol). - -## Writing for answer engines (AEO/GEO) - -These conventions keep pages easy for search and AI answer engines to extract: - -- **Answer first**: open each page with a 1–2 sentence direct answer to its implied question (a definition, or the outcome/first step), before context, citations, or marketing. - A friendly or on-brand line can follow the factual one. - -- **One H1 per page**: the frontmatter `title` renders as the page's H1, so don't add a body `# H1`. - -- **Descriptive, question-shaped headings**: phrase a heading as the question a reader would ask (e.g. "What is a full node?", "How do I pin content during upload?"), on concept, reference, and how-to pages alike, rather than generic labels like "Overview" or "Introduction". - When you rename an existing heading, pin its original slug with `{#old-slug}` so existing anchor links keep working. - -- **Self-contained sentences**: avoid "as mentioned above", "at this point", and bare "this/it/here" β€” name the entity or section, so a sentence still makes sense when quoted on its own. - -- **`description` frontmatter**: write one concise, factual, self-contained sentence stating the page's key fact (not "Guide for…" / "Overview of…"), and make sure any acronym expansion matches the body. - -- **Prefer extraction aids**: definition-first paragraphs, lists, tables, and `:::info`/`:::tip` callouts for key facts, rather than long walls of prose. diff --git a/README.md b/README.md deleted file mode 100644 index c13429fb3..000000000 --- a/README.md +++ /dev/null @@ -1,138 +0,0 @@ -# Bee Documentation Website - -Documentation for the [Swarm Bee Client](https://github.com/ethersphere/bee). View at [docs.ethswarm.org](https://docs.ethswarm.org). - -## Contributing - -Pull Requests are welcome, but please read our [CODING](CODING.md) guide! - -### Node Version - -You must use **node 18** or above. We recommend [nvm](https://github.com/nvm-sh/nvm). - -### Installation - -After the initial cloning of the repo you need to run: - -``` -npm ci -``` - -to download the exact revisions of the dependencies captured in -`package-lock.json`. - -If the dependencies are updated in `package.json`, or if you wish to -test with the latest revisions of the dependencies, then you should -run: - -``` -npm install -``` - -and then consider pushing the updated `package-lock.json` to the -repository if everything works fine. - -### Local Development - -``` -npm start -``` - -This command starts a local development server and opens up a browser -window. Most changes are reflected live without having to restart the -server. - -### Build - -``` -npm run build -``` - -This command generates static content into the `build` directory and can be served using any static contents hosting service. - - -### Note about lunr search plugin - -The lunr search plugin relies on manual [swizzling](https://docusaurus.io/docs/next/swizzling), which ejects the SearchBar component from the theme to allow for customization. Upgrading the Docusaurus theme WILL NOT upgrade swizzled components. This means upgrading the theme could break the search bare. Therefore whenever you upgrade the theme, make sure to delete the old swizzleed SearchBar component at src/theme/SearchBar and swizzle it again using this command: - -``` -npm run swizzle docusaurus-lunr-search SearchBar -- --eject --danger -``` -See the documentation for the above command and the plugin at its github repo [here](https://github.com/praveenn77/docusaurus-lunr-search). - - -## LLM-Friendly Documentation (`llms.txt`) - -The site serves two files for AI agents at the root: - -- **`/llms.txt`** β€” Hand-crafted index file (`static/llms.txt`). A curated, categorised list of every documentation page with one-line descriptions. This is the entry point AI agents use to find relevant pages. -- **`/llms-full.txt`** β€” Auto-generated by `docusaurus-plugin-llms` at build time. Contains the full text of every page concatenated into a single file. - -### Keeping `llms.txt` up to date - -The validation script `scripts/validate-llms-txt.mjs` runs automatically during `npm run build` (via the `prebuild` hook). It cross-checks `static/llms.txt` against the actual doc files and prints warnings for: - -- **Stale links** β€” a URL in `llms.txt` points to a doc page that no longer exists (renamed/deleted). -- **Missing coverage** β€” a doc file exists that isn't listed in `llms.txt` (new page added without updating the index). - -The script is **informational only** (exit 0) β€” it won't block the build. - -### What to do when warnings appear - -1. **Stale link**: Open `static/llms.txt`, find the flagged URL, and either update the path to match the renamed page or remove the entry if the page was deleted. -2. **Missing coverage**: Decide which section the new page belongs in and add a line in `static/llms.txt` following the existing format: `- [Title](https://docs.ethswarm.org/docs/path): One-line description`. If the page is a landing/index page with no unique content, it's fine to leave it out β€” the warning is expected. - -A few pages are intentionally excluded (intro/landing pages that only contain navigation cards). Their warnings are expected and can be ignored. - -## Link Checker - -The link checker scripts live in `scripts/` and are written in TypeScript. They require no additional installation beyond `npm ci` (which installs `tsx`). - -### Usage - -Run the checker against a local build: - -```bash -npm run build # build the site first -npm run check:links # check the local build -``` - -Or build and check in one step: - -```bash -npm run build:check -``` - -Flags are passed through after `--`: - -```bash -npm run check:links -- --mode local -npm run check:links -- --mode live --site-domain docs.ethswarm.org -npm run check:links -- --mode local --no-external --threads 16 -``` - -| Flag | Description | -|---|---| -| `--mode local\|live` | Local build check (default) or live site crawl | -| `--site-domain` | Your site's domain β€” auto-detected from `docusaurus.config.*` if omitted | -| `--no-external` | Skip external URL checking (local mode only) | -| `--threads N` | Number of concurrent HTTP threads (default: 8) | - -Reports are written to `link-reports/` (gitignored). - -## Bumping Version - -When a new stable Bee version is released, the version number across the `docs/` folder is bumped automatically β€” see [Keeping in sync with Bee releases](#keeping-in-sync-with-bee-releases) below. - -## API Reference - -The OpenAPI reference docs are compiled at build time from the OpenAPI yaml files in the `/openapi` directory using the [redocusaurus plugin](https://www.npmjs.com/package/redocusaurus) for Docusaurus. They are kept in sync with the [OpenAPI specs in the Bee repo](https://github.com/ethersphere/bee/tree/master/openapi) automatically β€” see below. - -## Keeping in sync with Bee releases - -Two GitHub Actions workflows keep the docs aligned with [ethersphere/bee](https://github.com/ethersphere/bee) releases: - -- **`.github/workflows/update-openapi.yaml`** runs daily (and on manual `workflow_dispatch`). It finds the latest **stable** Bee tag (prereleases like `-rc*` are ignored), pulls `Swarm.yaml` + `SwarmCommon.yaml` from that tag into `openapi/`, bumps the Bee version strings in the install docs, and opens (or updates) a PR labelled `openapi-auto-update`. The version-string replacement is best-effort β€” **review the doc diff before merging**. -- **`.github/workflows/tag-on-openapi-merge.yaml`** runs when such a PR is merged. It tags the merge commit with the matching Bee version (`vX.Y.Z`), which triggers the existing `gh-pages.yaml` deploy. - -Both require a repository secret named **`BOT_PAT`** (a classic PAT with `public_repo` scope, or a fine-grained PAT with contents + pull-requests write). The PAT is necessary to allow CI for the auto-PRs and deployment for the auto-release tags. If the token is missing or expired, the workflows fail loudly rather than silently degrading. Renew BOT_PAT in such case. diff --git a/api/index.html b/api/index.html new file mode 100644 index 000000000..57d6b4bda --- /dev/null +++ b/api/index.html @@ -0,0 +1,1994 @@ + + + + + +Bee API | Swarm Documentation + + + + + + + + + + + + + + + + + +
Skip to main content

Bee API (8.1.0)

Download OpenAPI specification:Download

API endpoints for interacting with the Swarm network, supporting file operations, messaging, and node management

+

ACT

Create a grantee list

header Parameters
swarm-postage-batch-id
required
object (SwarmPostageBatchId)

ID of Postage Batch that is used to upload data with

+
swarm-tag
object (SwarmTagParameter)

Associate upload with an existing Tag UID

+
swarm-pin
object (SwarmPinParameter)

Indicates whether the uploaded data should also be locally pinned on this node

+
swarm-deferred-upload
object (SwarmDeferredUpload)

Indicates whether the uploaded data should be sent to the network immediately or deferred. Default: deferred (true)

+
swarm-act-history-address
object (SwarmActHistoryAddress)

ACT history reference address

+
swarm-redundancy-level
object (SwarmRedundancyLevelParameter)

Add redundancy to the data being uploaded so that downloaders can download it with better UX. 0 value is default and does not add any redundancy to the file.

+
Request Body schema: application/json
required
grantees
Array of strings (PublicKey) [ items^[A-Fa-f0-9]{66}$ ]

Responses

Request samples

Content type
application/json
{
  • "grantees": [
    ]
}

Response samples

Content type
application/json
{
  • "ref": "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f2d2810619d29b5dbefd5d74abce25d58b81b251baddb9c3871cf0d6967deaae2",
  • "historyref": "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f2d2810619d29b5dbefd5d74abce25d58b81b251baddb9c3871cf0d6967deaae2"
}

Get the grantee list

path Parameters
address
required
string (SwarmEncryptedReference) ^[A-Fa-f0-9]{128}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f2d2810619d29b5dbefd5d74abce25d58b81b251baddb9c3871cf0d6967deaae2

Grantee list reference

+
header Parameters
swarm-redundancy-level
object (SwarmRedundancyLevelParameter)

Add redundancy to the data being uploaded so that downloaders can download it with better UX. 0 value is default and does not add any redundancy to the file.

+

Responses

Response samples

Content type
application/json
[
  • "02ab7473879005929d10ce7d4f626412dad9fe56b0a6622038931d26bd79abf0a4"
]

Update the grantee list

Add or remove grantees from an existing grantee list

+
path Parameters
address
required
string (SwarmEncryptedReference) ^[A-Fa-f0-9]{128}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f2d2810619d29b5dbefd5d74abce25d58b81b251baddb9c3871cf0d6967deaae2

Grantee list reference

+
header Parameters
swarm-act-history-address
required
object (SwarmActHistoryAddress)

ACT history reference address

+
swarm-postage-batch-id
required
object (SwarmPostageBatchId)

ID of Postage Batch that is used to upload data with

+
swarm-tag
object (SwarmTagParameter)

Associate upload with an existing Tag UID

+
swarm-pin
object (SwarmPinParameter)

Indicates whether the uploaded data should also be locally pinned on this node

+
swarm-deferred-upload
object (SwarmDeferredUpload)

Indicates whether the uploaded data should be sent to the network immediately or deferred. Default: deferred (true)

+
swarm-redundancy-level
object (SwarmRedundancyLevelParameter)

Add redundancy to the data being uploaded so that downloaders can download it with better UX. 0 value is default and does not add any redundancy to the file.

+
Request Body schema: application/json
required
add
Array of strings (PublicKey) [ items^[A-Fa-f0-9]{66}$ ]

List of grantees to add

+
revoke
Array of strings (PublicKey) [ items^[A-Fa-f0-9]{66}$ ]

List of grantees to revoke future access from

+

Responses

Request samples

Content type
application/json
{
  • "add": [
    ],
  • "revoke": [
    ]
}

Response samples

Content type
application/json
{
  • "ref": "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f2d2810619d29b5dbefd5d74abce25d58b81b251baddb9c3871cf0d6967deaae2",
  • "historyref": "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f2d2810619d29b5dbefd5d74abce25d58b81b251baddb9c3871cf0d6967deaae2"
}

Bytes

Upload data

header Parameters
swarm-postage-batch-id
required
string (SwarmAddress) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

ID of Postage Batch that is used to upload data with

+
swarm-tag
integer (Uid)

Associate upload with an existing Tag UID

+
swarm-pin
boolean

Indicates whether the uploaded data should also be locally pinned on this node

+
swarm-deferred-upload
boolean
Default: true

Indicates whether the uploaded data should be sent to the network immediately or deferred. Default: deferred (true)

+
swarm-encrypt
boolean

Indicates whether the file should be encrypted

+
swarm-redundancy-level
integer
Enum: 0 1 2 3 4

Add redundancy to the data being uploaded so that downloaders can download it with better UX. 0 value is default and does not add any redundancy to the file.

+
swarm-act
boolean
Default: false

Determines if the uploaded data should be treated as ACT content

+
swarm-act-history-address
string (SwarmAddress) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

ACT history reference address

+
Request Body schema: application/octet-stream
string <binary>

Responses

Response samples

Content type
application/json
{
  • "reference": "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f"
}

Retrieve data by reference

path Parameters
required
SwarmAddress (string) or SwarmEncryptedReference (string) or DomainName (string) (SwarmReference)

Swarm address reference to content

+
header Parameters
swarm-cache
boolean
Default: true

Indicates whether downloaded data should be cached on the node. Default: cached (true)

+
swarm-redundancy-strategy
integer
Enum: 0 1 2 3

Specify the retrieval strategy for redundant data. Values represent: NONE (0), DATA (1), PROX (2), RACE (3). NONE: no prefetching. DATA: prefetch only data chunks. PROX: prefetch chunks near this node. RACE: prefetch all chunks and use the first n to arrive. Multiple strategies can be cascaded if fallback mode is enabled. Default: NONE > DATA > PROX > RACE

+
swarm-redundancy-fallback-mode
boolean

Specify if the retrieve strategies (chunk prefetching on redundant data) are used in a fallback cascade. The default is true.

+
swarm-redundancy-level
integer
Enum: 0 1 2 3 4

Add redundancy to the data being uploaded so that downloaders can download it with better UX. 0 value is default and does not add any redundancy to the file.

+
swarm-chunk-retrieval-timeout
string (Duration)
Example: 5.0018ms

Specify the timeout for chunk retrieval. The default is 30 seconds.

+
swarm-lookahead-buffer-size
integer

Override the lookahead buffer size used during retrieval, in bytes. When unset the node picks 8x or 16x the io.Copy default buffer (32 kB) depending on file size.

+
swarm-act-timestamp
integer <int64>

ACT history Unix timestamp

+
swarm-act-publisher
string (PublicKey) ^[A-Fa-f0-9]{66}$
Example: 02ab7473879005929d10ce7d4f626412dad9fe56b0a6622038931d26bd79abf0a4

ACT content publisher's public key

+
swarm-act-history-address
string (SwarmAddress) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

ACT history reference address

+

Responses

Response samples

Content type
application/problem+json
{
  • "code": 0,
  • "message": "string",
  • "reasons": [
    ]
}

Retrieve headers containing the content type and length for the reference

path Parameters
address
required
string (SwarmAddress) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

Swarm address of chunk

+
header Parameters
swarm-act-timestamp
integer <int64>

ACT history Unix timestamp

+
swarm-act-publisher
string (PublicKey) ^[A-Fa-f0-9]{66}$
Example: 02ab7473879005929d10ce7d4f626412dad9fe56b0a6622038931d26bd79abf0a4

ACT content publisher's public key

+
swarm-act-history-address
string (SwarmAddress) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

ACT history reference address

+

Responses

Response samples

Content type
application/problem+json
{
  • "code": 0,
  • "message": "string",
  • "reasons": [
    ]
}

Chunk

Upload a chunk

header Parameters
swarm-tag
integer (Uid)

Associate upload with an existing Tag UID

+
swarm-postage-batch-id
object (SwarmPostageBatchId)

ID of Postage Batch that is used to upload data with

+
swarm-postage-stamp
string (HexString) ^([A-Fa-f0-9]+)$
Example: cf880b8eeac5093fa27b0825906c600685

Postage stamp for the corresponding chunk in the request.
It is required if Swarm-Postage-Batch-Id header is missing
It consists of: \

+
    +
  • batch ID - 0:32 bytes \
  • +
  • postage index (bucket and bucket index) - 32:40 bytes \
  • +
  • timestamp - 40:48 bytes \
  • +
  • signature - 48:113 bytes
  • +
+
swarm-act
boolean
Default: false

Determines if the uploaded data should be treated as ACT content

+
swarm-act-history-address
string (SwarmAddress) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

ACT history reference address

+
Request Body schema: application/octet-stream

Chunk binary data containing at least 8 bytes.

+
string <binary>

Responses

Response samples

Content type
application/json
{
  • "reference": "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f"
}

Stream chunks for upload

Establishes a WebSocket connection for streaming chunks. Each uploaded chunk receives a binary acknowledgment (0). Chunks are sent as binary messages. When a tag is specified, chunks are stored locally and uploaded to the network after the stream closes. Without a tag, chunks are directly uploaded to the network as they arrive.

+
query Parameters
swarm-tag
integer (Uid)

Associate upload with an existing Tag UID (use when WebSocket client cannot set custom headers)

+
header Parameters
swarm-tag
integer (Uid)

Associate upload with an existing Tag UID

+
swarm-postage-batch-id
string (SwarmAddress) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

ID of Postage Batch that is used to upload data with. Optional when chunks include pre-signed postage stamps.

+

Responses

Response samples

Content type
application/problem+json
{
  • "code": 0,
  • "message": "string",
  • "reasons": [
    ]
}

Retrieve a chunk

path Parameters
required
SwarmAddress (string) or SwarmEncryptedReference (string) or DomainName (string) (SwarmReference)

Swarm address of chunk

+
header Parameters
swarm-cache
object (SwarmCache)

Indicates whether downloaded data should be cached on the node. Default: cached (true)

+
swarm-act-timestamp
integer <int64>

ACT history Unix timestamp

+
swarm-act-publisher
string (PublicKey) ^[A-Fa-f0-9]{66}$
Example: 02ab7473879005929d10ce7d4f626412dad9fe56b0a6622038931d26bd79abf0a4

ACT content publisher's public key

+
swarm-act-history-address
string (SwarmAddress) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

ACT history reference address

+

Responses

Response samples

Content type
application/problem+json
{
  • "code": 0,
  • "message": "string",
  • "reasons": [
    ]
}

Check if a chunk exists locally

path Parameters
address
required
string (SwarmAddress) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

Swarm address of chunk

+
header Parameters
swarm-act-timestamp
integer <int64>

ACT history Unix timestamp

+
swarm-act-publisher
string (PublicKey) ^[A-Fa-f0-9]{66}$
Example: 02ab7473879005929d10ce7d4f626412dad9fe56b0a6622038931d26bd79abf0a4

ACT content publisher's public key

+
swarm-act-history-address
string (SwarmAddress) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

ACT history reference address

+

Responses

Response samples

Content type
application/problem+json
{
  • "code": 0,
  • "message": "string",
  • "reasons": [
    ]
}

BZZ

Upload a file or collection of files

Upload single files or collections of files. For a single file, Content-Type is optional: when present it is stored as metadata as-is; when absent the server infers a type from the start of the body. To upload a collection, send a multipart request with files in the form data with appropriate headers. Tar files can be uploaded with the swarm-collection header to extract and upload the directory structure. Without the swarm-collection header, requests are treated as single file uploads. Multipart requests are always treated as collections; use the swarm-index-document header to specify a single file to serve.

+
query Parameters
name
string (FileName)

Filename when uploading single file

+
header Parameters
swarm-postage-batch-id
required
string (SwarmAddress) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

ID of Postage Batch that is used to upload data with

+
swarm-tag
integer (Uid)

Associate upload with an existing Tag UID

+
swarm-pin
boolean

Indicates whether the uploaded data should also be locally pinned on this node

+
swarm-encrypt
boolean

Indicates whether the file should be encrypted

+
Content-Type
string

Single file: trimmed Content-Type is stored as-is or, if omitted or empty, inferred from the first bytes without validating against the body; tar (swarm-collection) and multipart collection uploads still need a full-body Content-Type (e.g. application/x-tar or multipart/form-data with boundary) so the request can be parsed.

+
swarm-collection
boolean

Upload file/files as a collection

+
swarm-index-document
string
Example: index.html

Default file to serve when a directory path is accessed

+
swarm-error-document
string
Example: error.html

Custom error document to return when a path is not found in the collection

+
swarm-deferred-upload
boolean
Default: true

Indicates whether the uploaded data should be sent to the network immediately or deferred. Default: deferred (true)

+
swarm-redundancy-level
integer
Enum: 0 1 2 3 4

Add redundancy to the data being uploaded so that downloaders can download it with better UX. 0 value is default and does not add any redundancy to the file.

+
swarm-act
boolean
Default: false

Determines if the uploaded data should be treated as ACT content

+
swarm-act-history-address
string (SwarmAddress) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

ACT history reference address

+
Request Body schema:
file
Array of strings <binary> [ items <binary > ]

Responses

Response samples

Content type
application/json
{
  • "reference": "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f"
}

Retrieve a file or index document from a collection

path Parameters
required
SwarmAddress (string) or SwarmEncryptedReference (string) or DomainName (string) (SwarmReference)

Swarm address of content

+
header Parameters
swarm-cache
boolean
Default: true

Indicates whether downloaded data should be cached on the node. Default: cached (true)

+
swarm-redundancy-strategy
integer
Enum: 0 1 2 3

Specify the retrieval strategy for redundant data. Values represent: NONE (0), DATA (1), PROX (2), RACE (3). NONE: no prefetching. DATA: prefetch only data chunks. PROX: prefetch chunks near this node. RACE: prefetch all chunks and use the first n to arrive. Multiple strategies can be cascaded if fallback mode is enabled. Default: NONE > DATA > PROX > RACE

+
swarm-redundancy-fallback-mode
boolean

Specify if the retrieve strategies (chunk prefetching on redundant data) are used in a fallback cascade. The default is true.

+
swarm-redundancy-level
integer
Enum: 0 1 2 3 4

Add redundancy to the data being uploaded so that downloaders can download it with better UX. 0 value is default and does not add any redundancy to the file.

+
swarm-chunk-retrieval-timeout
string (Duration)
Example: 5.0018ms

Specify the timeout for chunk retrieval. The default is 30 seconds.

+
swarm-lookahead-buffer-size
integer

Override the lookahead buffer size used during retrieval, in bytes. When unset the node picks 8x or 16x the io.Copy default buffer (32 kB) depending on file size.

+
swarm-act-timestamp
integer <int64>

ACT history Unix timestamp

+
swarm-act-publisher
string (PublicKey) ^[A-Fa-f0-9]{66}$
Example: 02ab7473879005929d10ce7d4f626412dad9fe56b0a6622038931d26bd79abf0a4

ACT content publisher's public key

+
swarm-act-history-address
string (SwarmAddress) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

ACT history reference address

+

Responses

Response samples

Content type
application/problem+json
{
  • "code": 0,
  • "message": "string",
  • "reasons": [
    ]
}

Retrieve headers with content type and length for the reference

path Parameters
address
required
string (SwarmAddress) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

Swarm address of chunk

+
header Parameters
swarm-act-timestamp
integer <int64>

ACT history Unix timestamp

+
swarm-act-publisher
string (PublicKey) ^[A-Fa-f0-9]{66}$
Example: 02ab7473879005929d10ce7d4f626412dad9fe56b0a6622038931d26bd79abf0a4

ACT content publisher's public key

+
swarm-act-history-address
string (SwarmAddress) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

ACT history reference address

+

Responses

Response samples

Content type
application/problem+json
{
  • "code": 0,
  • "message": "string",
  • "reasons": [
    ]
}

Retrieve a file from a collection by path

path Parameters
required
SwarmAddress (string) or SwarmEncryptedReference (string) or DomainName (string) (SwarmReference)

Swarm address of content

+
path
required
string

Path to the file in the collection.

+
header Parameters
swarm-redundancy-strategy
integer
Enum: 0 1 2 3

Specify the retrieval strategy for redundant data. Values represent: NONE (0), DATA (1), PROX (2), RACE (3). NONE: no prefetching. DATA: prefetch only data chunks. PROX: prefetch chunks near this node. RACE: prefetch all chunks and use the first n to arrive. Multiple strategies can be cascaded if fallback mode is enabled. Default: NONE > DATA > PROX > RACE

+
swarm-redundancy-fallback-mode
boolean

Specify if the retrieve strategies (chunk prefetching on redundant data) are used in a fallback cascade. The default is true.

+
swarm-chunk-retrieval-timeout
string (Duration)
Example: 5.0018ms

Specify the timeout for chunk retrieval. The default is 30 seconds.

+
swarm-redundancy-level
integer
Enum: 0 1 2 3 4

Add redundancy to the data being uploaded so that downloaders can download it with better UX. 0 value is default and does not add any redundancy to the file.

+
swarm-cache
boolean
Default: true

Indicates whether downloaded data should be cached on the node. Default: cached (true)

+
swarm-lookahead-buffer-size
integer

Override the lookahead buffer size used during retrieval, in bytes. When unset the node picks 8x or 16x the io.Copy default buffer (32 kB) depending on file size.

+

Responses

Response samples

Content type
application/problem+json
{
  • "code": 0,
  • "message": "string",
  • "reasons": [
    ]
}

Tag

Get list of tags

query Parameters
offset
integer >= 0
Default: 0

The number of items to skip before starting to collect the result set.

+
limit
integer [ 1 .. 1000 ]
Default: 100

The numbers of items to return.

+

Responses

Response samples

Content type
application/json
{
  • "tags": [
    ]
}

Create Tag

Tags can be thought of as upload sessions which can be tracked using the tags endpoint. It will keep track of the chunks that are uploaded as part of the tag and will push them out to the network once a done split is called on the Tag. This happens internally if you use the Swarm-Deferred-Upload header.

+

Responses

Response samples

Content type
application/json
{
  • "uid": 0,
  • "address": "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f",
  • "startedAt": "2020-06-11T11:26:42.6969797+02:00",
  • "split": 0,
  • "seen": 0,
  • "stored": 0,
  • "sent": 0,
  • "synced": 0
}

Get Tag information using Uid

path Parameters
id
required
integer (Uid)

Uid

+

Responses

Response samples

Content type
application/json
{
  • "uid": 0,
  • "address": "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f",
  • "startedAt": "2020-06-11T11:26:42.6969797+02:00",
  • "split": 0,
  • "seen": 0,
  • "stored": 0,
  • "sent": 0,
  • "synced": 0
}

Delete Tag information using Uid

path Parameters
id
required
integer (Uid)

Uid

+

Responses

Response samples

Content type
application/problem+json
{
  • "code": 0,
  • "message": "string",
  • "reasons": [
    ]
}

Update Total Count and swarm hash for a tag of an input stream of unknown size using Uid

path Parameters
id
required
integer (Uid)

Uid

+
Request Body schema: application/json
optional

Can contain swarm hash to use for the tag

+
address
string (SwarmAddress) ^[A-Fa-f0-9]{64}$

Responses

Request samples

Content type
application/json
{
  • "address": "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f"
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "code": 0
}

Pinning

Pin a root hash by reference

path Parameters
required
SwarmAddress (string) or SwarmEncryptedReference (string) (SwarmOnlyReference)

Swarm reference of the root hash

+
header Parameters
swarm-redundancy-level
object (SwarmRedundancyLevelParameter)

Add redundancy to the data being uploaded so that downloaders can download it with better UX. 0 value is default and does not add any redundancy to the file.

+

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "code": 0
}

Unpin a root hash by reference

path Parameters
required
SwarmAddress (string) or SwarmEncryptedReference (string) (SwarmOnlyReference)

Swarm reference of the root hash

+

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "code": 0
}

Get the pinning status of a root hash

path Parameters
required
SwarmAddress (string) or SwarmEncryptedReference (string) (SwarmOnlyReference)

Swarm reference of the root hash

+

Responses

Response samples

Content type
application/json
Example
"36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f"

Get the list of pinned root hash references

Responses

Response samples

Content type
application/json
{
  • "references": [
    ]
}

Validate pinned chunks integrity

Returns a stream of newline-delimited JSON objects (NDJSON), one per pinned reference checked. +The response uses chunked transfer encoding; clients should parse each line as an independent +PinIntegrityResponse object rather than buffering the body into a single JSON value.

+
query Parameters
SwarmAddress (string) or SwarmEncryptedReference (string) (SwarmOnlyReference)

Optional reference to check; if not provided, all pinned references are checked

+

Responses

Response samples

Content type
application/json
{
  • "reference": "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f",
  • "total": 0,
  • "missing": 0,
  • "invalid": 0
}

Postal Service for Swarm

Send a message using the Postal Service for Swarm

path Parameters
topic
required
string (PssTopic)

Topic name

+
targets
required
string (PssTargets) ^[0-9a-fA-F]{1,6}(,[0-9a-fA-F]{1,6})*$

Target message address prefix. If multiple targets are specified, only one would be matched.

+
query Parameters
recipient
string (PssRecipient)

Recipient publickey

+
header Parameters
swarm-postage-batch-id
required
string (SwarmAddress) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

ID of Postage Batch that is used to upload data with

+

Responses

Response samples

Content type
application/problem+json
{
  • "code": 0,
  • "message": "string",
  • "reasons": [
    ]
}

Subscribe to messages on a topic

path Parameters
topic
required
string (PssTopic)

Topic name

+

Responses

Response samples

Content type
application/problem+json
{
  • "code": 0,
  • "message": "string",
  • "reasons": [
    ]
}

GSOC

Subscribe to GSOC payloads

path Parameters
address
required
string (SwarmAddress) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

Single Owner Chunk address (which may have multiple payloads)

+

Responses

Response samples

Content type
application/problem+json
{
  • "code": 0,
  • "message": "string",
  • "reasons": [
    ]
}

Single owner chunk

Upload a Single Owner Chunk

path Parameters
owner
required
string (EthereumAddress) ^[A-Fa-f0-9]{40}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906

Ethereum address of the chunk owner

+
id
required
string (HexString) ^([A-Fa-f0-9]+)$
Example: cf880b8eeac5093fa27b0825906c600685

Unique identifier for the chunk

+
query Parameters
sig
required
string (HexString) ^([A-Fa-f0-9]+)$
Example: sig=cf880b8eeac5093fa27b0825906c600685

Signature

+
header Parameters
swarm-postage-batch-id
object (SwarmPostageBatchId)

ID of the postage batch to use. Either this or swarm-postage-stamp must be supplied.

+
swarm-postage-stamp
string (HexString) ^([A-Fa-f0-9]+)$
Example: cf880b8eeac5093fa27b0825906c600685

Postage stamp for the corresponding chunk in the request.
It is required if Swarm-Postage-Batch-Id header is missing
It consists of: \

+
    +
  • batch ID - 0:32 bytes \
  • +
  • postage index (bucket and bucket index) - 32:40 bytes \
  • +
  • timestamp - 40:48 bytes \
  • +
  • signature - 48:113 bytes
  • +
+
swarm-tag
integer (Uid)

Associate upload with an existing Tag UID

+
swarm-pin
boolean

Indicates whether the uploaded data should also be locally pinned on this node

+
swarm-deferred-upload
boolean
Default: true

Indicates whether the uploaded data should be sent to the network immediately or deferred. Default: deferred (true)

+
swarm-act
boolean
Default: false

Determines if the uploaded data should be treated as ACT content

+
swarm-act-history-address
string (SwarmAddress) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

ACT history reference address

+
Request Body schema: application/octet-stream
required

The SOC binary data, composed of the span (8 bytes) and up to 4KB of payload.

+
string <binary>

Responses

Response samples

Content type
application/json
{
  • "reference": "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f"
}

Retrieve Single Owner Chunk data

path Parameters
owner
required
string (EthereumAddress) ^[A-Fa-f0-9]{40}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906

Ethereum address of the Owner of the SOC

+
id
required
string (HexString) ^([A-Fa-f0-9]+)$
Example: cf880b8eeac5093fa27b0825906c600685

Unique identifier for the chunk data

+
header Parameters
swarm-only-root-chunk
boolean

Returns only the root chunk of the content

+
swarm-cache
boolean
Default: true

Indicates whether downloaded data should be cached on the node. Default: cached (true)

+
swarm-redundancy-strategy
integer
Enum: 0 1 2 3

Specify the retrieval strategy for redundant data. Values represent: NONE (0), DATA (1), PROX (2), RACE (3). NONE: no prefetching. DATA: prefetch only data chunks. PROX: prefetch chunks near this node. RACE: prefetch all chunks and use the first n to arrive. Multiple strategies can be cascaded if fallback mode is enabled. Default: NONE > DATA > PROX > RACE

+
swarm-redundancy-fallback-mode
boolean

Specify if the retrieve strategies (chunk prefetching on redundant data) are used in a fallback cascade. The default is true.

+
swarm-chunk-retrieval-timeout
string (Duration)
Example: 5.0018ms

Specify the timeout for chunk retrieval. The default is 30 seconds.

+

Responses

Response samples

Content type
application/problem+json
{
  • "code": 0,
  • "message": "string",
  • "reasons": [
    ]
}

Feed

Create a feed root manifest

path Parameters
owner
required
string (EthereumAddress) ^[A-Fa-f0-9]{40}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906

Ethereum address of the feed owner

+
topic
required
string (HexString) ^([A-Fa-f0-9]+)$
Example: cf880b8eeac5093fa27b0825906c600685

Topic identifier for the feed

+
query Parameters
type
string (FeedType) ^(sequence|epoch)$

Feed indexing scheme (default: sequence)

+
header Parameters
swarm-postage-batch-id
required
string (SwarmAddress) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

ID of Postage Batch that is used to upload data with

+
swarm-pin
boolean

Indicates whether the uploaded data should also be locally pinned on this node

+
swarm-act
boolean
Default: false

Determines if the uploaded data should be treated as ACT content

+
swarm-act-history-address
string (SwarmAddress) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

ACT history reference address

+
swarm-redundancy-level
object (SwarmRedundancyLevelParameter)

Redundancy level for the feed manifest upload pipeline and ACT encryption

+

Responses

Response samples

Content type
application/json
{
  • "reference": "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f"
}

Retrieve the latest feed update

path Parameters
owner
required
string (EthereumAddress) ^[A-Fa-f0-9]{40}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906

Ethereum address of the feed owner

+
topic
required
string (HexString) ^([A-Fa-f0-9]+)$
Example: cf880b8eeac5093fa27b0825906c600685

Topic identifier for the feed

+
query Parameters
at
integer

Timestamp of the update (default: now)

+
after
integer

Start index (default: 0)

+
type
string (FeedType) ^(sequence|epoch)$

Feed indexing scheme (default: sequence)

+
header Parameters
swarm-only-root-chunk
boolean

Returns only the root chunk of the content

+
swarm-cache
boolean
Default: true

Indicates whether downloaded data should be cached on the node. Default: cached (true)

+
swarm-redundancy-strategy
integer
Enum: 0 1 2 3

Specify the retrieval strategy for redundant data. Values represent: NONE (0), DATA (1), PROX (2), RACE (3). NONE: no prefetching. DATA: prefetch only data chunks. PROX: prefetch chunks near this node. RACE: prefetch all chunks and use the first n to arrive. Multiple strategies can be cascaded if fallback mode is enabled. Default: NONE > DATA > PROX > RACE

+
swarm-redundancy-fallback-mode
boolean

Specify if the retrieve strategies (chunk prefetching on redundant data) are used in a fallback cascade. The default is true.

+
swarm-chunk-retrieval-timeout
string (Duration)
Example: 5.0018ms

Specify the timeout for chunk retrieval. The default is 30 seconds.

+

Responses

Response samples

Content type
application/problem+json
{
  • "code": 0,
  • "message": "string",
  • "reasons": [
    ]
}

Stewardship

Check content availability

path Parameters
required
SwarmAddress (string) or SwarmEncryptedReference (string) or DomainName (string) (SwarmReference)

Root hash of content (can be of any type: collection, file, chunk)

+
header Parameters
swarm-redundancy-level
object (SwarmRedundancyLevelParameter)

Add redundancy to the data being uploaded so that downloaders can download it with better UX. 0 value is default and does not add any redundancy to the file.

+

Responses

Response samples

Content type
application/json
{
  • "isRetrievable": true
}

Re-upload content by reference

path Parameters
required
SwarmAddress (string) or SwarmEncryptedReference (string) or DomainName (string) (SwarmReference)

Re-uploads content for specified root hash (can be of any type: collection, file, chunk, etc.)

+
header Parameters
swarm-postage-batch-id
required
object (SwarmPostageBatchId)

Postage batch to use for re-upload. The chunks are re-stamped with this batch.

+
swarm-redundancy-level
object (SwarmRedundancyLevelParameter)

Add redundancy to the data being uploaded so that downloaders can download it with better UX. 0 value is default and does not add any redundancy to the file.

+

Responses

Response samples

Content type
application/problem+json
{
  • "code": 0,
  • "message": "string",
  • "reasons": [
    ]
}

Connectivity

Get overlay and underlay addresses of the node

Responses

Response samples

Content type
application/json
{
  • "overlay": "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f",
  • "underlay": [
    ],
  • "ethereum": "36b7efd913ca4cf880b8eeac5093fa27b0825906",
  • "chain_address": "36b7efd913ca4cf880b8eeac5093fa27b0825906",
  • "publicKey": "02ab7473879005929d10ce7d4f626412dad9fe56b0a6622038931d26bd79abf0a4",
  • "pssPublicKey": "02ab7473879005929d10ce7d4f626412dad9fe56b0a6622038931d26bd79abf0a4"
}

Get a list of blocklisted peers

Responses

Response samples

Content type
application/json
{
  • "peers": [
    ]
}

Connect to a peer address

path Parameters
multi-address
required
string (MultiAddress)

Underlay address of peer

+

Responses

Response samples

Content type
application/json
{
  • "address": "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f"
}

Get the list of connected peers

Responses

Response samples

Content type
application/json
{
  • "peers": [
    ]
}

Disconnect from a peer

path Parameters
address
required
string (SwarmAddress) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

Swarm address of peer

+

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "code": 0
}

Ping a peer to measure latency

path Parameters
address
required
string (SwarmAddress) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

Swarm address of peer

+

Responses

Response samples

Content type
application/json
{
  • "rtt": "5.0018ms"
}

Get the network topology

Responses

Response samples

Content type
application/json
{
  • "baseAddr": "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f",
  • "population": 0,
  • "connected": 0,
  • "timestamp": "string",
  • "nnLowWatermark": 0,
  • "depth": 0,
  • "reachability": "Unknown",
  • "networkAvailability": "Unknown",
  • "bins": {
    }
}

Get the P2P welcome message

Responses

Response samples

Content type
application/json
{
  • "welcomeMessage": "string"
}

Set the P2P welcome message

Request Body schema: application/json
welcomeMessage
string

Responses

Request samples

Content type
application/json
{
  • "welcomeMessage": "string"
}

Response samples

Content type
application/json
{
  • "status": "ok",
  • "version": "string",
  • "apiVersion": "0.0.0"
}

Status

Get the overall health status of the node

Health Status will indicate node healthiness.

+

If node is unhealthy please check node logs for errors.

+

Responses

Response samples

Content type
application/json
{
  • "status": "ok",
  • "version": "string",
  • "apiVersion": "0.0.0"
}

Check if the node is ready to accept traffic

Responses

Response samples

Content type
application/problem+json
{
  • "code": 0,
  • "message": "string",
  • "reasons": [
    ]
}

Get the reserve state

Responses

Response samples

Content type
application/json
{
  • "radius": 0,
  • "storageRadius": 0,
  • "commitment": 0,
  • "reserveCapacityDoubling": 0
}

Get the chain state

Responses

Response samples

Content type
application/json
{
  • "chainTip": 0,
  • "block": 0,
  • "totalAmount": "1000000000000000000",
  • "currentPrice": "1000000000000000000",
  • "minimumValidityBlocks": 0
}

Get a snapshot of local storage debug info

Responses

Response samples

Content type
application/json
{
  • "Upload": {
    },
  • "Pinning": {
    },
  • "Cache": {
    },
  • "Reserve": {
    },
  • "ChunkStore": {
    }
}

Get node information

Responses

Response samples

Content type
application/json
{
  • "beeMode": "light",
  • "chequebookEnabled": true,
  • "swapEnabled": true
}

Balance

Get balances with all known peers

Responses

Response samples

Content type
application/json
{
  • "balances": [
    ]
}

Get the balance with a specific peer

path Parameters
peer
required
string (SwarmAddress) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

Swarm address of peer

+

Responses

Response samples

Content type
application/json
{
  • "peer": "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f",
  • "balance": "1000000000000000000",
  • "thresholdreceived": "1000000000000000000",
  • "thresholdgiven": "1000000000000000000"
}

Get past due consumption balances with all known peers

Responses

Response samples

Content type
application/json
{
  • "balances": [
    ]
}

Get past due consumption balance with a specific peer

path Parameters
peer
required
string (SwarmAddress) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

Swarm address of peer

+

Responses

Response samples

Content type
application/json
{
  • "peer": "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f",
  • "balance": "1000000000000000000",
  • "thresholdreceived": "1000000000000000000",
  • "thresholdgiven": "1000000000000000000"
}

Get accounting values for all known peers

Responses

Response samples

Content type
application/json
{
  • "peerData": {
    }
}

Chequebook

Get the chequebook contract address

Responses

Response samples

Content type
application/json
{
  • "chequebookAddress": "36b7efd913ca4cf880b8eeac5093fa27b0825906"
}

Get the balance of the chequebook

Responses

Response samples

Content type
application/json
{
  • "totalBalance": "1000000000000000000",
  • "availableBalance": "1000000000000000000"
}

Get the last cashout status for a peer

path Parameters
peer
required
string (SwarmAddress) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

Swarm address of peer

+

Responses

Response samples

Content type
application/json
{
  • "peer": "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f",
  • "lastCashedCheque": {
    },
  • "transactionHash": "0x780cb6a37d1946978087896e1e489c37e30fe3e329510fff8d97360f73529f5a",
  • "result": {
    },
  • "uncashedAmount": "1000000000000000000"
}

Cash out the last cheque for a peer

path Parameters
peer
required
string (SwarmAddress) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

Swarm address of peer

+
header Parameters
gas-price
integer (GasPrice)

Gas price for transaction

+
gas-limit
integer (GasLimit) [ 0 .. 18446744073709552000 ]

Gas limit for transaction

+

Responses

Response samples

Content type
application/json
{
  • "transactionHash": "0x780cb6a37d1946978087896e1e489c37e30fe3e329510fff8d97360f73529f5a"
}

Get the last cheques for a peer

path Parameters
peer
required
string (SwarmAddress) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

Swarm address of peer

+

Responses

Response samples

Content type
application/json
{
  • "peer": "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f",
  • "lastreceived": {
    },
  • "lastsent": {
    }
}

Get the last cheques for all peers

Responses

Response samples

Content type
application/json
{
  • "lastcheques": [
    ]
}

Deposit tokens into the chequebook

query Parameters
amount
required
integer

Amount of tokens to deposit

+
header Parameters
gas-price
integer (GasPrice)

Gas price for transaction

+

Responses

Response samples

Content type
application/json
{
  • "transactionHash": "0x780cb6a37d1946978087896e1e489c37e30fe3e329510fff8d97360f73529f5a"
}

Withdraw tokens from the chequebook

query Parameters
amount
required
integer

Amount of tokens to withdraw

+
header Parameters
gas-price
integer (GasPrice)

Gas price for transaction

+

Responses

Response samples

Content type
application/json
{
  • "transactionHash": "0x780cb6a37d1946978087896e1e489c37e30fe3e329510fff8d97360f73529f5a"
}

Envelope

Create a postage stamp for a chunk

path Parameters
address
required
string (SwarmAddress) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

Swarm address of the chunk to stamp

+
header Parameters
swarm-postage-batch-id
required
object (SwarmPostageBatchId)

ID of Postage Batch that is used to upload data with

+

Responses

Response samples

Content type
application/json
{
  • "issuer": "36b7efd913ca4cf880b8eeac5093fa27b0825906",
  • "index": "1a2b3c4d5e6f7a8b",
  • "timestamp": "1a2b3c4d5e6f7a8b",
  • "signature": "1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e"
}

Settlements

Get settlement amounts sent and received with a peer

path Parameters
peer
required
string (SwarmAddress) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

Swarm address of peer

+

Responses

Response samples

Content type
application/json
{
  • "peer": "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f",
  • "received": "1000000000000000000",
  • "sent": "1000000000000000000"
}

Get settlements with all known peers and totals

Responses

Response samples

Content type
application/json
{
  • "totalReceived": "1000000000000000000",
  • "totalSent": "1000000000000000000",
  • "settlements": [
    ]
}

Get time-based settlements with all known peers and totals

Responses

Response samples

Content type
application/json
{
  • "totalReceived": "1000000000000000000",
  • "totalSent": "1000000000000000000",
  • "settlements": [
    ]
}

Transaction

Get list of pending transactions

Responses

Response samples

Content type
application/json
{
  • "pendingTransactions": [
    ]
}

Retrieve transaction information

path Parameters
hash
required
string (TransactionHash) ^0x[A-Fa-f0-9]{64}$
Example: 0x780cb6a37d1946978087896e1e489c37e30fe3e329510fff8d97360f73529f5a

Hash of the transaction

+

Responses

Response samples

Content type
application/json
{
  • "transactionHash": "0x780cb6a37d1946978087896e1e489c37e30fe3e329510fff8d97360f73529f5a",
  • "to": "36b7efd913ca4cf880b8eeac5093fa27b0825906",
  • "nonce": 0,
  • "gasPrice": "1000000000000000000",
  • "gasLimit": 0,
  • "gasTipCap": "1000000000000000000",
  • "gasTipBoost": 0,
  • "gasFeeCap": "1000000000000000000",
  • "data": "string",
  • "created": "2020-06-11T11:26:42.6969797+02:00",
  • "description": "string",
  • "value": "1000000000000000000"
}

Rebroadcast a transaction

path Parameters
hash
required
string (TransactionHash) ^0x[A-Fa-f0-9]{64}$
Example: 0x780cb6a37d1946978087896e1e489c37e30fe3e329510fff8d97360f73529f5a

Hash of the transaction

+

Responses

Response samples

Content type
application/json
{
  • "transactionHash": "0x780cb6a37d1946978087896e1e489c37e30fe3e329510fff8d97360f73529f5a"
}

Cancel existing transaction

path Parameters
hash
required
string (TransactionHash) ^0x[A-Fa-f0-9]{64}$
Example: 0x780cb6a37d1946978087896e1e489c37e30fe3e329510fff8d97360f73529f5a

Hash of the transaction

+
header Parameters
gas-price
integer (GasPrice)

Gas price for transaction

+

Responses

Response samples

Content type
application/json
{
  • "transactionHash": "0x780cb6a37d1946978087896e1e489c37e30fe3e329510fff8d97360f73529f5a"
}

Postage Stamps

Get postage stamps for this node

Responses

Response samples

Content type
application/json
{
  • "stamps": [
    ]
}

Get an individual postage batch status

path Parameters
batch_id
required
string (BatchID) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

Swarm address of the stamp

+

Responses

Response samples

Content type
application/json
Example
{
  • "batchID": "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f",
  • "utilization": 0,
  • "utilizationRatio": 1,
  • "usable": true,
  • "label": "string",
  • "depth": 0,
  • "amount": "1000000000000000000",
  • "bucketDepth": 0,
  • "blockNumber": 0,
  • "immutableFlag": true,
  • "exists": true,
  • "batchTTL": 0
}

Update the label of an existing postage batch

path Parameters
batch_id
required
string (BatchID) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

Swarm address of the stamp

+
Request Body schema: application/json
required
label
required
string

New label for the postage batch

+

Responses

Request samples

Content type
application/json
{
  • "label": "string"
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "code": 0
}

Get extended bucket data of a batch

path Parameters
batch_id
required
string (BatchID) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

Swarm address of the stamp

+

Responses

Response samples

Content type
application/json
{
  • "depth": 0,
  • "bucketDepth": 0,
  • "bucketUpperBound": 0,
  • "buckets": [
    ]
}

Buy a new postage batch.

Be aware, this endpoint creates an on-chain transaction and transfers BZZ from the node's Ethereum account, directly affecting the wallet balance!

+
path Parameters
amount
required
string (BigInt)
Example: 1000000000000000000

Amount of BZZ added that the postage batch will have.

+
depth
required
integer

Batch depth (logarithm) specifying the maximum number of chunks this stamp can cover. Must be greater than the default bucket depth (16)

+
query Parameters
label
string

An optional label for this batch

+
header Parameters
immutable
boolean
gas-price
integer (GasPrice)

Gas price for transaction

+
gas-limit
integer (GasLimit) [ 0 .. 18446744073709552000 ]

Gas limit for transaction

+

Responses

Response samples

Content type
application/json
{
  • "batchID": "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f",
  • "txHash": "0x780cb6a37d1946978087896e1e489c37e30fe3e329510fff8d97360f73529f5a"
}

Top up an existing postage batch.

Be aware, this endpoint creates an on-chain transaction and transfers BZZ from the node's Ethereum account, directly affecting the wallet balance!

+
path Parameters
batch_id
required
string (BatchID) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

Batch ID to top up

+
amount
required
integer

Amount of BZZ per chunk to top up to an existing postage batch.

+
header Parameters
gas-price
integer (GasPrice)

Gas price for transaction

+
gas-limit
integer (GasLimit) [ 0 .. 18446744073709552000 ]

Gas limit for transaction

+

Responses

Response samples

Content type
application/json
{
  • "batchID": "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f",
  • "txHash": "0x780cb6a37d1946978087896e1e489c37e30fe3e329510fff8d97360f73529f5a"
}

Dilute an existing postage batch.

Be aware, this endpoint creates an on-chain transaction and transfers BZZ from the node's Ethereum account, directly affecting the wallet balance!

+
path Parameters
batch_id
required
string (BatchID) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

Batch ID to dilute

+
depth
required
integer

The new batch depth, which must be greater than the current depth

+
header Parameters
gas-price
integer (GasPrice)

Gas price for transaction

+
gas-limit
integer (GasLimit) [ 0 .. 18446744073709552000 ]

Gas limit for transaction

+

Responses

Response samples

Content type
application/json
{
  • "batchID": "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f",
  • "txHash": "0x780cb6a37d1946978087896e1e489c37e30fe3e329510fff8d97360f73529f5a"
}

Get all globally available postage batches

Responses

Response samples

Content type
application/json
{
  • "batches": [
    ]
}

Get a single globally available postage batch by ID

path Parameters
batch_id
required
string (BatchID) ^[A-Fa-f0-9]{64}$
Example: 36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f

ID of the postage batch

+

Responses

Response samples

Content type
application/json
{
  • "batchID": "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f",
  • "value": "1000000000000000000",
  • "start": 0,
  • "owner": "36b7efd913ca4cf880b8eeac5093fa27b0825906",
  • "depth": 0,
  • "bucketDepth": 0,
  • "immutable": true,
  • "batchTTL": 0
}

RChash

Get reserve commitment hash with sample proofs

path Parameters
depth
required
integer >= 0
Default: 0

The storage depth.

+
anchor1
required
string (HexString) ^([A-Fa-f0-9]+)$
Example: cf880b8eeac5093fa27b0825906c600685

The first anchor.

+
anchor2
required
string (HexString) ^([A-Fa-f0-9]+)$
Example: cf880b8eeac5093fa27b0825906c600685

The second anchor.

+

Responses

Response samples

Content type
application/json
{
  • "durationSeconds": 30.5,
  • "hash": "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f",
  • "proofs": {
    }
}

RedistributionState

Get the node's redistribution game status

Responses

Response samples

Content type
application/json
{
  • "minimumGasFunds": "1000000000000000000",
  • "hasSufficientFunds": true,
  • "isFrozen": true,
  • "isFullySynced": true,
  • "isHealthy": true,
  • "phase": "string",
  • "round": 0,
  • "lastWonRound": 0,
  • "lastPlayedRound": 0,
  • "lastFrozenRound": 0,
  • "lastSelectedRound": 0,
  • "lastSampleDurationSeconds": 0,
  • "block": 0,
  • "reward": "1000000000000000000",
  • "fees": "1000000000000000000"
}

Wallet

Get wallet balance for BZZ and xDAI

Responses

Response samples

Content type
application/json
{
  • "bzzBalance": "1000000000000000000",
  • "nativeTokenBalance": "1000000000000000000",
  • "chainID": 0,
  • "chequebookContractAddress": "36b7efd913ca4cf880b8eeac5093fa27b0825906",
  • "walletAddress": "36b7efd913ca4cf880b8eeac5093fa27b0825906"
}

Withdraw BZZ or xDAI to a whitelisted address

path Parameters
coin
required
string (WithdrawCoin)
Enum: "bzz" "nativetoken"
query Parameters
amount
required
string (BigInt)
Example: amount=1000000000000000000

Numeric string representing an integer that may exceed Number.MAX_SAFE_INTEGER (2^53-1)

+
address
required
string (EthereumAddress) ^[A-Fa-f0-9]{40}$
Example: address=36b7efd913ca4cf880b8eeac5093fa27b0825906

Responses

Response samples

Content type
application/json
{
  • "transactionHash": "0x780cb6a37d1946978087896e1e489c37e30fe3e329510fff8d97360f73529f5a"
}

Staking

Get the withdrawable staked amount.

This endpoint fetches any amount that is possible to withdraw as surplus.

+

Responses

Response samples

Content type
application/json
{
  • "withdrawableAmount": "1000000000000000000"
}

Withdraw the extra withdrawable staked amount.

This endpoint withdraws any amount that is possible to withdraw as surplus.

+
header Parameters
gas-price
integer (GasPrice)

Gas price for transaction

+
gas-limit
integer (GasLimit) [ 0 .. 18446744073709552000 ]

Gas limit for transaction

+

Responses

Response samples

Content type
application/json
{
  • "txHash": "0x780cb6a37d1946978087896e1e489c37e30fe3e329510fff8d97360f73529f5a"
}

Deposit an amount for staking.

Be aware, this endpoint creates an on-chain transaction and transfers BZZ from the node's Ethereum account, directly affecting the wallet balance.

+
path Parameters
amount
required
string

Amount of BZZ added that will be deposited for staking.

+
header Parameters
gas-price
integer (GasPrice)

Gas price for transaction

+
gas-limit
integer (GasLimit) [ 0 .. 18446744073709552000 ]

Gas limit for transaction

+

Responses

Response samples

Content type
application/json
{
  • "txHash": "0x780cb6a37d1946978087896e1e489c37e30fe3e329510fff8d97360f73529f5a"
}

Get the staked amount.

This endpoint fetches the total staked amount from the blockchain.

+

Responses

Response samples

Content type
application/json
{
  • "stakedAmount": "1000000000000000000"
}

Withdraw all previously staked amounts.

Be aware, this endpoint can only be called when the contract is paused and undergoing migration to a new contract.

+
header Parameters
gas-price
integer (GasPrice)

Gas price for transaction

+
gas-limit
integer (GasLimit) [ 0 .. 18446744073709552000 ]

Gas limit for transaction

+

Responses

Response samples

Content type
application/json
{
  • "txHash": "0x780cb6a37d1946978087896e1e489c37e30fe3e329510fff8d97360f73529f5a"
}

Logging

Get all available loggers.

Responses

Response samples

Content type
application/json
{
  • "tree": {
    },
  • "loggers": [
    ]
}

Get all available loggers that match the specified expression.

path Parameters
exp
required
string (LoggerExp) ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[...
Example: b25lL25hbWU=

Regular expression or a subsystem that matches the logger(s).

+

Responses

Response samples

Content type
application/json
{
  • "tree": {
    },
  • "loggers": [
    ]
}

Set logger(s) verbosity level.

path Parameters
exp
required
string (LoggerExp) ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[...
Example: b25lL25hbWU=

Regular expression or a subsystem that matches the logger(s).

+
verbosity
required
string
Enum: "none" "error" "warning" "info" "debug" "all"

Verbosity level to apply to the matching logger(s).

+

Responses

Response samples

Content type
application/problem+json
{
  • "code": 0,
  • "message": "string",
  • "reasons": [
    ]
}

Node Status

Get the current status snapshot of this node.

Responses

Response samples

Content type
application/json
{
  • "overlay": "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f",
  • "proximity": 0,
  • "beeMode": "light",
  • "reserveSize": 0,
  • "reserveSizeWithinRadius": 0,
  • "pullsyncRate": 0,
  • "storageRadius": 0,
  • "connectedPeers": 0,
  • "neighborhoodSize": 0,
  • "requestFailed": true,
  • "batchCommitment": 0,
  • "isReachable": true,
  • "lastSyncedBlock": 0,
  • "committedDepth": 0,
  • "isWarmingUp": true
}

Get the current status snapshot of this node connected peers.

Responses

Response samples

Content type
application/json
{
  • "snapshots": [
    ]
}

Get the current neighborhoods status of this node.

Responses

Response samples

Content type
application/json
{
  • "neighborhoods": [
    ]
}
+ + \ No newline at end of file diff --git a/assets/css/styles.581c3d59.css b/assets/css/styles.581c3d59.css new file mode 100644 index 000000000..264b7a8c0 --- /dev/null +++ b/assets/css/styles.581c3d59.css @@ -0,0 +1,3 @@ +.col,.container{padding:0 var(--ifm-spacing-horizontal);width:100%}.markdown>h2,.markdown>h3,.markdown>h4,.markdown>h5,.markdown>h6{margin-bottom:calc(var(--ifm-heading-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown li,body{word-wrap:break-word}body,ol ol,ol ul,ul ol,ul ul{margin:0}pre,table{overflow:auto}blockquote,pre{margin:0 0 var(--ifm-spacing-vertical)}.breadcrumbs__link,.button{transition-timing-function:var(--ifm-transition-timing-default)}.button,code{vertical-align:middle}.button--outline.button--active,.button--outline:active,.button--outline:hover,:root{--ifm-button-color:var(--ifm-font-color-base-inverse)}.menu__link:hover,a{transition:color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.navbar--dark,:root{--ifm-navbar-link-hover-color:var(--ifm-color-primary)}.menu,.navbar-sidebar{overflow-x:hidden}:root,html[data-theme=dark]{--ifm-color-emphasis-500:var(--ifm-color-gray-500);--docsearch-error-color:#ef5350;--shimmer-bg:linear-gradient(90deg,#e0e3e8 0%,var(--docsearch-muted-color) 20%,var(--docsearch-muted-color) 60%,#e0e3e8 95%);--docsearch-dropdown-menu-background:var(--docsearch-hit-background);--docsearch-dropdown-menu-item-hover-background:var(--docsearch-modal-background)}*,.DocSearch-Container,.DocSearch-Container *{box-sizing:border-box}.toggleButton_gllP,html{-webkit-tap-highlight-color:transparent}:root{--ifm-color-scheme:light;--ifm-dark-value:10%;--ifm-darker-value:15%;--ifm-darkest-value:30%;--ifm-light-value:15%;--ifm-lighter-value:30%;--ifm-lightest-value:50%;--ifm-contrast-background-value:90%;--ifm-contrast-foreground-value:70%;--ifm-contrast-background-dark-value:70%;--ifm-contrast-foreground-dark-value:90%;--ifm-color-primary:#3578e5;--ifm-color-secondary:#ebedf0;--ifm-color-success:#00a400;--ifm-color-info:#54c7ec;--ifm-color-warning:#ffba00;--ifm-color-danger:#fa383e;--ifm-color-primary-dark:#306cce;--ifm-color-primary-darker:#2d66c3;--ifm-color-primary-darkest:#2554a0;--ifm-color-primary-light:#538ce9;--ifm-color-primary-lighter:#72a1ed;--ifm-color-primary-lightest:#9abcf2;--ifm-color-primary-contrast-background:#ebf2fc;--ifm-color-primary-contrast-foreground:#102445;--ifm-color-secondary-dark:#d4d5d8;--ifm-color-secondary-darker:#c8c9cc;--ifm-color-secondary-darkest:#a4a6a8;--ifm-color-secondary-light:#eef0f2;--ifm-color-secondary-lighter:#f1f2f5;--ifm-color-secondary-lightest:#f5f6f8;--ifm-color-secondary-contrast-background:#fdfdfe;--ifm-color-secondary-contrast-foreground:#474748;--ifm-color-success-dark:#009400;--ifm-color-success-darker:#008b00;--ifm-color-success-darkest:#007300;--ifm-color-success-light:#26b226;--ifm-color-success-lighter:#4dbf4d;--ifm-color-success-lightest:#80d280;--ifm-color-success-contrast-background:#e6f6e6;--ifm-color-success-contrast-foreground:#003100;--ifm-color-info-dark:#4cb3d4;--ifm-color-info-darker:#47a9c9;--ifm-color-info-darkest:#3b8ba5;--ifm-color-info-light:#6ecfef;--ifm-color-info-lighter:#87d8f2;--ifm-color-info-lightest:#aae3f6;--ifm-color-info-contrast-background:#eef9fd;--ifm-color-info-contrast-foreground:#193c47;--ifm-color-warning-dark:#e6a700;--ifm-color-warning-darker:#d99e00;--ifm-color-warning-darkest:#b38200;--ifm-color-warning-light:#ffc426;--ifm-color-warning-lighter:#ffcf4d;--ifm-color-warning-lightest:#ffdd80;--ifm-color-warning-contrast-background:#fff8e6;--ifm-color-warning-contrast-foreground:#4d3800;--ifm-color-danger-dark:#e13238;--ifm-color-danger-darker:#d53035;--ifm-color-danger-darkest:#af272b;--ifm-color-danger-light:#fb565b;--ifm-color-danger-lighter:#fb7478;--ifm-color-danger-lightest:#fd9c9f;--ifm-color-danger-contrast-background:#ffebec;--ifm-color-danger-contrast-foreground:#4b1113;--ifm-color-white:#fff;--ifm-color-black:#000;--ifm-color-gray-0:var(--ifm-color-white);--ifm-color-gray-100:#f5f6f7;--ifm-color-gray-200:#ebedf0;--ifm-color-gray-300:#dadde1;--ifm-color-gray-400:#ccd0d5;--ifm-color-gray-500:#bec3c9;--ifm-color-gray-600:#8d949e;--ifm-color-gray-700:#606770;--ifm-color-gray-800:#444950;--ifm-color-gray-900:#1c1e21;--ifm-color-gray-1000:var(--ifm-color-black);--ifm-color-emphasis-0:var(--ifm-color-gray-0);--ifm-color-emphasis-100:var(--ifm-color-gray-100);--ifm-color-emphasis-200:var(--ifm-color-gray-200);--ifm-color-emphasis-300:var(--ifm-color-gray-300);--ifm-color-emphasis-400:var(--ifm-color-gray-400);--ifm-color-emphasis-600:var(--ifm-color-gray-600);--ifm-color-emphasis-700:var(--ifm-color-gray-700);--ifm-color-emphasis-800:var(--ifm-color-gray-800);--ifm-color-emphasis-900:var(--ifm-color-gray-900);--ifm-color-emphasis-1000:var(--ifm-color-gray-1000);--ifm-color-content:var(--ifm-color-emphasis-900);--ifm-color-content-inverse:var(--ifm-color-emphasis-0);--ifm-color-content-secondary:#525860;--ifm-background-color:#0000;--ifm-background-surface-color:var(--ifm-color-content-inverse);--ifm-global-border-width:1px;--ifm-global-radius:0.4rem;--ifm-hover-overlay:#0000000d;--ifm-font-color-base:var(--ifm-color-content);--ifm-font-color-base-inverse:var(--ifm-color-content-inverse);--ifm-font-color-secondary:var(--ifm-color-content-secondary);--ifm-font-family-base:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--ifm-font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--ifm-font-size-base:100%;--ifm-font-weight-light:300;--ifm-font-weight-normal:400;--ifm-font-weight-semibold:500;--ifm-font-weight-bold:700;--ifm-font-weight-base:var(--ifm-font-weight-normal);--ifm-line-height-base:1.65;--ifm-global-spacing:1rem;--ifm-spacing-vertical:var(--ifm-global-spacing);--ifm-spacing-horizontal:var(--ifm-global-spacing);--ifm-transition-fast:200ms;--ifm-transition-slow:400ms;--ifm-transition-timing-default:cubic-bezier(0.08,0.52,0.52,1);--ifm-global-shadow-lw:0 1px 2px 0 #0000001a;--ifm-global-shadow-md:0 5px 40px #0003;--ifm-global-shadow-tl:0 12px 28px 0 #0003,0 2px 4px 0 #0000001a;--ifm-z-index-dropdown:100;--ifm-z-index-fixed:200;--ifm-z-index-overlay:400;--ifm-container-width:1140px;--ifm-container-width-xl:1320px;--ifm-code-background:#f6f7f8;--ifm-code-border-radius:var(--ifm-global-radius);--ifm-code-font-size:90%;--ifm-code-padding-horizontal:0.1rem;--ifm-code-padding-vertical:0.1rem;--ifm-pre-background:var(--ifm-code-background);--ifm-pre-border-radius:var(--ifm-code-border-radius);--ifm-pre-color:inherit;--ifm-pre-line-height:1.45;--ifm-pre-padding:1rem;--ifm-heading-color:inherit;--ifm-heading-margin-top:0;--ifm-heading-margin-bottom:var(--ifm-spacing-vertical);--ifm-heading-font-family:var(--ifm-font-family-base);--ifm-heading-font-weight:var(--ifm-font-weight-bold);--ifm-heading-line-height:1.25;--ifm-h1-font-size:2rem;--ifm-h2-font-size:1.5rem;--ifm-h3-font-size:1.25rem;--ifm-h4-font-size:1rem;--ifm-h5-font-size:0.875rem;--ifm-h6-font-size:0.85rem;--ifm-image-alignment-padding:1.25rem;--ifm-leading-desktop:1.25;--ifm-leading:calc(var(--ifm-leading-desktop)*1rem);--ifm-list-left-padding:2rem;--ifm-list-margin:1rem;--ifm-list-item-margin:0.25rem;--ifm-list-paragraph-margin:1rem;--ifm-table-cell-padding:0.75rem;--ifm-table-background:#0000;--ifm-table-stripe-background:#00000008;--ifm-table-border-width:1px;--ifm-table-border-color:var(--ifm-color-emphasis-300);--ifm-table-head-background:inherit;--ifm-table-head-color:inherit;--ifm-table-head-font-weight:var(--ifm-font-weight-bold);--ifm-table-cell-color:inherit;--ifm-link-color:var(--ifm-color-primary);--ifm-link-decoration:none;--ifm-link-hover-color:var(--ifm-link-color);--ifm-link-hover-decoration:underline;--ifm-paragraph-margin-bottom:var(--ifm-leading);--ifm-blockquote-font-size:var(--ifm-font-size-base);--ifm-blockquote-border-left-width:2px;--ifm-blockquote-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-blockquote-padding-vertical:0;--ifm-blockquote-shadow:none;--ifm-blockquote-color:var(--ifm-color-emphasis-800);--ifm-blockquote-border-color:var(--ifm-color-emphasis-300);--ifm-hr-background-color:var(--ifm-color-emphasis-500);--ifm-hr-height:1px;--ifm-hr-margin-vertical:1.5rem;--ifm-scrollbar-size:7px;--ifm-scrollbar-track-background-color:#f1f1f1;--ifm-scrollbar-thumb-background-color:silver;--ifm-scrollbar-thumb-hover-background-color:#a7a7a7;--ifm-alert-background-color:inherit;--ifm-alert-border-color:inherit;--ifm-alert-border-radius:var(--ifm-global-radius);--ifm-alert-border-width:0px;--ifm-alert-border-left-width:5px;--ifm-alert-color:var(--ifm-font-color-base);--ifm-alert-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-alert-padding-vertical:var(--ifm-spacing-vertical);--ifm-alert-shadow:var(--ifm-global-shadow-lw);--ifm-avatar-intro-margin:1rem;--ifm-avatar-intro-alignment:inherit;--ifm-avatar-photo-size:3rem;--ifm-badge-background-color:inherit;--ifm-badge-border-color:inherit;--ifm-badge-border-radius:var(--ifm-global-radius);--ifm-badge-border-width:var(--ifm-global-border-width);--ifm-badge-color:var(--ifm-color-white);--ifm-badge-padding-horizontal:calc(var(--ifm-spacing-horizontal)*0.5);--ifm-badge-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-breadcrumb-border-radius:1.5rem;--ifm-breadcrumb-spacing:0.5rem;--ifm-breadcrumb-color-active:var(--ifm-color-primary);--ifm-breadcrumb-item-background-active:var(--ifm-hover-overlay);--ifm-breadcrumb-padding-horizontal:0.8rem;--ifm-breadcrumb-padding-vertical:0.4rem;--ifm-breadcrumb-size-multiplier:1;--ifm-breadcrumb-separator:url('data:image/svg+xml;utf8,');--ifm-breadcrumb-separator-filter:none;--ifm-breadcrumb-separator-size:0.5rem;--ifm-breadcrumb-separator-size-multiplier:1.25;--ifm-button-background-color:inherit;--ifm-button-border-color:var(--ifm-button-background-color);--ifm-button-border-width:var(--ifm-global-border-width);--ifm-button-font-weight:var(--ifm-font-weight-bold);--ifm-button-padding-horizontal:1.5rem;--ifm-button-padding-vertical:0.375rem;--ifm-button-size-multiplier:1;--ifm-button-transition-duration:var(--ifm-transition-fast);--ifm-button-border-radius:calc(var(--ifm-global-radius)*var(--ifm-button-size-multiplier));--ifm-button-group-spacing:2px;--ifm-card-background-color:var(--ifm-background-surface-color);--ifm-card-border-radius:calc(var(--ifm-global-radius)*2);--ifm-card-horizontal-spacing:var(--ifm-global-spacing);--ifm-card-vertical-spacing:var(--ifm-global-spacing);--ifm-toc-border-color:var(--ifm-color-emphasis-300);--ifm-toc-link-color:var(--ifm-color-content-secondary);--ifm-toc-padding-vertical:0.5rem;--ifm-toc-padding-horizontal:0.5rem;--ifm-dropdown-background-color:var(--ifm-background-surface-color);--ifm-dropdown-font-weight:var(--ifm-font-weight-semibold);--ifm-dropdown-link-color:var(--ifm-font-color-base);--ifm-dropdown-hover-background-color:var(--ifm-hover-overlay);--ifm-footer-background-color:var(--ifm-color-emphasis-100);--ifm-footer-color:inherit;--ifm-footer-link-color:var(--ifm-color-emphasis-700);--ifm-footer-link-hover-color:var(--ifm-color-primary);--ifm-footer-link-horizontal-spacing:0.5rem;--ifm-footer-padding-horizontal:calc(var(--ifm-spacing-horizontal)*2);--ifm-footer-padding-vertical:calc(var(--ifm-spacing-vertical)*2);--ifm-footer-title-color:inherit;--ifm-footer-logo-max-width:min(30rem,90vw);--ifm-hero-background-color:var(--ifm-background-surface-color);--ifm-hero-text-color:var(--ifm-color-emphasis-800);--ifm-menu-color:var(--ifm-color-emphasis-700);--ifm-menu-color-active:var(--ifm-color-primary);--ifm-menu-color-background-active:var(--ifm-hover-overlay);--ifm-menu-color-background-hover:var(--ifm-hover-overlay);--ifm-menu-link-padding-horizontal:0.75rem;--ifm-menu-link-padding-vertical:0.375rem;--ifm-menu-link-sublist-icon:url('data:image/svg+xml;utf8,');--ifm-menu-link-sublist-icon-filter:none;--ifm-navbar-background-color:var(--ifm-background-surface-color);--ifm-navbar-height:3.75rem;--ifm-navbar-item-padding-horizontal:0.75rem;--ifm-navbar-item-padding-vertical:0.25rem;--ifm-navbar-link-color:var(--ifm-font-color-base);--ifm-navbar-link-active-color:var(--ifm-link-color);--ifm-navbar-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-navbar-padding-vertical:calc(var(--ifm-spacing-vertical)*0.5);--ifm-navbar-shadow:var(--ifm-global-shadow-lw);--ifm-navbar-search-input-background-color:var(--ifm-color-emphasis-200);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-800);--ifm-navbar-search-input-placeholder-color:var(--ifm-color-emphasis-500);--ifm-navbar-search-input-icon:url('data:image/svg+xml;utf8,');--ifm-navbar-sidebar-width:83vw;--ifm-pagination-border-radius:var(--ifm-global-radius);--ifm-pagination-color-active:var(--ifm-color-primary);--ifm-pagination-font-size:1rem;--ifm-pagination-item-active-background:var(--ifm-hover-overlay);--ifm-pagination-page-spacing:0.2em;--ifm-pagination-padding-horizontal:calc(var(--ifm-spacing-horizontal)*1);--ifm-pagination-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-pagination-nav-border-radius:var(--ifm-global-radius);--ifm-pagination-nav-color-hover:var(--ifm-color-primary);--ifm-pills-color-active:var(--ifm-color-primary);--ifm-pills-color-background-active:var(--ifm-hover-overlay);--ifm-pills-spacing:0.125rem;--ifm-tabs-color:var(--ifm-font-color-secondary);--ifm-tabs-color-active:var(--ifm-color-primary);--ifm-tabs-color-active-border:var(--ifm-tabs-color-active);--ifm-tabs-padding-horizontal:1rem;--ifm-tabs-padding-vertical:1rem}.badge--danger,.badge--info,.badge--primary,.badge--secondary,.badge--success,.badge--warning{--ifm-badge-border-color:var(--ifm-badge-background-color)}.button--link,.button--outline{--ifm-button-background-color:#0000}html{background-color:var(--ifm-background-color);color:var(--ifm-font-color-base);color-scheme:var(--ifm-color-scheme);font:var(--ifm-font-size-base)/var(--ifm-line-height-base) var(--ifm-font-family-base);-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}iframe{border:0;color-scheme:auto}.container{margin:0 auto;max-width:var(--ifm-container-width)}.container--fluid{max-width:inherit}.row{display:flex;flex-wrap:wrap;margin:0 calc(var(--ifm-spacing-horizontal)*-1)}.margin-bottom--none,.margin-vert--none,.markdown>:last-child{margin-bottom:0!important}.margin-top--none,.margin-vert--none,.tabItem_LNqP{margin-top:0!important}.row--no-gutters{margin-left:0;margin-right:0}.margin-horiz--none,.margin-right--none{margin-right:0!important}.row--no-gutters>.col{padding-left:0;padding-right:0}.row--align-top{align-items:flex-start}.row--align-bottom{align-items:flex-end}.menuExternalLink_NmtK,.row--align-center{align-items:center}.row--align-stretch{align-items:stretch}.row--align-baseline{align-items:baseline}.col{--ifm-col-width:100%;flex:1 0;margin-left:0;max-width:var(--ifm-col-width)}.padding-bottom--none,.padding-vert--none{padding-bottom:0!important}.padding-top--none,.padding-vert--none{padding-top:0!important}.padding-horiz--none,.padding-left--none{padding-left:0!important}.padding-horiz--none,.padding-right--none{padding-right:0!important}.col[class*=col--]{flex:0 0 var(--ifm-col-width)}.col--1{--ifm-col-width:8.33333%}.col--offset-1{margin-left:8.33333%}.col--2{--ifm-col-width:16.66667%}.col--offset-2{margin-left:16.66667%}.col--3{--ifm-col-width:25%}.col--offset-3{margin-left:25%}.col--4{--ifm-col-width:33.33333%}.col--offset-4{margin-left:33.33333%}.col--5{--ifm-col-width:41.66667%}.col--offset-5{margin-left:41.66667%}.col--6{--ifm-col-width:50%}.col--offset-6{margin-left:50%}.col--7{--ifm-col-width:58.33333%}.col--offset-7{margin-left:58.33333%}.col--8{--ifm-col-width:66.66667%}.col--offset-8{margin-left:66.66667%}.col--9{--ifm-col-width:75%}.col--offset-9{margin-left:75%}.col--10{--ifm-col-width:83.33333%}.col--offset-10{margin-left:83.33333%}.col--11{--ifm-col-width:91.66667%}.col--offset-11{margin-left:91.66667%}.col--12{--ifm-col-width:100%}.col--offset-12{margin-left:100%}.margin-horiz--none,.margin-left--none{margin-left:0!important}.margin--none{margin:0!important}.margin-bottom--xs,.margin-vert--xs{margin-bottom:.25rem!important}.margin-top--xs,.margin-vert--xs{margin-top:.25rem!important}.margin-horiz--xs,.margin-left--xs{margin-left:.25rem!important}.margin-horiz--xs,.margin-right--xs{margin-right:.25rem!important}.margin--xs{margin:.25rem!important}.margin-bottom--sm,.margin-vert--sm{margin-bottom:.5rem!important}.margin-top--sm,.margin-vert--sm{margin-top:.5rem!important}.margin-horiz--sm,.margin-left--sm{margin-left:.5rem!important}.margin-horiz--sm,.margin-right--sm{margin-right:.5rem!important}.margin--sm{margin:.5rem!important}.margin-bottom--md,.margin-vert--md{margin-bottom:1rem!important}.margin-top--md,.margin-vert--md{margin-top:1rem!important}.margin-horiz--md,.margin-left--md{margin-left:1rem!important}.margin-horiz--md,.margin-right--md{margin-right:1rem!important}.margin--md{margin:1rem!important}.margin-bottom--lg,.margin-vert--lg{margin-bottom:2rem!important}.margin-top--lg,.margin-vert--lg{margin-top:2rem!important}.margin-horiz--lg,.margin-left--lg{margin-left:2rem!important}.margin-horiz--lg,.margin-right--lg{margin-right:2rem!important}.margin--lg{margin:2rem!important}.margin-bottom--xl,.margin-vert--xl{margin-bottom:5rem!important}.margin-top--xl,.margin-vert--xl{margin-top:5rem!important}.margin-horiz--xl,.margin-left--xl{margin-left:5rem!important}.margin-horiz--xl,.margin-right--xl{margin-right:5rem!important}.margin--xl{margin:5rem!important}.padding--none{padding:0!important}.padding-bottom--xs,.padding-vert--xs{padding-bottom:.25rem!important}.padding-top--xs,.padding-vert--xs{padding-top:.25rem!important}.padding-horiz--xs,.padding-left--xs{padding-left:.25rem!important}.padding-horiz--xs,.padding-right--xs{padding-right:.25rem!important}.padding--xs{padding:.25rem!important}.padding-bottom--sm,.padding-vert--sm{padding-bottom:.5rem!important}.padding-top--sm,.padding-vert--sm{padding-top:.5rem!important}.padding-horiz--sm,.padding-left--sm{padding-left:.5rem!important}.padding-horiz--sm,.padding-right--sm{padding-right:.5rem!important}.padding--sm{padding:.5rem!important}.padding-bottom--md,.padding-vert--md{padding-bottom:1rem!important}.padding-top--md,.padding-vert--md{padding-top:1rem!important}.padding-horiz--md,.padding-left--md{padding-left:1rem!important}.padding-horiz--md,.padding-right--md{padding-right:1rem!important}.padding--md{padding:1rem!important}.padding-bottom--lg,.padding-vert--lg{padding-bottom:2rem!important}.padding-top--lg,.padding-vert--lg{padding-top:2rem!important}.padding-horiz--lg,.padding-left--lg{padding-left:2rem!important}.padding-horiz--lg,.padding-right--lg{padding-right:2rem!important}.padding--lg{padding:2rem!important}.padding-bottom--xl,.padding-vert--xl{padding-bottom:5rem!important}.padding-top--xl,.padding-vert--xl{padding-top:5rem!important}.padding-horiz--xl,.padding-left--xl{padding-left:5rem!important}.padding-horiz--xl,.padding-right--xl{padding-right:5rem!important}.padding--xl{padding:5rem!important}code{background-color:var(--ifm-code-background);border:.1rem solid #0000001a;border-radius:var(--ifm-code-border-radius);font-family:var(--ifm-font-family-monospace);font-size:var(--ifm-code-font-size);padding:var(--ifm-code-padding-vertical) var(--ifm-code-padding-horizontal);color:#f6f7f9}a code,a.panel_fODc{color:inherit}pre{background-color:var(--ifm-pre-background);border-radius:var(--ifm-pre-border-radius);color:var(--ifm-pre-color);font:var(--ifm-code-font-size)/var(--ifm-pre-line-height) var(--ifm-font-family-monospace);padding:var(--ifm-pre-padding)}html[data-theme=dark] .redocusaurus div[id^=tag] button+div,kbd{background-color:var(--ifm-color-emphasis-0)}pre code{background-color:initial;border:none;font-size:100%;line-height:inherit;padding:0}kbd{border:1px solid var(--ifm-color-emphasis-400);border-radius:.2rem;box-shadow:inset 0 -1px 0 var(--ifm-color-emphasis-400);color:var(--ifm-color-emphasis-800);font:80% var(--ifm-font-family-monospace);padding:.15rem .3rem}h1,h2,h3,h4,h5,h6{color:var(--ifm-heading-color);font-family:var(--ifm-heading-font-family);font-weight:var(--ifm-heading-font-weight);line-height:var(--ifm-heading-line-height);margin:var(--ifm-heading-margin-top) 0 var(--ifm-heading-margin-bottom) 0}h1{font-size:var(--ifm-h1-font-size)}h2{font-size:var(--ifm-h2-font-size)}h3{font-size:var(--ifm-h3-font-size)}h4{font-size:var(--ifm-h4-font-size)}h5{font-size:var(--ifm-h5-font-size)}h6{font-size:var(--ifm-h6-font-size)}.container_lyt7,.container_lyt7>svg,img{max-width:100%}img[align=right]{padding-left:var(--image-alignment-padding)}img[align=left]{padding-right:var(--image-alignment-padding)}.markdown{--ifm-h1-vertical-rhythm-top:3;--ifm-h2-vertical-rhythm-top:2;--ifm-h3-vertical-rhythm-top:1.5;--ifm-heading-vertical-rhythm-top:1.25;--ifm-h1-vertical-rhythm-bottom:1.25;--ifm-heading-vertical-rhythm-bottom:1}.markdown:after,.markdown:before{content:"";display:table}.markdown:after{clear:both}.markdown h1:first-child{--ifm-h1-font-size:3rem;margin-bottom:calc(var(--ifm-h1-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown>h2{--ifm-h2-font-size:2rem;margin-top:calc(var(--ifm-h2-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h3{--ifm-h3-font-size:1.5rem;margin-top:calc(var(--ifm-h3-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h4,.markdown>h5,.markdown>h6{margin-top:calc(var(--ifm-heading-vertical-rhythm-top)*var(--ifm-leading))}.markdown>p,.markdown>pre,.markdown>ul,.tabList__CuJ{margin-bottom:var(--ifm-leading)}.markdown li>p{margin-top:var(--ifm-list-paragraph-margin)}.markdown li+li{margin-top:var(--ifm-list-item-margin)}ol,ul{margin:0 0 var(--ifm-list-margin);padding-left:var(--ifm-list-left-padding)}ol ol,ul ol{list-style-type:lower-roman}ol ol ol,ol ul ol,ul ol ol,ul ul ol{list-style-type:lower-alpha}table{border-collapse:collapse;display:block;margin-bottom:var(--ifm-spacing-vertical)}table thead tr{border-bottom:2px solid var(--ifm-table-border-color)}table thead,table tr:nth-child(2n){background-color:var(--ifm-table-stripe-background)}table tr{background-color:var(--ifm-table-background);border-top:var(--ifm-table-border-width) solid var(--ifm-table-border-color)}table td,table th{border:var(--ifm-table-border-width) solid var(--ifm-table-border-color);padding:var(--ifm-table-cell-padding)}table th{background-color:var(--ifm-table-head-background);color:var(--ifm-table-head-color);font-weight:var(--ifm-table-head-font-weight)}table td{color:var(--ifm-table-cell-color)}strong{font-weight:var(--ifm-font-weight-bold)}a{color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}a:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration);-webkit-text-decoration:none;text-decoration:none}.button:hover,.text--no-decoration,.text--no-decoration:hover,a:not([href]){-webkit-text-decoration:none;text-decoration:none}p{margin:0 0 var(--ifm-paragraph-margin-bottom)}blockquote{border-left:var(--ifm-blockquote-border-left-width) solid var(--ifm-blockquote-border-color);box-shadow:var(--ifm-blockquote-shadow);color:var(--ifm-blockquote-color);font-size:var(--ifm-blockquote-font-size);padding:var(--ifm-blockquote-padding-vertical) var(--ifm-blockquote-padding-horizontal)}blockquote>:first-child{margin-top:0}blockquote>:last-child{margin-bottom:0}hr{background-color:var(--ifm-hr-background-color);border:0;height:var(--ifm-hr-height);margin:var(--ifm-hr-margin-vertical) 0}.shadow--lw{box-shadow:var(--ifm-global-shadow-lw)!important}.shadow--md{box-shadow:var(--ifm-global-shadow-md)!important}.shadow--tl{box-shadow:var(--ifm-global-shadow-tl)!important}.text--primary,.wordWrapButtonEnabled_uzNF .wordWrapButtonIcon_b1P5{color:var(--ifm-color-primary)}.text--secondary{color:var(--ifm-color-secondary)}.text--success{color:var(--ifm-color-success)}.text--info{color:var(--ifm-color-info)}.text--warning{color:var(--ifm-color-warning)}.text--danger{color:var(--ifm-color-danger)}.mainTitle_BcKq,.subTitle_opAm,.text--center{text-align:center}.text--left{text-align:left}.text--justify{text-align:justify}.text--right{text-align:right}.text--capitalize{text-transform:capitalize}.text--lowercase{text-transform:lowercase}.DocSearch-Escape-Key,.admonitionHeading_Gvgb,.alert__heading,.text--uppercase{text-transform:uppercase}.text--light{font-weight:var(--ifm-font-weight-light)}.text--normal{font-weight:var(--ifm-font-weight-normal)}.text--semibold{font-weight:var(--ifm-font-weight-semibold)}.text--bold{font-weight:var(--ifm-font-weight-bold)}.text--italic{font-style:italic}.text--truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text--break{word-wrap:break-word!important;word-break:break-word!important}.clean-btn{background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;padding:0}.alert,.alert .close{color:var(--ifm-alert-foreground-color)}.clean-list{list-style:none;padding-left:0}.alert--primary{--ifm-alert-background-color:var(--ifm-color-primary-contrast-background);--ifm-alert-background-color-highlight:#3578e526;--ifm-alert-foreground-color:var(--ifm-color-primary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-primary-dark)}.alert--secondary{--ifm-alert-background-color:var(--ifm-color-secondary-contrast-background);--ifm-alert-background-color-highlight:#ebedf026;--ifm-alert-foreground-color:var(--ifm-color-secondary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-secondary-dark)}.alert--success{--ifm-alert-background-color:var(--ifm-color-success-contrast-background);--ifm-alert-background-color-highlight:#00a40026;--ifm-alert-foreground-color:var(--ifm-color-success-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-success-dark)}.alert--info{--ifm-alert-background-color:var(--ifm-color-info-contrast-background);--ifm-alert-background-color-highlight:#54c7ec26;--ifm-alert-foreground-color:var(--ifm-color-info-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-info-dark)}.alert--warning{--ifm-alert-background-color:var(--ifm-color-warning-contrast-background);--ifm-alert-background-color-highlight:#ffba0026;--ifm-alert-foreground-color:var(--ifm-color-warning-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-warning-dark)}.alert{--ifm-code-background:var(--ifm-alert-background-color-highlight);--ifm-link-color:var(--ifm-alert-foreground-color);--ifm-link-hover-color:var(--ifm-alert-foreground-color);--ifm-link-decoration:underline;--ifm-tabs-color:var(--ifm-alert-foreground-color);--ifm-tabs-color-active:var(--ifm-alert-foreground-color);--ifm-tabs-color-active-border:var(--ifm-alert-border-color);background-color:var(--ifm-alert-background-color);border:var(--ifm-alert-border-width) solid var(--ifm-alert-border-color);border-left-width:var(--ifm-alert-border-left-width);border-radius:var(--ifm-alert-border-radius);box-shadow:var(--ifm-alert-shadow);padding:var(--ifm-alert-padding-vertical) var(--ifm-alert-padding-horizontal)}.alert__heading{align-items:center;display:flex;font:700 var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family);margin-bottom:.5rem}.alert__icon{display:inline-flex;margin-right:.4em}.alert__icon svg{fill:var(--ifm-alert-foreground-color);stroke:var(--ifm-alert-foreground-color);stroke-width:0}.alert .close{margin:calc(var(--ifm-alert-padding-vertical)*-1) calc(var(--ifm-alert-padding-horizontal)*-1) 0 0;opacity:.75}.alert .close:focus,.alert .close:hover{opacity:1}.alert a{-webkit-text-decoration-color:var(--ifm-alert-border-color);text-decoration-color:var(--ifm-alert-border-color)}.alert a:hover{text-decoration-thickness:2px}.avatar{column-gap:var(--ifm-avatar-intro-margin);display:flex}.avatar__photo{border-radius:50%;display:block;height:var(--ifm-avatar-photo-size);overflow:hidden;width:var(--ifm-avatar-photo-size)}.card--full-height,.navbar__logo img{height:100%}.avatar__photo--sm{--ifm-avatar-photo-size:2rem}.avatar__photo--lg{--ifm-avatar-photo-size:4rem}.avatar__photo--xl{--ifm-avatar-photo-size:6rem}.avatar__intro{display:flex;flex:1 1;flex-direction:column;justify-content:center;text-align:var(--ifm-avatar-intro-alignment)}.badge,.breadcrumbs__item,.breadcrumbs__link,.button{display:inline-block}.avatar__name{font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base)}.avatar__subtitle{margin-top:.25rem}.avatar--vertical{--ifm-avatar-intro-alignment:center;--ifm-avatar-intro-margin:0.5rem;align-items:center;flex-direction:column}.badge{background-color:var(--ifm-badge-background-color);border:var(--ifm-badge-border-width) solid var(--ifm-badge-border-color);border-radius:var(--ifm-badge-border-radius);color:var(--ifm-badge-color);font-size:75%;font-weight:var(--ifm-font-weight-bold);line-height:1;padding:var(--ifm-badge-padding-vertical) var(--ifm-badge-padding-horizontal)}.badge--primary{--ifm-badge-background-color:var(--ifm-color-primary)}.badge--secondary{--ifm-badge-background-color:var(--ifm-color-secondary);color:var(--ifm-color-black)}.breadcrumbs__link,.button.button--secondary.button--outline:not(.button--active):not(:hover),.redocusaurus h2,.redocusaurus h3,.redocusaurus h4{color:var(--ifm-font-color-base)}.badge--success{--ifm-badge-background-color:var(--ifm-color-success)}.badge--info{--ifm-badge-background-color:var(--ifm-color-info)}.badge--warning{--ifm-badge-background-color:var(--ifm-color-warning)}.badge--danger{--ifm-badge-background-color:var(--ifm-color-danger)}.breadcrumbs{margin-bottom:0;padding-left:0}.breadcrumbs__item:not(:last-child):after{background:var(--ifm-breadcrumb-separator) center;content:" ";display:inline-block;filter:var(--ifm-breadcrumb-separator-filter);height:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier));margin:0 var(--ifm-breadcrumb-spacing);opacity:.5;width:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier))}.breadcrumbs__item--active .breadcrumbs__link{background:var(--ifm-breadcrumb-item-background-active);color:var(--ifm-breadcrumb-color-active)}.breadcrumbs__link{border-radius:var(--ifm-breadcrumb-border-radius);font-size:calc(1rem*var(--ifm-breadcrumb-size-multiplier));padding:calc(var(--ifm-breadcrumb-padding-vertical)*var(--ifm-breadcrumb-size-multiplier)) calc(var(--ifm-breadcrumb-padding-horizontal)*var(--ifm-breadcrumb-size-multiplier));transition-duration:var(--ifm-transition-fast);transition-property:background,color}.breadcrumbs__link:any-link:hover,.breadcrumbs__link:link:hover,.breadcrumbs__link:visited:hover,area[href].breadcrumbs__link:hover{background:var(--ifm-breadcrumb-item-background-active);-webkit-text-decoration:none;text-decoration:none}.breadcrumbs--sm{--ifm-breadcrumb-size-multiplier:0.8}.breadcrumbs--lg{--ifm-breadcrumb-size-multiplier:1.2}.button{background-color:var(--ifm-button-background-color);border:var(--ifm-button-border-width) solid var(--ifm-button-border-color);border-radius:var(--ifm-button-border-radius);cursor:pointer;font-size:calc(.875rem*var(--ifm-button-size-multiplier));font-weight:var(--ifm-button-font-weight);line-height:1.5;padding:calc(var(--ifm-button-padding-vertical)*var(--ifm-button-size-multiplier)) calc(var(--ifm-button-padding-horizontal)*var(--ifm-button-size-multiplier));text-align:center;transition-duration:var(--ifm-button-transition-duration);transition-property:color,background,border-color;-webkit-user-select:none;user-select:none;white-space:nowrap}.button,.button:hover{color:var(--ifm-button-color)}.button--outline{--ifm-button-color:var(--ifm-button-border-color)}.button--outline:hover{--ifm-button-background-color:var(--ifm-button-border-color)}.button--link{--ifm-button-border-color:#0000;color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}.button--link.button--active,.button--link:active,.button--link:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.DocSearch-Container a,.DocSearch-Hit-AskAIButton-title mark,.dropdown__link--active,.dropdown__link:hover,.hub-card__link,.menu__link:hover,.navbar__brand:hover,.navbar__link--active,.navbar__link:hover,.pagination-nav__link:hover,.pagination__link:hover,.sidebarItemLink_mo7H:hover,.theme-admonition a{-webkit-text-decoration:none;text-decoration:none}.button.disabled,.button:disabled,.button[disabled]{opacity:.65;pointer-events:none}.button--sm{--ifm-button-size-multiplier:0.8}.button--lg{--ifm-button-size-multiplier:1.35}.button--block{display:block;width:100%}.button.button--secondary{color:var(--ifm-color-gray-900)}:where(.button--primary){--ifm-button-background-color:var(--ifm-color-primary);--ifm-button-border-color:var(--ifm-color-primary)}:where(.button--primary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-primary-dark);--ifm-button-border-color:var(--ifm-color-primary-dark)}.button--primary.button--active,.button--primary:active{--ifm-button-background-color:var(--ifm-color-primary-darker);--ifm-button-border-color:var(--ifm-color-primary-darker)}:where(.button--secondary){--ifm-button-background-color:var(--ifm-color-secondary);--ifm-button-border-color:var(--ifm-color-secondary)}:where(.button--secondary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-secondary-dark);--ifm-button-border-color:var(--ifm-color-secondary-dark)}.button--secondary.button--active,.button--secondary:active{--ifm-button-background-color:var(--ifm-color-secondary-darker);--ifm-button-border-color:var(--ifm-color-secondary-darker)}:where(.button--success){--ifm-button-background-color:var(--ifm-color-success);--ifm-button-border-color:var(--ifm-color-success)}:where(.button--success):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-success-dark);--ifm-button-border-color:var(--ifm-color-success-dark)}.button--success.button--active,.button--success:active{--ifm-button-background-color:var(--ifm-color-success-darker);--ifm-button-border-color:var(--ifm-color-success-darker)}:where(.button--info){--ifm-button-background-color:var(--ifm-color-info);--ifm-button-border-color:var(--ifm-color-info)}:where(.button--info):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-info-dark);--ifm-button-border-color:var(--ifm-color-info-dark)}.button--info.button--active,.button--info:active{--ifm-button-background-color:var(--ifm-color-info-darker);--ifm-button-border-color:var(--ifm-color-info-darker)}:where(.button--warning){--ifm-button-background-color:var(--ifm-color-warning);--ifm-button-border-color:var(--ifm-color-warning)}:where(.button--warning):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-warning-dark);--ifm-button-border-color:var(--ifm-color-warning-dark)}.button--warning.button--active,.button--warning:active{--ifm-button-background-color:var(--ifm-color-warning-darker);--ifm-button-border-color:var(--ifm-color-warning-darker)}:where(.button--danger){--ifm-button-background-color:var(--ifm-color-danger);--ifm-button-border-color:var(--ifm-color-danger)}:where(.button--danger):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-danger-dark);--ifm-button-border-color:var(--ifm-color-danger-dark)}.button--danger.button--active,.button--danger:active{--ifm-button-background-color:var(--ifm-color-danger-darker);--ifm-button-border-color:var(--ifm-color-danger-darker)}.button-group{display:inline-flex;gap:var(--ifm-button-group-spacing)}.button-group>.button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.button-group>.button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.button-group--block{display:flex;justify-content:stretch}.button-group--block>.button{flex-grow:1}.card{background-color:var(--ifm-card-background-color);border-radius:var(--ifm-card-border-radius);box-shadow:var(--ifm-global-shadow-lw);display:flex;flex-direction:column;overflow:hidden}.card__image{padding-top:var(--ifm-card-vertical-spacing)}.card__image:first-child{padding-top:0}.card__body,.card__footer,.card__header{padding:var(--ifm-card-vertical-spacing) var(--ifm-card-horizontal-spacing)}.card__body:not(:last-child),.card__footer:not(:last-child),.card__header:not(:last-child){padding-bottom:0}.card__body>:last-child,.card__footer>:last-child,.card__header>:last-child{margin-bottom:0}.card__footer{margin-top:auto}.table-of-contents{font-size:.8rem;margin-bottom:0;padding:var(--ifm-toc-padding-vertical) 0}.table-of-contents,.table-of-contents ul{list-style:none;padding-left:var(--ifm-toc-padding-horizontal)}.table-of-contents li{margin:var(--ifm-toc-padding-vertical) var(--ifm-toc-padding-horizontal)}.table-of-contents__left-border{border-left:1px solid var(--ifm-toc-border-color)}.table-of-contents__link{color:var(--ifm-toc-link-color);display:block}.table-of-contents__link--active,.table-of-contents__link--active code,.table-of-contents__link:hover,.table-of-contents__link:hover code{color:var(--ifm-color-primary);-webkit-text-decoration:none;text-decoration:none}.close{color:var(--ifm-color-black);float:right;font-size:1.5rem;font-weight:var(--ifm-font-weight-bold);line-height:1;opacity:.5;padding:1rem;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.close:hover{opacity:.7}.close:focus{opacity:.8}.dropdown{display:inline-flex;font-weight:var(--ifm-dropdown-font-weight);position:relative;vertical-align:top}.dropdown--hoverable:hover .dropdown__menu,.dropdown--show .dropdown__menu{opacity:1;pointer-events:all;transform:translateY(-1px);visibility:visible}#nprogress,.dropdown__menu,.navbar__item.dropdown .navbar__link:not([href]),.shimmer{pointer-events:none}.dropdown--right .dropdown__menu{left:inherit;right:0}.dropdown--nocaret .navbar__link:after{content:none!important}.dropdown__menu{background-color:var(--ifm-dropdown-background-color);border-radius:var(--ifm-global-radius);box-shadow:var(--ifm-global-shadow-md);left:0;list-style:none;max-height:80vh;min-width:10rem;opacity:0;overflow-y:auto;padding:.5rem;position:absolute;top:calc(100% - var(--ifm-navbar-item-padding-vertical) + .3rem);transform:translateY(-.625rem);transition-duration:var(--ifm-transition-fast);transition-timing-function:var(--ifm-transition-timing-default);visibility:hidden;z-index:var(--ifm-z-index-dropdown)}.menu__caret,.menu__link,.menu__list-item-collapsible{border-radius:.25rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.dropdown__link{border-radius:.25rem;color:var(--ifm-dropdown-link-color);display:block;font-size:.875rem;margin-top:.2rem;padding:.25rem .5rem;white-space:nowrap}.dropdown__link--active,.dropdown__link:hover{background-color:var(--ifm-dropdown-hover-background-color);color:var(--ifm-dropdown-link-color)}.dropdown__link--active,.dropdown__link--active:hover{--ifm-dropdown-link-color:var(--ifm-link-color)}.dropdown>.navbar__link:after{content:""}.footer{background-color:var(--ifm-footer-background-color);color:var(--ifm-footer-color);padding:var(--ifm-footer-padding-vertical) var(--ifm-footer-padding-horizontal)}.footer--dark{--ifm-footer-background-color:#303846;--ifm-footer-color:var(--ifm-footer-link-color);--ifm-footer-link-color:var(--ifm-color-secondary);--ifm-footer-title-color:var(--ifm-color-white)}.footer__links{margin-bottom:1rem}.footer__link-item{color:var(--ifm-footer-link-color);line-height:2}.footer__link-item:hover{color:var(--ifm-footer-link-hover-color)}.footer__link-separator{margin:0 var(--ifm-footer-link-horizontal-spacing)}.footer__logo{margin-top:1rem;max-width:var(--ifm-footer-logo-max-width)}.footer__title{color:var(--ifm-footer-title-color);font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base);margin-bottom:var(--ifm-heading-margin-bottom)}.menu,.navbar__link{font-weight:var(--ifm-font-weight-semibold)}.footer__item{margin-top:0}.footer__items,.tabItem_Ymn6>:last-child{margin-bottom:0}[type=checkbox]{padding:0}.hero{align-items:center;background-color:var(--ifm-hero-background-color);color:var(--ifm-hero-text-color);display:flex;padding:4rem 2rem}.hero--primary{--ifm-hero-background-color:var(--ifm-color-primary);--ifm-hero-text-color:var(--ifm-font-color-base-inverse)}.hero--dark{--ifm-hero-background-color:#303846;--ifm-hero-text-color:var(--ifm-color-white)}.hero__title,.title_f1Hy{font-size:3rem}.hero__subtitle{font-size:1.5rem}.menu__list{list-style:none;margin:0;padding-left:0}.menu__caret,.menu__link{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu__list .menu__list{flex:0 0 100%;margin-top:.25rem;padding-left:var(--ifm-menu-link-padding-horizontal)}.menu__list-item:not(:first-child){margin-top:.25rem}.menu__list-item--collapsed .menu__list{height:0;overflow:hidden}.details_lb9f[data-collapsed=false].isBrowser_bmU9>summary:before,.details_lb9f[open]:not(.isBrowser_bmU9)>summary:before,.menu__list-item--collapsed .menu__caret:before,.menu__list-item--collapsed .menu__link--sublist:after{transform:rotate(90deg)}.menu__list-item-collapsible{display:flex;flex-wrap:wrap;position:relative}.menu__caret:hover,.menu__link:hover,.menu__list-item-collapsible--active,.menu__list-item-collapsible:hover{background:var(--ifm-menu-color-background-hover)}.menu__list-item-collapsible .menu__link--active,.menu__list-item-collapsible .menu__link:hover{background:none!important}.menu__caret,.menu__link{align-items:center;display:flex}.menu__link{color:var(--ifm-menu-color);flex:1;line-height:1.25}.menu__link:hover{color:var(--ifm-menu-color)}.menu__caret:before,.menu__link--sublist-caret:after{height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast) linear;width:1.25rem;content:"";filter:var(--ifm-menu-link-sublist-icon-filter)}.menu__link--sublist-caret:after{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem;margin-left:auto;min-width:1.25rem}.menu__link--active,.menu__link--active:hover{color:var(--ifm-menu-color-active)}.navbar__brand,.navbar__link{color:var(--ifm-navbar-link-color)}.menu__link--active:not(.menu__link--sublist){background-color:var(--ifm-menu-color-background-active)}.menu__caret:before{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem}.navbar--dark,html[data-theme=dark]{--ifm-menu-link-sublist-icon-filter:invert(100%) sepia(94%) saturate(17%) hue-rotate(223deg) brightness(104%) contrast(98%)}.navbar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-navbar-shadow);height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar,.navbar>.container,.navbar>.container-fluid{display:flex}.navbar--fixed-top{position:-webkit-sticky;position:sticky;top:0;z-index:var(--ifm-z-index-fixed)}.navbar-sidebar,.navbar-sidebar__backdrop{opacity:0;position:fixed;top:0;transition-duration:var(--ifm-transition-fast);visibility:hidden;left:0;bottom:0}.navbar__inner{display:flex;flex-wrap:wrap;justify-content:space-between;width:100%}.navbar__brand{align-items:center;display:flex;margin-right:1rem;min-width:0}.navbar__brand:hover{color:var(--ifm-navbar-link-hover-color)}.announcementBarContent_xLdY,.navbar__title{flex:1 1 auto}.navbar__toggle{display:none;margin-right:.5rem}.navbar__logo{flex:0 0 auto;height:2rem;margin-right:.5rem}.navbar__items{align-items:center;display:flex;flex:1;min-width:0}.navbar__items--center{flex:0 0 auto}.navbar__items--center .navbar__brand{margin:0}.navbar__items--center+.navbar__items--right{flex:1}.navbar__items--right{flex:0 0 auto;justify-content:flex-end}.navbar__item{display:inline-block;padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.navbar__link--active,.navbar__link:hover{color:var(--ifm-navbar-link-hover-color)}.navbar--dark,.navbar--primary{--ifm-menu-color:var(--ifm-color-gray-300);--ifm-navbar-link-color:var(--ifm-color-gray-100);--ifm-navbar-search-input-background-color:#ffffff1a;--ifm-navbar-search-input-placeholder-color:#ffffff80;color:var(--ifm-color-white)}.navbar--dark{--ifm-navbar-background-color:#242526;--ifm-menu-color-background-active:#ffffff0d;--ifm-navbar-search-input-color:var(--ifm-color-white)}.navbar--primary{--ifm-navbar-background-color:var(--ifm-color-primary);--ifm-navbar-link-hover-color:var(--ifm-color-white);--ifm-menu-color-active:var(--ifm-color-white);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-500)}.navbar__search-input{-webkit-appearance:none;appearance:none;background:var(--ifm-navbar-search-input-background-color) var(--ifm-navbar-search-input-icon) no-repeat .75rem center/1rem 1rem;border:none;border-radius:2rem;color:var(--ifm-navbar-search-input-color);cursor:text;display:inline-block;font-size:1rem;height:2rem;padding:0 .5rem 0 2.25rem;width:12.5rem}.navbar__search-input::placeholder{color:var(--ifm-navbar-search-input-placeholder-color)}.navbar-sidebar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-global-shadow-md);transform:translate3d(-100%,0,0);width:var(--ifm-navbar-sidebar-width)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar__items{transform:translateZ(0)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar--show .navbar-sidebar__backdrop{opacity:1;visibility:visible}.navbar-sidebar__backdrop{background-color:#0009;right:0;transition-property:opacity,visibility;transition-timing-function:ease-in-out}.navbar-sidebar__brand{align-items:center;box-shadow:var(--ifm-navbar-shadow);display:flex;flex:1;height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar-sidebar__items{display:flex;height:calc(100% - var(--ifm-navbar-height));transition:transform var(--ifm-transition-fast) ease-in-out}.navbar-sidebar__items--show-secondary{transform:translate3d(calc((var(--ifm-navbar-sidebar-width))*-1),0,0)}.navbar-sidebar__item{flex-shrink:0;padding:.5rem;width:calc(var(--ifm-navbar-sidebar-width))}.navbar-sidebar__back{background:var(--ifm-menu-color-background-active);font-size:15px;font-weight:var(--ifm-button-font-weight);margin:0 0 .2rem -.5rem;padding:.6rem 1.5rem;position:relative;text-align:left;top:-.5rem;width:calc(100% + 1rem)}.navbar-sidebar__close{display:flex;margin-left:auto}.pagination{column-gap:var(--ifm-pagination-page-spacing);display:flex;font-size:var(--ifm-pagination-font-size);padding-left:0}.pagination--sm{--ifm-pagination-font-size:0.8rem;--ifm-pagination-padding-horizontal:0.8rem;--ifm-pagination-padding-vertical:0.2rem}.pagination--lg{--ifm-pagination-font-size:1.2rem;--ifm-pagination-padding-horizontal:1.2rem;--ifm-pagination-padding-vertical:0.3rem}.pagination__item{display:inline-flex}.pagination__item>span{padding:var(--ifm-pagination-padding-vertical)}.pagination__item--active .pagination__link{color:var(--ifm-pagination-color-active)}.pagination__item--active .pagination__link,.pagination__item:not(.pagination__item--active):hover .pagination__link{background:var(--ifm-pagination-item-active-background)}.pagination__item--disabled,.pagination__item[disabled]{opacity:.25;pointer-events:none}.pagination__link{border-radius:var(--ifm-pagination-border-radius);color:var(--ifm-font-color-base);display:inline-block;padding:var(--ifm-pagination-padding-vertical) var(--ifm-pagination-padding-horizontal);transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination-nav{display:grid;grid-gap:var(--ifm-spacing-horizontal);gap:var(--ifm-spacing-horizontal);grid-template-columns:repeat(2,1fr)}.pagination-nav__link{border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-pagination-nav-border-radius);display:block;height:100%;line-height:var(--ifm-heading-line-height);padding:var(--ifm-global-spacing);transition:border-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination-nav__link:hover{border-color:var(--ifm-pagination-nav-color-hover)}.pagination-nav__link--next{grid-column:2/3;text-align:right}.pagination-nav__label{font-size:var(--ifm-h4-font-size);font-weight:var(--ifm-heading-font-weight);word-break:break-word}.pagination-nav__link--prev .pagination-nav__label:before{content:"Β« "}.pagination-nav__link--next .pagination-nav__label:after{content:" Β»"}.pagination-nav__sublabel{color:var(--ifm-color-content-secondary);font-size:var(--ifm-h5-font-size);font-weight:var(--ifm-font-weight-semibold);margin-bottom:.25rem}.pills__item,.tabs{font-weight:var(--ifm-font-weight-bold)}.pills{display:flex;gap:var(--ifm-pills-spacing);padding-left:0}.pills__item{border-radius:.5rem;cursor:pointer;display:inline-block;padding:.25rem 1rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs,:not(.containsTaskList_mC6p>li)>.containsTaskList_mC6p{padding-left:0}.pills__item--active{color:var(--ifm-pills-color-active)}.pills__item--active,.pills__item:not(.pills__item--active):hover{background:var(--ifm-pills-color-background-active)}.pills--block{justify-content:stretch}.pills--block .pills__item{flex-grow:1;text-align:center}.tabs{color:var(--ifm-tabs-color);display:flex;margin-bottom:0;overflow-x:auto}.tabs__item{border-bottom:3px solid #0000;border-radius:var(--ifm-global-radius);cursor:pointer;display:inline-flex;padding:var(--ifm-tabs-padding-vertical) var(--ifm-tabs-padding-horizontal);transition:background-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs__item--active{border-bottom-color:var(--ifm-tabs-color-active-border);border-bottom-left-radius:0;border-bottom-right-radius:0;color:var(--ifm-tabs-color-active)}.button--secondary,.hero .button:hover{color:#f6f7f9!important}.tabs__item:hover{background-color:var(--ifm-hover-overlay)}.tabs--block{justify-content:stretch}.tabs--block .tabs__item{flex-grow:1;justify-content:center}html[data-theme=dark]{--ifm-color-scheme:dark;--ifm-color-emphasis-0:var(--ifm-color-gray-1000);--ifm-color-emphasis-100:var(--ifm-color-gray-900);--ifm-color-emphasis-200:var(--ifm-color-gray-800);--ifm-color-emphasis-300:var(--ifm-color-gray-700);--ifm-color-emphasis-400:var(--ifm-color-gray-600);--ifm-color-emphasis-600:var(--ifm-color-gray-400);--ifm-color-emphasis-700:var(--ifm-color-gray-300);--ifm-color-emphasis-800:var(--ifm-color-gray-200);--ifm-color-emphasis-900:var(--ifm-color-gray-100);--ifm-color-emphasis-1000:var(--ifm-color-gray-0);--ifm-background-color:#1b1b1d;--ifm-background-surface-color:#242526;--ifm-hover-overlay:#ffffff0d;--ifm-color-content:#e3e3e3;--ifm-color-content-secondary:#fff;--ifm-breadcrumb-separator-filter:invert(64%) sepia(11%) saturate(0%) hue-rotate(149deg) brightness(99%) contrast(95%);--ifm-code-background:#ffffff1a;--ifm-scrollbar-track-background-color:#444;--ifm-scrollbar-thumb-background-color:#686868;--ifm-scrollbar-thumb-hover-background-color:#7a7a7a;--ifm-table-stripe-background:#ffffff12;--ifm-toc-border-color:var(--ifm-color-emphasis-200);--ifm-color-primary-contrast-background:#102445;--ifm-color-primary-contrast-foreground:#ebf2fc;--ifm-color-secondary-contrast-background:#474748;--ifm-color-secondary-contrast-foreground:#fdfdfe;--ifm-color-success-contrast-background:#003100;--ifm-color-success-contrast-foreground:#e6f6e6;--ifm-color-info-contrast-background:#193c47;--ifm-color-info-contrast-foreground:#eef9fd;--ifm-color-warning-contrast-background:#4d3800;--ifm-color-warning-contrast-foreground:#fff8e6;--ifm-color-danger-contrast-background:#4b1113;--ifm-color-danger-contrast-foreground:#ffebec;--docsearch-text-color:#c4c7dc;--docsearch-secondary-text-color:#b6b7d5;--docsearch-subtle-color:#212139;--docsearch-success-color:#43a04733;--docsearch-highlight-color:#457aff;--docsearch-focus-color:#9ac8ff;--docsearch-background-color:#36395a;--docsearch-icon-color:#b6b7d5;--docsearch-container-background:#090a11cc;--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#000000a6;--docsearch-searchbox-focus-background:#000000a6;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-background:#36395a;--docsearch-key-color:#b6b7d5;--docsearch-key-pressed-shadow:inset 0 2px 4px #0c0d1466;--docsearch-footer-background:#000000a6;--docsearch-footer-shadow:inset 0 1px 0 0 #494c6a80,0 -4px 8px 0 #0003;--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497;--docsearch-search-button-background:var(--docsearch-modal-background);--docsearch-search-button-text-color:var(--docsearch-text-color)}:root{--docusaurus-progress-bar-color:var(--ifm-color-primary);--ifm-color-primary:#ff7900;--ifm-color-black:#242424;--ifm-color-primary-dark:#242424;--ifm-color-primary-darker:#242424;--ifm-color-primary-darkest:#242424;--ifm-color-primary-light:#f6f7f9;--ifm-color-primary-lighter:#f6f7f9;--ifm-color-primary-lightest:#f6f7f9;--ifm-code-font-size:95%;--ifm-footer-background-color:#242424!important;--ifm-font-color-base-inverse:#f6f7f9!important}#nprogress .bar{background:var(--docusaurus-progress-bar-color);height:2px;left:0;position:fixed;top:0;width:100%;z-index:1031}#nprogress .peg{box-shadow:0 0 10px var(--docusaurus-progress-bar-color),0 0 5px var(--docusaurus-progress-bar-color);height:100%;opacity:1;position:absolute;right:0;transform:rotate(3deg) translateY(-4px);width:100px}@font-face{font-family:Inter;font-style:normal;font-weight:400;src:url(/assets/fonts/Inter-Regular-e89cb19905e7db5591b0037b15a1d9cd.ttf)}@font-face{font-family:InterSemiBold;font-style:normal;font-weight:700;src:url(/assets/fonts/Inter-SemiBold-4d56bb21f2399db8ad480d590a49fac3.ttf)}.menu--responsive .menu__button{background:#ff7900}.menu__link,.navbar__link,.navbar__title,header{font-family:InterSemiBold}header.hero{background:#242424!important;padding:6rem}.hero h1{font-size:3rem!important}.hero .button{border-color:#ff7900!important;color:#ff7900!important}.hero .button:hover{background-color:#ff7900!important;border-color:#ff7900!important}h1{font-size:2.4rem!important}.hero__title{margin-bottom:2rem!important}.hero__subtitle{display:none!important}.disclaimer{font-weight:700;margin:20px 20%}.footer,[data-theme=dark] .navbar{background:#000!important}[data-theme=dark] .main-wrapper{background:#141516!important}.alert--danger{--ifm-alert-background-color:var(--ifm-color-danger-contrast-background);--ifm-alert-background-color-highlight:#fa383e26;--ifm-alert-foreground-color:var(--ifm-color-danger-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-danger-dark);background:#d0131f}.alert--info{background:#2caa5f}.alert--tip{background:#4aa8df}.codeBlockLines_node_modules-\@docusaurus-theme-classic-lib-theme-CodeBlock-,code,pre{background:#242424!important}.header-github-link:hover{opacity:.6}.header-github-link:before{background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") no-repeat;content:"";display:flex;height:24px;width:24px}[data-theme=dark] .header-github-link:before{background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") no-repeat}.dropdown>.navbar__link:after{border-color:currentcolor #0000;border-style:solid;border-width:0;content:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSI4IiBmaWxsPSJub25lIj48cGF0aCBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgc3Ryb2tlLXdpZHRoPSIyIiBkPSJtOS45OTkgMi00IDQtNC00Ii8+PC9zdmc+);display:inline-block;height:12px;margin-left:.3em;position:relative;top:4px;transform:translateY(-50%);width:12px}[data-theme=dark] .dropdown>.navbar__link:hover:after,[data-theme=light] .dropdown>.navbar__link:hover:after{filter:invert(43%) sepia(78%) saturate(1287%) hue-rotate(2deg) brightness(104%) contrast(103%)}[data-theme=dark] .dropdown>.navbar__link:after{filter:invert(100%) sepia(0) saturate(2819%) hue-rotate(178deg) brightness(107%) contrast(78%)}.footer__link-item,.footer__title,[data-theme=dark] .sectionButton_Yvap:hover{color:#f6f7f9}[data-theme=light] .navbar__link{color:#242424}.dropdown__menu{transition:opacity .2s linear}.navbar-sidebar{transition:transform .2s linear}.menu__list{transition:height .2s linear!important}[data-theme=dark] .theme-admonition-note{background-color:#465158;border-color:#c1c9cf}[data-theme=dark] .theme-admonition-tip{background-color:#0f6648;border-color:#00daa1}[data-theme=dark] .theme-admonition-info{background-color:#264c6e;border-color:#007fff}[data-theme=dark] .theme-admonition-caution{background-color:#784213;border-color:#f37300}[data-theme=dark] .theme-admonition-danger{background-color:#791112;border-color:#f30000}[data-theme=light] .theme-admonition-note{background-color:#e5e9ec;border-color:#c1c9cf}[data-theme=light] .theme-admonition-tip{background-color:#e0fff4;border-color:#00daa1}[data-theme=light] .theme-admonition-info{background-color:#e2f1ff;border-color:#007fff}[data-theme=light] .theme-admonition-caution{background-color:#fde9d7;border-color:#f37300}[data-theme=light] .theme-admonition-danger{background-color:#fecdcd;border-color:#f30000}.theme-admonition a{border-bottom:2px solid;font-weight:600;padding-bottom:1px}.theme-admonition a:focus,.theme-admonition a:hover{border-bottom-color:var(--ifm-color-primary);color:var(--ifm-color-primary)}#__docusaurus-base-url-issue-banner-container,.redocusaurus{display:none}html[data-has-hydrated=true] .redocusaurus{display:block}.responsive-image{display:block;margin:auto;width:90%}.hub-hero{background:#0000;padding:2.5rem 0 1rem}.hub-title{font-family:InterSemiBold,Inter,system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Apple Color Emoji,Segoe UI Emoji;font-size:2.2rem;letter-spacing:.2px;margin:0 0 .25rem}.hub-sub{margin:0 0 .75rem;opacity:.8}.hub-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));list-style:none;margin:0;padding:0;grid-gap:1rem;gap:1rem}.hub-card{border:1px solid #0000001f;border-radius:14px;overflow:hidden;transition:transform .15s,box-shadow .15s}.hub-card__link{background-color:var(--ifm-background-surface);border-radius:inherit;color:inherit;display:block;height:100%;padding:20px 22px;transition:background-color .2s,border-color .2s,box-shadow .2s,transform .15s}[data-theme=dark] .hub-card__link{background-color:#ffffff0a;border-color:#ffffff1f}.hub-card__link:focus,.hub-card__link:hover{background-color:var(--ifm-color-emphasis-100);border-color:var(--ifm-color-primary);box-shadow:0 4px 16px #0000001f;cursor:pointer;transform:translateY(-2px)}[data-theme=dark] .hub-card__link:focus,[data-theme=dark] .hub-card__link:hover{background-color:#ffffff14;border-color:var(--ifm-color-primary);box-shadow:0 4px 16px #0006}.hub-card__title{font-size:1.3rem;font-weight:700;line-height:1.35;margin:0 0 10px}.hub-card__desc{font-size:1rem;margin:0 0 12px;opacity:.85}.hub-card__cta{align-items:center;border-bottom:1px solid #0000;color:var(--ifm-color-primary);display:inline-flex;font-weight:600;gap:.4rem}.hub-card__cta:after{content:"β†’";transition:transform .15s}.hub-card__link:hover .hub-card__cta:after{transform:translateX(3px)}.docs-doc-page .hero{background:#0000!important;padding:2rem 0!important}:where(.theme-doc-sidebar-container,.navbar-sidebar) .menu__link{font-family:var(--ifm-font-family-base)!important;font-weight:400!important}:where(.theme-doc-sidebar-container,.navbar-sidebar) .theme-doc-sidebar-item-category-level-1>.menu__list-item-collapsible>a.menu__link--sublist{font-family:var(--ifm-font-family-base)!important;font-size:1rem;font-weight:700!important}:where(.theme-doc-sidebar-container,.navbar-sidebar) .theme-doc-sidebar-item-category-level-1>.menu__list-item-collapsible>button.menu__link--sublist{font-family:var(--ifm-font-family-base)!important;font-size:1rem;font-weight:700!important}.navbar-sidebar .menu__list>.theme-doc-sidebar-item-category>.menu__list-item-collapsible>a.menu__link--sublist,.navbar-sidebar .menu__list>.theme-doc-sidebar-item-category>.menu__list-item-collapsible>button.menu__link--sublist{font-size:1rem;font-weight:700!important}:where(.theme-doc-sidebar-container,.navbar-sidebar) .theme-doc-sidebar-item-category:not(.theme-doc-sidebar-item-category-level-1)>.menu__list-item-collapsible>a.menu__link--sublist{font-weight:400!important}:where(.theme-doc-sidebar-container,.navbar-sidebar) .theme-doc-sidebar-item-category:not(.theme-doc-sidebar-item-category-level-1)>.menu__list-item-collapsible>button.menu__link--sublist{font-weight:400!important}:where(.theme-doc-sidebar-container,.navbar-sidebar) .theme-doc-sidebar-item-link .menu__link,:where(.theme-doc-sidebar-container,.navbar-sidebar) .theme-doc-sidebar-item-link .menu__link.menu__link--active{font-weight:400!important}html{font-size:14px}.markdown a code,.theme-doc-markdown a code{background-color:initial!important;border-bottom:1px solid;color:var(--ifm-link-color)!important;padding:0}.markdown a:focus code,.markdown a:hover code,.theme-doc-markdown a:focus code,.theme-doc-markdown a:hover code{border-bottom-color:var(--ifm-color-primary);color:var(--ifm-color-primary)!important}.markdown a:visited code,.theme-doc-markdown a:visited code{border-bottom-color:initial;color:var(--ifm-link-color)!important}.docusaurus-highlight-code-line{background-color:#484d5b;display:block;margin:0 calc(var(--ifm-pre-padding)*-1);padding:0 var(--ifm-pre-padding)}.redocusaurus>div:first-child>svg{margin-top:10px;max-height:4rem;max-width:4rem}.redocusaurus table>tbody>tr{background-color:var(--ifm-table-cell-color)!important;color:var(--ifm-font-color-base)}.backToTopButton_sjWU{background-color:var(--ifm-color-emphasis-200);border-radius:50%;bottom:1.3rem;box-shadow:var(--ifm-global-shadow-lw);height:3rem;opacity:0;position:fixed;right:1.3rem;transform:scale(0);transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default);visibility:hidden;width:3rem;z-index:calc(var(--ifm-z-index-fixed) - 1)}.backToTopButton_sjWU:after{background-color:var(--ifm-color-emphasis-1000);content:" ";display:inline-block;height:100%;-webkit-mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;width:100%}.backToTopButtonShow_xfvO{opacity:1;transform:scale(1);visibility:visible}:root{--ifm-font-size-base:14px;--docsearch-primary-color:#003dff;--docsearch-soft-primary-color:#003dff1a;--docsearch-subtle-color:#d6d6e7;--docsearch-text-color:#36395a;--docsearch-success-color:#e8f5e9;--docsearch-secondary-text-color:#5a5e9a;--docsearch-background-color:#f5f5fa;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-focus-color:#005fcc;--docsearch-highlight-color:#003dff;--docsearch-muted-color:#9698c3;--docsearch-muted-color-darker:#787aa540;--docsearch-icon-color:#5a5e9a;--docsearch-container-background:#656c85cc;--docsearch-logo-color:#003dff;--docsearch-border-radius:4px;--docsearch-search-button-background:#fff;--docsearch-search-button-text-color:var(--docsearch-secondary-text-color);--docsearch-modal-width:800px;--docsearch-modal-height:600px;--docsearch-modal-variable-height:60dvh;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:#0003 0px 12px 28px 0px,#0000001a 0px 2px 4px 0px,#ffffff0d 0px 0px 0px 1px inset;--docsearch-searchbox-height:56px;--docsearch-searchbox-initial-height:56px;--docsearch-searchbox-background:#ffffffa6;--docsearch-searchbox-focus-background:#ffffffa6;--docsearch-actions-width:99px;--docsearch-actions-height:44px;--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-highlight-color:#003dff1a;--docsearch-hit-background:#fff;--docsearch-key-background:#f5f5fa;--docsearch-key-color:#5a5e9a;--docsearch-key-pressed-shadow:inset 0 2px 4px #787aa540;--docsearch-footer-height:52px;--docsearch-footer-background:#ffffffa6;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 #45629b1f;--fav-out-dur:160ms;--del-dur:150ms;--ease-smooth:cubic-bezier(0.25,0.8,0.4,1);--ease-fast:cubic-bezier(0.45,0.15,0.6,0.9);--shadow-pop:0 4px 12px #0000000f;--docsearch-primary-color:var(--ifm-color-primary);--docsearch-text-color:var(--ifm-font-color-base);--docusaurus-announcement-bar-height:auto;--docusaurus-collapse-button-bg:#0000;--docusaurus-collapse-button-bg-hover:#0000001a;--doc-sidebar-width:300px;--doc-sidebar-hidden-width:30px;--docusaurus-blog-social-icon-size:1rem;--docusaurus-tag-list-border:var(--ifm-color-emphasis-300)}.DocSearch-Button{all:unset;align-items:center;background-color:var(--docsearch-search-button-background);border:1px solid var(--docsearch-subtle-color);border-radius:.5rem;color:var(--docsearch-search-button-text-color);cursor:pointer;display:flex;height:36px;justify-content:space-between;padding:0 8px;-webkit-user-select:none;user-select:none}.DocSearch-Button-Container{align-items:center;display:flex;height:100%}.DocSearch-Button-Container svg{color:currentColor}.DocSearch-Back-Icon,.DocSearch-Search-Icon{color:var(--docsearch-highlight-color);stroke-width:1.6}.DocSearch-Action,.DocSearch-AskAi-Return,.DocSearch-Hit-Tree,.DocSearch-Hit-action,.DocSearch-Hit-icon{stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Button-Placeholder{color:currentColor;display:inline-block;font-size:1rem;line-height:normal;padding:0 12px 0 8px}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-background);border:0;border-radius:4px;box-shadow:none!important;color:var(--docsearch-key-color);display:flex;font-family:system-ui,-apple-system,sans-serif;font-size:14px;height:24px;justify-content:center;position:relative;transition-duration:.1s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);width:24px}.DocSearch-Link,.DocSearch-SearchBar-Magnifier{color:var(--docsearch-highlight-color)}@supports (color:color-mix(in lch,red,blue)){.DocSearch-Button-Key{border:1px solid color-mix(in srgb,var(--docsearch-subtle-color) 20%,#0000)}}.DocSearch-Button-Key--ctrl{width:33px}.DocSearch-Button-Key:first-child{margin-right:.4em}.DocSearch-Button-Key--pressed{box-shadow:var(--docsearch-key-pressed-shadow)!important;transform:translateY(1px)}.DocSearch--active{overflow:hidden!important}.DocSearch-Hit-AskAIButton-title,.DocSearch-Hit-content-wrapper,.DocSearch-Input{overflow-x:hidden;text-overflow:ellipsis}.DocSearch-Container{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:400}.DocSearch-Form,.DocSearch-Hit,.DocSearch-Modal{display:flex;position:relative}.DocSearch-Hit mark,.DocSearch-Prefill:focus,.DocSearch-Prefill:hover,.DocSearch-ThreadDepthError-Link{-webkit-text-decoration:underline;text-decoration:underline}.DocSearch-Link{-webkit-appearance:none;appearance:none;background:none;border:0;cursor:pointer;font:inherit;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:4px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width)}.DocSearch-Logo a,.DocSearch-Menu-content.open,.DocSearch-SearchBar,.searchLogoColumn_rJIA a{display:flex}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-bottom:1px solid var(--docsearch-subtle-color);border-radius:4px 4px 0 0;height:var(--docsearch-searchbox-height,var(--docsearch-searchbox-initial-height));margin:0;min-height:var(--docsearch-searchbox-initial-height);padding-bottom:var(--docsearch-spacing);padding-left:16px;padding-right:16px;padding-top:var(--docsearch-spacing);width:100%}.DocSearch-Input,.DocSearch-Modal-heading{-webkit-appearance:none;appearance:none;background:#0000;border:0;color:var(--docsearch-text-color);flex:1 1 0%;font:inherit;font-size:1.2em;font-weight:300;height:100%;line-height:1.4;min-width:0;outline:0;overflow-y:hidden;padding-left:8px;padding-top:0;resize:none}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-Actions{align-items:center;display:flex;flex:0 0 auto;gap:8px;height:var(--docsearch-actions-height);justify-content:flex-end;padding:0 2px;width:auto}.DocSearch-Divider{border-left:1px solid var(--docsearch-subtle-color);height:16px}.DocSearch-Action{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center;min-height:24px;min-width:24px}.DocSearch-Action,.DocSearch-AskAi-Return,.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel{margin:0;padding:0}.DocSearch-AskAi-Return,.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Action,.DocSearch-AskAi-Return{animation:.1s ease-in forwards a;-webkit-appearance:none;appearance:none;background:none;border:none;border-radius:var(--docsearch-border-radius);color:var(--docsearch-icon-color);cursor:pointer;padding:2px;right:0}.DocSearch-Clear,.DocSearch-Hit-action-button{-webkit-appearance:none;border:0;cursor:pointer}.DocSearch-AskAi-Return[hidden],.DocSearch-Close[hidden],.DocSearch-Input[hidden],.DocSearch-StreamingIndicator[hidden],svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Action:hover,.DocSearch-AskAi-Return:hover{background:var(--docsearch-soft-primary-color);color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{color:var(--docsearch-icon-color);height:24px;width:24px}.DocSearch-Clear,.DocSearch-Form:focus-within .DocSearch-MagnifierLabel svg{color:var(--docsearch-highlight-color)}.DocSearch-Clear{appearance:none;background:none;flex:none;font:inherit;font-size:.9em;font-weight:300;height:28px;margin-left:var(--docsearch-spacing);outline:0;overflow:hidden;padding:0;-webkit-user-select:none;user-select:none;white-space:nowrap}.DocSearch-Clear:focus-visible,.DocSearch-Close:focus-visible{border-radius:4px;outline:2px solid var(--docsearch-focus-color);outline-offset:1px}.DocSearch-Dropdown{height:var(--docsearch-modal-variable-height);max-height:calc(var(--docsearch-modal-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:#0000}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown-Container ul{list-style:none;margin:0;padding:0}.DocSearch-Label{color:var(--docsearch-secondary-text-color);font-size:.875em;font-weight:400;line-height:1.6em}.DocSearch-Help,.DocSearch-NoResults-Help{color:var(--docsearch-secondary-text-color);font-size:.8em;font-weight:300;line-height:1.5em;margin:0;-webkit-user-select:none;user-select:none}.DocSearch-Title{color:var(--docsearch-text-color);font-size:1.1em;font-weight:300;line-height:.5em;vertical-align:middle}.DocSearch-Title strong{font-weight:500}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{color:var(--docsearch-muted-color);display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;padding-bottom:4px;scroll-margin-block-start:40px}.DocSearch-Hit:first-of-type{margin-top:4px}.DocSearch-Hit a,.DocSearch-Hit--AskAI{background:var(--docsearch-hit-background);border-radius:4px;cursor:pointer;display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-text-color);font-size:.9em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 4px;position:-webkit-sticky;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;width:24px}.DocSearch-Hit-Container,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title{color:var(--docsearch-text-color)}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit--AskAI,.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-hit-highlight-color)}.DocSearch-Conversation-History .DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-hit-background)}.DocSearch-Hit mark{color:var(--docsearch-highlight-color);text-underline-offset:.3em}.DocSearch-Hit-Container{align-items:center;display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{color:var(--docsearch-secondary-text-color);height:20px;width:20px}.DocSearch-Hit-action{align-items:center;color:var(--docsearch-muted-color);display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{appearance:none;background:none;border-radius:50%;color:inherit;padding:2px}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon,.tocCollapsibleContent_vkbj a{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:background-color .1s ease-in}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:400;gap:4px;justify-content:center;line-height:1.2em;margin:0 8px;position:relative;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-secondary-text-color);font-size:.75em}.DocSearch-AskAiScreen-MessageContent-Tool-Query:hover svg,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-highlight-color)}.DocSearch-AskAiScreen,.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{align-items:center;color:var(--docsearch-secondary-text-color);display:flex;flex-direction:column;font-size:1.25em;font-weight:400;justify-content:center;margin:0 auto;text-align:center;width:80%}.DocSearch-AskAiScreen,.DocSearch-ErrorScreen,.DocSearch-NoResults{max-height:80%}.sidebar_re4s,.tableOfContents_bqdL{max-height:calc(100vh - var(--ifm-navbar-height) - 2rem)}.DocSearch-StartScreen,body,html{height:100%}.DocSearch-NoResults{gap:.8em;margin-top:2em}.DocSearch-NoResults--withAskAi{justify-content:flex-start;margin-top:0}.DocSearch-AskAiScreen,.DocSearch-ErrorScreen,.DocSearch-StartScreen{gap:24px}.DocSearch-StartScreen-Icon{height:64px;stroke:var(--docsearch-icon-color);width:64px}.DocSearch-AskAiScreen-MessageContent-Reasoning svg,.DocSearch-Screen-Icon{color:var(--docsearch-icon-color)}.DocSearch-NoResults-Prefill-List{display:flex;flex-direction:column;gap:12px;text-align:center}.DocSearch-NoResults-Prefill-List-Items{display:flex;flex-direction:column;gap:2px}.DocSearch-NoResults-Prefill-List-Items p{align-items:center;display:flex;margin:0;text-align:left}.DocSearch-Prefill{align-items:center;-webkit-appearance:none;appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-flex;font-size:.8em;font-weight:300;gap:4px;height:40px;padding:0 4px}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:0}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 4px 4px;border-top:1px solid var(--docsearch-subtle-color);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;-webkit-user-select:none;user-select:none;width:100%;z-index:300}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;gap:16px;list-style:none;margin:0;padding:0}.DocSearch-Commands li,.DocSearch-Commands-Key,.buttons_pzbO,.features_keug{align-items:center;display:flex}.DocSearch-Commands-Key{background-color:var(--docsearch-background-color);border:0;border-radius:2px;box-shadow:none!important;color:var(--docsearch-icon-color);height:24px;justify-content:center;margin-right:4px;width:24px}.DocSearch-Commands-Key:last-of-type{margin-right:8px}.DocSearch-Escape-Key{font-size:10px;font-weight:300;letter-spacing:normal;line-height:16px;text-align:center}.DocSearch-VisuallyHiddenForAccessibility{clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.DocSearch-AskAi-Section{display:flex;flex-direction:column;gap:8px;padding:12px 0}.DocSearch-Hit-AskAIButton{align-items:center;color:var(--docsearch-text-color);display:flex;flex-direction:row}.DocSearch-Hit-AskAIButton-icon{color:var(--docsearch-icon-color);flex-shrink:0;margin-right:12px}.DocSearch-Hit-AskAIButton-title{color:var(--docsearch-hit-color);display:flex;flex:1 1 auto;font-weight:400;gap:4px;position:relative;white-space:nowrap;width:80%}.DocSearch-Hit-AskAIButton-title-query{background:none;margin-left:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@keyframes a{0%{opacity:0}to{opacity:1}}.DocSearch-AskAiScreen-Container{display:flex;flex-direction:column;gap:0;height:100%;justify-content:flex-start;padding:0;text-align:left;width:100%}.DocSearch-AskAiScreen-Disclaimer{align-self:flex-start;display:flex;font-size:.6em;font-weight:300;margin:0;padding:1.5em 0 .5em;text-align:left}.DocSearch-AskAiScreen-Body{gap:24px;width:100%}.DocSearch-AskAiScreen-Body,.DocSearch-AskAiScreen-Response,.DocSearch-AskAiScreen-Response-Container{display:flex;flex-direction:column}.DocSearch-AskAiScreen-Response{align-self:flex-start;background:var(--docsearch-hit-background);border-radius:4px;color:var(--docsearch-text-color);font-size:.8em;gap:1em;margin-bottom:8px;padding:24px;width:100%}.DocSearch-AskAiScreen-Query{font-size:1.25em;font-weight:600;line-break:loose;line-height:1.4;margin:0}.DocSearch-AskAiScreen-Answer{line-height:1.5}.DocSearch-AskAiScreen-Answer,.DocSearch-AskAiScreen-ThinkingDots{color:var(--docsearch-secondary-text-color);font-weight:400;margin:0}.DocSearch-AskAiScreen-Error,.DocSearch-AskAiScreen-Error .DocSearch-Markdown-Content{color:var(--docsearch-error-color)}.DocSearch-AskAiScreen-ThinkingDots{font-size:.8em}.DocSearch-AskAiScreen-Answer-Footer{align-items:center;display:flex;flex-direction:row;gap:8px;justify-content:space-between}.DocSearch-AskAiScreen-Actions{align-items:center;display:flex;flex-direction:row;gap:12px;margin-left:auto}.DocSearch-AskAiScreen-ActionButton{align-items:center;background:none;border:none;border-radius:4px;cursor:pointer;display:flex;justify-content:center;margin:0;padding:4px;transition:background-color .2s;width:24px}.DocSearch-AskAiScreen-ActionButton:hover,.DocSearch-AskAiScreen-RelatedSources-Item-Link:hover{background:var(--docsearch-hit-highlight-color)}.DocSearch-AskAiScreen-ActionButton svg{color:var(--docsearch-icon-color);height:20px;stroke-width:1.5;width:20px}.DocSearch-AskAiScreen-CopyButton--copied{background-color:var(--docsearch-success-color);cursor:default}.DocSearch-AskAiScreen-MessageContent{display:flex;flex-direction:column;row-gap:1em}.DocSearch-AskAiScreen-Error{background-color:#ef53501a;border-radius:4px;flex-direction:row;font-size:1em;font-weight:400;gap:8px;padding:1em}.DocSearch-AskAiScreen-Error svg{margin-top:.25rem}.DocSearch-AskAiScreen-Error svg,.DocSearch-AskAiScreen-MessageContent-Tool svg{flex-shrink:0;height:16px;width:16px}.DocSearch-AskAiScreen-Error p{margin:0}.DocSearch-AskAiScreen-Error-Content{display:flex;flex:1 1 0%;flex-direction:column}.DocSearch-AskAiScreen-Error-Title{font-weight:700;margin-bottom:4px}.DocSearch-AskAiScreen-Error--ThreadDepth{animation:.3s ease-out b;border:1px solid #febdc5;color:var(--docsearch-text-color);font-size:12px;margin:12px 0 8px;width:100%}.DocSearch-AskAiScreen-Error--ThreadDepth .DocSearch-AskAiScreen-Error-Title{margin-bottom:6px}@keyframes b{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.DocSearch-ThreadDepthError-Link{background:none;border:none;color:var(--docsearch-highlight-color);cursor:pointer;font-family:inherit;font-size:inherit;padding:0}.DocSearch-AskAiScreen-RelatedSources-Item-Link,.DocSearch-Markdown-Content a,.tag_zVej:hover{-webkit-text-decoration:none;text-decoration:none}.DocSearch-CodeSnippet-CopyButton:hover,.DocSearch-ThreadDepthError-Link:hover,.theme-code-block-highlighted-line .codeLineNumber_Tfdd:before{opacity:.8}.DocSearch-ThreadDepthError-Link:active{color:#991b1b}.DocSearch-AskAiScreen-FeedbackText{color:var(--docsearch-muted-color);font-size:.7em;font-weight:400;margin:0}.DocSearch-AskAiScreen-FeedbackText--visible{animation:.3s ease-in forwards a}.DocSearch-AskAiScreen-RelatedSources{display:flex;flex-direction:column;gap:4px;width:100%}.DocSearch-AskAiScreen-RelatedSources-List{display:flex;flex-direction:row;flex-wrap:wrap;gap:12px;width:100%}.DocSearch-AskAiScreen-RelatedSources-Title{color:var(--docsearch-secondary-text-color);font-size:.7em;font-weight:400;margin:0;padding:6px 0}.DocSearch-AskAiScreen-RelatedSources-NoResults{color:var(--docsearch-text-color);font-size:.8rem;font-weight:400;margin:0}.DocSearch-AskAiScreen-RelatedSources-Error{color:var(--docsearch-error-color);font-size:.8rem;font-weight:400;margin:0}.DocSearch-AskAiScreen-RelatedSources-Item-Link{align-items:center;background:var(--docsearch-hit-background);border-radius:4px;color:var(--docsearch-text-color);display:flex;font-size:.75em;gap:6px;max-width:70%;padding:12px 8px;transition:background-color .2s}.DocSearch-AskAiScreen-RelatedSources-Item-Link svg{color:var(--docsearch-icon-color);flex-shrink:0;stroke-width:1.2}.DocSearch-AskAiScreen-RelatedSources-Item-Link span{flex:1 1 0;font-weight:500;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.DocSearch-AskAiScreen-ExchangesList{display:flex;flex-direction:column;gap:24px;margin:8px 0}.DocSearch-Markdown-Content{color:var(--docsearch-text-color);font-size:.9355em;line-height:1.6;word-wrap:break-word}.DocSearch-Markdown-Content--streaming{animation:.3s ease-in-out both a}.DocSearch-Markdown-Content p{margin:1em 0}.DocSearch-Markdown-Content p:last-child,.admonitionContent_BuS1>:last-child,.collapsibleContent_i85q p:last-child,.details_lb9f>summary>p:last-child{margin-bottom:0}.DocSearch-Markdown-Content p:first-child,.docItemContainer_Djhp article>:first-child,.docItemContainer_Djhp header+*{margin-top:0}.DocSearch-Markdown-Content code{border-radius:3px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:.9em;letter-spacing:normal;margin:0;padding:.2em 0}.DocSearch-Markdown-Content code,.DocSearch-Markdown-Content pre{background-color:var(--docsearch-key-background);color:var(--docsearch-text-color)}.DocSearch-Markdown-Content pre{border-radius:6px;margin:1.5em 0;overflow-x:auto;padding:1.2em}.DocSearch-Markdown-Content pre code{background-color:initial;border-radius:0;color:inherit;font-size:.8em;margin:0;padding:0;white-space:pre-wrap;word-wrap:break-word;line-height:1.5}.DocSearch-Markdown-Content h1,.DocSearch-Markdown-Content h2,.DocSearch-Markdown-Content h3,.DocSearch-Markdown-Content h4,.DocSearch-Markdown-Content h5,.DocSearch-Markdown-Content h6{color:var(--docsearch-text-color);font-weight:600;letter-spacing:-.02em;line-height:1.3;margin:1em 0}.DocSearch-Markdown-Content h1{font-size:1.5em}.DocSearch-Markdown-Content h2{font-size:1.2em}.DocSearch-Markdown-Content h3{font-size:1em}.DocSearch-Markdown-Content h4{font-size:.9em}.DocSearch-Markdown-Content h5,.DocSearch-Markdown-Content h6{font-size:.8em}.DocSearch-Markdown-Content ol,.DocSearch-Markdown-Content ul{color:var(--docsearch-text-color);margin:1.2em 0;padding-left:1.5em}.DocSearch-Markdown-Content ul{list-style-type:disc}.DocSearch-Markdown-Content ol{list-style-type:decimal}.DocSearch-Markdown-Content li{color:var(--docsearch-text-color);line-height:1.6;margin:.8em 0;padding-left:.3em}.DocSearch-Markdown-Content li>ol,.DocSearch-Markdown-Content li>ul{margin:.5em}.DocSearch-Markdown-Content li::marker{color:var(--docsearch-muted-color)}.DocSearch-Markdown-Content a{color:var(--docsearch-highlight-color);transition:.2s}.DocSearch-Markdown-Content a:hover,.content_knG7 a{-webkit-text-decoration:underline;text-decoration:underline}.DocSearch-Markdown-Content a:hover{opacity:.9}.DocSearch-Markdown-Content blockquote{border-left:4px solid var(--docsearch-hit-highlight-color);color:var(--docsearch-secondary-text-color);font-style:italic;margin:1.5em 0;padding:.5em 0 .5em 1em}.DocSearch-Markdown-Content hr{border:none;border-top:1px solid var(--docsearch-subtle-color);margin:1em 0}.DocSearch-Markdown-Content table{border-collapse:collapse;margin:1.5em 0;width:100%}.DocSearch-Markdown-Content td,.DocSearch-Markdown-Content th{border:1px solid var(--docsearch-subtle-color);padding:.75em;text-align:left}.DocSearch-Markdown-Content th{background-color:var(--docsearch-hit-background);font-weight:600}.DocSearch-AskAiScreen-MessageContent-Reasoning{align-items:center;color:var(--docsearch-muted-color);display:flex;font-size:1em;gap:4px}.DocSearch-AskAiScreen-MessageContent-Tool{align-items:center;color:var(--docsearch-muted-color);display:flex;line-height:1.2;width:100%}.DocSearch-AskAiScreen-MessageContent-Tool.Tool--Result{padding-top:0}.DocSearch-AskAiScreen-MessageContent-Tool>svg{color:var(--docsearch-icon-color);margin-right:8px}.DocSearch-AskAiScreen-MessageContent-Tool-Query{color:var(--docsearch-muted-color);transition:box-shadow .2s}.DocSearch-AskAiScreen-MessageContent-Tool-Query svg{color:var(--docsearch-muted-color)}.DocSearch-AskAiScreen-MessageContent-Tool-Query:hover{box-shadow:0 1px 0 0 var(--docsearch-highlight-color);color:var(--docsearch-highlight-color);cursor:pointer}.DocSearck-AskAiScreen-MessageContent-Stopped{color:var(--docsearch-muted-color);font-style:italic;margin-top:1em}.DocSearch-AskAiScreen-SmallerLoadingIcon{height:16px;width:16px}.shimmer{background:var(--shimmer-bg);background-clip:text;-webkit-background-clip:text;background-size:200% auto;color:#0000;display:flex;-webkit-text-fill-color:#0000;animation:2.5s linear infinite c}@keyframes c{0%{background-position:200% 0}to{background-position:-200% 0}}.DocSearch-CodeSnippet,.DocSearch-Menu{position:relative}.DocSearch-CodeSnippet-CopyButton{align-items:center;background:var(--docsearch-key-background);border:none;border-radius:4px;color:var(--docsearch-text-color);cursor:pointer;display:flex;font-size:.75em;padding:.2em .6em;position:absolute;right:8px;top:8px;transition:opacity .2s}.DocSearch-CodeSnippet-CopyButton:active{opacity:.6}.DocSearch-CodeSnippet-CopyButton svg{height:16px;margin-right:4px;width:16px}.DocSearch-CodeSnippet-CheckIcon,.DocSearch-CodeSnippet-CopyButton--copied .DocSearch-CodeSnippet-CopyIcon,.DocSearch-Markdown-Content--streaming .DocSearch-CodeSnippet-CopyButton,.docSidebarContainer_YfHR,.navbarSearchContainer_Bca1:empty,.redocusaurus-has-logo .menu-content>div:first-child,.redocusaurus-styles,.sidebarLogo_isFc,.themedComponent_mlkZ,.toggleIcon_g3eP,html[data-announcement-bar-initially-dismissed=true] .announcementBar_mb4j{display:none}.DocSearch-CodeSnippet-CopyButton--copied .DocSearch-CodeSnippet-CheckIcon{display:inline-block}.DocSearch-NewConversationScreen{padding:3em var(--docsearch-spacing)}.DocSearch-NewConversationScreen-Title{color:var(--docsearch-text-color);font-size:26px;font-weight:600;margin-bottom:.15em}.DocSearch-NewConversationScreen-Description{color:var(--docsearch-muted-color);font-size:14px}.DocSearch-NewConversationScreen-SuggestedQuestions{align-items:start;display:flex;flex-direction:column;gap:var(--docsearch-spacing);margin-top:1.5em}.DocSearch-NewConversationScreen-SuggestedQuestion{align-items:center;background-color:var(--docsearch-searchbox-background);border:1px solid var(--docsearch-subtle-color);border-radius:var(--docsearch-border-radius);color:var(--docsearch-text-color);cursor:pointer;display:inline-flex;height:40px;justify-content:center;padding:12px}.DocSearch-Menu-content{background-color:var(--docsearch-dropdown-menu-background);border-radius:var(--docsearch-border-radius);box-shadow:0 0 0 1px #21243d0d,0 8px 16px -4px #21243d40;display:none;flex-direction:column;min-width:195px;padding:8px 0;position:absolute;right:0;top:calc(100% + 12px);z-index:422}.DocSearch-Menu-item,.redocusaurus code,html:not([data-theme=dark]) .redocusaurus [role=tabpanel] pre{background-color:initial}.DocSearch-Container,.skipToContent_fXgn{z-index:calc(var(--ifm-z-index-fixed) + 1)}.DocSearch-Menu-item{align-items:center;border:0;color:var(--docsearch-text-color);cursor:pointer;display:flex;font-size:14px;gap:8px;padding:10px 16px;white-space:nowrap}.DocSearch-Menu-item:hover{background-color:var(--docsearch-dropdown-menu-item-hover-background)}.DocSearch-Button{margin:0;transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.DocSearch-Button-Key,.codeBlockStandalone_MEMb{padding:0}.skipToContent_fXgn{background-color:var(--ifm-background-surface-color);color:var(--ifm-color-emphasis-900);left:100%;padding:calc(var(--ifm-global-spacing)/2) var(--ifm-global-spacing);position:fixed;top:1rem}.skipToContent_fXgn:focus{box-shadow:var(--ifm-global-shadow-md);left:1rem}.closeButton_CVFx{line-height:0;padding:0}.content_knG7{font-size:85%;padding:5px 0;text-align:center}.content_knG7 a{color:inherit}.announcementBar_mb4j{align-items:center;background-color:var(--ifm-color-white);border-bottom:1px solid var(--ifm-color-emphasis-100);color:var(--ifm-color-black);display:flex;height:var(--docusaurus-announcement-bar-height)}.announcementBarPlaceholder_vyr4{flex:0 0 10px}.announcementBarClose_gvF7{align-self:stretch;flex:0 0 30px}.toggle_vylO{height:2rem;width:2rem}.toggleButton_gllP{align-items:center;border-radius:50%;display:flex;height:100%;justify-content:center;transition:background var(--ifm-transition-fast);width:100%}.toggleButton_gllP:hover{background:var(--ifm-color-emphasis-200)}[data-theme-choice=dark] .darkToggleIcon_wfgR,[data-theme-choice=light] .lightToggleIcon_pyhR,[data-theme-choice=system] .systemToggleIcon_QzmC,[data-theme=dark] .themedComponent--dark_xIcU,[data-theme=light] .themedComponent--light_NVdE,html:not([data-theme]) .themedComponent--light_NVdE{display:initial}.toggleButtonDisabled_aARS{cursor:not-allowed}.darkNavbarColorModeToggle_X3D1:hover{background:var(--ifm-color-gray-800)}[data-theme=dark]:root{--docusaurus-collapse-button-bg:#ffffff0d;--docusaurus-collapse-button-bg-hover:#ffffff1a}.collapseSidebarButton_PEFL{display:none;margin:0}.categoryLinkLabel_W154,.linkLabel_WmDU{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical}.iconExternalLink_nPIU{margin-left:.3rem}.linkLabel_WmDU{line-clamp:2;-webkit-line-clamp:2}.categoryLink_byQd{overflow:hidden}.menu__link--sublist-caret:after{margin-left:var(--ifm-menu-link-padding-vertical)}.categoryLinkLabel_W154{flex:1;line-clamp:2;-webkit-line-clamp:2}.docMainContainer_TBSr,.docRoot_UBD9{display:flex;width:100%}.docsWrapper_hBAB{display:flex;flex:1 0 auto}.anchorTargetStickyNavbar_Vzrq{scroll-margin-top:calc(var(--ifm-navbar-height) + .5rem)}.anchorTargetHideOnScrollNavbar_vjPI{scroll-margin-top:.5rem}.hash-link{opacity:0;padding-left:.5rem;transition:opacity var(--ifm-transition-fast);-webkit-user-select:none;user-select:none}.hash-link:before{content:"#"}.footerLogoLink_BH7S:hover,.hash-link:focus,.sectionButton_Yvap:hover:before,:hover>.hash-link{opacity:1}.dropdownNavbarItemMobile_J0Sd{cursor:pointer}.iconLanguage_nlXk{margin-right:5px;vertical-align:text-bottom}.navbarHideable_m1mJ{transition:transform var(--ifm-transition-fast) ease}.navbarHidden_jGov{transform:translate3d(0,calc(-100% - 2px),0)}.errorBoundaryError_a6uf{color:red;white-space:pre-wrap}.errorBoundaryFallback_VBag{color:red;padding:.55rem}.navbar__items--right>:last-child{padding-right:0}.footerLogoLink_BH7S{opacity:.5;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.mainWrapper_z2l0{display:flex;flex:1 0 auto;flex-direction:column}.docusaurus-mt-lg{margin-top:3rem}#__docusaurus{display:flex;flex-direction:column;min-height:100%}.searchQueryInput_u2C7,.searchVersionInput_m0Ui{background:var(--docsearch-searchbox-focus-background);border:2px solid var(--ifm-toc-border-color);border-radius:var(--ifm-global-radius);color:var(--docsearch-text-color);font:var(--ifm-font-size-base) var(--ifm-font-family-base);margin-bottom:.5rem;padding:.8rem;transition:border var(--ifm-transition-fast) ease;width:100%}.searchQueryInput_u2C7:focus,.searchVersionInput_m0Ui:focus{border-color:var(--docsearch-primary-color);outline:0}.searchQueryInput_u2C7::placeholder{color:var(--docsearch-muted-color)}.searchResultsColumn_JPFH{font-size:.9rem;font-weight:700}.searchLogoColumn_rJIA{align-items:center;display:flex;gap:.5rem;justify-content:flex-end}.searchLogoColumn_rJIA span{color:var(--docsearch-muted-color);font-weight:400}.searchResultItem_Tv2o{border-bottom:1px solid var(--ifm-toc-border-color);padding:1rem 0}.searchResultItemHeading_KbCB{font-weight:400;margin-bottom:0}.searchResultItemPath_lhe1{color:var(--ifm-color-content-secondary);font-size:.8rem;--ifm-breadcrumb-separator-size-multiplier:1}.searchResultItemSummary_AEaO{font-style:italic;margin:.5rem 0 0}.loadingSpinner_XVxU{animation:1s linear infinite d;border:.4em solid #eee;border-radius:50%;border-top:.4em solid var(--ifm-color-primary);height:3rem;margin:0 auto;width:3rem}.authorSocialIcon_XYv3,.authorSocialLink_owbf,.authorSocials_rSDt{height:var(--docusaurus-blog-social-icon-size)}.authorSocialIcon_XYv3,.authorSocialLink_owbf{width:var(--docusaurus-blog-social-icon-size)}@keyframes d{to{transform:rotate(1turn)}}.loader_vvXV{margin-top:2rem}.search-result-match{background:#ffd78e40;color:var(--docsearch-hit-color);padding:.09em 0}.sidebar_re4s{overflow-y:auto;position:-webkit-sticky;position:sticky;top:calc(var(--ifm-navbar-height) + 2rem)}.sidebarItemTitle_pO2u{font-size:var(--ifm-h3-font-size);font-weight:var(--ifm-font-weight-bold)}.container_mt6G,.sidebarItemList_Yudw{font-size:.9rem}.sidebarItem__DBe{margin-top:.7rem}.sidebarItemLink_mo7H{color:var(--ifm-font-color-base);display:block}.sidebarItemLinkActive_I1ZP{color:var(--ifm-color-primary)!important}.yearGroupHeading_rMGB{margin-bottom:.4rem;margin-top:1.6rem}.yearGroupHeading_QT03{margin:1rem .75rem .5rem}[data-theme=dark] .blueskySvg_AzZw,[data-theme=dark] .githubSvg_Uu4N,[data-theme=dark] .instagramSvg_YC40,[data-theme=dark] .linkedinSvg_FCgI,[data-theme=dark] .threadsSvg_PTXY,[data-theme=dark] .xSvg_y3PF{fill:var(--light)}[data-theme=light] .blueskySvg_AzZw,[data-theme=light] .githubSvg_Uu4N,[data-theme=light] .instagramSvg_YC40,[data-theme=light] .linkedinSvg_FCgI,[data-theme=light] .threadsSvg_PTXY,[data-theme=light] .xSvg_y3PF{fill:var(--dark)}.authorSocials_rSDt{align-items:center;display:flex;flex-wrap:wrap;line-clamp:1;-webkit-line-clamp:1;overflow:hidden;-webkit-box-orient:vertical}.authorSocialLink_owbf,.authorSocials_rSDt{line-height:0}.authorSocialLink_owbf{margin-right:.4rem}.authorImage_XqGP{--ifm-avatar-photo-size:3.6rem}.author-as-h1_n9oJ .authorImage_XqGP{--ifm-avatar-photo-size:7rem}.author-as-h2_gXvM .authorImage_XqGP{--ifm-avatar-photo-size:5.4rem}.authorDetails_lV9A{align-items:flex-start;display:flex;flex-direction:column;justify-content:space-around}.authorName_yefp{display:flex;flex-direction:row;font-size:1.1rem;line-height:1.1rem}.author-as-h1_n9oJ .authorName_yefp{display:inline;font-size:2.4rem;line-height:2.4rem}.author-as-h2_gXvM .authorName_yefp{display:inline;font-size:1.4rem;line-height:1.4rem}.authorTitle_nd0D{display:-webkit-box;font-size:.8rem;line-clamp:1;-webkit-line-clamp:1;line-height:1rem;overflow:hidden;-webkit-box-orient:vertical}.author-as-h1_n9oJ .authorTitle_nd0D{font-size:1.2rem;line-height:1.6rem}.author-as-h2_gXvM .authorTitle_nd0D{font-size:1rem;line-height:1.3rem}.authorBlogPostCount_iiJ5{background:var(--ifm-color-secondary);border-radius:var(--ifm-global-radius);color:var(--ifm-color-black);font-size:.8rem;line-height:1.2;margin-left:.3rem;padding:.1rem .4rem}.authorCol_Hf19{max-width:inherit!important}.imageOnlyAuthorRow_pa_O{display:flex;flex-flow:row wrap}.imageOnlyAuthorCol_G86a{margin-left:.3rem;margin-right:.3rem}*,.inter_NQlW{font-family:Inter}.buttons_pzbO + +.heroBanner_UJJx{overflow:hidden;padding:4rem 0;position:relative;text-align:center}.subTitle_opAm{margin:auto;max-width:50%}.titleContainer_NK7n{padding-top:40px}.buttons_pzbO{justify-content:center}.features_keug{padding:2rem 0;width:100%}.featureImage_yA8i{height:200px;width:200px}.sectionButton_Yvap{color:#f6f7f9;display:inline-block;position:relative;text-align:center;width:270px;z-index:0}[data-theme=dark] .sectionButtonInner_O7Rk{color:#f6f7f9;padding:20px}[data-theme=light] .sectionButtonInner_O7Rk{color:#242424;padding:20px}.sectionButton_Yvap:before{background:linear-gradient(#ff7900,#ff5143);border-radius:15px;bottom:0;content:"";left:0;-webkit-mask:linear-gradient(#fff,#fff 0) content-box,linear-gradient(#fff,#fff 0);mask:linear-gradient(#fff,#fff 0) content-box,linear-gradient(#fff,#fff 0);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:0;padding:3px;position:absolute;right:0;top:0;transition:.2s linear;z-index:-1}[data-theme=light] .sectionButton_Yvap{border:2px solid #0000;color:#242424}.sectionImageBeeDark_mc4U,.sectionImageBeeLight_D9hu,.sectionImageDesktopDark_hhG_,.sectionImageDesktopLight_rnEv,.sectionImageDevelopDark_qxFy,.sectionImageDevelopLight_eT5Z,.sectionImageLearnDark_RIoI,.sectionImageLearnLight_gnO6{display:inline-block;height:90px}[data-theme=dark] .sectionImageBeeDark_mc4U,[data-theme=dark] .sectionImageDesktopDark_hhG_,[data-theme=dark] .sectionImageDevelopDark_qxFy,[data-theme=dark] .sectionImageLearnDark_RIoI,[data-theme=light] .sectionImageBeeLight_D9hu,[data-theme=light] .sectionImageDesktopLight_rnEv,[data-theme=light] .sectionImageDevelopLight_eT5Z,[data-theme=light] .sectionImageLearnLight_gnO6{display:none;height:90px}.ctaButton_X7CS{border:2px solid #000000bf;border-radius:5px;display:inline-block;padding:2px 6px}.description_VY6t{font-size:14px;line-height:1.5rem}.container_czXe{display:grid;grid-auto-columns:1fr;grid-template-columns:1fr 1fr 1fr 1fr;grid-template-rows:1fr;grid-gap:0 1.6rem;gap:0 1.6rem;grid-auto-flow:row;margin:auto;overflow:hidden;padding:5rem 2rem}.sectionImageDesktop_slDz{height:90px;padding:10px}.sectionImageOperate_QDaQ{height:90px;margin-bottom:5px}.buttonTitle_w5Vb{font-size:1.5rem;margin-top:16px}.redocusaurus .redoc-wrap{border-bottom:1px solid var(--ifm-toc-border-color)}.redocusaurus h5,.redocusaurus h5>span{color:var(--ifm-font-color-secondary)!important}html[data-theme=dark] .redocusaurus h1>a:first-child:before,html[data-theme=dark] .redocusaurus h2>a:first-child:before{background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIj48ZyBjbGFzcz0ibGF5ZXIiPjxwYXRoIGZpbGw9IiNmZmYiIGQ9Im00NTkuNyAyMzMuNC05MC41IDkwLjVjLTUwIDUwLTEzMSA1MC0xODEgMC03LjktNy44LTE0LTE2LjctMTkuNC0yNS44bDQyLjEtNDIuMWMyLTIgNC41LTMuMiA2LjgtNC41IDIuOSA5LjkgOCAxOS4zIDE1LjggMjcuMiAyNSAyNSA2NS42IDI0LjkgOTAuNSAwbDkwLjUtOTAuNWMyNS0yNSAyNS02NS42IDAtOTAuNS0yNC45LTI1LTY1LjUtMjUtOTAuNSAwbC0zMi4yIDMyLjJjLTI2LjEtMTAuMi01NC4yLTEyLjktODEuNi04LjlsNjguNi02OC42YzUwLTUwIDEzMS01MCAxODEgMCA0OS44IDQ5LjkgNDkuOCAxMzEtLjEgMTgxTTIyMC4zIDM4Mi4ybC0zMi4yIDMyLjJjLTI1IDI0LjktNjUuNiAyNC45LTkwLjUgMC0yNS0yNS0yNS02NS42IDAtOTAuNWw5MC41LTkwLjVjMjUtMjUgNjUuNS0yNSA5MC41IDAgNy44IDcuOCAxMi45IDE3LjIgMTUuOCAyNy4xIDIuNC0xLjQgNC44LTIuNSA2LjgtNC41bDQyLjEtNDJjLTUuNC05LjItMTEuNi0xOC0xOS40LTI1LjgtNTAtNTAtMTMxLTUwLTE4MSAwbC05MC41IDkwLjVjLTUwIDUwLTUwIDEzMSAwIDE4MXMxMzEgNTAgMTgxIDBsNjguNi02OC42Yy0yNy40IDQtNTUuNiAxLjItODEuNy04LjkiLz48L2c+PC9zdmc+")}.redocusaurus .menu-content{border-right:1px solid var(--ifm-toc-border-color)}.redocusaurus .operation-type{font-size:8px;margin-top:6px}.redocusaurus code{padding:0}.buttonGroup_M5ko button,.codeBlockContainer_Ckt0{background:var(--prism-background-color);color:var(--prism-color)}.redocusaurus ul>li.react-tabs__tab--selected:not(.tab-error):not(.tab-success){color:#303846!important}html:not([data-theme=dark]) .redocusaurus .redoc-wrap .api-content>div>div:first-child>div:nth-child(2) h3{color:var(--ifm-font-color-base-inverse)}html[data-theme=dark] .redocusaurus div[id^=operation]>div>div:nth-child(2)>div:first-child>div:nth-child(2),html[data-theme=dark] .redocusaurus div[id^=tag]>div>div:nth-child(2)>div:first-child>div:nth-child(2){background-color:#1b2028;color:var(--ifm-font-color-secondary)}.redocusaurus table tr,html[data-theme=dark] .redocusaurus div[id^=operation]>div>div:nth-child(2)>div:first-child>div:nth-child(2)>div>div:nth-child(2)>div,html[data-theme=dark] .redocusaurus div[id^=tag]>div>div:nth-child(2)>div:first-child>div:nth-child(2)>div>div:nth-child(2)>div{background-color:var(--ifm-background-color)}html[data-theme=dark] .redocusaurus div[id^=tag] button:has(span):has(.operation-type){background-color:var(--ifm-color-gray-800)}.redocusaurus .react-tabs__tab-panel--selected{margin-bottom:10px}html:not([data-theme=dark]) .redocusaurus [role=tabpanel] code{color:var(--ifm-color-emphasis-0)}.redocusaurus table th{border:none}.redocusaurus table td{border-right:none;border-top:none}.redocusaurus table td:first-child{border-bottom:none}.redocusaurus table td:nth-child(2){border-left:none}.redocusaurus table tbody tr table,.redocusaurus table tbody tr table tbody tr,.redocusaurus table.security-details tr:nth-child(odd){background-color:var(--ifm-background-surface-color)}.redocusaurus tr.last+tr>td>div{background-color:var(--ifm-background-color)!important}.redocusaurus span.dropdown-selector-value{color:var(--ifm-font-color-secondary)}[data-theme=dark] .redocusaurus .api-content div h5+svg polygon{filter:invert(1)}[data-theme=dark] .redocusaurus .api-content div:has(>span>span>i+code){background:var(--ifm-color-emphasis-0)}.codeBlockContainer_Ckt0{border-radius:var(--ifm-code-border-radius);box-shadow:var(--ifm-global-shadow-lw);margin-bottom:var(--ifm-leading)}.codeBlock_bY9V{--ifm-pre-background:var(--prism-background-color);margin:0;padding:0}.codeBlockLines_e6Vv{float:left;font:inherit;min-width:100%;padding:var(--ifm-pre-padding)}.codeBlockLinesWithNumbering_o6Pm{display:table;padding:var(--ifm-pre-padding) 0}:where(:root){--docusaurus-highlighted-code-line-bg:#484d5b}:where([data-theme=dark]){--docusaurus-highlighted-code-line-bg:#646464}.theme-code-block-highlighted-line{background-color:var(--docusaurus-highlighted-code-line-bg);display:block;margin:0 calc(var(--ifm-pre-padding)*-1);padding:0 var(--ifm-pre-padding)}.codeLine_lJS_{counter-increment:line-count;display:table-row}.codeLineNumber_Tfdd{background:var(--ifm-pre-background);display:table-cell;left:0;overflow-wrap:normal;padding:0 var(--ifm-pre-padding);position:-webkit-sticky;position:sticky;text-align:right;width:1%}.codeLineNumber_Tfdd:before{content:counter(line-count);opacity:.4}.codeLineContent_feaV{padding-right:var(--ifm-pre-padding)}.theme-code-block:hover .copyButtonCopied_Vdqa{opacity:1!important}.copyButtonIcons_IEyt{height:1.125rem;position:relative;width:1.125rem}.copyButtonIcon_TrPX,.copyButtonSuccessIcon_cVMy{fill:currentColor;height:inherit;left:0;opacity:inherit;position:absolute;top:0;transition:all var(--ifm-transition-fast) ease;width:inherit}.copyButtonSuccessIcon_cVMy{color:#00d600;left:50%;opacity:0;top:50%;transform:translate(-50%,-50%) scale(.33)}.copyButtonCopied_Vdqa .copyButtonIcon_TrPX{opacity:0;transform:scale(.33)}.copyButtonCopied_Vdqa .copyButtonSuccessIcon_cVMy{opacity:1;transform:translate(-50%,-50%) scale(1);transition-delay:75ms}.wordWrapButtonIcon_b1P5{height:1.2rem;width:1.2rem}.buttonGroup_M5ko{column-gap:.2rem;display:flex;position:absolute;right:calc(var(--ifm-pre-padding)/2);top:calc(var(--ifm-pre-padding)/2)}.buttonGroup_M5ko button{align-items:center;border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-global-radius);display:flex;line-height:0;opacity:0;padding:.4rem;transition:opacity var(--ifm-transition-fast) ease-in-out}.buttonGroup_M5ko button:focus-visible,.buttonGroup_M5ko button:hover{opacity:1!important}.theme-code-block:hover .buttonGroup_M5ko button{opacity:.4}.codeBlockContent_QJqH{border-radius:inherit;direction:ltr;position:relative}.codeBlockTitle_OeMC{border-bottom:1px solid var(--ifm-color-emphasis-300);border-top-left-radius:inherit;border-top-right-radius:inherit;font-size:var(--ifm-code-font-size);font-weight:500;padding:.75rem var(--ifm-pre-padding)}.codeBlockTitle_OeMC+.codeBlockContent_QJqH .codeBlock_a8dz{border-top-left-radius:0;border-top-right-radius:0}.tag_zVej{border:1px solid var(--docusaurus-tag-list-border);transition:border var(--ifm-transition-fast)}.tag_zVej:hover{--docusaurus-tag-list-border:var(--ifm-link-color)}.tagRegular_sFm0{border-radius:var(--ifm-global-radius);font-size:90%;padding:.2rem .5rem .3rem}.tagWithCount_h2kH{align-items:center;border-left:0;display:flex;padding:0 .5rem 0 1rem;position:relative}.tagWithCount_h2kH:after,.tagWithCount_h2kH:before{border:1px solid var(--docusaurus-tag-list-border);content:"";position:absolute;top:50%;transition:inherit}.tagWithCount_h2kH:before{border-bottom:0;border-right:0;height:1.18rem;right:100%;transform:translate(50%,-50%) rotate(-45deg);width:1.18rem}.tagWithCount_h2kH:after{border-radius:50%;height:.5rem;left:0;transform:translateY(-50%);width:.5rem}.tagWithCount_h2kH span{background:var(--ifm-color-secondary);border-radius:var(--ifm-global-radius);color:var(--ifm-color-black);font-size:.7rem;line-height:1.2;margin-left:.3rem;padding:.1rem .4rem}.details_lb9f{--docusaurus-details-summary-arrow-size:0.38rem;--docusaurus-details-transition:transform 200ms ease;--docusaurus-details-decoration-color:grey}.details_lb9f>summary{cursor:pointer;list-style:none;padding-left:1rem;position:relative}.details_lb9f>summary::-webkit-details-marker{display:none}.details_lb9f>summary:before{border-color:#0000 #0000 #0000 var(--docusaurus-details-decoration-color);border-style:solid;border-width:var(--docusaurus-details-summary-arrow-size);content:"";left:0;position:absolute;top:.45rem;transform:rotate(0);transform-origin:calc(var(--docusaurus-details-summary-arrow-size)/2) 50%;transition:var(--docusaurus-details-transition)}.collapsibleContent_i85q{border-top:1px solid var(--docusaurus-details-decoration-color);margin-top:1rem;padding-top:1rem}.tags_jXut{display:inline}.tag_QGVx{display:inline-block;margin:0 .4rem .5rem 0}.iconEdit_Z9Sw{margin-right:.3em;vertical-align:sub}.lastUpdated_JAkA{font-size:smaller;font-style:italic;margin-top:.2rem}.tocCollapsibleButton_TO0P{align-items:center;display:flex;font-size:inherit;justify-content:space-between;padding:.4rem .8rem;width:100%}.tocCollapsibleButton_TO0P:after{background:var(--ifm-menu-link-sublist-icon) 50% 50%/2rem 2rem no-repeat;content:"";filter:var(--ifm-menu-link-sublist-icon-filter);height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast);width:1.25rem}.tocCollapsibleButtonExpanded_MG3E:after,.tocCollapsibleExpanded_sAul{transform:none}.tocCollapsible_ETCw{background-color:var(--ifm-menu-color-background-active);border-radius:var(--ifm-global-radius);margin:1rem 0}.tocCollapsibleContent_vkbj>ul{border-left:none;border-top:1px solid var(--ifm-color-emphasis-300);font-size:15px;padding:.2rem 0}.tocCollapsibleContent_vkbj ul li{margin:.4rem .8rem}.tableOfContents_bqdL{overflow-y:auto;position:-webkit-sticky;position:sticky;top:calc(var(--ifm-navbar-height) + 1rem)}.details_b_Ee{--docusaurus-details-decoration-color:var(--ifm-alert-border-color);--docusaurus-details-transition:transform var(--ifm-transition-fast) ease;border:1px solid var(--ifm-alert-border-color);margin:0 0 var(--ifm-spacing-vertical)}.containsTaskList_mC6p{list-style:none}.img_ev3q{height:auto}.admonition_xJq3{margin-bottom:1em}.admonitionHeading_Gvgb{font:var(--ifm-heading-font-weight) var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family)}.admonitionHeading_Gvgb:not(:last-child){margin-bottom:.3rem}.admonitionHeading_Gvgb code{text-transform:none}.admonitionIcon_Rf37{display:inline-block;margin-right:.4em;vertical-align:middle}.admonitionIcon_Rf37 svg{display:inline-block;fill:var(--ifm-alert-foreground-color);height:1.6em;width:1.6em}.breadcrumbHomeIcon_YNFT{height:1.1rem;position:relative;top:1px;vertical-align:top;width:1.1rem}.breadcrumbsContainer_Z_bl{--ifm-breadcrumb-size-multiplier:0.8;margin-bottom:.8rem}@media (min-width:768px){.responsive-image{width:60%}}@media (min-width:997px){.collapseSidebarButton_PEFL,.expandButton_TmdG{background-color:var(--docusaurus-collapse-button-bg)}:root{--docusaurus-announcement-bar-height:30px}.announcementBarClose_gvF7,.announcementBarPlaceholder_vyr4{flex-basis:50px}.collapseSidebarButton_PEFL{border:1px solid var(--ifm-toc-border-color);border-radius:0;bottom:0;display:block!important;height:40px;position:-webkit-sticky;position:sticky}.collapseSidebarButtonIcon_kv0_{margin-top:4px;transform:rotate(180deg)}.expandButtonIcon_i1dp,[dir=rtl] .collapseSidebarButtonIcon_kv0_{transform:rotate(0)}.collapseSidebarButton_PEFL:focus,.collapseSidebarButton_PEFL:hover,.expandButton_TmdG:focus,.expandButton_TmdG:hover{background-color:var(--docusaurus-collapse-button-bg-hover)}.menuHtmlItem_M9Kj{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu_SIkG{flex-grow:1;padding:.5rem}@supports (scrollbar-gutter:stable){.menu_SIkG{padding:.5rem 0 .5rem .5rem;scrollbar-gutter:stable}}.menuWithAnnouncementBar_GW3s{margin-bottom:var(--docusaurus-announcement-bar-height)}.sidebar_njMd{display:flex;flex-direction:column;height:100%;padding-top:var(--ifm-navbar-height);width:var(--doc-sidebar-width)}.sidebarWithHideableNavbar_wUlq{padding-top:0}.sidebarHidden_VK0M{opacity:0;visibility:hidden}.sidebarLogo_isFc{align-items:center;color:inherit!important;display:flex!important;margin:0 var(--ifm-navbar-padding-horizontal);max-height:var(--ifm-navbar-height);min-height:var(--ifm-navbar-height);-webkit-text-decoration:none!important;text-decoration:none!important}.sidebarLogo_isFc img{height:2rem;margin-right:.5rem}.expandButton_TmdG{align-items:center;display:flex;height:100%;justify-content:center;position:absolute;right:0;top:0;transition:background-color var(--ifm-transition-fast) ease;width:100%}[dir=rtl] .expandButtonIcon_i1dp{transform:rotate(180deg)}.docSidebarContainer_YfHR{border-right:1px solid var(--ifm-toc-border-color);-webkit-clip-path:inset(0);clip-path:inset(0);display:block;margin-top:calc(var(--ifm-navbar-height)*-1);transition:width var(--ifm-transition-fast) ease;width:var(--doc-sidebar-width);will-change:width}.docSidebarContainerHidden_DPk8{cursor:pointer;width:var(--doc-sidebar-hidden-width)}.sidebarViewport_aRkj{height:100%;max-height:100vh;position:-webkit-sticky;position:sticky;top:0}.docMainContainer_TBSr{flex-grow:1;max-width:calc(100% - var(--doc-sidebar-width))}.docMainContainerEnhanced_lQrH{max-width:calc(100% - var(--doc-sidebar-hidden-width))}.docItemWrapperEnhanced_JWYK{max-width:calc(var(--ifm-container-width) + var(--doc-sidebar-width))!important}.navbarSearchContainer_Bca1{padding:0 var(--ifm-navbar-item-padding-horizontal)}.lastUpdated_JAkA{text-align:right}.tocMobile_ITEo{display:none}.docItemCol_VOVn{max-width:75%!important}}@media (min-width:1440px){.container{max-width:var(--ifm-container-width-xl)}}@media (max-width:1200px){.hub-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width:1000px){.container_czXe{display:flex;flex-direction:column}.sectionButton_Yvap{height:100%;padding:26px 20px}.sectionButton_Yvap:before{margin-bottom:40px;opacity:1}}@media screen and (max-width:1000px){.heroBanner_UJJx{padding:2rem}}@media (max-width:996px){.col{--ifm-col-width:100%;flex-basis:var(--ifm-col-width);margin-left:0}.footer{--ifm-footer-padding-horizontal:0}.colorModeToggle_DEke,.footer__link-separator,.navbar__item,.sidebar_re4s,.tableOfContents_bqdL{display:none}.footer__col{margin-bottom:calc(var(--ifm-spacing-vertical)*3)}.footer__link-item{display:block;width:-webkit-max-content;width:max-content}.hero{padding-left:0;padding-right:0}.navbar>.container,.navbar>.container-fluid{padding:0}.navbar__toggle{display:inherit}.navbar__search-input{width:9rem}.pills--block,.tabs--block{flex-direction:column}.navbarSearchContainer_Bca1{position:absolute;right:var(--ifm-navbar-padding-horizontal)}.docItemContainer_F8PC{padding:0 .3rem}}@media only screen and (max-width:996px){.searchQueryColumn_RTkw,.searchResultsColumn_JPFH{max-width:60%!important}.searchLogoColumn_rJIA,.searchVersionColumn_ypXd{max-width:40%!important}.searchLogoColumn_rJIA{padding-left:0!important}}@media (max-width:768px){.DocSearch-Button{width:auto}.DocSearch-Button-Keys,.DocSearch-Button-Placeholder,.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}:root{--docsearch-spacing:10px;--docsearch-footer-height:48px}.DocSearch-Input{font-size:1rem}.DocSearch-Hit-AskAIButton-icon{margin-right:8px}body:has(.DocSearch-Container){overflow:hidden;position:fixed}.DocSearch-Dropdown{height:100%;max-height:none}.DocSearch-Container{height:calc(var(--docsearch-vh,1vh)*100);height:100dvh}.DocSearch-Footer{border-radius:0;bottom:0;position:static}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:calc(var(--docsearch-vh,1vh)*100);height:100dvh;margin:0;max-width:100%;width:100%}.DocSearch-AskAiScreen-Response-Container{flex-direction:column}.DocSearch-AskAiScreen-RelatedSources,.DocSearch-AskAiScreen-Response{width:100%}}@media (max-width:700px){.hub-grid{grid-template-columns:1fr}}@media (max-width:576px){.markdown h1:first-child{--ifm-h1-font-size:2rem}.markdown>h2{--ifm-h2-font-size:1.5rem}.markdown>h3{--ifm-h3-font-size:1.25rem}.title_f1Hy{font-size:2rem}}@media screen and (max-width:576px){.searchQueryColumn_RTkw{max-width:100%!important}.searchVersionColumn_ypXd{max-width:100%!important;padding-left:var(--ifm-spacing-horizontal)!important}}@media (hover:hover){.backToTopButton_sjWU:hover{background-color:var(--ifm-color-emphasis-300)}}@media (pointer:fine){.thin-scrollbar{scrollbar-width:thin}.thin-scrollbar::-webkit-scrollbar{height:var(--ifm-scrollbar-size);width:var(--ifm-scrollbar-size)}.thin-scrollbar::-webkit-scrollbar-track{background:var(--ifm-scrollbar-track-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb{background:var(--ifm-scrollbar-thumb-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb:hover{background:var(--ifm-scrollbar-thumb-hover-background-color)}}@media (prefers-reduced-motion:reduce){:root{--ifm-transition-fast:0ms;--ifm-transition-slow:0ms}}@media (prefers-reduced-motion){.DocSearch-Button-Key{transition:none}}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Action{animation:none;-webkit-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0;stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:none}}@media print{.announcementBar_mb4j,.footer,.menu,.navbar,.noPrint_WFHX,.pagination-nav,.table-of-contents,.tocMobile_ITEo{display:none}.tabs{page-break-inside:avoid}.codeBlockLines_e6Vv{white-space:pre-wrap}} \ No newline at end of file diff --git a/static/fonts/Inter-Bold.ttf b/assets/fonts/Inter-Bold-88fa7ae373b07b41ecce77adbdf16ec2.ttf similarity index 100% rename from static/fonts/Inter-Bold.ttf rename to assets/fonts/Inter-Bold-88fa7ae373b07b41ecce77adbdf16ec2.ttf diff --git a/static/fonts/Inter-Regular.ttf b/assets/fonts/Inter-Regular-e89cb19905e7db5591b0037b15a1d9cd.ttf similarity index 100% rename from static/fonts/Inter-Regular.ttf rename to assets/fonts/Inter-Regular-e89cb19905e7db5591b0037b15a1d9cd.ttf diff --git a/static/fonts/Inter-SemiBold.ttf b/assets/fonts/Inter-SemiBold-4d56bb21f2399db8ad480d590a49fac3.ttf similarity index 100% rename from static/fonts/Inter-SemiBold.ttf rename to assets/fonts/Inter-SemiBold-4d56bb21f2399db8ad480d590a49fac3.ttf diff --git a/static/img/access1.png b/assets/images/access1-023820d77b25ddf28907dadf20b85315.png similarity index 100% rename from static/img/access1.png rename to assets/images/access1-023820d77b25ddf28907dadf20b85315.png diff --git a/static/img/access2.png b/assets/images/access2-0886d7d2a22cbc71908485211ae09103.png similarity index 100% rename from static/img/access2.png rename to assets/images/access2-0886d7d2a22cbc71908485211ae09103.png diff --git a/static/img/access3.png b/assets/images/access3-19f273c5809c125816ccbc8dc400fd62.png similarity index 100% rename from static/img/access3.png rename to assets/images/access3-19f273c5809c125816ccbc8dc400fd62.png diff --git a/static/img/access4.png b/assets/images/access4-e7497835207464557454101f2e858dc7.png similarity index 100% rename from static/img/access4.png rename to assets/images/access4-e7497835207464557454101f2e858dc7.png diff --git a/static/img/backup1.png b/assets/images/backup1-8c46c0948fcd723ac14a532a1fb3adc8.png similarity index 100% rename from static/img/backup1.png rename to assets/images/backup1-8c46c0948fcd723ac14a532a1fb3adc8.png diff --git a/static/img/backup4.png b/assets/images/backup4-40da9b86893f41f63c20c9dcbb917526.png similarity index 100% rename from static/img/backup4.png rename to assets/images/backup4-40da9b86893f41f63c20c9dcbb917526.png diff --git a/static/img/backup5.png b/assets/images/backup5-9c88ce1dbc31bf5bc605e483f7c4160e.png similarity index 100% rename from static/img/backup5.png rename to assets/images/backup5-9c88ce1dbc31bf5bc605e483f7c4160e.png diff --git a/static/img/backup6.png b/assets/images/backup6-2caa0591dcad44acdff485634fda84b7.png similarity index 100% rename from static/img/backup6.png rename to assets/images/backup6-2caa0591dcad44acdff485634fda84b7.png diff --git a/static/img/backup7.png b/assets/images/backup7-8f0717caefd9eb5cc4c4ffa5d2d7ddbe.png similarity index 100% rename from static/img/backup7.png rename to assets/images/backup7-8f0717caefd9eb5cc4c4ffa5d2d7ddbe.png diff --git a/static/img/backup8.png b/assets/images/backup8-df2d8e580989ba3b39e7f0739ef25b5b.png similarity index 100% rename from static/img/backup8.png rename to assets/images/backup8-df2d8e580989ba3b39e7f0739ef25b5b.png diff --git a/static/img/backup9.png b/assets/images/backup9-30966c174373efbcd85466d5a2d2f565.png similarity index 100% rename from static/img/backup9.png rename to assets/images/backup9-30966c174373efbcd85466d5a2d2f565.png diff --git a/static/img/bashtop_01.png b/assets/images/bashtop_01-73cd0ea30d1be4b01a75026584e7ec98.png similarity index 100% rename from static/img/bashtop_01.png rename to assets/images/bashtop_01-73cd0ea30d1be4b01a75026584e7ec98.png diff --git a/static/img/bashtop_02.png b/assets/images/bashtop_02-b57cd049a17f75c4d900a4f3ae5c3173.png similarity index 100% rename from static/img/bashtop_02.png rename to assets/images/bashtop_02-b57cd049a17f75c4d900a4f3ae5c3173.png diff --git a/static/img/batches_01.png b/assets/images/batches_01-e084efba3e803068f01309d12db9d7cb.png similarity index 100% rename from static/img/batches_01.png rename to assets/images/batches_01-e084efba3e803068f01309d12db9d7cb.png diff --git a/static/img/batches_02.png b/assets/images/batches_02-b0d64e9f456ec3ced0720d7e923ab93e.png similarity index 100% rename from static/img/batches_02.png rename to assets/images/batches_02-b0d64e9f456ec3ced0720d7e923ab93e.png diff --git a/static/img/batches_03.png b/assets/images/batches_03-d33365fe10a3274d74ddfdd0950bf610.png similarity index 100% rename from static/img/batches_03.png rename to assets/images/batches_03-d33365fe10a3274d74ddfdd0950bf610.png diff --git a/static/img/batches_04.png b/assets/images/batches_04-82c8f844e94e1f8c2bdd58ec7c127780.png similarity index 100% rename from static/img/batches_04.png rename to assets/images/batches_04-82c8f844e94e1f8c2bdd58ec7c127780.png diff --git a/static/img/bos_fig_1_1.jpg b/assets/images/bos_fig_1_1-a68dfb0d006fdceab951c7df44a0b13a.jpg similarity index 100% rename from static/img/bos_fig_1_1.jpg rename to assets/images/bos_fig_1_1-a68dfb0d006fdceab951c7df44a0b13a.jpg diff --git a/static/img/bos_fig_2_10.jpg b/assets/images/bos_fig_2_10-9712b5ea83e60fdd908b2358262b6284.jpg similarity index 100% rename from static/img/bos_fig_2_10.jpg rename to assets/images/bos_fig_2_10-9712b5ea83e60fdd908b2358262b6284.jpg diff --git a/static/img/bos_fig_2_3.jpg b/assets/images/bos_fig_2_3-53841f6e16aa27a058942aaa6a8badcc.jpg similarity index 100% rename from static/img/bos_fig_2_3.jpg rename to assets/images/bos_fig_2_3-53841f6e16aa27a058942aaa6a8badcc.jpg diff --git a/static/img/bos_fig_2_7.jpg b/assets/images/bos_fig_2_7-160d775553d44403c5773971ab62c7bc.jpg similarity index 100% rename from static/img/bos_fig_2_7.jpg rename to assets/images/bos_fig_2_7-160d775553d44403c5773971ab62c7bc.jpg diff --git a/static/img/config1.png b/assets/images/config1-15196d3cb27f623451d8370424129607.png similarity index 100% rename from static/img/config1.png rename to assets/images/config1-15196d3cb27f623451d8370424129607.png diff --git a/static/img/config10.png b/assets/images/config10-c0c2ea8894a3bb3efa3ef7b3f5055b31.png similarity index 100% rename from static/img/config10.png rename to assets/images/config10-c0c2ea8894a3bb3efa3ef7b3f5055b31.png diff --git a/static/img/config2.png b/assets/images/config2-db261ee73394366683c1419b667ab502.png similarity index 100% rename from static/img/config2.png rename to assets/images/config2-db261ee73394366683c1419b667ab502.png diff --git a/static/img/config3.png b/assets/images/config3-ce9c6cd07388bdab2037bc88c3d49855.png similarity index 100% rename from static/img/config3.png rename to assets/images/config3-ce9c6cd07388bdab2037bc88c3d49855.png diff --git a/static/img/config4.png b/assets/images/config4-57276e415842625888aa7d6973572a7b.png similarity index 100% rename from static/img/config4.png rename to assets/images/config4-57276e415842625888aa7d6973572a7b.png diff --git a/static/img/config5.png b/assets/images/config5-ddc7105976d468c38f2697f61cab9f4b.png similarity index 100% rename from static/img/config5.png rename to assets/images/config5-ddc7105976d468c38f2697f61cab9f4b.png diff --git a/static/img/config6.png b/assets/images/config6-60dcf8e9b6e900e032e1e0ef0406d04e.png similarity index 100% rename from static/img/config6.png rename to assets/images/config6-60dcf8e9b6e900e032e1e0ef0406d04e.png diff --git a/static/img/config7.png b/assets/images/config7-67af3ebb34dd4a823c2a2fb702dc952f.png similarity index 100% rename from static/img/config7.png rename to assets/images/config7-67af3ebb34dd4a823c2a2fb702dc952f.png diff --git a/static/img/config8.png b/assets/images/config8-950886e558f0f854278cee1881d5b917.png similarity index 100% rename from static/img/config8.png rename to assets/images/config8-950886e558f0f854278cee1881d5b917.png diff --git a/static/img/config9.png b/assets/images/config9-3b54daefeaecdc9099e06bbb2bf3f92e.png similarity index 100% rename from static/img/config9.png rename to assets/images/config9-3b54daefeaecdc9099e06bbb2bf3f92e.png diff --git a/static/img/default-404.jpg b/assets/images/default-404-4bcfc018158eeaf18ada8562b30f1c45.jpg similarity index 100% rename from static/img/default-404.jpg rename to assets/images/default-404-4bcfc018158eeaf18ada8562b30f1c45.jpg diff --git a/static/img/depths1.png b/assets/images/depths1-8a24cd0e7d48a97d931886cc15993aa7.png similarity index 100% rename from static/img/depths1.png rename to assets/images/depths1-8a24cd0e7d48a97d931886cc15993aa7.png diff --git a/static/img/depths2.png b/assets/images/depths2-ee3b2aff2abd65415281e47f3ef42731.png similarity index 100% rename from static/img/depths2.png rename to assets/images/depths2-ee3b2aff2abd65415281e47f3ef42731.png diff --git a/static/img/desktop-homepage-dl.png b/assets/images/desktop-homepage-dl-12a08bb9260fcf5a022cbb087f24f6e9.png similarity index 100% rename from static/img/desktop-homepage-dl.png rename to assets/images/desktop-homepage-dl-12a08bb9260fcf5a022cbb087f24f6e9.png diff --git a/static/img/desktop-install-downloading.png b/assets/images/desktop-install-downloading-1fa3a12d14bb0b11efaabe0f7be96723.png similarity index 100% rename from static/img/desktop-install-downloading.png rename to assets/images/desktop-install-downloading-1fa3a12d14bb0b11efaabe0f7be96723.png diff --git a/static/img/desktop-new-install.png b/assets/images/desktop-new-install-8e60389ae653e767c6b1c64367149eb8.png similarity index 100% rename from static/img/desktop-new-install.png rename to assets/images/desktop-new-install-8e60389ae653e767c6b1c64367149eb8.png diff --git a/static/img/desktop-releases-dl.png b/assets/images/desktop-releases-dl-cba1154cb87d19016ee3ac3211ba3584.png similarity index 100% rename from static/img/desktop-releases-dl.png rename to assets/images/desktop-releases-dl-cba1154cb87d19016ee3ac3211ba3584.png diff --git a/static/img/disc.jpg b/assets/images/disc-e885f00fdf9004bfcb502f11ae3d725c.jpg similarity index 100% rename from static/img/disc.jpg rename to assets/images/disc-e885f00fdf9004bfcb502f11ae3d725c.jpg diff --git a/static/img/etherjot1.png b/assets/images/etherjot1-df2cddb924bec864ff0133d08a2ab6bc.png similarity index 100% rename from static/img/etherjot1.png rename to assets/images/etherjot1-df2cddb924bec864ff0133d08a2ab6bc.png diff --git a/static/img/etherjot11.png b/assets/images/etherjot11-44e5067ee0325f0aaa075f36a9de90fc.png similarity index 100% rename from static/img/etherjot11.png rename to assets/images/etherjot11-44e5067ee0325f0aaa075f36a9de90fc.png diff --git a/static/img/etherjot13.png b/assets/images/etherjot13-a48416e51464d4153edbc3c19a753443.png similarity index 100% rename from static/img/etherjot13.png rename to assets/images/etherjot13-a48416e51464d4153edbc3c19a753443.png diff --git a/static/img/etherjot14.png b/assets/images/etherjot14-a9f4b63b84cdebea6179a7fa3e2f8ee0.png similarity index 100% rename from static/img/etherjot14.png rename to assets/images/etherjot14-a9f4b63b84cdebea6179a7fa3e2f8ee0.png diff --git a/static/img/etherjot15.png b/assets/images/etherjot15-81e8a3e581454048cdde904463f06eca.png similarity index 100% rename from static/img/etherjot15.png rename to assets/images/etherjot15-81e8a3e581454048cdde904463f06eca.png diff --git a/static/img/etherjot16.png b/assets/images/etherjot16-a93c3190fd75569c568c9b9049989fd7.png similarity index 100% rename from static/img/etherjot16.png rename to assets/images/etherjot16-a93c3190fd75569c568c9b9049989fd7.png diff --git a/static/img/etherjot17.png b/assets/images/etherjot17-eff77c54274ed8bb506fbbaf19b34fc0.png similarity index 100% rename from static/img/etherjot17.png rename to assets/images/etherjot17-eff77c54274ed8bb506fbbaf19b34fc0.png diff --git a/static/img/etherjot18.png b/assets/images/etherjot18-27f280985fa15fda7ebeb685beb29698.png similarity index 100% rename from static/img/etherjot18.png rename to assets/images/etherjot18-27f280985fa15fda7ebeb685beb29698.png diff --git a/static/img/etherjot19.png b/assets/images/etherjot19-cb087b3ae802f23113392c0345e43360.png similarity index 100% rename from static/img/etherjot19.png rename to assets/images/etherjot19-cb087b3ae802f23113392c0345e43360.png diff --git a/static/img/etherjot2.png b/assets/images/etherjot2-edfd1ec05ed10f43dfcefd161b84f014.png similarity index 100% rename from static/img/etherjot2.png rename to assets/images/etherjot2-edfd1ec05ed10f43dfcefd161b84f014.png diff --git a/static/img/etherjot20.png b/assets/images/etherjot20-27d9bc96e6a6347909103a3ef4fce1e6.png similarity index 100% rename from static/img/etherjot20.png rename to assets/images/etherjot20-27d9bc96e6a6347909103a3ef4fce1e6.png diff --git a/static/img/etherjot21.png b/assets/images/etherjot21-a03d93e06338bd5226a83c0f056b533b.png similarity index 100% rename from static/img/etherjot21.png rename to assets/images/etherjot21-a03d93e06338bd5226a83c0f056b533b.png diff --git a/static/img/etherjot22.png b/assets/images/etherjot22-a6ff2b92ed743374eb1d511fcd509611.png similarity index 100% rename from static/img/etherjot22.png rename to assets/images/etherjot22-a6ff2b92ed743374eb1d511fcd509611.png diff --git a/static/img/etherjot23.png b/assets/images/etherjot23-ad32013d401847494a23fdefcebb0ec5.png similarity index 100% rename from static/img/etherjot23.png rename to assets/images/etherjot23-ad32013d401847494a23fdefcebb0ec5.png diff --git a/static/img/etherjot24.png b/assets/images/etherjot24-99074bdcd31b02eea90360189eacbba5.png similarity index 100% rename from static/img/etherjot24.png rename to assets/images/etherjot24-99074bdcd31b02eea90360189eacbba5.png diff --git a/static/img/etherjot25.png b/assets/images/etherjot25-3cfb142cfced91f436587e10a5f061ce.png similarity index 100% rename from static/img/etherjot25.png rename to assets/images/etherjot25-3cfb142cfced91f436587e10a5f061ce.png diff --git a/static/img/etherjot26.png b/assets/images/etherjot26-f332df45d9db9e00e4a9380f29ac32e5.png similarity index 100% rename from static/img/etherjot26.png rename to assets/images/etherjot26-f332df45d9db9e00e4a9380f29ac32e5.png diff --git a/static/img/etherjot27.png b/assets/images/etherjot27-500262d5f6584a3f98f856daf00b3517.png similarity index 100% rename from static/img/etherjot27.png rename to assets/images/etherjot27-500262d5f6584a3f98f856daf00b3517.png diff --git a/static/img/etherjot3.png b/assets/images/etherjot3-899e98b89a0f9cbaf1dcd87f6b3c8976.png similarity index 100% rename from static/img/etherjot3.png rename to assets/images/etherjot3-899e98b89a0f9cbaf1dcd87f6b3c8976.png diff --git a/static/img/etherjot4.png b/assets/images/etherjot4-190191b35676b02838946acf56719927.png similarity index 100% rename from static/img/etherjot4.png rename to assets/images/etherjot4-190191b35676b02838946acf56719927.png diff --git a/static/img/etherjot5.png b/assets/images/etherjot5-fb588d15da071d5adf73403a54438ebf.png similarity index 100% rename from static/img/etherjot5.png rename to assets/images/etherjot5-fb588d15da071d5adf73403a54438ebf.png diff --git a/static/img/etherjot6.png b/assets/images/etherjot6-75d25669f0b784a5297853d1b26159ae.png similarity index 100% rename from static/img/etherjot6.png rename to assets/images/etherjot6-75d25669f0b784a5297853d1b26159ae.png diff --git a/static/img/etherjot7.png b/assets/images/etherjot7-b67c3800c86311d657d1dfd481eb49db.png similarity index 100% rename from static/img/etherjot7.png rename to assets/images/etherjot7-b67c3800c86311d657d1dfd481eb49db.png diff --git a/static/img/etherjot8.png b/assets/images/etherjot8-5703f62180ae9e032caa5344579d8e6f.png similarity index 100% rename from static/img/etherjot8.png rename to assets/images/etherjot8-5703f62180ae9e032caa5344579d8e6f.png diff --git a/static/img/hash-routing.jpg b/assets/images/hash-routing-9ded011466d98e803d9f75f3b1c0116c.jpg similarity index 100% rename from static/img/hash-routing.jpg rename to assets/images/hash-routing-9ded011466d98e803d9f75f3b1c0116c.jpg diff --git a/static/img/routing-manifest.png b/assets/images/routing-manifest-7e3a4408af18995c31d40d91bf154672.png similarity index 100% rename from static/img/routing-manifest.png rename to assets/images/routing-manifest-7e3a4408af18995c31d40d91bf154672.png diff --git a/static/img/staking-swarmscan.png b/assets/images/staking-swarmscan-7a08f2c5be1d57dbe9c9b64f8fb3c608.png similarity index 100% rename from static/img/staking-swarmscan.png rename to assets/images/staking-swarmscan-7a08f2c5be1d57dbe9c9b64f8fb3c608.png diff --git a/static/img/stamps1.png b/assets/images/stamps1-be73a7b59bf76b2511c4ca63993bc61d.png similarity index 100% rename from static/img/stamps1.png rename to assets/images/stamps1-be73a7b59bf76b2511c4ca63993bc61d.png diff --git a/static/img/stamps10.png b/assets/images/stamps10-6abaa03a34b426c13ef49bfd3712aa58.png similarity index 100% rename from static/img/stamps10.png rename to assets/images/stamps10-6abaa03a34b426c13ef49bfd3712aa58.png diff --git a/static/img/stamps2.png b/assets/images/stamps2-986489e4b038207396f8528ac0555025.png similarity index 100% rename from static/img/stamps2.png rename to assets/images/stamps2-986489e4b038207396f8528ac0555025.png diff --git a/static/img/stamps3.png b/assets/images/stamps3-b35969aa32d1ecea3afc65a25a299daa.png similarity index 100% rename from static/img/stamps3.png rename to assets/images/stamps3-b35969aa32d1ecea3afc65a25a299daa.png diff --git a/static/img/stamps4.png b/assets/images/stamps4-b5660021acb2a001aa57f81925f2ea05.png similarity index 100% rename from static/img/stamps4.png rename to assets/images/stamps4-b5660021acb2a001aa57f81925f2ea05.png diff --git a/static/img/stamps5.png b/assets/images/stamps5-1bbede441d5f8c9669ba28f452938ebf.png similarity index 100% rename from static/img/stamps5.png rename to assets/images/stamps5-1bbede441d5f8c9669ba28f452938ebf.png diff --git a/static/img/stamps6.png b/assets/images/stamps6-051f17659efb643327d052cb904f5fc8.png similarity index 100% rename from static/img/stamps6.png rename to assets/images/stamps6-051f17659efb643327d052cb904f5fc8.png diff --git a/static/img/stamps7.png b/assets/images/stamps7-9b2bec4b752210c46554807aabb353ba.png similarity index 100% rename from static/img/stamps7.png rename to assets/images/stamps7-9b2bec4b752210c46554807aabb353ba.png diff --git a/static/img/stamps8.png b/assets/images/stamps8-88a5dd86314e636fe80b3e2205dbce62.png similarity index 100% rename from static/img/stamps8.png rename to assets/images/stamps8-88a5dd86314e636fe80b3e2205dbce62.png diff --git a/static/img/stamps9.png b/assets/images/stamps9-8230d0859d71f17e33bdc138998fe399.png similarity index 100% rename from static/img/stamps9.png rename to assets/images/stamps9-8230d0859d71f17e33bdc138998fe399.png diff --git a/static/img/swarm-desktop-account-tab.png b/assets/images/swarm-desktop-account-tab-33af042045830c434520ca470eeee8a3.png similarity index 100% rename from static/img/swarm-desktop-account-tab.png rename to assets/images/swarm-desktop-account-tab-33af042045830c434520ca470eeee8a3.png diff --git a/static/img/swarm-desktop.png b/assets/images/swarm-desktop-b7b65504e52ae453694474672563dd65.png similarity index 100% rename from static/img/swarm-desktop.png rename to assets/images/swarm-desktop-b7b65504e52ae453694474672563dd65.png diff --git a/static/img/swarm-desktop-files-tab.png b/assets/images/swarm-desktop-files-tab-c38ee8216a81a02bc4ca6528a3ffd165.png similarity index 100% rename from static/img/swarm-desktop-files-tab.png rename to assets/images/swarm-desktop-files-tab-c38ee8216a81a02bc4ca6528a3ffd165.png diff --git a/static/img/swarm-desktop-info-tab.png b/assets/images/swarm-desktop-info-tab-d11651491dd2935fd14699edaf17cb5d.png similarity index 100% rename from static/img/swarm-desktop-info-tab.png rename to assets/images/swarm-desktop-info-tab-d11651491dd2935fd14699edaf17cb5d.png diff --git a/static/img/swarm-desktop-settings-tab.png b/assets/images/swarm-desktop-settings-tab-583e639cac14116c03fb1193f427af8f.png similarity index 100% rename from static/img/swarm-desktop-settings-tab.png rename to assets/images/swarm-desktop-settings-tab-583e639cac14116c03fb1193f427af8f.png diff --git a/static/img/swarm-desktop-status-tab.png b/assets/images/swarm-desktop-status-tab-c11b2013c1c54f4998d52819263bd766.png similarity index 100% rename from static/img/swarm-desktop-status-tab.png rename to assets/images/swarm-desktop-status-tab-c11b2013c1c54f4998d52819263bd766.png diff --git a/static/img/upload-a-website1.gif b/assets/images/upload-a-website1-9a7bf23ce92e8efdeccf4c0d888f8124.gif similarity index 100% rename from static/img/upload-a-website1.gif rename to assets/images/upload-a-website1-9a7bf23ce92e8efdeccf4c0d888f8124.gif diff --git a/static/img/upload-a-website2.gif b/assets/images/upload-a-website2-bce37190157d9a4461531cc77c5db23d.gif similarity index 100% rename from static/img/upload-a-website2.gif rename to assets/images/upload-a-website2-bce37190157d9a4461531cc77c5db23d.gif diff --git a/static/img/upload-a-website3.gif b/assets/images/upload-a-website3-fc23c1f073a0c55d95b7d08f7132c697.gif similarity index 100% rename from static/img/upload-a-website3.gif rename to assets/images/upload-a-website3-fc23c1f073a0c55d95b7d08f7132c697.gif diff --git a/static/img/upload-a-website4.gif b/assets/images/upload-a-website4-955dd24d27a0c99c2518b0c87f7d545d.gif similarity index 100% rename from static/img/upload-a-website4.gif rename to assets/images/upload-a-website4-955dd24d27a0c99c2518b0c87f7d545d.gif diff --git a/static/img/upload1.png b/assets/images/upload1-ea91ec2583ef126e9b253c8339d65e73.png similarity index 100% rename from static/img/upload1.png rename to assets/images/upload1-ea91ec2583ef126e9b253c8339d65e73.png diff --git a/static/img/upload2.png b/assets/images/upload2-876d3d092beb0b2241317ff04786d071.png similarity index 100% rename from static/img/upload2.png rename to assets/images/upload2-876d3d092beb0b2241317ff04786d071.png diff --git a/static/img/upload3.png b/assets/images/upload3-5f139db5f40bf16502ecb1209a49cb77.png similarity index 100% rename from static/img/upload3.png rename to assets/images/upload3-5f139db5f40bf16502ecb1209a49cb77.png diff --git a/static/img/upload4.png b/assets/images/upload4-80175a47a1a5b3024b0c74e004a8bd8d.png similarity index 100% rename from static/img/upload4.png rename to assets/images/upload4-80175a47a1a5b3024b0c74e004a8bd8d.png diff --git a/static/img/upload5.png b/assets/images/upload5-f8e009edeea78972957e25edfce9bd6d.png similarity index 100% rename from static/img/upload5.png rename to assets/images/upload5-f8e009edeea78972957e25edfce9bd6d.png diff --git a/static/img/upload6.png b/assets/images/upload6-0f731ba127f67e5494b79ab5fbba02e9.png similarity index 100% rename from static/img/upload6.png rename to assets/images/upload6-0f731ba127f67e5494b79ab5fbba02e9.png diff --git a/assets/js/000d6678.2d6ae14f.js b/assets/js/000d6678.2d6ae14f.js new file mode 100644 index 000000000..2680da0ab --- /dev/null +++ b/assets/js/000d6678.2d6ae14f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[714],{69369(e,n,s){s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>t,default:()=>g,frontMatter:()=>o,metadata:()=>i,toc:()=>d});const i=JSON.parse('{"id":"bee/working-with-bee/logs-and-files","title":"Logging in Bee","description":"Guides log access rotation verbosity levels and structured logging integration with monitoring tools like Prometheus and Grafana.","source":"@site/docs/bee/working-with-bee/logs-and-files.md","sourceDirName":"bee/working-with-bee","slug":"/bee/working-with-bee/logs-and-files","permalink":"/docs/bee/working-with-bee/logs-and-files","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/bee/working-with-bee/logs-and-files.md","tags":[],"version":"current","frontMatter":{"title":"Logging in Bee","id":"logs-and-files","description":"Guides log access rotation verbosity levels and structured logging integration with monitoring tools like Prometheus and Grafana."},"sidebar":"bee","previous":{"title":"Bee API","permalink":"/docs/bee/working-with-bee/bee-api"},"next":{"title":"Swarm CLI","permalink":"/docs/bee/working-with-bee/swarm-cli"}}');var l=s(74848),r=s(28453);const o={title:"Logging in Bee",id:"logs-and-files",description:"Guides log access rotation verbosity levels and structured logging integration with monitoring tools like Prometheus and Grafana."},t=void 0,a={},d=[{value:"Log Locations",id:"log-locations",level:2},{value:"Linux (Package Manager Installation)",id:"linux-package-manager-installation",level:3},{value:"macOS (Homebrew Installation)",id:"macos-homebrew-installation",level:3},{value:"Docker",id:"docker",level:3},{value:"Shell Script",id:"shell-script",level:3},{value:"Logging Levels",id:"logging-levels",level:2},{value:"Behavior of Log Levels",id:"behavior-of-log-levels",level:3},{value:"Setting Verbosity",id:"setting-verbosity",level:2},{value:"YAML Config File",id:"yaml-config-file",level:3},{value:"Command Line Flag",id:"command-line-flag",level:3},{value:"Environment Variable",id:"environment-variable",level:3},{value:"Fine-Grained Logging Control",id:"fine-grained-logging-control",level:2},{value:"1. Retrieving Loggers List",id:"1-retrieving-loggers-list",level:3},{value:"2. Adjusting Logger Verbosity",id:"2-adjusting-logger-verbosity",level:3},{value:"Log Level Behavior Note",id:"log-level-behavior-note",level:3}];function c(e){const n={a:"a",admonition:"admonition",br:"br",code:"code",h2:"h2",h3:"h3",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.p,{children:"This section provides an overview of logging in Bee, including log locations, exporting logs, managing verbosity levels, and using fine-grained control for specific loggers."}),"\n",(0,l.jsx)(n.admonition,{type:"info",children:(0,l.jsxs)(n.p,{children:["Bee uses a structured logging format compatible with popular tools such as ",(0,l.jsx)(n.a,{href:"https://grafana.com/",children:"Grafana"})," and ",(0,l.jsx)(n.a,{href:"https://www.elastic.co/elasticsearch",children:"Elasticsearch"}),". Structured logging helps streamline log analysis and management by organizing data into machine-readable formats, enabling easy integration with monitoring and debugging tools."]})}),"\n",(0,l.jsxs)(n.admonition,{type:"warning",children:[(0,l.jsx)(n.mdxAdmonitionTitle,{}),(0,l.jsxs)(n.p,{children:["Bee logs can be verbose by default, potentially consuming significant disk space over time. Consider implementing ",(0,l.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Log_rotation",children:"log rotation"})," to prevent excessive disk utilization."]})]}),"\n",(0,l.jsx)(n.h2,{id:"log-locations",children:"Log Locations"}),"\n",(0,l.jsx)(n.h3,{id:"linux-package-manager-installation",children:(0,l.jsx)(n.strong,{children:"Linux (Package Manager Installation)"})}),"\n",(0,l.jsxs)(n.p,{children:["When installed via a package manager (e.g., ",(0,l.jsx)(n.code,{children:"APT"}),", ",(0,l.jsx)(n.code,{children:"RPM"}),"), Bee runs as a ",(0,l.jsx)(n.strong,{children:"systemd service"}),", and logs are managed by the system journal, ",(0,l.jsx)(n.strong,{children:"journalctl"}),"."]}),"\n",(0,l.jsx)(n.p,{children:"View logs with:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"journalctl --lines=100 --follow --unit bee\n"})}),"\n",(0,l.jsx)(n.p,{children:"Export all logs as JSON:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"journalctl --unit bee --output=json > bee-logs.json\n"})}),"\n",(0,l.jsx)(n.p,{children:"Export logs for a specific time range:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:'journalctl --since "1 hour ago" --output=json --unit bee > bee-logs.json\n'})}),"\n",(0,l.jsxs)(n.p,{children:["Learn more about ",(0,l.jsx)(n.code,{children:"journalctl"})," usage and filtering logs in this ",(0,l.jsx)(n.a,{href:"https://www.digitalocean.com/community/tutorials/how-to-use-journalctl-to-view-and-manipulate-systemd-logs",children:"tutorial"})," from DigitalOcean."]}),"\n",(0,l.jsx)(n.h3,{id:"macos-homebrew-installation",children:(0,l.jsx)(n.strong,{children:"macOS (Homebrew Installation)"})}),"\n",(0,l.jsx)(n.p,{children:"For a Homebrew installation on macOS, logs are saved to:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"/usr/local/var/log/swarm-bee/bee.log\n"})}),"\n",(0,l.jsx)(n.p,{children:"View logs in real-time:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"tail -f /usr/local/var/log/swarm-bee/bee.log\n"})}),"\n",(0,l.jsx)(n.h3,{id:"docker",children:(0,l.jsx)(n.strong,{children:"Docker"})}),"\n",(0,l.jsxs)(n.p,{children:["Docker saves ",(0,l.jsx)(n.strong,{children:"stdout"})," and ",(0,l.jsx)(n.strong,{children:"stderr"})," output as JSON files by default. Logs are stored in:"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"/var/lib/docker/containers//-json.log\n"})}),"\n",(0,l.jsx)(n.p,{children:"View logs in real time:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"docker logs -f \n"})}),"\n",(0,l.jsx)(n.p,{children:"Export logs to a file:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"docker logs > bee-logs.json\n"})}),"\n",(0,l.jsx)(n.p,{children:"Export logs for a specific time range:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:'docker logs --since "30m" > bee-logs.json\n'})}),"\n",(0,l.jsxs)(n.p,{children:["See ",(0,l.jsx)(n.a,{href:"https://docs.docker.com/reference/cli/docker/container/logs/",children:"Docker documentation"})," for additional options."]}),"\n",(0,l.jsx)(n.h3,{id:"shell-script",children:(0,l.jsx)(n.strong,{children:"Shell Script"})}),"\n",(0,l.jsxs)(n.p,{children:["For a shell script-installed Bee started using ",(0,l.jsx)(n.code,{children:"bee start"}),", logs are sent to ",(0,l.jsx)(n.strong,{children:"stdout"})," and ",(0,l.jsx)(n.strong,{children:"stderr"})," by default, which means they will appear in the terminal. They are ",(0,l.jsx)(n.strong,{children:"not saved to disk by default"}),"."]}),"\n",(0,l.jsxs)(n.p,{children:["To save logs to a file, redirect ",(0,l.jsx)(n.strong,{children:"stdout"})," and ",(0,l.jsx)(n.strong,{children:"stderr"}),":"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"bee start --password > bee.log 2>&1 &\n"})}),"\n",(0,l.jsx)(n.p,{children:"View recent logs and follow for updates:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"tail -f bee.log\n"})}),"\n",(0,l.jsx)(n.h2,{id:"logging-levels",children:"Logging Levels"}),"\n",(0,l.jsx)(n.p,{children:"Bee supports the following log levels:"}),"\n",(0,l.jsxs)(n.table,{children:[(0,l.jsx)(n.thead,{children:(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.th,{children:"Level"}),(0,l.jsx)(n.th,{children:"Description"})]})}),(0,l.jsxs)(n.tbody,{children:[(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.code,{children:"0=silent"})}),(0,l.jsx)(n.td,{children:"No logs."})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.code,{children:"1=error"})}),(0,l.jsx)(n.td,{children:"Critical errors only."})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.code,{children:"2=warn"})}),(0,l.jsx)(n.td,{children:"Warnings and errors."})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.code,{children:"3=info"})}),(0,l.jsx)(n.td,{children:"General operational logs (default)."})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.code,{children:"4=debug"})}),(0,l.jsx)(n.td,{children:"Detailed diagnostic logs."})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.code,{children:"5=trace"})}),(0,l.jsx)(n.td,{children:"Highly granular logs for debugging."})]})]})]}),"\n",(0,l.jsx)(n.h3,{id:"behavior-of-log-levels",children:"Behavior of Log Levels"}),"\n",(0,l.jsxs)(n.p,{children:["Log levels are cumulative: setting a higher verbosity includes all lower levels.",(0,l.jsx)(n.br,{}),"\n","For example, ",(0,l.jsx)(n.code,{children:"debug"})," will output logs at ",(0,l.jsx)(n.code,{children:"debug"}),", ",(0,l.jsx)(n.code,{children:"info"}),", ",(0,l.jsx)(n.code,{children:"warn"}),", and ",(0,l.jsx)(n.code,{children:"error"})," levels."]}),"\n",(0,l.jsx)(n.h2,{id:"setting-verbosity",children:"Setting Verbosity"}),"\n",(0,l.jsxs)(n.p,{children:["The general verbosity level can be set using the ",(0,l.jsx)(n.code,{children:"verbosity"})," configuration option in order to display all log messages up to the selected level of verbosity."]}),"\n",(0,l.jsx)(n.h3,{id:"yaml-config-file",children:(0,l.jsx)(n.strong,{children:"YAML Config File"})}),"\n",(0,l.jsxs)(n.p,{children:["Set the ",(0,l.jsx)(n.code,{children:"verbosity"})," parameter in ",(0,l.jsx)(n.code,{children:"config.yaml"}),":"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-yaml",children:"# Log verbosity: 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=trace\nverbosity: debug\n"})}),"\n",(0,l.jsx)(n.h3,{id:"command-line-flag",children:(0,l.jsx)(n.strong,{children:"Command Line Flag"})}),"\n",(0,l.jsx)(n.p,{children:"Set the verbosity level (0-5) when starting Bee:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"bee start --verbosity debug\n"})}),"\n",(0,l.jsx)(n.h3,{id:"environment-variable",children:(0,l.jsx)(n.strong,{children:"Environment Variable"})}),"\n",(0,l.jsxs)(n.p,{children:["Set ",(0,l.jsx)(n.code,{children:"BEE_VERBOSITY"})," before starting Bee:"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"export BEE_VERBOSITY=debug\nbee start\n"})}),"\n",(0,l.jsx)(n.h2,{id:"fine-grained-logging-control",children:"Fine-Grained Logging Control"}),"\n",(0,l.jsxs)(n.p,{children:["Bee allows fine-grained control of logging levels for specific subsystems using the ",(0,l.jsxs)(n.strong,{children:[(0,l.jsx)(n.code,{children:"/loggers"})," API endpoint"]}),". This enables adjustments without restarting the node."]}),"\n",(0,l.jsx)(n.h3,{id:"1-retrieving-loggers-list",children:(0,l.jsx)(n.strong,{children:"1. Retrieving Loggers List"})}),"\n",(0,l.jsx)(n.p,{children:"Retrieve a list of active loggers and their verbosity levels:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"curl http://localhost:1633/loggers | jq\n"})}),"\n",(0,l.jsxs)(n.p,{children:["The list of loggers includes detailed entries for each subsystem. Below is an example for the ",(0,l.jsx)(n.code,{children:"node/api"})," logger:"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-json",children:'{\n "logger": "node/api",\n "verbosity": "info",\n "subsystem": "node/api[0][]>>824634474528",\n "id": "bm9kZS9hcGlbMF1bXT4-ODI0NjM0NDc0NTI4"\n}\n'})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:(0,l.jsx)(n.code,{children:"id"})}),": The Base64-encoded identifier used to adjust the logger\u2019s verbosity."]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:(0,l.jsx)(n.code,{children:"verbosity"})}),": The current log level."]}),"\n"]}),"\n",(0,l.jsx)(n.h3,{id:"2-adjusting-logger-verbosity",children:(0,l.jsx)(n.strong,{children:"2. Adjusting Logger Verbosity"})}),"\n",(0,l.jsx)(n.p,{children:"You can dynamically adjust the log level for any logger without restarting Bee."}),"\n",(0,l.jsxs)(n.p,{children:[(0,l.jsx)(n.strong,{children:"Syntax"}),":"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"curl -X PUT http://localhost:1633/loggers//\n"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:(0,l.jsx)(n.code,{children:""})}),": The Base64-encoded logger name retrieved from ",(0,l.jsx)(n.code,{children:"/loggers"}),"."]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:(0,l.jsx)(n.code,{children:""})}),": Desired log level (",(0,l.jsx)(n.code,{children:"none"}),", ",(0,l.jsx)(n.code,{children:"error"}),", ",(0,l.jsx)(n.code,{children:"warn"}),", ",(0,l.jsx)(n.code,{children:"info"}),", ",(0,l.jsx)(n.code,{children:"debug"}),", ",(0,l.jsx)(n.code,{children:"trace"}),")."]}),"\n"]}),"\n",(0,l.jsxs)(n.p,{children:[(0,l.jsx)(n.strong,{children:"Example"}),": Set ",(0,l.jsx)(n.code,{children:"node/api"})," to ",(0,l.jsx)(n.code,{children:"debug"}),":"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"curl -X PUT http://localhost:1633/loggers/bm9kZS9hcGlbMF1bXT4-ODI0NjM0NDc0NTI4/debug\n"})}),"\n",(0,l.jsx)(n.h3,{id:"log-level-behavior-note",children:"Log Level Behavior Note"}),"\n",(0,l.jsx)(n.p,{children:"Log levels are cumulative. When a logger is set to a specific level, it will include all log messages at that level and below."}),"\n",(0,l.jsx)(n.p,{children:"For example:"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["Setting a logger to ",(0,l.jsx)(n.code,{children:"info"})," will show logs at ",(0,l.jsx)(n.code,{children:"info"}),", ",(0,l.jsx)(n.code,{children:"warn"}),", and ",(0,l.jsx)(n.code,{children:"error"}),"."]}),"\n",(0,l.jsxs)(n.li,{children:["Logs at higher levels (",(0,l.jsx)(n.code,{children:"debug"})," and ",(0,l.jsx)(n.code,{children:"trace"}),") will ",(0,l.jsx)(n.strong,{children:"not"})," be displayed."]}),"\n"]})]})}function g(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(c,{...e})}):c(e)}},28453(e,n,s){s.d(n,{R:()=>o,x:()=>t});var i=s(96540);const l={},r=i.createContext(l);function o(e){const n=i.useContext(r);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:o(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0058b4c6.19584542.js b/assets/js/0058b4c6.19584542.js new file mode 100644 index 000000000..87aa98401 --- /dev/null +++ b/assets/js/0058b4c6.19584542.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[849],{86164(e){e.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"concepts":[{"type":"link","href":"/docs/concepts/introduction","label":"Introduction","docId":"concepts/introduction","unlisted":false},{"type":"link","href":"/docs/concepts/what-is-swarm","label":"What is Swarm?","docId":"concepts/what-is-swarm","unlisted":false},{"type":"category","label":"DISC Storage","items":[{"type":"link","href":"/docs/concepts/DISC/","label":"DISC","docId":"concepts/DISC/disc","unlisted":false},{"type":"link","href":"/docs/concepts/DISC/kademlia","label":"Kademlia","docId":"concepts/DISC/kademlia","unlisted":false},{"type":"link","href":"/docs/concepts/DISC/neighborhoods","label":"Neighborhoods","docId":"concepts/DISC/neighborhoods","unlisted":false},{"type":"link","href":"/docs/concepts/DISC/erasure-coding","label":"Erasure Coding","docId":"concepts/DISC/erasure-coding","unlisted":false}],"collapsed":false,"collapsible":true},{"type":"category","label":"Incentives","items":[{"type":"link","href":"/docs/concepts/incentives/overview","label":"Incentives Overview","docId":"concepts/incentives/overview","unlisted":false},{"type":"link","href":"/docs/concepts/incentives/redistribution-game","label":"Redistribution Game","docId":"concepts/incentives/redistribution-game","unlisted":false},{"type":"link","href":"/docs/concepts/incentives/postage-stamps","label":"Postage Stamps","docId":"concepts/incentives/postage-stamps","unlisted":false},{"type":"link","href":"/docs/concepts/incentives/bandwidth-incentives","label":"Bandwidth Incentives (SWAP)","docId":"concepts/incentives/bandwidth-incentives","unlisted":false},{"type":"link","href":"/docs/concepts/incentives/price-oracle","label":"Price Oracle","docId":"concepts/incentives/price-oracle","unlisted":false}],"collapsed":false,"collapsible":true},{"type":"link","href":"/docs/concepts/pss","label":"PSS","docId":"concepts/pss","unlisted":false},{"type":"link","href":"/docs/concepts/access-control","label":"Access Control","docId":"concepts/access-control","unlisted":false}],"desktop":[{"type":"link","href":"/docs/desktop/introduction","label":"Introduction","docId":"desktop/introduction","unlisted":false},{"type":"link","href":"/docs/desktop/install","label":"Install","docId":"desktop/install","unlisted":false},{"type":"link","href":"/docs/desktop/configuration","label":"Configuration","docId":"desktop/configuration","unlisted":false},{"type":"link","href":"/docs/desktop/access-content","label":"Access Content","docId":"desktop/access-content","unlisted":false},{"type":"link","href":"/docs/desktop/postage-stamps","label":"Postage Stamps","docId":"desktop/postage-stamps","unlisted":false},{"type":"link","href":"/docs/desktop/upload-content","label":"Upload Content","docId":"desktop/upload-content","unlisted":false},{"type":"link","href":"/docs/desktop/backup-restore","label":"Backup and Restore","docId":"desktop/backup-restore","unlisted":false},{"type":"link","href":"/docs/desktop/publish-a-website","label":"Publish a Website","docId":"desktop/publish-a-website","unlisted":false},{"type":"link","href":"/docs/desktop/start-a-blog","label":"Start a Blog","docId":"desktop/start-a-blog","unlisted":false}],"bee":[{"type":"category","label":"Installation","items":[{"type":"link","href":"/docs/bee/installation/getting-started","label":"Getting Started","docId":"bee/installation/getting-started","unlisted":false},{"type":"link","href":"/docs/bee/installation/quick-start","label":"Quickstart","docId":"bee/installation/quick-start","unlisted":false},{"type":"link","href":"/docs/bee/installation/shell-script-install","label":"Shell Script Install","docId":"bee/installation/shell-script-install","unlisted":false},{"type":"link","href":"/docs/bee/installation/docker","label":"Docker Install","docId":"bee/installation/docker","unlisted":false},{"type":"link","href":"/docs/bee/installation/package-manager-install","label":"Package Manager Install","docId":"bee/installation/package-manager-install","unlisted":false},{"type":"link","href":"/docs/bee/installation/build-from-source","label":"Build from Source","docId":"bee/installation/build-from-source","unlisted":false},{"type":"link","href":"/docs/bee/installation/set-target-neighborhood","label":"Set Target Neighborhood","docId":"bee/installation/set-target-neighborhood","unlisted":false},{"type":"link","href":"/docs/bee/installation/hive","label":"Hive","docId":"bee/installation/hive","unlisted":false},{"type":"link","href":"/docs/bee/installation/connectivity","label":"Connectivity","docId":"bee/installation/connectivity","unlisted":false},{"type":"link","href":"/docs/bee/installation/fund-your-node","label":"Fund Your Node","docId":"bee/installation/fund-your-node","unlisted":false}],"collapsed":false,"collapsible":true},{"type":"category","label":"Working With Bee","items":[{"type":"link","href":"/docs/bee/working-with-bee/introduction","label":"Introduction","docId":"bee/working-with-bee/introduction","unlisted":false},{"type":"link","href":"/docs/bee/working-with-bee/configuration","label":"Configuration","docId":"bee/working-with-bee/configuration","unlisted":false},{"type":"link","href":"/docs/bee/working-with-bee/node-types","label":"Node Types","docId":"bee/working-with-bee/node-types","unlisted":false},{"type":"link","href":"/docs/bee/working-with-bee/bee-api","label":"Bee API","docId":"bee/working-with-bee/bee-api","unlisted":false},{"type":"link","href":"/docs/bee/working-with-bee/logs-and-files","label":"Logging in Bee","docId":"bee/working-with-bee/logs-and-files","unlisted":false},{"type":"link","href":"/docs/bee/working-with-bee/swarm-cli","label":"Swarm CLI","docId":"bee/working-with-bee/swarm-cli","unlisted":false},{"type":"link","href":"/docs/bee/working-with-bee/staking","label":"Staking","docId":"bee/working-with-bee/staking","unlisted":false},{"type":"link","href":"/docs/bee/working-with-bee/cashing-out","label":"Cashing Out","docId":"bee/working-with-bee/cashing-out","unlisted":false},{"type":"link","href":"/docs/bee/working-with-bee/monitoring","label":"Monitoring Your Node","docId":"bee/working-with-bee/monitoring","unlisted":false},{"type":"link","href":"/docs/bee/working-with-bee/backups","label":"Backups","docId":"bee/working-with-bee/backups","unlisted":false},{"type":"link","href":"/docs/bee/working-with-bee/upgrading-bee","label":"Upgrading Bee","docId":"bee/working-with-bee/upgrading-bee","unlisted":false},{"type":"link","href":"/docs/bee/working-with-bee/uninstalling-bee","label":"Uninstalling Bee","docId":"bee/working-with-bee/uninstalling-bee","unlisted":false}],"collapsed":false,"collapsible":true},{"type":"link","href":"/docs/bee/bee-faq","label":"Bee FAQ","docId":"bee/bee-faq","unlisted":false}],"develop":[{"type":"category","label":"Develop","items":[{"type":"link","href":"/docs/develop/introduction","label":"Start Building","docId":"develop/introduction","unlisted":false},{"type":"link","href":"/docs/develop/upload-and-download","label":"Upload & Download","docId":"develop/upload-and-download","unlisted":false},{"type":"link","href":"/docs/develop/host-your-website","label":"Host a Webpage","docId":"develop/host-your-website","unlisted":false},{"type":"link","href":"/docs/develop/files","label":"Manage Files","docId":"develop/files","unlisted":false},{"type":"link","href":"/docs/develop/routing","label":"Website Routing","docId":"develop/routing","unlisted":false},{"type":"link","href":"/docs/develop/gateway-proxy","label":"Run a Gateway","docId":"develop/gateway-proxy","unlisted":false},{"type":"link","href":"/docs/develop/dynamic-content","label":"Dynamic Content","docId":"develop/dynamic-content","unlisted":false},{"type":"link","href":"/docs/develop/multi-author-blog","label":"Multi-Author Blog","docId":"develop/multi-author-blog","unlisted":false},{"type":"link","href":"/docs/develop/act","label":"Add Access Control","docId":"develop/act","unlisted":false},{"type":"link","href":"/docs/develop/resources","label":"Developer Resources","docId":"develop/resources","unlisted":false}],"collapsed":false,"collapsible":true},{"type":"category","label":"Tools and Features","items":[{"type":"link","href":"/docs/develop/tools-and-features/introduction","label":"Overview","docId":"develop/tools-and-features/introduction","unlisted":false},{"type":"link","href":"/docs/develop/tools-and-features/ai-agent-skills","label":"AI Agent Skills","docId":"develop/tools-and-features/ai-agent-skills","unlisted":false},{"type":"link","href":"/docs/develop/tools-and-features/cheatsheets","label":"Swarm Cheatsheet","docId":"develop/tools-and-features/cheatsheets","unlisted":false},{"type":"link","href":"/docs/develop/tools-and-features/buy-a-stamp-batch","label":"Postage Stamp Batches","docId":"develop/tools-and-features/buy-a-stamp-batch","unlisted":false},{"type":"link","href":"/docs/develop/tools-and-features/bee-js","label":"Bee JS","docId":"develop/tools-and-features/bee-js","unlisted":false},{"type":"link","href":"/docs/develop/tools-and-features/gateway-proxy","label":"Gateway Proxy","docId":"develop/tools-and-features/gateway-proxy","unlisted":false},{"type":"link","href":"/docs/develop/tools-and-features/chunk-types","label":"Chunk Types","docId":"develop/tools-and-features/chunk-types","unlisted":false},{"type":"link","href":"/docs/develop/tools-and-features/feeds","label":"Feeds","docId":"develop/tools-and-features/feeds","unlisted":false},{"type":"link","href":"/docs/develop/tools-and-features/manifests","label":"Manifests","docId":"develop/tools-and-features/manifests","unlisted":false},{"type":"link","href":"/docs/develop/tools-and-features/pss","label":"PSS Messaging","docId":"develop/tools-and-features/pss","unlisted":false},{"type":"link","href":"/docs/develop/tools-and-features/gsoc","label":"GSOC","docId":"develop/tools-and-features/gsoc","unlisted":false},{"type":"link","href":"/docs/develop/tools-and-features/pinning","label":"Pinning","docId":"develop/tools-and-features/pinning","unlisted":false},{"type":"link","href":"/docs/develop/tools-and-features/erasure-coding","label":"Erasure Coding","docId":"develop/tools-and-features/erasure-coding","unlisted":false},{"type":"link","href":"/docs/develop/tools-and-features/store-with-encryption","label":"Store with Encryption","docId":"develop/tools-and-features/store-with-encryption","unlisted":false},{"type":"link","href":"/docs/develop/tools-and-features/bee-dev-mode","label":"bee-factory","docId":"develop/tools-and-features/bee-dev-mode","unlisted":false},{"type":"link","href":"/docs/develop/tools-and-features/starting-a-test-network","label":"Starting a Private Network","docId":"develop/tools-and-features/starting-a-test-network","unlisted":false}],"collapsed":false,"collapsible":true},{"type":"category","label":"Contribute","items":[{"type":"link","href":"/docs/develop/contribute/introduction","label":"Overview","docId":"develop/contribute/introduction","unlisted":false},{"type":"link","href":"/docs/develop/contribute/protocols","label":"Protocols","docId":"develop/contribute/protocols","unlisted":false}],"collapsed":false,"collapsible":true}],"References":[{"type":"link","href":"/docs/references/smart-contracts","label":"Smart Contracts","docId":"references/smart-contracts","unlisted":false},{"type":"link","href":"/docs/references/tokens","label":"Tokens","docId":"references/tokens","unlisted":false},{"type":"link","href":"/docs/references/glossary","label":"Glossary","docId":"references/glossary","unlisted":false},{"type":"link","href":"/docs/references/community","label":"Community","docId":"references/community","unlisted":false},{"type":"link","href":"/docs/references/fair-data-society","label":"Fair Data Society","docId":"references/fair-data-society","unlisted":false},{"type":"link","href":"/docs/references/faq","label":"FAQ","docId":"references/faq","unlisted":false},{"type":"link","href":"/docs/references/awesome-list","label":"Awesome Swarm","docId":"references/awesome-list","unlisted":false}]},"docs":{"bee/bee-faq":{"id":"bee/bee-faq","title":"Bee FAQ","description":"Addresses common questions about running Bee nodes including setup installation troubleshooting and blockchain interactions.","sidebar":"bee"},"bee/installation/build-from-source":{"id":"bee/installation/build-from-source","title":"Build from Source","description":"Guides developers through compiling Bee directly from source code using Go git and make with step-by-step instructions.","sidebar":"bee"},"bee/installation/connectivity":{"id":"bee/installation/connectivity","title":"Connectivity","description":"Explains network setup and NAT configuration to ensure Bee nodes can communicate with peers on both private and public networks.","sidebar":"bee"},"bee/installation/docker":{"id":"bee/installation/docker","title":"Docker Install","description":"Provides comprehensive steps for deploying Bee nodes using Docker containers with volume management and network configuration.","sidebar":"bee"},"bee/installation/fund-your-node":{"id":"bee/installation/fund-your-node","title":"Fund Your Node","description":"Outlines xDAI and xBZZ token requirements by use case and provides guidance on acquiring tokens from exchanges and faucets.","sidebar":"bee"},"bee/installation/getting-started":{"id":"bee/installation/getting-started","title":"Getting Started","description":"Introduces Bee node types their requirements and available installation methods to help users choose appropriate setup approaches.","sidebar":"bee"},"bee/installation/hive":{"id":"bee/installation/hive","title":"Hive","description":"Describes tools and orchestration methods for managing multiple Bee nodes using Docker Compose Helm or manual configuration.","sidebar":"bee"},"bee/installation/package-manager-install":{"id":"bee/installation/package-manager-install","title":"Package Manager Install","description":"Guides installation using system package managers (APT RPM Homebrew) with background service configuration and management.","sidebar":"bee"},"bee/installation/quick-start":{"id":"bee/installation/quick-start","title":"Quickstart","description":"Accelerates Bee setup with shell script installation and swarm-cli tools enabling rapid node deployment and network interaction.","sidebar":"bee"},"bee/installation/set-target-neighborhood":{"id":"bee/installation/set-target-neighborhood","title":"Set Target Neighborhood","description":"Explains how to strategically assign node neighborhoods using Swarmscan data to optimize staking rewards and network resilience.","sidebar":"bee"},"bee/installation/shell-script-install":{"id":"bee/installation/shell-script-install","title":"Shell Script Install","description":"Provides flexible installation using an automated shell script supporting Linux and macOS with customizable configuration options.","sidebar":"bee"},"bee/working-with-bee/backups":{"id":"bee/working-with-bee/backups","title":"Backups","description":"Details critical backup procedures for keys password and node data across various installation methods and platforms.","sidebar":"bee"},"bee/working-with-bee/bcrypt":{"id":"bee/working-with-bee/bcrypt","title":"Bcrypt hashing utility","description":"Shows how to generate and validate bcrypt password hashes using Bee\'s built-in utilities or external tools."},"bee/working-with-bee/bee-api":{"id":"bee/working-with-bee/bee-api","title":"Bee API","description":"Comprehensive reference for Bee\'s HTTP API endpoints enabling programmatic access to node management uploads downloads and monitoring.","sidebar":"bee"},"bee/working-with-bee/cashing-out":{"id":"bee/working-with-bee/cashing-out","title":"Cashing Out","description":"Explains how to withdraw earned xBZZ rewards and manage cheques through the bandwidth incentives SWAP system.","sidebar":"bee"},"bee/working-with-bee/configuration":{"id":"bee/working-with-bee/configuration","title":"Configuration","description":"Documents all Bee configuration options available through YAML files environment variables and command-line flags.","sidebar":"bee"},"bee/working-with-bee/introduction":{"id":"bee/working-with-bee/introduction","title":"Introduction","description":"Overview of node operation topics including configuration API access backups monitoring and upgrade procedures.","sidebar":"bee"},"bee/working-with-bee/logs-and-files":{"id":"bee/working-with-bee/logs-and-files","title":"Logging in Bee","description":"Guides log access rotation verbosity levels and structured logging integration with monitoring tools like Prometheus and Grafana.","sidebar":"bee"},"bee/working-with-bee/monitoring":{"id":"bee/working-with-bee/monitoring","title":"Monitoring Your Node","description":"Explains how to monitor Bee node metrics using Prometheus and Grafana for tracking cheque rates and network performance.","sidebar":"bee"},"bee/working-with-bee/node-types":{"id":"bee/working-with-bee/node-types","title":"Node Types","description":"Compares full light and ultra-light node types with their features requirements and configuration for different use cases.","sidebar":"bee"},"bee/working-with-bee/staking":{"id":"bee/working-with-bee/staking","title":"Staking","description":"Walkthrough of depositing xBZZ to participate in the storage incentives redistribution game and earn network rewards.","sidebar":"bee"},"bee/working-with-bee/swarm-cli":{"id":"bee/working-with-bee/swarm-cli","title":"Swarm CLI","description":"Introduces swarm-cli command-line tool that simplifies node interaction uploads downloads and batch management.","sidebar":"bee"},"bee/working-with-bee/uninstalling-bee":{"id":"bee/working-with-bee/uninstalling-bee","title":"Uninstalling Bee","description":"Instructions for cleanly removing Bee installations across different operating systems and package managers.","sidebar":"bee"},"bee/working-with-bee/upgrading-bee":{"id":"bee/working-with-bee/upgrading-bee","title":"Upgrading Bee","description":"Procedures for safely upgrading Bee to latest versions while preserving keys avoiding round disruption and cashing out rewards.","sidebar":"bee"},"concepts/access-control":{"id":"concepts/access-control","title":"Access Control","description":"Introduces Access Control Trie (ACT) for managing encryption and permissions in decentralized storage with content sharing capabilities.","sidebar":"concepts"},"concepts/DISC/disc":{"id":"concepts/DISC/disc","title":"DISC","description":"Overview of Swarm\'s Distributed Immutable Store for Chunks system using Kademlia neighborhoods and synchronization protocols.","sidebar":"concepts"},"concepts/DISC/erasure-coding":{"id":"concepts/DISC/erasure-coding","title":"Erasure Coding","description":"Explains optional data protection technique using redundant chunks at multiple protection levels to ensure reliable data recovery.","sidebar":"concepts"},"concepts/DISC/kademlia":{"id":"concepts/DISC/kademlia","title":"Kademlia","description":"Details distributed hash table algorithm using XOR distance metrics for efficient decentralized lookups and network routing.","sidebar":"concepts"},"concepts/DISC/neighborhoods":{"id":"concepts/DISC/neighborhoods","title":"Neighborhoods","description":"Describes proximity-based node groupings that share storage responsibilities using proximity order to determine neighborhoods.","sidebar":"concepts"},"concepts/incentives/bandwidth-incentives":{"id":"concepts/incentives/bandwidth-incentives","title":"Bandwidth Incentives (SWAP)","description":"Explains SWAP protocol for managing bandwidth resource exchange between nodes using cheques and off-chain accounting.","sidebar":"concepts"},"concepts/incentives/overview":{"id":"concepts/incentives/overview","title":"Incentives Overview","description":"Describes dual incentive mechanisms combining storage incentives for data retention and bandwidth incentives for data relay.","sidebar":"concepts"},"concepts/incentives/postage-stamps":{"id":"concepts/incentives/postage-stamps","title":"Postage Stamps","description":"Details prepaid batch system for uploading data to Swarm with dynamic pricing based on network redundancy signals.","sidebar":"concepts"},"concepts/incentives/price-oracle":{"id":"concepts/incentives/price-oracle","title":"Price Oracle","description":"Describes smart contract mechanism for dynamically adjusting postage stamp prices based on network utilization data.","sidebar":"concepts"},"concepts/incentives/redistribution-game":{"id":"concepts/incentives/redistribution-game","title":"Redistribution Game","description":"Explains game-theoretic system distributing xBZZ from postage stamps to full nodes that honestly store data.","sidebar":"concepts"},"concepts/introduction":{"id":"concepts/introduction","title":"Introduction","description":"Overview of Swarm\'s peer-to-peer infrastructure the Bee client and the Swarm Foundation\'s mission for decentralized storage.","sidebar":"concepts"},"concepts/pss":{"id":"concepts/pss","title":"PSS","description":"Explains Postal Service over Swarm messaging protocol enabling secure private and efficient communication between network nodes.","sidebar":"concepts"},"concepts/what-is-swarm":{"id":"concepts/what-is-swarm","title":"What is Swarm?","description":"Details Swarm\'s four-layer architecture including underlay overlay data access and application layers for decentralized storage.","sidebar":"concepts"},"desktop/access-content":{"id":"desktop/access-content","title":"Access Content","description":"Download and retrieve content from Swarm using the Swarm Desktop app.","sidebar":"desktop"},"desktop/backup-restore":{"id":"desktop/backup-restore","title":"Backup and Restore","description":"Back up and restore your Bee node\'s wallet keys and data in the Swarm Desktop app.","sidebar":"desktop"},"desktop/configuration":{"id":"desktop/configuration","title":"Configuration","description":"Adjust your Bee node\'s settings through the Swarm Desktop app.","sidebar":"desktop"},"desktop/install":{"id":"desktop/install","title":"Install","description":"Install the Swarm Desktop app on Windows, macOS, or Linux to run a Bee node with a graphical interface.","sidebar":"desktop"},"desktop/introduction":{"id":"desktop/introduction","title":"Introduction","description":"Swarm Desktop is a graphical app for Windows, Mac, and Linux that runs a Bee node and uploads and downloads content without the command line.","sidebar":"desktop"},"desktop/postage-stamps":{"id":"desktop/postage-stamps","title":"Postage Stamps","description":"Buy and manage postage stamp batches \u2014 the prepaid storage needed to upload \u2014 from the Swarm Desktop app.","sidebar":"desktop"},"desktop/publish-a-website":{"id":"desktop/publish-a-website","title":"Publish a Website","description":"Publish a static website to Swarm from the Swarm Desktop app and access it via a Swarm hash.","sidebar":"desktop"},"desktop/start-a-blog":{"id":"desktop/start-a-blog","title":"Start a Blog","description":"Create and publish a blog on Swarm using the Swarm Desktop app.","sidebar":"desktop"},"desktop/upload-content":{"id":"desktop/upload-content","title":"Upload Content","description":"Upload files and directories to Swarm from the Swarm Desktop app and get a shareable Swarm reference.","sidebar":"desktop"},"develop/act":{"id":"develop/act","title":"Add Access Control","description":"Guide for implementing encryption and access control in decentralized applications using Bee.","sidebar":"develop"},"develop/contribute/introduction":{"id":"develop/contribute/introduction","title":"Contribute to Bee Development","description":"Overview of how to contribute to Bee development including code standards and contribution process.","sidebar":"develop"},"develop/contribute/protocols":{"id":"develop/contribute/protocols","title":"Protocols","description":"Technical documentation of core Bee protocols and their implementation details for developers.","sidebar":"develop"},"develop/dynamic-content":{"id":"develop/dynamic-content","title":"Dynamic Content","description":"Learn how to use feeds to create updateable content on Swarm \u2014 with a complete example project that builds a simple blog.","sidebar":"develop"},"develop/files":{"id":"develop/files","title":"Manage Files","description":"Upload, download, and manage files, directories, and collections on Swarm using the Bee API and bee-js.","sidebar":"develop"},"develop/gateway-proxy":{"id":"develop/gateway-proxy","title":"Run a Gateway","description":"Run a Bee node as a public HTTP gateway so anyone can access Swarm-hosted content from an ordinary web browser.","sidebar":"develop"},"develop/host-your-website":{"id":"develop/host-your-website","title":"Host a Webpage","description":"Comprehensive guide for uploading and hosting websites on Swarm with content addressing.","sidebar":"develop"},"develop/introduction":{"id":"develop/introduction","title":"Building on Swarm","description":"Swarm lets developers store data, host websites, and build decentralised apps using the Bee HTTP API and the bee-js SDK.","sidebar":"develop"},"develop/multi-author-blog":{"id":"develop/multi-author-blog","title":"Multi-Author Blog","description":"Build a decentralized multi-author blog on Swarm using linked feeds \u2014 each author has their own feed, and a master index feed ties them together.","sidebar":"develop"},"develop/resources":{"id":"develop/resources","title":"Developer Resources","description":"A curated list of Swarm developer resources \u2014 docs, SDKs, example projects, gateways, network tools, and community links.","sidebar":"develop"},"develop/routing":{"id":"develop/routing","title":"Website Routing","description":"Explains message routing protocols and peer discovery mechanisms in the Swarm network.","sidebar":"develop"},"develop/tools-and-features/ai-agent-skills":{"id":"develop/tools-and-features/ai-agent-skills","title":"AI Agent Skills","description":"Interactive Claude Code skills that guide you through setting up Bee and building on Swarm.","sidebar":"develop"},"develop/tools-and-features/bee-dev-mode":{"id":"develop/tools-and-features/bee-dev-mode","title":"bee-factory","description":"Documentation for bee-factory, the recommended local Swarm development stack for testing and prototyping Bee applications.","sidebar":"develop"},"develop/tools-and-features/bee-js":{"id":"develop/tools-and-features/bee-js","title":"Bee JS","description":"Documentation for the JavaScript library providing programmatic access to Bee node APIs.","sidebar":"develop"},"develop/tools-and-features/buy-a-stamp-batch":{"id":"develop/tools-and-features/buy-a-stamp-batch","title":"Postage Stamp Batches","description":"Guide for purchasing postage stamp batches required for uploading data to Swarm.","sidebar":"develop"},"develop/tools-and-features/cheatsheets":{"id":"develop/tools-and-features/cheatsheets","title":"Swarm Cheatsheet","description":"A dense printable quick-reference for building on Swarm \u2014 what it is, its limits, and curated links to get started.","sidebar":"develop"},"develop/tools-and-features/chunk-types":{"id":"develop/tools-and-features/chunk-types","title":"Chunk Types","description":"Explains different chunk types including content-addressed and single-owner chunks used in Swarm.","sidebar":"develop"},"develop/tools-and-features/erasure-coding":{"id":"develop/tools-and-features/erasure-coding","title":"Erasure Coding","description":"Guide for using optional erasure coding to add redundancy and protection to uploaded data.","sidebar":"develop"},"develop/tools-and-features/feeds":{"id":"develop/tools-and-features/feeds","title":"Feeds","description":"Explains mutable content feeds allowing for updating content while maintaining a static address.","sidebar":"develop"},"develop/tools-and-features/gateway-proxy":{"id":"develop/tools-and-features/gateway-proxy","title":"Gateway Proxy","description":"Tool for proxying and protecting Bee API endpoints with additional security and filtering.","sidebar":"develop"},"develop/tools-and-features/gsoc":{"id":"develop/tools-and-features/gsoc","title":"GSOC","description":"Graffiti Several Owner Chunk (GSOC) \u2014 a many-to-one messaging feature that lets one full Bee node receive messages from many writer nodes.","sidebar":"develop"},"develop/tools-and-features/introduction":{"id":"develop/tools-and-features/introduction","title":"Hosting Your Dapps & Storing Their Data","description":"Swarm\'s developer tools and features for hosting dapps and storing their data, including feeds, stamps, encryption, and messaging.","sidebar":"develop"},"develop/tools-and-features/manifests":{"id":"develop/tools-and-features/manifests","title":"Manifests","description":"Guide for using manifests to organize and address multiple files as a single unit in Swarm.","sidebar":"develop"},"develop/tools-and-features/pinning":{"id":"develop/tools-and-features/pinning","title":"Pinning","description":"Explains pinning mechanism for ensuring data permanence and preventing garbage collection.","sidebar":"develop"},"develop/tools-and-features/pss":{"id":"develop/tools-and-features/pss","title":"PSS Messaging","description":"Guide for using Postal Service over Swarm for private messaging between nodes.","sidebar":"develop"},"develop/tools-and-features/starting-a-test-network":{"id":"develop/tools-and-features/starting-a-test-network","title":"Starting a Private Network","description":"Instructions for setting up local test networks for development and experimentation.","sidebar":"develop"},"develop/tools-and-features/store-with-encryption":{"id":"develop/tools-and-features/store-with-encryption","title":"Store with Encryption","description":"Guide for encrypting data before upload to protect privacy and confidentiality.","sidebar":"develop"},"develop/ultra-light-nodes":{"id":"develop/ultra-light-nodes","title":"Ultra Light Nodes","description":"Guide for running minimal ultra-light nodes with limited functionality and resource requirements."},"develop/upload-and-download":{"id":"develop/upload-and-download","title":"Upload & Download","description":"Comprehensive guide for uploading and downloading files with the Bee API.","sidebar":"develop"},"references/awesome-list":{"id":"references/awesome-list","title":"Awesome Swarm","description":"Curated list of community resources tools and projects related to Swarm.","sidebar":"References"},"references/community":{"id":"references/community","title":"Community","description":"Where to find the Swarm community \u2014 Discord, forums, social channels, and ways to contribute.","sidebar":"References"},"references/fair-data-society":{"id":"references/fair-data-society","title":"Fair Data Society","description":"Overview of Fair Data Society initiatives and collaboration with Swarm.","sidebar":"References"},"references/faq":{"id":"references/faq","title":"FAQ","description":"Answers to common questions about Swarm, the BZZ token, and community channels.","sidebar":"References"},"references/glossary":{"id":"references/glossary","title":"Glossary","description":"Comprehensive glossary of terms and concepts used throughout Swarm documentation.","sidebar":"References"},"references/smart-contracts":{"id":"references/smart-contracts","title":"Smart Contracts","description":"Reference documentation for Swarm smart contracts including addresses and ABIs.","sidebar":"References"},"references/tokens":{"id":"references/tokens","title":"Tokens","description":"Information about xBZZ and xDAI tokens including where to obtain them.","sidebar":"References"}}}}')}}]); \ No newline at end of file diff --git a/assets/js/032f5f3f.b951846c.js b/assets/js/032f5f3f.b951846c.js new file mode 100644 index 000000000..c69ebfe65 --- /dev/null +++ b/assets/js/032f5f3f.b951846c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[2426],{91983(e,t,s){s.r(t),s.d(t,{assets:()=>c,contentTitle:()=>h,default:()=>p,frontMatter:()=>i,metadata:()=>a,toc:()=>d});const a=JSON.parse('{"id":"desktop/postage-stamps","title":"Postage Stamps","description":"Buy and manage postage stamp batches \u2014 the prepaid storage needed to upload \u2014 from the Swarm Desktop app.","source":"@site/docs/desktop/postage-stamps.md","sourceDirName":"desktop","slug":"/desktop/postage-stamps","permalink":"/docs/desktop/postage-stamps","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/desktop/postage-stamps.md","tags":[],"version":"current","frontMatter":{"title":"Postage Stamps","id":"postage-stamps","description":"Buy and manage postage stamp batches \u2014 the prepaid storage needed to upload \u2014 from the Swarm Desktop app."},"sidebar":"desktop","previous":{"title":"Access Content","permalink":"/docs/desktop/access-content"},"next":{"title":"Upload Content","permalink":"/docs/desktop/upload-content"}}');var n=s(74848),o=s(28453);const i={title:"Postage Stamps",id:"postage-stamps",description:"Buy and manage postage stamp batches \u2014 the prepaid storage needed to upload \u2014 from the Swarm Desktop app."},h=void 0,c={},d=[{value:"How to Buy a Postage Stamp Batch",id:"how-to-buy-a-postage-stamp-batch",level:2},{value:"Depth and Amount",id:"depth-and-amount",level:3},{value:"Managing Postage Batches",id:"managing-postage-batches",level:2},{value:"Top-up a Batch",id:"top-up-a-batch",level:2},{value:"Dilute a Batch",id:"dilute-a-batch",level:2}];function r(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",p:"p",strong:"strong",...(0,o.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.admonition,{type:"info",children:(0,n.jsxs)(t.p,{children:["Swarm Desktop must be configured as a light node in order to access stamp related features. If you have not already upgraded from the default ultra-light configuration, complete the upgrade by following the ",(0,n.jsx)(t.em,{children:(0,n.jsx)(t.strong,{children:(0,n.jsx)(t.a,{href:"/docs/desktop/configuration#upgrading-from-an-ultra-light-to-a-light-node",children:"instructions here"})})}),"."]})}),"\n",(0,n.jsx)(t.p,{children:"Postage stamps are required in order to upload data to Swarm. Postage stamps are purchased by interacting with the Swarm postage stamp smart contract on Gnosis Chain. Postage stamps are not purchased one by one, rather they are purchased in batches only."}),"\n",(0,n.jsx)(t.h2,{id:"how-to-buy-a-postage-stamp-batch",children:"How to Buy a Postage Stamp Batch"}),"\n",(0,n.jsxs)(t.p,{children:["Stamps can be purchased by selecting ",(0,n.jsx)(t.em,{children:(0,n.jsx)(t.strong,{children:"Stamps"})})," from the ",(0,n.jsx)(t.em,{children:(0,n.jsx)(t.strong,{children:"Account"})})," tab:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{src:s(4770).A+"",width:"2542",height:"1192"})}),"\n",(0,n.jsxs)(t.p,{children:["And then clicking the ",(0,n.jsx)(t.em,{children:(0,n.jsx)(t.strong,{children:"Buy New Postage Stamp"})})," button:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{src:s(52953).A+"",width:"2560",height:"1167"})}),"\n",(0,n.jsx)(t.h3,{id:"depth-and-amount",children:"Depth and Amount"}),"\n",(0,n.jsxs)(t.p,{children:["Batch ",(0,n.jsx)(t.a,{href:"/docs/concepts/incentives/postage-stamps",children:"depth and amount"})," are the two required parameters which must be set when purchasing a postage stamp batch. Depth determines how many chunks can be stamped with a batch while amount determines how much xBZZ is assigned per chunk."]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{src:s(56048).A+"",width:"2511",height:"1132"})}),"\n",(0,n.jsx)(t.p,{children:"Inputting a value for depth allows you to preview the upper limit of data which can be uploaded for that depth."}),"\n",(0,n.jsxs)(t.p,{children:["Inputting a value for amount and depth together will allow you to also preview the total cost of the postage stamp batch as well as the TTL (time to live - how long the batch can store data on Swarm). Click the ",(0,n.jsx)(t.em,{children:(0,n.jsx)(t.strong,{children:"Buy New Stamp"})})," button to purchase the stamp batch."]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{src:s(98895).A+"",width:"1600",height:"811"})}),"\n",(0,n.jsxs)(t.p,{children:["After purchasing stamps you can view stamp details from the ",(0,n.jsx)(t.em,{children:(0,n.jsx)(t.strong,{children:"Postage Stamps"})})," drop down menu:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{src:s(59878).A+"",width:"2550",height:"1200"})}),"\n",(0,n.jsx)(t.h2,{id:"managing-postage-batches",children:"Managing Postage Batches"}),"\n",(0,n.jsx)(t.p,{children:"After purchasing a postage batch, it is important to monitor the usage and TTL (time to live) of your batch."}),"\n",(0,n.jsx)(t.p,{children:'TTL is shown next to the "Expired in" label in the screenshot below.'}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{src:s(1117).A+"",width:"2550",height:"1200"})}),"\n",(0,n.jsx)(t.p,{children:'For this stamp batch, it has only 6 hours left. Once the TTL has run out completely, the content uploaded using that batch will no longer be kept on Swarm, and will be lost forever. To prevent this from happening, you can "top up" your batch by adding more xBZZ to the batch balance to increase the batch TTL.'}),"\n",(0,n.jsx)(t.h2,{id:"top-up-a-batch",children:"Top-up a Batch"}),"\n",(0,n.jsx)(t.p,{children:'To get started, click on the "Topup and Dilute" button.'}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{src:s(79988).A+"",width:"2559",height:"1228"})}),"\n",(0,n.jsxs)(t.p,{children:['From the "Action" dropdown menu, make sure that you have "Topup" selected and then fill in the ',(0,n.jsx)(t.code,{children:"amount"})," by which you wish to top up the batch. Note that the number entered here is in PLUR (1e-16 xBZZ), and it is the same `amount`` parameter described in the ",(0,n.jsx)(t.a,{href:"/docs/desktop/postage-stamps#depth-and-amount",children:"section above"})," on purchasing postage stamp batches, it is NOT equal to the total amount of xBZZ spent for this top up transaction."]}),"\n",(0,n.jsxs)(t.p,{children:["After inputting the ",(0,n.jsx)(t.code,{children:"amount"}),', click "Topup" to submit the transaction.']}),"\n",(0,n.jsx)(t.p,{children:"After a few moments, you will see a notice that the transaction was successful in a green alert box. A few moments after that, you will see the updated TTL in the stamp details window."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{src:s(5907).A+"",width:"2559",height:"1180"})}),"\n",(0,n.jsx)(t.h2,{id:"dilute-a-batch",children:"Dilute a Batch"}),"\n",(0,n.jsxs)(t.p,{children:["If our batch begins to come close to becoming fully utilised, we can choose to increase the ",(0,n.jsx)(t.code,{children:"depth"}),' of the batch to increase the amount of data it can store. This is referred to as "dilution", since by increasing the ',(0,n.jsx)(t.code,{children:"depth"})," without updating the ",(0,n.jsx)(t.code,{children:"amount"}),", we dilute the amount of xBZZ which is assigned to each chunk. In other words, the dilute transaction will increase the amount which can be uploaded by a batch while also ",(0,n.jsx)(t.em,{children:(0,n.jsx)(t.strong,{children:"decreasing"})})," the TTL. Therefore it is important to both top up and also dilute your stamp batch if you wish to increase the amount stored by the batch without decreasing its TTL."]}),"\n",(0,n.jsx)(t.p,{children:'To get started, click on the "Topup and Dilute" button. Make sure to select "Dilute" from the "Action" dropdown menu.'}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{src:s(67050).A+"",width:"2550",height:"1206"})}),"\n",(0,n.jsxs)(t.p,{children:["From here, we can select the new ",(0,n.jsx)(t.code,{children:"depth"})," value for our postage stamp batch. In this instance, we will increase it from 20 to 21."]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{src:s(98104).A+"",width:"1888",height:"1194"})}),"\n",(0,n.jsx)(t.p,{children:"After a few moments the transaction will be completed and you should see the updated Depth, Capacity, and TTL."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{src:s(98104).A+"",width:"1888",height:"1194"})}),"\n",(0,n.jsx)(t.p,{children:"Note that both the Depth and Capacity have increased while the TTL has decreased."})]})}function p(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(r,{...e})}):r(e)}},4770(e,t,s){s.d(t,{A:()=>a});const a=s.p+"assets/images/stamps1-be73a7b59bf76b2511c4ca63993bc61d.png"},98104(e,t,s){s.d(t,{A:()=>a});const a=s.p+"assets/images/stamps10-6abaa03a34b426c13ef49bfd3712aa58.png"},52953(e,t,s){s.d(t,{A:()=>a});const a=s.p+"assets/images/stamps2-986489e4b038207396f8528ac0555025.png"},56048(e,t,s){s.d(t,{A:()=>a});const a=s.p+"assets/images/stamps3-b35969aa32d1ecea3afc65a25a299daa.png"},98895(e,t,s){s.d(t,{A:()=>a});const a=s.p+"assets/images/stamps4-b5660021acb2a001aa57f81925f2ea05.png"},59878(e,t,s){s.d(t,{A:()=>a});const a=s.p+"assets/images/stamps5-1bbede441d5f8c9669ba28f452938ebf.png"},1117(e,t,s){s.d(t,{A:()=>a});const a=s.p+"assets/images/stamps6-051f17659efb643327d052cb904f5fc8.png"},79988(e,t,s){s.d(t,{A:()=>a});const a=s.p+"assets/images/stamps7-9b2bec4b752210c46554807aabb353ba.png"},5907(e,t,s){s.d(t,{A:()=>a});const a=s.p+"assets/images/stamps8-88a5dd86314e636fe80b3e2205dbce62.png"},67050(e,t,s){s.d(t,{A:()=>a});const a=s.p+"assets/images/stamps9-8230d0859d71f17e33bdc138998fe399.png"},28453(e,t,s){s.d(t,{R:()=>i,x:()=>h});var a=s(96540);const n={},o=a.createContext(n);function i(e){const t=a.useContext(o);return a.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function h(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:i(e.components),a.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0665e5d4.26ea87ad.js b/assets/js/0665e5d4.26ea87ad.js new file mode 100644 index 000000000..50e25157e --- /dev/null +++ b/assets/js/0665e5d4.26ea87ad.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[3108],{80329(e,n,t){t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>a,default:()=>u,frontMatter:()=>s,metadata:()=>i,toc:()=>l});const i=JSON.parse('{"id":"bee/working-with-bee/upgrading-bee","title":"Upgrading Bee","description":"Procedures for safely upgrading Bee to latest versions while preserving keys avoiding round disruption and cashing out rewards.","source":"@site/docs/bee/working-with-bee/upgrade.md","sourceDirName":"bee/working-with-bee","slug":"/bee/working-with-bee/upgrading-bee","permalink":"/docs/bee/working-with-bee/upgrading-bee","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/bee/working-with-bee/upgrade.md","tags":[],"version":"current","frontMatter":{"title":"Upgrading Bee","id":"upgrading-bee","description":"Procedures for safely upgrading Bee to latest versions while preserving keys avoiding round disruption and cashing out rewards."},"sidebar":"bee","previous":{"title":"Backups","permalink":"/docs/bee/working-with-bee/backups"},"next":{"title":"Uninstalling Bee","permalink":"/docs/bee/working-with-bee/uninstalling-bee"}}');var r=t(74848),o=t(28453);const s={title:"Upgrading Bee",id:"upgrading-bee",description:"Procedures for safely upgrading Bee to latest versions while preserving keys avoiding round disruption and cashing out rewards."},a=void 0,d={},l=[{value:"Version compatibility and upgrade path",id:"version-compatibility-and-upgrade-path",level:2},{value:"Ubuntu / Debian",id:"ubuntu--debian",level:3},{value:"Manual Installations",id:"manual-installations",level:3},{value:"Docker",id:"docker",level:3}];function c(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",p:"p",pre:"pre",strong:"strong",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:["It's very important to keep Bee up to date to benefit from security updates and ensure you are able to properly interact with the Swarm network. The ",(0,r.jsx)(n.a,{href:"https://discord.com/channels/799027393297514537/811553590170353685",children:"#node-operators"})," channel is an excellent resource for any of your questions regarding node operation."]}),"\n",(0,r.jsx)(n.admonition,{type:"warning",children:(0,r.jsxs)(n.p,{children:["Bee sure to ",(0,r.jsx)(n.a,{href:"/docs/bee/working-with-bee/backups",children:"back up"})," your keys and ",(0,r.jsx)(n.a,{href:"/docs/bee/working-with-bee/cashing-out",children:"cash out your cheques"})," to ensure your xBZZ is safe before applying updates."]})}),"\n",(0,r.jsx)(n.admonition,{type:"warning",children:(0,r.jsxs)(n.p,{children:["Nodes should not be shut down or updated in the middle of a round they are playing in as it may cause them to lose out on winnings or become frozen. To see if your node is playing the current round, check if ",(0,r.jsx)(n.code,{children:"lastPlayedRound"})," equals ",(0,r.jsx)(n.code,{children:"round"})," in the output from the ",(0,r.jsxs)(n.a,{href:"/api/#tag/RedistributionState/paths/~1redistributionstate/get",children:[(0,r.jsx)(n.code,{children:"/redistributionstate"})," endpoint"]}),". See ",(0,r.jsx)(n.a,{href:"/docs/bee/working-with-bee/staking",children:"staking section"})," for more information on staking and troubleshooting."]})}),"\n",(0,r.jsx)(n.h2,{id:"version-compatibility-and-upgrade-path",children:"Version compatibility and upgrade path"}),"\n",(0,r.jsxs)(n.p,{children:["The Swarm network has a ",(0,r.jsx)(n.strong,{children:"minimum supported Bee version"}),".\nThe minimum supported version is currently ",(0,r.jsx)(n.strong,{children:"v2.8.0"}),", the release that introduced a breaking p2p protocol change, so nodes running an older protocol can no longer connect to the network."]}),"\n",(0,r.jsxs)(n.p,{children:["When upgrading across a breaking protocol change, do not skip the release that introduced it.\nUpgrade ",(0,r.jsx)(n.em,{children:"through"})," that version so any one-time data migrations run while they still exist in the code, since Bee removes old migration and compatibility code once a version is no longer supported."]}),"\n",(0,r.jsxs)(n.p,{children:["Bee v2.8.1 is ",(0,r.jsx)(n.strong,{children:"non-disruptive for nodes already on v2.8.0"}),": it makes no breaking p2p protocol changes, so you can upgrade in place using the steps below."]}),"\n",(0,r.jsx)(n.admonition,{type:"warning",children:(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"If you are running Bee v2.6.0 or older:"})," Bee v2.8.1 removes the last of the v2.6.0 backward-compatibility code, so you cannot upgrade to it directly.\nEither upgrade stepwise (",(0,r.jsx)(n.strong,{children:"v2.6.0 \u2192 v2.8.0 \u2192 v2.8.1"}),") so the data migrations run, or reinstall the node fresh on v2.8.1."]})}),"\n",(0,r.jsx)(n.h3,{id:"ubuntu--debian",children:"Ubuntu / Debian"}),"\n",(0,r.jsx)(n.p,{children:"To upgrade Bee, first stop the Bee service:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo systemctl stop bee\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Next, upgrade the ",(0,r.jsx)(n.code,{children:"bee"})," package:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo apt-get update\nsudo apt-get upgrade bee\n"})}),"\n",(0,r.jsx)(n.p,{children:"And will see output like this after a successful upgrade:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"Reading package lists... Done\nBuilding dependency tree\nReading state information... Done\nCalculating upgrade... Done\nThe following packages will be upgraded:\n bee\n1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.\nNeed to get 0 B/27.2 MB of archives.\nAfter this operation, 73.7 kB of additional disk space will be used.\nDo you want to continue? [Y/n] Y\n(Reading database ... 103686 files and directories currently installed.)\nPreparing to unpack .../archives/bee_2.0.0_amd64.deb ...\nUnpacking bee (2.0.0) over (1.17.3) ...\nSetting up bee (2.0.0) ...\nInstalling new version of config file /etc/default/bee ...\n"})}),"\n",(0,r.jsx)(n.p,{children:"Make sure to pay attention to any prompts, read them carefully, and respond to them with your preference."}),"\n",(0,r.jsx)(n.p,{children:"You may now start your node again:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo systemctl start bee\n"})}),"\n",(0,r.jsx)(n.h3,{id:"manual-installations",children:"Manual Installations"}),"\n",(0,r.jsx)(n.p,{children:"To upgrade your manual installation, simply stop Bee, replace the Bee binary and restart."}),"\n",(0,r.jsx)(n.h3,{id:"docker",children:"Docker"}),"\n",(0,r.jsx)(n.p,{children:"To upgrade your Docker installation, simply increment the version number in your configuration and restart."})]})}function u(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},28453(e,n,t){t.d(n,{R:()=>s,x:()=>a});var i=t(96540);const r={},o=i.createContext(r);function s(e){const n=i.useContext(o);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/06809660.f4620df2.js b/assets/js/06809660.f4620df2.js new file mode 100644 index 000000000..7a0732908 --- /dev/null +++ b/assets/js/06809660.f4620df2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[2034],{74437(e,t,n){n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>d,default:()=>h,frontMatter:()=>l,metadata:()=>s,toc:()=>a});const s=JSON.parse('{"id":"develop/tools-and-features/bee-dev-mode","title":"bee-factory","description":"Documentation for bee-factory, the recommended local Swarm development stack for testing and prototyping Bee applications.","source":"@site/docs/develop/tools-and-features/dev-mode.md","sourceDirName":"develop/tools-and-features","slug":"/develop/tools-and-features/bee-dev-mode","permalink":"/docs/develop/tools-and-features/bee-dev-mode","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/develop/tools-and-features/dev-mode.md","tags":[],"version":"current","frontMatter":{"title":"bee-factory","id":"bee-dev-mode","description":"Documentation for bee-factory, the recommended local Swarm development stack for testing and prototyping Bee applications."},"sidebar":"develop","previous":{"title":"Store with Encryption","permalink":"/docs/develop/tools-and-features/store-with-encryption"},"next":{"title":"Starting a Private Network","permalink":"/docs/develop/tools-and-features/starting-a-test-network"}}');var o=n(74848),r=n(28453);const l={title:"bee-factory",id:"bee-dev-mode",description:"Documentation for bee-factory, the recommended local Swarm development stack for testing and prototyping Bee applications."},d=void 0,c={},a=[{value:"Requirements",id:"requirements",level:2},{value:"Installation",id:"installation",level:2},{value:"Usage",id:"usage",level:2},{value:"Endpoints",id:"endpoints",level:2},{value:"Deployed contracts",id:"deployed-contracts",level:2},{value:"Notes",id:"notes",level:2}];function i(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.code,{children:"bee-factory"})," is the recommended way to run a local Swarm development environment. It spins up 5 Bee nodes connected to a local Anvil blockchain \u2014 all wired together in a single command, with no real xBZZ required."]}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"bee dev"})," command is no longer available. Please use ",(0,o.jsx)(t.code,{children:"bee-factory"})," for local development instead."]})}),"\n",(0,o.jsxs)(t.p,{children:["To test against a real public network instead of a local stack, you can also run a node against the ",(0,o.jsx)(t.a,{href:"/docs/bee/working-with-bee/configuration#sepolia-testnet-configuration",children:"Sepolia testnet"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"requirements",children:"Requirements"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"Node.js \u2265 18"}),"\n",(0,o.jsx)(t.li,{children:"Docker"}),"\n"]}),"\n",(0,o.jsx)(t.h2,{id:"installation",children:"Installation"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-sh",children:"npm install -g @ethersphere/bee-factory\n"})}),"\n",(0,o.jsx)(t.h2,{id:"usage",children:"Usage"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-sh",children:"bee-factory start # Start the stack (uses bundled snapshot for fast boot)\nbee-factory start --fresh # Redeploy contracts from scratch, save new snapshot\nbee-factory start --tag v2.7.1 # Build Bee from a specific git ref (default: master)\n\nbee-factory stop # Stop and remove all containers\n"})}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"--fresh"})," flag redeploys all contracts and saves a new snapshot; subsequent normal starts load from it instantly."]}),"\n",(0,o.jsx)(t.h2,{id:"endpoints",children:"Endpoints"}),"\n",(0,o.jsx)(t.p,{children:"Once running, the nodes are accessible at these addresses:"}),"\n",(0,o.jsxs)(t.table,{children:[(0,o.jsx)(t.thead,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.th,{children:"Node"}),(0,o.jsx)(t.th,{children:"API"}),(0,o.jsx)(t.th,{children:"P2P"})]})}),(0,o.jsxs)(t.tbody,{children:[(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"Queen"}),(0,o.jsx)(t.td,{children:(0,o.jsx)(t.a,{href:"http://localhost:1633",children:"http://localhost:1633"})}),(0,o.jsx)(t.td,{children:(0,o.jsx)(t.a,{href:"http://localhost:1634",children:"http://localhost:1634"})})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"Worker 1"}),(0,o.jsx)(t.td,{children:(0,o.jsx)(t.a,{href:"http://localhost:11633",children:"http://localhost:11633"})}),(0,o.jsx)(t.td,{children:(0,o.jsx)(t.a,{href:"http://localhost:11634",children:"http://localhost:11634"})})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"Worker 2"}),(0,o.jsx)(t.td,{children:(0,o.jsx)(t.a,{href:"http://localhost:21633",children:"http://localhost:21633"})}),(0,o.jsx)(t.td,{children:(0,o.jsx)(t.a,{href:"http://localhost:21634",children:"http://localhost:21634"})})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"Worker 3"}),(0,o.jsx)(t.td,{children:(0,o.jsx)(t.a,{href:"http://localhost:31633",children:"http://localhost:31633"})}),(0,o.jsx)(t.td,{children:(0,o.jsx)(t.a,{href:"http://localhost:31634",children:"http://localhost:31634"})})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"Worker 4"}),(0,o.jsx)(t.td,{children:(0,o.jsx)(t.a,{href:"http://localhost:41633",children:"http://localhost:41633"})}),(0,o.jsx)(t.td,{children:(0,o.jsx)(t.a,{href:"http://localhost:41634",children:"http://localhost:41634"})})]})]})]}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.strong,{children:"Anvil RPC:"})," ",(0,o.jsx)(t.code,{children:"http://localhost:8545"})," (chain ID 1337)"]}),"\n",(0,o.jsx)(t.h2,{id:"deployed-contracts",children:"Deployed contracts"}),"\n",(0,o.jsx)(t.p,{children:"The following contracts are deployed automatically on startup, with addresses printed to the console:"}),"\n",(0,o.jsxs)(t.table,{children:[(0,o.jsx)(t.thead,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.th,{children:"Contract"}),(0,o.jsx)(t.th,{children:"Role"})]})}),(0,o.jsxs)(t.tbody,{children:[(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"BzzToken"}),(0,o.jsx)(t.td,{children:"ERC-20 BZZ token"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"PostageStamp"}),(0,o.jsx)(t.td,{children:"Postage stamp management"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"PriceOracle"}),(0,o.jsx)(t.td,{children:"Postage pricing"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"StakeRegistry"}),(0,o.jsx)(t.td,{children:"Node staking"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"Redistribution"}),(0,o.jsx)(t.td,{children:"Stake redistribution"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"SimpleSwapFactory"}),(0,o.jsx)(t.td,{children:"Swap contract factory"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"SwapPriceOracle"}),(0,o.jsx)(t.td,{children:"Swap pricing oracle"})]})]})]}),"\n",(0,o.jsx)(t.h2,{id:"notes",children:"Notes"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"Each node is funded with 1 ETH and 100 BZZ."}),"\n",(0,o.jsxs)(t.li,{children:["Node password: ",(0,o.jsx)(t.code,{children:"bee-factory"})]}),"\n",(0,o.jsxs)(t.li,{children:["Uses ",(0,o.jsx)(t.a,{href:"https://www.getfoundry.sh/anvil#default-accounts",children:"Foundry test keys"})," \u2014 never use in production."]}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(i,{...e})}):i(e)}},28453(e,t,n){n.d(t,{R:()=>l,x:()=>d});var s=n(96540);const o={},r=s.createContext(o);function l(e){const t=s.useContext(r);return s.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:l(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/098f45c6.2fb9a914.js b/assets/js/098f45c6.2fb9a914.js new file mode 100644 index 000000000..50bc95210 --- /dev/null +++ b/assets/js/098f45c6.2fb9a914.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[2774],{82944(e,n,s){s.r(n),s.d(n,{assets:()=>i,contentTitle:()=>d,default:()=>u,frontMatter:()=>a,metadata:()=>t,toc:()=>h});const t=JSON.parse('{"id":"develop/tools-and-features/chunk-types","title":"Chunk Types","description":"Explains different chunk types including content-addressed and single-owner chunks used in Swarm.","source":"@site/docs/develop/tools-and-features/chunk-types.md","sourceDirName":"develop/tools-and-features","slug":"/develop/tools-and-features/chunk-types","permalink":"/docs/develop/tools-and-features/chunk-types","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/develop/tools-and-features/chunk-types.md","tags":[],"version":"current","frontMatter":{"title":"Chunk Types","id":"chunk-types","description":"Explains different chunk types including content-addressed and single-owner chunks used in Swarm."},"sidebar":"develop","previous":{"title":"Gateway Proxy","permalink":"/docs/develop/tools-and-features/gateway-proxy"},"next":{"title":"Feeds","permalink":"/docs/develop/tools-and-features/feeds"}}');var o=s(74848),r=s(28453);const a={title:"Chunk Types",id:"chunk-types",description:"Explains different chunk types including content-addressed and single-owner chunks used in Swarm."},d=void 0,i={},h=[{value:"Content Addressed Chunks",id:"content-addressed-chunks",level:2},{value:"Trojan Chunks",id:"trojan-chunks",level:2},{value:"Single Owner Chunks",id:"single-owner-chunks",level:2},{value:"Custom Chunk Types",id:"custom-chunk-types",level:2}];function c(e){const n={a:"a",admonition:"admonition",h2:"h2",p:"p",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(n.p,{children:["Swarm is home to many types of chunks, but these can be categoried\ninto 4 broad categories. Read ",(0,o.jsx)(n.a,{href:"https://www.ethswarm.org/the-book-of-swarm-2.pdf",children:"The Book of Swarm"})," for\nmore information on how swarm comes together."]}),"\n",(0,o.jsx)(n.h2,{id:"content-addressed-chunks",children:"Content Addressed Chunks"}),"\n",(0,o.jsx)(n.p,{children:"Content addressed chunks are chunks whose addresses are determined by the BMT hashing algorithm. This means you can be sure that all content addressed chunks content is already verified - no more need to check md5 hashes of your downloaded data!"}),"\n",(0,o.jsx)(n.admonition,{type:"warning",children:(0,o.jsx)(n.p,{children:"To be able trust your data, you must run your own Bee node that automatically verifies data, using gateways puts your trust in the gateway operators."})}),"\n",(0,o.jsx)(n.h2,{id:"trojan-chunks",children:"Trojan Chunks"}),"\n",(0,o.jsxs)(n.p,{children:["Trojan chunks are a special version of content addressed chunks that have been 'mined' so that their natural home is in a particular area of the Swarm. If the destination node is in the right neighborhood, it will be able to receive and decrypt the message. See ",(0,o.jsx)(n.a,{href:"/docs/develop/tools-and-features/pss",children:"PSS"})," for more information, or check out the ",(0,o.jsx)(n.a,{href:"https://bee-js.ethswarm.org/docs/api/classes/Bee/#psssend",children:"bee-js"})," bindings."]}),"\n",(0,o.jsx)(n.h2,{id:"single-owner-chunks",children:"Single Owner Chunks"}),"\n",(0,o.jsxs)(n.p,{children:["Single Owner Chunks are distinct from Trojan and Content Addressed\nChunks and are the only other type of chunk which is allowed in\nSwarm. These chunks represent part of Swarm's address space which is\nreserved just for your personal Ethereum key pair! Here you can write\nwhatever you'd please. Single Owner Chunks are the technology that\npowers Swarm's ",(0,o.jsx)(n.a,{href:"/docs/develop/tools-and-features/feeds",children:"feeds"}),", but they are\ncapable of much more! Look out for more chats about this soon, and for\nmore info read ",(0,o.jsx)(n.a,{href:"https://www.ethswarm.org/the-book-of-swarm-2.pdf",children:"The Book of Swarm"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"custom-chunk-types",children:"Custom Chunk Types"}),"\n",(0,o.jsx)(n.p,{children:"Although all chunks must satisfy the constraints of either being addressed by the BMT hash of their payload, or assigned by the owner of an Ethereum private key pair, so much more is possible. How else can you use the DISC to distribute and store your data? We're excited to see what you come up with! \ud83d\udca1"}),"\n",(0,o.jsxs)(n.p,{children:["Share your creations in the ",(0,o.jsx)(n.a,{href:"https://discord.gg/8SMCfvm3kw",children:"#builders"})," channel of our ",(0,o.jsx)(n.a,{href:"https://discord.gg/kHRyMNpw7t",children:"Discord Server"}),"."]})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},28453(e,n,s){s.d(n,{R:()=>a,x:()=>d});var t=s(96540);const o={},r=t.createContext(o);function a(e){const n=t.useContext(r);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0c14f1c3.3cdfb59c.js b/assets/js/0c14f1c3.3cdfb59c.js new file mode 100644 index 000000000..55eea7587 --- /dev/null +++ b/assets/js/0c14f1c3.3cdfb59c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[9566],{64664(e,n,s){s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>h,frontMatter:()=>a,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"develop/host-your-website","title":"Host a Webpage","description":"Comprehensive guide for uploading and hosting websites on Swarm with content addressing.","source":"@site/docs/develop/host-your-website.md","sourceDirName":"develop","slug":"/develop/host-your-website","permalink":"/docs/develop/host-your-website","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/develop/host-your-website.md","tags":[],"version":"current","frontMatter":{"title":"Host a Webpage","id":"host-your-website","description":"Comprehensive guide for uploading and hosting websites on Swarm with content addressing."},"sidebar":"develop","previous":{"title":"Upload & Download","permalink":"/docs/develop/upload-and-download"},"next":{"title":"Manage Files","permalink":"/docs/develop/files"}}');var i=s(74848),o=s(28453);const a={title:"Host a Webpage",id:"host-your-website",description:"Comprehensive guide for uploading and hosting websites on Swarm with content addressing."},r=void 0,d={},c=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Upload and Access by Hash",id:"upload-and-access-by-hash",level:2},{value:"Advanced: Keep Your URL Stable Across Updates",id:"advanced-keep-your-url-stable-across-updates",level:2},{value:"Example Script",id:"example-script",level:3},{value:"Optional: Connect Site to ENS Domain",id:"optional-connect-site-to-ens-domain",level:2},{value:"Using the Official ENS Guide",id:"using-the-official-ens-guide",level:3},{value:"Swarm-Specific Step",id:"swarm-specific-step",level:3}];function l(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",hr:"hr",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:["In the ",(0,i.jsx)(n.a,{href:"/docs/develop/upload-and-download",children:"Upload and Download"})," guide you uploaded individual files and got back Swarm reference hashes. A website is just a collection of files \u2014 an HTML page, a stylesheet, maybe an image. When you upload a directory, Bee automatically builds a ",(0,i.jsx)(n.a,{href:"/docs/develop/tools-and-features/manifests",children:"manifest"})," that maps each relative path to its content. Set an ",(0,i.jsx)(n.code,{children:"indexDocument"})," and the root URL resolves to your homepage."]}),"\n",(0,i.jsxs)(n.p,{children:["This guide shows how to upload a static site and open it through ",(0,i.jsx)(n.code,{children:"/bzz//"}),"."]}),"\n",(0,i.jsx)(n.admonition,{title:"Example project",type:"info",children:(0,i.jsxs)(n.p,{children:["The example website used in this guide is in ",(0,i.jsx)(n.a,{href:"https://github.com/ethersphere/examples/tree/main/website",children:(0,i.jsx)(n.code,{children:"examples/website"})}),". Clone the repo, copy ",(0,i.jsx)(n.code,{children:".env.example"})," to ",(0,i.jsx)(n.code,{children:".env"}),", fill in your values, and run ",(0,i.jsx)(n.code,{children:"npm install && npm run upload"}),"."]})}),"\n",(0,i.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["A running Bee node (either a ",(0,i.jsx)(n.a,{href:"/docs/bee/installation/quick-start",children:"standard installation"})," or ",(0,i.jsx)(n.a,{href:"/docs/desktop/install",children:"Swarm Desktop"}),")"]}),"\n",(0,i.jsx)(n.li,{children:"A valid postage stamp batch"}),"\n",(0,i.jsxs)(n.li,{children:["Node.js (18+) and ",(0,i.jsx)(n.code,{children:"@ethersphere/bee-js"})," installed in your project"]}),"\n",(0,i.jsxs)(n.li,{children:["Static website files (HTML, CSS, etc.) \u2014 feel free to use the ",(0,i.jsx)(n.a,{href:"https://github.com/ethersphere/examples/tree/main/website",children:"provided example site"})]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"upload-and-access-by-hash",children:"Upload and Access by Hash"}),"\n",(0,i.jsx)(n.p,{children:"Install bee-js:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"npm install @ethersphere/bee-js\n"})}),"\n",(0,i.jsx)(n.p,{children:"Website upload script:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",children:'import { Bee } from "@ethersphere/bee-js";\n\nconst bee = new Bee("http://localhost:1633");\n\nconst batchId = ""; // Replace with your actual postage batch ID\n\nconst result = await bee.uploadFilesFromDirectory(batchId, "./website", {\n indexDocument: "index.html",\n errorDocument: "404.html"\n});\n\nconsole.log("Swarm hash:", result.reference.toHex());\n'})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"Swarm hash: 6c45eae389b3bffce21443316d0bd47c4101545092b7c72c313a33ee7d003475\n"})}),"\n",(0,i.jsx)(n.p,{children:"After running the script, copy the Swarm hash output to the console and then use it to open your Swarm hosted website in the browser:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"http://localhost:1633/bzz//\n"})}),"\n",(0,i.jsx)(n.h2,{id:"advanced-keep-your-url-stable-across-updates",children:"Advanced: Keep Your URL Stable Across Updates"}),"\n",(0,i.jsx)(n.admonition,{title:"Prerequisite",type:"note",children:(0,i.jsxs)(n.p,{children:["This section uses feeds \u2014 the concept of a mutable pointer on top of Swarm's immutable storage. Feeds are explained from scratch in the ",(0,i.jsx)(n.a,{href:"/docs/develop/dynamic-content",children:"Dynamic Content"})," guide. You can complete this guide without this section and come back after you have worked through Dynamic Content."]})}),"\n",(0,i.jsx)(n.p,{children:"Every time you re-upload a site to Swarm, you get a new reference hash. If you want a single stable URL that always points to the latest version of your site \u2014 useful for ENS integration or sharing a permanent link \u2014 publish each upload as a feed entry and share the feed manifest hash instead of the content hash."}),"\n",(0,i.jsxs)(n.admonition,{type:"tip",children:[(0,i.jsx)(n.p,{children:"You will need a publisher key to use for setting up your website feed."}),(0,i.jsxs)(n.p,{children:["You can use the ",(0,i.jsx)(n.code,{children:"PrivateKey"})," class to generate a dedicated publisher key:"]}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",children:"const crypto = require('crypto');\nconst { PrivateKey } = require('@ethersphere/bee-js');\n\n// Generate 32 random bytes and construct a private key\nconst hexKey = '0x' + crypto.randomBytes(32).toString('hex');\nconst privateKey = new PrivateKey(hexKey);\n\nconsole.log('Private key:', privateKey.toHex());\nconsole.log('Public address:', privateKey.publicKey().address().toHex());\n"})}),(0,i.jsx)(n.p,{children:"Example output:"}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"Private key: 634fb5a872396d9693e5c9f9d7233cfa93f395c093371017ff44aa9ae6564cdd\nPublic address: 8d3766440f0d7b949a5e32995d09619a7f86e632\n"})}),(0,i.jsx)(n.p,{children:"Store this key securely."}),(0,i.jsx)(n.p,{children:"Anyone with access to it can publish to your feed."}),(0,i.jsx)(n.p,{children:(0,i.jsx)(n.em,{children:"It is recommended to use a separate publishing key for each feed."})})]}),"\n",(0,i.jsx)(n.h3,{id:"example-script",children:"Example Script"}),"\n",(0,i.jsx)(n.admonition,{type:"tip",children:(0,i.jsxs)(n.p,{children:['The script below refers to some core feed concepts such as the feed "topic" and "writer". To learn more about these concepts and feeds in general, refer to the ',(0,i.jsx)(n.a,{href:"https://bee-js.ethswarm.org/docs/soc-and-feeds/#feeds",children:"bee-js documentation"}),"."]})}),"\n",(0,i.jsx)(n.p,{children:"The script performs these steps:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Connects to your Bee node"})," and loads your postage batch + publisher private key."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Creates a feed topic and writer"})," for publishing website updates."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsxs)(n.strong,{children:["Uploads the ",(0,i.jsx)(n.code,{children:"./website"})," directory"]})," to Swarm and logs the resulting content hash."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Publishes that hash to the feed"})," so it becomes the latest feed entry."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Creates a feed manifest"})," and logs its reference \u2014 this is the permanent hash you use for ENS or stable URLs."]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",children:'import { Bee, Topic, PrivateKey } from "@ethersphere/bee-js";\nconst bee = new Bee("http://localhost:1633");\nconst batchId = "" // Replace with your batch id\nconst privateKey = new PrivateKey(""); // Replace with your publisher private key\nconst owner = privateKey.publicKey().address();\n\n// Upload and Create Feed Manifest\n\nconst topic = Topic.fromString("website");\nconst writer = bee.makeFeedWriter(topic, privateKey);\n\nconst upload = await bee.uploadFilesFromDirectory(batchId, "./website", {\n indexDocument: "index.html",\n errorDocument: "404.html"\n});\n\nconsole.log("Website Swarm Hash:", upload.reference.toHex())\n\nawait writer.uploadReference(batchId, upload.reference);\n\nconst manifestRef = await bee.createFeedManifest(batchId, topic, owner);\nconsole.log("Feed Manifest:", manifestRef.toHex());\n'})}),"\n",(0,i.jsx)(n.p,{children:'Upon the successful execution of the script, the hash of the uploaded website will be logged along feed manifest hash. Copy the "Feed Manifest" hash to be used in the next step:'}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"Website Swarm Hash: 6c45eae389b3bffce21443316d0bd47c4101545092b7c72c313a33ee7d003475\nFeed Manifest: caa414d70028d14b0bdd9cbab18d1c1a0a3bab1b20a56cf06937a6b20c7e7377\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Follow the ",(0,i.jsx)(n.a,{href:"https://support.ens.domains/en/articles/12275979-how-do-i-add-a-decentralised-website-to-my-ens-name",children:"official ENS guide"})," for registering a content hash adding your content hash in the ENS UI (see ",(0,i.jsx)(n.a,{href:"#optional-connect-site-to-ens-domain",children:"guide"}),"). However, rather than registering your website's hash directly, register the feed manifest hash we saved from the previous step from our example above."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"bzz://\n"})}),"\n",(0,i.jsx)(n.p,{children:"Future updates just re-run:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",children:"await writer.upload(batchId, newUpload.reference);\n"})}),"\n",(0,i.jsx)(n.p,{children:"Your ENS domain will always point to the latest upload via the feed manifest."}),"\n",(0,i.jsxs)(n.p,{children:["You\u2019ve now got a programmatic way to deploy and update your Swarm-hosted site with ENS support using ",(0,i.jsx)(n.code,{children:"bee-js"}),"!"]}),"\n",(0,i.jsx)(n.h2,{id:"optional-connect-site-to-ens-domain",children:"Optional: Connect Site to ENS Domain"}),"\n",(0,i.jsx)(n.p,{children:"Once your site is uploaded to Swarm, you can make it accessible via an easy to remember ENS domain name rather than its Swarm hash:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"https://yourname.eth.limo/\nhttps://yourname.bzz.link/\n"})}),"\n",(0,i.jsx)(n.p,{children:"or through your own node:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"http://localhost:1633/bzz/yourname.eth/\n"})}),"\n",(0,i.jsx)(n.h3,{id:"using-the-official-ens-guide",children:"Using the Official ENS Guide"}),"\n",(0,i.jsxs)(n.p,{children:["ENS provides a clear walkthrough with screenshots showing how to add a content hash to your domain with their ",(0,i.jsx)(n.a,{href:"https://app.ens.domains/",children:"easy to use app"}),":"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"https://support.ens.domains/en/articles/12275979-how-do-i-add-a-decentralised-website-to-my-ens-name",children:"How to add a Decentralized website to an ENS name"})}),"\n",(0,i.jsx)(n.p,{children:"The guide covers:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Opening your ENS domain in the ENS Manager"}),"\n",(0,i.jsx)(n.li,{children:"Navigating to the Records tab"}),"\n",(0,i.jsx)(n.li,{children:"Adding a Content Hash"}),"\n",(0,i.jsx)(n.li,{children:"Confirming the transaction"}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"swarm-specific-step",children:"Swarm-Specific Step"}),"\n",(0,i.jsx)(n.p,{children:"When you reach Step 2 in the ENS guide (\u201cAdd content hash record\u201d), enter your Swarm reference in the following format:"}),"\n",(0,i.jsx)(n.admonition,{type:"tip",children:(0,i.jsxs)(n.p,{children:["For the content hash, you can use a Swarm-hosted website's hash directly, or \u2014 as recommended in the ",(0,i.jsx)(n.a,{href:"#advanced-keep-your-url-stable-across-updates",children:"Advanced: Keep Your URL Stable Across Updates"})," section above \u2014 publish your site to a feed and use the feed manifest hash instead. By using a feed manifest as the content hash, you can avoid repeated ENS registry updates."]})}),"\n",(0,i.jsx)(n.admonition,{title:"If ENS does not resolve on localhost",type:"tip",children:(0,i.jsxs)(n.p,{children:["If the site doesn't load from ",(0,i.jsx)(n.code,{children:"http://localhost:1633/bzz/yourname.eth/"}),", the issue is usually the ENS resolver RPC. Free public endpoints like ",(0,i.jsx)(n.code,{children:"https://cloudflare-eth.com"})," ",(0,i.jsx)(n.a,{href:"https://developers.cloudflare.com/web3/reference/migration-guide/?utm_source=chatgpt.com",children:"may not resolve reliably"}),". Reliable alternatives include ",(0,i.jsx)(n.code,{children:"https://mainnet.infura.io/v3/"})," and ",(0,i.jsx)(n.code,{children:"https://eth-mainnet.public.blastapi.io"}),", or run your own Ethereum node."]})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"bzz://\n"})}),"\n",(0,i.jsx)(n.p,{children:"Example:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"bzz://cf50756e6115445fd283691673fa4ad2204849558a6f3b3f4e632440f1c3ab7c\n"})}),"\n",(0,i.jsx)(n.p,{children:"This works across:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"eth.limo and bzz.link"}),"\n",(0,i.jsx)(n.li,{children:"localhost (with a compatible RPC)"}),"\n",(0,i.jsx)(n.li,{children:"any ENS-compatible Swarm resolver"}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["You do not need to encode the hash or use any additional tools. ",(0,i.jsx)(n.code,{children:"bzz://"})," is sufficient."]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Next:"})," ",(0,i.jsx)(n.a,{href:"/docs/develop/files",children:"Manage Files"})," \u2014 learn how manifests provide filesystem-like path mapping and how to add, move, or remove files without re-uploading everything."]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},28453(e,n,s){s.d(n,{R:()=>a,x:()=>r});var t=s(96540);const i={},o=t.createContext(i);function a(e){const n=t.useContext(o);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1045.74875b87.js b/assets/js/1045.74875b87.js new file mode 100644 index 000000000..7ff0d4d59 --- /dev/null +++ b/assets/js/1045.74875b87.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[1045],{91045(t,e,n){n.d(e,{diagram:()=>ht});var i=n(5637),r=n(16459),a=n(76385),s=n(31293),o=n(86827),c=n(70451),l=n(3219),h=n(78041),d=n(75263),u=function(){var t=(0,o.K)(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[6,11,13,14,15,17,19,20,23,24],n=[1,12],i=[1,13],r=[1,14],a=[1,15],s=[1,16],c=[1,19],l=[1,20],h={trace:(0,o.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:(0,o.K)(function(t,e,n,i,r,a,s){var o=a.length-1;switch(r){case 1:return a[o-1];case 3:i.setDirection("LR");break;case 4:i.setDirection("TD");break;case 5:case 9:case 10:this.$=[];break;case 6:a[o-1].push(a[o]),this.$=a[o-1];break;case 7:case 8:this.$=a[o];break;case 11:i.getCommonDb().setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 12:this.$=a[o].trim(),i.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=a[o].trim(),i.getCommonDb().setAccDescription(this.$);break;case 15:i.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 18:i.addTask(a[o],0,""),this.$=a[o];break;case 19:i.addEvent(a[o].substr(2)),this.$=a[o]}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},t(e,[2,5],{5:6}),t(e,[2,2]),t(e,[2,3]),t(e,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:i,17:r,19:a,20:s,21:17,22:18,23:c,24:l},t(e,[2,10],{1:[2,1]}),t(e,[2,6]),{12:21,14:n,15:i,17:r,19:a,20:s,21:17,22:18,23:c,24:l},t(e,[2,8]),t(e,[2,9]),t(e,[2,11]),{16:[1,22]},{18:[1,23]},t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,7]),t(e,[2,12]),t(e,[2,13])],defaultActions:{},parseError:(0,o.K)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,o.K)(function(t){var e=this,n=[0],i=[],r=[null],a=[],s=this.table,c="",l=0,h=0,d=0,u=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;a.push(f);var m=p.options&&p.options.ranges;function x(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.K)(function(t){n.length=n.length-2*t,r.length=r.length-t,a.length=a.length-t},"popStack"),(0,o.K)(x,"lex");for(var b,k,w,_,v,$,K,S,E,R={};;){if(w=n[n.length-1],this.defaultActions[w]?_=this.defaultActions[w]:(null==b&&(b=x()),_=s[w]&&s[w][b]),void 0===_||!_.length||!_[0]){var T="";for($ in E=[],s[w])this.terminals_[$]&&$>2&&E.push("'"+this.terminals_[$]+"'");T=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(T,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:f,expected:E})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(_[0]){case 1:n.push(b),r.push(p.yytext),a.push(p.yylloc),n.push(_[1]),b=null,k?(b=k,k=null):(h=p.yyleng,c=p.yytext,l=p.yylineno,f=p.yylloc,d>0&&d--);break;case 2:if(K=this.productions_[_[1]][1],R.$=r[r.length-K],R._$={first_line:a[a.length-(K||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(K||1)].first_column,last_column:a[a.length-1].last_column},m&&(R._$.range=[a[a.length-(K||1)].range[0],a[a.length-1].range[1]]),void 0!==(v=this.performAction.apply(R,[c,h,l,g.yy,_[1],r,a].concat(u))))return v;K&&(n=n.slice(0,-1*K*2),r=r.slice(0,-1*K),a=a.slice(0,-1*K)),n.push(this.productions_[_[1]][0]),r.push(R.$),a.push(R._$),S=s[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0},"parse")},d=function(){return{EOF:1,parseError:(0,o.K)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,o.K)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,o.K)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,o.K)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,o.K)(function(){return this._more=!0,this},"more"),reject:(0,o.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,o.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,o.K)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,o.K)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,o.K)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,o.K)(function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in r)this[a]=r[a];return!1}return!1},"test_match"),next:(0,o.K)(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),a=0;ae[0].length)){if(e=n,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,o.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,o.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,o.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,o.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,o.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,o.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,o.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,o.K)(function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 13;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin("acc_title"),15;case 10:return this.popState(),"acc_title_value";case 11:return this.begin("acc_descr"),17;case 12:return this.popState(),"acc_descr_value";case 13:this.begin("acc_descr_multiline");break;case 14:this.popState();break;case 15:return"acc_descr_multiline_value";case 16:return 20;case 17:return 24;case 18:return 23;case 19:return 6;case 20:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline[ \t]+LR\b)/i,/^(?:timeline[ \t]+TD\b)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[14,15],inclusive:!1},acc_descr:{rules:[12],inclusive:!1},acc_title:{rules:[10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,13,16,17,18,19,20],inclusive:!0}}}}();function u(){this.yy={}}return h.lexer=d,(0,o.K)(u,"Parser"),u.prototype=h,h.Parser=u,new u}();u.parser=u;var p=u,g={};(0,o.V)(g,{addEvent:()=>T,addSection:()=>K,addTask:()=>R,addTaskOrg:()=>I,clear:()=>_,default:()=>L,getCommonDb:()=>w,getDirection:()=>$,getSections:()=>S,getTasks:()=>E,setDirection:()=>v});var y="",f=0,m="LR",x=[],b=[],k=[],w=(0,o.K)(()=>a.Wt,"getCommonDb"),_=(0,o.K)(function(){x.length=0,b.length=0,y="",k.length=0,m="LR",(0,a.IU)()},"clear"),v=(0,o.K)(function(t){m=t},"setDirection"),$=(0,o.K)(function(){return m},"getDirection"),K=(0,o.K)(function(t){y=t,x.push(t)},"addSection"),S=(0,o.K)(function(){return x},"getSections"),E=(0,o.K)(function(){let t=M();let e=0;for(;!t&&e<100;)t=M(),e++;return b.push(...k),b},"getTasks"),R=(0,o.K)(function(t,e,n){const i={id:f++,section:y,type:y,task:t,score:e||0,events:n?[n]:[]};k.push(i)},"addTask"),T=(0,o.K)(function(t){k.find(t=>t.id===f-1).events.push(t)},"addEvent"),I=(0,o.K)(function(t){const e={section:y,type:y,description:t,task:t,classes:[]};b.push(e)},"addTaskOrg"),M=(0,o.K)(function(){const t=(0,o.K)(function(t){return k[t].processed},"compileTask");let e=!0;for(const[n,i]of k.entries())t(n),e=e&&i.processed;return e},"compileTasks"),L={clear:_,getCommonDb:w,getDirection:$,setDirection:v,addSection:K,getSections:S,getTasks:E,addTask:R,addTaskOrg:I,addEvent:T},H=0,C=(0,o.K)(function(t,e){const n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},"drawRect"),N=(0,o.K)(function(t,e){const n=15,i=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",n).attr("stroke-width",2).attr("overflow","visible"),r=t.append("g");function a(t){const i=(0,c.JLW)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function s(t){const i=(0,c.JLW)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function l(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return r.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),(0,o.K)(a,"smile"),(0,o.K)(s,"sad"),(0,o.K)(l,"ambivalent"),e.score>3?a(r):e.score<3?s(r):l(r),i},"drawFace"),D=(0,o.K)(function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},"drawCircle"),A=(0,o.K)(function(t,e){const n=e.text.replace(//gi," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),void 0!==e.class&&i.attr("class",e.class);const r=i.append("tspan");return r.attr("x",e.x+2*e.textMargin),r.text(n),i},"drawText"),O=(0,o.K)(function(t,e){function n(t,e,n,i,r){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-r)+" "+(t+n-1.2*r)+","+(e+i)+" "+t+","+(e+i)}(0,o.K)(n,"genPoints");const i=t.append("polygon");i.attr("points",n(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,A(t,e)},"drawLabel"),B=(0,o.K)(function(t,e,n){const i=t.append("g"),r=F();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=n.width,r.height=n.height,r.class="journey-section section-type-"+e.num,r.rx=3,r.ry=3,C(i,r),V(n)(e.text,i,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+e.num},n,e.colour)},"drawSection"),P=-1,W=(0,o.K)(function(t,e,n,i){const r=e.x+n.width/2,a=t.append("g");P++;a.append("line").attr("id",i+"-task"+P).attr("x1",r).attr("y1",e.y).attr("x2",r).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),N(a,{cx:r,cy:300+30*(5-e.score),score:e.score});const s=F();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=n.width,s.height=n.height,s.class="task task-type-"+e.num,s.rx=3,s.ry=3,C(a,s),V(n)(e.task,a,s.x,s.y,s.width,s.height,{class:"task"},n,e.colour)},"drawTask"),j=(0,o.K)(function(t,e){C(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),z=(0,o.K)(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),F=(0,o.K)(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),V=function(){function t(t,e,n,r,a,s,o,c){i(e.append("text").attr("x",n+a/2).attr("y",r+s/2+5).style("font-color",c).style("text-anchor","middle").text(t),o)}function e(t,e,n,r,a,s,o,c,l){const{taskFontSize:h,taskFontFamily:d}=c,u=t.split(//gi);for(let p=0;p)/).reverse(),r=[],a=n.attr("y"),s=parseFloat(n.attr("dy")),o=n.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",s+"em");for(let c=0;ce||"
"===t)&&(r.pop(),o.text(r.join(" ").trim()),r="
"===t?[""]:[t],o=n.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(t))})}(0,o.K)(U,"wrap");var Z=(0,o.K)(function(t,e,n,i,r,a=!1){const{theme:s,look:o}=i,l=s?.includes("redux"),h=n%(i?.themeVariables?.THEME_COLOR_LIMIT??12)-1,d=t.append("g");e.section=h,d.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+h);const u=d.append("g"),p=d.append("g"),g=p.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(U,e.width).node().getBBox(),y=i.fontSize?.replace?i.fontSize.replace("px",""):i.fontSize;if(e.height=g.height+1.1*y*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,p.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),l&&p.attr("transform",`translate(${e.width/2}, ${a?e.padding/2+3:e.padding})`),J(u,e,h,r,i),"neo"===o&&(d.attr("data-look","neo"),l)){const e=s.includes("dark"),n=t.node()?.ownerSVGElement??t.node(),i=(0,c.Ltv)(n),r=i.attr("id")??"",a=r?`${r}-drop-shadow`:"drop-shadow";if(i.select(`#${a}`).empty()){const t=i.select("defs");(t.empty()?i.append("defs"):t).append("filter").attr("id",a).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity",e?"0.2":"0.06").attr("flood-color",e?"#FFFFFF":"#000000")}}return e},"drawNode"),q=(0,o.K)(function(t,e,n){const i=t.append("g"),r=i.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(U,e.width).node().getBBox(),a=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return i.remove(),r.height+1.1*a*.5+e.padding},"getVirtualNodeHeight"),J=(0,o.K)(function(t,e,n,i,r){const{theme:a}=r,s=a?.includes("redux")?0:5,o=s>0?`M0 ${e.height-5} v${10-e.height} q0,-${s},${s},-${s} h${e.width-10} q${s},0,${s},${s} v${e.height-5} H0 Z`:`M0 ${e.height-5} v${-(e.height-5)} h${e.width} v${e.height} H0 Z`;t.append("path").attr("id",i+"-node-"+H++).attr("class","node-bkg node-"+e.type).attr("d",o),a?.includes("redux")||t.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)},"defaultBkg"),Y={drawRect:C,drawCircle:D,drawSection:B,drawText:A,drawLabel:O,drawTask:W,drawBackgroundRect:j,getTextObj:z,getNoteRect:F,initGraphics:G,drawNode:Z,getVirtualNodeHeight:q},X=(0,o.K)(function(t,e,n,i){const r=(0,a.D7)(),{look:o,theme:l,themeVariables:h}=r,{useGradient:d,gradientStart:u,gradientStop:p}=h,g=r.timeline?.leftMargin??50;s.R.debug("timeline",i.db);const y=r.securityLevel;let f;"sandbox"===y&&(f=(0,c.Ltv)("#i"+e));const m=("sandbox"===y?(0,c.Ltv)(f.nodes()[0].contentDocument.body):(0,c.Ltv)("body")).select("#"+e);m.append("g");const x=i.db.getTasks(),b=i.db.getCommonDb().getDiagramTitle();s.R.debug("task",x),Y.initGraphics(m,e);const k=i.db.getSections();s.R.debug("sections",k);let w=0,_=0,v=0,$=0,K=50+g,S=50;$=50;let E=0,R=!0;k.forEach(function(t){const e={number:E,descr:t,section:E,width:150,padding:20,maxHeight:w},n=Y.getVirtualNodeHeight(m,e,r);s.R.debug("sectionHeight before draw",n),w=Math.max(w,n+20)});let T=0,I=0;s.R.debug("tasks.length",x.length);for(const[a,c]of x.entries()){const t={number:a,descr:c,section:c.section,width:150,padding:20,maxHeight:_},e=Y.getVirtualNodeHeight(m,t,r);s.R.debug("taskHeight before draw",e),_=Math.max(_,e+20),T=Math.max(T,c.events.length);let n=0;for(const i of c.events){const t={descr:i,section:c.section,number:c.section,width:150,padding:20,maxHeight:50};n+=Y.getVirtualNodeHeight(m,t,r)}c.events.length>0&&(n+=10*(c.events.length-1)),I=Math.max(I,n)}s.R.debug("maxSectionHeight before draw",w),s.R.debug("maxTaskHeight before draw",_),k&&k.length>0?k.forEach(t=>{const n=x.filter(e=>e.section===t),i={number:E,descr:t,section:E,width:200*Math.max(n.length,1)-50,padding:20,maxHeight:w};s.R.debug("sectionNode",i);const a=m.append("g"),o=Y.drawNode(a,i,E,r,e);s.R.debug("sectionNode output",o),a.attr("transform",`translate(${K}, 50)`),S+=w+50,n.length>0&&Q(m,n,E,K,S,_,r,T,I,w,!1,e),K+=200*Math.max(n.length,1),S=50,E++}):(R=!1,Q(m,x,E,K,S,_,r,T,I,w,!0,e));const M=m.node().getBBox();s.R.debug("bounds",M),b&&m.append("text").text(b).attr("x","neo"===o?2*M.x+g:M.width/2-g).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),v=R?w+_+150:_+100;if(m.append("g").attr("class","lineWrapper").append("line").attr("x1",g).attr("y1",v).attr("x2",M.width+3*g).attr("y2",v).attr("stroke-width",4).attr("stroke","black").attr("marker-end",`url(#${e}-arrowhead)`),"neo"===o&&d&&"neutral"!==l){const t=m.select("defs"),e=(t.empty()?m.append("defs"):t).append("linearGradient").attr("id",m.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");e.append("stop").attr("offset","0%").attr("stop-color",u).attr("stop-opacity",1),e.append("stop").attr("offset","100%").attr("stop-color",p).attr("stop-opacity",1)}(0,a.ot)(void 0,m,r.timeline?.padding??50,r.timeline?.useMaxWidth??!1)},"draw"),Q=(0,o.K)(function(t,e,n,i,r,a,o,c,l,h,d,u){for(const p of e){const e={descr:p.task,section:n,number:n,width:150,padding:20,maxHeight:a};s.R.debug("taskNode",e);const c=t.append("g").attr("class","taskWrapper"),h=Y.drawNode(c,e,n,o,u).height;if(s.R.debug("taskHeight after draw",h),c.attr("transform",`translate(${i}, ${r})`),a=Math.max(a,h),p.events){const e=t.append("g").attr("class","lineWrapper");let s=a;r+=100,s+=tt(t,p.events,n,i,r,o,u),r-=100,e.append("line").attr("x1",i+95).attr("y1",r+a).attr("x2",i+95).attr("y2",r+a+100+l+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end",`url(#${u}-arrowhead)`).attr("stroke-dasharray","5,5")}i+=200,d&&!o.timeline?.disableMulticolor&&n++}r-=10},"drawTasks"),tt=(0,o.K)(function(t,e,n,i,r,a,o){let c=0;const l=r;r+=100;for(const h of e){const e={descr:h,section:n,number:n,width:150,padding:20,maxHeight:50};s.R.debug("eventNode",e);const l=t.append("g").attr("class","eventWrapper"),d=Y.drawNode(l,e,n,a,o,!0).height;c+=d,l.attr("transform",`translate(${i}, ${r})`),r=r+10+d}return r=l,c},"drawEvents"),et={setConf:(0,o.K)(()=>{},"setConf"),draw:X},nt=200,it=(0,o.K)(function(t,e,n,o){const c=(0,a.D7)(),l=c.timeline?.leftMargin??50;s.R.debug("timeline",o.db);const h=(0,i.D)(e);h.append("g");const d=o.db.getTasks(),u=o.db.getCommonDb().getDiagramTitle();s.R.debug("task",d),Y.initGraphics(h);const p=o.db.getSections();s.R.debug("sections",p);let g=0,y=0;const f=50+l;let m=50;const x=m,b=230,k=f+b;let w=0;const _=p&&p.length>0,v=_?k:f+b,$=Math.max(50,580);p.forEach(function(t){const e={number:w,descr:t,section:w,width:$,padding:5,maxHeight:g},n=Y.getVirtualNodeHeight(h,e,c);s.R.debug("sectionHeight before draw",n),g=Math.max(g,n)});let K=0;s.R.debug("tasks.length",d.length);for(const[i,r]of d.entries()){const t={number:i,descr:r,section:r.section,width:nt,padding:5,maxHeight:y},e=Y.getVirtualNodeHeight(h,t,c);s.R.debug("taskHeight before draw",e),y=Math.max(y,e);let n=0;for(const i of r.events){const t={descr:i,section:r.section,number:r.section,width:300,padding:5,maxHeight:50};n+=Y.getVirtualNodeHeight(h,t,c)}r.events.length>0&&(n+=10*(r.events.length-1)),K=Math.max(K,n)+0}s.R.debug("maxSectionHeight before draw",g),s.R.debug("maxTaskHeight before draw",y);const S=Math.max(y,K)+30;_?p.forEach(t=>{const e=d.filter(e=>e.section===t),n={number:w,descr:t,section:w,width:$,padding:5,maxHeight:g};s.R.debug("sectionNode",n);const i=h.append("g"),r=Y.drawNode(i,n,w,c);s.R.debug("sectionNode output",r);const a=v-b;i.attr("transform",`translate(${a}, ${m})`);const o=m+r.height+20;e.length>0&&rt(h,e,w,v,o,y,c,S,!1);const l=e.length,u=r.height+20+S*Math.max(l,1)-(l>0?60:0);m+=u,w++}):rt(h,d,w,v,m,y,c,S,!0);let E=h.node()?.getBBox();if(!E)throw new Error("bbox not found");if(s.R.debug("bounds",E),u){if(h.append("text").text(u).attr("x",E.width/2-l).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),E=h.node()?.getBBox(),!E)throw new Error("bbox not found");s.R.debug("bounds after title",E)}const[R]=(0,r.I5)(c.fontSize),T=2*(R??16),I=.5*(R??16)+20,M=h.append("g").attr("class","lineWrapper");M.append("line").attr("x1",v).attr("y1",x-T).attr("x2",v).attr("y2",E.y+E.height+I).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),M.lower(),(0,a.ot)(void 0,h,c.timeline?.padding??50,c.timeline?.useMaxWidth??!1)},"draw"),rt=(0,o.K)(function(t,e,n,i,r,a,o,c,l){for(const h of e){const e={descr:h.task,section:n,number:n,width:nt,padding:5,maxHeight:a};s.R.debug("taskNode",e);const d=t.append("g").attr("class","taskWrapper"),u=Y.drawNode(d,e,n,o),p=u.height;s.R.debug("taskHeight after draw",p);const g=i-20-u.width;if(d.attr("transform",`translate(${g}, ${r})`),a=Math.max(a,p),h.events&&h.events.length>0){const e=r,a=i+50;at(t,h.events,n,i,a,e,o)}r+=c,l&&!o.timeline?.disableMulticolor&&n++}},"drawTasks"),at=(0,o.K)(function(t,e,n,i,r,a,o){let c=a;for(const l of e){const e={descr:l,section:n,number:n,width:300,padding:5,maxHeight:0};s.R.debug("eventNode",e);const a=t.append("g").attr("class","eventWrapper"),h=Y.drawNode(a,e,n,o).height;a.attr("transform",`translate(${r}, ${c})`);const d=c+h/2;t.append("g").attr("class","lineWrapper").append("line").attr("x1",i).attr("y1",d).attr("x2",r).attr("y2",d).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5"),c=c+h+10}return c-a},"drawEvents"),st={setConf:(0,o.K)(()=>{},"setConf"),draw:it},ot=(0,o.K)(t=>{const{theme:e}=(0,a.zj)(),n=e?.includes("dark"),i=e?.includes("color"),r=t.svgId?.replace(/^#/,"")??"",s=r?`url(#${r}-drop-shadow)`:t.dropShadow??"none";let o="";for(let a=0;a{let e="";for(let n=0;n{const{theme:e}=(0,a.zj)(),n=e?.includes("redux"),i="neutral"===e,r=t.svgId?.replace(/^#/,"")??"";let s="";if(t.useGradient&&r&&t.THEME_COLOR_LIMIT&&!i)for(let a=0;a{},"setConf"),draw:(0,o.K)((t,e,n,i)=>"TD"===(i?.db?.getDirection?.()??"LR")?st.draw(t,e,n,i):et.draw(t,e,n,i),"draw")},parser:p,styles:lt}}}]); \ No newline at end of file diff --git a/assets/js/1070.a38576e2.js b/assets/js/1070.a38576e2.js new file mode 100644 index 000000000..dabe34417 --- /dev/null +++ b/assets/js/1070.a38576e2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[1070],{1070(t,e,n){n.d(e,{diagram:()=>Ht});var s=n(338),r=n(79515),a=(n(44505),n(72379),n(58962),n(16459)),i=n(76385),o=n(31293),l=n(86827),h=n(70451),d=function(){var t=(0,l.K)(function(t,e,n,s){for(n=n||{},s=t.length;s--;n[t[s]]=e);return n},"o"),e=[1,24],n=[1,25],s=[1,26],r=[1,27],a=[1,28],i=[1,63],o=[1,64],h=[1,65],d=[1,66],u=[1,67],p=[1,68],y=[1,69],b=[1,29],_=[1,30],f=[1,31],g=[1,32],m=[1,33],x=[1,34],E=[1,35],S=[1,36],C=[1,37],k=[1,38],T=[1,39],w=[1,40],R=[1,41],v=[1,42],O=[1,43],P=[1,44],D=[1,45],N=[1,46],A=[1,47],K=[1,48],L=[1,50],I=[1,51],M=[1,52],$=[1,53],B=[1,54],j=[1,55],Y=[1,56],U=[1,57],F=[1,58],z=[1,59],X=[1,60],q=[14,42],W=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],H=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Q=[1,82],V=[1,83],G=[1,84],Z=[1,85],J=[12,14,42],tt=[12,14,33,42],et=[12,14,33,42,76,77,79,80],nt=[12,33],st=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],rt={trace:(0,l.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:(0,l.K)(function(t,e,n,s,r,a,i){var o=a.length-1;switch(r){case 3:s.setDirection("TB");break;case 4:s.setDirection("BT");break;case 5:s.setDirection("RL");break;case 6:s.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:s.setC4Type(a[o-3]);break;case 19:s.setTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 20:s.setAccDescription(a[o].substring(15)),this.$=a[o].substring(15);break;case 21:this.$=a[o].trim(),s.setTitle(this.$);break;case 22:case 23:this.$=a[o].trim(),s.setAccDescription(this.$);break;case 28:a[o].splice(2,0,"ENTERPRISE"),s.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 29:a[o].splice(2,0,"SYSTEM"),s.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 30:s.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 31:a[o].splice(2,0,"CONTAINER"),s.addContainerBoundary(...a[o]),this.$=a[o];break;case 32:s.addDeploymentNode("node",...a[o]),this.$=a[o];break;case 33:s.addDeploymentNode("nodeL",...a[o]),this.$=a[o];break;case 34:s.addDeploymentNode("nodeR",...a[o]),this.$=a[o];break;case 35:s.popBoundaryParseStack();break;case 39:s.addPersonOrSystem("person",...a[o]),this.$=a[o];break;case 40:s.addPersonOrSystem("external_person",...a[o]),this.$=a[o];break;case 41:s.addPersonOrSystem("system",...a[o]),this.$=a[o];break;case 42:s.addPersonOrSystem("system_db",...a[o]),this.$=a[o];break;case 43:s.addPersonOrSystem("system_queue",...a[o]),this.$=a[o];break;case 44:s.addPersonOrSystem("external_system",...a[o]),this.$=a[o];break;case 45:s.addPersonOrSystem("external_system_db",...a[o]),this.$=a[o];break;case 46:s.addPersonOrSystem("external_system_queue",...a[o]),this.$=a[o];break;case 47:s.addContainer("container",...a[o]),this.$=a[o];break;case 48:s.addContainer("container_db",...a[o]),this.$=a[o];break;case 49:s.addContainer("container_queue",...a[o]),this.$=a[o];break;case 50:s.addContainer("external_container",...a[o]),this.$=a[o];break;case 51:s.addContainer("external_container_db",...a[o]),this.$=a[o];break;case 52:s.addContainer("external_container_queue",...a[o]),this.$=a[o];break;case 53:s.addComponent("component",...a[o]),this.$=a[o];break;case 54:s.addComponent("component_db",...a[o]),this.$=a[o];break;case 55:s.addComponent("component_queue",...a[o]),this.$=a[o];break;case 56:s.addComponent("external_component",...a[o]),this.$=a[o];break;case 57:s.addComponent("external_component_db",...a[o]),this.$=a[o];break;case 58:s.addComponent("external_component_queue",...a[o]),this.$=a[o];break;case 60:s.addRel("rel",...a[o]),this.$=a[o];break;case 61:s.addRel("birel",...a[o]),this.$=a[o];break;case 62:s.addRel("rel_u",...a[o]),this.$=a[o];break;case 63:s.addRel("rel_d",...a[o]),this.$=a[o];break;case 64:s.addRel("rel_l",...a[o]),this.$=a[o];break;case 65:s.addRel("rel_r",...a[o]),this.$=a[o];break;case 66:s.addRel("rel_b",...a[o]),this.$=a[o];break;case 67:a[o].splice(0,1),s.addRel("rel",...a[o]),this.$=a[o];break;case 68:s.updateElStyle("update_el_style",...a[o]),this.$=a[o];break;case 69:s.updateRelStyle("update_rel_style",...a[o]),this.$=a[o];break;case 70:s.updateLayoutConfig("update_layout_config",...a[o]),this.$=a[o];break;case 71:this.$=[a[o]];break;case 72:a[o].unshift(a[o-1]),this.$=a[o];break;case 73:case 75:this.$=a[o].trim();break;case 74:let t={};t[a[o-1].trim()]=a[o].trim(),this.$=t;break;case 76:this.$=""}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:n,24:s,26:r,28:a,29:49,30:61,32:62,34:i,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:b,45:_,46:f,47:g,48:m,49:x,50:E,51:S,52:C,53:k,54:T,55:w,56:R,57:v,58:O,59:P,60:D,61:N,62:A,63:K,64:L,65:I,66:M,67:$,68:B,69:j,70:Y,71:U,72:F,73:z,74:X},{13:70,19:20,20:21,21:22,22:e,23:n,24:s,26:r,28:a,29:49,30:61,32:62,34:i,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:b,45:_,46:f,47:g,48:m,49:x,50:E,51:S,52:C,53:k,54:T,55:w,56:R,57:v,58:O,59:P,60:D,61:N,62:A,63:K,64:L,65:I,66:M,67:$,68:B,69:j,70:Y,71:U,72:F,73:z,74:X},{13:71,19:20,20:21,21:22,22:e,23:n,24:s,26:r,28:a,29:49,30:61,32:62,34:i,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:b,45:_,46:f,47:g,48:m,49:x,50:E,51:S,52:C,53:k,54:T,55:w,56:R,57:v,58:O,59:P,60:D,61:N,62:A,63:K,64:L,65:I,66:M,67:$,68:B,69:j,70:Y,71:U,72:F,73:z,74:X},{13:72,19:20,20:21,21:22,22:e,23:n,24:s,26:r,28:a,29:49,30:61,32:62,34:i,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:b,45:_,46:f,47:g,48:m,49:x,50:E,51:S,52:C,53:k,54:T,55:w,56:R,57:v,58:O,59:P,60:D,61:N,62:A,63:K,64:L,65:I,66:M,67:$,68:B,69:j,70:Y,71:U,72:F,73:z,74:X},{13:73,19:20,20:21,21:22,22:e,23:n,24:s,26:r,28:a,29:49,30:61,32:62,34:i,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:b,45:_,46:f,47:g,48:m,49:x,50:E,51:S,52:C,53:k,54:T,55:w,56:R,57:v,58:O,59:P,60:D,61:N,62:A,63:K,64:L,65:I,66:M,67:$,68:B,69:j,70:Y,71:U,72:F,73:z,74:X},{14:[1,74]},t(q,[2,13],{43:23,29:49,30:61,32:62,20:75,34:i,36:o,37:h,38:d,39:u,40:p,41:y,44:b,45:_,46:f,47:g,48:m,49:x,50:E,51:S,52:C,53:k,54:T,55:w,56:R,57:v,58:O,59:P,60:D,61:N,62:A,63:K,64:L,65:I,66:M,67:$,68:B,69:j,70:Y,71:U,72:F,73:z,74:X}),t(q,[2,14]),t(W,[2,16],{12:[1,76]}),t(q,[2,36],{12:[1,77]}),t(H,[2,19]),t(H,[2,20]),{25:[1,78]},{27:[1,79]},t(H,[2,23]),{35:80,75:81,76:Q,77:V,79:G,80:Z},{35:86,75:81,76:Q,77:V,79:G,80:Z},{35:87,75:81,76:Q,77:V,79:G,80:Z},{35:88,75:81,76:Q,77:V,79:G,80:Z},{35:89,75:81,76:Q,77:V,79:G,80:Z},{35:90,75:81,76:Q,77:V,79:G,80:Z},{35:91,75:81,76:Q,77:V,79:G,80:Z},{35:92,75:81,76:Q,77:V,79:G,80:Z},{35:93,75:81,76:Q,77:V,79:G,80:Z},{35:94,75:81,76:Q,77:V,79:G,80:Z},{35:95,75:81,76:Q,77:V,79:G,80:Z},{35:96,75:81,76:Q,77:V,79:G,80:Z},{35:97,75:81,76:Q,77:V,79:G,80:Z},{35:98,75:81,76:Q,77:V,79:G,80:Z},{35:99,75:81,76:Q,77:V,79:G,80:Z},{35:100,75:81,76:Q,77:V,79:G,80:Z},{35:101,75:81,76:Q,77:V,79:G,80:Z},{35:102,75:81,76:Q,77:V,79:G,80:Z},{35:103,75:81,76:Q,77:V,79:G,80:Z},{35:104,75:81,76:Q,77:V,79:G,80:Z},t(J,[2,59]),{35:105,75:81,76:Q,77:V,79:G,80:Z},{35:106,75:81,76:Q,77:V,79:G,80:Z},{35:107,75:81,76:Q,77:V,79:G,80:Z},{35:108,75:81,76:Q,77:V,79:G,80:Z},{35:109,75:81,76:Q,77:V,79:G,80:Z},{35:110,75:81,76:Q,77:V,79:G,80:Z},{35:111,75:81,76:Q,77:V,79:G,80:Z},{35:112,75:81,76:Q,77:V,79:G,80:Z},{35:113,75:81,76:Q,77:V,79:G,80:Z},{35:114,75:81,76:Q,77:V,79:G,80:Z},{35:115,75:81,76:Q,77:V,79:G,80:Z},{20:116,29:49,30:61,32:62,34:i,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:b,45:_,46:f,47:g,48:m,49:x,50:E,51:S,52:C,53:k,54:T,55:w,56:R,57:v,58:O,59:P,60:D,61:N,62:A,63:K,64:L,65:I,66:M,67:$,68:B,69:j,70:Y,71:U,72:F,73:z,74:X},{12:[1,118],33:[1,117]},{35:119,75:81,76:Q,77:V,79:G,80:Z},{35:120,75:81,76:Q,77:V,79:G,80:Z},{35:121,75:81,76:Q,77:V,79:G,80:Z},{35:122,75:81,76:Q,77:V,79:G,80:Z},{35:123,75:81,76:Q,77:V,79:G,80:Z},{35:124,75:81,76:Q,77:V,79:G,80:Z},{35:125,75:81,76:Q,77:V,79:G,80:Z},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(q,[2,15]),t(W,[2,17],{21:22,19:130,22:e,23:n,24:s,26:r,28:a}),t(q,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:n,24:s,26:r,28:a,34:i,36:o,37:h,38:d,39:u,40:p,41:y,44:b,45:_,46:f,47:g,48:m,49:x,50:E,51:S,52:C,53:k,54:T,55:w,56:R,57:v,58:O,59:P,60:D,61:N,62:A,63:K,64:L,65:I,66:M,67:$,68:B,69:j,70:Y,71:U,72:F,73:z,74:X}),t(H,[2,21]),t(H,[2,22]),t(J,[2,39]),t(tt,[2,71],{75:81,35:132,76:Q,77:V,79:G,80:Z}),t(et,[2,73]),{78:[1,133]},t(et,[2,75]),t(et,[2,76]),t(J,[2,40]),t(J,[2,41]),t(J,[2,42]),t(J,[2,43]),t(J,[2,44]),t(J,[2,45]),t(J,[2,46]),t(J,[2,47]),t(J,[2,48]),t(J,[2,49]),t(J,[2,50]),t(J,[2,51]),t(J,[2,52]),t(J,[2,53]),t(J,[2,54]),t(J,[2,55]),t(J,[2,56]),t(J,[2,57]),t(J,[2,58]),t(J,[2,60]),t(J,[2,61]),t(J,[2,62]),t(J,[2,63]),t(J,[2,64]),t(J,[2,65]),t(J,[2,66]),t(J,[2,67]),t(J,[2,68]),t(J,[2,69]),t(J,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(nt,[2,28]),t(nt,[2,29]),t(nt,[2,30]),t(nt,[2,31]),t(nt,[2,32]),t(nt,[2,33]),t(nt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(W,[2,18]),t(q,[2,38]),t(tt,[2,72]),t(et,[2,74]),t(J,[2,24]),t(J,[2,35]),t(st,[2,25]),t(st,[2,26],{12:[1,138]}),t(st,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:(0,l.K)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,l.K)(function(t){var e=this,n=[0],s=[],r=[null],a=[],i=this.table,o="",c=0,h=0,d=0,u=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var b in this.yy)Object.prototype.hasOwnProperty.call(this.yy,b)&&(y.yy[b]=this.yy[b]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var _=p.yylloc;a.push(_);var f=p.options&&p.options.ranges;function g(){var t;return"number"!=typeof(t=s.pop()||p.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.K)(function(t){n.length=n.length-2*t,r.length=r.length-t,a.length=a.length-t},"popStack"),(0,l.K)(g,"lex");for(var m,x,E,S,C,k,T,w,R,v={};;){if(E=n[n.length-1],this.defaultActions[E]?S=this.defaultActions[E]:(null==m&&(m=g()),S=i[E]&&i[E][m]),void 0===S||!S.length||!S[0]){var O="";for(k in R=[],i[E])this.terminals_[k]&&k>2&&R.push("'"+this.terminals_[k]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+R.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[m]||m,line:p.yylineno,loc:_,expected:R})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+m);switch(S[0]){case 1:n.push(m),r.push(p.yytext),a.push(p.yylloc),n.push(S[1]),m=null,x?(m=x,x=null):(h=p.yyleng,o=p.yytext,c=p.yylineno,_=p.yylloc,d>0&&d--);break;case 2:if(T=this.productions_[S[1]][1],v.$=r[r.length-T],v._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},f&&(v._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(C=this.performAction.apply(v,[o,h,c,y.yy,S[1],r,a].concat(u))))return C;T&&(n=n.slice(0,-1*T*2),r=r.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[S[1]][0]),r.push(v.$),a.push(v._$),w=i[n[n.length-2]][n[n.length-1]],n.push(w);break;case 3:return!0}}return!0},"parse")},at=function(){return{EOF:1,parseError:(0,l.K)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,l.K)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,l.K)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,l.K)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===s.length?this.yylloc.first_column:0)+s[s.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.K)(function(){return this._more=!0,this},"more"),reject:(0,l.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,l.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,l.K)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,l.K)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,l.K)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,l.K)(function(t,e){var n,s,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in r)this[a]=r[a];return!1}return!1},"test_match"),next:(0,l.K)(function(){if(this.done)return this.EOF;var t,e,n,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),a=0;ae[0].length)){if(e=n,s=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,l.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,l.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,l.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,l.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,l.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,l.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,l.K)(function(t,e,n,s){switch(n){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 73:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 16:case 70:break;case 14:c;break;case 15:return 12;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:case 53:return this.begin("rel_u"),66;case 54:case 55:return this.begin("rel_d"),67;case 56:case 57:return this.begin("rel_l"),68;case 58:case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:case 79:this.popState(),this.popState();break;case 69:case 71:return 80;case 72:this.begin("string");break;case 74:case 80:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[65,66,67,68],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}}}();function it(){this.yy={}}return rt.lexer=at,(0,l.K)(it,"Parser"),it.prototype=rt,rt.Parser=it,new it}();d.parser=d;var u,p=d,y=(0,l.K)(t=>(0,i.D7)()[t],"getRequiredConfig"),b=(0,l.K)((t,e)=>{for(const[n,s]of Object.entries(e))if(void 0!==s)if("object"==typeof s){const[e,n]=Object.entries(s)[0];t[e]=n}else t[n]=s},"assignAttributes"),_=(0,l.K)(()=>({alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}),"createGlobalBoundary"),f=[],g=[""],m="global",x="",E=[_()],S=[],C="",k=!1,T=4,w=2,R=(0,l.K)(function(){return u},"getC4Type"),v=(0,l.K)(function(t){const e=(0,i.jZ)(t,(0,i.D7)());u=e},"setC4Type"),O=(0,l.K)(function(t,e,n,s,r,a,i,o,l){if(null==t||null==e||null==n||null==s)return;let c={};const h=S.find(t=>t.from===e&&t.to===n);if(h?c=h:S.push(c),c.type=t,c.from=e,c.to=n,c.label={text:s},null==r)c.techn={text:""};else if("object"==typeof r){const[t,e]=Object.entries(r)[0];c[t]={text:e}}else c.techn={text:r};if(null==a)c.descr={text:""};else if("object"==typeof a){const[t,e]=Object.entries(a)[0];c[t]={text:e}}else c.descr={text:a};b(c,{sprite:i,tags:o,link:l}),c.wrap=Z()},"addRel"),P=(0,l.K)(function(t,e,n,s,r,a,i){if(null===e||null===n)return;let o={};const l=f.find(t=>t.alias===e);if(l&&e===l.alias?o=l:(o.alias=e,f.push(o)),o.label=null==n?{text:""}:{text:n},null==s)o.descr={text:""};else if("object"==typeof s){const[t,e]=Object.entries(s)[0];o[t]={text:e}}else o.descr={text:s};b(o,{sprite:r,tags:a,link:i}),o.typeC4Shape={text:t},o.parentBoundary=m,o.wrap=Z()},"addPersonOrSystem"),D=(0,l.K)(function(t,e,n,s,r,a,i,o){if(null===e||null===n)return;let l={};const c=f.find(t=>t.alias===e);if(c&&e===c.alias?l=c:(l.alias=e,f.push(l)),l.label=null==n?{text:""}:{text:n},null==s)l.techn={text:""};else if("object"==typeof s){const[t,e]=Object.entries(s)[0];l[t]={text:e}}else l.techn={text:s};if(null==r)l.descr={text:""};else if("object"==typeof r){const[t,e]=Object.entries(r)[0];l[t]={text:e}}else l.descr={text:r};b(l,{sprite:a,tags:i,link:o}),l.wrap=Z(),l.typeC4Shape={text:t},l.parentBoundary=m},"addContainer"),N=(0,l.K)(function(t,e,n,s,r,a,i,o){if(null===e||null===n)return;let l={};const c=f.find(t=>t.alias===e);if(c&&e===c.alias?l=c:(l.alias=e,f.push(l)),l.label=null==n?{text:""}:{text:n},null==s)l.techn={text:""};else if("object"==typeof s){const[t,e]=Object.entries(s)[0];l[t]={text:e}}else l.techn={text:s};if(null==r)l.descr={text:""};else if("object"==typeof r){const[t,e]=Object.entries(r)[0];l[t]={text:e}}else l.descr={text:r};b(l,{sprite:a,tags:i,link:o}),l.wrap=Z(),l.typeC4Shape={text:t},l.parentBoundary=m},"addComponent"),A=(0,l.K)(function(t,e,n,s,r){if(null===t||null===e)return;let a={};const i=E.find(e=>e.alias===t);if(i&&t===i.alias?a=i:(a.alias=t,E.push(a)),a.label=null==e?{text:""}:{text:e},null==n)a.type={text:"system"};else if("object"==typeof n){const[t,e]=Object.entries(n)[0];a[t]={text:e}}else a.type={text:n};b(a,{tags:s,link:r}),a.parentBoundary=m,a.wrap=Z(),x=m,m=t,g.push(x)},"addPersonOrSystemBoundary"),K=(0,l.K)(function(t,e,n,s,r){if(null===t||null===e)return;let a={};const i=E.find(e=>e.alias===t);if(i&&t===i.alias?a=i:(a.alias=t,E.push(a)),a.label=null==e?{text:""}:{text:e},null==n)a.type={text:"container"};else if("object"==typeof n){const[t,e]=Object.entries(n)[0];a[t]={text:e}}else a.type={text:n};b(a,{tags:s,link:r}),a.parentBoundary=m,a.wrap=Z(),x=m,m=t,g.push(x)},"addContainerBoundary"),L=(0,l.K)(function(t,e,n,s,r,a,i,o){if(null===e||null===n)return;let l={};const c=E.find(t=>t.alias===e);if(c&&e===c.alias?l=c:(l.alias=e,E.push(l)),l.label=null==n?{text:""}:{text:n},null==s)l.type={text:"node"};else if("object"==typeof s){const[t,e]=Object.entries(s)[0];l[t]={text:e}}else l.type={text:s};if(null==r)l.descr={text:""};else if("object"==typeof r){const[t,e]=Object.entries(r)[0];l[t]={text:e}}else l.descr={text:r};b(l,{tags:i,link:o}),l.nodeType=t,l.parentBoundary=m,l.wrap=Z(),x=m,m=e,g.push(x)},"addDeploymentNode"),I=(0,l.K)(function(){m=x,g.pop(),x=g.pop(),g.push(x)},"popBoundaryParseStack"),M=(0,l.K)(function(t,e,n,s,r,a,i,o,l,c,h){let d=f.find(t=>t.alias===e);if(void 0!==d||(d=E.find(t=>t.alias===e),void 0!==d)){if(null!=n)if("object"==typeof n){const[t,e]=Object.entries(n)[0];d[t]=e}else d.bgColor=n;if(null!=s)if("object"==typeof s){const[t,e]=Object.entries(s)[0];d[t]=e}else d.fontColor=s;if(null!=r)if("object"==typeof r){const[t,e]=Object.entries(r)[0];d[t]=e}else d.borderColor=r;if(null!=a)if("object"==typeof a){const[t,e]=Object.entries(a)[0];d[t]=e}else d.shadowing=a;if(null!=i)if("object"==typeof i){const[t,e]=Object.entries(i)[0];d[t]=e}else d.shape=i;if(null!=o)if("object"==typeof o){const[t,e]=Object.entries(o)[0];d[t]=e}else d.sprite=o;if(null!=l)if("object"==typeof l){const[t,e]=Object.entries(l)[0];d[t]=e}else d.techn=l;if(null!=c)if("object"==typeof c){const[t,e]=Object.entries(c)[0];d[t]=e}else d.legendText=c;if(null!=h)if("object"==typeof h){const[t,e]=Object.entries(h)[0];d[t]=e}else d.legendSprite=h}},"updateElStyle"),$=(0,l.K)(function(t,e,n,s,r,a,i){const o=S.find(t=>t.from===e&&t.to===n);if(void 0!==o){if(null!=s)if("object"==typeof s){const[t,e]=Object.entries(s)[0];o[t]=e}else o.textColor=s;if(null!=r)if("object"==typeof r){const[t,e]=Object.entries(r)[0];o[t]=e}else o.lineColor=r;if(null!=a)if("object"==typeof a){const[t,e]=Object.entries(a)[0];o[t]=parseInt(e)}else o.offsetX=parseInt(a);if(null!=i)if("object"==typeof i){const[t,e]=Object.entries(i)[0];o[t]=parseInt(e)}else o.offsetY=parseInt(i)}},"updateRelStyle"),B=(0,l.K)(function(t,e,n){let s=T,r=w;if("object"==typeof e){const t=Object.values(e)[0];s=parseInt(t)}else s=parseInt(e);if("object"==typeof n){const t=Object.values(n)[0];r=parseInt(t)}else r=parseInt(n);s>=1&&(T=s),r>=1&&(w=r)},"updateLayoutConfig"),j=(0,l.K)(function(){return T},"getC4ShapeInRow"),Y=(0,l.K)(function(){return w},"getC4BoundaryInRow"),U=(0,l.K)(function(){return m},"getCurrentBoundaryParse"),F=(0,l.K)(function(){return x},"getParentBoundaryParse"),z=(0,l.K)(function(t){return null==t?f:f.filter(e=>e.parentBoundary===t)},"getC4ShapeArray"),X=(0,l.K)(function(t){return f.find(e=>e.alias===t)},"getC4Shape"),q=(0,l.K)(function(t){return Object.keys(z(t))},"getC4ShapeKeys"),W=(0,l.K)(function(t){return null==t?E:E.filter(e=>e.parentBoundary===t)},"getBoundaries"),H=W,Q=(0,l.K)(function(){return S},"getRels"),V=(0,l.K)(function(){return C},"getTitle"),G=(0,l.K)(function(t){k=t},"setWrap"),Z=(0,l.K)(function(){return k},"autoWrap"),J=(0,l.K)(function(){f=[],E=[_()],x="",m="global",g=[""],S=[],g=[""],C="",k=!1,T=4,w=2},"clear"),tt=(0,l.K)(function(t){const e=(0,i.jZ)(t,(0,i.D7)());C=e},"setTitle"),et={addPersonOrSystem:P,addPersonOrSystemBoundary:A,addContainer:D,addContainerBoundary:K,addComponent:N,addDeploymentNode:L,popBoundaryParseStack:I,addRel:O,updateElStyle:M,updateRelStyle:$,updateLayoutConfig:B,autoWrap:Z,setWrap:G,getC4ShapeArray:z,getC4Shape:X,getC4ShapeKeys:q,getBoundaries:W,getBoundarys:H,getCurrentBoundaryParse:U,getParentBoundaryParse:F,getRels:Q,getTitle:V,getC4Type:R,getC4ShapeInRow:j,getC4BoundaryInRow:Y,setAccTitle:i.SV,getAccTitle:i.iN,getAccDescription:i.m7,setAccDescription:i.EI,getConfig:(0,l.K)(()=>y("c4"),"getConfig"),clear:J,LINETYPE:{SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:tt,setC4Type:v},nt=(0,l.K)(function(t,e){return(0,s.tk)(t,e)},"drawRect"),st=(0,l.K)((t,e,n,s)=>{const r=t.append("g");let a=0;for(const i of e){const t=i.textColor?i.textColor:"#444444",e=i.lineColor?i.lineColor:"#444444",o=i.offsetX?parseInt(String(i.offsetX)):0,l=i.offsetY?parseInt(String(i.offsetY)):0,c="";if(0===a){const t=r.append("line");t.attr("x1",i.startPoint.x),t.attr("y1",i.startPoint.y),t.attr("x2",i.endPoint.x),t.attr("y2",i.endPoint.y),t.attr("stroke-width","1"),t.attr("stroke",e),t.style("fill","none"),"rel_b"!==i.type&&t.attr("marker-end","url("+c+"#"+s+"-arrowhead)"),"birel"!==i.type&&"rel_b"!==i.type||t.attr("marker-start","url("+c+"#"+s+"-arrowend)"),a=-1}else{const t=r.append("path");t.attr("fill","none").attr("stroke-width","1").attr("stroke",e).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",i.startPoint.x).replaceAll("starty",i.startPoint.y).replaceAll("controlx",i.startPoint.x+(i.endPoint.x-i.startPoint.x)/2-(i.endPoint.x-i.startPoint.x)/4).replaceAll("controly",i.startPoint.y+(i.endPoint.y-i.startPoint.y)/2).replaceAll("stopx",i.endPoint.x).replaceAll("stopy",i.endPoint.y)),"rel_b"!==i.type&&t.attr("marker-end","url("+c+"#"+s+"-arrowhead)"),"birel"!==i.type&&"rel_b"!==i.type||t.attr("marker-start","url("+c+"#"+s+"-arrowend)")}const h=i.label.width;let d=n.messageFont();ut(n)(i.label.text,r,Math.min(i.startPoint.x,i.endPoint.x)+Math.abs(i.endPoint.x-i.startPoint.x)/2+o,Math.min(i.startPoint.y,i.endPoint.y)+Math.abs(i.endPoint.y-i.startPoint.y)/2+l,h,i.label.height,{fill:t},d),i.techn&&""!==i.techn.text&&(d=n.messageFont(),ut(n)("["+i.techn.text+"]",r,Math.min(i.startPoint.x,i.endPoint.x)+Math.abs(i.endPoint.x-i.startPoint.x)/2+o,Math.min(i.startPoint.y,i.endPoint.y)+Math.abs(i.endPoint.y-i.startPoint.y)/2+n.messageFontSize+5+l,Math.max(h,i.techn.width),i.techn.height,{fill:t,"font-style":"italic"},d))}},"drawRels"),rt=(0,l.K)(function(t,e,n){const s=t.append("g"),r=e.bgColor?e.bgColor:"none",a=e.borderColor?e.borderColor:"#444444",i=e.fontColor?e.fontColor:"black";let o={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(o={"stroke-width":1});const l={x:e.x,y:e.y,fill:r,stroke:a,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:o};nt(s,l);let c=n.boundaryFont();c.fontWeight="bold",c.fontSize=c.fontSize+2,c.fontColor=i,ut(n)(e.label.text,s,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},c),e.type&&""!==e.type.text&&(c=n.boundaryFont(),c.fontColor=i,ut(n)(e.type.text,s,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},c)),e.descr&&""!==e.descr.text&&(c=n.boundaryFont(),c.fontSize=c.fontSize-2,c.fontColor=i,ut(n)(e.descr.text,s,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},c))},"drawBoundary"),at=(0,l.K)(function(t,e){t.append("defs").append("symbol").attr("id",e+"-database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),it=(0,l.K)(function(t,e){t.append("defs").append("symbol").attr("id",e+"-computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),ot=(0,l.K)(function(t,e){t.append("defs").append("symbol").attr("id",e+"-clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),lt=(0,l.K)(function(t,e){t.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),ct=(0,l.K)(function(t,e){t.append("defs").append("marker").attr("id",e+"-arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),ht=(0,l.K)(function(t,e){t.append("defs").append("marker").attr("id",e+"-filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),dt=(0,l.K)(function(t,e){const n=t.append("defs").append("marker").attr("id",e+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);n.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),n.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),ut=function(){function t(t,e,n,r,a,i,o){s(e.append("text").attr("x",n+a/2).attr("y",r+i/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,n,r,a,o,l,c){const{fontSize:h,fontFamily:d,fontWeight:u}=c,p=t.split(i.Y2.lineBreakRegex);for(let i=0;i{if("sandbox"===e){const e=(0,h.Ltv)("#i"+t),n=e.node()?.contentDocument;if(!n)throw new Error(`Sandbox iframe #i${t} is missing its content document`);return{root:(0,h.Ltv)(n.body),doc:n}}return{root:(0,h.Ltv)("body"),doc:document}},"getDiagramRoot"),bt=new Set(["system_queue","external_system_queue","container_queue","external_container_queue","component_queue","external_component_queue"]),_t=new Set(["system_db","external_system_db","container_db","external_container_db","component_db","external_component_db"]),ft={person:"person",box:"rounded",rounded:"rounded",cylinder:"cylinder",database:"cylinder",db:"cylinder",queue:"h-cyl",pipe:"h-cyl",component:"fr-rect"},gt=(0,l.K)(t=>t?ft[t.toLowerCase()]:void 0,"keywordShape"),mt=(0,l.K)(t=>{const e=gt(t.shape)??gt(t.sprite);if(e)return e;if(t.tags)for(const s of t.tags.split(",")){const t=gt(s.trim());if(t)return t}const n=t.typeC4Shape.text;return"person"===n||"external_person"===n?"person":_t.has(n)?"cylinder":bt.has(n)?"h-cyl":"rounded"},"resolveNodeShape"),xt={person:"Person",system:"Software System",container:"Container",component:"Component"},Et=(0,l.K)(t=>{const e=t.replace(/^external_/,"").replace(/_(db|queue)$/,"");return xt[e]??e.replace(/_/g," ")},"stereotypeLabel"),St=(0,l.K)(t=>t.startsWith("external_"),"isExternal"),Ct=(0,l.K)(t=>{const e=Et(t.typeC4Shape.text);return t.techn?.text?`[${e}: ${t.techn.text}]`:`[${e}]`},"stereotypeText"),kt=["person","system","system_db","system_queue","container","container_db","container_queue","component","component_db","component_queue"].flatMap(t=>[t,`external_${t}`]),Tt=new Set(kt),wt=(0,l.K)(t=>Tt.has(t),"isC4ElementType"),Rt=(0,l.K)((t,e)=>{const n=t.typeC4Shape.text,s=t.bgColor??(wt(n)&&e[`${n}_bg_color`]),r=t.borderColor??(wt(n)&&e[`${n}_border_color`]),a=[];return s&&a.push(`fill:${s}`),r&&a.push(`stroke:${r}`),a.push(`color:${t.fontColor??"#FFFFFF"}`),a},"elementCssStyles"),vt=(0,l.K)((t,e,n,s,r)=>{const a=t.typeC4Shape.text,i=["c4-shape",`c4-${a}`];St(a)&&i.push("c4-external");const o=mt(t),l=Rt(t,e);return"rounded"!==o&&"fr-rect"!==o||l.push("rx:12px","ry:12px"),{id:t.alias,label:t.label.text,stereotype:Ct(t),description:t.descr?.text?[t.descr.text]:void 0,labelType:"string",isGroup:!1,shape:o,cssClasses:i.join(" "),cssStyles:l,padding:n,look:s,useHtmlLabels:!1,width:r}},"buildC4Node"),Ot=0,Pt=0,Dt=4,Nt=2;d.yy=et;var At={},Kt=class{static{(0,l.K)(this,"Bounds")}constructor(t){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,Lt(t.db.getConfig())}setData(t,e,n,s){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=e,this.nextData.starty=this.data.starty=n,this.nextData.stopy=this.data.stopy=s}updateVal(t,e,n,s){void 0===t[e]?t[e]=n:t[e]=s(n,t[e])}insert(t){this.nextData.cnt=this.nextData.cnt+1;const e=this.nextData.stopx,n=this.data.widthLimit;let s=this.nextData.startx===this.nextData.stopx?e+t.margin:e+2*t.margin,r=s+t.width,a=this.nextData.starty+2*t.margin,i=a+t.height;(s>=n||r>=n||this.nextData.cnt>Dt)&&(s=this.nextData.startx+t.margin+At.nextLinePaddingX,a=this.nextData.stopy+2*t.margin,this.nextData.stopx=r=s+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=a+t.height,this.nextData.cnt=1),t.x=s,t.y=a,this.updateVal(this.data,"startx",s,Math.min),this.updateVal(this.data,"starty",a,Math.min),this.updateVal(this.data,"stopx",r,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",s,Math.min),this.updateVal(this.nextData,"starty",a,Math.min),this.updateVal(this.nextData,"stopx",r,Math.max),this.updateVal(this.nextData,"stopy",i,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},Lt(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},Lt=(0,l.K)(function(t){(0,i.hH)(At,t),t?.fontFamily&&(At.personFontFamily=At.systemFontFamily=At.messageFontFamily=t.fontFamily),t?.fontSize&&(At.personFontSize=At.systemFontSize=At.messageFontSize=t.fontSize),t?.fontWeight&&(At.personFontWeight=At.systemFontWeight=At.messageFontWeight=t.fontWeight)},"setConf"),It=(0,l.K)(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),Mt=(0,l.K)(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont");function $t(t,e,n,s,r){const o=e[t];if(!o.width)if(n)o.text=(0,a.bH)(o.text,r,s),o.textLines=o.text.split(i.Y2.lineBreakRegex).length,o.width=r,o.height=(0,a.ru)(o.text,s);else{const t=o.text.split(i.Y2.lineBreakRegex);o.textLines=t.length;let e=0;o.height=0,o.width=0;for(const n of t)o.width=Math.max((0,a.Un)(n,s),o.width),e=(0,a.ru)(n,s),o.height=o.height+e}return o}(0,l.K)($t,"calcC4ShapeTextWH");var Bt=(0,l.K)(function(t,e,n){const s=n.data.startx,r=n.data.starty;e.x=s,e.y=r,e.width=n.data.stopx-s,e.height=n.data.stopy-r,e.label.y=At.c4ShapeMargin-35;const i=e.wrap&&At.wrap,o=It(At);o.fontSize=o.fontSize+2,o.fontWeight="bold";$t("label",e,i,o,(0,a.Un)(e.label.text,o)),pt.drawBoundary(t,e,At)},"drawBoundary"),jt=(0,l.K)(async function(t,e,n,s){const a=(0,i.D7)(),o=a.look??"classic",c={config:a},h=e.attr("id")??"",d=s.map(t=>n[Number(t)]),u=(0,l.K)(t=>{const e=t.shape?r.nq[t.shape]:void 0;if(!e)throw new Error(`C4: no shape handler for "${t.shape}"`);return e},"shapeHandlerFor");await Promise.all(d.map(async t=>{const n=vt(t,At,At.c4ShapePadding,o,At.width);n.domId=`${h}-${n.id}`;const s=await u(n)(e,n,c);t.width=n.width??At.width,t.height=n.height??At.height,t.margin=At.c4ShapeMargin,s.remove()}));for(const r of d)t.insert(r);await Promise.all(d.map(async t=>{const n=vt(t,At,At.c4ShapePadding,o,At.width);n.domId=`${h}-${n.id}`,n.x=t.x+t.width/2,n.y=t.y+t.height/2;const s=e.append("g").attr("transform",`translate(${t.x+t.width/2}, ${t.y+t.height/2})`);await u(n)(s,n,c),t.intersect=n.intersect})),t.bumpLastMargin(At.c4ShapeMargin)},"drawC4ShapeArray"),Yt=class{static{(0,l.K)(this,"Point")}constructor(t,e){this.x=t,this.y=e}},Ut=(0,l.K)(function(t,e){if(!t.intersect)throw new Error(`C4 shape "${t.alias}" has no intersect function. Please report this to https://github.com/mermaid-js/mermaid/issues`);const{x:n,y:s}=t.intersect(e);return new Yt(n,s)},"getIntersectPoint"),Ft=(0,l.K)(function(t,e){const n={x:0,y:0};n.x=e.x+e.width/2,n.y=e.y+e.height/2;const s=Ut(t,n);n.x=t.x+t.width/2,n.y=t.y+t.height/2;return{startPoint:s,endPoint:Ut(e,n)}},"getIntersectPoints"),zt=(0,l.K)(function(t,e,n,s,r){const i=s.db.getC4Type();let o=0;for(const l of e){o+=1;const t=l.wrap&&At.wrap,e=Mt(At);"C4Dynamic"===i&&(l.label.text=o+": "+l.label.text);let s=(0,a.Un)(l.label.text,e);$t("label",l,t,e,s),l.techn&&""!==l.techn.text&&(s=(0,a.Un)(l.techn.text,e),$t("techn",l,t,e,s)),l.descr&&""!==l.descr.text&&(s=(0,a.Un)(l.descr.text,e),$t("descr",l,t,e,s));const r=n(l.from),c=n(l.to);if(!r||!c)throw new Error(`C4 rel "${l.from}" -> "${l.to}" references an unknown shape`);const h=Ft(r,c);if(!h.startPoint||!h.endPoint)throw new Error(`Could not calculate intersection points for rel "${l.from}" -> "${l.to}"`);l.startPoint=h.startPoint,l.endPoint=h.endPoint}pt.drawRels(t,e,At,r)},"drawRels");async function Xt(t,e,n,s,r){const a=r.db,i=new Kt(r);i.data.widthLimit=n.data.widthLimit/Math.min(Nt,s.length);for(const[o,l]of s.entries()){let s=0;l.image={width:0,height:0,Y:0},l.sprite&&(l.image.width=48,l.image.height=48,l.image.Y=s,s=l.image.Y+l.image.height);const c=l.wrap&&At.wrap,h=It(At);h.fontSize=h.fontSize+2,h.fontWeight="bold";const d=$t("label",l,c,h,i.data.widthLimit);if(d.Y=s+8,s=d.Y+d.height,l.type&&""!==l.type.text){l.type.text="["+l.type.text+"]";const t=$t("type",l,c,It(At),i.data.widthLimit);t.Y=s+5,s=t.Y+t.height}if(l.descr&&""!==l.descr.text){const t=It(At);t.fontSize=t.fontSize-2;const e=$t("descr",l,c,t,i.data.widthLimit);e.Y=s+20,s=e.Y+e.height}if(0==o||o%Nt===0){const t=n.data.startx+At.diagramMarginX,e=n.data.stopy+At.diagramMarginY+s;i.setData(t,t,e,e)}else{const t=i.data.stopx!==i.data.startx?i.data.stopx+At.diagramMarginX:i.data.startx,e=i.data.starty;i.setData(t,t,e,e)}i.name=l.alias;const u=a.getC4ShapeArray(l.alias),p=a.getC4ShapeKeys(l.alias);p.length>0&&await jt(i,t,u,p),e=l.alias;const y=a.getBoundaries(e);y.length>0&&await Xt(t,e,i,y,r),"global"!==l.alias&&Bt(t,l,i),n.data.stopy=Math.max(i.data.stopy+At.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(i.data.stopx+At.c4ShapeMargin,n.data.stopx),Ot=Math.max(Ot,n.data.stopx),Pt=Math.max(Pt,n.data.stopy)}}(0,l.K)(Xt,"drawInsideBoundary");var qt={drawPersonOrSystemArray:jt,drawBoundary:Bt,setConf:Lt,draw:(0,l.K)(async function(t,e,n,s){At=y("c4");const r=(0,i.D7)().securityLevel,{root:a}=yt(e,r),l=s.db;l.setWrap(At.wrap),Dt=l.getC4ShapeInRow(),Nt=l.getC4BoundaryInRow(),o.R.debug(`C:${JSON.stringify(At,null,2)}`);const c=a.select(`[id="${e}"]`);pt.insertComputerIcon(c,e),pt.insertDatabaseIcon(c,e),pt.insertClockIcon(c,e);const h=new Kt(s);h.setData(At.diagramMarginX,At.diagramMarginX,At.diagramMarginY,At.diagramMarginY),h.data.widthLimit=screen.availWidth,Ot=At.diagramMarginX,Pt=At.diagramMarginY;const d=l.getTitle(),u=l.getBoundaries("");await Xt(c,"",h,u,s),pt.insertArrowHead(c,e),pt.insertArrowEnd(c,e),pt.insertArrowCrossHead(c,e),pt.insertArrowFilledHead(c,e),zt(c,l.getRels(),l.getC4Shape,s,e),h.data.stopx=Ot,h.data.stopy=Pt;const p=h.data,b=p.startx,_=p.starty,f=Pt-_+2*At.diagramMarginY,g=Ot-b,m=g+2*At.diagramMarginX;d&&c.append("text").text(d).attr("x",g/2-4*At.diagramMarginX).attr("y",_+At.diagramMarginY),(0,i.a$)(c,f,m,At.useMaxWidth);const x=d?60:0;c.attr("viewBox",b-At.diagramMarginX+" -"+(At.diagramMarginY+x)+" "+m+" "+(f+x)),o.R.debug("models:",p)},"draw")},Wt=(0,l.K)(()=>{const t=(0,i.D7)().c4??{},e=new CSSStyleSheet;for(const n of kt){const s=e.cssRules[e.insertRule(`.c4-shape.c4-${n} .label {}`,e.cssRules.length)],r=t[`${n}FontFamily`],a=t[`${n}FontSize`],i=t[`${n}FontWeight`];r&&s.style.setProperty("font-family",r),a&&s.style.setProperty("font-size","number"==typeof a?`${a}px`:a),i&&s.style.setProperty("font-weight",String(i))}return[...e.cssRules].filter(t=>t.style.length>0).map(t=>` ${t.cssText}`).join("\n")},"elementFontStyles"),Ht={parser:p,db:et,renderer:qt,styles:(0,l.K)(t=>`.person {\n stroke: ${t.personBorder};\n fill: ${t.personBkg};\n }\n${Wt()}\n\n /* The element font colour is set inline per element (default white); the\n label text takes it via currentColor. */\n .c4-shape .label,\n .c4-shape .label text {\n color: inherit;\n fill: currentColor;\n }\n /* Structurizr typography: bold name, smaller stereotype/type and description lines. */\n .c4-shape .label .c4-name {\n font-weight: bold;\n }\n .c4-shape .label .c4-type {\n font-size: 0.75em;\n }\n .c4-shape .label .c4-descr {\n font-size: 0.82em;\n }\n .c4-shape .basic,\n .c4-shape rect,\n .c4-shape path,\n .c4-shape circle,\n .c4-shape ellipse,\n .c4-shape line {\n stroke-width: 2px;\n }\n`,"getStyles"),init:(0,l.K)(({c4:t,wrap:e})=>{qt.setConf(t),et.setWrap(e)},"init")}},338(t,e,n){n.d(e,{CP:()=>d,Ck:()=>y,HT:()=>p,PB:()=>u,aC:()=>h,lC:()=>l,m:()=>c,tk:()=>o});var s=n(76385),r=n(86827),a=n(16750),i=n(70451),o=(0,r.K)((t,e)=>{const n=t.append("rect");if(n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),e.name&&n.attr("name",e.name),e.rx&&n.attr("rx",e.rx),e.ry&&n.attr("ry",e.ry),void 0!==e.attrs)for(const s in e.attrs)n.attr(s,e.attrs[s]);return e.class&&n.attr("class",e.class),n},"drawRect"),l=(0,r.K)((t,e)=>{const n={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};o(t,n).lower()},"drawBackgroundRect"),c=(0,r.K)((t,e)=>{const n=e.text.replace(s.H1," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("class","legend"),r.style("text-anchor",e.anchor),e.class&&r.attr("class",e.class);const a=r.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.text(n),r},"drawText"),h=(0,r.K)((t,e,n,s)=>{const r=t.append("image");r.attr("x",e),r.attr("y",n);const i=(0,a.J)(s);r.attr("xlink:href",i)},"drawImage"),d=(0,r.K)((t,e,n,s)=>{const r=t.append("use");r.attr("x",e),r.attr("y",n);const i=(0,a.J)(s);r.attr("xlink:href",`#${i}`)},"drawEmbeddedImage"),u=(0,r.K)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),p=(0,r.K)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),y=(0,r.K)(()=>{let t=(0,i.Ltv)(".mermaidTooltip");return t.empty()&&(t=(0,i.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip")}}]); \ No newline at end of file diff --git a/assets/js/10af94c2.b64f9b61.js b/assets/js/10af94c2.b64f9b61.js new file mode 100644 index 000000000..c18153abe --- /dev/null +++ b/assets/js/10af94c2.b64f9b61.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[3269],{97267(e,t,n){n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>d,default:()=>l,frontMatter:()=>r,metadata:()=>s,toc:()=>h});const s=JSON.parse('{"id":"desktop/configuration","title":"Configuration","description":"Adjust your Bee node\'s settings through the Swarm Desktop app.","source":"@site/docs/desktop/configuration.md","sourceDirName":"desktop","slug":"/desktop/configuration","permalink":"/docs/desktop/configuration","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/desktop/configuration.md","tags":[],"version":"current","frontMatter":{"title":"Configuration","id":"configuration","description":"Adjust your Bee node\'s settings through the Swarm Desktop app."},"sidebar":"desktop","previous":{"title":"Install","permalink":"/docs/desktop/install"},"next":{"title":"Access Content","permalink":"/docs/desktop/access-content"}}');var i=n(74848),o=n(28453);const r={title:"Configuration",id:"configuration",description:"Adjust your Bee node's settings through the Swarm Desktop app."},d=void 0,a={},h=[{value:"Setting RPC Endpoint",id:"setting-rpc-endpoint",level:2},{value:"Upgrading from an Ultra-light to a Light Node",id:"upgrading-from-an-ultra-light-to-a-light-node",level:2},{value:"Bridging Ethereum DAI to Gnosis Chain as xDAI",id:"bridging-ethereum-dai-to-gnosis-chain-as-xdai",level:3},{value:"Funding Node with xDAI",id:"funding-node-with-xdai",level:3},{value:"Set Up Wallet",id:"set-up-wallet",level:3},{value:"Fund Chequebook",id:"fund-chequebook",level:2}];function c(e){const t={a:"a",admonition:"admonition",em:"em",h2:"h2",h3:"h3",img:"img",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h2,{id:"setting-rpc-endpoint",children:"Setting RPC Endpoint"}),"\n",(0,i.jsxs)(t.p,{children:["In order to interact with the Gnosis Chain to buy stamps, participate in staking, and manage assets such as xBZZ, Bee nodes require a valid Gnosis Chain RPC endpoint. By default the RPC endpoint is set to ",(0,i.jsx)(t.a,{href:"https://xdai.fairdatasociety.org",children:"https://xdai.fairdatasociety.org"}),", however any valid Gnosis Chain RPC endpoint may be used."]}),"\n",(0,i.jsxs)(t.p,{children:["To modify the RPC endpoint, first navigate to the ",(0,i.jsx)(t.em,{children:(0,i.jsx)(t.strong,{children:"Settings"})})," tab:"]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{src:n(69472).A+"",width:"2527",height:"1197"})}),"\n",(0,i.jsxs)(t.p,{children:["From the ",(0,i.jsx)(t.em,{children:(0,i.jsx)(t.strong,{children:"Settings"})})," tab, expand the API Settings section and click the pen button next to Blockchain RPC URL to edit the default RPC. You can choose any valid Gnosis Chain RPC, either from your own Gnosis node or a service provider. You can find a list of paid and free RPC options from the ",(0,i.jsx)(t.a,{href:"https://docs.gnosischain.com/tools/RPC%20Providers/",children:"Gnosis Chain docs"}),". For this example we will use the free endpoint - ",(0,i.jsx)(t.em,{children:(0,i.jsx)(t.a,{href:"https://xdai.fairdatasociety.org",children:"https://xdai.fairdatasociety.org"})}),"."]}),"\n",(0,i.jsx)(t.admonition,{type:"warning",children:(0,i.jsxs)(t.p,{children:["Other ",(0,i.jsx)(t.em,{children:(0,i.jsx)(t.strong,{children:"free public RPC endpoints are discouraged,"})})," since they may enforce rate limiting or may not store the historical smart contract data required by Bee nodes. ",(0,i.jsx)(t.a,{href:"/docs/bee/working-with-bee/configuration#setting-blockchain-rpc-endpoint",children:"Read more"}),"."]})}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{src:n(67035).A+"",width:"2478",height:"1155"})}),"\n",(0,i.jsxs)(t.p,{children:["Click ",(0,i.jsx)(t.em,{children:(0,i.jsx)(t.strong,{children:"Save and Restart"})})," to finish changing the RPC endpoint."]}),"\n",(0,i.jsx)(t.h2,{id:"upgrading-from-an-ultra-light-to-a-light-node",children:"Upgrading from an Ultra-light to a Light Node"}),"\n",(0,i.jsx)(t.p,{children:"Bee ultra-light nodes are limited to only downloading small amounts of data from Swarm. In order to download greater amounts of data or to upload data to Swarm you must upgrade to a light node. To do this we need to first fund our Swarm Desktop Bee node with some xDAI (DAI bridged from Ethereum to Gnosis Chain which serves as Gnosis Chain's native token for paying transaction fees) in order to pay for the Gnosis Chain transactions required for setting up a light node."}),"\n",(0,i.jsx)(t.h3,{id:"bridging-ethereum-dai-to-gnosis-chain-as-xdai",children:"Bridging Ethereum DAI to Gnosis Chain as xDAI"}),"\n",(0,i.jsxs)(t.p,{children:["If you already have some xDAI on a Gnosis Chain address, skip to the next step ",(0,i.jsx)(t.em,{children:(0,i.jsx)(t.strong,{children:"Funding Node with xDAI"})}),". If you have DAI on Ethereum and need to swap it for xDAI, you can use one of the ",(0,i.jsx)(t.a,{href:"https://bridge.gnosischain.com/",children:"Gnosis Chain Bridge"})]}),"\n",(0,i.jsx)(t.p,{children:"Five to ten xDAI is plenty to get started."}),"\n",(0,i.jsx)(t.h3,{id:"funding-node-with-xdai",children:"Funding Node with xDAI"}),"\n",(0,i.jsxs)(t.p,{children:["Once you have a few xDAI in your Gnosis Chain address, to fund your Bee node you need to send it from your wallet to your Swarm Desktop wallet. You can find your address from the ",(0,i.jsx)(t.em,{children:(0,i.jsx)(t.strong,{children:"Account"})})," tab of the app."]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{src:n(45490).A+"",width:"2547",height:"1155"})}),"\n",(0,i.jsx)(t.p,{children:"Next simply send your xDAI to that address. Before sending, make sure you have set your wallet to use the Gnosis Chain network and not the Ethereum mainnet. If Gnosis Chain is not included as default selectable network in your wallet, you may need to add the network manually. You can use this configuration to add Gnosis Chain:"}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Field"}),(0,i.jsx)(t.th,{children:"Value"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.strong,{children:"Network name:"})}),(0,i.jsx)(t.td,{children:"Gnosis"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.strong,{children:"New RPC URL:"})}),(0,i.jsx)(t.td,{children:(0,i.jsx)(t.a,{href:"https://xdai.fairdatasociety.org",children:"https://xdai.fairdatasociety.org"})})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.strong,{children:"Chain ID:"})}),(0,i.jsx)(t.td,{children:"100"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.strong,{children:"Symbol:"})}),(0,i.jsx)(t.td,{children:"xDai"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.strong,{children:"Block Explorer URL (Optional):"})}),(0,i.jsx)(t.td,{children:(0,i.jsx)(t.a,{href:"https://gnosis.blockscout.com/",children:"https://gnosis.blockscout.com/"})})]})]})]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{src:n(75469).A+"",width:"1675",height:"1177"})}),"\n",(0,i.jsxs)(t.p,{children:["The transaction should be confirmed in under a minute. We can check on the ",(0,i.jsx)(t.em,{children:(0,i.jsx)(t.strong,{children:"Account"})})," page to see when the xDAI has been received:"]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{src:n(12228).A+"",width:"2535",height:"1143"})}),"\n",(0,i.jsx)(t.h3,{id:"set-up-wallet",children:"Set Up Wallet"}),"\n",(0,i.jsx)(t.p,{children:"Now with some xDAI in the Swarm Desktop wallet, we can upgrade our Bee node from ultra-light to a light node. Completing the setup process will swap xDAI for some xBZZ at the current price, and will issue the transactions needed to set up the chequebook contract."}),"\n",(0,i.jsxs)(t.p,{children:["To get started, navigate to the ",(0,i.jsx)(t.em,{children:(0,i.jsx)(t.strong,{children:"Info"})})," tab and click the ",(0,i.jsx)(t.em,{children:(0,i.jsx)(t.strong,{children:"Setup wallet"})})," button.\n",(0,i.jsx)(t.img,{src:n(76994).A+"",width:"2541",height:"1190"}),"\nClick ",(0,i.jsx)(t.em,{children:(0,i.jsx)(t.strong,{children:"Use xDAI"})}),".\n",(0,i.jsx)(t.img,{src:n(97503).A+"",width:"2528",height:"1168"}),"\nConfirm that you have sufficient xDAI balance and click ",(0,i.jsx)(t.em,{children:(0,i.jsx)(t.strong,{children:"Proceed"})}),".\n",(0,i.jsx)(t.img,{src:n(43702).A+"",width:"2506",height:"1188"}),"\nClick ",(0,i.jsx)(t.em,{children:(0,i.jsx)(t.strong,{children:"Swap Now and Upgrade"})}),".\n",(0,i.jsx)(t.img,{src:n(82481).A+"",width:"2465",height:"1187"}),"\nWait for the upgrade to complete.\n",(0,i.jsx)(t.img,{src:n(34088).A+"",width:"2556",height:"1170"}),"\nAfter the upgrade is complete, you will see several new sections within the ",(0,i.jsx)(t.em,{children:(0,i.jsx)(t.strong,{children:"Account"})})," tab: ",(0,i.jsx)(t.em,{children:(0,i.jsx)(t.strong,{children:"Chequebook"})}),", ",(0,i.jsx)(t.em,{children:(0,i.jsx)(t.strong,{children:"Stamps"})}),", and ",(0,i.jsx)(t.em,{children:(0,i.jsx)(t.strong,{children:"Feeds"})}),"."]}),"\n",(0,i.jsx)(t.h2,{id:"fund-chequebook",children:"Fund Chequebook"}),"\n",(0,i.jsxs)(t.p,{children:["After setting up your wallet you will have access to the ",(0,i.jsx)(t.em,{children:(0,i.jsx)(t.strong,{children:"Chequebook"})})," section from the ",(0,i.jsx)(t.em,{children:(0,i.jsx)(t.strong,{children:"Accounts"})})," tab. From here you can manage your chequebook for your Swarm Desktop Bee node."]})]})}function l(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},69472(e,t,n){n.d(t,{A:()=>s});const s=n.p+"assets/images/config1-15196d3cb27f623451d8370424129607.png"},76994(e,t,n){n.d(t,{A:()=>s});const s=n.p+"assets/images/config10-c0c2ea8894a3bb3efa3ef7b3f5055b31.png"},67035(e,t,n){n.d(t,{A:()=>s});const s=n.p+"assets/images/config2-db261ee73394366683c1419b667ab502.png"},45490(e,t,n){n.d(t,{A:()=>s});const s=n.p+"assets/images/config3-ce9c6cd07388bdab2037bc88c3d49855.png"},75469(e,t,n){n.d(t,{A:()=>s});const s=n.p+"assets/images/config4-57276e415842625888aa7d6973572a7b.png"},12228(e,t,n){n.d(t,{A:()=>s});const s=n.p+"assets/images/config5-ddc7105976d468c38f2697f61cab9f4b.png"},97503(e,t,n){n.d(t,{A:()=>s});const s=n.p+"assets/images/config6-60dcf8e9b6e900e032e1e0ef0406d04e.png"},43702(e,t,n){n.d(t,{A:()=>s});const s=n.p+"assets/images/config7-67af3ebb34dd4a823c2a2fb702dc952f.png"},82481(e,t,n){n.d(t,{A:()=>s});const s=n.p+"assets/images/config8-950886e558f0f854278cee1881d5b917.png"},34088(e,t,n){n.d(t,{A:()=>s});const s=n.p+"assets/images/config9-3b54daefeaecdc9099e06bbb2bf3f92e.png"},28453(e,t,n){n.d(t,{R:()=>r,x:()=>d});var s=n(96540);const i={},o=s.createContext(i);function r(e){const t=s.useContext(o);return s.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1327.ed80bce7.js b/assets/js/1327.ed80bce7.js new file mode 100644 index 000000000..e1ad89316 --- /dev/null +++ b/assets/js/1327.ed80bce7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[1327],{41327(t,e,a){a.d(e,{diagram:()=>z});var i,n=a(74806),r=(a(96755),a(1672),a(9417),a(338),a(78771),a(46853),a(717),a(79515),a(44505),a(72379),a(58962),a(16459)),d=a(76385),s=a(31293),o=a(86827),g=a(70451),p=a(73765),h=a(697),c=(0,o.K)(t=>t.append("circle").attr("class","start-state").attr("r",(0,d.D7)().state.sizeUnit).attr("cx",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit).attr("cy",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit),"drawStartState"),l=(0,o.K)(t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",(0,d.D7)().state.textHeight).attr("class","divider").attr("x2",2*(0,d.D7)().state.textHeight).attr("y1",0).attr("y2",0),"drawDivider"),x=(0,o.K)((t,e)=>{const a=t.append("text").attr("x",2*(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.textHeight+2*(0,d.D7)().state.padding).attr("font-size",(0,d.D7)().state.fontSize).attr("class","state-title").text(e.id),i=a.node().getBBox();return t.insert("rect",":first-child").attr("x",(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.padding).attr("width",i.width+2*(0,d.D7)().state.padding).attr("height",i.height+2*(0,d.D7)().state.padding).attr("rx",(0,d.D7)().state.radius),a},"drawSimpleState"),D=(0,o.K)((t,e)=>{const a=(0,o.K)(function(t,e,a){const i=t.append("tspan").attr("x",2*(0,d.D7)().state.padding).text(e);a||i.attr("dy",(0,d.D7)().state.textHeight)},"addTspan"),i=t.append("text").attr("x",2*(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.textHeight+1.3*(0,d.D7)().state.padding).attr("font-size",(0,d.D7)().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),n=i.height,r=t.append("text").attr("x",(0,d.D7)().state.padding).attr("y",n+.4*(0,d.D7)().state.padding+(0,d.D7)().state.dividerMargin+(0,d.D7)().state.textHeight).attr("class","state-description");let s=!0,g=!0;e.descriptions.forEach(function(t){s||(a(r,t,g),g=!1),s=!1});const p=t.append("line").attr("x1",(0,d.D7)().state.padding).attr("y1",(0,d.D7)().state.padding+n+(0,d.D7)().state.dividerMargin/2).attr("y2",(0,d.D7)().state.padding+n+(0,d.D7)().state.dividerMargin/2).attr("class","descr-divider"),h=r.node().getBBox(),c=Math.max(h.width,i.width);return p.attr("x2",c+3*(0,d.D7)().state.padding),t.insert("rect",":first-child").attr("x",(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.padding).attr("width",c+2*(0,d.D7)().state.padding).attr("height",h.height+n+2*(0,d.D7)().state.padding).attr("rx",(0,d.D7)().state.radius),t},"drawDescrState"),u=(0,o.K)((t,e,a)=>{const i=(0,d.D7)().state.padding,n=2*(0,d.D7)().state.padding,r=t.node().getBBox(),s=r.width,o=r.x,g=t.append("text").attr("x",0).attr("y",(0,d.D7)().state.titleShift).attr("font-size",(0,d.D7)().state.fontSize).attr("class","state-title").text(e.id),p=g.node().getBBox().width+n;let h,c=Math.max(p,s);c===s&&(c+=n);const l=t.node().getBBox();e.doc,h=o-i,p>s&&(h=(s-c)/2+i),Math.abs(o-l.x)s&&(h=o-(p-s)/2);const x=1-(0,d.D7)().state.textHeight;return t.insert("rect",":first-child").attr("x",h).attr("y",x).attr("class",a?"alt-composit":"composit").attr("width",c).attr("height",l.height+(0,d.D7)().state.textHeight+(0,d.D7)().state.titleShift+1).attr("rx","0"),g.attr("x",h+i),p<=s&&g.attr("x",o+(c-n)/2-p/2+i),t.insert("rect",":first-child").attr("x",h).attr("y",(0,d.D7)().state.titleShift-(0,d.D7)().state.textHeight-(0,d.D7)().state.padding).attr("width",c).attr("height",3*(0,d.D7)().state.textHeight).attr("rx",(0,d.D7)().state.radius),t.insert("rect",":first-child").attr("x",h).attr("y",(0,d.D7)().state.titleShift-(0,d.D7)().state.textHeight-(0,d.D7)().state.padding).attr("width",c).attr("height",l.height+3+2*(0,d.D7)().state.textHeight).attr("rx",(0,d.D7)().state.radius),t},"addTitleAndBox"),f=(0,o.K)(t=>(t.append("circle").attr("class","end-state-outer").attr("r",(0,d.D7)().state.sizeUnit+(0,d.D7)().state.miniPadding).attr("cx",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+(0,d.D7)().state.miniPadding).attr("cy",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+(0,d.D7)().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",(0,d.D7)().state.sizeUnit).attr("cx",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+2).attr("cy",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+2)),"drawEndState"),y=(0,o.K)((t,e)=>{let a=(0,d.D7)().state.forkWidth,i=(0,d.D7)().state.forkHeight;if(e.parentId){let t=a;a=i,i=t}return t.append("rect").style("stroke","black").style("fill","black").attr("width",a).attr("height",i).attr("x",(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.padding)},"drawForkJoinState"),w=(0,o.K)((t,e,a,i)=>{let n=0;const r=i.append("text");r.style("text-anchor","start"),r.attr("class","noteText");let s=t.replace(/\r\n/g,"
");s=s.replace(/\n/g,"
");const o=s.split(d.Y2.lineBreakRegex);let g=1.25*(0,d.D7)().state.noteMargin;for(const p of o){const t=p.trim();if(t.length>0){const i=r.append("tspan");if(i.text(t),0===g){g+=i.node().getBBox().height}n+=g,i.attr("x",e+(0,d.D7)().state.noteMargin),i.attr("y",a+n+1.25*(0,d.D7)().state.noteMargin)}}return{textWidth:r.node().getBBox().width,textHeight:n}},"_drawLongText"),b=(0,o.K)((t,e)=>{e.attr("class","state-note");const a=e.append("rect").attr("x",0).attr("y",(0,d.D7)().state.padding),i=e.append("g"),{textWidth:n,textHeight:r}=w(t,0,0,i);return a.attr("height",r+2*(0,d.D7)().state.noteMargin),a.attr("width",n+2*(0,d.D7)().state.noteMargin),a},"drawNote"),B=(0,o.K)(function(t,e){const a=e.id,i={id:a,label:e.id,width:0,height:0},n=t.append("g").attr("id",a).attr("class","stateGroup");"start"===e.type&&c(n),"end"===e.type&&f(n),"fork"!==e.type&&"join"!==e.type||y(n,e),"note"===e.type&&b(e.note.text,n),"divider"===e.type&&l(n),"default"===e.type&&0===e.descriptions.length&&x(n,e),"default"===e.type&&e.descriptions.length>0&&D(n,e);const r=n.node().getBBox();return i.width=r.width+2*(0,d.D7)().state.padding,i.height=r.height+2*(0,d.D7)().state.padding,i},"drawState"),m=0,k=(0,o.K)(function(t,e,a){const i=(0,o.K)(function(t){switch(t){case n.u4.relationType.AGGREGATION:return"aggregation";case n.u4.relationType.EXTENSION:return"extension";case n.u4.relationType.COMPOSITION:return"composition";case n.u4.relationType.DEPENDENCY:return"dependency"}},"getRelationType");e.points=e.points.filter(t=>!Number.isNaN(t.y));const p=e.points,h=(0,g.n8j)().x(function(t){return t.x}).y(function(t){return t.y}).curve(g.qrM),c=t.append("path").attr("d",h(p)).attr("id","edge"+m).attr("class","transition");let l="";if((0,d.D7)().state.arrowMarkerAbsolute&&(l=(0,d.ID)(!0)),c.attr("marker-end","url("+l+"#"+i(n.u4.relationType.DEPENDENCY)+"End)"),void 0!==a.title){const i=t.append("g").attr("class","stateLabel"),{x:n,y:o}=r._K.calcLabelPosition(e.points),g=d.Y2.getRows(a.title);let p=0;const h=[];let c=0,l=0;for(let t=0;t<=g.length;t++){const e=i.append("text").attr("text-anchor","middle").text(g[t]).attr("x",n).attr("y",o+p),a=e.node().getBBox();if(c=Math.max(c,a.width),l=Math.min(l,a.x),s.R.info(a.x,n,o+p),0===p){const t=e.node().getBBox();p=t.height,s.R.info("Title height",p,o)}h.push(e)}let x=p*g.length;if(g.length>1){const t=(g.length-1)*p*.5;h.forEach((e,a)=>e.attr("y",o+a*p-t)),x=p*g.length}const D=i.node().getBBox();i.insert("rect",":first-child").attr("class","box").attr("x",n-c/2-(0,d.D7)().state.padding/2).attr("y",o-x/2-(0,d.D7)().state.padding/2-3.5).attr("width",c+(0,d.D7)().state.padding).attr("height",x+(0,d.D7)().state.padding),s.R.info(D)}m++},"drawEdge"),S={},N=(0,o.K)(function(){},"setConf"),E=(0,o.K)(function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),M=(0,o.K)(function(t,e,a,n){i=(0,d.D7)().state;const r=(0,d.D7)().securityLevel;let o;"sandbox"===r&&(o=(0,g.Ltv)("#i"+e));const p="sandbox"===r?(0,g.Ltv)(o.nodes()[0].contentDocument.body):(0,g.Ltv)("body"),h="sandbox"===r?o.nodes()[0].contentDocument:document;s.R.debug("Rendering diagram "+t);const c=p.select(`[id='${e}']`);E(c);const l=n.db.getRootDoc(),x=c.append("g").attr("id",e+"-root");K(l,x,void 0,!1,p,h,n);const D=i.padding,u=c.node().getBBox(),f=u.width+2*D,y=u.height+2*D,w=1.75*f;(0,d.a$)(c,y,w,i.useMaxWidth),c.attr("viewBox",`${u.x-i.padding} ${u.y-i.padding} `+f+" "+y)},"draw"),v=(0,o.K)(t=>t?t.length*i.fontSizeFactor:1,"getLabelWidth"),K=(0,o.K)((t,e,a,n,r,o,g)=>{const c=new h.T({compound:!0,multigraph:!0});let l,x=!0;for(l=0;l{const e=t.parentElement;let a=0,i=0;e&&(e.parentElement&&(a=e.parentElement.getBBox().width),i=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(i)&&(i=0)),t.setAttribute("x1",0-i+8),t.setAttribute("x2",a-i-8)})}else s.R.debug("No Node "+t+": "+JSON.stringify(c.node(t)))});let m=b.getBBox();c.edges().forEach(function(t){void 0!==t&&void 0!==c.edge(t)&&(s.R.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(c.edge(t))),k(e,c.edge(t),c.edge(t).relation))}),m=b.getBBox();const N={id:a||"root",label:a||"root",width:0,height:0};return N.width=m.width+2*i.padding,N.height=m.height+2*i.padding,s.R.debug("Doc rendered",N,c),N},"renderDoc"),R={setConf:N,draw:M},z={parser:n.Zk,get db(){return new n.u4(1)},renderer:R,styles:n.tM,init:(0,o.K)(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}}}]); \ No newline at end of file diff --git a/assets/js/165.f1226732.js b/assets/js/165.f1226732.js new file mode 100644 index 000000000..cb7bd38e7 --- /dev/null +++ b/assets/js/165.f1226732.js @@ -0,0 +1,2 @@ +/*! For license information please see 165.f1226732.js.LICENSE.txt */ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[165],{90165(e,t,n){function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function s(e,t,n){return(t=c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,s=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||h(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}n.d(t,{A:()=>Jh});var f="undefined"==typeof window?null:window,p=f?f.navigator:null;f&&f.document;var g,v,y,m,b,x,w,E,k,T,C,P,S,B,D,_,A,M,R,I,N,L,z,O,V,F,X,j,Y=d(""),q=d({}),W=d(function(){}),U="undefined"==typeof HTMLElement?"undefined":d(HTMLElement),H=function(e){return e&&e.instanceString&&G(e.instanceString)?e.instanceString():null},K=function(e){return null!=e&&d(e)==Y},G=function(e){return null!=e&&d(e)===W},Z=function(e){return!ee(e)&&(Array.isArray?Array.isArray(e):null!=e&&e instanceof Array)},$=function(e){return null!=e&&d(e)===q&&!Z(e)&&e.constructor===Object},Q=function(e){return null!=e&&d(e)===d(1)&&!isNaN(e)},J=function(e){return"undefined"===U?void 0:null!=e&&e instanceof HTMLElement},ee=function(e){return te(e)||ne(e)},te=function(e){return"collection"===H(e)&&e._private.single},ne=function(e){return"collection"===H(e)&&!e._private.single},re=function(e){return"core"===H(e)},ae=function(e){return"stylesheet"===H(e)},ie=function(e){return null==e||!(""!==e&&!e.match(/^\s+$/))},oe=function(e){return function(e){return null!=e&&d(e)===q}(e)&&G(e.then)},se=function(e,t){t||(t=function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return"undefined";for(var e=[],t=0;tt?1:0},be=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments,n=1;n255)return;t.push(Math.floor(i))}var o=r[1]||r[2]||r[3],s=r[1]&&r[2]&&r[3];if(o&&!s)return;var l=n[4];if(void 0!==l){if((l=parseFloat(l))<0||l>1)return;t.push(l)}}return t}(e)||function(e){var t,n,r,a,i,o,s,l;function u(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var c=new RegExp("^"+ve+"$").exec(e);if(c){if((n=parseInt(c[1]))<0?n=(360- -1*n%360)%360:n>360&&(n%=360),n/=360,(r=parseFloat(c[2]))<0||r>100)return;if(r/=100,(a=parseFloat(c[3]))<0||a>100)return;if(a/=100,void 0!==(i=c[4])&&((i=parseFloat(i))<0||i>1))return;if(0===r)o=s=l=Math.round(255*a);else{var d=a<.5?a*(1+r):a+r-a*r,h=2*a-d;o=Math.round(255*u(h,d,n+1/3)),s=Math.round(255*u(h,d,n)),l=Math.round(255*u(h,d,n-1/3))}t=[o,s,l,i]}return t}(e)},we={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Ee=function(e){for(var t=e.map,n=e.keys,r=n.length,a=0;a=o||t<0||v&&e-p>=c}function x(){var e=t();if(b(e))return w(e);h=setTimeout(x,function(e){var t=o-(e-f);return v?a(t,c-(e-p)):t}(e))}function w(e){return h=void 0,y&&l?m(e):(l=u=void 0,d)}function E(){var e=t(),n=b(e);if(l=arguments,u=this,f=e,n){if(void 0===h)return function(e){return p=e,h=setTimeout(x,o),g?m(e):d}(f);if(v)return clearTimeout(h),h=setTimeout(x,o),m(f)}return void 0===h&&(h=setTimeout(x,o)),d}return o=n(o)||0,e(s)&&(g=!!s.leading,c=(v="maxWait"in s)?r(n(s.maxWait)||0,o):c,y="trailing"in s?!!s.trailing:y),E.cancel=function(){void 0!==h&&clearTimeout(h),p=0,l=f=u=h=void 0},E.flush=function(){return void 0===h?d:w(t())},E},X}(),Re=Ce(Me),Ie=f?f.performance:null,Ne=Ie&&Ie.now?function(){return Ie.now()}:function(){return Date.now()},Le=function(){if(f){if(f.requestAnimationFrame)return function(e){f.requestAnimationFrame(e)};if(f.mozRequestAnimationFrame)return function(e){f.mozRequestAnimationFrame(e)};if(f.webkitRequestAnimationFrame)return function(e){f.webkitRequestAnimationFrame(e)};if(f.msRequestAnimationFrame)return function(e){f.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout(function(){e(Ne())},1e3/60)}}(),ze=function(e){return Le(e)},Oe=Ne,Ve=9261,Fe=5381,Xe=function(e){for(var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ve;!(t=e.next()).done;)n=65599*n+t.value|0;return n},je=function(e){return 65599*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ve)+e|0},Ye=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Fe;return(t<<5)+t+e|0},qe=function(e){return 2097152*e[0]+e[1]},We=function(e,t){return[je(e[0],t[0]),Ye(e[1],t[1])]},Ue=function(e,t){var n={value:0,done:!1},r=0,a=e.length;return Xe({next:function(){return r=0;r--)e[r]===t&&e.splice(r,1)},pt=function(e){e.splice(0,e.length)},gt=function(e,t,n){return n&&(t=ce(n,t)),e[t]},vt=function(e,t,n,r){n&&(t=ce(n,t)),e[t]=r},yt="undefined"!=typeof Map?Map:function(){return i(function e(){a(this,e),this._obj={}},[{key:"set",value:function(e,t){return this._obj[e]=t,this}},{key:"delete",value:function(e){return this._obj[e]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(e){return void 0!==this._obj[e]}},{key:"get",value:function(e){return this._obj[e]}}])}(),mt=function(){return i(function e(t){if(a(this,e),this._obj=Object.create(null),this.size=0,null!=t){var n;n=null!=t.instanceString&&t.instanceString()===this.instanceString()?t.toArray():t;for(var r=0;r2&&void 0!==arguments[2])||arguments[2];if(void 0!==e&&void 0!==t&&re(e)){var r=t.group;if(null==r&&(r=t.data&&null!=t.data.source&&null!=t.data.target?"edges":"nodes"),"nodes"===r||"edges"===r){this.length=1,this[0]=this;var a=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:r,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:void 0===t.selectable||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:void 0===t.grabbable||!!t.grabbable,pannable:void 0===t.pannable?"edges"===r:!!t.pannable,active:!1,classes:new bt,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:t.parent&&t.parent.isNode()?t.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(null==a.position.x&&(a.position.x=0),null==a.position.y&&(a.position.y=0),t.renderedPosition){var i=t.renderedPosition,o=e.pan(),s=e.zoom();a.position={x:(i.x-o.x)/s,y:(i.y-o.y)/s}}var l=[];Z(t.classes)?l=t.classes:K(t.classes)&&(l=t.classes.split(/\s+/));for(var u=0,c=l.length;ut?1:0},u=function(e,t,a,i,o){var s;if(null==a&&(a=0),null==o&&(o=n),a<0)throw new Error("lo must be non-negative");for(null==i&&(i=e.length);an;0<=n?t++:t--)u.push(t);return u}.apply(this).reverse()).length;ig;0<=g?++h:--h)v.push(i(e,r));return v},p=function(e,t,r,a){var i,o,s;for(null==a&&(a=n),i=e[r];r>t&&a(i,o=e[s=r-1>>1])<0;)e[r]=o,r=s;return e[r]=i},g=function(e,t,r){var a,i,o,s,l;for(null==r&&(r=n),i=e.length,l=t,o=e[t],a=2*t+1;a0;){var w=y.pop(),E=g(w),k=w.id();if(d[k]=E,E!==1/0)for(var T=w.neighborhood().intersect(f),C=0;C0)for(n.unshift(t);c[a];){var i=c[a];n.unshift(i.edge),n.unshift(i.node),a=(r=i.node).id()}return o.spawn(n)}}}},Rt={kruskal:function(e){e=e||function(e){return 1};for(var t=this.byGroup(),n=t.nodes,r=t.edges,a=n.length,i=new Array(a),o=n,s=function(e){for(var t=0;t0;){if(x(),E++,u===d){for(var k=[],T=a,C=d,P=m[C];k.unshift(T),null!=P&&k.unshift(P),null!=(T=y[C]);)P=m[C=T.id()];return{found:!0,distance:h[u],path:this.spawn(k),steps:E}}p[u]=!0;for(var S=l._private.edges,B=0;BP&&(f[C]=P,y[C]=T,m[C]=x),!a){var S=T*u+k;!a&&f[S]>P&&(f[S]=P,y[S]=k,m[S]=x)}}}for(var B=0;B1&&void 0!==arguments[1]?arguments[1]:i,r=[],a=m(e);;){if(null==a)return t.spawn();var o=y(a),l=o.edge,u=o.pred;if(r.unshift(a[0]),a.same(n)&&r.length>0)break;null!=l&&r.unshift(l),a=u}return s.spawn(r)},hasNegativeWeightCycle:p,negativeWeightCycles:g}}},Ft=Math.sqrt(2),Xt=function(e,t,n){0===n.length&&it("Karger-Stein must be run on a connected (sub)graph");for(var r=n[e],a=r[1],i=r[2],o=t[a],s=t[i],l=n,u=l.length-1;u>=0;u--){var c=l[u],d=c[1],h=c[2];(t[d]===o&&t[h]===s||t[d]===s&&t[h]===o)&&l.splice(u,1)}for(var f=0;fr;){var a=Math.floor(Math.random()*t.length);t=Xt(a,e,t),n--}return t},Yt={kargerStein:function(){var e=this,t=this.byGroup(),n=t.nodes,r=t.edges;r.unmergeBy(function(e){return e.isLoop()});var a=n.length,i=r.length,o=Math.ceil(Math.pow(Math.log(a)/Math.LN2,2)),s=Math.floor(a/Ft);if(!(a<2)){for(var l=[],u=0;u0?1:e<0?-1:0},Zt=function(e,t){return Math.sqrt($t(e,t))},$t=function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},Qt=function(e){for(var t=e.length,n=0,r=0;r=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(null!=e.w&&null!=e.h&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},rn=function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},an=function(e,t,n){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},on=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},sn=function(e){var t,n,r,a,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0];if(1===i.length)t=n=r=a=i[0];else if(2===i.length)t=r=i[0],a=n=i[1];else if(4===i.length){var o=l(i,4);t=o[0],n=o[1],r=o[2],a=o[3]}return e.x1-=a,e.x2+=n,e.y1-=t,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},ln=function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},un=function(e,t){return!(e.x1>t.x2)&&(!(t.x1>e.x2)&&(!(e.x2t.y2)&&!(t.y1>e.y2)))))))},cn=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},dn=function(e,t){return cn(e,t.x,t.y)},hn=function(e,t){return cn(e,t.x1,t.y1)&&cn(e,t.x2,t.y2)},fn=null!==(Dt=Math.hypot)&&void 0!==Dt?Dt:function(e,t){return Math.sqrt(e*e+t*t)};function pn(e,t,n,r,a,i){var o=function(e,t){if(e.length<3)throw new Error("Need at least 3 vertices");var n=function(e,t){return{x:e.x+t.x,y:e.y+t.y}},r=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},a=function(e,t){return{x:e.x*t,y:e.y*t}},i=function(e,t){return e.x*t.y-e.y*t.x},o=function(e){var t=fn(e.x,e.y);return 0===t?{x:0,y:0}:{x:e.x/t,y:e.y/t}},s=function(e,t,o,s){var l=r(t,e),u=r(s,o),c=i(l,u);if(Math.abs(c)<1e-9)return n(e,a(l,.5));var d=i(r(o,e),u)/c;return n(e,a(l,d))},l=e.map(function(e){return{x:e.x,y:e.y}});(function(e){for(var t=0,n=0;n7&&void 0!==arguments[7]?arguments[7]:"auto",c="auto"===u?In(a,i):u,d=a/2,h=i/2,f=(c=Math.min(c,d,h))!==d,p=c!==h;if(f){var g=r-h-o;if((s=Sn(e,t,n,r,n-d+c-o,g,n+d-c+o,g,!1)).length>0)return s}if(p){var v=n+d+o;if((s=Sn(e,t,n,r,v,r-h+c-o,v,r+h-c+o,!1)).length>0)return s}if(f){var y=r+h+o;if((s=Sn(e,t,n,r,n-d+c-o,y,n+d-c+o,y,!1)).length>0)return s}if(p){var m=n-d-o;if((s=Sn(e,t,n,r,m,r-h+c-o,m,r+h-c+o,!1)).length>0)return s}var b=n-d+c,x=r-h+c;if((l=Cn(e,t,n,r,b,x,c+o)).length>0&&l[0]<=b&&l[1]<=x)return[l[0],l[1]];var w=n+d-c,E=r-h+c;if((l=Cn(e,t,n,r,w,E,c+o)).length>0&&l[0]>=w&&l[1]<=E)return[l[0],l[1]];var k=n+d-c,T=r+h-c;if((l=Cn(e,t,n,r,k,T,c+o)).length>0&&l[0]>=k&&l[1]>=T)return[l[0],l[1]];var C=n-d+c,P=r+h-c;return(l=Cn(e,t,n,r,C,P,c+o)).length>0&&l[0]<=C&&l[1]>=P?[l[0],l[1]]:[]},vn=function(e,t,n,r,a,i,o){var s=o,l=Math.min(n,a),u=Math.max(n,a),c=Math.min(r,i),d=Math.max(r,i);return l-s<=e&&e<=u+s&&c-s<=t&&t<=d+s},yn=function(e,t,n,r,a,i,o,s,l){var u=Math.min(n,o,a)-l,c=Math.max(n,o,a)+l,d=Math.min(r,s,i)-l,h=Math.max(r,s,i)+l;return!(ec||th)},mn=function(e,t,n,r,a,i,o,s){var l=[];!function(e,t,n,r,a){var i,o,s,l,u,c,d,h;0===e&&(e=1e-5),s=-27*(r/=e)+(t/=e)*(9*(n/=e)-t*t*2),i=(o=(3*n-t*t)/9)*o*o+(s/=54)*s,a[1]=0,d=t/3,i>0?(u=(u=s+Math.sqrt(i))<0?-Math.pow(-u,1/3):Math.pow(u,1/3),c=(c=s-Math.sqrt(i))<0?-Math.pow(-c,1/3):Math.pow(c,1/3),a[0]=-d+u+c,d+=(u+c)/2,a[4]=a[2]=-d,d=Math.sqrt(3)*(-c+u)/2,a[3]=d,a[5]=-d):(a[5]=a[3]=0,0===i?(h=s<0?-Math.pow(-s,1/3):Math.pow(s,1/3),a[0]=2*h-d,a[4]=a[2]=-(h+d)):(l=(o=-o)*o*o,l=Math.acos(s/Math.sqrt(l)),h=2*Math.sqrt(o),a[0]=-d+h*Math.cos(l/3),a[2]=-d+h*Math.cos((l+2*Math.PI)/3),a[4]=-d+h*Math.cos((l+4*Math.PI)/3)))}(1*n*n-4*n*a+2*n*o+4*a*a-4*a*o+o*o+r*r-4*r*i+2*r*s+4*i*i-4*i*s+s*s,9*n*a-3*n*n-3*n*o-6*a*a+3*a*o+9*r*i-3*r*r-3*r*s-6*i*i+3*i*s,3*n*n-6*n*a+n*o-n*e+2*a*a+2*a*e-o*e+3*r*r-6*r*i+r*s-r*t+2*i*i+2*i*t-s*t,1*n*a-n*n+n*e-a*e+r*i-r*r+r*t-i*t,l);for(var u=[],c=0;c<6;c+=2)Math.abs(l[c+1])<1e-7&&l[c]>=0&&l[c]<=1&&u.push(l[c]);u.push(1),u.push(0);for(var d,h,f,p=-1,g=0;g=0?fl?(e-a)*(e-a)+(t-i)*(t-i):u-d},xn=function(e,t,n){for(var r,a,i,o,s=0,l=0;l=e&&e>=i||r<=e&&e<=i))continue;(e-r)/(i-r)*(o-a)+a>t&&s++}return s%2!=0},wn=function(e,t,n,r,a,i,o,s,l){var u,c=new Array(n.length);null!=s[0]?(u=Math.atan(s[1]/s[0]),s[0]<0?u+=Math.PI/2:u=-u-Math.PI/2):u=s;for(var d,h=Math.cos(-u),f=Math.sin(-u),p=0;p0){var g=kn(c,-l);d=En(g)}else d=c;return xn(e,t,d)},En=function(e){for(var t,n,r,a,i,o,s,l,u=new Array(e.length/2),c=0;c=0&&p<=1&&v.push(p),g>=0&&g<=1&&v.push(g),0===v.length)return[];var y=v[0]*s[0]+e,m=v[0]*s[1]+t;return v.length>1?v[0]==v[1]?[y,m]:[y,m,v[1]*s[0]+e,v[1]*s[1]+t]:[y,m]},Pn=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},Sn=function(e,t,n,r,a,i,o,s,l){var u=e-a,c=n-e,d=o-a,h=t-i,f=r-t,p=s-i,g=d*h-p*u,v=c*h-f*u,y=p*c-d*f;if(0!==y){var m=g/y,b=v/y,x=-.001;return x<=m&&m<=1.001&&x<=b&&b<=1.001||l?[e+m*c,t+m*f]:[]}return 0===g||0===v?Pn(e,n,o)===o?[o,s]:Pn(e,n,a)===a?[a,i]:Pn(a,o,n)===n?[n,r]:[]:[]},Bn=function(e,t,n,r,a){var i=[],o=r/2,s=a/2,l=t,u=n;i.push({x:l+o*e[0],y:u+s*e[1]});for(var c=1;c0){var m=kn(g,-s);u=En(m)}else u=g}else u=n;for(var b=0;bu&&(u=t)},d=function(e){return l[e]},h=0;h0?b.edgesTo(m)[0]:m.edgesTo(b)[0];var w=r(x);m=m.id(),u[m]>u[g]+w&&(u[m]=u[g]+w,h.nodes.indexOf(m)<0?h.push(m):h.updateItem(m),l[m]=0,n[m]=[]),u[m]==u[g]+w&&(l[m]=l[m]+l[g],n[m].push(g))}else for(var E=0;E0;){for(var P=t.pop(),S=0;S0&&o.push(n[s]);0!==o.length&&a.push(r.collection(o))}return a}(c,l,t,r);return b=function(e){for(var t=0;t5&&void 0!==arguments[5]?arguments[5]:nr,o=r,s=0;s=2?lr(e,t,n,0,ir,or):lr(e,t,n,0,ar)},squaredEuclidean:function(e,t,n){return lr(e,t,n,0,ir)},manhattan:function(e,t,n){return lr(e,t,n,0,ar)},max:function(e,t,n){return lr(e,t,n,-1/0,sr)}};function cr(e,t,n,r,a,i){var o;return o=G(e)?e:ur[e]||ur.euclidean,0===t&&G(e)?o(a,i):o(t,n,r,a,i)}ur["squared-euclidean"]=ur.squaredEuclidean,ur.squaredeuclidean=ur.squaredEuclidean;var dr=ht({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),hr=function(e){return dr(e)},fr=function(e,t,n,r,a){var i="kMedoids"!==a?function(e){return n[e]}:function(e){return r[e](n)},o=n,s=t;return cr(e,r.length,i,function(e){return r[e](t)},o,s)},pr=function(e,t,n){for(var r=n.length,a=new Array(r),i=new Array(r),o=new Array(t),s=null,l=0;ln)return!1}return!0},br=function(e,t,n){for(var r=0;ra&&(a=t[l][u],i=u);o[i].push(e[l])}for(var c=0;c=a.threshold||"dendrogram"===a.mode&&1===e.length)return!1;var f,p=t[o],g=t[r[o]];f="dendrogram"===a.mode?{left:p,right:g,key:p.key}:{value:p.value.concat(g.value),key:p.key},e[p.index]=f,e.splice(g.index,1),t[p.key]=f;for(var v=0;vn[g.key][y.key]&&(i=n[g.key][y.key])):"max"===a.linkage?(i=n[p.key][y.key],n[p.key][y.key]1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?(n0&&e.splice(0,t)):e=e.slice(t,n);for(var i=0,o=e.length-1;o>=0;o--){var s=e[o];a?isFinite(s)||(e[o]=-1/0,i++):e.splice(o,1)}r&&e.sort(function(e,t){return e-t});var l=e.length,u=Math.floor(l/2);return l%2!=0?e[u+1+i]:(e[u-1+i]+e[u+i])/2}(e):"mean"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=0,a=0,i=t;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=1/0,a=t;a1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=-1/0,a=t;ao&&(i=l,o=t[a*e+l])}i>0&&r.push(i)}for(var u=0;u=P?(S=P,P=D,B=_):D>S&&(S=D);for(var A=0;A0?1:0;k[E%u.minIterations*t+z]=O,L+=O}if(L>0&&(E>=u.minIterations-1||E==u.maxIterations-1)){for(var V=0,F=0;F0&&r.push(a);return r}(t,i,o),Y=function(e,t,n){for(var r=zr(e,t,n),a=0;al&&(s=u,l=c)}n[a]=i[s]}return zr(e,t,n)}(t,r,j),q={},W=0;W1||o>1)&&(u=!0),c[t]=[],e.outgoers().forEach(function(e){e.isEdge()&&c[t].push(e.id())})}else d[t]=[void 0,e.target().id()]}):l.forEach(function(e){var t=e.id();e.isNode()?(e.degree(!0)%2&&(n?r?u=!0:r=t:n=t),c[t]=[],e.connectedEdges().forEach(function(e){return c[t].push(e.id())})):d[t]=[e.source().id(),e.target().id()]});var h={found:!1,trail:void 0};if(u)return h;if(r&&n)if(s){if(a&&r!=a)return h;a=r}else{if(a&&r!=a&&n!=a)return h;a||(a=r)}else a||(a=l[0].id());var f=function(e){for(var t,n,r,a=e,i=[e];c[a].length;)t=c[a].shift(),n=d[t][0],a!=(r=d[t][1])?(c[r]=c[r].filter(function(e){return e!=t}),a=r):s||a==n||(c[n]=c[n].filter(function(e){return e!=t}),a=n),i.unshift(t),i.unshift(a);return i},p=[],g=[];for(g=f(a);1!=g.length;)0==c[g[0]].length?(p.unshift(l.getElementById(g.shift())),p.unshift(l.getElementById(g.shift()))):g=f(g.shift()).concat(g);for(var v in p.unshift(l.getElementById(g.shift())),c)if(c[v].length)return h;return h.found=!0,h.trail=this.spawn(p,!0),h}},jr=function(){var e=this,t={},n=0,r=0,a=[],i=[],o={},s=function(l,u,c){l===c&&(r+=1),t[u]={id:n,low:n++,cutVertex:!1};var d,h,f,p,g=e.getElementById(u).connectedEdges().intersection(e);0===g.size()?a.push(e.spawn(e.getElementById(u))):g.forEach(function(n){d=n.source().id(),h=n.target().id(),(f=d===u?h:d)!==c&&(p=n.id(),o[p]||(o[p]=!0,i.push({x:u,y:f,edge:n})),f in t?t[u].low=Math.min(t[u].low,t[f].id):(s(l,f,u),t[u].low=Math.min(t[u].low,t[f].low),t[u].id<=t[f].low&&(t[u].cutVertex=!0,function(n,r){for(var o=i.length-1,s=[],l=e.spawn();i[o].x!=n||i[o].y!=r;)s.push(i.pop().edge),o--;s.push(i.pop().edge),s.forEach(function(n){var r=n.connectedNodes().intersection(e);l.merge(n),r.forEach(function(n){var r=n.id(),a=n.connectedEdges().intersection(e);l.merge(n),t[r].cutVertex?l.merge(a.filter(function(e){return e.isLoop()})):l.merge(a)})}),a.push(l)}(u,f))))})};e.forEach(function(e){if(e.isNode()){var n=e.id();n in t||(r=0,s(n,n),t[n].cutVertex=r>1)}});var l=Object.keys(t).filter(function(e){return t[e].cutVertex}).map(function(t){return e.getElementById(t)});return{cut:e.spawn(l),components:a}},Yr=function(){var e=this,t={},n=0,r=[],a=[],i=e.spawn(e),o=function(s){if(a.push(s),t[s]={index:n,low:n++,explored:!1},e.getElementById(s).connectedEdges().intersection(e).forEach(function(e){var n=e.target().id();n!==s&&(n in t||o(n),t[n].explored||(t[s].low=Math.min(t[s].low,t[n].low)))}),t[s].index===t[s].low){for(var l=e.spawn();;){var u=a.pop();if(l.merge(e.getElementById(u)),t[u].low=t[s].index,t[u].explored=!0,u===s)break}var c=l.edgesWith(l),d=l.merge(c);r.push(d),i=i.difference(d)}};return e.forEach(function(e){if(e.isNode()){var n=e.id();n in t||o(n)}}),{cut:i,components:r}},qr={};[Et,Mt,Rt,Nt,zt,Vt,Yt,Vn,Xn,Yn,Wn,tr,Cr,Rr,Vr,Xr,{hopcroftTarjanBiconnected:jr,htbc:jr,htb:jr,hopcroftTarjanBiconnectedComponents:jr},{tarjanStronglyConnected:Yr,tsc:Yr,tscc:Yr,tarjanStronglyConnectedComponents:Yr}].forEach(function(e){be(qr,e)});var Wr=function(e){if(!(this instanceof Wr))return new Wr(e);this.id="Thenable/1.0.7",this.state=0,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},"function"==typeof e&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};Wr.prototype={fulfill:function(e){return Ur(this,1,"fulfillValue",e)},reject:function(e){return Ur(this,2,"rejectReason",e)},then:function(e,t){var n=this,r=new Wr;return n.onFulfilled.push(Gr(e,r,"fulfill")),n.onRejected.push(Gr(t,r,"reject")),Hr(n),r.proxy}};var Ur=function(e,t,n,r){return 0===e.state&&(e.state=t,e[n]=r,Hr(e)),e},Hr=function(e){1===e.state?Kr(e,"onFulfilled",e.fulfillValue):2===e.state&&Kr(e,"onRejected",e.rejectReason)},Kr=function(e,t,n){if(0!==e[t].length){var r=e[t];e[t]=[];var a=function(){for(var e=0;e0:void 0}},clearQueue:function(){return function(){var e=this,t=void 0!==e.length?e:[e];if(!(this._private.cy||this).styleEnabled())return this;for(var n=0;n-1}}(),a=function(){if(Wa)return qa;Wa=1;var e=Fi();return qa=function(t,n){var r=this.__data__,a=e(r,t);return a<0?(++this.size,r.push([t,n])):r[a][1]=n,this},qa}();function i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&t%1==0&&t0&&this.spawn(r).updateStyle().emit("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return null!=t&&t._private.classes.has(e)},toggleClass:function(e,t){Z(e)||(e=e.match(/\S+/g)||[]);for(var n=this,r=void 0===t,a=[],i=0,o=n.length;i0&&this.spawn(a).updateStyle().emit("class"),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var n=this;if(null==t)t=250;else if(0===t)return n;return n.addClass(e),setTimeout(function(){n.removeClass(e)},t),n}};Po.className=Po.classNames=Po.classes;var So={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:fe,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};So.variable="(?:[\\w-.]|(?:\\\\"+So.metaChar+"))+",So.className="(?:[\\w-]|(?:\\\\"+So.metaChar+"))+",So.value=So.string+"|"+So.number,So.id=So.variable,function(){var e,t,n;for(e=So.comparatorOp.split("|"),n=0;n=0||"="!==t&&(So.comparatorOp+="|\\!"+t)}();var Bo=0,Do=1,_o=2,Ao=3,Mo=4,Ro=5,Io=6,No=7,Lo=8,zo=9,Oo=10,Vo=11,Fo=12,Xo=13,jo=14,Yo=15,qo=16,Wo=17,Uo=18,Ho=19,Ko=20,Go=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort(function(e,t){return function(e,t){return-1*me(e,t)}(e.selector,t.selector)}),Zo=function(){for(var e,t={},n=0;n0&&u.edgeCount>0)return st("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(u.edgeCount>1)return st("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;1===u.edgeCount&&st("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},toString:function(){if(null!=this.toStringCache)return this.toStringCache;for(var e=function(e){return null==e?"":e},t=function(t){return K(t)?'"'+t+'"':e(t)},n=function(e){return" "+e+" "},r=function(r,i){var o=r.type,s=r.value;switch(o){case Bo:var l=e(s);return l.substring(0,l.length-1);case Ao:var u=r.field,c=r.operator;return"["+u+n(e(c))+t(s)+"]";case Ro:var d=r.operator,h=r.field;return"["+e(d)+h+"]";case Mo:return"["+r.field+"]";case Io:var f=r.operator;return"[["+r.field+n(e(f))+t(s)+"]]";case No:return s;case Lo:return"#"+s;case zo:return"."+s;case Wo:case Yo:return a(r.parent,i)+n(">")+a(r.child,i);case Uo:case qo:return a(r.ancestor,i)+" "+a(r.descendant,i);case Ho:var p=a(r.left,i),g=a(r.subject,i),v=a(r.right,i);return p+(p.length>0?" ":"")+g+v;case Ko:return""}},a=function(e,t){return e.checks.reduce(function(n,a,i){return n+(t===e&&0===i?"$":"")+r(a,t)},"")},i="",o=0;o1&&o=0&&(t=t.replace("!",""),c=!0),t.indexOf("@")>=0&&(t=t.replace("@",""),u=!0),(o||l||u)&&(a=o||s?""+e:"",i=""+n),u&&(e=a=a.toLowerCase(),n=i=i.toLowerCase()),t){case"*=":r=a.indexOf(i)>=0;break;case"$=":r=a.indexOf(i,a.length-i.length)>=0;break;case"^=":r=0===a.indexOf(i);break;case"=":r=e===n;break;case">":d=!0,r=e>n;break;case">=":d=!0,r=e>=n;break;case"<":d=!0,r=e0;){var u=a.shift();t(u),i.add(u.id()),o&&r(a,i,u)}return e}function vs(e,t,n){if(n.isParent())for(var r=n._private.children,a=0;a1&&void 0!==arguments[1])||arguments[1],vs)},ps.forEachUp=function(e){return gs(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],ys)},ps.forEachUpAndDown=function(e){return gs(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],ms)},ps.ancestors=ps.parents,(ds=hs={data:To.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:To.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:To.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:To.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:To.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:To.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}}).attr=ds.data,ds.removeAttr=ds.removeData;var bs,xs,ws=hs,Es={};function ks(e){return function(t){var n=this;if(void 0===t&&(t=!0),0!==n.length&&n.isNode()&&!n.removed()){for(var r=0,a=n[0],i=a._private.edges,o=0;ot}),minIndegree:Ts("indegree",function(e,t){return et}),minOutdegree:Ts("outdegree",function(e,t){return et})}),be(Es,{totalDegree:function(e){for(var t=0,n=this.nodes(),r=0;r0,c=u;u&&(l=l[0]);var d=c?l.position():{x:0,y:0};return a={x:s.x-d.x,y:s.y-d.y},void 0===e?a:a[e]}for(var h=0;h0,v=g;g&&(p=p[0]);var y=v?p.position():{x:0,y:0};void 0!==t?f.position(e,t+y[e]):void 0!==a&&f.position({x:a.x+y.x,y:a.y+y.y})}}else if(!i)return;return this}},bs.modelPosition=bs.point=bs.position,bs.modelPositions=bs.points=bs.positions,bs.renderedPoint=bs.renderedPosition,bs.relativePoint=bs.relativePosition;var Ss,Bs,Ds=xs,_s=function(e){switch(e){case"left":case"right-inside":return"left";case"right":case"left-inside":return"right";default:return"center"}},As=function(e){switch(e){case"top":case"bottom-inside":return"top";case"bottom":case"top-inside":return"bottom";default:return"center"}};Ss=Bs={},Bs.renderedBoundingBox=function(e){var t=this.boundingBox(e),n=this.cy(),r=n.zoom(),a=n.pan(),i=t.x1*r+a.x,o=t.x2*r+a.x,s=t.y1*r+a.y,l=t.y2*r+a.y;return{x1:i,x2:o,y1:s,y2:l,w:o-i,h:l-s}},Bs.dirtyCompoundBoundsCache=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();return t.styleEnabled()&&t.hasCompoundNodes()?(this.forEachUp(function(t){if(t.isParent()){var n=t._private;n.compoundBoundsClean=!1,n.bbCache=null,e||t.emitAndNotify("bounds")}}),this):this},Bs.updateCompoundBounds=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();if(!t.styleEnabled()||!t.hasCompoundNodes())return this;if(!e&&t.batching())return this;function n(e){if(e.isParent()){var t=e._private,n=e.children(),r="include"===e.pstyle("compound-sizing-wrt-labels").value,a={width:{val:e.pstyle("min-width").pfValue,left:e.pstyle("min-width-bias-left"),right:e.pstyle("min-width-bias-right")},height:{val:e.pstyle("min-height").pfValue,top:e.pstyle("min-height-bias-top"),bottom:e.pstyle("min-height-bias-bottom")}},i=n.boundingBox({includeLabels:r,includeOverlays:!1,useCache:!1}),o=t.position;0!==i.w&&0!==i.h||((i={w:e.pstyle("width").pfValue,h:e.pstyle("height").pfValue}).x1=o.x-i.w/2,i.x2=o.x+i.w/2,i.y1=o.y-i.h/2,i.y2=o.y+i.h/2);var s=a.width.left.value;"px"===a.width.left.units&&a.width.val>0&&(s=100*s/a.width.val);var l=a.width.right.value;"px"===a.width.right.units&&a.width.val>0&&(l=100*l/a.width.val);var u=a.height.top.value;"px"===a.height.top.units&&a.height.val>0&&(u=100*u/a.height.val);var c=a.height.bottom.value;"px"===a.height.bottom.units&&a.height.val>0&&(c=100*c/a.height.val);var d=y(a.width.val-i.w,s,l),h=d.biasDiff,f=d.biasComplementDiff,p=y(a.height.val-i.h,u,c),g=p.biasDiff,v=p.biasComplementDiff;t.autoPadding=function(e,t,n,r){if("%"!==n.units)return"px"===n.units?n.pfValue:0;switch(r){case"width":return e>0?n.pfValue*e:0;case"height":return t>0?n.pfValue*t:0;case"average":return e>0&&t>0?n.pfValue*(e+t)/2:0;case"min":return e>0&&t>0?e>t?n.pfValue*t:n.pfValue*e:0;case"max":return e>0&&t>0?e>t?n.pfValue*e:n.pfValue*t:0;default:return 0}}(i.w,i.h,e.pstyle("padding"),e.pstyle("padding-relative-to").value),t.autoWidth=Math.max(i.w,a.width.val),o.x=(-h+i.x1+i.x2+f)/2,t.autoHeight=Math.max(i.h,a.height.val),o.y=(-g+i.y1+i.y2+v)/2}function y(e,t,n){var r=0,a=0,i=t+n;return e>0&&i>0&&(r=t/i*e,a=n/i*e),{biasDiff:r,biasComplementDiff:a}}}for(var r=0;re.x2?r:e.x2,e.y1=ne.y2?a:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},Is=function(e,t){return null==t?e:Rs(e,t.x1,t.y1,t.x2,t.y2)},Ns=function(e,t,n){return gt(e,t,n)},Ls=function(e,t,n){if(!t.cy().headless()){var r,a,i=t._private,o=i.rstyle,s=o.arrowWidth/2;if("none"!==t.pstyle(n+"-arrow-shape").value){"source"===n?(r=o.srcX,a=o.srcY):"target"===n?(r=o.tgtX,a=o.tgtY):(r=o.midX,a=o.midY);var l=i.arrowBounds=i.arrowBounds||{},u=l[n]=l[n]||{};u.x1=r-s,u.y1=a-s,u.x2=r+s,u.y2=a+s,u.w=u.x2-u.x1,u.h=u.y2-u.y1,on(u,1),Rs(e,u.x1,u.y1,u.x2,u.y2)}}},zs=function(e,t,n){if(!t.cy().headless()){var r;r=n?n+"-":"";var a=t._private,i=a.rstyle;if(t.pstyle(r+"label").strValue){var o,s,l,u,c=t.pstyle("text-halign"),d=t.pstyle("text-valign"),h=Ns(i,"labelWidth",n),f=Ns(i,"labelHeight",n),p=Ns(i,"labelX",n),g=Ns(i,"labelY",n),v=t.pstyle(r+"text-margin-x").pfValue,y=t.pstyle(r+"text-margin-y").pfValue,m=t.isEdge(),b=t.pstyle(r+"text-rotation"),x=t.pstyle("text-outline-width").pfValue,w=t.pstyle("text-border-width").pfValue/2,E=t.pstyle("text-background-padding").pfValue,k=f,T=h,C=T/2,P=k/2;if(m)o=p-C,s=p+C,l=g-P,u=g+P;else{switch(_s(c.value)){case"left":o=p-T,s=p;break;case"center":o=p-C,s=p+C;break;case"right":o=p,s=p+T}switch(As(d.value)){case"top":l=g-k,u=g;break;case"center":l=g-P,u=g+P;break;case"bottom":l=g,u=g+k}}var S=v-Math.max(x,w)-E-2,B=v+Math.max(x,w)+E+2,D=y-Math.max(x,w)-E-2,_=y+Math.max(x,w)+E+2;o+=S,s+=B,l+=D,u+=_;var A=n||"main",M=a.labelBounds,R=M[A]=M[A]||{};R.x1=o,R.y1=l,R.x2=s,R.y2=u,R.w=s-o,R.h=u-l,R.leftPad=S,R.rightPad=B,R.topPad=D,R.botPad=_;var I=m&&"autorotate"===b.strValue,N=null!=b.pfValue&&0!==b.pfValue;if(I||N){var L=I?Ns(a.rstyle,"labelAngle",n):b.pfValue,z=Math.cos(L),O=Math.sin(L),V=(o+s)/2,F=(l+u)/2;if(!m){switch(_s(c.value)){case"left":V=s;break;case"right":V=o}switch(As(d.value)){case"top":F=u;break;case"bottom":F=l}}var X=function(e,t){return{x:(e-=V)*z-(t-=F)*O+V,y:e*O+t*z+F}},j=X(o,l),Y=X(o,u),q=X(s,l),W=X(s,u);o=Math.min(j.x,Y.x,q.x,W.x),s=Math.max(j.x,Y.x,q.x,W.x),l=Math.min(j.y,Y.y,q.y,W.y),u=Math.max(j.y,Y.y,q.y,W.y)}var U=A+"Rot",H=M[U]=M[U]||{};H.x1=o,H.y1=l,H.x2=s,H.y2=u,H.w=s-o,H.h=u-l,Rs(e,o,l,s,u),Rs(a.labelBounds.all,o,l,s,u)}return e}},Os=function(e,t){if(!t.cy().headless()){var n=t.pstyle("outline-opacity").value,r=t.pstyle("outline-width").value+t.pstyle("outline-offset").value;Vs(e,t,n,r,"outside",r/2)}},Vs=function(e,t,n,r,a,i){if(!(0===n||r<=0||"inside"===a)){var o=t.cy().renderer(),s=o.nodeShapes[o.getNodeShape(t)];if(s){var l=t.position(),u=l.x,c=l.y,d=t.width(),h=t.height();if(s.hasMiterBounds){"center"===a&&(r/=2);var f=s.miterBounds(u,c,d,h,r);Is(e,f)}else null!=i&&i>0&&sn(e,[i,i,i,i])}}},Fs=function(e,t){var n,r,a,i,o,s,l,u=e._private.cy,c=u.styleEnabled(),d=u.headless(),h=nn(),f=e._private,p=e.isNode(),g=e.isEdge(),v=f.rstyle,y=p&&c?e.pstyle("bounds-expansion").pfValue:[0],m=function(e){return"none"!==e.pstyle("display").value},b=!c||m(e)&&(!g||m(e.source())&&m(e.target()));if(b){var x=0;c&&t.includeOverlays&&0!==e.pstyle("overlay-opacity").value&&(x=e.pstyle("overlay-padding").value);var w=0;c&&t.includeUnderlays&&0!==e.pstyle("underlay-opacity").value&&(w=e.pstyle("underlay-padding").value);var E=Math.max(x,w),k=0;if(c&&(k=e.pstyle("width").pfValue/2),p&&t.includeNodes){var T=e.position();o=T.x,s=T.y;var C=e.outerWidth()/2,P=e.outerHeight()/2;Rs(h,n=o-C,a=s-P,r=o+C,i=s+P),c&&Os(h,e),c&&t.includeOutlines&&!d&&Os(h,e),c&&function(e,t){if(!t.cy().headless()){var n=t.pstyle("border-opacity").value,r=t.pstyle("border-width").pfValue,a=t.pstyle("border-position").value;Vs(e,t,n,r,a)}}(h,e)}else if(g&&t.includeEdges)if(c&&!d){var S=e.pstyle("curve-style").strValue;if(n=Math.min(v.srcX,v.midX,v.tgtX),r=Math.max(v.srcX,v.midX,v.tgtX),a=Math.min(v.srcY,v.midY,v.tgtY),i=Math.max(v.srcY,v.midY,v.tgtY),Rs(h,n-=k,a-=k,r+=k,i+=k),"haystack"===S){var B=v.haystackPts;if(B&&2===B.length){if(n=B[0].x,a=B[0].y,n>(r=B[1].x)){var D=n;n=r,r=D}if(a>(i=B[1].y)){var _=a;a=i,i=_}Rs(h,n-k,a-k,r+k,i+k)}}else if("bezier"===S||"unbundled-bezier"===S||he(S,"segments")||he(S,"taxi")){var A;switch(S){case"bezier":case"unbundled-bezier":A=v.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":A=v.linePts}if(null!=A)for(var M=0;M(r=N.x)){var L=n;n=r,r=L}if((a=I.y)>(i=N.y)){var z=a;a=i,i=z}Rs(h,n-=k,a-=k,r+=k,i+=k)}if(c&&t.includeEdges&&g&&(Ls(h,e,"mid-source"),Ls(h,e,"mid-target"),Ls(h,e,"source"),Ls(h,e,"target")),c)if("yes"===e.pstyle("ghost").value){var O=e.pstyle("ghost-offset-x").pfValue,V=e.pstyle("ghost-offset-y").pfValue;Rs(h,h.x1+O,h.y1+V,h.x2+O,h.y2+V)}var F=f.bodyBounds=f.bodyBounds||{};ln(F,h),sn(F,y),on(F,1),c&&(n=h.x1,r=h.x2,a=h.y1,i=h.y2,Rs(h,n-E,a-E,r+E,i+E));var X=f.overlayBounds=f.overlayBounds||{};ln(X,h),sn(X,y),on(X,1);var j=f.labelBounds=f.labelBounds||{};null!=j.all?((l=j.all).x1=1/0,l.y1=1/0,l.x2=-1/0,l.y2=-1/0,l.w=0,l.h=0):j.all=nn(),c&&t.includeLabels&&(t.includeMainLabels&&zs(h,e,null),g&&(t.includeSourceLabels&&zs(h,e,"source"),t.includeTargetLabels&&zs(h,e,"target")))}return h.x1=Ms(h.x1),h.y1=Ms(h.y1),h.x2=Ms(h.x2),h.y2=Ms(h.y2),h.w=Ms(h.x2-h.x1),h.h=Ms(h.y2-h.y1),h.w>0&&h.h>0&&b&&(sn(h,y),on(h,1)),h},Xs=function(e){var t=0,n=function(e){return(e?1:0)<0&&void 0!==arguments[0]?arguments[0]:sl,t=arguments.length>1?arguments[1]:void 0,n=0;n=0;s--)o(s);return this},ul.removeAllListeners=function(){return this.removeListener("*")},ul.emit=ul.trigger=function(e,t,n){var r=this.listeners,a=r.length;return this.emitting++,Z(t)||(t=[t]),hl(this,function(e,i){null!=n&&(r=[{event:i.event,type:i.type,namespace:i.namespace,callback:n}],a=r.length);for(var o=function(){var n=r[s];if(n.type===i.type&&(!n.namespace||n.namespace===i.namespace||".*"===n.namespace)&&e.eventMatches(e.context,n,i)){var a=[i];null!=t&&function(e,t){for(var n=0;n1&&!r){var a=this.length-1,i=this[a],o=i._private.data.id;this[a]=void 0,this[e]=i,n.set(o,{ele:i,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var t=this._private,n=e._private.data.id,r=t.map.get(n);if(!r)return this;var a=r.index;return this.unmergeAt(a),this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&K(e)){var n=e;e=t.mutableElements().filter(n)}for(var r=0;r=0;t--){e(this[t])&&this.unmergeAt(t)}return this},map:function(e,t){for(var n=[],r=this,a=0;ar&&(r=s,n=o)}return{value:r,ele:n}},min:function(e,t){for(var n,r=1/0,a=this,i=0;i=0&&a1&&void 0!==arguments[1])||arguments[1],n=this[0],r=n.cy();if(r.styleEnabled()&&n){n._private.styleDirty&&(n._private.styleDirty=!1,r.style().apply(n));var a=n._private.style[e];return null!=a?a:t?r.style().getDefaultProperty(e):null}},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var n=t.pstyle(e);return void 0!==n.pfValue?n.pfValue:n.value}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled())return t?t.pstyle(e).units:void 0},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=this[0];return n?t.style().getRenderedStyle(n,e):void 0},style:function(e,t){var n=this.cy();if(!n.styleEnabled())return this;var r=!1,a=n.style();if($(e)){var i=e;a.applyBypass(this,i,r),this.emitAndNotify("style")}else if(K(e)){if(void 0===t){var o=this[0];return o?a.getStylePropertyValue(o,e):void 0}a.applyBypass(this,e,t,r),this.emitAndNotify("style")}else if(void 0===e){var s=this[0];return s?a.getRawStyle(s):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=!1,r=t.style(),a=this;if(void 0===e)for(var i=0;i0&&t.push(c[0]),t.push(s[0])}return this.spawn(t,!0).filter(e)},"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}}),zl.neighbourhood=zl.neighborhood,zl.closedNeighbourhood=zl.closedNeighborhood,zl.openNeighbourhood=zl.openNeighborhood,be(zl,{source:fs(function(e){var t,n=this[0];return n&&(t=n._private.source||n.cy().collection()),t&&e?t.filter(e):t},"source"),target:fs(function(e){var t,n=this[0];return n&&(t=n._private.target||n.cy().collection()),t&&e?t.filter(e):t},"target"),sources:Xl({attr:"source"}),targets:Xl({attr:"target"})}),be(zl,{edgesWith:fs(jl(),"edgesWith"),edgesTo:fs(jl({thisIsSrc:!0}),"edgesTo")}),be(zl,{connectedEdges:fs(function(e){for(var t=[],n=0;n0);return i},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}}),zl.componentsOf=zl.components;var ql=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(void 0!==e){var a=new yt,i=!1;if(t){if(t.length>0&&$(t[0])&&!te(t[0])){i=!0;for(var o=[],s=new bt,l=0,u=t.length;l0&&void 0!==arguments[0])||arguments[0],r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=this,i=a.cy(),o=i._private,s=[],l=[],u=0,c=a.length;u0){for(var I=e.length===a.length?a:new ql(i,e),N=0;N0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this,r=[],a={},i=n._private.cy;function o(e){var n=a[e.id()];t&&e.removed()||n||(a[e.id()]=!0,e.isNode()?(r.push(e),function(e){for(var t=e._private.edges,n=0;n0&&(e?k.emitAndNotify("remove"):t&&k.emit("remove"));for(var T=0;T=.001?function(t,r){for(var a=0;a<4;++a){var i=h(r,e,n);if(0===i)return r;r-=(d(r,e,n)-t)/i}return r}(t,o):0===l?o:function(t,r,a){var i,o,s=0;do{(i=d(o=r+(a-r)/2,e,n)-t)>0?a=o:r=o}while(Math.abs(i)>1e-7&&++s<10);return o}(t,r,r+a)}var p=!1;function g(){p=!0,e===t&&n===r||function(){for(var t=0;t<11;++t)s[t]=d(t*a,e,n)}()}var v=function(a){return p||g(),e===t&&n===r?a:0===a?0:1===a?1:d(f(a),t,r)};v.getControlPoints=function(){return[{x:e,y:t},{x:n,y:r}]};var y="generateBezier("+[e,t,n,r]+")";return v.toString=function(){return y},v}var Kl=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,n,r){var a={x:t.x+r.dx*n,v:t.v+r.dv*n,tension:t.tension,friction:t.friction};return{dx:a.v,dv:e(a)}}function n(n,r){var a={dx:n.v,dv:e(n)},i=t(n,.5*r,a),o=t(n,.5*r,i),s=t(n,r,o),l=1/6*(a.dx+2*(i.dx+o.dx)+s.dx),u=1/6*(a.dv+2*(i.dv+o.dv)+s.dv);return n.x=n.x+l*r,n.v=n.v+u*r,n}return function e(t,r,a){var i,o,s,l={x:-1,v:0,tension:null,friction:null},u=[0],c=0,d=1e-4;for(t=parseFloat(t)||500,r=parseFloat(r)||20,a=a||null,l.tension=t,l.friction=r,o=(i=null!==a)?(c=e(t,r))/a*.016:.016;s=n(s||l,o),u.push(1+s.x),c+=16,Math.abs(s.x)>d&&Math.abs(s.v)>d;);return i?function(e){return u[e*(u.length-1)|0]}:c}}(),Gl=function(e,t,n,r){var a=Hl(e,t,n,r);return function(e,t,n){return e+(t-e)*a(n)}},Zl={linear:function(e,t,n){return e+(t-e)*n},ease:Gl(.25,.1,.25,1),"ease-in":Gl(.42,0,1,1),"ease-out":Gl(0,0,.58,1),"ease-in-out":Gl(.42,0,.58,1),"ease-in-sine":Gl(.47,0,.745,.715),"ease-out-sine":Gl(.39,.575,.565,1),"ease-in-out-sine":Gl(.445,.05,.55,.95),"ease-in-quad":Gl(.55,.085,.68,.53),"ease-out-quad":Gl(.25,.46,.45,.94),"ease-in-out-quad":Gl(.455,.03,.515,.955),"ease-in-cubic":Gl(.55,.055,.675,.19),"ease-out-cubic":Gl(.215,.61,.355,1),"ease-in-out-cubic":Gl(.645,.045,.355,1),"ease-in-quart":Gl(.895,.03,.685,.22),"ease-out-quart":Gl(.165,.84,.44,1),"ease-in-out-quart":Gl(.77,0,.175,1),"ease-in-quint":Gl(.755,.05,.855,.06),"ease-out-quint":Gl(.23,1,.32,1),"ease-in-out-quint":Gl(.86,0,.07,1),"ease-in-expo":Gl(.95,.05,.795,.035),"ease-out-expo":Gl(.19,1,.22,1),"ease-in-out-expo":Gl(1,0,0,1),"ease-in-circ":Gl(.6,.04,.98,.335),"ease-out-circ":Gl(.075,.82,.165,1),"ease-in-out-circ":Gl(.785,.135,.15,.86),spring:function(e,t,n){if(0===n)return Zl.linear;var r=Kl(e,t,n);return function(e,t,n){return e+(t-e)*r(n)}},"cubic-bezier":Gl};function $l(e,t,n,r,a){if(1===r)return n;if(t===n)return n;var i=a(t,n,r);return null==e||((e.roundValue||e.color)&&(i=Math.round(i)),void 0!==e.min&&(i=Math.max(i,e.min)),void 0!==e.max&&(i=Math.min(i,e.max))),i}function Ql(e,t){return null!=e.pfValue||null!=e.value?null==e.pfValue||null!=t&&"%"===t.type.units?e.value:e.pfValue:e}function Jl(e,t,n,r,a){var i=null!=a?a.type:null;n<0?n=0:n>1&&(n=1);var o=Ql(e,a),s=Ql(t,a);if(Q(o)&&Q(s))return $l(i,o,s,n,r);if(Z(o)&&Z(s)){for(var l=[],u=0;u0?("spring"===d&&h.push(o.duration),o.easingImpl=Zl[d].apply(null,h)):o.easingImpl=Zl[d]}var f,p=o.easingImpl;if(f=0===o.duration?1:(n-l)/o.duration,o.applying&&(f=o.progress),f<0?f=0:f>1&&(f=1),null==o.delay){var g=o.startPosition,v=o.position;if(v&&a&&!e.locked()){var y={};tu(g.x,v.x)&&(y.x=Jl(g.x,v.x,f,p)),tu(g.y,v.y)&&(y.y=Jl(g.y,v.y,f,p)),e.position(y)}var m=o.startPan,b=o.pan,x=i.pan,w=null!=b&&r;w&&(tu(m.x,b.x)&&(x.x=Jl(m.x,b.x,f,p)),tu(m.y,b.y)&&(x.y=Jl(m.y,b.y,f,p)),e.emit("pan"));var E=o.startZoom,k=o.zoom,T=null!=k&&r;T&&(tu(E,k)&&(i.zoom=tn(i.minZoom,Jl(E,k,f,p),i.maxZoom)),e.emit("zoom")),(w||T)&&e.emit("viewport");var C=o.style;if(C&&C.length>0&&a){for(var P=0;P=0;t--){(0,e[t])()}e.splice(0,e.length)},c=i.length-1;c>=0;c--){var d=i[c],h=d._private;h.stopped?(i.splice(c,1),h.hooked=!1,h.playing=!1,h.started=!1,u(h.frames)):(h.playing||h.applying)&&(h.playing&&h.applying&&(h.applying=!1),h.started||nu(0,d,e),eu(t,d,e,n),h.applying&&(h.applying=!1),u(h.frames),null!=h.step&&h.step(e),d.completed()&&(i.splice(c,1),h.hooked=!1,h.playing=!1,h.started=!1,u(h.completes)),s=!0)}return n||0!==i.length||0!==o.length||r.push(t),s}for(var i=!1,o=0;o0?t.notify("draw",n):t.notify("draw")),n.unmerge(r),t.emit("step")}var au={animate:To.animate(),animation:To.animation(),animated:To.animated(),clearQueue:To.clearQueue(),delay:To.delay(),delayAnimation:To.delayAnimation(),stop:To.stop(),addToAnimationPool:function(e){this.styleEnabled()&&this._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,e.styleEnabled()){var t=e.renderer();t&&t.beforeRender?t.beforeRender(function(t,n){ru(n,e)},t.beforeRenderPriorities.animations):function t(){e._private.animationsRunning&&ze(function(n){ru(n,e),t()})}()}}},iu={qualifierCompare:function(e,t){return null==e||null==t?null==e&&null==t:e.sameText(t)},eventMatches:function(e,t,n){var r=t.qualifier;return null==r||e!==n.target&&te(n.target)&&r.matches(n.target)},addEventFields:function(e,t){t.cy=e,t.target=e},callbackContext:function(e,t,n){return null!=t.qualifier?n.target:e}},ou=function(e){return K(e)?new ls(e):e},su={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new ll(iu,this)),this},emitter:function(){return this._private.emitter},on:function(e,t,n){return this.emitter().on(e,ou(t),n),this},removeListener:function(e,t,n){return this.emitter().removeListener(e,ou(t),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,n){return this.emitter().one(e,ou(t),n),this},once:function(e,t,n){return this.emitter().one(e,ou(t),n),this},emit:function(e,t){return this.emitter().emit(e,t),this},emitAndNotify:function(e,t){return this.emit(e),this.notify(e,t),this}};To.eventAliasesOn(su);var lu={png:function(e){return e=e||{},this._private.renderer.png(e)},jpg:function(e){var t=this._private.renderer;return(e=e||{}).bg=e.bg||"#fff",t.jpg(e)}};lu.jpeg=lu.jpg;var uu={layout:function(e){var t=this;if(null!=e)if(null!=e.name){var n=e.name,r=t.extension("layout",n);if(null!=r){var a;a=K(e.eles)?t.$(e.eles):null!=e.eles?e.eles:t.$();var i=new r(be({},e,{cy:t,eles:a}));return i}it("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?")}else it("A `name` must be specified to make a layout");else it("Layout options must be specified to make a layout")}};uu.createLayout=uu.makeLayout=uu.layout;var cu={notify:function(e,t){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var r=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();null!=t&&r.merge(t)}else if(n.notificationsEnabled){var a=this.renderer();!this.destroyed()&&a&&a.notify(e,t)}},notifications:function(e){var t=this._private;return void 0===e?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return null==e.batchCount&&(e.batchCount=0),0===e.batchCount&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(0===e.batchCount)return this;if(e.batchCount--,0===e.batchCount){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach(function(n){var r=e.batchNotifications[n];r.empty()?t.notify(n):t.notify(n,r)})}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var t=this;return this.batch(function(){for(var n=Object.keys(e),r=0;r0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(e){var t=e._private;t.rscratch={},t.rstyle={},t.animation.current=[],t.animation.queue=[]})},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};hu.invalidateDimensions=hu.resize;var fu={collection:function(e,t){return K(e)?this.$(e):ee(e)?e.collection():Z(e)?(t||(t={}),new ql(this,e,t.unique,t.removed)):new ql(this)},nodes:function(e){var t=this.$(function(e){return e.isNode()});return e?t.filter(e):t},edges:function(e){var t=this.$(function(e){return e.isEdge()});return e?t.filter(e):t},$:function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},mutableElements:function(){return this._private.elements}};fu.elements=fu.filter=fu.$;var pu={},gu="t";pu.apply=function(e){for(var t=this,n=t._private.cy.collection(),r=0;r0;if(h||d&&f){var p=void 0;h&&f||h?p=u.properties:f&&(p=u.mappedProperties);for(var g=0;g1&&(v=1),s.color){var w=a.valueMin[0],E=a.valueMax[0],k=a.valueMin[1],T=a.valueMax[1],C=a.valueMin[2],P=a.valueMax[2],S=null==a.valueMin[3]?1:a.valueMin[3],B=null==a.valueMax[3]?1:a.valueMax[3],D=[Math.round(w+(E-w)*v),Math.round(k+(T-k)*v),Math.round(C+(P-C)*v),Math.round(S+(B-S)*v)];n={bypass:a.bypass,name:a.name,value:D,strValue:"rgb("+D[0]+", "+D[1]+", "+D[2]+")"}}else{if(!s.number)return!1;var _=a.valueMin+(a.valueMax-a.valueMin)*v;n=this.parse(a.name,_,a.bypass,h)}if(!n)return g(),!1;n.mapping=a,a=n;break;case o.data:for(var A=a.field.split("."),M=d.data,R=0;R0&&i>0){for(var s={},l=!1,u=0;u0?e.delayAnimation(o).play().promise().then(t):t()}).then(function(){return e.animation({style:s,duration:i,easing:e.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){n.removeBypasses(e,a),e.emitAndNotify("style"),r.transitioning=!1})}else r.transitioning&&(this.removeBypasses(e,a),e.emitAndNotify("style"),r.transitioning=!1)},pu.checkTrigger=function(e,t,n,r,a,i){var o=this.properties[t],s=a(o);e.removed()||null!=s&&s(n,r,e)&&i(o)},pu.checkZOrderTrigger=function(e,t,n,r){var a=this;this.checkTrigger(e,t,n,r,function(e){return e.triggersZOrder},function(){a._private.cy.notify("zorder",e)})},pu.checkBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,function(e){return e.triggersBounds},function(t){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache()})},pu.checkConnectedEdgesBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,function(e){return e.triggersBoundsOfConnectedEdges},function(t){e.connectedEdges().forEach(function(e){e.dirtyBoundingBoxCache()})})},pu.checkParallelEdgesBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,function(e){return e.triggersBoundsOfParallelEdges},function(t){e.parallelEdges().forEach(function(e){e.dirtyBoundingBoxCache()})})},pu.checkTriggers=function(e,t,n,r){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,n,r),this.checkBoundsTrigger(e,t,n,r),this.checkConnectedEdgesBoundsTrigger(e,t,n,r),this.checkParallelEdgesBoundsTrigger(e,t,n,r)};var vu={applyBypass:function(e,t,n,r){var a=[];if("*"===t||"**"===t){if(void 0!==n)for(var i=0;it.length?i.substr(t.length):""}function s(){n=n.length>r.length?n.substr(r.length):""}for(i=i.replace(/[/][*](\s|.)+?[*][/]/g,"");;){if(i.match(/^\s*$/))break;var l=i.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!l){st("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+i);break}t=l[0];var u=l[1];if("core"!==u)if(new ls(u).invalid){st("Skipping parsing of block: Invalid selector found in string stylesheet: "+u),o();continue}var c=l[2],d=!1;n=c;for(var h=[];;){if(n.match(/^\s*$/))break;var f=n.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!f){st("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+c),d=!0;break}r=f[0];var p=f[1],g=f[2];if(this.properties[p])a.parse(p,g)?(h.push({name:p,val:g}),s()):(st("Skipping property: Invalid property definition in: "+r),s());else st("Skipping property: Invalid property name in: "+r),s()}if(d){o();break}a.selector(u);for(var v=0;v=7&&"d"===t[0]&&(u=new RegExp(s.data.regex).exec(t))){if(n)return!1;var h=s.data;return{name:e,value:u,strValue:""+t,mapped:h,field:u[1],bypass:n}}if(t.length>=10&&"m"===t[0]&&(c=new RegExp(s.mapData.regex).exec(t))){if(n)return!1;if(d.multiple)return!1;var f=s.mapData;if(!d.color&&!d.number)return!1;var p=this.parse(e,c[4]);if(!p||p.mapped)return!1;var g=this.parse(e,c[5]);if(!g||g.mapped)return!1;if(p.pfValue===g.pfValue||p.strValue===g.strValue)return st("`"+e+": "+t+"` is not a valid mapper because the output range is zero; converting to `"+e+": "+p.strValue+"`"),this.parse(e,p.strValue);if(d.color){var v=p.value,y=g.value;if(!(v[0]!==y[0]||v[1]!==y[1]||v[2]!==y[2]||v[3]!==y[3]&&(null!=v[3]&&1!==v[3]||null!=y[3]&&1!==y[3])))return!1}return{name:e,value:c,strValue:""+t,mapped:f,field:c[1],fieldMin:parseFloat(c[2]),fieldMax:parseFloat(c[3]),valueMin:p.value,valueMax:g.value,bypass:n}}}if(d.multiple&&"multiple"!==r){var m;if(m=l?t.split(/\s+/):Z(t)?t:[t],d.evenMultiple&&m.length%2!=0)return null;for(var b=[],x=[],w=[],E="",k=!1,T=0;T0?" ":"")+C.strValue}return d.validate&&!d.validate(b,x)?null:d.singleEnum&&k?1===b.length&&K(b[0])?{name:e,value:b[0],strValue:b[0],bypass:n}:null:{name:e,value:b,pfValue:w,strValue:E,bypass:n,units:x}}var P,S,B=function(){for(var r=0;rd.max||d.strictMax&&t===d.max))return null;var R={name:e,value:t,strValue:""+t+(D||""),units:D,bypass:n};return d.unitless||"px"!==D&&"em"!==D?R.pfValue=t:R.pfValue="px"!==D&&D?this.getEmSizeInPixels()*t:t,"ms"!==D&&"s"!==D||(R.pfValue="ms"===D?t:1e3*t),"deg"!==D&&"rad"!==D||(R.pfValue="rad"===D?t:(P=t,Math.PI*P/180)),"%"===D&&(R.pfValue=t/100),R}if(d.propList){var I=[],N=""+t;if("none"===N);else{for(var L=N.split(/\s*,\s*|\s+/),z=0;z0&&l>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0)return{zoom:o=(o=(o=Math.min((s-2*t)/n.w,(l-2*t)/n.h))>this._private.maxZoom?this._private.maxZoom:o)=n.minZoom&&(n.maxZoom=t),this},minZoom:function(e){return void 0===e?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return void 0===e?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var t,n,r=this._private,a=r.pan,i=r.zoom,o=!1;if(r.zoomingEnabled||(o=!0),Q(e)?n=e:$(e)&&(n=e.level,null!=e.position?t=qt(e.position,i,a):null!=e.renderedPosition&&(t=e.renderedPosition),null==t||r.panningEnabled||(o=!0)),n=(n=n>r.maxZoom?r.maxZoom:n)t.maxZoom||!t.zoomingEnabled?i=!0:(t.zoom=s,a.push("zoom"))}if(r&&(!i||!e.cancelOnFailedZoom)&&t.panningEnabled){var l=e.pan;Q(l.x)&&(t.pan.x=l.x,o=!1),Q(l.y)&&(t.pan.y=l.y,o=!1),o||a.push("pan")}return a.length>0&&(a.push("viewport"),this.emit(a.join(" ")),this.notify("viewport")),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(K(e)){var n=e;e=this.mutableElements().filter(n)}else ee(e)||(e=this.mutableElements());if(0!==e.length){var r=e.boundingBox(),a=this.width(),i=this.height();return{x:(a-(t=void 0===t?this._private.zoom:t)*(r.x1+r.x2))/2,y:(i-t*(r.y1+r.y2))/2}}}},reset:function(){return this._private.panningEnabled&&this._private.zoomingEnabled?(this.viewport({pan:{x:0,y:0},zoom:1}),this):this},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e,t,n=this._private,r=n.container,a=this;return n.sizeCache=n.sizeCache||(r?(e=a.window().getComputedStyle(r),t=function(t){return parseFloat(e.getPropertyValue(t))},{width:r.clientWidth-t("padding-left")-t("padding-right"),height:r.clientHeight-t("padding-top")-t("padding-bottom")}):{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,t=this._private.zoom,n=this.renderedExtent(),r={x1:(n.x1-e.x)/t,x2:(n.x2-e.x)/t,y1:(n.y1-e.y)/t,y2:(n.y2-e.y)/t};return r.w=r.x2-r.x1,r.h=r.y2-r.y1,r},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},multiClickDebounceTime:function(e){return e?(this._private.multiClickDebounceTime=e,this):this._private.multiClickDebounceTime}};Pu.centre=Pu.center,Pu.autolockNodes=Pu.autolock,Pu.autoungrabifyNodes=Pu.autoungrabify;var Su={data:To.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:To.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:To.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:To.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};Su.attr=Su.data,Su.removeAttr=Su.removeData;var Bu=function(e){var t=this,n=(e=be({},e)).container;n&&!J(n)&&J(n[0])&&(n=n[0]);var r=n?n._cyreg:null;(r=r||{})&&r.cy&&(r.cy.destroy(),r={});var a=r.readies=r.readies||[];n&&(n._cyreg=r),r.cy=t;var i=void 0!==f&&void 0!==n&&!e.headless,o=e;o.layout=be({name:i?"grid":"null"},o.layout),o.renderer=be({name:i?"canvas":"null"},o.renderer);var s=function(e,t,n){return void 0!==t?t:void 0!==n?n:e},l=this._private={container:n,ready:!1,options:o,elements:new ql(this),listeners:[],aniEles:new ql(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:s(!0,o.zoomingEnabled),userZoomingEnabled:s(!0,o.userZoomingEnabled),panningEnabled:s(!0,o.panningEnabled),userPanningEnabled:s(!0,o.userPanningEnabled),boxSelectionEnabled:s(!0,o.boxSelectionEnabled),autolock:s(!1,o.autolock,o.autolockNodes),autoungrabify:s(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:s(!1,o.autounselectify),styleEnabled:void 0===o.styleEnabled?i:o.styleEnabled,zoom:Q(o.zoom)?o.zoom:1,pan:{x:$(o.pan)&&Q(o.pan.x)?o.pan.x:0,y:$(o.pan)&&Q(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:s(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom});l.styleEnabled&&t.setStyle([]);var u=be({},o,o.renderer);t.initRenderer(u);!function(e,t){if(e.some(oe))return $r.all(e).then(t);t(e)}([o.style,o.elements],function(e){var n=e[0],i=e[1];l.styleEnabled&&t.style().append(n),function(e,n,r){t.notifications(!1);var a=t.mutableElements();a.length>0&&a.remove(),null!=e&&($(e)||Z(e))&&t.add(e),t.one("layoutready",function(e){t.notifications(!0),t.emit(e),t.one("load",n),t.emitAndNotify("load")}).one("layoutstop",function(){t.one("done",r),t.emit("done")});var i=be({},t._private.options.layout);i.eles=t.elements(),t.layout(i).run()}(i,function(){t.startAnimationLoop(),l.ready=!0,G(o.ready)&&t.on("ready",o.ready);for(var e=0;e0,l=!!t.boundingBox,u=nn(l?t.boundingBox:structuredClone(n.extent()));if(ee(t.roots))e=t.roots;else if(Z(t.roots)){for(var c=[],d=0;d0;){var D=B(),_=T(D,P);if(_)D.outgoers().filter(function(e){return e.isNode()&&r.has(e)}).forEach(S);else if(null===_){st("Detected double maximal shift for node `"+D.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var A=0;if(t.avoidOverlap)for(var M=0;M0&&y[0].length<=3?i/2:0),s=2*Math.PI/y[r].length*a;return 0===r&&1===y[0].length&&(o=1),{x:W+o*Math.cos(s),y:U+o*Math.sin(s)}}var c=y[r].length,d=Math.max(1===c?0:l?(u.w-2*t.padding-H.w)/((t.grid?$:c)-1):(u.w-2*t.padding-H.w)/((t.grid?$:c)+1),A);return{x:W+(a+1-(c+1)/2)*d,y:U+(r+1-(V+1)/2)*G}}(e),u,Q[t.direction])}),this};var Nu={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Lu(e){this.options=be({},Nu,e)}Lu.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,a=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,i=r.nodes().not(":parent");t.sort&&(i=i.sort(t.sort));for(var o,s=nn(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),l=s.x1+s.w/2,u=s.y1+s.h/2,c=(void 0===t.sweep?2*Math.PI-2*Math.PI/i.length:t.sweep)/Math.max(1,i.length-1),d=0,h=0;h1&&t.avoidOverlap){d*=1.75;var v=Math.cos(c)-Math.cos(0),y=Math.sin(c)-Math.sin(0),m=Math.sqrt(d*d/(v*v+y*y));o=Math.max(m,o)}return r.nodes().layoutPositions(this,t,function(e,n){var r=t.startAngle+n*c*(a?1:-1),i=o*Math.cos(r),s=o*Math.sin(r);return{x:l+i,y:u+s}}),this};var zu,Ou={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Vu(e){this.options=be({},Ou,e)}Vu.prototype.run=function(){for(var e=this.options,t=e,n=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,r=e.cy,a=t.eles,i=a.nodes().not(":parent"),o=nn(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s=o.x1+o.w/2,l=o.y1+o.h/2,u=[],c=0,d=0;d0)Math.abs(m[0].value-x.value)>=v&&(m=[],y.push(m));m.push(x)}var w=c+t.minNodeSpacing;if(!t.avoidOverlap){var E=y.length>0&&y[0].length>1,k=(Math.min(o.w,o.h)/2-w)/(y.length+E?1:0);w=Math.min(w,k)}for(var T=0,C=0;C1&&t.avoidOverlap){var D=Math.cos(B)-Math.cos(0),_=Math.sin(B)-Math.sin(0),A=Math.sqrt(w*w/(D*D+_*_));T=Math.max(A,T)}P.r=T,T+=w}if(t.equidistant){for(var M=0,R=0,I=0;I=e.numIter)&&(Ku(r,e),r.temperature=r.temperature*e.coolingFactor,!(r.temperature=e.animationThreshold&&i(),ze(c)):(oc(r,e),s())};c()}else{for(;u;)u=o(l),l++;oc(r,e),s()}return this},Xu.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},Xu.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var ju=function(e,t,n){for(var r=n.eles.edges(),a=n.eles.nodes(),i=nn(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:a.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:i.w,clientHeight:i.h,boundingBox:i},s=n.eles.components(),l={},u=0;u0){o.graphSet.push(w);for(u=0;ur.count?0:r.graph},qu=function(e,t,n,r){var a=r.graphSet[n];if(-10)var s=(u=r.nodeOverlap*o)*a/(g=Math.sqrt(a*a+i*i)),l=u*i/g;else{var u,c=Ju(e,a,i),d=Ju(t,-1*a,-1*i),h=d.x-c.x,f=d.y-c.y,p=h*h+f*f,g=Math.sqrt(p);s=(u=(e.nodeRepulsion+t.nodeRepulsion)/p)*h/g,l=u*f/g}e.isLocked||(e.offsetX-=s,e.offsetY-=l),t.isLocked||(t.offsetX+=s,t.offsetY+=l)}},Qu=function(e,t,n,r){if(n>0)var a=e.maxX-t.minX;else a=t.maxX-e.minX;if(r>0)var i=e.maxY-t.minY;else i=t.maxY-e.minY;return a>=0&&i>=0?Math.sqrt(a*a+i*i):0},Ju=function(e,t,n){var r=e.positionX,a=e.positionY,i=e.height||1,o=e.width||1,s=n/t,l=i/o,u={};return 0===t&&0n?(u.x=r,u.y=a+i/2,u):0t&&-1*l<=s&&s<=l?(u.x=r-o/2,u.y=a-o*n/2/t,u):0=l)?(u.x=r+i*t/2/n,u.y=a+i/2,u):0>n&&(s<=-1*l||s>=l)?(u.x=r-i*t/2/n,u.y=a-i/2,u):u},ec=function(e,t){for(var n=0;n1){var p=t.gravity*d/f,g=t.gravity*h/f;c.offsetX+=p,c.offsetY+=g}}}}},nc=function(e,t){var n=[],r=0,a=-1;for(n.push.apply(n,e.graphSet[0]),a+=e.graphSet[0].length;r<=a;){var i=n[r++],o=e.idToIndex[i],s=e.layoutNodes[o],l=s.children;if(0n)var a={x:n*e/r,y:n*t/r};else a={x:e,y:t};return a},ic=function(e,t){var n=e.parentId;if(null!=n){var r=t.layoutNodes[t.idToIndex[n]],a=!1;return(null==r.maxX||e.maxX+r.padRight>r.maxX)&&(r.maxX=e.maxX+r.padRight,a=!0),(null==r.minX||e.minX-r.padLeftr.maxY)&&(r.maxY=e.maxY+r.padBottom,a=!0),(null==r.minY||e.minY-r.padTopp&&(d+=f+t.componentSpacing,c=0,h=0,f=0)}}},sc={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function lc(e){this.options=be({},sc,e)}lc.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,a=r.nodes().not(":parent");t.sort&&(a=a.sort(t.sort));var i=nn(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(0===i.h||0===i.w)r.nodes().layoutPositions(this,t,function(e){return{x:i.x1,y:i.y1}});else{var o=a.size(),s=Math.sqrt(o*i.h/i.w),l=Math.round(s),u=Math.round(i.w/i.h*s),c=function(e){if(null==e)return Math.min(l,u);Math.min(l,u)==l?l=e:u=e},d=function(e){if(null==e)return Math.max(l,u);Math.max(l,u)==l?l=e:u=e},h=t.rows,f=null!=t.cols?t.cols:t.columns;if(null!=h&&null!=f)l=h,u=f;else if(null!=h&&null==f)l=h,u=Math.ceil(o/l);else if(null==h&&null!=f)u=f,l=Math.ceil(o/u);else if(u*l>o){var p=c(),g=d();(p-1)*g>=o?c(p-1):(g-1)*p>=o&&d(g-1)}else for(;u*l=o?d(y+1):c(v+1)}var m=i.w/u,b=i.h/l;if(t.condense&&(m=0,b=0),t.avoidOverlap)for(var x=0;x=u&&(A=0,_++)},R={},I=0;I(r=bn(e,t,x[w],x[w+1],x[w+2],x[w+3])))return v(n,r),!0}else if("bezier"===i.edgeType||"multibezier"===i.edgeType||"self"===i.edgeType||"compound"===i.edgeType)for(x=i.allpts,w=0;w+5(r=mn(e,t,x[w],x[w+1],x[w+2],x[w+3],x[w+4],x[w+5])))return v(n,r),!0;m=m||a.source,b=b||a.target;var E=o.getArrowWidth(l,c),k=[{name:"source",x:i.arrowStartX,y:i.arrowStartY,angle:i.srcArrowAngle},{name:"target",x:i.arrowEndX,y:i.arrowEndY,angle:i.tgtArrowAngle},{name:"mid-source",x:i.midX,y:i.midY,angle:i.midsrcArrowAngle},{name:"mid-target",x:i.midX,y:i.midY,angle:i.midtgtArrowAngle}];for(w=0;w0&&(y(m),y(b))}function b(e,t,n){return gt(e,t,n)}function x(n,r){var a,i=n._private,o=p;a=r?r+"-":"",n.boundingBox();var s=i.labelBounds[r||"main"],l=n.pstyle(a+"label").value;if("yes"===n.pstyle("text-events").strValue&&l){var u=b(i.rscratch,"labelX",r),c=b(i.rscratch,"labelY",r),d=b(i.rscratch,"labelAngle",r),h=n.pstyle(a+"text-margin-x").pfValue,f=n.pstyle(a+"text-margin-y").pfValue,g=s.x1-o-h,y=s.x2+o-h,m=s.y1-o-f,x=s.y2+o-f;if(d){var w=Math.cos(d),E=Math.sin(d),k=function(e,t){return{x:(e-=u)*w-(t-=c)*E+u,y:e*E+t*w+c}},T=k(g,m),C=k(g,x),P=k(y,m),S=k(y,x),B=[T.x+h,T.y+f,P.x+h,P.y+f,S.x+h,S.y+f,C.x+h,C.y+f];if(xn(e,t,B))return v(n),!0}else if(cn(s,e,t))return v(n),!0}}n&&(l=l.interactive);for(var w=l.length-1;w>=0;w--){var E=l[w];E.isNode()?y(E)||x(E):m(E)||x(E)||x(E,"source")||x(E,"target")}return u},getAllInBox:function(e,t,n,r){var a=this.getCachedZSortedEles().interactive,i=2/this.cy.zoom(),o=[],s=Math.min(e,n),u=Math.max(e,n),c=Math.min(t,r),d=Math.max(t,r),h=nn({x1:e=s,y1:t=c,x2:n=u,y2:r=d}),f=[{x:h.x1,y:h.y1},{x:h.x2,y:h.y1},{x:h.x2,y:h.y2},{x:h.x1,y:h.y2}],p=[[f[0],f[1]],[f[1],f[2]],[f[2],f[3]],[f[3],f[0]]];function g(e,t,n){return gt(e,t,n)}function v(e,t){var n=e._private,r=i;e.boundingBox();var a=n.labelBounds.main;if(!a)return null;var o=g(n.rscratch,"labelX",t),s=g(n.rscratch,"labelY",t),l=g(n.rscratch,"labelAngle",t),u=e.pstyle("text-margin-x").pfValue,c=e.pstyle("text-margin-y").pfValue,d=a.x1-r-u,h=a.x2+r-u,f=a.y1-r-c,p=a.y2+r-c;if(l){var v=Math.cos(l),y=Math.sin(l),m=function(e,t){return{x:(e-=o)*v-(t-=s)*y+o,y:e*y+t*v+s}};return[m(d,f),m(h,f),m(h,p),m(d,p)]}return[{x:d,y:f},{x:h,y:f},{x:h,y:p},{x:d,y:p}]}function y(e,t,n,r){function a(e,t,n){return(n.y-e.y)*(t.x-e.x)>(t.y-e.y)*(n.x-e.x)}return a(e,n,r)!==a(t,n,r)&&a(e,t,n)!==a(e,t,r)}for(var m=0;m0?-(Math.PI-i.ang):Math.PI+i.ang),Xc(t,n,Fc),Tc=Vc.nx*Fc.ny-Vc.ny*Fc.nx,Cc=Vc.nx*Fc.nx-Vc.ny*-Fc.ny,Bc=Math.asin(Math.max(-1,Math.min(1,Tc))),Math.abs(Bc)<1e-6)return Ec=t.x,kc=t.y,void(_c=Mc=0);Pc=1,Sc=!1,Cc<0?Bc<0?Bc=Math.PI+Bc:(Bc=Math.PI-Bc,Pc=-1,Sc=!0):Bc>0&&(Pc=-1,Sc=!0),Mc=void 0!==t.radius?t.radius:r,Dc=Bc/2,Rc=Math.min(Vc.len/2,Fc.len/2),a?(Ac=Math.abs(Math.cos(Dc)*Mc/Math.sin(Dc)))>Rc?(Ac=Rc,_c=Math.abs(Ac*Math.sin(Dc)/Math.cos(Dc))):_c=Mc:(Ac=Math.min(Rc,Mc),_c=Math.abs(Ac*Math.sin(Dc)/Math.cos(Dc))),Lc=t.x+Fc.nx*Ac,zc=t.y+Fc.ny*Ac,Ec=Lc-Fc.ny*_c*Pc,kc=zc+Fc.nx*_c*Pc,Ic=t.x+Vc.nx*Ac,Nc=t.y+Vc.ny*Ac,Oc=t};function Yc(e,t){0===t.radius?e.lineTo(t.cx,t.cy):e.arc(t.cx,t.cy,t.radius,t.startAngle,t.endAngle,t.counterClockwise)}function qc(e,t,n,r){var a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return 0===r||0===t.radius?{cx:t.x,cy:t.y,radius:0,startX:t.x,startY:t.y,stopX:t.x,stopY:t.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(jc(e,t,n,r,a),{cx:Ec,cy:kc,radius:_c,startX:Ic,startY:Nc,stopX:Lc,stopY:zc,startAngle:Vc.ang+Math.PI/2*Pc,endAngle:Fc.ang-Math.PI/2*Pc,counterClockwise:Sc})}var Wc=.01,Uc=Math.sqrt(.02),Hc={};function Kc(e){var t=[];if(null!=e){for(var n=0;n0?Math.max(e-t,0):Math.min(e+t,0)},S=P(T,E),B=P(C,k),D=!1;"auto"===v?g=Math.abs(S)>Math.abs(B)?a:r:v===l||v===s?(g=r,D=!0):v!==i&&v!==o||(g=a,D=!0);var _,A=g===r,M=A?B:S,R=A?C:T,I=Gt(R),N=!1;(D&&(m||x)||!(v===s&&R<0||v===l&&R>0||v===i&&R>0||v===o&&R<0)||(M=(I*=-1)*Math.abs(M),N=!0),m)?_=(b<0?1+b:b)*M:_=(b<0?M:0)+b*I;var L=function(e){return Math.abs(e)=Math.abs(M)},z=L(_),O=L(Math.abs(M)-Math.abs(_));if((z||O)&&!N)if(A){var V=Math.abs(R)<=d/2,F=Math.abs(T)<=h/2;if(V){var X=(u.x1+u.x2)/2,j=u.y1,Y=u.y2;n.segpts=[X,j,X,Y]}else if(F){var q=(u.y1+u.y2)/2,W=u.x1,U=u.x2;n.segpts=[W,q,U,q]}else n.segpts=[u.x1,u.y2]}else{var H=Math.abs(R)<=c/2,K=Math.abs(C)<=f/2;if(H){var G=(u.y1+u.y2)/2,Z=u.x1,$=u.x2;n.segpts=[Z,G,$,G]}else if(K){var Q=(u.x1+u.x2)/2,J=u.y1,ee=u.y2;n.segpts=[Q,J,Q,ee]}else n.segpts=[u.x2,u.y1]}else if(A){var te=u.y1+_+(p?d/2*I:0),ne=u.x1,re=u.x2;n.segpts=[ne,te,re,te]}else{var ae=u.x1+_+(p?c/2*I:0),ie=u.y1,oe=u.y2;n.segpts=[ae,ie,ae,oe]}if(n.isRound){var se=e.pstyle("taxi-radius").value,le="arc-radius"===e.pstyle("radius-type").value[0];n.radii=new Array(n.segpts.length/2).fill(se),n.isArcRadius=new Array(n.segpts.length/2).fill(le)}},Hc.tryToCorrectInvalidPoints=function(e,t){var n=e._private.rscratch;if("bezier"===n.edgeType){var r=t.srcPos,a=t.tgtPos,i=t.srcW,o=t.srcH,s=t.tgtW,l=t.tgtH,u=t.srcShape,c=t.tgtShape,d=t.srcCornerRadius,h=t.tgtCornerRadius,f=t.srcRs,p=t.tgtRs,g=!Q(n.startX)||!Q(n.startY),v=!Q(n.arrowStartX)||!Q(n.arrowStartY),y=!Q(n.endX)||!Q(n.endY),m=!Q(n.arrowEndX)||!Q(n.arrowEndY),b=3*(this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth),x=Zt({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.startX,y:n.startY}),w=xg.poolIndex()){var v=p;p=g,g=v}var y=d.srcPos=p.position(),m=d.tgtPos=g.position(),b=d.srcW=p.outerWidth(),x=d.srcH=p.outerHeight(),E=d.tgtW=g.outerWidth(),k=d.tgtH=g.outerHeight(),T=d.srcShape=n.nodeShapes[t.getNodeShape(p)],C=d.tgtShape=n.nodeShapes[t.getNodeShape(g)],P=d.srcCornerRadius="auto"===p.pstyle("corner-radius").value?"auto":p.pstyle("corner-radius").pfValue,S=d.tgtCornerRadius="auto"===g.pstyle("corner-radius").value?"auto":g.pstyle("corner-radius").pfValue,B=d.tgtRs=g._private.rscratch,D=d.srcRs=p._private.rscratch;d.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var _=0;_=Uc||(q=Math.sqrt(Math.max(Y*Y,Wc)+Math.max(j*j,Wc)));var W=d.vector={x:Y,y:j},U=d.vectorNorm={x:W.x/q,y:W.y/q},H={x:-U.y,y:U.x};d.nodesOverlap=!Q(q)||C.checkPoint(L[0],L[1],0,E,k,m.x,m.y,S,B)||T.checkPoint(O[0],O[1],0,b,x,y.x,y.y,P,D),d.vectorNormInverse=H,e={nodesOverlap:d.nodesOverlap,dirCounts:d.dirCounts,calculatedIntersection:!0,hasBezier:d.hasBezier,hasUnbundled:d.hasUnbundled,eles:d.eles,srcPos:m,srcRs:B,tgtPos:y,tgtRs:D,srcW:E,srcH:k,tgtW:b,tgtH:x,srcIntn:V,tgtIntn:z,srcShape:C,tgtShape:T,posPts:{x1:X.x2,y1:X.y2,x2:X.x1,y2:X.y1},intersectionPts:{x1:F.x2,y1:F.y2,x2:F.x1,y2:F.y1},vector:{x:-W.x,y:-W.y},vectorNorm:{x:-U.x,y:-U.y},vectorNormInverse:{x:-H.x,y:-H.y}}}var K=N?e:d;M.nodesOverlap=K.nodesOverlap,M.srcIntn=K.srcIntn,M.tgtIntn=K.tgtIntn,M.isRound=R.startsWith("round"),r&&(p.isParent()||p.isChild()||g.isParent()||g.isChild())&&(p.parents().anySame(g)||g.parents().anySame(p)||p.same(g)&&p.isParent())?t.findCompoundLoopPoints(A,K,_,I):p===g?t.findLoopPoints(A,K,_,I):R.endsWith("segments")?t.findSegmentsPoints(A,K):R.endsWith("taxi")?t.findTaxiPoints(A,K):"straight"===R||!I&&d.eles.length%2==1&&_===Math.floor(d.eles.length/2)?t.findStraightEdgePoints(A):t.findBezierPoints(A,K,_,I,N),t.findEndpoints(A),t.tryToCorrectInvalidPoints(A,K),t.checkForInvalidEdgeWarning(A),t.storeAllpts(A),t.storeEdgeProjections(A),t.calculateArrowAngles(A),t.recalculateEdgeLabelProjections(A),t.calculateLabelAngles(A)}},w=0;w0){var J=f,ee=$t(J,Ut(i)),te=$t(J,Ut($)),ne=ee;if(te2)$t(J,{x:$[2],y:$[3]})0){var ve=p,ye=$t(ve,Ut(i)),me=$t(ve,Ut(ge)),be=ye;if(me2)$t(ve,{x:ge[2],y:ge[3]})=u||m){c={cp:g,segment:y};break}}if(c)break}var b=c.cp,x=c.segment,w=(u-h)/x.length,E=x.t1-x.t0,k=s?x.t0+E*w:x.t1-E*w;k=tn(0,k,1),t=en(b.p0,b.p1,b.p2,k),a=function(e,t,n,r){var a=tn(0,r-.001,1),i=tn(0,r+.001,1),o=en(e,t,n,a),s=en(e,t,n,i);return ed(o,s)}(b.p0,b.p1,b.p2,k);break;case"straight":case"segments":case"haystack":for(var T,C,P,S,B=0,D=r.allpts.length,_=0;_+3=u));_+=2);var A=(u-C)/T;A=tn(0,A,1),t=function(e,t,n,r){var a=t.x-e.x,i=t.y-e.y,o=Zt(e,t),s=a/o,l=i/o;return n=null==n?0:n,r=null!=r?r:n*o,{x:e.x+s*r,y:e.y+l*r}}(P,S,A),a=ed(P,S)}o("labelX",n,t.x),o("labelY",n,t.y),o("labelAutoAngle",n,a)}};u("source"),u("target"),this.applyLabelDimensions(e)}},Qc.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},Qc.applyPrefixedLabelDimensions=function(e,t){var n=e._private,r=this.getLabelText(e,t),a=He(r,e._private.labelDimsKey);if(gt(n.rscratch,"prefixedLabelDimsKey",t)!==a){vt(n.rscratch,"prefixedLabelDimsKey",t,a);var i=this.calculateLabelDimensions(e,r),o=e.pstyle("line-height").pfValue,s=e.pstyle("font-size").pfValue,l=e.pstyle("text-wrap").strValue,u=gt(n.rscratch,"labelWrapCachedLines",t)||[],c="wrap"!==l?1:Math.max(u.length,1),d=s*o,h=i.width,f=i.height+(c-1)*(o-1)*s;vt(n.rstyle,"labelWidth",t,h),vt(n.rscratch,"labelWidth",t,h),vt(n.rstyle,"labelHeight",t,f),vt(n.rscratch,"labelHeight",t,f),vt(n.rscratch,"labelLineHeight",t,d),vt(n.rscratch,"labelActualDescent",t,i.labelActualDescent)}},Qc.getLabelText=function(e,t){var n=e._private,r=t?t+"-":"",a=e.pstyle(r+"label").strValue,i=e.pstyle("text-transform").value,s=function(e,r){return r?(vt(n.rscratch,e,t,r),r):gt(n.rscratch,e,t)};if(!a)return"";"none"==i||("uppercase"==i?a=a.toUpperCase():"lowercase"==i&&(a=a.toLowerCase()));var l=e.pstyle("text-wrap").value;if("wrap"===l){var u=s("labelKey");if(null!=u&&s("labelWrapKey")===u)return s("labelWrapCachedText");for(var c=a.split("\n"),d=e.pstyle("text-max-width").pfValue,h="anywhere"===e.pstyle("text-overflow-wrap").value,f=[],p=/[\s\u200b]+|$/g,g=0;gd){var b,x="",w=0,E=o(v.matchAll(p));try{for(E.s();!(b=E.n()).done;){var k=b.value,T=k[0],C=v.substring(w,k.index);w=k.index+T.length;var P=0===x.length?C:x+C+T;this.calculateLabelDimensions(e,P).width<=d?x+=C+T:(x&&f.push(x),x=C+T)}}catch(A){E.e(A)}finally{E.f()}x.match(/^[\s\u200b]+$/)||f.push(x)}else f.push(v)}s("labelWrapCachedLines",f),a=s("labelWrapCachedText",f.join("\n")),s("labelWrapKey",u)}else if("ellipsis"===l){var S=e.pstyle("text-max-width").pfValue,B="",D=!1;if(this.calculateLabelDimensions(e,a).widthS)break;B+=a[_],_===a.length-1&&(D=!0)}return D||(B+="\u2026"),B}return a},Qc.getLabelJustification=function(e){var t=e.pstyle("text-justification").strValue,n=e.pstyle("text-halign").strValue;return"auto"===t?e.isNode()?function(e){switch(e){case"left":case"right-inside":return"right";case"right":case"left-inside":return"left";default:return"center"}}(n):"center":t},Qc.calculateLabelDimensions=function(e,t){var n=this.cy.window().document,r=e.pstyle("font-style").strValue,a=e.pstyle("font-size").pfValue,i=e.pstyle("font-family").strValue,o=e.pstyle("font-weight").strValue,s=e.pstyle("text-metrics").strValue||"font",l=this.labelCalcCanvas,u=this.labelCalcCanvasContext;if(!l){l=this.labelCalcCanvas=n.createElement("canvas"),u=this.labelCalcCanvasContext=l.getContext("2d");var c=l.style;c.position="absolute",c.left="-9999px",c.top="-9999px",c.zIndex="-1",c.visibility="hidden",c.pointerEvents="none"}u.font="".concat(r," ").concat(o," ").concat(a,"px ").concat(i);for(var d=0,h=0,f=t.split("\n"),p=f.length,g=0,v=0,y=0;y1&&void 0!==arguments[1])||arguments[1];if(t.merge(e),n)for(var r=0;r=e.desktopTapThreshold2}var P=a(t);v&&(e.hoverData.tapholdCancelled=!0);n=!0,r(g,["mousemove","vmousemove","tapdrag"],t,{x:c[0],y:c[1]});var S=function(e){return{originalEvent:t,type:e,position:{x:c[0],y:c[1]}}},B=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||o.emit(S("boxstart")),p[4]=1,e.hoverData.selecting=!0,e.redrawHint("select",!0),e.redraw()};if(3===e.hoverData.which){if(v){var D=S("cxtdrag");b?b.emit(D):o.emit(D),e.hoverData.cxtDragged=!0,e.hoverData.cxtOver&&g===e.hoverData.cxtOver||(e.hoverData.cxtOver&&e.hoverData.cxtOver.emit(S("cxtdragout")),e.hoverData.cxtOver=g,g&&g.emit(S("cxtdragover")))}}else if(e.hoverData.dragging){if(n=!0,o.panningEnabled()&&o.userPanningEnabled()){var _;if(e.hoverData.justStartedPan){var A=e.hoverData.mdownPos;_={x:(c[0]-A[0])*s,y:(c[1]-A[1])*s},e.hoverData.justStartedPan=!1}else _={x:x[0]*s,y:x[1]*s};o.panBy(_),o.emit(S("dragpan")),e.hoverData.dragged=!0}c=e.projectIntoViewport(t.clientX,t.clientY)}else if(1!=p[4]||null!=b&&!b.pannable()){if(b&&b.pannable()&&b.active()&&b.unactivate(),b&&b.grabbed()||g==y||(y&&r(y,["mouseout","tapdragout"],t,{x:c[0],y:c[1]}),g&&r(g,["mouseover","tapdragover"],t,{x:c[0],y:c[1]}),e.hoverData.last=g),b)if(v){if(o.boxSelectionEnabled()&&P)b&&b.grabbed()&&(d(w),b.emit(S("freeon")),w.emit(S("free")),e.dragData.didDrag&&(b.emit(S("dragfreeon")),w.emit(S("dragfree")))),B();else if(b&&b.grabbed()&&e.nodeIsDraggable(b)){var M=!e.dragData.didDrag;M&&e.redrawHint("eles",!0),e.dragData.didDrag=!0,e.hoverData.draggingEles||u(w,{inDragLayer:!0});var R={x:0,y:0};if(Q(x[0])&&Q(x[1])&&(R.x+=x[0],R.y+=x[1],M)){var I=e.hoverData.dragDelta;I&&Q(I[0])&&Q(I[1])&&(R.x+=I[0],R.y+=I[1])}e.hoverData.draggingEles=!0,w.silentShift(R).emit(S("position")).emit(S("drag")),e.redrawHint("drag",!0),e.redraw()}}else!function(){var t=e.hoverData.dragDelta=e.hoverData.dragDelta||[];0===t.length?(t.push(x[0]),t.push(x[1])):(t[0]+=x[0],t[1]+=x[1])}();n=!0}else if(v){if(e.hoverData.dragging||!o.boxSelectionEnabled()||!P&&o.panningEnabled()&&o.userPanningEnabled()){if(!e.hoverData.selecting&&o.panningEnabled()&&o.userPanningEnabled()){i(b,e.hoverData.downs)&&(e.hoverData.dragging=!0,e.hoverData.justStartedPan=!0,p[4]=0,e.data.bgActivePosistion=Ut(h),e.redrawHint("select",!0),e.redraw())}}else B();b&&b.pannable()&&b.active()&&b.unactivate()}return p[2]=c[0],p[3]=c[1],n?(t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),!1):void 0}},!1),e.registerBinding(t,"mouseup",function(t){if((1!==e.hoverData.which||1===t.which||!e.hoverData.capture)&&e.hoverData.capture){e.hoverData.capture=!1;var i=e.cy,o=e.projectIntoViewport(t.clientX,t.clientY),s=e.selection,l=e.findNearestElement(o[0],o[1],!0,!1),u=e.dragData.possibleDragElements,c=e.hoverData.down,h=a(t);e.data.bgActivePosistion&&(e.redrawHint("select",!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,c&&c.unactivate();var f=function(e){return{originalEvent:t,type:e,position:{x:o[0],y:o[1]}}};if(3===e.hoverData.which){var p=f("cxttapend");if(c?c.emit(p):i.emit(p),!e.hoverData.cxtDragged){var g=f("cxttap");c?c.emit(g):i.emit(g)}e.hoverData.cxtDragged=!1,e.hoverData.which=null}else if(1===e.hoverData.which){if(r(l,["mouseup","tapend","vmouseup"],t,{x:o[0],y:o[1]}),e.dragData.didDrag||e.hoverData.dragged||e.hoverData.selecting||e.hoverData.isOverThresholdDrag||(r(c,["click","tap","vclick"],t,{x:o[0],y:o[1]}),x=!1,t.timeStamp-w<=i.multiClickDebounceTime()?(b&&clearTimeout(b),x=!0,w=null,r(c,["dblclick","dbltap","vdblclick"],t,{x:o[0],y:o[1]})):(b=setTimeout(function(){x||r(c,["oneclick","onetap","voneclick"],t,{x:o[0],y:o[1]})},i.multiClickDebounceTime()),w=t.timeStamp)),null!=c||e.dragData.didDrag||e.hoverData.selecting||e.hoverData.dragged||a(t)||(i.$(n).unselect(["tapunselect"]),u.length>0&&e.redrawHint("eles",!0),e.dragData.possibleDragElements=u=i.collection()),l!=c||e.dragData.didDrag||e.hoverData.selecting||null!=l&&l._private.selectable&&(e.hoverData.dragging||("additive"===i.selectionType()||h?l.selected()?l.unselect(["tapunselect"]):l.select(["tapselect"]):h||(i.$(n).unmerge(l).unselect(["tapunselect"]),l.select(["tapselect"]))),e.redrawHint("eles",!0)),e.hoverData.selecting){var v=i.collection(e.getAllInBox(s[0],s[1],s[2],s[3]));e.redrawHint("select",!0),v.length>0&&e.redrawHint("eles",!0),i.emit(f("boxend"));var y=function(e){return e.selectable()&&!e.selected()};"additive"===i.selectionType()||h||i.$(n).unmerge(v).unselect(),v.emit(f("box")).stdFilter(y).select().emit(f("boxselect")),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint("select",!0),e.redrawHint("eles",!0),e.redraw()),!s[4]){e.redrawHint("drag",!0),e.redrawHint("eles",!0);var m=c&&c.grabbed();d(u),m&&(c.emit(f("freeon")),u.emit(f("free")),e.dragData.didDrag&&(c.emit(f("dragfreeon")),u.emit(f("dragfree"))))}}s[4]=0,e.hoverData.down=null,e.hoverData.cxtStarted=!1,e.hoverData.draggingEles=!1,e.hoverData.selecting=!1,e.hoverData.isOverThresholdDrag=!1,e.dragData.didDrag=!1,e.hoverData.dragged=!1,e.hoverData.dragDelta=[],e.hoverData.mdownPos=null,e.hoverData.mdownGPos=null,e.hoverData.which=null}},!1);var k,T,C,P,S,B,D,_,A,M,R,I,N,L,z=[],O=1e5,V=function(t){var n=!1,r=t.deltaY;if(null==r&&(null!=t.wheelDeltaY?r=t.wheelDeltaY/4:null!=t.wheelDelta&&(r=t.wheelDelta/4)),0!==r){if(null==k)if(z.length>=4){var a=z;if(k=function(e,t){for(var n=0;n5}if(k)for(var o=0;o5&&(r=5*Gt(r)),h=r/-250,k&&(h/=O,h*=3),h*=e.wheelSensitivity,1===t.deltaMode&&(h*=33);var f=s.zoom()*Math.pow(10,h);"gesturechange"===t.type&&(f=e.gestureStartZoom*t.scale),s.zoom({level:f,renderedPosition:{x:d[0],y:d[1]}}),s.emit({type:"gesturechange"===t.type?"pinchzoom":"scrollzoom",originalEvent:t,position:{x:c[0],y:c[1]}})}}}};e.registerBinding(e.container,"wheel",V,!0),e.registerBinding(t,"scroll",function(t){e.scrollingPage=!0,clearTimeout(e.scrollingPageTimeout),e.scrollingPageTimeout=setTimeout(function(){e.scrollingPage=!1},250)},!0),e.registerBinding(e.container,"gesturestart",function(t){e.gestureStartZoom=e.cy.zoom(),e.hasTouchStarted||t.preventDefault()},!0),e.registerBinding(e.container,"gesturechange",function(t){e.hasTouchStarted||V(t)},!0),e.registerBinding(e.container,"mouseout",function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseout",position:{x:n[0],y:n[1]}})},!1),e.registerBinding(e.container,"mouseover",function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseover",position:{x:n[0],y:n[1]}})},!1);var F,X,j,Y,q,W,U,H=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},K=function(e,t,n,r){return(n-e)*(n-e)+(r-t)*(r-t)};if(e.registerBinding(e.container,"touchstart",F=function(t){if(e.hasTouchStarted=!0,m(t)){f(),e.touchData.capture=!0,e.data.bgActivePosistion=void 0;var n=e.cy,a=e.touchData.now,i=e.touchData.earlier;if(t.touches[0]){var o=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);a[0]=o[0],a[1]=o[1]}if(t.touches[1]){o=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);a[2]=o[0],a[3]=o[1]}if(t.touches[2]){o=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);a[4]=o[0],a[5]=o[1]}var l=function(e){return{originalEvent:t,type:e,position:{x:a[0],y:a[1]}}};if(t.touches[1]){e.touchData.singleTouchMoved=!0,d(e.dragData.touchDragEles);var h=e.findContainerClientCoords();M=h[0],R=h[1],I=h[2],N=h[3],T=t.touches[0].clientX-M,C=t.touches[0].clientY-R,P=t.touches[1].clientX-M,S=t.touches[1].clientY-R,L=0<=T&&T<=I&&0<=P&&P<=I&&0<=C&&C<=N&&0<=S&&S<=N;var p=n.pan(),g=n.zoom();B=H(T,C,P,S),D=K(T,C,P,S),A=[((_=[(T+P)/2,(C+S)/2])[0]-p.x)/g,(_[1]-p.y)/g];if(D<4e4&&!t.touches[2]){var v=e.findNearestElement(a[0],a[1],!0,!0),y=e.findNearestElement(a[2],a[3],!0,!0);return v&&v.isNode()?(v.activate().emit(l("cxttapstart")),e.touchData.start=v):y&&y.isNode()?(y.activate().emit(l("cxttapstart")),e.touchData.start=y):n.emit(l("cxttapstart")),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!0,e.touchData.cxtDragged=!1,e.data.bgActivePosistion=void 0,void e.redraw()}}if(t.touches[2])n.boxSelectionEnabled()&&t.preventDefault();else if(t.touches[1]);else if(t.touches[0]){var b=e.findNearestElements(a[0],a[1],!0,!0),x=b[0];if(null!=x&&(x.activate(),e.touchData.start=x,e.touchData.starts=b,e.nodeIsGrabbable(x))){var w=e.dragData.touchDragEles=n.collection(),E=null;e.redrawHint("eles",!0),e.redrawHint("drag",!0),x.selected()?(E=n.$(function(t){return t.selected()&&e.nodeIsGrabbable(t)}),u(E,{addToList:w})):c(x,{addToList:w}),s(x),x.emit(l("grabon")),E?E.forEach(function(e){e.emit(l("grab"))}):x.emit(l("grab"))}r(x,["touchstart","tapstart","vmousedown"],t,{x:a[0],y:a[1]}),null==x&&(e.data.bgActivePosistion={x:o[0],y:o[1]},e.redrawHint("select",!0),e.redraw()),e.touchData.singleTouchMoved=!1,e.touchData.singleTouchStartTime=+new Date,clearTimeout(e.touchData.tapholdTimeout),e.touchData.tapholdTimeout=setTimeout(function(){!1!==e.touchData.singleTouchMoved||e.pinching||e.touchData.selecting||r(e.touchData.start,["taphold"],t,{x:a[0],y:a[1]})},e.tapholdDuration)}if(t.touches.length>=1){for(var k=e.touchData.startPosition=[null,null,null,null,null,null],z=0;z=e.touchTapThreshold2}if(n&&e.touchData.cxt){t.preventDefault();var E=t.touches[0].clientX-M,k=t.touches[0].clientY-R,_=t.touches[1].clientX-M,I=t.touches[1].clientY-R,N=K(E,k,_,I);if(N/D>=2.25||N>=22500){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var z=p("cxttapend");e.touchData.start?(e.touchData.start.unactivate().emit(z),e.touchData.start=null):o.emit(z)}}if(n&&e.touchData.cxt){z=p("cxtdrag");e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.touchData.start?e.touchData.start.emit(z):o.emit(z),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var O=e.findNearestElement(s[0],s[1],!0,!0);e.touchData.cxtOver&&O===e.touchData.cxtOver||(e.touchData.cxtOver&&e.touchData.cxtOver.emit(p("cxtdragout")),e.touchData.cxtOver=O,O&&O.emit(p("cxtdragover")))}else if(n&&t.touches[2]&&o.boxSelectionEnabled())t.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||o.emit(p("boxstart")),e.touchData.selecting=!0,e.touchData.didSelect=!0,a[4]=1,a&&0!==a.length&&void 0!==a[0]?(a[2]=(s[0]+s[2]+s[4])/3,a[3]=(s[1]+s[3]+s[5])/3):(a[0]=(s[0]+s[2]+s[4])/3,a[1]=(s[1]+s[3]+s[5])/3,a[2]=(s[0]+s[2]+s[4])/3+1,a[3]=(s[1]+s[3]+s[5])/3+1),e.redrawHint("select",!0),e.redraw();else if(n&&t.touches[1]&&!e.touchData.didSelect&&o.zoomingEnabled()&&o.panningEnabled()&&o.userZoomingEnabled()&&o.userPanningEnabled()){if(t.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),te=e.dragData.touchDragEles){e.redrawHint("drag",!0);for(var V=0;V0&&!e.hoverData.draggingEles&&!e.swipePanning&&null!=e.data.bgActivePosistion&&(e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.redraw())}},!1),e.registerBinding(t,"touchcancel",j=function(t){var n=e.touchData.start;e.touchData.capture=!1,n&&n.unactivate()}),e.registerBinding(t,"touchend",Y=function(t){var a=e.touchData.start;if(e.touchData.capture){0===t.touches.length&&(e.touchData.capture=!1),t.preventDefault();var i=e.selection;e.swipePanning=!1,e.hoverData.draggingEles=!1;var o=e.cy,s=o.zoom(),l=e.touchData.now,u=e.touchData.earlier;if(t.touches[0]){var c=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);l[0]=c[0],l[1]=c[1]}if(t.touches[1]){c=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);l[2]=c[0],l[3]=c[1]}if(t.touches[2]){c=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);l[4]=c[0],l[5]=c[1]}var h,f=function(e){return{originalEvent:t,type:e,position:{x:l[0],y:l[1]}}};if(a&&a.unactivate(),e.touchData.cxt){if(h=f("cxttapend"),a?a.emit(h):o.emit(h),!e.touchData.cxtDragged){var p=f("cxttap");a?a.emit(p):o.emit(p)}return e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!1,e.touchData.start=null,void e.redraw()}if(!t.touches[2]&&o.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var g=o.collection(e.getAllInBox(i[0],i[1],i[2],i[3]));i[0]=void 0,i[1]=void 0,i[2]=void 0,i[3]=void 0,i[4]=0,e.redrawHint("select",!0),o.emit(f("boxend"));g.emit(f("box")).stdFilter(function(e){return e.selectable()&&!e.selected()}).select().emit(f("boxselect")),g.nonempty()&&e.redrawHint("eles",!0),e.redraw()}if(null!=a&&a.unactivate(),t.touches[2])e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);else if(t.touches[1]);else if(t.touches[0]);else if(!t.touches[0]){e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var v=e.dragData.touchDragEles;if(null!=a){var y=a._private.grabbed;d(v),e.redrawHint("drag",!0),e.redrawHint("eles",!0),y&&(a.emit(f("freeon")),v.emit(f("free")),e.dragData.didDrag&&(a.emit(f("dragfreeon")),v.emit(f("dragfree")))),r(a,["touchend","tapend","vmouseup","tapdragout"],t,{x:l[0],y:l[1]}),a.unactivate(),e.touchData.start=null}else{var m=e.findNearestElement(l[0],l[1],!0,!0);r(m,["touchend","tapend","vmouseup","tapdragout"],t,{x:l[0],y:l[1]})}var b=e.touchData.startPosition[0]-l[0],x=b*b,w=e.touchData.startPosition[1]-l[1],E=(x+w*w)*s*s;e.touchData.singleTouchMoved||(a||o.$(":selected").unselect(["tapunselect"]),r(a,["tap","vclick"],t,{x:l[0],y:l[1]}),q=!1,t.timeStamp-U<=o.multiClickDebounceTime()?(W&&clearTimeout(W),q=!0,U=null,r(a,["dbltap","vdblclick"],t,{x:l[0],y:l[1]})):(W=setTimeout(function(){q||r(a,["onetap","voneclick"],t,{x:l[0],y:l[1]})},o.multiClickDebounceTime()),U=t.timeStamp)),null!=a&&!e.dragData.didDrag&&a._private.selectable&&E2){for(var f=[c[0],c[1]],p=Math.pow(f[0]-e,2)+Math.pow(f[1]-t,2),g=1;g0)return g[0]}return null},f=Object.keys(d),p=0;p0?u:gn(a,i,e,t,n,r,o,s)},checkPoint:function(e,t,n,r,a,i,o,s){var l=2*(s="auto"===s?In(r,a):s);if(wn(e,t,this.points,i,o,r,a-l,[0,-1],n))return!0;if(wn(e,t,this.points,i,o,r-l,a,[0,-1],n))return!0;var u=r/2+2*n,c=a/2+2*n;return!!xn(e,t,[i-u,o-c,i-u,o,i+u,o,i+u,o-c])||(!!Tn(e,t,l,l,i+r/2-s,o+a/2-s,n)||!!Tn(e,t,l,l,i-r/2+s,o+a/2-s,n))}}},ud.registerNodeShapes=function(){var e=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon("triangle",An(3,0)),this.generateRoundPolygon("round-triangle",An(3,0)),this.generatePolygon("rectangle",An(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();var n=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",n),this.generateRoundPolygon("round-diamond",n),this.generatePolygon("pentagon",An(5,0)),this.generateRoundPolygon("round-pentagon",An(5,0)),this.generatePolygon("hexagon",An(6,0)),this.generateRoundPolygon("round-hexagon",An(6,0)),this.generatePolygon("heptagon",An(7,0)),this.generateRoundPolygon("round-heptagon",An(7,0)),this.generatePolygon("octagon",An(8,0)),this.generateRoundPolygon("round-octagon",An(8,0));var r=new Array(20),a=Rn(5,0),i=Rn(5,Math.PI/5),o=.5*(3-Math.sqrt(5));o*=1.57;for(var s=0;s=e.deqFastCost*g)break}else if(a){if(f>=e.deqCost*l||f>=e.deqAvgCost*s)break}else if(p>=e.deqNoDrawCost*pd)break;var v=e.deq(t,d,c);if(!(v.length>0))break;for(var y=0;y0&&(e.onDeqd(t,u),!a&&e.shouldRedraw(t,u,d,c)&&r())},a(t))}}},vd=function(){return i(function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nt;a(this,e),this.idsByKey=new yt,this.keyForId=new yt,this.cachesByLvl=new yt,this.lvls=[],this.getKey=t,this.doesEleInvalidateKey=n},[{key:"getIdsFor",value:function(e){null==e&&it("Can not get id list for null key");var t=this.idsByKey,n=this.idsByKey.get(e);return n||(n=new bt,t.set(e,n)),n}},{key:"addIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).add(t)}},{key:"deleteIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).delete(t)}},{key:"getNumberOfIdsForKey",value:function(e){return null==e?0:this.getIdsFor(e).size}},{key:"updateKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t),r=this.getKey(e);this.deleteIdForKey(n,t),this.addIdForKey(r,t),this.keyForId.set(t,r)}},{key:"deleteKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteIdForKey(n,t),this.keyForId.delete(t)}},{key:"keyHasChangedFor",value:function(e){var t=e.id();return this.keyForId.get(t)!==this.getKey(e)}},{key:"isInvalid",value:function(e){return this.keyHasChangedFor(e)||this.doesEleInvalidateKey(e)}},{key:"getCachesAt",value:function(e){var t=this.cachesByLvl,n=this.lvls,r=t.get(e);return r||(r=new yt,t.set(e,r),n.push(e)),r}},{key:"getCache",value:function(e,t){return this.getCachesAt(t).get(e)}},{key:"get",value:function(e,t){var n=this.getKey(e),r=this.getCache(n,t);return null!=r&&this.updateKeyMappingFor(e),r}},{key:"getForCachedKey",value:function(e,t){var n=this.keyForId.get(e.id());return this.getCache(n,t)}},{key:"hasCache",value:function(e,t){return this.getCachesAt(t).has(e)}},{key:"has",value:function(e,t){var n=this.getKey(e);return this.hasCache(n,t)}},{key:"setCache",value:function(e,t,n){n.key=e,this.getCachesAt(t).set(e,n)}},{key:"set",value:function(e,t,n){var r=this.getKey(e);this.setCache(r,t,n),this.updateKeyMappingFor(e)}},{key:"deleteCache",value:function(e,t){this.getCachesAt(t).delete(e)}},{key:"delete",value:function(e,t){var n=this.getKey(e);this.deleteCache(n,t)}},{key:"invalidateKey",value:function(e){var t=this;this.lvls.forEach(function(n){return t.deleteCache(e,n)})}},{key:"invalidate",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteKeyMappingFor(e);var r=this.doesEleInvalidateKey(e);return r&&this.invalidateKey(n),r||0===this.getNumberOfIdsForKey(n)}}])}(),yd=7.99,md={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},bd=ht({getKey:null,doesEleInvalidateKey:nt,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:tt,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),xd=function(e,t){var n=this;n.renderer=e,n.onDequeues=[];var r=bd(t);be(n,r),n.lookup=new vd(r.getKey,r.doesEleInvalidateKey),n.setupDequeueing()},wd=xd.prototype;wd.reasons=md,wd.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]},wd.getRetiredTextureQueue=function(e){var t=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return t[e]=t[e]||[]},wd.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new _t(function(e,t){return t.reqs-e.reqs})},wd.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},wd.getElement=function(e,t,n,r,a){var i=this,o=this.renderer,s=o.cy.zoom(),l=this.lookup;if(!t||0===t.w||0===t.h||isNaN(t.w)||isNaN(t.h)||!e.visible()||e.removed())return null;if(!i.allowEdgeTxrCaching&&e.isEdge()||!i.allowParentTxrCaching&&e.isParent())return null;if(null==r&&(r=Math.ceil(Kt(s*n))),r<-4)r=-4;else if(s>=7.99||r>3)return null;var u=Math.pow(2,r),c=t.h*u,d=t.w*u,h=o.eleTextBiggerThanMin(e,u);if(!this.isVisible(e,h))return null;var f,p=l.get(e,r);if(p&&p.invalidated&&(p.invalidated=!1,p.texture.invalidatedWidth-=p.width),p)return p;if(f=c<=25?25:c<=50?50:50*Math.ceil(c/50),c>1024||d>1024)return null;var g=i.getTextureQueue(f),v=g[g.length-2],y=function(){return i.recycleTexture(f,d)||i.addTexture(f,d)};v||(v=g[g.length-1]),v||(v=y()),v.width-v.usedWidthr;S--)C=i.getElement(e,t,n,S,md.downscale);P()}else{var B;if(!x&&!w&&!E)for(var D=r-1;D>=-4;D--){var _=l.get(e,D);if(_){B=_;break}}if(b(B))return i.queueElement(e,r),B;v.context.translate(v.usedWidth,0),v.context.scale(u,u),this.drawElement(v.context,e,t,h,!1),v.context.scale(1/u,1/u),v.context.translate(-v.usedWidth,0)}return p={x:v.usedWidth,texture:v,level:r,scale:u,width:d,height:c,scaledLabelShown:h},v.usedWidth+=Math.ceil(d+8),v.eleCaches.push(p),l.set(e,r,p),i.checkTextureFullness(v),p},wd.invalidateElements=function(e){for(var t=0;t=.2*e.width&&this.retireTexture(e)},wd.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);e.usedWidth/e.width>.8&&e.fullnessChecks>=10?ft(t,e):e.fullnessChecks++},wd.retireTexture=function(e){var t=e.height,n=this.getTextureQueue(t),r=this.lookup;ft(n,e),e.retired=!0;for(var a=e.eleCaches,i=0;i=t)return i.retired=!1,i.usedWidth=0,i.invalidatedWidth=0,i.fullnessChecks=0,pt(i.eleCaches),i.context.setTransform(1,0,0,1,0,0),i.context.clearRect(0,0,i.width,i.height),ft(r,i),n.push(i),i}},wd.queueElement=function(e,t){var n=this.getElementQueue(),r=this.getElementKeyToQueue(),a=this.getKey(e),i=r[a];if(i)i.level=Math.max(i.level,t),i.eles.merge(e),i.reqs++,n.updateItem(i);else{var o={eles:e.spawn().merge(e),level:t,reqs:1,key:a};n.push(o),r[a]=o}},wd.dequeue=function(e){for(var t=this,n=t.getElementQueue(),r=t.getElementKeyToQueue(),a=[],i=t.lookup,o=0;o<1&&n.size()>0;o++){var s=n.pop(),l=s.key,u=s.eles[0],c=i.hasCache(u,s.level);if(r[l]=null,!c){a.push(s);var d=t.getBoundingBox(u);t.getElement(u,d,e,s.level,md.dequeue)}}return a},wd.removeFromQueue=function(e){var t=this.getElementQueue(),n=this.getElementKeyToQueue(),r=this.getKey(e),a=n[r];null!=a&&(1===a.eles.length?(a.reqs=et,t.updateItem(a),t.pop(),n[r]=null):a.eles.unmerge(e))},wd.onDequeue=function(e){this.onDequeues.push(e)},wd.offDequeue=function(e){ft(this.onDequeues,e)},wd.setupDequeueing=gd({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(e,t,n){return e.dequeue(t,n)},onDeqd:function(e,t){for(var n=0;n=3.99||n>2)return null;r.validateLayersElesOrdering(n,e);var o,s,l=r.layersByLevel,u=Math.pow(2,n),c=l[n]=l[n]||[];if(r.levelIsComplete(n,e))return c;!function(){var t=function(t){if(r.validateLayersElesOrdering(t,e),r.levelIsComplete(t,e))return s=l[t],!0},a=function(e){if(!s)for(var r=n+e;-4<=r&&r<=2&&!t(r);r+=e);};a(1),a(-1);for(var i=c.length-1;i>=0;i--){var o=c[i];o.invalid&&ft(c,o)}}();var d=function(t){var a=(t=t||{}).after;!function(){if(!o){o=nn();for(var t=0;t32767||s>32767)return null;if(i*s>16e6)return null;var l=r.makeLayer(o,n);if(null!=a){var d=c.indexOf(a)+1;c.splice(d,0,l)}else(void 0===t.insert||t.insert)&&c.unshift(l);return l};if(r.skipping&&!i)return null;for(var h=null,f=e.length/1,p=!i,g=0;g=f||!hn(h.bb,v.boundingBox()))&&!(h=d({insert:!0,after:h})))return null;s||p?r.queueLayer(h,v):r.drawEleInLayer(h,v,n,t),h.eles.push(v),m[n]=h}}return s||(p?null:c)},kd.getEleLevelForLayerLevel=function(e,t){return e},kd.drawEleInLayer=function(e,t,n,r){var a=this.renderer,i=e.context,o=t.boundingBox();0!==o.w&&0!==o.h&&t.visible()&&(n=this.getEleLevelForLayerLevel(n,r),a.setImgSmoothing(i,!1),a.drawCachedElement(i,t,null,null,n,true),a.setImgSmoothing(i,!0))},kd.levelIsComplete=function(e,t){var n=this.layersByLevel[e];if(!n||0===n.length)return!1;for(var r=0,a=0;a0)return!1;if(i.invalid)return!1;r+=i.eles.length}return r===t.length},kd.validateLayersElesOrdering=function(e,t){var n=this.layersByLevel[e];if(n)for(var r=0;r0){e=!0;break}}return e},kd.invalidateElements=function(e){var t=this;0!==e.length&&(t.lastInvalidationTime=Oe(),0!==e.length&&t.haveLayers()&&t.updateElementsInLayers(e,function(e,n,r){t.invalidateLayer(e)}))},kd.invalidateLayer=function(e){if(this.lastInvalidationTime=Oe(),!e.invalid){var t=e.level,n=e.eles,r=this.layersByLevel[t];ft(r,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var a=0;a3&&void 0!==arguments[3])||arguments[3],a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],o=this,s=t._private.rscratch;if((!i||t.visible())&&!s.badLine&&null!=s.allpts&&!isNaN(s.allpts[0])){var l;n&&(l=n,e.translate(-l.x1,-l.y1));var u=i?t.pstyle("opacity").value:1,c=i?t.pstyle("line-opacity").value:1,d=t.pstyle("curve-style").value,h=t.pstyle("line-style").value,f=t.pstyle("width").pfValue,p=t.pstyle("line-cap").value,g=t.pstyle("line-outline-width").value,v=t.pstyle("line-outline-color").value,y=u*c,m=u*c,b=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;"straight-triangle"===d?(o.eleStrokeStyle(e,t,n),o.drawEdgeTrianglePath(t,e,s.allpts)):(e.lineWidth=f,e.lineCap=p,o.eleStrokeStyle(e,t,n),o.drawEdgePath(t,e,s.allpts,h),e.lineCap="butt")},x=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m;o.drawArrowheads(e,t,n)};if(e.lineJoin="round","yes"===t.pstyle("ghost").value){var w=t.pstyle("ghost-offset-x").pfValue,E=t.pstyle("ghost-offset-y").pfValue,k=t.pstyle("ghost-opacity").value,T=y*k;e.translate(w,E),b(T),x(T),e.translate(-w,-E)}else!function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;e.lineWidth=f+g,e.lineCap=p,g>0?(o.colorStrokeStyle(e,v[0],v[1],v[2],n),"straight-triangle"===d?o.drawEdgeTrianglePath(t,e,s.allpts):(o.drawEdgePath(t,e,s.allpts,h),e.lineCap="butt")):e.lineCap="butt"}();a&&o.drawEdgeUnderlay(e,t),b(),x(),a&&o.drawEdgeOverlay(e,t),o.drawElementText(e,t,null,r),n&&e.translate(l.x1,l.y1)}}},Xd=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,n){if(n.visible()){var r=n.pstyle("".concat(e,"-opacity")).value;if(0!==r){var a=this,i=a.usePaths(),o=n._private.rscratch,s=2*n.pstyle("".concat(e,"-padding")).pfValue,l=n.pstyle("".concat(e,"-color")).value;t.lineWidth=s,"self"!==o.edgeType||i?t.lineCap="round":t.lineCap="butt",a.colorStrokeStyle(t,l[0],l[1],l[2],r),a.drawEdgePath(n,t,o.allpts,"solid")}}}};Fd.drawEdgeOverlay=Xd("overlay"),Fd.drawEdgeUnderlay=Xd("underlay"),Fd.drawEdgePath=function(e,t,n,r){var a,i=e._private.rscratch,s=t,l=!1,u=this.usePaths(),c=e.pstyle("line-dash-pattern").pfValue,d=e.pstyle("line-dash-offset").pfValue;if(u){var h=n.join("$");i.pathCacheKey&&i.pathCacheKey===h?(a=t=i.pathCache,l=!0):(a=t=new Path2D,i.pathCacheKey=h,i.pathCache=a)}if(s.setLineDash)switch(r){case"dotted":s.setLineDash([1,1]);break;case"dashed":s.setLineDash(c),s.lineDashOffset=d;break;case"solid":s.setLineDash([])}if(!l&&!i.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(n[0],n[1]),i.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var f=2;f+35&&void 0!==arguments[5]?arguments[5]:5,o=Math.min(i,r/2,a/2);e.beginPath(),e.moveTo(t+o,n),e.lineTo(t+r-o,n),e.quadraticCurveTo(t+r,n,t+r,n+o),e.lineTo(t+r,n+a-o),e.quadraticCurveTo(t+r,n+a,t+r-o,n+a),e.lineTo(t+o,n+a),e.quadraticCurveTo(t,n+a,t,n+a-o),e.lineTo(t,n+o),e.quadraticCurveTo(t,n,t+o,n),e.closePath()}Yd.eleTextBiggerThanMin=function(e,t){if(!t){var n=e.cy().zoom(),r=this.getPixelRatio(),a=Math.ceil(Kt(n*r));t=Math.pow(2,a)}return!(e.pstyle("font-size").pfValue*t5&&void 0!==arguments[5])||arguments[5],o=this;if(null==r){if(i&&!o.eleTextBiggerThanMin(t))return}else if(!1===r)return;if(t.isNode()){var s=t.pstyle("label");if(!s||!s.value)return;var l=o.getLabelJustification(t),u="glyph"===t.pstyle("text-metrics").strValue;e.textAlign=l,e.textBaseline=u?"alphabetic":"bottom"}else{var c=t.element()._private.rscratch.badLine,d=t.pstyle("label"),h=t.pstyle("source-label"),f=t.pstyle("target-label");if(c||(!d||!d.value)&&(!h||!h.value)&&(!f||!f.value))return;e.textAlign="center",e.textBaseline="bottom"}var p,g=!n;n&&(p=n,e.translate(-p.x1,-p.y1)),null==a?(o.drawText(e,t,null,g,i),t.isEdge()&&(o.drawText(e,t,"source",g,i),o.drawText(e,t,"target",g,i))):o.drawText(e,t,a,g,i),n&&e.translate(p.x1,p.y1)},Yd.getFontCache=function(e){var t;this.fontCaches=this.fontCaches||[];for(var n=0;n2&&void 0!==arguments[2])||arguments[2],r=t.pstyle("font-style").strValue,a=t.pstyle("font-size").pfValue+"px",i=t.pstyle("font-family").strValue,o=t.pstyle("font-weight").strValue,s=n?t.effectiveOpacity()*t.pstyle("text-opacity").value:1,l=t.pstyle("text-outline-opacity").value*s,u=t.pstyle("color").value,c=t.pstyle("text-outline-color").value;e.font=r+" "+o+" "+a+" "+i,e.lineJoin="round",this.colorFillStyle(e,u[0],u[1],u[2],s),this.colorStrokeStyle(e,c[0],c[1],c[2],l)},Yd.getTextAngle=function(e,t){var n,r=e._private.rscratch,a=t?t+"-":"",i=e.pstyle(a+"text-rotation");if("autorotate"===i.strValue){var o=gt(r,"labelAngle",t);n=e.isEdge()?o:0}else n="none"===i.strValue?0:i.pfValue;return n},Yd.drawText=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=t._private.rscratch,o=a?t.effectiveOpacity():1;if(!a||0!==o&&0!==t.pstyle("text-opacity").value){"main"===n&&(n=null);var s,l,u=gt(i,"labelX",n),c=gt(i,"labelY",n),d=this.getLabelText(t,n);if(null!=d&&""!==d&&!isNaN(u)&&!isNaN(c)){this.setupTextStyle(e,t,a);var h,f=n?n+"-":"",p=gt(i,"labelWidth",n),g=gt(i,"labelHeight",n),v=gt(i,"labelActualDescent",n),y=t.pstyle(f+"text-margin-x").pfValue,m=t.pstyle(f+"text-margin-y").pfValue,b=t.isEdge(),x=t.pstyle("text-halign").value,w=t.pstyle("text-valign").value;b&&(x="center",w="center"),u+=y,c+=m,0!==(h=r?this.getTextAngle(t,n):0)&&(s=u,l=c,e.translate(s,l),e.rotate(h),u=0,c=0);var E=_s(x),k=As(w);switch(k){case"top":break;case"center":c+=g/2;break;case"bottom":c+=g}var T=t.pstyle("text-background-opacity").value,C=t.pstyle("text-border-opacity").value,P=t.pstyle("text-border-width").pfValue,S=t.pstyle("text-background-padding").pfValue,B=t.pstyle("text-background-shape").strValue,D="round-rectangle"===B||"roundrectangle"===B,_="circle"===B;if(T>0||P>0&&C>0){var A=e.fillStyle,M=e.strokeStyle,R=e.lineWidth,I=t.pstyle("text-background-color").value,N=t.pstyle("text-border-color").value,L=t.pstyle("text-border-style").value,z=T>0,O=P>0&&C>0,V=u-S;switch(E){case"left":V-=p;break;case"center":V-=p/2}var F=c-g-S,X=p+2*S,j=g+2*S;if(z&&(e.fillStyle="rgba(".concat(I[0],",").concat(I[1],",").concat(I[2],",").concat(T*o,")")),O&&(e.strokeStyle="rgba(".concat(N[0],",").concat(N[1],",").concat(N[2],",").concat(C*o,")"),e.lineWidth=P,e.setLineDash))switch(L){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=P/4,e.setLineDash([]);break;default:e.setLineDash([])}if(D?(e.beginPath(),qd(e,V,F,X,j,2)):_?(e.beginPath(),function(e,t,n,r,a){var i=Math.min(r,a)/2,o=t+r/2,s=n+a/2;e.beginPath(),e.arc(o,s,i,0,2*Math.PI),e.closePath()}(e,V,F,X,j)):(e.beginPath(),e.rect(V,F,X,j)),z&&e.fill(),O&&e.stroke(),O&&"double"===L){var Y=P/2;e.beginPath(),D?qd(e,V+Y,F+Y,X-2*Y,j-2*Y,2):e.rect(V+Y,F+Y,X-2*Y,j-2*Y),e.stroke()}e.fillStyle=A,e.strokeStyle=M,e.lineWidth=R,e.setLineDash&&e.setLineDash([])}var q=2*t.pstyle("text-outline-width").pfValue;if(q>0&&(e.lineWidth=q),c-=v,"wrap"===t.pstyle("text-wrap").value){var W=gt(i,"labelWrapCachedLines",n),U=gt(i,"labelLineHeight",n),H=p/2,K=this.getLabelJustification(t);switch("auto"===K||("left"===E?"left"===K?u+=-p:"center"===K&&(u+=-H):"center"===E?"left"===K?u+=-H:"right"===K&&(u+=H):"right"===E&&("center"===K?u+=H:"right"===K&&(u+=p))),k){case"top":case"center":case"bottom":c-=(W.length-1)*U}for(var G=0;G0&&e.strokeText(W[G],u,c),e.fillText(W[G],u,c),c+=U}else q>0&&e.strokeText(d,u,c),e.fillText(d,u,c);0!==h&&(e.rotate(-h),e.translate(-s,-l))}}};var Wd={drawNode:function(e,t,n){var r,a,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],l=this,u=t._private,c=u.rscratch,d=t.position();if(Q(d.x)&&Q(d.y)&&(!s||t.visible())){var h,f,p=s?t.effectiveOpacity():1,g=l.usePaths(),v=!1,y=t.padding();r=t.width()+2*y,a=t.height()+2*y,n&&(f=n,e.translate(-f.x1,-f.y1));for(var m=t.pstyle("background-image").value,b=new Array(m.length),x=new Array(m.length),w=0,E=0;E0&&void 0!==arguments[0]?arguments[0]:S;l.eleFillStyle(e,t,n)},Y=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:N;l.colorStrokeStyle(e,B[0],B[1],B[2],t)},q=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V;l.colorStrokeStyle(e,z[0],z[1],z[2],t)},W=function(e,t,n,r){var a,i=l.nodePathCache=l.nodePathCache||[],o=Ke("polygon"===n?n+","+r.join(","):n,""+t,""+e,""+X),s=i[o],u=!1;return null!=s?(a=s,u=!0,c.pathCache=a):(a=new Path2D,i[o]=c.pathCache=a),{path:a,cacheHit:u}},U=t.pstyle("shape").strValue,H=t.pstyle("shape-polygon-points").pfValue;if(g){e.translate(d.x,d.y);var K=W(r,a,U,H);h=K.path,v=K.cacheHit}var G=function(){if(!v){var n=d;g&&(n={x:0,y:0}),l.nodeShapes[l.getNodeShape(t)].draw(h||e,n.x,n.y,r,a,X,c)}g?e.fill(h):e.fill()},Z=function(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=u.backgrounding,i=0,o=0;o0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;l.hasPie(t)&&(l.drawPie(e,t,i),n&&(g||l.nodeShapes[l.getNodeShape(t)].draw(e,d.x,d.y,r,a,X,c)))},J=function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;l.hasStripe(t)&&(e.save(),g?e.clip(c.pathCache):(l.nodeShapes[l.getNodeShape(t)].draw(e,d.x,d.y,r,a,X,c),e.clip()),l.drawStripe(e,t,i),e.restore(),n&&(g||l.nodeShapes[l.getNodeShape(t)].draw(e,d.x,d.y,r,a,X,c)))},ee=function(){var t=(C>0?C:-C)*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:p),n=C>0?0:255;0!==C&&(l.colorFillStyle(e,n,n,n,t),g?e.fill(h):e.fill())},te=function(){if(P>0){if(e.lineWidth=P,e.lineCap=A,e.lineJoin=_,e.setLineDash)switch(D){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash(R),e.lineDashOffset=I;break;case"solid":case"double":e.setLineDash([])}if("center"!==M){if(e.save(),e.lineWidth*=2,"inside"===M)g?e.clip(h):e.clip();else{var t=new Path2D;t.rect(-r/2-P,-a/2-P,r+2*P,a+2*P),t.addPath(h),e.clip(t,"evenodd")}g?e.stroke(h):e.stroke(),e.restore()}else g?e.stroke(h):e.stroke();if("double"===D){e.lineWidth=P/3;var n=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",g?e.stroke(h):e.stroke(),e.globalCompositeOperation=n}e.setLineDash&&e.setLineDash([])}},ne=function(){if(L>0){if(e.lineWidth=L,e.lineCap="butt",e.setLineDash)switch(O){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"solid":case"double":e.setLineDash([])}var n=d;g&&(n={x:0,y:0});var i=l.getNodeShape(t),o=P;"inside"===M&&(o=0),"outside"===M&&(o*=2);var s,u=(r+o+(L+F))/r,c=(a+o+(L+F))/a,h=r*u,f=a*c,p=l.nodeShapes[i].points;if(g)s=W(h,f,i,p).path;if("ellipse"===i)l.drawEllipsePath(s||e,n.x,n.y,h,f);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(i)){var v=0,y=0,m=0;"round-diamond"===i?v=1.4*(o+F+L):"round-heptagon"===i?(v=1.075*(o+F+L),m=-(o/2+F+L)/35):"round-hexagon"===i?v=1.12*(o+F+L):"round-pentagon"===i?(v=1.13*(o+F+L),m=-(o/2+F+L)/15):"round-tag"===i?(v=1.12*(o+F+L),y=.07*(o/2+L+F)):"round-triangle"===i&&(v=(o+F+L)*(Math.PI/2),m=-(o+F/2+L)/Math.PI),0!==v&&(h=r*(u=(r+v)/r),["round-hexagon","round-tag"].includes(i)||(f=a*(c=(a+v)/a)));for(var b=h/2,x=f/2,w=(X="auto"===X?Nn(h,f):X)+(o+L+F)/2,E=new Array(p.length/2),k=new Array(p.length/2),T=0;T0){if(r=r||n.position(),null==a||null==i){var d=n.padding();a=n.width()+2*d,i=n.height()+2*d}this.colorFillStyle(t,l[0],l[1],l[2],s),this.nodeShapes[u].draw(t,r.x,r.y,a+2*o,i+2*o,c),t.fill()}}}};Wd.drawNodeOverlay=Ud("overlay"),Wd.drawNodeUnderlay=Ud("underlay"),Wd.hasPie=function(e){return(e=e[0])._private.hasPie},Wd.hasStripe=function(e){return(e=e[0])._private.hasStripe},Wd.drawPie=function(e,t,n,r){t=t[0],r=r||t.position();var a,i=t.cy().style(),o=t.pstyle("pie-size"),s=t.pstyle("pie-hole"),l=t.pstyle("pie-start-angle").pfValue,u=r.x,c=r.y,d=t.width(),h=t.height(),f=Math.min(d,h)/2,p=0;if(this.usePaths()&&(u=0,c=0),"%"===o.units?f*=o.pfValue:void 0!==o.pfValue&&(f=o.pfValue/2),"%"===s.units?a=f*s.pfValue:void 0!==s.pfValue&&(a=s.pfValue/2),!(a>=f))for(var g=1;g<=i.pieBackgroundN;g++){var v=t.pstyle("pie-"+g+"-background-size").value,y=t.pstyle("pie-"+g+"-background-color").value,m=t.pstyle("pie-"+g+"-background-opacity").value*n,b=v/100;b+p>1&&(b=1-p);var x=1.5*Math.PI+2*Math.PI*p,w=(x+=l)+2*Math.PI*b;0===v||p>=1||p+b>1||(0===a?(e.beginPath(),e.moveTo(u,c),e.arc(u,c,f,x,w),e.closePath()):(e.beginPath(),e.arc(u,c,f,x,w),e.arc(u,c,a,w,x,!0),e.closePath()),this.colorFillStyle(e,y[0],y[1],y[2],m),e.fill(),p+=b)}},Wd.drawStripe=function(e,t,n,r){t=t[0],r=r||t.position();var a=t.cy().style(),i=r.x,o=r.y,s=t.width(),l=t.height(),u=0,c=this.usePaths();e.save();var d=t.pstyle("stripe-direction").value,h=t.pstyle("stripe-size");switch(d){case"vertical":break;case"righward":e.rotate(-Math.PI/2)}var f=s,p=l;"%"===h.units?(f*=h.pfValue,p*=h.pfValue):void 0!==h.pfValue&&(f=h.pfValue,p=h.pfValue),c&&(i=0,o=0),o-=f/2,i-=p/2;for(var g=1;g<=a.stripeBackgroundN;g++){var v=t.pstyle("stripe-"+g+"-background-size").value,y=t.pstyle("stripe-"+g+"-background-color").value,m=t.pstyle("stripe-"+g+"-background-opacity").value*n,b=v/100;b+u>1&&(b=1-u),0===v||u>=1||u+b>1||(e.beginPath(),e.rect(i,o+p*u,f,p*b),e.closePath(),this.colorFillStyle(e,y[0],y[1],y[2],m),e.fill(),u+=b)}e.restore()};var Hd,Kd={};function Gd(e,t,n){var r=e.createShader(t);if(e.shaderSource(r,n),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS))throw new Error(e.getShaderInfoLog(r));return r}function Zd(e,t,n){void 0===n&&(n=t);var r=e.makeOffscreenCanvas(t,n),a=r.context=r.getContext("2d");return r.clear=function(){return a.clearRect(0,0,r.width,r.height)},r.clear(),r}function $d(e){var t=e.pixelRatio,n=e.cy.zoom(),r=e.cy.pan();return{zoom:n*t,pan:{x:r.x*t,y:r.y*t}}}function Qd(e,t){return!!t.picking||"solid"===e.pstyle("background-fill").value&&("none"===e.pstyle("background-image").strValue&&(0===e.pstyle("border-width").value||(0===e.pstyle("border-opacity").value||"solid"===e.pstyle("border-style").value)))}function Jd(e,t){if(e.length!==t.length)return!1;for(var n=0;n>8&255)/255,n[2]=(e>>16&255)/255,n[3]=(e>>24&255)/255,n}function nh(e){return e[0]+(e[1]<<8)+(e[2]<<16)+(e[3]<<24)}function rh(e,t){switch(t){case"float":return[1,e.FLOAT,4];case"vec2":return[2,e.FLOAT,4];case"vec3":return[3,e.FLOAT,4];case"vec4":return[4,e.FLOAT,4];case"int":return[1,e.INT,4];case"ivec2":return[2,e.INT,4]}}function ah(e,t,n){switch(t){case e.FLOAT:return new Float32Array(n);case e.INT:return new Int32Array(n)}}function ih(e,t,n,r,a,i){switch(t){case e.FLOAT:return new Float32Array(n.buffer,i*r,a);case e.INT:return new Int32Array(n.buffer,i*r,a)}}function oh(e,t,n,r){var a=l(rh(e,n),3),i=a[0],o=a[1],s=a[2],u=ah(e,o,t*i),c=i*s,d=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,d),e.bufferData(e.ARRAY_BUFFER,t*c,e.DYNAMIC_DRAW),e.enableVertexAttribArray(r),o===e.FLOAT?e.vertexAttribPointer(r,i,o,!1,c,0):o===e.INT&&e.vertexAttribIPointer(r,i,o,c,0),e.vertexAttribDivisor(r,1),e.bindBuffer(e.ARRAY_BUFFER,null);for(var h=new Array(t),f=0;ft.minMbLowQualFrames&&(t.motionBlurPxRatio=t.mbPxRBlurry)),t.clearingMotionBlur&&(t.motionBlurPxRatio=1),t.textureDrawLastFrame&&!d&&(c[t.NODE]=!0,c[t.SELECT_BOX]=!0);var m=n.style(),b=n.zoom(),x=void 0!==o?o:b,w=n.pan(),E={x:w.x,y:w.y},k={zoom:b,pan:{x:w.x,y:w.y}},T=t.prevViewport;void 0===T||k.zoom!==T.zoom||k.pan.x!==T.pan.x||k.pan.y!==T.pan.y||g&&!p||(t.motionBlurPxRatio=1),s&&(E=s),x*=l,E.x*=l,E.y*=l;var C=t.getCachedZSortedEles();function P(e,n,r,a,i){var o=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",t.colorFillStyle(e,255,255,255,t.motionBlurTransparency),e.fillRect(n,r,a,i),e.globalCompositeOperation=o}function S(e,n){var i,l,c,d;t.clearingMotionBlur||e!==u.bufferContexts[t.MOTIONBLUR_BUFFER_NODE]&&e!==u.bufferContexts[t.MOTIONBLUR_BUFFER_DRAG]?(i=E,l=x,c=t.canvasWidth,d=t.canvasHeight):(i={x:w.x*f,y:w.y*f},l=b*f,c=t.canvasWidth*f,d=t.canvasHeight*f),e.setTransform(1,0,0,1,0,0),"motionBlur"===n?P(e,0,0,c,d):r||void 0!==n&&!n||e.clearRect(0,0,c,d),a||(e.translate(i.x,i.y),e.scale(l,l)),s&&e.translate(s.x,s.y),o&&e.scale(o,o)}if(d||(t.textureDrawLastFrame=!1),d){if(t.textureDrawLastFrame=!0,!t.textureCache){t.textureCache={},t.textureCache.bb=n.mutableElements().boundingBox(),t.textureCache.texture=t.data.bufferCanvases[t.TEXTURE_BUFFER];var B=t.data.bufferContexts[t.TEXTURE_BUFFER];B.setTransform(1,0,0,1,0,0),B.clearRect(0,0,t.canvasWidth*t.textureMult,t.canvasHeight*t.textureMult),t.render({forcedContext:B,drawOnlyNodeLayer:!0,forcedPxRatio:l*t.textureMult}),(k=t.textureCache.viewport={zoom:n.zoom(),pan:n.pan(),width:t.canvasWidth,height:t.canvasHeight}).mpan={x:(0-k.pan.x)/k.zoom,y:(0-k.pan.y)/k.zoom}}c[t.DRAG]=!1,c[t.NODE]=!1;var D=u.contexts[t.NODE],_=t.textureCache.texture;k=t.textureCache.viewport;D.setTransform(1,0,0,1,0,0),h?P(D,0,0,k.width,k.height):D.clearRect(0,0,k.width,k.height);var A=m.core("outside-texture-bg-color").value,M=m.core("outside-texture-bg-opacity").value;t.colorFillStyle(D,A[0],A[1],A[2],M),D.fillRect(0,0,k.width,k.height);b=n.zoom();S(D,!1),D.clearRect(k.mpan.x,k.mpan.y,k.width/k.zoom/l,k.height/k.zoom/l),D.drawImage(_,k.mpan.x,k.mpan.y,k.width/k.zoom/l,k.height/k.zoom/l)}else t.textureOnViewport&&!r&&(t.textureCache=null);var R=n.extent(),I=t.pinching||t.hoverData.dragging||t.swipePanning||t.data.wheelZooming||t.hoverData.draggingEles||t.cy.animated(),N=t.hideEdgesOnViewport&&I,L=[];if(L[t.NODE]=!c[t.NODE]&&h&&!t.clearedForMotionBlur[t.NODE]||t.clearingMotionBlur,L[t.NODE]&&(t.clearedForMotionBlur[t.NODE]=!0),L[t.DRAG]=!c[t.DRAG]&&h&&!t.clearedForMotionBlur[t.DRAG]||t.clearingMotionBlur,L[t.DRAG]&&(t.clearedForMotionBlur[t.DRAG]=!0),c[t.NODE]||a||i||L[t.NODE]){var z=h&&!L[t.NODE]&&1!==f;S(D=r||(z?t.data.bufferContexts[t.MOTIONBLUR_BUFFER_NODE]:u.contexts[t.NODE]),h&&!z?"motionBlur":void 0),N?t.drawCachedNodes(D,C.nondrag,l,R):t.drawLayeredElements(D,C.nondrag,l,R),t.debug&&t.drawDebugPoints(D,C.nondrag),a||h||(c[t.NODE]=!1)}if(!i&&(c[t.DRAG]||a||L[t.DRAG])){z=h&&!L[t.DRAG]&&1!==f;S(D=r||(z?t.data.bufferContexts[t.MOTIONBLUR_BUFFER_DRAG]:u.contexts[t.DRAG]),h&&!z?"motionBlur":void 0),N?t.drawCachedNodes(D,C.drag,l,R):t.drawCachedElements(D,C.drag,l,R),t.debug&&t.drawDebugPoints(D,C.drag),a||h||(c[t.DRAG]=!1)}if(this.drawSelectionRectangle(e,S),h&&1!==f){var O=u.contexts[t.NODE],V=t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_NODE],F=u.contexts[t.DRAG],X=t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_DRAG],j=function(e,n,r){e.setTransform(1,0,0,1,0,0),r||!y?e.clearRect(0,0,t.canvasWidth,t.canvasHeight):P(e,0,0,t.canvasWidth,t.canvasHeight);var a=f;e.drawImage(n,0,0,t.canvasWidth*a,t.canvasHeight*a,0,0,t.canvasWidth,t.canvasHeight)};(c[t.NODE]||L[t.NODE])&&(j(O,V,L[t.NODE]),c[t.NODE]=!1),(c[t.DRAG]||L[t.DRAG])&&(j(F,X,L[t.DRAG]),c[t.DRAG]=!1)}t.prevViewport=k,t.clearingMotionBlur&&(t.clearingMotionBlur=!1,t.motionBlurCleared=!0,t.motionBlur=!0),h&&(t.motionBlurTimeout=setTimeout(function(){t.motionBlurTimeout=null,t.clearedForMotionBlur[t.NODE]=!1,t.clearedForMotionBlur[t.DRAG]=!1,t.motionBlur=!1,t.clearingMotionBlur=!d,t.mbFrames=0,c[t.NODE]=!0,c[t.DRAG]=!0,t.redraw()},100)),r||n.emit("render")},Kd.drawSelectionRectangle=function(e,t){var n=this,r=n.cy,a=n.data,i=r.style(),o=e.drawOnlyNodeLayer,s=e.drawAllLayers,l=a.canvasNeedsRedraw,u=e.forcedContext;if(n.showFps||!o&&l[n.SELECT_BOX]&&!s){var c=u||a.contexts[n.SELECT_BOX];if(t(c),1==n.selection[4]&&(n.hoverData.selecting||n.touchData.selecting)){var d=n.cy.zoom(),h=i.core("selection-box-border-width").value/d;c.lineWidth=h,c.fillStyle="rgba("+i.core("selection-box-color").value[0]+","+i.core("selection-box-color").value[1]+","+i.core("selection-box-color").value[2]+","+i.core("selection-box-opacity").value+")",c.fillRect(n.selection[0],n.selection[1],n.selection[2]-n.selection[0],n.selection[3]-n.selection[1]),h>0&&(c.strokeStyle="rgba("+i.core("selection-box-border-color").value[0]+","+i.core("selection-box-border-color").value[1]+","+i.core("selection-box-border-color").value[2]+","+i.core("selection-box-opacity").value+")",c.strokeRect(n.selection[0],n.selection[1],n.selection[2]-n.selection[0],n.selection[3]-n.selection[1]))}if(a.bgActivePosistion&&!n.hoverData.selecting){d=n.cy.zoom();var f=a.bgActivePosistion;c.fillStyle="rgba("+i.core("active-bg-color").value[0]+","+i.core("active-bg-color").value[1]+","+i.core("active-bg-color").value[2]+","+i.core("active-bg-opacity").value+")",c.beginPath(),c.arc(f.x,f.y,i.core("active-bg-size").pfValue/d,0,2*Math.PI),c.fill()}var p=n.lastRedrawTime;if(n.showFps&&p){p=Math.round(p);var g=Math.round(1e3/p),v="1 frame = "+p+" ms = "+g+" fps";if(c.setTransform(1,0,0,1,0,0),c.fillStyle="rgba(255, 0, 0, 0.75)",c.strokeStyle="rgba(255, 0, 0, 0.75)",c.font="30px Arial",!Hd){var y=c.measureText(v);Hd=y.actualBoundingBoxAscent}c.fillText(v,0,Hd);c.strokeRect(0,Hd+10,250,20),c.fillRect(0,Hd+10,250*Math.min(g/60,1),20)}s||(l[n.SELECT_BOX]=!1)}};var sh="undefined"!=typeof Float32Array?Float32Array:Array;function lh(){var e=new sh(9);return sh!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function uh(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function ch(e,t,n){var r=t[0],a=t[1],i=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],h=n[0],f=n[1];return e[0]=r,e[1]=a,e[2]=i,e[3]=o,e[4]=s,e[5]=l,e[6]=h*r+f*o+u,e[7]=h*a+f*s+c,e[8]=h*i+f*l+d,e}function dh(e,t,n){var r=t[0],a=t[1],i=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],h=Math.sin(n),f=Math.cos(n);return e[0]=f*r+h*o,e[1]=f*a+h*s,e[2]=f*i+h*l,e[3]=f*o-h*r,e[4]=f*s-h*a,e[5]=f*l-h*i,e[6]=u,e[7]=c,e[8]=d,e}function hh(e,t,n){var r=n[0],a=n[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=a*t[3],e[4]=a*t[4],e[5]=a*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var fh=function(){return i(function e(t,n,r,i){a(this,e),this.debugID=Math.floor(1e4*Math.random()),this.r=t,this.texSize=n,this.texRows=r,this.texHeight=Math.floor(n/r),this.enableWrapping=!0,this.locked=!1,this.texture=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map,this.canvas=i(t,n,n),this.scratch=i(t,n,this.texHeight,"scratch")},[{key:"lock",value:function(){this.locked=!0}},{key:"getKeys",value:function(){return new Set(this.keyToLocation.keys())}},{key:"getScale",value:function(e){var t=e.w,n=e.h,r=this.texHeight,a=this.texSize,i=r/n,o=t*i,s=n*i;return o>a&&(o=t*(i=a/t),s=n*i),{scale:i,texW:o,texH:s}}},{key:"draw",value:function(e,t,n){var r=this;if(this.locked)throw new Error("can't draw, atlas is locked");var a=this.texSize,i=this.texRows,o=this.texHeight,s=this.getScale(t),l=s.scale,u=s.texW,c=s.texH,d=function(e,r){if(n&&r){var a=r.context,i=e.x,s=e.row,u=i,c=o*s;a.save(),a.translate(u,c),a.scale(l,l),n(a,t),a.restore()}},h=[null,null],f=function(){d(r.freePointer,r.canvas),h[0]={x:r.freePointer.x,y:r.freePointer.row*o,w:u,h:c},h[1]={x:r.freePointer.x+u,y:r.freePointer.row*o,w:0,h:c},r.freePointer.x+=u,r.freePointer.x==a&&(r.freePointer.x=0,r.freePointer.row++)},p=function(){r.freePointer.x=0,r.freePointer.row++};if(this.freePointer.x+u<=a)f();else{if(this.freePointer.row>=i-1)return!1;this.freePointer.x===a?(p(),f()):this.enableWrapping?function(){var e=r.scratch,t=r.canvas;e.clear(),d({x:0,row:0},e);var n=a-r.freePointer.x,i=u-n,s=o,l=r.freePointer.x,f=r.freePointer.row*o,p=n;t.context.drawImage(e,0,0,p,s,l,f,p,s),h[0]={x:l,y:f,w:p,h:c};var g=n,v=(r.freePointer.row+1)*o,y=i;t&&t.context.drawImage(e,g,0,y,s,0,v,y,s),h[1]={x:0,y:v,w:y,h:c},r.freePointer.x=i,r.freePointer.row++}():(p(),f())}return this.keyToLocation.set(e,h),this.needsBuffer=!0,h}},{key:"getOffsets",value:function(e){return this.keyToLocation.get(e)}},{key:"isEmpty",value:function(){return 0===this.freePointer.x&&0===this.freePointer.row}},{key:"canFit",value:function(e){if(this.locked)return!1;var t=this.texSize,n=this.texRows,r=this.getScale(e).texW;return!(this.freePointer.x+r>t)||this.freePointer.row1&&void 0!==arguments[1]?arguments[1]:{},a=r.forceRedraw,i=void 0!==a&&a,s=r.filterEle,l=void 0===s?function(){return!0}:s,u=r.filterType,c=void 0===u?function(){return!0}:u,d=!1,h=!1,f=o(e);try{for(f.s();!(t=f.n()).done;){var p=t.value;if(l(p)){var g,v=o(this.renderTypes.values());try{var y=function(){var e=g.value,t=e.type;if(c(t)){var r=n.collections.get(e.collection),a=e.getKey(p),o=Array.isArray(a)?a:[a];if(i)o.forEach(function(e){return r.markKeyForGC(e)}),h=!0;else{var s=e.getID?e.getID(p):p.id(),l=n._key(t,s),u=n.typeAndIdToKey.get(l);void 0===u||Jd(o,u)||(d=!0,n.typeAndIdToKey.delete(l),u.forEach(function(e){return r.markKeyForGC(e)}))}}};for(v.s();!(g=v.n()).done;)y()}catch(m){v.e(m)}finally{v.f()}}}}catch(m){f.e(m)}finally{f.f()}return h&&(this.gc(),d=!1),d}},{key:"gc",value:function(){var e,t=o(this.collections.values());try{for(t.s();!(e=t.n()).done;){e.value.gc()}}catch(n){t.e(n)}finally{t.f()}}},{key:"getOrCreateAtlas",value:function(e,t,n,r){var a=this.renderTypes.get(t),i=this.collections.get(a.collection),o=!1,s=i.draw(r,n,function(t){a.drawClipped?(t.save(),t.beginPath(),t.rect(0,0,n.w,n.h),t.clip(),a.drawElement(t,e,n,!0,!0),t.restore()):a.drawElement(t,e,n,!0,!0),o=!0});if(o){var l=a.getID?a.getID(e):e.id(),u=this._key(t,l);this.typeAndIdToKey.has(u)?this.typeAndIdToKey.get(u).push(r):this.typeAndIdToKey.set(u,[r])}return s}},{key:"getAtlasInfo",value:function(e,t){var n=this,r=this.renderTypes.get(t),a=r.getKey(e);return(Array.isArray(a)?a:[a]).map(function(a){var i=r.getBoundingBox(e,a),o=n.getOrCreateAtlas(e,t,i,a),s=l(o.getOffsets(a),2),u=s[0];return{atlas:o,tex:u,tex1:u,tex2:s[1],bb:i}})}},{key:"getDebugInfo",value:function(){var e,t=[],n=o(this.collections);try{for(n.s();!(e=n.n()).done;){var r=l(e.value,2),a=r[0],i=r[1].getCounts(),s=i.keyCount,u=i.atlasCount;t.push({type:a,keyCount:s,atlasCount:u})}}catch(c){n.e(c)}finally{n.f()}return t}}])}(),vh=function(){return i(function e(t){a(this,e),this.globalOptions=t,this.atlasSize=t.webglTexSize,this.maxAtlasesPerBatch=t.webglTexPerBatch,this.batchAtlases=[]},[{key:"getMaxAtlasesPerBatch",value:function(){return this.maxAtlasesPerBatch}},{key:"getAtlasSize",value:function(){return this.atlasSize}},{key:"getIndexArray",value:function(){return Array.from({length:this.maxAtlasesPerBatch},function(e,t){return t})}},{key:"startBatch",value:function(){this.batchAtlases=[]}},{key:"getAtlasCount",value:function(){return this.batchAtlases.length}},{key:"getAtlases",value:function(){return this.batchAtlases}},{key:"canAddToCurrentBatch",value:function(e){return this.batchAtlases.length!==this.maxAtlasesPerBatch||this.batchAtlases.includes(e)}},{key:"getAtlasIndexForBatch",value:function(e){var t=this.batchAtlases.indexOf(e);if(t<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw new Error("cannot add more atlases to batch");this.batchAtlases.push(e),t=this.batchAtlases.length-1}return t}}])}(),yh={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},mh=1,bh=2,xh=function(){return i(function e(t,n,r){a(this,e),this.r=t,this.gl=n,this.maxInstances=r.webglBatchSize,this.atlasSize=r.webglTexSize,this.bgColor=r.bgColor,this.debug=r.webglDebug,this.batchDebugInfo=[],r.enableWrapping=!0,r.createTextureCanvas=Zd,this.atlasManager=new gh(t,r),this.batchManager=new vh(r),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(yh.SCREEN),this.pickingProgram=this._createShaderProgram(yh.PICKING),this.vao=this._createVAO()},[{key:"addAtlasCollection",value:function(e,t){this.atlasManager.addAtlasCollection(e,t)}},{key:"addTextureAtlasRenderType",value:function(e,t){this.atlasManager.addRenderType(e,t)}},{key:"addSimpleShapeRenderType",value:function(e,t){this.simpleShapeOptions.set(e,t)}},{key:"invalidate",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).type,n=this.atlasManager;return t?n.invalidate(e,{filterType:function(e){return e===t},forceRedraw:!0}):n.invalidate(e)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"_createShaderProgram",value:function(e){var t=this.gl,n="#version 300 es\n precision highp float;\n\n uniform mat3 uPanZoomMatrix;\n uniform int uAtlasSize;\n \n // instanced\n in vec2 aPosition; // a vertex from the unit square\n \n in mat3 aTransform; // used to transform verticies, eg into a bounding box\n in int aVertType; // the type of thing we are rendering\n\n // the z-index that is output when using picking mode\n in vec4 aIndex;\n \n // For textures\n in int aAtlasId; // which shader unit/atlas to use\n in vec4 aTex; // x/y/w/h of texture in atlas\n\n // for edges\n in vec4 aPointAPointB;\n in vec4 aPointCPointD;\n in vec2 aLineWidth; // also used for node border width\n\n // simple shapes\n in vec4 aCornerRadius; // for round-rectangle [top-right, bottom-right, top-left, bottom-left]\n in vec4 aColor; // also used for edges\n in vec4 aBorderColor; // aLineWidth is used for border width\n\n // output values passed to the fragment shader\n out vec2 vTexCoord;\n out vec4 vColor;\n out vec2 vPosition;\n // flat values are not interpolated\n flat out int vAtlasId; \n flat out int vVertType;\n flat out vec2 vTopRight;\n flat out vec2 vBotLeft;\n flat out vec4 vCornerRadius;\n flat out vec4 vBorderColor;\n flat out vec2 vBorderWidth;\n flat out vec4 vIndex;\n \n void main(void) {\n int vid = gl_VertexID;\n vec2 position = aPosition; // TODO make this a vec3, simplifies some code below\n\n if(aVertType == ".concat(0,") {\n float texX = aTex.x; // texture coordinates\n float texY = aTex.y;\n float texW = aTex.z;\n float texH = aTex.w;\n\n if(vid == 1 || vid == 2 || vid == 4) {\n texX += texW;\n }\n if(vid == 2 || vid == 4 || vid == 5) {\n texY += texH;\n }\n\n float d = float(uAtlasSize);\n vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1\n\n gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);\n }\n else if(aVertType == ").concat(4," || aVertType == ").concat(7," \n || aVertType == ").concat(5," || aVertType == ").concat(6,") { // simple shapes\n\n // the bounding box is needed by the fragment shader\n vBotLeft = (aTransform * vec3(0, 0, 1)).xy; // flat\n vTopRight = (aTransform * vec3(1, 1, 1)).xy; // flat\n vPosition = (aTransform * vec3(position, 1)).xy; // will be interpolated\n\n // calculations are done in the fragment shader, just pass these along\n vColor = aColor;\n vCornerRadius = aCornerRadius;\n vBorderColor = aBorderColor;\n vBorderWidth = aLineWidth;\n\n gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);\n }\n else if(aVertType == ").concat(1,") {\n vec2 source = aPointAPointB.xy;\n vec2 target = aPointAPointB.zw;\n\n // adjust the geometry so that the line is centered on the edge\n position.y = position.y - 0.5;\n\n // stretch the unit square into a long skinny rectangle\n vec2 xBasis = target - source;\n vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x));\n vec2 point = source + xBasis * position.x + yBasis * aLineWidth[0] * position.y;\n\n gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0);\n vColor = aColor;\n } \n else if(aVertType == ").concat(2,") {\n vec2 pointA = aPointAPointB.xy;\n vec2 pointB = aPointAPointB.zw;\n vec2 pointC = aPointCPointD.xy;\n vec2 pointD = aPointCPointD.zw;\n\n // adjust the geometry so that the line is centered on the edge\n position.y = position.y - 0.5;\n\n vec2 p0, p1, p2, pos;\n if(position.x == 0.0) { // The left side of the unit square\n p0 = pointA;\n p1 = pointB;\n p2 = pointC;\n pos = position;\n } else { // The right side of the unit square, use same approach but flip the geometry upside down\n p0 = pointD;\n p1 = pointC;\n p2 = pointB;\n pos = vec2(0.0, -position.y);\n }\n\n vec2 p01 = p1 - p0;\n vec2 p12 = p2 - p1;\n vec2 p21 = p1 - p2;\n\n // Find the normal vector.\n vec2 tangent = normalize(normalize(p12) + normalize(p01));\n vec2 normal = vec2(-tangent.y, tangent.x);\n\n // Find the vector perpendicular to p0 -> p1.\n vec2 p01Norm = normalize(vec2(-p01.y, p01.x));\n\n // Determine the bend direction.\n float sigma = sign(dot(p01 + p21, normal));\n float width = aLineWidth[0];\n\n if(sign(pos.y) == -sigma) {\n // This is an intersecting vertex. Adjust the position so that there's no overlap.\n vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm);\n gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);\n } else {\n // This is a non-intersecting vertex. Treat it like a mitre join.\n vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm);\n gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);\n }\n\n vColor = aColor;\n } \n else if(aVertType == ").concat(3," && vid < 3) {\n // massage the first triangle into an edge arrow\n if(vid == 0)\n position = vec2(-0.15, -0.3);\n if(vid == 1)\n position = vec2( 0.0, 0.0);\n if(vid == 2)\n position = vec2( 0.15, -0.3);\n\n gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);\n vColor = aColor;\n }\n else {\n gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space\n }\n\n vAtlasId = aAtlasId;\n vVertType = aVertType;\n vIndex = aIndex;\n }\n "),r=this.batchManager.getIndexArray(),a="#version 300 es\n precision highp float;\n\n // declare texture unit for each texture atlas in the batch\n ".concat(r.map(function(e){return"uniform sampler2D uTexture".concat(e,";")}).join("\n\t"),"\n\n uniform vec4 uBGColor;\n uniform float uZoom;\n\n in vec2 vTexCoord;\n in vec4 vColor;\n in vec2 vPosition; // model coordinates\n\n flat in int vAtlasId;\n flat in vec4 vIndex;\n flat in int vVertType;\n flat in vec2 vTopRight;\n flat in vec2 vBotLeft;\n flat in vec4 vCornerRadius;\n flat in vec4 vBorderColor;\n flat in vec2 vBorderWidth;\n\n out vec4 outColor;\n\n ").concat("\n float circleSD(vec2 p, float r) {\n return distance(vec2(0), p) - r; // signed distance\n }\n","\n ").concat("\n float rectangleSD(vec2 p, vec2 b) {\n vec2 d = abs(p)-b;\n return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0);\n }\n","\n ").concat("\n float roundRectangleSD(vec2 p, vec2 b, vec4 cr) {\n cr.xy = (p.x > 0.0) ? cr.xy : cr.zw;\n cr.x = (p.y > 0.0) ? cr.x : cr.y;\n vec2 q = abs(p) - b + cr.x;\n return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x;\n }\n","\n ").concat("\n float ellipseSD(vec2 p, vec2 ab) {\n p = abs( p ); // symmetry\n\n // find root with Newton solver\n vec2 q = ab*(p-ab);\n float w = (q.x1.0) ? d : -d;\n }\n","\n\n vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha\n return vec4( \n top.rgb + (bot.rgb * (1.0 - top.a)),\n top.a + (bot.a * (1.0 - top.a)) \n );\n }\n\n vec4 distInterp(vec4 cA, vec4 cB, float d) { // interpolate color using Signed Distance\n // scale to the zoom level so that borders don't look blurry when zoomed in\n // note 1.5 is an aribitrary value chosen because it looks good\n return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d))); \n }\n\n void main(void) {\n if(vVertType == ").concat(0,") {\n // look up the texel from the texture unit\n ").concat(r.map(function(e){return"if(vAtlasId == ".concat(e,") outColor = texture(uTexture").concat(e,", vTexCoord);")}).join("\n\telse "),"\n } \n else if(vVertType == ").concat(3,") {\n // mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out';\n outColor = blend(vColor, uBGColor);\n outColor.a = 1.0; // make opaque, masks out line under arrow\n }\n else if(vVertType == ").concat(4," && vBorderWidth == vec2(0.0)) { // simple rectangle with no border\n outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done\n }\n else if(vVertType == ").concat(4," || vVertType == ").concat(7," \n || vVertType == ").concat(5," || vVertType == ").concat(6,") { // use SDF\n\n float outerBorder = vBorderWidth[0];\n float innerBorder = vBorderWidth[1];\n float borderPadding = outerBorder * 2.0;\n float w = vTopRight.x - vBotLeft.x - borderPadding;\n float h = vTopRight.y - vBotLeft.y - borderPadding;\n vec2 b = vec2(w/2.0, h/2.0); // half width, half height\n vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center\n\n float d; // signed distance\n if(vVertType == ").concat(4,") {\n d = rectangleSD(p, b);\n } else if(vVertType == ").concat(7," && w == h) {\n d = circleSD(p, b.x); // faster than ellipse\n } else if(vVertType == ").concat(7,") {\n d = ellipseSD(p, b);\n } else {\n d = roundRectangleSD(p, b, vCornerRadius.wzyx);\n }\n\n // use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling\n // we must smooth colors inwards, because we can't change pixels outside the shape's bounding box\n if(d > 0.0) {\n if(d > outerBorder) {\n discard;\n } else {\n outColor = distInterp(vBorderColor, vec4(0), d - outerBorder);\n }\n } else {\n if(d > innerBorder) {\n vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor;\n vec4 innerBorderColor = blend(vBorderColor, vColor);\n outColor = distInterp(innerBorderColor, outerColor, d);\n } \n else {\n vec4 outerColor;\n if(innerBorder == 0.0 && outerBorder == 0.0) {\n outerColor = vec4(0);\n } else if(innerBorder == 0.0) {\n outerColor = vBorderColor;\n } else {\n outerColor = blend(vBorderColor, vColor);\n }\n outColor = distInterp(vColor, outerColor, d - innerBorder);\n }\n }\n }\n else {\n outColor = vColor;\n }\n\n ").concat(e.picking?"if(outColor.a == 0.0) discard;\n else outColor = vIndex;":"","\n }\n "),i=function(e,t,n){var r=Gd(e,e.VERTEX_SHADER,t),a=Gd(e,e.FRAGMENT_SHADER,n),i=e.createProgram();if(e.attachShader(i,r),e.attachShader(i,a),e.linkProgram(i),!e.getProgramParameter(i,e.LINK_STATUS))throw new Error("Could not initialize shaders");return i}(t,n,a);i.aPosition=t.getAttribLocation(i,"aPosition"),i.aIndex=t.getAttribLocation(i,"aIndex"),i.aVertType=t.getAttribLocation(i,"aVertType"),i.aTransform=t.getAttribLocation(i,"aTransform"),i.aAtlasId=t.getAttribLocation(i,"aAtlasId"),i.aTex=t.getAttribLocation(i,"aTex"),i.aPointAPointB=t.getAttribLocation(i,"aPointAPointB"),i.aPointCPointD=t.getAttribLocation(i,"aPointCPointD"),i.aLineWidth=t.getAttribLocation(i,"aLineWidth"),i.aColor=t.getAttribLocation(i,"aColor"),i.aCornerRadius=t.getAttribLocation(i,"aCornerRadius"),i.aBorderColor=t.getAttribLocation(i,"aBorderColor"),i.uPanZoomMatrix=t.getUniformLocation(i,"uPanZoomMatrix"),i.uAtlasSize=t.getUniformLocation(i,"uAtlasSize"),i.uBGColor=t.getUniformLocation(i,"uBGColor"),i.uZoom=t.getUniformLocation(i,"uZoom"),i.uTextures=[];for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:yh.SCREEN;this.panZoomMatrix=e,this.renderTarget=t,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"_isVisible",value:function(e,t){return!!e.visible()&&(!t||!t.isVisible||t.isVisible(e))}},{key:"drawTexture",value:function(e,t,n){var r=this.atlasManager,a=this.batchManager,i=r.getRenderTypeOpts(n);if(this._isVisible(e,i)&&(!e.isEdge()||this._isValidEdge(e))){if(this.renderTarget.picking&&i.getTexPickingMode){var s=i.getTexPickingMode(e);if(s===mh)return;if(s==bh)return void this.drawPickingRectangle(e,t,n)}var u,c=o(r.getAtlasInfo(e,n));try{for(c.s();!(u=c.n()).done;){var d=u.value,h=d.atlas,f=d.tex1,p=d.tex2;a.canAddToCurrentBatch(h)||this.endBatch();for(var g=a.getAtlasIndexForBatch(h),v=0,y=[[f,!0],[p,!1]];v=this.maxInstances&&this.endBatch()}}}}catch(T){c.e(T)}finally{c.f()}}}},{key:"setTransformMatrix",value:function(e,t,n,r){var a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=0;if(n.shapeProps&&n.shapeProps.padding&&(i=e.pstyle(n.shapeProps.padding).pfValue),r){var o=r.bb,s=r.tex1,l=r.tex2,u=s.w/(s.w+l.w);a||(u=1-u);var c=this._getAdjustedBB(o,i,a,u);this._applyTransformMatrix(t,c,n,e)}else{var d=n.getBoundingBox(e),h=this._getAdjustedBB(d,i,!0,1);this._applyTransformMatrix(t,h,n,e)}}},{key:"_applyTransformMatrix",value:function(e,t,n,r){var a,i;uh(e);var o=n.getRotation?n.getRotation(r):0;if(0!==o){var s=n.getRotationPoint(r);ch(e,e,[s.x,s.y]),dh(e,e,o);var l=n.getRotationOffset(r);a=l.x+(t.xOffset||0),i=l.y+(t.yOffset||0)}else a=t.x1,i=t.y1;ch(e,e,[a,i]),hh(e,e,[t.w,t.h])}},{key:"_getAdjustedBB",value:function(e,t,n,r){var a=e.x1,i=e.y1,o=e.w,s=e.h;t&&(a-=t,i-=t,o+=2*t,s+=2*t);var l=0,u=o*r;return n&&r<1?o=u:!n&&r<1&&(a+=l=o-u,o=u),{x1:a,y1:i,w:o,h:s,xOffset:l,yOffset:e.yOffset}}},{key:"drawPickingRectangle",value:function(e,t,n){var r=this.atlasManager.getRenderTypeOpts(n),a=this.instanceCount;this.vertTypeBuffer.getView(a)[0]=4,th(t,this.indexBuffer.getView(a)),eh([0,0,0],1,this.colorBuffer.getView(a));var i=this.transformBuffer.getMatrixView(a);this.setTransformMatrix(e,i,r),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(e,t,n){var r=this.simpleShapeOptions.get(n);if(this._isVisible(e,r)){var a=r.shapeProps,i=this._getVertTypeForShape(e,a.shape);if(void 0===i||r.isSimple&&!r.isSimple(e,this.renderTarget))this.drawTexture(e,t,n);else{var o=this.instanceCount;if(this.vertTypeBuffer.getView(o)[0]=i,5===i||6===i){var s=r.getBoundingBox(e),l=this._getCornerRadius(e,a.radius,s),u=this.cornerRadiusBuffer.getView(o);u[0]=l,u[1]=l,u[2]=l,u[3]=l,6===i&&(u[0]=0,u[2]=0)}th(t,this.indexBuffer.getView(o));var c=this.renderTarget.picking?1:"node-body"===n?e.effectiveOpacity():1,d=this.renderTarget.picking?1:e.pstyle(a.opacity).value*c;eh(e.pstyle(a.color).value,d,this.colorBuffer.getView(o));var h=this.lineWidthBuffer.getView(o);if(h[0]=0,h[1]=0,a.border){var f=e.pstyle("border-width").value;if(f>0){eh(e.pstyle("border-color").value,c*e.pstyle("border-opacity").value,this.borderColorBuffer.getView(o));var p=e.pstyle("border-position").value;if("inside"===p)h[0]=0,h[1]=-f;else if("outside"===p)h[0]=f,h[1]=0;else{var g=f/2;h[0]=g,h[1]=-g}}}var v=this.transformBuffer.getMatrixView(o);this.setTransformMatrix(e,v,r),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},{key:"_getVertTypeForShape",value:function(e,t){switch(e.pstyle(t).value){case"rectangle":return 4;case"ellipse":return 7;case"roundrectangle":case"round-rectangle":return 5;case"bottom-round-rectangle":return 6;default:return}}},{key:"_getCornerRadius",value:function(e,t,n){var r=n.w,a=n.h;if("auto"===e.pstyle(t).value)return In(r,a);var i=e.pstyle(t).pfValue,o=r/2,s=a/2;return Math.min(i,s,o)}},{key:"drawEdgeArrow",value:function(e,t,n){if(e.visible()){var r,a,i,o=e._private.rscratch;if("source"===n?(r=o.arrowStartX,a=o.arrowStartY,i=o.srcArrowAngle):(r=o.arrowEndX,a=o.arrowEndY,i=o.tgtArrowAngle),!(isNaN(r)||null==r||isNaN(a)||null==a||isNaN(i)||null==i))if("none"!==e.pstyle(n+"-arrow-shape").value){var s=e.pstyle(n+"-arrow-color").value,l=e.pstyle("opacity").value*e.pstyle("line-opacity").value,u=e.pstyle("width").pfValue,c=e.pstyle("arrow-scale").value,d=this.r.getArrowWidth(u,c),h=this.instanceCount,f=this.transformBuffer.getMatrixView(h);uh(f),ch(f,f,[r,a]),hh(f,f,[d,d]),dh(f,f,i),this.vertTypeBuffer.getView(h)[0]=3,th(t,this.indexBuffer.getView(h)),eh(s,l,this.colorBuffer.getView(h)),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},{key:"drawEdgeLine",value:function(e,t){if(e.visible()){var n=this._getEdgePoints(e);if(n){var r=e.pstyle("opacity").value,a=e.pstyle("line-opacity").value,i=e.pstyle("width").pfValue,o=e.pstyle("line-color").value,s=r*a;if(n.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),4==n.length){var l=this.instanceCount;this.vertTypeBuffer.getView(l)[0]=1,th(t,this.indexBuffer.getView(l)),eh(o,s,this.colorBuffer.getView(l)),this.lineWidthBuffer.getView(l)[0]=i;var u=this.pointAPointBBuffer.getView(l);u[0]=n[0],u[1]=n[1],u[2]=n[2],u[3]=n[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var c=0;c=this.maxInstances&&this.endBatch()}}}}},{key:"_isValidEdge",value:function(e){var t=e._private.rscratch;return!t.badLine&&null!=t.allpts&&!isNaN(t.allpts[0])}},{key:"_getEdgePoints",value:function(e){var t=e._private.rscratch;if(this._isValidEdge(e)){var n=t.allpts;if(4==n.length)return n;var r=this._getNumSegments(e);return this._getCurveSegmentPoints(n,r)}}},{key:"_getNumSegments",value:function(e){return Math.min(Math.max(15,5),this.maxInstances)}},{key:"_getCurveSegmentPoints",value:function(e,t){if(4==e.length)return e;for(var n=Array(2*(t+1)),r=0;r<=t;r++)if(0==r)n[0]=e[0],n[1]=e[1];else if(r==t)n[2*r]=e[e.length-2],n[2*r+1]=e[e.length-1];else{var a=r/t;this._setCurvePoint(e,a,n,2*r)}return n}},{key:"_setCurvePoint",value:function(e,t,n,r){if(!(e.length<=2)){for(var a=Array(e.length-2),i=0;i0}},u=function(e){return"yes"===e.pstyle("text-events").strValue?bh:mh},c=function(e){var t=e.position(),n=t.x,r=t.y,a=e.outerWidth(),i=e.outerHeight();return{w:a,h:i,x1:n-a/2,y1:r-i/2}};n.drawing.addAtlasCollection("node",{texRows:e.webglTexRowsNodes}),n.drawing.addAtlasCollection("label",{texRows:e.webglTexRows}),n.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:t.getStyleKey,getBoundingBox:t.getElementBox,drawElement:t.drawElement}),n.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:c,isSimple:Qd,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),n.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:c,isVisible:s("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),n.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:c,isVisible:s("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),n.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:u,getKey:kh(t.getLabelKey,null),getBoundingBox:Th(t.getLabelBox,null),drawClipped:!0,drawElement:t.drawLabel,getRotation:a(null),getRotationPoint:t.getLabelRotationPoint,getRotationOffset:t.getLabelRotationOffset,isVisible:i("label")}),n.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:u,getKey:kh(t.getSourceLabelKey,"source"),getBoundingBox:Th(t.getSourceLabelBox,"source"),drawClipped:!0,drawElement:t.drawSourceLabel,getRotation:a("source"),getRotationPoint:t.getSourceLabelRotationPoint,getRotationOffset:t.getSourceLabelRotationOffset,isVisible:i("source-label")}),n.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:u,getKey:kh(t.getTargetLabelKey,"target"),getBoundingBox:Th(t.getTargetLabelBox,"target"),drawClipped:!0,drawElement:t.drawTargetLabel,getRotation:a("target"),getRotationPoint:t.getTargetLabelRotationPoint,getRotationOffset:t.getTargetLabelRotationOffset,isVisible:i("target-label")});var d=Re(function(){console.log("garbage collect flag set"),n.data.gc=!0},1e4);n.onUpdateEleCalcs(function(e,t){var r=!1;t&&t.length>0&&(r|=n.drawing.invalidate(t)),r&&d()}),function(e){var t=e.render;e.render=function(n){n=n||{};var r=e.cy;e.webgl&&(r.zoom()>yd?(!function(e){var t=e.data.contexts[e.WEBGL];t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT)}(e),t.call(e,n)):(!function(e){var t=function(t){t.save(),t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,e.canvasWidth,e.canvasHeight),t.restore()};t(e.data.contexts[e.NODE]),t(e.data.contexts[e.DRAG])}(e),Sh(e,n,yh.SCREEN)))};var n=e.matchCanvasSize;e.matchCanvasSize=function(t){n.call(e,t),e.pickingFrameBuffer.setFramebufferAttachmentSizes(e.canvasWidth,e.canvasHeight),e.pickingFrameBuffer.needsDraw=!0},e.findNearestElements=function(t,n,r,a){return function(e,t,n){var r,a,i,s=function(e,t,n){var r,a,i,o,s=$d(e),u=s.pan,c=s.zoom,d=function(e,t,n,r,a){var i=r*n+t.x,o=a*n+t.y;return[i,o=Math.round(e.canvasHeight-o)]}(e,u,c,t,n),h=l(d,2),f=h[0],p=h[1],g=6;if(r=f-g/2,a=p-g/2,o=g,0===(i=g)||0===o)return[];var v=e.data.contexts[e.WEBGL];v.bindFramebuffer(v.FRAMEBUFFER,e.pickingFrameBuffer),e.pickingFrameBuffer.needsDraw&&(v.viewport(0,0,v.canvas.width,v.canvas.height),Sh(e,null,yh.PICKING),e.pickingFrameBuffer.needsDraw=!1);var y=i*o,m=new Uint8Array(4*y);v.readPixels(r,a,i,o,v.RGBA,v.UNSIGNED_BYTE,m),v.bindFramebuffer(v.FRAMEBUFFER,null);for(var b=new Set,x=0;x=0&&b.add(w)}return b}(e,t,n),u=e.getCachedZSortedEles(),c=o(s);try{for(c.s();!(i=c.n()).done;){var d=u[i.value];if(!r&&d.isNode()&&(r=d),!a&&d.isEdge()&&(a=d),r&&a)break}}catch(h){c.e(h)}finally{c.f()}return[r,a].filter(Boolean)}(e,t,n)};var r=e.invalidateCachedZSortedEles;e.invalidateCachedZSortedEles=function(){r.call(e),e.pickingFrameBuffer.needsDraw=!0};var a=e.notify;e.notify=function(t,n){a.call(e,t,n),"viewport"===t||"bounds"===t?e.pickingFrameBuffer.needsDraw=!0:"background"===t&&e.drawing.invalidate(n,{type:"node-body"})}}(n)};var kh=function(e,t){return function(n){var r=e(n),a=Eh(n,t);return a.length>1?a.map(function(e,t){return"".concat(r,"_").concat(t)}):r}},Th=function(e,t){return function(n,r){var a=e(n);if("string"==typeof r){var i=r.indexOf("_");if(i>0){var o=Number(r.substring(i+1)),s=Eh(n,t),l=a.h/s.length,u=l*o,c=a.y1+u;return{x1:a.x1,w:a.w,y1:c,h:l,yOffset:u}}}return a}};function Ch(e,t){var n=e.canvasWidth,r=e.canvasHeight,a=$d(e),i=a.pan,o=a.zoom;t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,n,r),t.translate(i.x,i.y),t.scale(o,o)}function Ph(e,t,n){var r=e.drawing;t+=1,n.isNode()?(r.drawNode(n,t,"node-underlay"),r.drawNode(n,t,"node-body"),r.drawTexture(n,t,"label"),r.drawNode(n,t,"node-overlay")):(r.drawEdgeLine(n,t),r.drawEdgeArrow(n,t,"source"),r.drawEdgeArrow(n,t,"target"),r.drawTexture(n,t,"label"),r.drawTexture(n,t,"edge-source-label"),r.drawTexture(n,t,"edge-target-label"))}function Sh(e,t,n){var r;e.webglDebug&&(r=performance.now());var a=e.drawing,i=0;if(n.screen&&e.data.canvasNeedsRedraw[e.SELECT_BOX]&&function(e,t){e.drawSelectionRectangle(t,function(t){return Ch(e,t)})}(e,t),e.data.canvasNeedsRedraw[e.NODE]||n.picking){var s=e.data.contexts[e.WEBGL];n.screen?(s.clearColor(0,0,0,0),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA)):s.disable(s.BLEND),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.viewport(0,0,s.canvas.width,s.canvas.height);var l=function(e){var t=e.canvasWidth,n=e.canvasHeight,r=$d(e),a=r.pan,i=r.zoom,o=lh();ch(o,o,[a.x,a.y]),hh(o,o,[i,i]);var s=lh();!function(e,t,n){e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/n,e[5]=0,e[6]=-1,e[7]=1,e[8]=1}(s,t,n);var l,u,c,d,h,f,p,g,v,y,m,b,x,w,E,k,T,C,P,S,B,D=lh();return l=D,c=o,d=(u=s)[0],h=u[1],f=u[2],p=u[3],g=u[4],v=u[5],y=u[6],m=u[7],b=u[8],x=c[0],w=c[1],E=c[2],k=c[3],T=c[4],C=c[5],P=c[6],S=c[7],B=c[8],l[0]=x*d+w*p+E*y,l[1]=x*h+w*g+E*m,l[2]=x*f+w*v+E*b,l[3]=k*d+T*p+C*y,l[4]=k*h+T*g+C*m,l[5]=k*f+T*v+C*b,l[6]=P*d+S*p+B*y,l[7]=P*h+S*g+B*m,l[8]=P*f+S*v+B*b,D}(e),u=e.getCachedZSortedEles();if(i=u.length,a.startFrame(l,n),n.screen){for(var c=0;c0&&i>0){h.clearRect(0,0,a,i),h.globalCompositeOperation="source-over";var f=this.getCachedZSortedEles();if(e.full)h.translate(-n.x1*l,-n.y1*l),h.scale(l,l),this.drawElements(h,f),h.scale(1/l,1/l),h.translate(n.x1*l,n.y1*l);else{var p=t.pan(),g={x:p.x*l,y:p.y*l};l*=t.zoom(),h.translate(g.x,g.y),h.scale(l,l),this.drawElements(h,f),h.scale(1/l,1/l),h.translate(-g.x,-g.y)}e.bg&&(h.globalCompositeOperation="destination-over",h.fillStyle=e.bg,h.rect(0,0,a,i),h.fill())}return d},Nh.png=function(e){return zh(e,this.bufferCanvasImage(e),"image/png")},Nh.jpg=function(e){return zh(e,this.bufferCanvasImage(e),"image/jpeg")};var Oh={nodeShapeImpl:function(e,t,n,r,a,i,o,s){switch(e){case"ellipse":return this.drawEllipsePath(t,n,r,a,i);case"polygon":return this.drawPolygonPath(t,n,r,a,i,o);case"round-polygon":return this.drawRoundPolygonPath(t,n,r,a,i,o,s);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(t,n,r,a,i,s);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(t,n,r,a,i,o,s);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(t,n,r,a,i,s);case"barrel":return this.drawBarrelPath(t,n,r,a,i)}}},Vh=Xh,Fh=Xh.prototype;function Xh(e){var t=this,n=t.cy.window().document;e.webgl&&(Fh.CANVAS_LAYERS=t.CANVAS_LAYERS=4,console.log("webgl rendering enabled")),t.data={canvases:new Array(Fh.CANVAS_LAYERS),contexts:new Array(Fh.CANVAS_LAYERS),canvasNeedsRedraw:new Array(Fh.CANVAS_LAYERS),bufferCanvases:new Array(Fh.BUFFER_COUNT),bufferContexts:new Array(Fh.CANVAS_LAYERS)};var r="-webkit-tap-highlight-color",a="rgba(0,0,0,0)";t.data.canvasContainer=n.createElement("div");var i=t.data.canvasContainer.style;t.data.canvasContainer.style[r]=a,i.position="relative",i.zIndex="0",i.overflow="hidden";var o=e.cy.container();o.appendChild(t.data.canvasContainer),o.style[r]=a;var s={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};p&&p.userAgent.match(/msie|trident|edge/i)&&(s["-ms-touch-action"]="none",s["touch-action"]="none");for(var l=0;lc.AC});var c=a(96506);a(64918),a(96755),a(1672),a(841),a(9417),a(338),a(78771),a(46853),a(717),a(79515),a(44505),a(72379),a(58962),a(16459),a(76385),a(31293),a(86827)}}]); \ No newline at end of file diff --git a/assets/js/1738.c91d82d5.js b/assets/js/1738.c91d82d5.js new file mode 100644 index 000000000..ae2b24ff4 --- /dev/null +++ b/assets/js/1738.c91d82d5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[1738],{51738(e,r,t){t.d(r,{diagram:()=>y});var n=t(19279),a=t(77454),s=(t(5637),t(76385),t(31293)),i=t(86827),o=t(78731),p=(0,o.WG)().RailroadEbnf.parser.LangiumParser,l=(0,i.K)(e=>{const r=e.alternatives.map(m);return 1===r.length?r[0]:{type:"choice",alternatives:r}},"transformChoice"),m=(0,i.K)(e=>{const r=e.elements.map(f);return 1===r.length?r[0]:{type:"sequence",elements:r}},"transformSequence"),u=(0,i.K)(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return l(e.element);case"EbnfOptional":return{type:"optional",element:l(e.element)};case"EbnfRepetition":return{type:"repetition",element:l(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),c=(0,i.K)((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},u(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),f=(0,i.K)(e=>e.postfixes.reduce((e,r)=>c(e,r),u(e.base)),"transformTerm"),d=(0,i.K)(e=>({name:e.name,definition:l(e.definition)}),"transformRule"),b=(0,i.K)(e=>{(0,a.S)(e,n.db),e.title&&n.db.setTitle(e.title),e.rules.map(e=>n.db.addRule(d(e)))},"populateDb"),y={parser:{parse:(0,i.K)(e=>{n.db.clear(),s.R.debug("[EBNF Parser] Starting Langium parse");const r=p.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new o.zg(r);const t=r.value;s.R.debug("[EBNF Parser] Parsed rules:",t.rules.length),b(t),s.R.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n.db}},db:n.db,renderer:n.U,styles:n.$}}}]); \ No newline at end of file diff --git a/assets/js/1783be55.d8dbc897.js b/assets/js/1783be55.d8dbc897.js new file mode 100644 index 000000000..9c3cacf8c --- /dev/null +++ b/assets/js/1783be55.d8dbc897.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[769],{2306(d,e,n){n.r(e),n.d(e,{assets:()=>c,contentTitle:()=>l,default:()=>j,frontMatter:()=>i,metadata:()=>r,toc:()=>h});const r=JSON.parse('{"id":"concepts/DISC/erasure-coding","title":"Erasure Coding","description":"Explains optional data protection technique using redundant chunks at multiple protection levels to ensure reliable data recovery.","source":"@site/docs/concepts/DISC/erasure-coding.md","sourceDirName":"concepts/DISC","slug":"/concepts/DISC/erasure-coding","permalink":"/docs/concepts/DISC/erasure-coding","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/concepts/DISC/erasure-coding.md","tags":[],"version":"current","frontMatter":{"title":"Erasure Coding","id":"erasure-coding","description":"Explains optional data protection technique using redundant chunks at multiple protection levels to ensure reliable data recovery."},"sidebar":"concepts","previous":{"title":"Neighborhoods","permalink":"/docs/concepts/DISC/neighborhoods"},"next":{"title":"Incentives Overview","permalink":"/docs/concepts/incentives/overview"}}');var s=n(74848),t=n(28453);const i={title:"Erasure Coding",id:"erasure-coding",description:"Explains optional data protection technique using redundant chunks at multiple protection levels to ensure reliable data recovery."},l=void 0,c={},h=[{value:"How does erasure coding work?",id:"how-it-works",level:2},{value:"Example",id:"example",level:3},{value:"Levels of Protection",id:"levels-of-protection",level:3},{value:"Usage",id:"usage",level:2},{value:"Cost Calculation",id:"cost-calculation",level:2},{value:"Cost Calculation for Smaller Uploads",id:"cost-calculation-for-smaller-uploads",level:3},{value:"Example Cost Calculation",id:"example-cost-calculation",level:3},{value:"Exact Multiples",id:"exact-multiples",level:4},{value:"With Remainders",id:"with-remainders",level:4}];function x(d){const e={a:"a",em:"em",h2:"h2",h3:"h3",h4:"h4",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,t.R)(),...d.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(e.p,{children:["Erasure coding (also known as erasure code) is an efficient and flexible approach to data protection which is an optional feature for Swarm uploads. It is a technique that increases data protection by enabling the recovery of original data even when some encoded chunks are lost or corrupted. When used, it ensures that data on Swarm can always be accessed reliably, even if some nodes or entire neighborhoods go offline. Refer to the ",(0,s.jsx)(e.a,{href:"https://papers.ethswarm.org/p/erasure/",children:"official erasure coding paper"})," for more in depth details."]}),"\n",(0,s.jsx)(e.h2,{id:"how-it-works",children:"How does erasure coding work?"}),"\n",(0,s.jsx)(e.p,{children:'Erasure coding enhances data protection by dividing the source data into "chunks" and adding additional redundant chunks.'}),"\n",(0,s.jsxs)(e.p,{children:["Specifically, data is divided into ",(0,s.jsx)(e.strong,{children:"m"})," chunks, and ",(0,s.jsx)(e.strong,{children:"k"})," additional chunks are generated, resulting in ",(0,s.jsx)(e.strong,{children:"m + k"})," total chunks. The data is encoded across these chunks such that as long as ",(0,s.jsx)(e.strong,{children:"m"})," chunks are intact, the original data can be fully reconstructed. Chunks are then distributed across the network as with a standard upload. This approach provides a robust method for data recovery in distributed storage networks like Swarm."]}),"\n",(0,s.jsx)(e.h3,{id:"example",children:"Example"}),"\n",(0,s.jsxs)(e.p,{children:["For an 8KB image, if we set ",(0,s.jsx)(e.strong,{children:"m = 2"})," and ",(0,s.jsx)(e.strong,{children:"k = 1"}),", we create 3 chunks (2 original + 1 redundant). As long as any 2 of these 3 chunks are available, we can reconstruct the original data. By increasing ",(0,s.jsx)(e.strong,{children:"k"})," to 4, we can tolerate the loss of up to 4 chunks while still recovering the original data."]}),"\n",(0,s.jsx)(e.h3,{id:"levels-of-protection",children:"Levels of Protection"}),"\n",(0,s.jsxs)(e.p,{children:["In Swarm's implementation of erasure coding, there are five levels of protection, None, Medium, Strong, Insane, and Paranoid. For each level, the ",(0,s.jsx)(e.strong,{children:"m"})," and ",(0,s.jsx)(e.strong,{children:"k"})," values have been adjusted in order to meet a certain level of data protection:"]}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.em,{children:(0,s.jsx)(e.strong,{children:"Table A:"})})}),"\n",(0,s.jsxs)(e.table,{children:[(0,s.jsx)(e.thead,{children:(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.th,{children:"Redundancy Level Value"}),(0,s.jsx)(e.th,{children:"Level Name"}),(0,s.jsx)(e.th,{children:"Chunk Loss Tolerance"})]})}),(0,s.jsxs)(e.tbody,{children:[(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"0"}),(0,s.jsx)(e.td,{children:"None"}),(0,s.jsx)(e.td,{children:"0%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"1"}),(0,s.jsx)(e.td,{children:"Medium"}),(0,s.jsx)(e.td,{children:"1%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"2"}),(0,s.jsx)(e.td,{children:"Strong"}),(0,s.jsx)(e.td,{children:"5%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"3"}),(0,s.jsx)(e.td,{children:"Insane"}),(0,s.jsx)(e.td,{children:"10%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"4"}),(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"50%"})]})]})]}),"\n",(0,s.jsx)(e.p,{children:'The "Redundancy Level" is a numeric value for each level of protection, the "Level Name" is the official name for each level, and the "Chunk Loss Tolerance" column corresponds to the exact level of data protection for each level. For each redundancy level, the original data is retrievable with >=99.9999% statistical certainty given a percent chunk loss equal or less than the percent shown in the "Chunk Loss Tolerance" column.'}),"\n",(0,s.jsxs)(e.p,{children:["Note that this guarantee of retrievability is for each 128 chunk segment, and therefore does not correspond to retrievability of a whole file. The retrievability failure rate for any individual file depends on the size of the file, and increases with the size of the file. For a detailed explanation of how to calculate the retrievability of any sized file refer to ",(0,s.jsx)(e.a,{href:"https://papers.ethswarm.org/erasure-coding.pdf",children:"section 3 in the erasure coding paper"}),"."]}),"\n",(0,s.jsx)(e.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsxs)(e.p,{children:["For usage instructions, see the ",(0,s.jsx)(e.a,{href:"/docs/develop/tools-and-features/erasure-coding",children:'erasure coding page in the "Develop" section'}),"."]}),"\n",(0,s.jsx)(e.h2,{id:"cost-calculation",children:"Cost Calculation"}),"\n",(0,s.jsx)(e.p,{children:"In Swarm's implementation of erasure coding, there are five levels of protection: None, Medium, Strong, Insane, and Paranoid. Each level adds additional parity chunks for a corresponding increase in data protection (and also cost)."}),"\n",(0,s.jsx)(e.p,{children:"The table below shows the number of parities and data chunks for each level, as well as the percent increase in cost vs a non-erasure coded upload."}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.em,{children:(0,s.jsx)(e.strong,{children:"Table B:"})})}),"\n",(0,s.jsxs)(e.table,{children:[(0,s.jsx)(e.thead,{children:(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.th,{children:"Redundancy"}),(0,s.jsx)(e.th,{children:"Parities"}),(0,s.jsx)(e.th,{children:"Data Chunks"}),(0,s.jsx)(e.th,{children:"Percent"}),(0,s.jsx)(e.th,{children:"Chunks Encrypted"}),(0,s.jsx)(e.th,{children:"Percent Encrypted"})]})}),(0,s.jsxs)(e.tbody,{children:[(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"None"}),(0,s.jsx)(e.td,{children:"0"}),(0,s.jsx)(e.td,{children:"128"}),(0,s.jsx)(e.td,{children:(0,s.jsx)(e.em,{children:"0%"})}),(0,s.jsx)(e.td,{children:"64"}),(0,s.jsx)(e.td,{children:"0%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Medium"}),(0,s.jsx)(e.td,{children:"9"}),(0,s.jsx)(e.td,{children:"119"}),(0,s.jsx)(e.td,{children:(0,s.jsx)(e.em,{children:"7.6%"})}),(0,s.jsx)(e.td,{children:"59"}),(0,s.jsx)(e.td,{children:"15.3%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Strong"}),(0,s.jsx)(e.td,{children:"21"}),(0,s.jsx)(e.td,{children:"107"}),(0,s.jsx)(e.td,{children:(0,s.jsx)(e.em,{children:"19.6%"})}),(0,s.jsx)(e.td,{children:"53"}),(0,s.jsx)(e.td,{children:"39.6%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Insane"}),(0,s.jsx)(e.td,{children:"31"}),(0,s.jsx)(e.td,{children:"97"}),(0,s.jsx)(e.td,{children:"32%"}),(0,s.jsx)(e.td,{children:"48"}),(0,s.jsx)(e.td,{children:"64.6%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"90"}),(0,s.jsx)(e.td,{children:"38"}),(0,s.jsx)(e.td,{children:"236.8%"}),(0,s.jsx)(e.td,{children:"19"}),(0,s.jsx)(e.td,{children:"473.7%"})]})]})]}),"\n",(0,s.jsxs)(e.p,{children:["For each redundancy level, there are ",(0,s.jsx)(e.strong,{children:"m + k"})," = 128 chunks, where ",(0,s.jsx)(e.strong,{children:"m"}),' are the data chunks (shown in column "Data Chunks") and ',(0,s.jsx)(e.strong,{children:"k"}),' are the parity chunks (shown in column "Parities"). The "Percent" and "Percent Encrypted" columns show percent of "parity overhead" cost increase from using erasure coding for normal and encrypted uploads respectively.']}),"\n",(0,s.jsx)(e.h3,{id:"cost-calculation-for-smaller-uploads",children:"Cost Calculation for Smaller Uploads"}),"\n",(0,s.jsx)(e.p,{children:"To find the percent increase in cost for uploads of less than 128 chunks, refer to the table below:"}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.em,{children:(0,s.jsx)(e.strong,{children:"Table C:"})})}),"\n",(0,s.jsxs)(e.table,{children:[(0,s.jsx)(e.thead,{children:(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.th,{children:"Security"}),(0,s.jsx)(e.th,{children:"Parities"}),(0,s.jsx)(e.th,{children:"Chunks"}),(0,s.jsx)(e.th,{children:"Percent"}),(0,s.jsx)(e.th,{children:"Chunks Encrypted"}),(0,s.jsx)(e.th,{children:"Percent Encrypted"})]})}),(0,s.jsxs)(e.tbody,{children:[(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Medium"}),(0,s.jsx)(e.td,{children:"2"}),(0,s.jsx)(e.td,{children:"1"}),(0,s.jsx)(e.td,{children:"200%"}),(0,s.jsx)(e.td,{}),(0,s.jsx)(e.td,{})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Medium"}),(0,s.jsx)(e.td,{children:"3"}),(0,s.jsx)(e.td,{children:"2-5"}),(0,s.jsx)(e.td,{children:"150% - 60%"}),(0,s.jsx)(e.td,{children:"1-2"}),(0,s.jsx)(e.td,{children:"300% - 150%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Medium"}),(0,s.jsx)(e.td,{children:"4"}),(0,s.jsx)(e.td,{children:"6-14"}),(0,s.jsx)(e.td,{children:"66.7% - 28.6%"}),(0,s.jsx)(e.td,{children:"3-7"}),(0,s.jsx)(e.td,{children:"133.3% - 57.1%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Medium"}),(0,s.jsx)(e.td,{children:"5"}),(0,s.jsx)(e.td,{children:"15-28"}),(0,s.jsx)(e.td,{children:"33.3% - 17.9%"}),(0,s.jsx)(e.td,{children:"7-14"}),(0,s.jsx)(e.td,{children:"71.4% - 35.7%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Medium"}),(0,s.jsx)(e.td,{children:"6"}),(0,s.jsx)(e.td,{children:"29-46"}),(0,s.jsx)(e.td,{children:"20.7% - 13%"}),(0,s.jsx)(e.td,{children:"14-23"}),(0,s.jsx)(e.td,{children:"42.9% - 26.1%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Medium"}),(0,s.jsx)(e.td,{children:"7"}),(0,s.jsx)(e.td,{children:"47-68"}),(0,s.jsx)(e.td,{children:"14.9% - 10.3%"}),(0,s.jsx)(e.td,{children:"23-34"}),(0,s.jsx)(e.td,{children:"30.4% - 20.6%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Medium"}),(0,s.jsx)(e.td,{children:"8"}),(0,s.jsx)(e.td,{children:"69-94"}),(0,s.jsx)(e.td,{children:"11.6% - 8.5%"}),(0,s.jsx)(e.td,{children:"34-47"}),(0,s.jsx)(e.td,{children:"23.5% - 17%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Medium"}),(0,s.jsx)(e.td,{children:"9"}),(0,s.jsx)(e.td,{children:"95-119"}),(0,s.jsx)(e.td,{children:"9.5% - 7.6%"}),(0,s.jsx)(e.td,{children:"47-59"}),(0,s.jsx)(e.td,{children:"19.1% - 15.3%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Strong"}),(0,s.jsx)(e.td,{children:"4"}),(0,s.jsx)(e.td,{children:"1"}),(0,s.jsx)(e.td,{children:"400%"}),(0,s.jsx)(e.td,{}),(0,s.jsx)(e.td,{})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Strong"}),(0,s.jsx)(e.td,{children:"5"}),(0,s.jsx)(e.td,{children:"2-3"}),(0,s.jsx)(e.td,{children:"250% - 166.7%"}),(0,s.jsx)(e.td,{children:"1"}),(0,s.jsx)(e.td,{children:"500%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Strong"}),(0,s.jsx)(e.td,{children:"6"}),(0,s.jsx)(e.td,{children:"4-6"}),(0,s.jsx)(e.td,{children:"150% - 100%"}),(0,s.jsx)(e.td,{children:"2-3"}),(0,s.jsx)(e.td,{children:"300% - 200%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Strong"}),(0,s.jsx)(e.td,{children:"7"}),(0,s.jsx)(e.td,{children:"7-10"}),(0,s.jsx)(e.td,{children:"100% - 70%"}),(0,s.jsx)(e.td,{children:"3-5"}),(0,s.jsx)(e.td,{children:"233.3% - 140%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Strong"}),(0,s.jsx)(e.td,{children:"8"}),(0,s.jsx)(e.td,{children:"11-15"}),(0,s.jsx)(e.td,{children:"72.7% - 53.3%"}),(0,s.jsx)(e.td,{children:"5-7"}),(0,s.jsx)(e.td,{children:"160% - 114.3%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Strong"}),(0,s.jsx)(e.td,{children:"9"}),(0,s.jsx)(e.td,{children:"16-20"}),(0,s.jsx)(e.td,{children:"56.2% - 45%"}),(0,s.jsx)(e.td,{children:"8-10"}),(0,s.jsx)(e.td,{children:"112.5% - 90%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Strong"}),(0,s.jsx)(e.td,{children:"10"}),(0,s.jsx)(e.td,{children:"21-26"}),(0,s.jsx)(e.td,{children:"47.6% - 38.5%"}),(0,s.jsx)(e.td,{children:"10-13"}),(0,s.jsx)(e.td,{children:"100% - 76.9%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Strong"}),(0,s.jsx)(e.td,{children:"11"}),(0,s.jsx)(e.td,{children:"27-32"}),(0,s.jsx)(e.td,{children:"40.7% - 34.4%"}),(0,s.jsx)(e.td,{children:"13-16"}),(0,s.jsx)(e.td,{children:"84.6% - 68.8%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Strong"}),(0,s.jsx)(e.td,{children:"12"}),(0,s.jsx)(e.td,{children:"33-39"}),(0,s.jsx)(e.td,{children:"36.4% - 30.8%"}),(0,s.jsx)(e.td,{children:"16-19"}),(0,s.jsx)(e.td,{children:"75% - 63.2%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Strong"}),(0,s.jsx)(e.td,{children:"13"}),(0,s.jsx)(e.td,{children:"40-46"}),(0,s.jsx)(e.td,{children:"32.5% - 28.3%"}),(0,s.jsx)(e.td,{children:"20-23"}),(0,s.jsx)(e.td,{children:"65% - 56.5%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Strong"}),(0,s.jsx)(e.td,{children:"14"}),(0,s.jsx)(e.td,{children:"47-53"}),(0,s.jsx)(e.td,{children:"29.8% - 26.4%"}),(0,s.jsx)(e.td,{children:"23-26"}),(0,s.jsx)(e.td,{children:"60.9% - 53.8%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Strong"}),(0,s.jsx)(e.td,{children:"15"}),(0,s.jsx)(e.td,{children:"54-61"}),(0,s.jsx)(e.td,{children:"27.8% - 24.6%"}),(0,s.jsx)(e.td,{children:"27-30"}),(0,s.jsx)(e.td,{children:"55.6% - 50%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Strong"}),(0,s.jsx)(e.td,{children:"16"}),(0,s.jsx)(e.td,{children:"62-69"}),(0,s.jsx)(e.td,{children:"25.8% - 23.2%"}),(0,s.jsx)(e.td,{children:"31-34"}),(0,s.jsx)(e.td,{children:"51.6% - 47.1%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Strong"}),(0,s.jsx)(e.td,{children:"17"}),(0,s.jsx)(e.td,{children:"70-77"}),(0,s.jsx)(e.td,{children:"24.3% - 22.1%"}),(0,s.jsx)(e.td,{children:"35-38"}),(0,s.jsx)(e.td,{children:"48.6% - 44.7%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Strong"}),(0,s.jsx)(e.td,{children:"18"}),(0,s.jsx)(e.td,{children:"78-86"}),(0,s.jsx)(e.td,{children:"23.1% - 20.9%"}),(0,s.jsx)(e.td,{children:"39-43"}),(0,s.jsx)(e.td,{children:"46.2% - 41.9%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Strong"}),(0,s.jsx)(e.td,{children:"19"}),(0,s.jsx)(e.td,{children:"87-95"}),(0,s.jsx)(e.td,{children:"21.8% - 20%"}),(0,s.jsx)(e.td,{children:"43-47"}),(0,s.jsx)(e.td,{children:"44.2% - 40.4%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Strong"}),(0,s.jsx)(e.td,{children:"20"}),(0,s.jsx)(e.td,{children:"96-104"}),(0,s.jsx)(e.td,{children:"20.8% - 19.2%"}),(0,s.jsx)(e.td,{children:"48-52"}),(0,s.jsx)(e.td,{children:"41.7% - 38.5%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Strong"}),(0,s.jsx)(e.td,{children:"21"}),(0,s.jsx)(e.td,{children:"105-107"}),(0,s.jsx)(e.td,{children:"20% - 19.6%"}),(0,s.jsx)(e.td,{children:"52-53"}),(0,s.jsx)(e.td,{children:"40.4% - 39.6%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Insane"}),(0,s.jsx)(e.td,{children:"5"}),(0,s.jsx)(e.td,{children:"1"}),(0,s.jsx)(e.td,{children:"500%"}),(0,s.jsx)(e.td,{}),(0,s.jsx)(e.td,{})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Insane"}),(0,s.jsx)(e.td,{children:"6"}),(0,s.jsx)(e.td,{children:"2"}),(0,s.jsx)(e.td,{children:"300%"}),(0,s.jsx)(e.td,{children:"1"}),(0,s.jsx)(e.td,{children:"600%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Insane"}),(0,s.jsx)(e.td,{children:"7"}),(0,s.jsx)(e.td,{children:"3"}),(0,s.jsx)(e.td,{children:"233.3%"}),(0,s.jsx)(e.td,{children:"1"}),(0,s.jsx)(e.td,{children:"700%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Insane"}),(0,s.jsx)(e.td,{children:"8"}),(0,s.jsx)(e.td,{children:"4-5"}),(0,s.jsx)(e.td,{children:"200% - 160%"}),(0,s.jsx)(e.td,{children:"2"}),(0,s.jsx)(e.td,{children:"400%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Insane"}),(0,s.jsx)(e.td,{children:"9"}),(0,s.jsx)(e.td,{children:"6-8"}),(0,s.jsx)(e.td,{children:"150% - 112.5%"}),(0,s.jsx)(e.td,{children:"3-4"}),(0,s.jsx)(e.td,{children:"300% - 225%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Insane"}),(0,s.jsx)(e.td,{children:"10"}),(0,s.jsx)(e.td,{children:"9-10"}),(0,s.jsx)(e.td,{children:"111.1% - 100%"}),(0,s.jsx)(e.td,{children:"4-5"}),(0,s.jsx)(e.td,{children:"250% - 200%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Insane"}),(0,s.jsx)(e.td,{children:"11"}),(0,s.jsx)(e.td,{children:"11-13"}),(0,s.jsx)(e.td,{children:"100% - 84.6%"}),(0,s.jsx)(e.td,{children:"5-6"}),(0,s.jsx)(e.td,{children:"220% - 183.3%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Insane"}),(0,s.jsx)(e.td,{children:"12"}),(0,s.jsx)(e.td,{children:"14-16"}),(0,s.jsx)(e.td,{children:"85.7% - 75%"}),(0,s.jsx)(e.td,{children:"7-8"}),(0,s.jsx)(e.td,{children:"171.4% - 150%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Insane"}),(0,s.jsx)(e.td,{children:"13"}),(0,s.jsx)(e.td,{children:"17-19"}),(0,s.jsx)(e.td,{children:"76.5% - 68.4%"}),(0,s.jsx)(e.td,{children:"8-9"}),(0,s.jsx)(e.td,{children:"162.5% - 144.4%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Insane"}),(0,s.jsx)(e.td,{children:"14"}),(0,s.jsx)(e.td,{children:"20-22"}),(0,s.jsx)(e.td,{children:"70% - 63.6%"}),(0,s.jsx)(e.td,{children:"10-11"}),(0,s.jsx)(e.td,{children:"140% - 127.3%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Insane"}),(0,s.jsx)(e.td,{children:"15"}),(0,s.jsx)(e.td,{children:"23-26"}),(0,s.jsx)(e.td,{children:"65.2% - 57.7%"}),(0,s.jsx)(e.td,{children:"11-13"}),(0,s.jsx)(e.td,{children:"136.4% - 115.4%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Insane"}),(0,s.jsx)(e.td,{children:"16"}),(0,s.jsx)(e.td,{children:"27-29"}),(0,s.jsx)(e.td,{children:"59.3% - 55.2%"}),(0,s.jsx)(e.td,{children:"13-14"}),(0,s.jsx)(e.td,{children:"123.1% - 114.3%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Insane"}),(0,s.jsx)(e.td,{children:"17"}),(0,s.jsx)(e.td,{children:"30-33"}),(0,s.jsx)(e.td,{children:"56.7% - 51.5%"}),(0,s.jsx)(e.td,{children:"15-16"}),(0,s.jsx)(e.td,{children:"113.3% - 106.2%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Insane"}),(0,s.jsx)(e.td,{children:"18"}),(0,s.jsx)(e.td,{children:"34-37"}),(0,s.jsx)(e.td,{children:"52.9% - 48.6%"}),(0,s.jsx)(e.td,{children:"17-18"}),(0,s.jsx)(e.td,{children:"105.9% - 100%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Insane"}),(0,s.jsx)(e.td,{children:"19"}),(0,s.jsx)(e.td,{children:"38-41"}),(0,s.jsx)(e.td,{children:"50% - 46.3%"}),(0,s.jsx)(e.td,{children:"19-20"}),(0,s.jsx)(e.td,{children:"100% - 95%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Insane"}),(0,s.jsx)(e.td,{children:"20"}),(0,s.jsx)(e.td,{children:"42-45"}),(0,s.jsx)(e.td,{children:"47.6% - 44.4%"}),(0,s.jsx)(e.td,{children:"21-22"}),(0,s.jsx)(e.td,{children:"95.2% - 90.9%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Insane"}),(0,s.jsx)(e.td,{children:"21"}),(0,s.jsx)(e.td,{children:"46-50"}),(0,s.jsx)(e.td,{children:"45.7% - 42%"}),(0,s.jsx)(e.td,{children:"23-25"}),(0,s.jsx)(e.td,{children:"91.3% - 84%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Insane"}),(0,s.jsx)(e.td,{children:"22"}),(0,s.jsx)(e.td,{children:"51-54"}),(0,s.jsx)(e.td,{children:"43.1% - 40.7%"}),(0,s.jsx)(e.td,{children:"25-27"}),(0,s.jsx)(e.td,{children:"88% - 81.5%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Insane"}),(0,s.jsx)(e.td,{children:"23"}),(0,s.jsx)(e.td,{children:"55-59"}),(0,s.jsx)(e.td,{children:"41.8% - 39%"}),(0,s.jsx)(e.td,{children:"27-29"}),(0,s.jsx)(e.td,{children:"85.2% - 79.3%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Insane"}),(0,s.jsx)(e.td,{children:"24"}),(0,s.jsx)(e.td,{children:"60-63"}),(0,s.jsx)(e.td,{children:"40% - 38.1%"}),(0,s.jsx)(e.td,{children:"30-31"}),(0,s.jsx)(e.td,{children:"80% - 77.4%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Insane"}),(0,s.jsx)(e.td,{children:"25"}),(0,s.jsx)(e.td,{children:"64-68"}),(0,s.jsx)(e.td,{children:"39.1% - 36.8%"}),(0,s.jsx)(e.td,{children:"32-34"}),(0,s.jsx)(e.td,{children:"78.1% - 73.5%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Insane"}),(0,s.jsx)(e.td,{children:"26"}),(0,s.jsx)(e.td,{children:"69-73"}),(0,s.jsx)(e.td,{children:"37.7% - 35.6%"}),(0,s.jsx)(e.td,{children:"34-36"}),(0,s.jsx)(e.td,{children:"76.5% - 72.2%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Insane"}),(0,s.jsx)(e.td,{children:"27"}),(0,s.jsx)(e.td,{children:"74-77"}),(0,s.jsx)(e.td,{children:"36.5% - 35.1%"}),(0,s.jsx)(e.td,{children:"37-38"}),(0,s.jsx)(e.td,{children:"73% - 71.1%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Insane"}),(0,s.jsx)(e.td,{children:"28"}),(0,s.jsx)(e.td,{children:"78-82"}),(0,s.jsx)(e.td,{children:"35.9% - 34.1%"}),(0,s.jsx)(e.td,{children:"39-41"}),(0,s.jsx)(e.td,{children:"71.8% - 68.3%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Insane"}),(0,s.jsx)(e.td,{children:"29"}),(0,s.jsx)(e.td,{children:"83-87"}),(0,s.jsx)(e.td,{children:"34.9% - 33.3%"}),(0,s.jsx)(e.td,{children:"41-43"}),(0,s.jsx)(e.td,{children:"70.7% - 67.4%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Insane"}),(0,s.jsx)(e.td,{children:"30"}),(0,s.jsx)(e.td,{children:"88-92"}),(0,s.jsx)(e.td,{children:"34.1% - 32.6%"}),(0,s.jsx)(e.td,{children:"44-46"}),(0,s.jsx)(e.td,{children:"68.2% - 65.2%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Insane"}),(0,s.jsx)(e.td,{children:"31"}),(0,s.jsx)(e.td,{children:"93-97"}),(0,s.jsx)(e.td,{children:"33.3% - 32%"}),(0,s.jsx)(e.td,{children:"46-48"}),(0,s.jsx)(e.td,{children:"67.4% - 64.6%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"19"}),(0,s.jsx)(e.td,{children:"1"}),(0,s.jsx)(e.td,{children:"1900%"}),(0,s.jsx)(e.td,{}),(0,s.jsx)(e.td,{})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"23"}),(0,s.jsx)(e.td,{children:"2"}),(0,s.jsx)(e.td,{children:"1150%"}),(0,s.jsx)(e.td,{children:"1"}),(0,s.jsx)(e.td,{children:"2300%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"26"}),(0,s.jsx)(e.td,{children:"3"}),(0,s.jsx)(e.td,{children:"866.7%"}),(0,s.jsx)(e.td,{children:"1"}),(0,s.jsx)(e.td,{children:"2600%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"29"}),(0,s.jsx)(e.td,{children:"4"}),(0,s.jsx)(e.td,{children:"725%"}),(0,s.jsx)(e.td,{children:"2"}),(0,s.jsx)(e.td,{children:"1450%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"31"}),(0,s.jsx)(e.td,{children:"5"}),(0,s.jsx)(e.td,{children:"620%"}),(0,s.jsx)(e.td,{children:"2"}),(0,s.jsx)(e.td,{children:"1550%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"34"}),(0,s.jsx)(e.td,{children:"6"}),(0,s.jsx)(e.td,{children:"566.7%"}),(0,s.jsx)(e.td,{children:"3"}),(0,s.jsx)(e.td,{children:"1133.3%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"36"}),(0,s.jsx)(e.td,{children:"7"}),(0,s.jsx)(e.td,{children:"514.3%"}),(0,s.jsx)(e.td,{children:"3"}),(0,s.jsx)(e.td,{children:"1200%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"38"}),(0,s.jsx)(e.td,{children:"8"}),(0,s.jsx)(e.td,{children:"475%"}),(0,s.jsx)(e.td,{children:"4"}),(0,s.jsx)(e.td,{children:"950%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"40"}),(0,s.jsx)(e.td,{children:"9"}),(0,s.jsx)(e.td,{children:"444.4%"}),(0,s.jsx)(e.td,{children:"4"}),(0,s.jsx)(e.td,{children:"1000%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"43"}),(0,s.jsx)(e.td,{children:"10"}),(0,s.jsx)(e.td,{children:"430%"}),(0,s.jsx)(e.td,{children:"5"}),(0,s.jsx)(e.td,{children:"860%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"45"}),(0,s.jsx)(e.td,{children:"11"}),(0,s.jsx)(e.td,{children:"409.1%"}),(0,s.jsx)(e.td,{children:"5"}),(0,s.jsx)(e.td,{children:"900%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"47"}),(0,s.jsx)(e.td,{children:"12"}),(0,s.jsx)(e.td,{children:"391.7%"}),(0,s.jsx)(e.td,{children:"6"}),(0,s.jsx)(e.td,{children:"783.3%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"48"}),(0,s.jsx)(e.td,{children:"13"}),(0,s.jsx)(e.td,{children:"369.2%"}),(0,s.jsx)(e.td,{children:"6"}),(0,s.jsx)(e.td,{children:"800%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"50"}),(0,s.jsx)(e.td,{children:"14"}),(0,s.jsx)(e.td,{children:"357.1%"}),(0,s.jsx)(e.td,{children:"7"}),(0,s.jsx)(e.td,{children:"714.3%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"52"}),(0,s.jsx)(e.td,{children:"15"}),(0,s.jsx)(e.td,{children:"346.7%"}),(0,s.jsx)(e.td,{children:"7"}),(0,s.jsx)(e.td,{children:"742.9%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"54"}),(0,s.jsx)(e.td,{children:"16"}),(0,s.jsx)(e.td,{children:"337.5%"}),(0,s.jsx)(e.td,{children:"8"}),(0,s.jsx)(e.td,{children:"675%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"56"}),(0,s.jsx)(e.td,{children:"17"}),(0,s.jsx)(e.td,{children:"329.4%"}),(0,s.jsx)(e.td,{children:"8"}),(0,s.jsx)(e.td,{children:"700%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"58"}),(0,s.jsx)(e.td,{children:"18"}),(0,s.jsx)(e.td,{children:"322.2%"}),(0,s.jsx)(e.td,{children:"9"}),(0,s.jsx)(e.td,{children:"644.4%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"59"}),(0,s.jsx)(e.td,{children:"19"}),(0,s.jsx)(e.td,{children:"310.5%"}),(0,s.jsx)(e.td,{children:"9"}),(0,s.jsx)(e.td,{children:"655.6%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"61"}),(0,s.jsx)(e.td,{children:"20"}),(0,s.jsx)(e.td,{children:"305%"}),(0,s.jsx)(e.td,{children:"10"}),(0,s.jsx)(e.td,{children:"610%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"63"}),(0,s.jsx)(e.td,{children:"21"}),(0,s.jsx)(e.td,{children:"300%"}),(0,s.jsx)(e.td,{children:"10"}),(0,s.jsx)(e.td,{children:"630%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"65"}),(0,s.jsx)(e.td,{children:"22"}),(0,s.jsx)(e.td,{children:"295.5%"}),(0,s.jsx)(e.td,{children:"11"}),(0,s.jsx)(e.td,{children:"590.9%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"66"}),(0,s.jsx)(e.td,{children:"23"}),(0,s.jsx)(e.td,{children:"287%"}),(0,s.jsx)(e.td,{children:"11"}),(0,s.jsx)(e.td,{children:"600%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"68"}),(0,s.jsx)(e.td,{children:"24"}),(0,s.jsx)(e.td,{children:"283.3%"}),(0,s.jsx)(e.td,{children:"12"}),(0,s.jsx)(e.td,{children:"566.7%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"70"}),(0,s.jsx)(e.td,{children:"25"}),(0,s.jsx)(e.td,{children:"280%"}),(0,s.jsx)(e.td,{children:"12"}),(0,s.jsx)(e.td,{children:"583.3%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"71"}),(0,s.jsx)(e.td,{children:"26"}),(0,s.jsx)(e.td,{children:"273.1%"}),(0,s.jsx)(e.td,{children:"13"}),(0,s.jsx)(e.td,{children:"546.2%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"73"}),(0,s.jsx)(e.td,{children:"27"}),(0,s.jsx)(e.td,{children:"270.4%"}),(0,s.jsx)(e.td,{children:"13"}),(0,s.jsx)(e.td,{children:"561.5%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"75"}),(0,s.jsx)(e.td,{children:"28"}),(0,s.jsx)(e.td,{children:"267.9%"}),(0,s.jsx)(e.td,{children:"14"}),(0,s.jsx)(e.td,{children:"535.7%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"76"}),(0,s.jsx)(e.td,{children:"29"}),(0,s.jsx)(e.td,{children:"262.1%"}),(0,s.jsx)(e.td,{children:"14"}),(0,s.jsx)(e.td,{children:"542.9%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"78"}),(0,s.jsx)(e.td,{children:"30"}),(0,s.jsx)(e.td,{children:"260%"}),(0,s.jsx)(e.td,{children:"15"}),(0,s.jsx)(e.td,{children:"520%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"80"}),(0,s.jsx)(e.td,{children:"31"}),(0,s.jsx)(e.td,{children:"258.1%"}),(0,s.jsx)(e.td,{children:"15"}),(0,s.jsx)(e.td,{children:"533.3%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"81"}),(0,s.jsx)(e.td,{children:"32"}),(0,s.jsx)(e.td,{children:"253.1%"}),(0,s.jsx)(e.td,{children:"16"}),(0,s.jsx)(e.td,{children:"506.2%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"83"}),(0,s.jsx)(e.td,{children:"33"}),(0,s.jsx)(e.td,{children:"251.5%"}),(0,s.jsx)(e.td,{children:"16"}),(0,s.jsx)(e.td,{children:"518.8%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"84"}),(0,s.jsx)(e.td,{children:"34"}),(0,s.jsx)(e.td,{children:"247.1%"}),(0,s.jsx)(e.td,{children:"17"}),(0,s.jsx)(e.td,{children:"494.1%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"86"}),(0,s.jsx)(e.td,{children:"35"}),(0,s.jsx)(e.td,{children:"245.7%"}),(0,s.jsx)(e.td,{children:"17"}),(0,s.jsx)(e.td,{children:"505.9%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"87"}),(0,s.jsx)(e.td,{children:"36"}),(0,s.jsx)(e.td,{children:"241.7%"}),(0,s.jsx)(e.td,{children:"18"}),(0,s.jsx)(e.td,{children:"483.3%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"89"}),(0,s.jsx)(e.td,{children:"37"}),(0,s.jsx)(e.td,{children:"240.5%"}),(0,s.jsx)(e.td,{children:"18"}),(0,s.jsx)(e.td,{children:"494.4%"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Paranoid"}),(0,s.jsx)(e.td,{children:"90"}),(0,s.jsx)(e.td,{children:"38"}),(0,s.jsx)(e.td,{children:"236.8%"}),(0,s.jsx)(e.td,{children:"19"}),(0,s.jsx)(e.td,{children:"473.7%"})]})]})]}),"\n",(0,s.jsx)(e.h3,{id:"example-cost-calculation",children:"Example Cost Calculation"}),"\n",(0,s.jsx)(e.p,{children:'For each redundancy level, there are m + k = 128 chunks, where m are the data chunks (shown in column "Data Chunks") and k are the parity chunks. If the number of chunks in the data being uploaded are an exact multiple of m, then the percent cost of the upload will simply equal the one shown in table B from the section above in the "Percent" column for the corresponding redundancy level.'}),"\n",(0,s.jsx)(e.h4,{id:"exact-multiples",children:"Exact Multiples"}),"\n",(0,s.jsx)(e.p,{children:'For example, if we are uploading with the Strong redundancy level, and our source data consists of 321 (3 * 107) chunks, then we can simply use the percentage from the "Percent" column for the Strong level - 19.6% (63 parities / 321 data chunks).'}),"\n",(0,s.jsx)(e.h4,{id:"with-remainders",children:"With Remainders"}),"\n",(0,s.jsx)(e.p,{children:"However, generally speaking uploads will not come in exact multiples of m, so we need to adjust our calculations. To do so we need to use table C from the section above which shows the number of parities for sets of chunks starting at a single chunk for each redundancy level up to the maximum number of data chunks for that level. Then we simply sum up the total parities and data chunks for the entire upload and calculate the resulting percentage."}),"\n",(0,s.jsx)(e.p,{children:"Let's say for example we have a source file of 340 chunks which we want to upload with the Strong level of protection. Referring to table B, we see for the Strong level there are 21 parity chunks for each 107 data chunks. 340 / 107 = ~3.177, meaning our upload will have three full sets of 128 chunks where m = 107 and k = 21. The remainder can be calculated from the modulus of 340 % 107 = 19"}),"\n",(0,s.jsx)(e.p,{children:"Looking at our chart, we can see that at the Strong level for 19 data chunks we need 9 parity chunks. From this we can calculate the final percentage price: 72 / 340 = 21.17%."})]})}function j(d={}){const{wrapper:e}={...(0,t.R)(),...d.components};return e?(0,s.jsx)(e,{...d,children:(0,s.jsx)(x,{...d})}):x(d)}},28453(d,e,n){n.d(e,{R:()=>i,x:()=>l});var r=n(96540);const s={},t=r.createContext(s);function i(d){const e=r.useContext(t);return r.useMemo(function(){return"function"==typeof d?d(e):{...e,...d}},[e,d])}function l(d){let e;return e=d.disableParentContext?"function"==typeof d.components?d.components(s):d.components||s:i(d.components),r.createElement(t.Provider,{value:e},d.children)}}}]); \ No newline at end of file diff --git a/assets/js/17896441.4f86296b.js b/assets/js/17896441.4f86296b.js new file mode 100644 index 000000000..2762094b5 --- /dev/null +++ b/assets/js/17896441.4f86296b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[8401],{53913(e,n,t){t.r(n),t.d(n,{default:()=>Ee});var s=t(96540),i=t(45500),a=t(89532),l=t(74848);const r=s.createContext(null);function o(e){let n=e.children;const t=function(e){return(0,s.useMemo)(()=>({metadata:e.metadata,frontMatter:e.frontMatter,assets:e.assets,contentTitle:e.contentTitle,toc:e.toc}),[e])}(e.content);return(0,l.jsx)(r.Provider,{value:t,children:n})}function c(){const e=(0,s.useContext)(r);if(null===e)throw new a.dV("DocProvider");return e}function d(){var e;const n=c(),t=n.metadata,s=n.frontMatter,a=n.assets;return(0,l.jsx)(i.be,{title:t.title,description:t.description,keywords:s.keywords,image:null!=(e=a.image)?e:s.image})}var u=t(34164),m=t(24581),h=t(21312),v=t(39022);function b(e){const n=e.className,t=e.previous,s=e.next;return(0,l.jsxs)("nav",{className:(0,u.A)(n,"pagination-nav"),"aria-label":(0,h.T)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"}),children:[t&&(0,l.jsx)(v.A,Object.assign({},t,{subLabel:(0,l.jsx)(h.A,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc",children:"Previous"})})),s&&(0,l.jsx)(v.A,Object.assign({},s,{subLabel:(0,l.jsx)(h.A,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc",children:"Next"}),isNext:!0}))]})}function x(){const e=c().metadata;return(0,l.jsx)(b,{className:"docusaurus-mt-lg",previous:e.previous,next:e.next})}var f=t(44586),g=t(28774),j=t(48295),p=t(17559),A=t(53886),N=t(23025);const L={unreleased:function(e){let n=e.siteTitle,t=e.versionMetadata;return(0,l.jsx)(h.A,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:n,versionLabel:(0,l.jsx)("b",{children:t.label})},children:"This is unreleased documentation for {siteTitle} {versionLabel} version."})},unmaintained:function(e){let n=e.siteTitle,t=e.versionMetadata;return(0,l.jsx)(h.A,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:n,versionLabel:(0,l.jsx)("b",{children:t.label})},children:"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained."})}};function _(e){const n=L[e.versionMetadata.banner];return(0,l.jsx)(n,Object.assign({},e))}function C(e){let n=e.versionLabel,t=e.to,s=e.onClick;return(0,l.jsx)(h.A,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:n,latestVersionLink:(0,l.jsx)("b",{children:(0,l.jsx)(g.A,{to:t,onClick:s,children:(0,l.jsx)(h.A,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label",children:"latest version"})})})},children:"For up-to-date documentation, see the {latestVersionLink} ({versionLabel})."})}function T(e){let n=e.className,t=e.versionMetadata;const s=(0,f.A)().siteConfig.title,i=(0,j.vT)({failfast:!0}).pluginId,a=(0,A.g1)(i).savePreferredVersionName,r=(0,j.HW)(i),o=r.latestDocSuggestion,c=r.latestVersionSuggestion,d=null!=o?o:(m=c).docs.find(e=>e.id===m.mainDocId);var m;return(0,l.jsxs)("div",{className:(0,u.A)(n,p.G.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert",children:[(0,l.jsx)("div",{children:(0,l.jsx)(_,{siteTitle:s,versionMetadata:t})}),(0,l.jsx)("div",{className:"margin-top--md",children:(0,l.jsx)(C,{versionLabel:c.label,to:d.path,onClick:()=>a(c.name)})})]})}function k(e){let n=e.className;const t=(0,N.r)();return t.banner?(0,l.jsx)(T,{className:n,versionMetadata:t}):null}function H(e){let n=e.className;const t=(0,N.r)();return t.badge?(0,l.jsx)("span",{className:(0,u.A)(n,p.G.docs.docVersionBadge,"badge badge--secondary"),children:(0,l.jsx)(h.A,{id:"theme.docs.versionBadge.label",values:{versionLabel:t.label},children:"Version: {versionLabel}"})}):null}var y=t(58046),O=t(4336);function w(){const e=c().metadata,n=e.editUrl,t=e.lastUpdatedAt,s=e.lastUpdatedBy,i=e.tags,a=i.length>0,r=!!(n||t||s);return a||r?(0,l.jsxs)("footer",{className:(0,u.A)(p.G.docs.docFooter,"docusaurus-mt-lg"),children:[a&&(0,l.jsx)("div",{className:(0,u.A)("row margin-top--sm",p.G.docs.docFooterTagsRow),children:(0,l.jsx)("div",{className:"col",children:(0,l.jsx)(y.A,{tags:i})})}),r&&(0,l.jsx)(O.A,{className:(0,u.A)("margin-top--sm",p.G.docs.docFooterEditMetaRow),editUrl:n,lastUpdatedAt:t,lastUpdatedBy:s})]}):null}var M=t(41422),B=t(98587),V=t(6342);const E=["parentIndex"];function I(e){const n=e.map(e=>Object.assign({},e,{parentIndex:-1,children:[]})),t=Array(7).fill(-1);n.forEach((e,n)=>{const s=t.slice(2,e.level);e.parentIndex=Math.max(...s),t[e.level]=n});const s=[];return n.forEach(e=>{const t=e.parentIndex,i=(0,B.A)(e,E);t>=0?n[t].children.push(i):s.push(i)}),s}function G(e){let n=e.toc,t=e.minHeadingLevel,s=e.maxHeadingLevel;return n.flatMap(e=>{const n=G({toc:e.children,minHeadingLevel:t,maxHeadingLevel:s});return function(e){return e.level>=t&&e.level<=s}(e)?[Object.assign({},e,{children:n})]:n})}function S(e){const n=e.getBoundingClientRect();return n.top===n.bottom?S(e.parentNode):n}function F(e,n){var t;let s=n.anchorTopOffset;const i=e.find(e=>S(e).top>=s);if(i){var a;return function(e){return e.top>0&&e.bottom{e.current=n?0:document.querySelector(".navbar").clientHeight},[n]),e}function U(e){const n=(0,s.useRef)(void 0),t=R();(0,s.useEffect)(()=>{if(!e)return()=>{};const s=e.linkClassName,i=e.linkActiveClassName,a=e.minHeadingLevel,l=e.maxHeadingLevel;function r(){const e=function(e){return Array.from(document.getElementsByClassName(e))}(s),r=function(e){let n=e.minHeadingLevel,t=e.maxHeadingLevel;const s=[];for(let i=n;i<=t;i+=1)s.push("h"+i+".anchor");return Array.from(document.querySelectorAll(s.join()))}({minHeadingLevel:a,maxHeadingLevel:l}),o=F(r,{anchorTopOffset:t.current}),c=e.find(e=>o&&o.id===function(e){return decodeURIComponent(e.href.substring(e.href.indexOf("#")+1))}(e));e.forEach(e=>{!function(e,t){t?(n.current&&n.current!==e&&n.current.classList.remove(i),e.classList.add(i),n.current=e):e.classList.remove(i)}(e,e===c)})}return document.addEventListener("scroll",r),document.addEventListener("resize",r),r(),()=>{document.removeEventListener("scroll",r),document.removeEventListener("resize",r)}},[e,t])}function D(e){let n=e.toc,t=e.className,s=e.linkClassName,i=e.isChild;return n.length?(0,l.jsx)("ul",{className:i?void 0:t,children:n.map(e=>(0,l.jsxs)("li",{children:[(0,l.jsx)(g.A,{to:"#"+e.id,className:null!=s?s:void 0,dangerouslySetInnerHTML:{__html:e.value}}),(0,l.jsx)(D,{isChild:!0,toc:e.children,className:t,linkClassName:s})]},e.id))}):null}const P=s.memo(D),z=["toc","className","linkClassName","linkActiveClassName","minHeadingLevel","maxHeadingLevel"];function q(e){let n=e.toc,t=e.className,i=void 0===t?"table-of-contents table-of-contents__left-border":t,a=e.linkClassName,r=void 0===a?"table-of-contents__link":a,o=e.linkActiveClassName,c=void 0===o?void 0:o,d=e.minHeadingLevel,u=e.maxHeadingLevel,m=(0,B.A)(e,z);const h=(0,V.p)(),v=null!=d?d:h.tableOfContents.minHeadingLevel,b=null!=u?u:h.tableOfContents.maxHeadingLevel,x=function(e){let n=e.toc,t=e.minHeadingLevel,i=e.maxHeadingLevel;return(0,s.useMemo)(()=>G({toc:I(n),minHeadingLevel:t,maxHeadingLevel:i}),[n,t,i])}({toc:n,minHeadingLevel:v,maxHeadingLevel:b});return U((0,s.useMemo)(()=>{if(r&&c)return{linkClassName:r,linkActiveClassName:c,minHeadingLevel:v,maxHeadingLevel:b}},[r,c,v,b])),(0,l.jsx)(P,Object.assign({toc:x,className:i,linkClassName:r},m))}const J="tocCollapsibleButton_TO0P",W="tocCollapsibleButtonExpanded_MG3E",Y=["collapsed"];function Z(e){let n=e.collapsed,t=(0,B.A)(e,Y);return(0,l.jsx)("button",Object.assign({type:"button"},t,{className:(0,u.A)("clean-btn",J,!n&&W,t.className),children:(0,l.jsx)(h.A,{id:"theme.TOCCollapsible.toggleButtonLabel",description:"The label used by the button on the collapsible TOC component",children:"On this page"})}))}const K="tocCollapsible_ETCw",Q="tocCollapsibleContent_vkbj",X="tocCollapsibleExpanded_sAul";function $(e){let n=e.toc,t=e.className,s=e.minHeadingLevel,i=e.maxHeadingLevel;const a=(0,M.u)({initialState:!0}),r=a.collapsed,o=a.toggleCollapsed;return(0,l.jsxs)("div",{className:(0,u.A)(K,!r&&X,t),children:[(0,l.jsx)(Z,{collapsed:r,onClick:o}),(0,l.jsx)(M.N,{lazy:!0,className:Q,collapsed:r,children:(0,l.jsx)(q,{toc:n,minHeadingLevel:s,maxHeadingLevel:i})})]})}const ee="tocMobile_ITEo";function ne(){const e=c(),n=e.toc,t=e.frontMatter;return(0,l.jsx)($,{toc:n,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:(0,u.A)(p.G.docs.docTocMobile,ee)})}const te="tableOfContents_bqdL",se=["className"];function ie(e){let n=e.className,t=(0,B.A)(e,se);return(0,l.jsx)("div",{className:(0,u.A)(te,"thin-scrollbar",n),children:(0,l.jsx)(q,Object.assign({},t,{linkClassName:"table-of-contents__link toc-highlight",linkActiveClassName:"table-of-contents__link--active"}))})}function ae(){const e=c(),n=e.toc,t=e.frontMatter;return(0,l.jsx)(ie,{toc:n,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:p.G.docs.docTocDesktop})}var le=t(51107),re=t(1393);function oe(e){let n=e.children;const t=function(){const e=c(),n=e.metadata,t=e.frontMatter,s=e.contentTitle;return t.hide_title||void 0!==s?null:n.title}();return(0,l.jsxs)("div",{className:(0,u.A)(p.G.docs.docMarkdown,"markdown"),children:[t&&(0,l.jsx)("header",{children:(0,l.jsx)(le.A,{as:"h1",children:t})}),(0,l.jsx)(re.A,{children:n})]})}var ce=t(26972),de=t(99169),ue=t(86025);function me(e){return(0,l.jsx)("svg",Object.assign({viewBox:"0 0 24 24"},e,{children:(0,l.jsx)("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"})}))}const he="breadcrumbHomeIcon_YNFT";function ve(){const e=(0,ue.Ay)("/");return(0,l.jsx)("li",{className:"breadcrumbs__item",children:(0,l.jsx)(g.A,{"aria-label":(0,h.T)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e,children:(0,l.jsx)(me,{className:he})})})}var be=t(5260);function xe(e){const n=function(e){let n=e.breadcrumbs;const t=(0,f.A)().siteConfig;return{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:n.filter(e=>e.href).map((e,n)=>({"@type":"ListItem",position:n+1,name:e.label,item:""+t.url+e.href}))}}({breadcrumbs:e.breadcrumbs});return(0,l.jsx)(be.A,{children:(0,l.jsx)("script",{type:"application/ld+json",children:JSON.stringify(n)})})}const fe="breadcrumbsContainer_Z_bl";function ge(e){let n=e.children,t=e.href;const s="breadcrumbs__link";return e.isLast?(0,l.jsx)("span",{className:s,children:n}):t?(0,l.jsx)(g.A,{className:s,href:t,children:(0,l.jsx)("span",{children:n})}):(0,l.jsx)("span",{className:s,children:n})}function je(e){let n=e.children,t=e.active;return(0,l.jsx)("li",{className:(0,u.A)("breadcrumbs__item",{"breadcrumbs__item--active":t}),children:n})}function pe(){const e=(0,ce.OF)(),n=(0,de.Dt)();return e?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(xe,{breadcrumbs:e}),(0,l.jsx)("nav",{className:(0,u.A)(p.G.docs.docBreadcrumbs,fe),"aria-label":(0,h.T)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"}),children:(0,l.jsxs)("ul",{className:"breadcrumbs",children:[n&&(0,l.jsx)(ve,{}),e.map((n,t)=>{const s=t===e.length-1,i="category"===n.type&&n.linkUnlisted?void 0:n.href;return(0,l.jsx)(je,{active:s,children:(0,l.jsx)(ge,{href:i,isLast:s,children:n.label})},t)})]})})]}):null}function Ae(){return(0,l.jsx)(h.A,{id:"theme.contentVisibility.unlistedBanner.title",description:"The unlisted content banner title",children:"Unlisted page"})}function Ne(){return(0,l.jsx)(h.A,{id:"theme.contentVisibility.unlistedBanner.message",description:"The unlisted content banner message",children:"This page is unlisted. Search engines will not index it, and only users having a direct link can access it."})}function Le(){return(0,l.jsx)(be.A,{children:(0,l.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})}function _e(){return(0,l.jsx)(h.A,{id:"theme.contentVisibility.draftBanner.title",description:"The draft content banner title",children:"Draft page"})}function Ce(){return(0,l.jsx)(h.A,{id:"theme.contentVisibility.draftBanner.message",description:"The draft content banner message",children:"This page is a draft. It will only be visible in dev and be excluded from the production build."})}var Te=t(27293);function ke(e){let n=e.className;return(0,l.jsx)(Te.A,{type:"caution",title:(0,l.jsx)(_e,{}),className:(0,u.A)(n,p.G.common.draftBanner),children:(0,l.jsx)(Ce,{})})}function He(e){let n=e.className;return(0,l.jsx)(Te.A,{type:"caution",title:(0,l.jsx)(Ae,{}),className:(0,u.A)(n,p.G.common.unlistedBanner),children:(0,l.jsx)(Ne,{})})}function ye(e){return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Le,{}),(0,l.jsx)(He,Object.assign({},e))]})}function Oe(e){let n=e.metadata;const t=n.unlisted,s=n.frontMatter;return(0,l.jsxs)(l.Fragment,{children:[(t||s.unlisted)&&(0,l.jsx)(ye,{}),s.draft&&(0,l.jsx)(ke,{})]})}const we="docItemContainer_Djhp",Me="docItemCol_VOVn";function Be(e){let n=e.children;const t=function(){const e=c(),n=e.frontMatter,t=e.toc,s=(0,m.l)(),i=n.hide_table_of_contents,a=!i&&t.length>0;return{hidden:i,mobile:a?(0,l.jsx)(ne,{}):void 0,desktop:!a||"desktop"!==s&&"ssr"!==s?void 0:(0,l.jsx)(ae,{})}}(),s=c().metadata;return(0,l.jsxs)("div",{className:"row",children:[(0,l.jsxs)("div",{className:(0,u.A)("col",!t.hidden&&Me),children:[(0,l.jsx)(Oe,{metadata:s}),(0,l.jsx)(k,{}),(0,l.jsxs)("div",{className:we,children:[(0,l.jsxs)("article",{children:[(0,l.jsx)(pe,{}),(0,l.jsx)(H,{}),t.mobile,(0,l.jsx)(oe,{children:n}),(0,l.jsx)(w,{})]}),(0,l.jsx)(x,{})]})]}),t.desktop&&(0,l.jsx)("div",{className:"col col--3",children:t.desktop})]})}function Ve(e){const n=c().metadata,t=(0,f.A)().siteConfig,s={"@context":"https://schema.org","@type":"TechArticle",headline:n.title,description:n.description,url:t.url+n.permalink,inLanguage:"en",isPartOf:{"@id":"https://docs.ethswarm.org/#website"},publisher:{"@id":"https://docs.ethswarm.org/#organization"}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(be.A,{children:(0,l.jsx)("script",{type:"application/ld+json",children:JSON.stringify(s)})}),(0,l.jsx)(Be,Object.assign({},e))]})}function Ee(e){const n="docs-doc-id-"+e.content.metadata.id,t=e.content;return(0,l.jsx)(o,{content:e.content,children:(0,l.jsxs)(i.e3,{className:n,children:[(0,l.jsx)(d,{}),(0,l.jsx)(Ve,{children:(0,l.jsx)(t,{})})]})})}}}]); \ No newline at end of file diff --git a/assets/js/191458e8.064026d2.js b/assets/js/191458e8.064026d2.js new file mode 100644 index 000000000..1c8fa1bcf --- /dev/null +++ b/assets/js/191458e8.064026d2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[9750],{86711(e,t,r){r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>d,frontMatter:()=>a,metadata:()=>s,toc:()=>h});const s=JSON.parse('{"id":"references/community","title":"Community","description":"Where to find the Swarm community \u2014 Discord, forums, social channels, and ways to contribute.","source":"@site/docs/references/community.md","sourceDirName":"references","slug":"/references/community","permalink":"/docs/references/community","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/references/community.md","tags":[],"version":"current","frontMatter":{"title":"Community","id":"community","description":"Where to find the Swarm community \u2014 Discord, forums, social channels, and ways to contribute."},"sidebar":"References","previous":{"title":"Glossary","permalink":"/docs/references/glossary"},"next":{"title":"Fair Data Society","permalink":"/docs/references/fair-data-society"}}');var n=r(74848),o=r(28453);const a={title:"Community",id:"community",description:"Where to find the Swarm community \u2014 Discord, forums, social channels, and ways to contribute."},i=void 0,c={},h=[{value:"Official Links",id:"official-links",level:2},{value:"Awesome Swarm",id:"awesome-swarm",level:2},{value:"Grants and Bounties",id:"grants-and-bounties",level:2},{value:"Fellowships",id:"fellowships",level:2}];function l(e){const t={a:"a",br:"br",h2:"h2",p:"p",...(0,o.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h2,{id:"official-links",children:"Official Links"}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.a,{href:"https://twitter.com/ethswarm",children:"Twitter"}),(0,n.jsx)(t.br,{}),"\n",(0,n.jsx)(t.a,{href:"https://discord.gg/kHRyMNpw7t",children:"Discord server"}),(0,n.jsx)(t.br,{}),"\n",(0,n.jsx)(t.a,{href:"https://www.reddit.com/r/ethswarm/",children:"Reddit"}),(0,n.jsx)(t.br,{}),"\n",(0,n.jsx)(t.a,{href:"https://github.com/ethersphere",children:"GitHub"}),(0,n.jsx)(t.br,{}),"\n",(0,n.jsx)(t.a,{href:"https://blog.ethswarm.org",children:"Blog"}),(0,n.jsx)(t.br,{}),"\n",(0,n.jsx)(t.a,{href:"https://www.ethswarm.org/",children:"Homepage"})]}),"\n",(0,n.jsx)(t.h2,{id:"awesome-swarm",children:"Awesome Swarm"}),"\n",(0,n.jsxs)(t.p,{children:["An ",(0,n.jsx)(t.a,{href:"/docs/references/awesome-list",children:"awesome list"})," on anything awesome related to the Swarm platform. \ud83d\udc1d \ud83d\udc1d \ud83d\udc1d"]}),"\n",(0,n.jsxs)(t.p,{children:["To see the most up to date list or submit an addition to it, make sure to check the ",(0,n.jsx)(t.a,{href:"https://github.com/ethersphere/awesome-swarm",children:"awesome-swarm repo"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"grants-and-bounties",children:"Grants and Bounties"}),"\n",(0,n.jsx)(t.p,{children:"Swarm grants support many interesting projects that are already building their products on top of Swarm. Swarm bounties extend the ecosystem with tooling and infrastructure."}),"\n",(0,n.jsxs)(t.p,{children:["If you have an idea for a project which uses Swarm's technology we welcome you to ",(0,n.jsx)(t.a,{href:"https://www.ethswarm.org/grants/swarm-grants-programme",children:"apply for a grant"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["Learn more about grants for building on Swarm at the ",(0,n.jsx)(t.a,{href:"https://www.ethswarm.org/grants",children:"EthSwarm homepage"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"fellowships",children:"Fellowships"}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.a,{href:"https://www.ethswarm.org/fellowships",children:"Swarm fellows"})," work on items identified as needs for the Swarm network to evolve and grow but are not part of core Swarm development. Fellows are expected to pursue the goals supported by the fellowship in the long term as part of their career path. A fellowship helps them achieve results to a certain degree, but afterwards, the project should be sustainable and able to continue on its own."]}),"\n",(0,n.jsxs)(t.p,{children:["Current Swarm fellows include both ",(0,n.jsx)(t.a,{href:"https://datafund.io/",children:"Datafund"})," and ",(0,n.jsx)(t.a,{href:"https://solarpunk.buzz/",children:"Solar Punk"}),"."]})]})}function d(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(l,{...e})}):l(e)}},28453(e,t,r){r.d(t,{R:()=>a,x:()=>i});var s=r(96540);const n={},o=s.createContext(n);function a(e){const t=s.useContext(o);return s.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:a(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1a4e3797.319802d3.js b/assets/js/1a4e3797.319802d3.js new file mode 100644 index 000000000..7a8748b6e --- /dev/null +++ b/assets/js/1a4e3797.319802d3.js @@ -0,0 +1 @@ +(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[2138],{72733(e){function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function i(e){return"object"==typeof e&&null!==e}function n(e){return void 0===e}e.exports=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,s,a,c,o,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var h=new Error('Uncaught, unspecified "error" event. ('+t+")");throw h.context=t,h}if(n(s=this._events[e]))return!1;if(r(s))switch(arguments.length){case 1:s.call(this);break;case 2:s.call(this,arguments[1]);break;case 3:s.call(this,arguments[1],arguments[2]);break;default:c=Array.prototype.slice.call(arguments,1),s.apply(this,c)}else if(i(s))for(c=Array.prototype.slice.call(arguments,1),a=(u=s.slice()).length,o=0;o0&&this._events[e].length>a&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var i=!1;function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}return n.listener=t,this.on(e,n),this},t.prototype.removeListener=function(e,t){var n,s,a,c;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=(n=this._events[e]).length,s=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(n)){for(c=a;c-- >0;)if(n[c]===t||n[c].listener&&n[c].listener===t){s=c;break}if(s<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(s,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,i;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(i=this._events[e]))this.removeListener(e,i);else if(i)for(;i.length;)this.removeListener(e,i[i.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},74103(e,t,r){"use strict";var i=r(36571),n=r(19127),s=r(42223),a=r(33371),c=r(67691);function o(e,t,r,n){return new i(e,t,r,n)}o.version=r(16938),o.AlgoliaSearchHelper=i,o.SearchParameters=a,o.RecommendParameters=n,o.SearchResults=c,o.RecommendResults=s,e.exports=o},46732(e,t,r){"use strict";var i=r(72733);function n(e,t,r){this.main=e,this.fn=t,this.recommendFn=r,this.lastResults=null,this.lastRecommendResults=null}r(73014)(n,i),n.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},n.prototype.getModifiedState=function(e){return this.fn(e)},n.prototype.getModifiedRecommendState=function(e){return this.recommendFn(e)},e.exports=n},19127(e){"use strict";function t(e){e=e||{},this.params=e.params||[]}t.prototype={constructor:t,addParams:function(e){var r=this.params.slice();return r.push(e),new t({params:r})},removeParams:function(e){return new t({params:this.params.filter(function(t){return t.$$id!==e})})},addFrequentlyBoughtTogether:function(e){return this.addParams(Object.assign({},e,{model:"bought-together"}))},addRelatedProducts:function(e){return this.addParams(Object.assign({},e,{model:"related-products"}))},addTrendingItems:function(e){return this.addParams(Object.assign({},e,{model:"trending-items"}))},addTrendingFacets:function(e){return this.addParams(Object.assign({},e,{model:"trending-facets"}))},addLookingSimilar:function(e){return this.addParams(Object.assign({},e,{model:"looking-similar"}))},_buildQueries:function(e,t){return this.params.filter(function(e){return void 0===t[e.$$id]}).map(function(t){var r=Object.assign({},t,{indexName:e,threshold:t.threshold||0});return delete r.$$id,r})}},e.exports=t},42223(e){"use strict";function t(e,t){this._state=e,this._rawResults={};var r=this;e.params.forEach(function(e){var i=e.$$id;r[i]=t[i],r._rawResults[i]=t[i]})}t.prototype={constructor:t},e.exports=t},44054(e,t,r){"use strict";var i=r(29110),n=r(40317),s=r(21383),a={addRefinement:function(e,t,r){if(a.isRefined(e,t,r))return e;var n=""+r,s=e[t]?e[t].concat(n):[n],c={};return c[t]=s,i(c,e)},removeRefinement:function(e,t,r){if(void 0===r)return a.clearRefinement(e,function(e,r){return t===r});var i=""+r;return a.clearRefinement(e,function(e,r){return t===r&&i===e})},toggleRefinement:function(e,t,r){if(void 0===r)throw new Error("toggleRefinement should be used with a value");return a.isRefined(e,t,r)?a.removeRefinement(e,t,r):a.addRefinement(e,t,r)},clearRefinement:function(e,t,r){if(void 0===t)return n(e)?{}:e;if("string"==typeof t)return s(e,[t]);if("function"==typeof t){var i=!1,a=Object.keys(e).reduce(function(n,s){var a=e[s]||[],c=a.filter(function(e){return!t(e,s,r)});return c.length!==a.length&&(i=!0),n[s]=c,n},{});return i?a:e}},isRefined:function(e,t,r){var i=Boolean(e[t])&&e[t].length>0;if(void 0===r||!i)return i;var n=""+r;return-1!==e[t].indexOf(n)}};e.exports=a},33371(e,t,r){"use strict";var i=r(29110),n=r(20849),s=r(14843),a=r(44728),c=r(40317),o=r(21383),u=r(17507),h=r(72208),l=r(44054);function f(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every(function(e,r){return f(t[r],e)}):e===t}function d(e){var t=e?d._parseNumbers(e):{};void 0===t.userToken||h(t.userToken)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var r=this;Object.keys(t).forEach(function(e){var i=-1!==d.PARAMETERS.indexOf(e),n=void 0!==t[e];!i&&n&&(r[e]=t[e])})}function m(e){var t=parseFloat(e);return isFinite(t)?t:null}d.PARAMETERS=Object.keys(new d),d._parseNumbers=function(e){if(e instanceof d)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach(function(r){var i=e[r];if("string"==typeof i){var n=parseFloat(i);isNaN(n)?t[r]=i:isFinite(n)?t[r]=n:t[r]=null}else"number"!=typeof i||isFinite(i)||(t[r]=null)}),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map(function(e){return Array.isArray(e)?e.map(function(e){return"string"==typeof e?m(e):"number"!=typeof e||isFinite(e)?e:null}):e})),e.numericRefinements){var r={};Object.keys(e.numericRefinements).forEach(function(t){var i=e.numericRefinements[t]||{};r[t]={},Object.keys(i).forEach(function(e){var n=i[e].map(function(e){return Array.isArray(e)?e.map(function(e){return"string"==typeof e?m(e):"number"!=typeof e||isFinite(e)?e:null}):"string"==typeof e?m(e):"number"!=typeof e||isFinite(e)?e:null});r[t][e]=n})}),t.numericRefinements=r}return a(e,t)},d.make=function(e){var t=new d(e);return(e.hierarchicalFacets||[]).forEach(function(e){if(e.rootPath){var r=t.getHierarchicalRefinement(e.name);r.length>0&&0!==r[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(r=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}}),t},d.validate=function(e,t){var r=t||{};return e.tagFilters&&r.tagRefinements&&r.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&r.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&r.numericRefinements&&c(r.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):c(e.numericRefinements)&&r.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},d.prototype={constructor:d,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:l.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:l.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:l.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:l.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,r){var i=u(r);if(this.isNumericRefined(e,t,i))return this;var n=a({},this.numericRefinements);return n[e]=a({},n[e]),n[e][t]?(n[e][t]=n[e][t].slice(),n[e][t].push(i)):n[e][t]=[i],this.setQueryParameters({numericRefinements:n})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,r){var i=r;return void 0!==i?this.isNumericRefined(e,t,i)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(r,n){return n===e&&r.op===t&&f(r.val,u(i))})}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(r,i){return i===e&&r.op===t})}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(t,r){return r===e})}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return c(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return o(this.numericRefinements,[e]);if("function"==typeof e){var t=!1,r=this.numericRefinements,i=Object.keys(r).reduce(function(i,n){var s=r[n],a={};return s=s||{},Object.keys(s).forEach(function(r){var i=s[r]||[],c=[];i.forEach(function(t){e({val:t,op:r},n,"numeric")||c.push(t)}),c.length!==i.length&&(t=!0),a[r]=c}),i[n]=a,i},{});return t?i:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return l.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:l.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return l.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:l.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return l.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:l.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter(function(t){return t!==e})}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter(function(t){return t!==e})}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter(function(t){return t.name!==e})}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return l.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:l.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return l.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:l.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return l.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:l.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter(function(t){return t!==e})};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:l.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:l.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:l.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),n={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r))?-1===t.indexOf(r)?n[e]=[]:n[e]=[t.slice(0,t.lastIndexOf(r))]:n[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:i(n,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:i(r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:i(t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&l.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&l.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&l.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var r=this.getHierarchicalRefinement(e);return t?-1!==r.indexOf(t):r.length>0},isNumericRefined:function(e,t,r){if(void 0===r&&void 0===t)return Boolean(this.numericRefinements[e]);var i=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===r||!i)return i;var s,a,c=u(r),o=void 0!==(s=this.numericRefinements[e][t],a=c,n(s,function(e){return f(e,a)}));return i&&o},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=s(Object.keys(this.numericRefinements).filter(function(t){return Object.keys(e.numericRefinements[t]).length>0}),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter(function(t){return e.disjunctiveFacetsRefinements[t].length>0}).concat(t).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var e=this;return s(this.hierarchicalFacets.map(function(e){return e.name}),Object.keys(this.hierarchicalFacetsRefinements).filter(function(t){return e.hierarchicalFacetsRefinements[t].length>0})).sort()},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter(function(t){return-1===e.indexOf(t)})},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},r=this;return Object.keys(this).forEach(function(i){var n=r[i];-1===e.indexOf(i)&&void 0!==n&&(t[i]=n)}),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var r={};return r[e]=t,this.setQueryParameters(r)},setQueryParameters:function(e){if(!e)return this;var t=d.validate(this,e);if(t)throw t;var r=this,i=d._parseNumbers(e),n=Object.keys(this).reduce(function(e,t){return e[t]=r[t],e},{}),s=Object.keys(i).reduce(function(e,t){var r=void 0!==e[t],n=void 0!==i[t];return r&&!n?o(e,[t]):(n&&(e[t]=i[t]),e)},n);return new this.constructor(s)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return n(this.hierarchicalFacets,function(t){return t.name===e})},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(r).map(function(e){return e.trim()})},toString:function(){return JSON.stringify(this,null,2)}},e.exports=d},76673(e,t,r){"use strict";e.exports=function(e){return function(t,r){var i=e.hierarchicalFacets[r],u=e.hierarchicalFacetsRefinements[i.name]&&e.hierarchicalFacetsRefinements[i.name][0]||"",h=e._getHierarchicalFacetSeparator(i),l=e._getHierarchicalRootPath(i),f=e._getHierarchicalShowParentLevel(i),d=s(e._getHierarchicalFacetSortBy(i)),m=t.every(function(e){return e.exhaustive}),p=function(e,t,r,i,s){return function(u,h,l){var f=u;if(l>0){var d=0;for(f=u;d-1}));if(u){var h=u.attributes.indexOf(t),l=c(e.hierarchicalFacets,function(e){return e.name===u.name});o.hierarchicalFacets[l][h]={attribute:t,data:n,exhaustive:s.exhaustiveFacetsCount}}else{var f,d=-1!==e.disjunctiveFacets.indexOf(t),m=-1!==e.facets.indexOf(t);d&&(f=v[t],o.disjunctiveFacets[f]={name:t,data:n,exhaustive:s.exhaustiveFacetsCount},p(o.disjunctiveFacets[f],s.facets_stats,t)),m&&(f=g[t],o.facets[f]={name:t,data:n,exhaustive:s.exhaustiveFacetsCount},p(o.facets[f],s.facets_stats,t))}}),this.hierarchicalFacets=i(this.hierarchicalFacets),l.forEach(function(r){var i=t[y],a=i&&i.facets?i.facets:{},h=e.getHierarchicalFacetByName(r);Object.keys(a).forEach(function(t){var r,l=a[t];if(h){r=c(e.hierarchicalFacets,function(e){return e.name===h.name});var d=c(o.hierarchicalFacets[r],function(e){return e.attribute===t});if(-1===d)return;o.hierarchicalFacets[r][d].data=o.persistHierarchicalRootCount?u(o.hierarchicalFacets[r][d].data,l):n(l,o.hierarchicalFacets[r][d].data)}else{r=v[t];var m=s.facets&&s.facets[t]||{};o.disjunctiveFacets[r]={name:t,data:u(m,l),exhaustive:i.exhaustiveFacetsCount},p(o.disjunctiveFacets[r],i.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach(function(i){!o.disjunctiveFacets[r].data[i]&&e.disjunctiveFacetsRefinements[t].indexOf(f(i))>-1&&(o.disjunctiveFacets[r].data[i]=0)})}}),y++}),e.getRefinedHierarchicalFacets().forEach(function(r){var i=e.getHierarchicalFacetByName(r),s=e._getHierarchicalFacetSeparator(i),a=e.getHierarchicalRefinement(r);0===a.length||a[0].split(s).length<2||t.slice(y).forEach(function(t){var r=t&&t.facets?t.facets:{};Object.keys(r).forEach(function(t){var u=r[t],h=c(e.hierarchicalFacets,function(e){return e.name===i.name}),l=c(o.hierarchicalFacets[h],function(e){return e.attribute===t});if(-1!==l){var f={};if(a.length>0&&!o.persistHierarchicalRootCount){var d=a[0].split(s)[0];f[d]=o.hierarchicalFacets[h][l].data[d]}o.hierarchicalFacets[h][l].data=n(f,u,o.hierarchicalFacets[h][l].data)}}),y++})}),Object.keys(e.facetsExcludes).forEach(function(t){var r=e.facetsExcludes[t],i=g[t];o.facets[i]={name:t,data:R[t],exhaustive:s.exhaustiveFacetsCount},r.forEach(function(e){o.facets[i]=o.facets[i]||{name:t},o.facets[i].data=o.facets[i].data||{},o.facets[i].data[e]=0})}),this.hierarchicalFacets=this.hierarchicalFacets.map(d(e)),this.facets=i(this.facets),this.disjunctiveFacets=i(this.disjunctiveFacets),this._state=e}function v(e,t){function r(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var i=a(e.facets,r);return i?Object.keys(i.data).map(function(r){var n=l(r);return{name:r,escapedValue:n,count:i.data[r],isRefined:e._state.isFacetRefined(t,n),isExcluded:e._state.isExcludeRefined(t,r)}}):[]}if(e._state.isDisjunctiveFacet(t)){var n=a(e.disjunctiveFacets,r);return n?Object.keys(n.data).map(function(r){var i=l(r);return{name:r,escapedValue:i,count:n.data[r],isRefined:e._state.isDisjunctiveFacetRefined(t,i)}}):[]}if(e._state.isHierarchicalFacet(t)){var s=a(e.hierarchicalFacets,r);if(!s)return s;var c=e._state.getHierarchicalFacetByName(t),o=e._state._getHierarchicalFacetSeparator(c),u=f(e._state.getHierarchicalRefinement(t)[0]||"");0===u.indexOf(c.rootPath)&&(u=u.replace(c.rootPath+o,""));var h=u.split(o);return h.unshift(t),y(s,h,0),s}}function y(e,t,r){e.isRefined=e.name===(t[r]&&t[r].trim()),e.data&&e.data.forEach(function(e){y(e,t,r+1)})}function R(e,t,r,i){if(i=i||0,Array.isArray(t))return e(t,r[i]);if(!t.data||0===t.data.length)return t;var s=t.data.map(function(t){return R(e,t,r,i+1)}),a=e(s,r[i]);return n({data:a},t)}function F(e,t){var r=a(e,function(e){return e.name===t});return r&&r.stats}function b(e,t,r,i,n){var s=a(n,function(e){return e.name===r}),c=s&&s.data&&s.data[i]?s.data[i]:0,o=s&&s.exhaustive||!1;return{type:t,attributeName:r,name:i,count:c,exhaustive:o}}g.prototype.getFacetByName=function(e){function t(t){return t.name===e}return a(this.facets,t)||a(this.disjunctiveFacets,t)||a(this.hierarchicalFacets,t)},g.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],g.prototype.getFacetValues=function(e,t){var r=v(this,e);if(r){var i,s=n(t,{sortBy:g.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),a=this;if(Array.isArray(r))i=[e];else i=a._state.getHierarchicalFacetByName(r.name).attributes;return R(function(e,t){var r=function(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}(a,t);if(s.facetOrdering&&r)return function(e,t){var r=[],i=[],n=t.hide||[],s=(t.order||[]).reduce(function(e,t,r){return e[t]=r,e},{});e.forEach(function(e){var t=e.path||e.name,a=n.indexOf(t)>-1;a||void 0===s[t]?a||i.push(e):r[s[t]]=e}),r=r.filter(function(e){return e});var a,c=t.sortRemainingBy;return"hidden"===c?r:(a="alpha"===c?[["path","name"],["asc","asc"]]:[["count"],["desc"]],r.concat(h(i,a[0],a[1])))}(e,r);if(Array.isArray(s.sortBy)){var i=o(s.sortBy,g.DEFAULT_SORT),n=h(e,i[0],i[1]),c=r&&r.hide?r.hide:[];if(c.length>0){var u=[];return n.forEach(function(e){var t=e.path||e.name;-1===c.indexOf(t)&&u.push(e)}),u}return n}if("function"==typeof s.sortBy)return function(e,t){return t.sort(e)}(s.sortBy,e);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")},r,i)}},g.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?F(this.facets,e):this._state.isDisjunctiveFacet(e)?F(this.disjunctiveFacets,e):void 0},g.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach(function(i){e.facetsRefinements[i].forEach(function(n){r.push(b(e,"facet",i,n,t.facets))})}),Object.keys(e.facetsExcludes).forEach(function(i){e.facetsExcludes[i].forEach(function(n){r.push(b(e,"exclude",i,n,t.facets))})}),Object.keys(e.disjunctiveFacetsRefinements).forEach(function(i){e.disjunctiveFacetsRefinements[i].forEach(function(n){r.push(b(e,"disjunctive",i,n,t.disjunctiveFacets))})}),Object.keys(e.hierarchicalFacetsRefinements).forEach(function(i){e.hierarchicalFacetsRefinements[i].forEach(function(n){r.push(function(e,t,r,i){var n=e.getHierarchicalFacetByName(t),s=e._getHierarchicalFacetSeparator(n),c=r.split(s),o=a(i,function(e){return e.name===t}),u=c.reduce(function(e,t){var r=e&&a(e.data,function(e){return e.name===t});return void 0!==r?r:e},o),h=u&&u.count||0,l=u&&u.exhaustive||!1,f=u&&u.path||"";return{type:"hierarchical",attributeName:t,name:f,count:h,exhaustive:l}}(e,i,n,t.hierarchicalFacets))})}),Object.keys(e.numericRefinements).forEach(function(t){var i=e.numericRefinements[t];Object.keys(i).forEach(function(e){i[e].forEach(function(i){r.push({type:"numeric",attributeName:t,name:i,numericValue:i,operator:e})})})}),e.tagRefinements.forEach(function(e){r.push({type:"tag",attributeName:"_tags",name:e})}),r},e.exports=g},36571(e,t,r){"use strict";var i=r(72733),n=r(46732),s=r(2909).escapeFacetValue,a=r(73014),c=r(44728),o=r(40317),u=r(21383),h=r(19127),l=r(42223),f=r(49228),d=r(33371),m=r(67691),p=r(57749),g=r(16938);function v(e,t,r,i){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+g+")"),this.setClient(e);var n=r||{};n.index=t,this.state=d.make(n),this.recommendState=new h({params:n.recommendState}),this.lastResults=null,this.lastRecommendResults=null,this._queryId=0,this._recommendQueryId=0,this._lastQueryIdReceived=-1,this._lastRecommendQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0,this._currentNbRecommendQueries=0,this._searchResultsOptions=i,this._recommendCache={}}function y(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function R(){return this.state.page}a(v,i),v.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},v.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},v.prototype.searchWithComposition=function(){return this._runComposition({onlyWithDerivedHelpers:!0}),this},v.prototype.recommend=function(){return this._recommend(),this},v.prototype.getQuery=function(){var e=this.state;return f._getHitsSearchParams(e)},v.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,i=f._getQueries(r.index,r),n=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),!t)return this.client.search(i).then(function(e){return n._currentNbQueries--,0===n._currentNbQueries&&n.emit("searchQueueEmpty"),{content:new m(r,e.results),state:r,_originalResponse:e}},function(e){throw n._currentNbQueries--,0===n._currentNbQueries&&n.emit("searchQueueEmpty"),e});this.client.search(i).then(function(e){n._currentNbQueries--,0===n._currentNbQueries&&n.emit("searchQueueEmpty"),t(null,new m(r,e.results),r)}).catch(function(e){n._currentNbQueries--,0===n._currentNbQueries&&n.emit("searchQueueEmpty"),t(e,null,r)})},v.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,r=this.derivedHelpers[0];if(!r)return Promise.resolve([]);var i=r.getModifiedState(t),n=c({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:u(f._getHitsSearchParams(i),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),s="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!=typeof this.client.initIndex)throw new Error(s);var a=this.client.initIndex(i.index);if("function"!=typeof a.findAnswers)throw new Error(s);return a.findAnswers(i.query,e.queryLanguages,n)},v.prototype.searchForFacetValues=function(e,t,r,i){var n="function"==typeof this.client.searchForFacetValues&&"function"!=typeof this.client.searchForFacets,a="function"==typeof this.client.initIndex;if(!n&&!a&&"function"!=typeof this.client.search)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var c=this.state.setQueryParameters(i||{}),o=c.isDisjunctiveFacet(e),u=f.getSearchForFacetQuery(e,t,r,c);this._currentNbQueries++;var h,l=this;n?h=this.client.searchForFacetValues([{indexName:c.index,params:u}]):a?h=this.client.initIndex(c.index).searchForFacetValues(u):(delete u.facetName,h=this.client.search([{type:"facet",facet:e,indexName:c.index,params:u}]).then(function(e){return e.results[0]})),this.emit("searchForFacetValues",{state:c,facet:e,query:t});var d=this.lastResults&&this.lastResults.index===c.index&&this.lastResults.renderingContent&&this.lastResults.renderingContent.facetOrdering&&this.lastResults.renderingContent.facetOrdering.values&&this.lastResults.renderingContent.facetOrdering.values[e]&&this.lastResults.renderingContent.facetOrdering.values[e].hide||[];return h.then(function(t){return l._currentNbQueries--,0===l._currentNbQueries&&l.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits=t.facetHits.reduce(function(t,r){return d.indexOf(r.value)>-1||(r.escapedValue=s(r.value),r.isRefined=o?c.isDisjunctiveFacetRefined(e,r.escapedValue):c.isFacetRefined(e,r.escapedValue),t.push(r)),t},[]),t},function(e){throw l._currentNbQueries--,0===l._currentNbQueries&&l.emit("searchQueueEmpty"),e})},v.prototype.searchForCompositionFacetValues=function(e,t,r,i){if("function"!=typeof this.client.searchForFacetValues)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues");var n=this.state.setQueryParameters(i||{}),a=n.isDisjunctiveFacet(e);this._currentNbQueries++;var c,o=this;return c=this.client.searchForFacetValues({compositionID:n.index,facetName:e,searchForFacetValuesRequest:{params:{query:t,maxFacetHits:r,searchQuery:f._getCompositionHitsSearchParams(n)}}}),this.emit("searchForFacetValues",{state:n,facet:e,query:t}),c.then(function(t){return o._currentNbQueries--,0===o._currentNbQueries&&o.emit("searchQueueEmpty"),(t=t.results[0]).facetHits.forEach(function(t){t.escapedValue=s(t.value),t.isRefined=a?n.isDisjunctiveFacetRefined(e,t.escapedValue):n.isFacetRefined(e,t.escapedValue)}),t},function(e){throw o._currentNbQueries--,0===o._currentNbQueries&&o.emit("searchQueueEmpty"),e})},v.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},v.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},v.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},v.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},v.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this},v.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},v.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},v.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},v.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},v.prototype.addFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.addFrequentlyBoughtTogether(e)}),this},v.prototype.addRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.addRelatedProducts(e)}),this},v.prototype.addTrendingItems=function(e){return this._recommendChange({state:this.recommendState.addTrendingItems(e)}),this},v.prototype.addTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.addTrendingFacets(e)}),this},v.prototype.addLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.addLookingSimilar(e)}),this},v.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this},v.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},v.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},v.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},v.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},v.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},v.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},v.prototype.removeFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeTrendingItems=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},v.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},v.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},v.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},v.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},v.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},v.prototype.setCurrentPage=y,v.prototype.setPage=y,v.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},v.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},v.prototype.setState=function(e){return this._change({state:d.make(e),isPageReset:!1}),this},v.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new d(e),this},v.prototype.hasRefinements=function(e){return!!o(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},v.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},v.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},v.prototype.hasTag=function(e){return this.state.isTagRefined(e)},v.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},v.prototype.getIndex=function(){return this.state.index},v.prototype.getCurrentPage=R,v.prototype.getPage=R,v.prototype.getTags=function(){return this.state.tagRefinements},v.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach(function(e){t.push({value:e,type:"conjunctive"})}),this.state.getExcludeRefinements(e).forEach(function(e){t.push({value:e,type:"exclude"})});else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach(function(e){t.push({value:e,type:"disjunctive"})})}var r=this.state.getNumericRefinements(e);return Object.keys(r).forEach(function(e){var i=r[e];t.push({value:i,operator:e,type:"numeric"})}),t},v.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},v.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},v.prototype._search=function(e){var t=this.state,r=[],i=[];e.onlyWithDerivedHelpers||(i=f._getQueries(t.index,t),r.push({state:t,queriesCount:i.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var n=this.derivedHelpers.map(function(e){var i=e.getModifiedState(t),n=i.index?f._getQueries(i.index,i):[];return r.push({state:i,queriesCount:n.length,helper:e}),e.emit("search",{state:i,results:e.lastResults}),n}),s=Array.prototype.concat.apply(i,n),a=this._queryId++;if(this._currentNbQueries++,!s.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,r,a));try{this.client.search(s).then(this._dispatchAlgoliaResponse.bind(this,r,a)).catch(this._dispatchAlgoliaError.bind(this,a))}catch(c){this.emit("error",{error:c})}},v.prototype._runComposition=function(){var e=this.state,t=[],r=this.derivedHelpers.map(function(r){var i=r.getModifiedState(e),n=f._getCompositionQueries(i);return t.push({state:i,helper:r}),r.emit("search",{state:i,results:r.lastResults}),n}),i=Array.prototype.concat.apply([],r),n=this._queryId++;if(this._currentNbQueries++,!i.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,t,n));if(i.length>1)throw new Error("Only one query is allowed when using a composition.");var s=i[0];try{this.client.search(s).then(this._dispatchAlgoliaResponse.bind(this,t,n)).catch(this._dispatchAlgoliaError.bind(this,n))}catch(a){this.emit("error",{error:a})}},v.prototype._recommend=function(){var e=this.state,t=this.recommendState,r=this.getIndex(),i=[{state:t,index:r,helper:this}],n=t.params.map(function(e){return e.$$id});this.emit("fetch",{recommend:{state:t,results:this.lastRecommendResults}});var s=this._recommendCache,a=this.derivedHelpers.map(function(t){var r=t.getModifiedState(e).index;if(!r)return[];var a=t.getModifiedRecommendState(new h);return i.push({state:a,index:r,helper:t}),n=Array.prototype.concat.apply(n,a.params.map(function(e){return e.$$id})),t.emit("fetch",{recommend:{state:a,results:t.lastRecommendResults}}),a._buildQueries(r,s)}),c=Array.prototype.concat.apply(this.recommendState._buildQueries(r,s),a);if(0!==c.length)if(c.length>0&&void 0===this.client.getRecommendations)console.warn("Please update algoliasearch/lite to the latest version in order to use recommend widgets.");else{var o=this._recommendQueryId++;this._currentNbRecommendQueries++;try{this.client.getRecommendations(c).then(this._dispatchRecommendResponse.bind(this,o,i,n)).catch(this._dispatchRecommendError.bind(this,o))}catch(u){this.emit("error",{error:u})}}},v.prototype._dispatchAlgoliaResponse=function(e,t,r){var i=this;if(!(t0&&c[0].feedID){var o=c.map(function(e){var r=new m(t,[e],i._searchResultsOptions);return void 0!==s&&(r._rawContent=s),r});a.lastResults=new m(t,[c[0]],i._searchResultsOptions),a.lastResults.feeds=o,void 0!==s&&(a.lastResults._rawContent=s)}else a.lastResults=new m(t,c,i._searchResultsOptions),void 0!==s&&(a.lastResults._rawContent=s);a.emit("result",{results:a.lastResults,state:t})}else a.emit("result",{results:null,state:t})})}},v.prototype._dispatchRecommendResponse=function(e,t,r,i){if(!(e0},v.prototype._change=function(e){var t=e.state,r=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:r}))},v.prototype._recommendChange=function(e){var t=e.state;t!==this.recommendState&&(this.recommendState=t,this.emit("recommend:change",{search:{results:this.lastResults,state:this.state},recommend:{results:this.lastRecommendResults,state:this.recommendState}}))},v.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},v.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+g+")"),this.client=e),this},v.prototype.getClient=function(){return this.client},v.prototype.derive=function(e,t){var r=new n(this,e,t);return this.derivedHelpers.push(r),r},v.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},v.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=v},78965(e){"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},29110(e){"use strict";e.exports=function(){return Array.prototype.slice.call(arguments).reduceRight(function(e,t){return Object.keys(Object(t)).forEach(function(r){void 0!==t[r]&&(void 0!==e[r]&&delete e[r],e[r]=t[r])}),e},{})}},2909(e){"use strict";e.exports={escapeFacetValue:function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},unescapeFacetValue:function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")}}},20849(e){"use strict";e.exports=function(e,t){if(Array.isArray(e))for(var r=0;r1||!s?(e[0].push(n[0]),e[1].push(n[1]),e):(e[0].push(s[0]),e[1].push(s[1]),e)},[[],[]])}},73014(e){"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},14843(e){"use strict";e.exports=function(e,t){return e.filter(function(r,i){return t.indexOf(r)>-1&&e.indexOf(r)===i})}},44728(e){"use strict";function t(e){return"object"==typeof e&&null!==e?i(Array.isArray(e)?[]:{},e):e}function r(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function i(e,n){if(e===n)return e;for(var s in n)if(Object.prototype.hasOwnProperty.call(n,s)&&"__proto__"!==s&&"constructor"!==s){var a=n[s],c=e[s];void 0!==c&&void 0===a||(r(c)&&r(a)?e[s]=i(c,a):e[s]=t(a))}return e}e.exports=function(e){r(e)||(e={});for(var t=1,n=arguments.length;t=i&&(void 0!==e[r]&&delete e[r],e[r]=n)}),e},{})}},40317(e){"use strict";e.exports=function(e){return e&&Object.keys(e).length>0}},21383(e){"use strict";e.exports=function(e,t){if(null===e)return{};var r,i,n={},s=Object.keys(e);for(i=0;i=0||(n[r]=e[r]);return n}},38601(e){"use strict";function t(e,t){if(e!==t){var r=void 0!==e,i=null===e,n=void 0!==t,s=null===t;if(!s&&e>t||i&&n||!r)return 1;if(!i&&e=i.length?s:"desc"===i[n]?-s:s}return e.index-r.index}),n.map(function(e){return e.value})}},17507(e){"use strict";e.exports=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")}},49228(e,t,r){"use strict";var i=r(44728);function n(e){return Object.keys(e).sort().reduce(function(t,r){return t[r]=e[r],t},{})}var s={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:s._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach(function(i){r.push({indexName:e,params:s._getDisjunctiveFacetSearchParams(t,i)})}),t.getRefinedHierarchicalFacets().forEach(function(i){var n=t.getHierarchicalFacetByName(i),a=t.getHierarchicalRefinement(i),c=t._getHierarchicalFacetSeparator(n);if(a.length>0&&a[0].split(c).length>1){var o=a[0].split(c).slice(0,-1).reduce(function(e,t,r){return e.concat({attribute:n.attributes[r],value:0===r?t:[e[e.length-1].value,t].join(c)})},[]);o.forEach(function(i,a){var c=s._getDisjunctiveFacetSearchParams(t,i.attribute,0===a);function u(e){return n.attributes.some(function(t){return t===e.split(":")[0]})}var h=(c.facetFilters||[]).reduce(function(e,t){if(Array.isArray(t)){var r=t.filter(function(e){return!u(e)});r.length>0&&e.push(r)}return"string"!=typeof t||u(t)||e.push(t),e},[]),l=o[a-1];a>0?c.facetFilters=h.concat(l.attribute+":"+l.value):h.length>0?c.facetFilters=h:delete c.facetFilters,r.push({indexName:e,params:c})})}}),r},_getCompositionQueries:function(e){return[{compositionID:e.index,requestBody:{params:s._getCompositionHitsSearchParams(e)}}]},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(s._getHitsHierarchicalFacetsAttributes(e)).sort(),r=s._getFacetFilters(e),a=s._getNumericFilters(e),c=s._getTagFilters(e),o={};return t.length>0&&(o.facets=t.indexOf("*")>-1?["*"]:t),c.length>0&&(o.tagFilters=c),r.length>0&&(o.facetFilters=r),a.length>0&&(o.numericFilters=a),n(i({},e.getQueryParams(),o))},_getCompositionHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets.map(function(t){return e.disjunctiveFacetsRefinements&&e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].length>0?"disjunctive("+t+")":t})).concat(s._getHitsHierarchicalFacetsAttributes(e)).sort(),r=s._getFacetFilters(e),a=s._getNumericFilters(e),c=s._getTagFilters(e),o={};t.length>0&&(o.facets=t.indexOf("*")>-1?["*"]:t),c.length>0&&(o.tagFilters=c),r.length>0&&(o.facetFilters=r),a.length>0&&(o.numericFilters=a);var u=e.getQueryParams();return delete u.highlightPreTag,delete u.highlightPostTag,delete u.index,n(i({},u,o))},_getDisjunctiveFacetSearchParams:function(e,t,r){var a=s._getFacetFilters(e,t,r),c=s._getNumericFilters(e,t),o=s._getTagFilters(e),u={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};o.length>0&&(u.tagFilters=o);var h=e.getHierarchicalFacetByName(t);return u.facets=h?s._getDisjunctiveHierarchicalFacetAttribute(e,h,r):t,c.length>0&&(u.numericFilters=c),a.length>0&&(u.facetFilters=a),n(i({},e.getQueryParams(),u))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return Object.keys(e.numericRefinements).forEach(function(i){var n=e.numericRefinements[i]||{};Object.keys(n).forEach(function(e){var s=n[e]||[];t!==i&&s.forEach(function(t){if(Array.isArray(t)){var n=t.map(function(t){return i+e+t});r.push(n)}else r.push(i+e+t)})})}),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var i=[],n=e.facetsRefinements||{};Object.keys(n).sort().forEach(function(e){(n[e]||[]).slice().sort().forEach(function(t){i.push(e+":"+t)})});var s=e.facetsExcludes||{};Object.keys(s).sort().forEach(function(e){(s[e]||[]).sort().forEach(function(t){i.push(e+":-"+t)})});var a=e.disjunctiveFacetsRefinements||{};Object.keys(a).sort().forEach(function(e){var r=a[e]||[];if(e!==t&&r&&0!==r.length){var n=[];r.slice().sort().forEach(function(t){n.push(e+":"+t)}),i.push(n)}});var c=e.hierarchicalFacetsRefinements||{};return Object.keys(c).sort().forEach(function(n){var s=(c[n]||[])[0];if(void 0!==s){var a,o,u=e.getHierarchicalFacetByName(n),h=e._getHierarchicalFacetSeparator(u),l=e._getHierarchicalRootPath(u);if(t===n){if(-1===s.indexOf(h)||!l&&!0===r||l&&l.split(h).length===s.split(h).length)return;l?(o=l.split(h).length-1,s=l):(o=s.split(h).length-2,s=s.slice(0,s.lastIndexOf(h))),a=u.attributes[o]}else o=s.split(h).length-1,a=u.attributes[o];a&&i.push([a+":"+s])}}),i},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce(function(t,r){var i=e.getHierarchicalRefinement(r.name)[0];if(!i)return t.push(r.attributes[0]),t;var n=e._getHierarchicalFacetSeparator(r),s=i.split(n).length,a=r.attributes.slice(0,s+1);return t.concat(a)},[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var i=e._getHierarchicalFacetSeparator(t);if(!0===r){var n=e._getHierarchicalRootPath(t),s=0;return n&&(s=n.split(i).length),[t.attributes[s]]}var a=(e.getHierarchicalRefinement(t.name)[0]||"").split(i).length-1;return t.attributes.slice(0,a+1)},getSearchForFacetQuery:function(e,t,r,a){var c=a.isDisjunctiveFacet(e)?a.clearRefinements(e):a,o={facetQuery:t,facetName:e};return"number"==typeof r&&(o.maxFacetHits=r),n(i({},s._getHitsSearchParams(c),o))}};e.exports=s},72208(e){"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},57749(e,t,r){"use strict";var i=r(20849),n=r(38657);e.exports=function(e,t){var r={};return t.forEach(function(t){t.forEach(function(t,i){e.includes(t.objectID)||(r[t.objectID]?r[t.objectID]={indexSum:r[t.objectID].indexSum+i,count:r[t.objectID].count+1}:r[t.objectID]={indexSum:i,count:1})})}),function(e,t){var r=[];return Object.keys(e).forEach(function(i){e[i].count<2&&(e[i].indexSum+=100),r.push({objectID:i,avgOfIndices:e[i].indexSum/t})}),r.sort(function(e,t){return e.avgOfIndices>t.avgOfIndices?1:-1})}(r,t.length).reduce(function(e,r){var s=i(n(t),function(e){return e.objectID===r.objectID});return s?e.concat(s):e},[])}},16938(e){"use strict";e.exports="3.29.1"},53465(e,t,r){"use strict";r.d(t,{W:()=>u});var i=r(96540),n=r(44586);const s=["zero","one","two","few","many","other"];function a(e){return s.filter(t=>e.includes(t))}const c={locale:"en",pluralForms:a(["one","other"]),select:e=>1===e?"one":"other"};function o(){const e=(0,n.A)().i18n.currentLocale;return(0,i.useMemo)(()=>{try{return function(e){const t=new Intl.PluralRules(e);return{locale:e,pluralForms:a(t.resolvedOptions().pluralCategories),select:e=>t.select(e)}}(e)}catch(t){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+t.message+"\n"),c}},[e])}function u(){const e=o();return{selectMessage:(t,r)=>function(e,t,r){const i=e.split("|");if(1===i.length)return i[0];i.length>r.pluralForms.length&&console.error("For locale="+r.locale+", a maximum of "+r.pluralForms.length+" plural forms are expected ("+r.pluralForms.join(",")+"), but the message contains "+i.length+": "+e);const n=r.select(t),s=r.pluralForms.indexOf(n);return i[Math.min(s,i.length-1)]}(r,t,e)}}},80851(e,t,r){"use strict";r.r(t),r.d(t,{default:()=>ae});var i=r(96540),n=r(34164),s=r(74103),a=r.n(s);function c(e){let t;const r=`algolia-client-js-${e.key}`;function i(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function n(){return JSON.parse(i().getItem(r)||"{}")}function s(){return new Promise(e=>setTimeout(e,0))}return{get:(t,a,c={miss:()=>Promise.resolve()})=>s().then(()=>{const{namespace:s,changed:o}=function(){const t=e.timeToLive?1e3*e.timeToLive:null,r=n(),i=(new Date).getTime();let s=!1;return{namespace:Object.fromEntries(Object.entries(r).filter(([,e])=>e&&void 0!==e.timestamp?!(t&&e.timestamp+tc.miss(e).then(()=>e))}),set:(e,t)=>s().then(()=>{const s=n();return s[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},i().setItem(r,JSON.stringify(s)),t}),delete:e=>s().then(()=>{const t=n();delete t[JSON.stringify(e)],i().setItem(r,JSON.stringify(t))}),clear:()=>Promise.resolve().then(()=>{i().removeItem(r)})}}function o(e){const t=[...e.caches],r=t.shift();return void 0===r?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then(e=>Promise.all([e,r.miss(e)])).then(([e])=>e),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,i,n={miss:()=>Promise.resolve()})=>r.get(e,i,n).catch(()=>o({caches:t}).get(e,i,n)),set:(e,i)=>r.set(e,i).catch(()=>o({caches:t}).set(e,i)),delete:e=>r.delete(e).catch(()=>o({caches:t}).delete(e)),clear:()=>r.clear().catch(()=>o({caches:t}).clear())}}function u(e={serializable:!0}){let t={};return{get(r,i,n={miss:()=>Promise.resolve()}){const s=JSON.stringify(r);if(s in t)return Promise.resolve(e.serializable?JSON.parse(t[s]):t[s]);const a=i();return a.then(e=>n.miss(e)).then(()=>a)},set:(r,i)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(i):i,Promise.resolve(i)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}function h({algoliaAgents:e,client:t,version:r}){const i=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach(e=>i.add(e)),i}async function*l(e){const t=new TextDecoder("utf-8"),r=[];let i=0,n=!1,s=!0;for await(const c of function(e){return Symbol.asyncIterator in e?e:async function*(e){const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)return;yield r}}finally{t.releaseLock()}}(e)}(e)){const e=t.decode(c,{stream:!0});let a=0;for(n&&(n=!1,e.length>0&&"\n"===e[0]&&(a=1));a10485760)throw new Error("SSE line buffer exceeded 10MB");break}let o,u;-1!==t&&(-1===c||t0){let e=r.join("");s&&e.startsWith("\ufeff")&&(e=e.slice(1)),yield e}}var f=class{data=[];eventType="";lastEventId=null;retry=null;decode(e){if(""===e)return this.dispatch();if(":"===e[0])return null;const t=e.indexOf(":");let r,i;switch(-1===t?(r=e,i=""):(r=e.slice(0,t),i=e.slice(t+1)," "===i[0]&&(i=i.slice(1))),r){case"data":this.data.push(i);break;case"event":this.eventType=i;break;case"id":i.includes("\0")||(this.lastEventId=i);break;case"retry":/^[0-9]+$/.test(i)&&(this.retry=parseInt(i,10))}return null}dispatch(){const e=this.eventType;if(this.eventType="",0===this.data.length)return null;const t={data:this.data.join("\n"),event:e,id:this.lastEventId,retry:this.retry};return this.data=[],t}};var d=12e4;function m(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>d},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=d}}}var p=class extends Error{name="AlgoliaError";constructor(e,t){super(e),t&&(this.name=t)}},g=class extends p{stackTrace;constructor(e,t,r){super(e,r),this.stackTrace=t}},v=class extends g{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support",e,"RetryError")}},y=class extends g{status;constructor(e,t,r,i="ApiError"){super(e,r,i),this.status=t}},R=class extends p{response;constructor(e,t){super(e,"DeserializationError"),this.response=t}},F=class extends y{error;constructor(e,t,r,i){super(e,t,i,"DetailedApiError"),this.error=r}};function b(e,t,r){const i=(n=r,Object.keys(n).filter(e=>void 0!==n[e]).sort().map(e=>`${e}=${encodeURIComponent("[object Array]"===Object.prototype.toString.call(n[e])?n[e].join(","):n[e]).replace(/\+/g,"%20")}`).join("&"));var n;let s=`${e.protocol}://${e.url}${e.port?`:${e.port}`:""}/${"/"===t.charAt(0)?t.substring(1):t}`;return i.length&&(s+=`?${i}`),s}function j(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}function _(e,t,r){const i={Accept:"application/json",...e,...t,...r},n={};return Object.keys(i).forEach(e=>{const t=i[e];n[e.toLowerCase()]=t}),n}function x(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function P({hosts:e,hostsCache:t,baseHeaders:r,logger:i,baseQueryParameters:n,algoliaAgent:s,timeouts:a,requester:c,requestsCache:o,responsesCache:u,compress:h,compression:d}){async function p(e){const r=await Promise.all(e.map(e=>t.get(e,()=>Promise.resolve(m(e))))),i=r.filter(e=>e.isUp()),n=r.filter(e=>e.isTimedOut()),s=[...i,...n];return{hosts:s.length>0?s:e,getTimeout:(e,t)=>(0===n.length&&0===e?1:n.length+3+e)*t}}async function g(o,u,l){const f=[],g=j(o,u),P=_(r,o.headers,u.headers),w="gzip"===d&&void 0!==g&&g.length>750&&("POST"===o.method||"PUT"===o.method);w&&void 0===h&&i.info("Compression is disabled because no compress method is available.");const E=w&&void 0!==h,O=E?await h(g):g;E&&(P["content-encoding"]="gzip");const T="GET"===o.method?{...o.data,...u.data}:{},A={...n,...o.queryParameters,...T};if(s.value&&(A["x-algolia-agent"]=s.value),u&&u.queryParameters)for(const e of Object.keys(u.queryParameters))u.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(u.queryParameters[e])?A[e]=u.queryParameters[e].toString():A[e]=u.queryParameters[e];let S=0;const N=async(e,r)=>{const n=e.pop();if(void 0===n)throw new v(function(e){return e.map(e=>x(e))}(f));const s={...a,...u.timeouts},h={data:O,headers:P,method:o.method,url:b(n,o.path,A),connectTimeout:r(S,s.connect),responseTimeout:r(S,l?s.read:s.write)},d=t=>{const r={request:h,response:t,host:n,triesLeft:e.length};return f.push(r),r},p=await c.send(h);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&0===~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(p)){const s=d(p);return p.isTimedOut&&S++,i.info("Retryable failure",x(s)),await t.set(n,m(n,p.isTimedOut?"timed out":"down")),N(e,r)}if(function({status:e}){return 2==~~(e/100)}(p))return function(e){if(204!==e.status&&0!==e.content.length)try{return JSON.parse(e.content)}catch(t){throw new R(t.message,e)}}(p);throw d(p),function({content:e,status:t},r){try{const i=JSON.parse(e);return"error"in i?new F(i.message,t,i.error,r):new y(i.message,t,r)}catch{}return new y(e,t,r)}(p,f)},H=e.filter(e=>"readWrite"===e.accept||(l?"read"===e.accept:"write"===e.accept)),Q=await p(H);return N([...Q.hosts].reverse(),Q.getTimeout)}return{hostsCache:t,requester:c,timeouts:a,logger:i,algoliaAgent:s,baseHeaders:r,baseQueryParameters:n,hosts:e,request:function(e,t={}){const i=()=>g(e,t,s),s=e.useReadTransporter||"GET"===e.method;if(!0!==(t.cacheable||e.cacheable))return i();const a={request:e,requestOptions:t,transporter:{queryParameters:n,headers:r}};return u.get(a,()=>o.get(a,()=>o.set(a,i()).then(e=>Promise.all([o.delete(a),e]),e=>Promise.all([o.delete(a),Promise.reject(e)])).then(([e,t])=>t)),{miss:e=>u.set(a,e)})},requestStream:async function*(t,i={}){if(!c.sendStream)throw new Error("This requester does not support streaming");const o=j(t,i),u=_(r,t.headers,i.headers);u.accept="text/event-stream";const h="GET"===t.method?{...t.data,...i.data}:{},d={...n,...t.queryParameters,...h};if(s.value&&(d["x-algolia-agent"]=s.value),i&&i.queryParameters)for(const e of Object.keys(i.queryParameters))i.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(i.queryParameters[e])?d[e]=i.queryParameters[e].toString():d[e]=i.queryParameters[e];const m=t.useReadTransporter||"GET"===t.method,g=e.filter(e=>"readWrite"===e.accept||(m?"read"===e.accept:"write"===e.accept)),y=(await p(g)).hosts[0];if(!y)throw new v([]);const R={...a,...i.timeouts},F={data:o,headers:u,method:t.method,url:b(y,t.path,d),connectTimeout:R.connect,responseTimeout:m?R.read:R.write},x=await c.sendStream(F);yield*async function*(e){const t=new f;for await(const r of l(e)){const e=t.decode(r);null!==e&&(yield e)}}(x)},requestsCache:o,responsesCache:u}}function w(e,t,r){if(null==r||"string"==typeof r&&0===r.length)throw new Error(`Parameter \`${e}\` is required when calling \`${t}\`.`)}var E="5.55.1";function O(e){return[{url:`${e}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${e}.algolia.net`,accept:"write",protocol:"https"}].concat(function(e){const t=e;for(let r=e.length-1;r>0;r--){const i=Math.floor(Math.random()*(r+1)),n=e[r];t[r]=e[i],t[i]=n}return t}([{url:`${e}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}function T(e,t,r){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!t||"string"!=typeof t)throw new Error("`apiKey` is missing.");const{compression:i,...n}=r||{};return function({appId:e,apiKey:t,authMode:r,algoliaAgents:i,...n}){const s=function(e,t,r="WithinHeaders"){const i={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?i:{},queryParameters:()=>"WithinQueryParameters"===r?i:{}}}(e,t,r),a=P({hosts:O(e),...n,algoliaAgent:h({algoliaAgents:i,client:"Lite",version:E}),baseHeaders:{"content-type":"text/plain",...s.headers(),...n.baseHeaders},baseQueryParameters:{...s.queryParameters(),...n.baseQueryParameters}});return{transporter:a,appId:e,apiKey:t,clearCache:()=>Promise.all([a.requestsCache.clear(),a.responsesCache.clear()]).then(()=>{}),get _ua(){return a.algoliaAgent.value},addAlgoliaAgent(e,t){a.algoliaAgent.add({segment:e,version:t})},setClientApiKey({apiKey:e}){r&&"WithinHeaders"!==r?a.baseQueryParameters["x-algolia-api-key"]=e:a.baseHeaders["x-algolia-api-key"]=e},searchForHits(e,t){return this.search(e,t)},searchForFacets(e,t){return this.search(e,t)},customPost({path:e,parameters:t,body:r},i){w("path","customPost",e);const n={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return a.request(n,i)},getRecommendations(e,t){e&&Array.isArray(e)&&(e={requests:e}),w("getRecommendationsParams","getRecommendations",e),w("getRecommendationsParams.requests","getRecommendations",e.requests);const r={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return a.request(r,t)},search(e,t){if(e&&Array.isArray(e)){const t={requests:e.map(({params:e,...t})=>"facet"===t.type?{...t,...e,type:"facet"}:{...t,...e,facet:void 0,maxFacetHits:void 0,facetQuery:void 0})};e=t}w("searchMethodParams","search",e),w("searchMethodParams.requests","search",e.requests);const r={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return a.request(r,t)}}}({appId:e,apiKey:t,timeouts:{connect:1e3,read:2e3,write:3e4},logger:{debug:(e,t)=>Promise.resolve(),info:(e,t)=>Promise.resolve(),error:(e,t)=>Promise.resolve()},requester:{send:function(e){return new Promise(t=>{let r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach(t=>r.setRequestHeader(t,e.headers[t]));let i,n=(e,i)=>setTimeout(()=>{r.abort(),t({status:0,content:i,isTimedOut:!0})},e),s=n(e.connectTimeout,"Connection timeout");r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===i&&(clearTimeout(s),i=n(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(s),clearTimeout(i),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(s),clearTimeout(i),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)})}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:u(),requestsCache:u({serializable:!1}),hostsCache:o({caches:[c({key:`${E}-${e}`}),u()]}),...n})}var A=r(38193),S=r(5260),N=r(28774),H=r(48295),Q=r(53465),C=r(24255),I=r(89532),D=r(45500),k=r(21312),q=r(44586),L=r(38126),V=r(51062),B=r(36882),M=r(51107);const $="searchQueryInput_u2C7",W="searchVersionInput_m0Ui",J="searchResultsColumn_JPFH",U="searchLogoColumn_rJIA",Z="searchResultItem_Tv2o",z="searchResultItemHeading_KbCB",K="searchResultItemPath_lhe1",G="searchResultItemSummary_AEaO",X="searchQueryColumn_RTkw",Y="searchVersionColumn_ypXd",ee="loadingSpinner_XVxU",te="loader_vvXV";var re=r(74848);function ie(e){let t=e.docsSearchVersionsHelpers;const r=Object.entries(t.allDocsData).filter(e=>e[1].versions.length>1);return(0,re.jsx)("div",{className:(0,n.A)("col","col--3","padding-left--none",Y),children:r.map(e=>{let i=e[0],n=e[1];const s=r.length>1?i+": ":"";return(0,re.jsx)("select",{onChange:e=>t.setSearchVersion(i,e.target.value),defaultValue:t.searchVersions[i],className:W,children:n.versions.map((e,t)=>(0,re.jsx)("option",{label:""+s+e.label,value:e.name},t))},i)})})}function ne(){return(0,re.jsxs)("svg",{width:"80",height:"24","aria-label":"Algolia",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2196.2 500",style:{maxWidth:"150px"},children:[(0,re.jsx)("defs",{children:(0,re.jsx)("style",{children:".cls-1,.cls-2{fill:#003dff}.cls-2{fill-rule:evenodd}"})}),(0,re.jsx)("path",{className:"cls-2",d:"M1070.38,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"}),(0,re.jsx)("rect",{className:"cls-1",x:"1845.88",y:"104.73",width:"62.58",height:"277.9",rx:"5.9",ry:"5.9"}),(0,re.jsx)("path",{className:"cls-2",d:"M1851.78,71.38h50.77c3.26,0,5.9-2.64,5.9-5.9V5.9c0-3.62-3.24-6.39-6.82-5.83l-50.77,7.95c-2.87,.45-4.99,2.92-4.99,5.83v51.62c0,3.26,2.64,5.9,5.9,5.9Z"}),(0,re.jsx)("path",{className:"cls-2",d:"M1764.03,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"}),(0,re.jsx)("path",{className:"cls-2",d:"M1631.95,142.72c-11.14-12.25-24.83-21.65-40.78-28.31-15.92-6.53-33.26-9.85-52.07-9.85-18.78,0-36.15,3.17-51.92,9.85-15.59,6.66-29.29,16.05-40.76,28.31-11.47,12.23-20.38,26.87-26.76,44.03-6.38,17.17-9.24,37.37-9.24,58.36,0,20.99,3.19,36.87,9.55,54.21,6.38,17.32,15.14,32.11,26.45,44.36,11.29,12.23,24.83,21.62,40.6,28.46,15.77,6.83,40.12,10.33,52.4,10.48,12.25,0,36.78-3.82,52.7-10.48,15.92-6.68,29.46-16.23,40.78-28.46,11.29-12.25,20.05-27.04,26.25-44.36,6.22-17.34,9.24-33.22,9.24-54.21,0-20.99-3.34-41.19-10.03-58.36-6.38-17.17-15.14-31.8-26.43-44.03Zm-44.43,163.75c-11.47,15.75-27.56,23.7-48.09,23.7-20.55,0-36.63-7.8-48.1-23.7-11.47-15.75-17.21-34.01-17.21-61.2,0-26.89,5.59-49.14,17.06-64.87,11.45-15.75,27.54-23.52,48.07-23.52,20.55,0,36.63,7.78,48.09,23.52,11.47,15.57,17.36,37.98,17.36,64.87,0,27.19-5.72,45.3-17.19,61.2Z"}),(0,re.jsx)("path",{className:"cls-2",d:"M894.42,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"}),(0,re.jsx)("path",{className:"cls-2",d:"M2133.97,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"}),(0,re.jsx)("path",{className:"cls-2",d:"M1314.05,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-11.79,18.34-19.6,39.64-22.11,62.59-.58,5.3-.88,10.68-.88,16.14s.31,11.15,.93,16.59c4.28,38.09,23.14,71.61,50.66,94.52,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47h0c17.99,0,34.61-5.93,48.16-15.97,16.29-11.58,28.88-28.54,34.48-47.75v50.26h-.11v11.08c0,21.84-5.71,38.27-17.34,49.36-11.61,11.08-31.04,16.63-58.25,16.63-11.12,0-28.79-.59-46.6-2.41-2.83-.29-5.46,1.5-6.27,4.22l-12.78,43.11c-1.02,3.46,1.27,7.02,4.83,7.53,21.52,3.08,42.52,4.68,54.65,4.68,48.91,0,85.16-10.75,108.89-32.21,21.48-19.41,33.15-48.89,35.2-88.52V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,64.1s.65,139.13,0,143.36c-12.08,9.77-27.11,13.59-43.49,14.7-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-1.32,0-2.63-.03-3.94-.1-40.41-2.11-74.52-37.26-74.52-79.38,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33Z"}),(0,re.jsx)("path",{className:"cls-1",d:"M249.83,0C113.3,0,2,110.09,.03,246.16c-2,138.19,110.12,252.7,248.33,253.5,42.68,.25,83.79-10.19,120.3-30.03,3.56-1.93,4.11-6.83,1.08-9.51l-23.38-20.72c-4.75-4.21-11.51-5.4-17.36-2.92-25.48,10.84-53.17,16.38-81.71,16.03-111.68-1.37-201.91-94.29-200.13-205.96,1.76-110.26,92-199.41,202.67-199.41h202.69V407.41l-115-102.18c-3.72-3.31-9.42-2.66-12.42,1.31-18.46,24.44-48.53,39.64-81.93,37.34-46.33-3.2-83.87-40.5-87.34-86.81-4.15-55.24,39.63-101.52,94-101.52,49.18,0,89.68,37.85,93.91,85.95,.38,4.28,2.31,8.27,5.52,11.12l29.95,26.55c3.4,3.01,8.79,1.17,9.63-3.3,2.16-11.55,2.92-23.58,2.07-35.92-4.82-70.34-61.8-126.93-132.17-131.26-80.68-4.97-148.13,58.14-150.27,137.25-2.09,77.1,61.08,143.56,138.19,145.26,32.19,.71,62.03-9.41,86.14-26.95l150.26,133.2c6.44,5.71,16.61,1.14,16.61-7.47V9.48C499.66,4.25,495.42,0,490.18,0H249.83Z"})]})}function se(){const e=(0,q.A)().i18n.currentLocale,t=(0,L.c)().algolia,r=t.appId,s=t.apiKey,c=t.indexName,o=t.contextualSearch,u=(0,V.C)(),h=function(){const e=(0,Q.W)().selectMessage;return t=>e(t,(0,k.T)({id:"theme.SearchPage.documentsFound.plurals",description:'Pluralized label for "{count} documents found". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',message:"One document found|{count} documents found"},{count:t}))}(),l=function(){const e=(0,H.Gy)(),t=(0,i.useState)(()=>Object.entries(e).reduce((e,t)=>{let r=t[0],i=t[1];return Object.assign({},e,{[r]:i.versions[0].name})},{})),r=t[0],n=t[1],s=Object.values(e).some(e=>e.versions.length>1);return{allDocsData:e,versioningEnabled:s,searchVersions:r,setSearchVersion:(e,t)=>n(r=>Object.assign({},r,{[e]:t}))}}(),f=(0,C.b)(),d=f[0],m=f[1],p=function(e){return e?(0,k.T)({id:"theme.SearchPage.existingResultsTitle",message:'Search results for "{query}"',description:"The search page title for non-empty query"},{query:e}):(0,k.T)({id:"theme.SearchPage.emptyResultsTitle",message:"Search the documentation",description:"The search page title for empty query"})}(d),g={items:[],query:null,totalResults:null,totalPages:null,lastPage:null,hasMore:null,loading:null},v=(0,i.useReducer)((e,t)=>{switch(t.type){case"reset":return g;case"loading":return Object.assign({},e,{loading:!0});case"update":return d!==t.value.query?e:Object.assign({},t.value,{items:0===t.value.lastPage?t.value.items:e.items.concat(t.value.items)});case"advance":{const t=e.totalPages>e.lastPage+1;return Object.assign({},e,{lastPage:t?e.lastPage+1:e.lastPage,hasMore:t})}default:return e}},g),y=v[0],R=v[1],F=o?["language","docusaurus_tag"]:[],b=T(r,s),j=a()(b,c,{hitsPerPage:15,advancedSyntax:!0,disjunctiveFacets:F});j.on("result",e=>{let t=e.results,r=t.query,i=t.hits,n=t.page,s=t.nbHits,a=t.nbPages;if(""===r||!Array.isArray(i))return void R({type:"reset"});const c=e=>e.replace(/algolia-docsearch-suggestion--highlight/g,"search-result-match"),o=i.map(e=>{let t=e.url,r=e._highlightResult.hierarchy,i=e._snippetResult,n=void 0===i?{}:i;const s=Object.keys(r).map(e=>c(r[e].value));return{title:s.pop(),url:u(t),summary:n.content?c(n.content.value)+"...":"",breadcrumbs:s}});R({type:"update",value:{items:o,query:r,totalResults:s,totalPages:a,lastPage:n,hasMore:a>n+1,loading:!1}})});const _=(0,i.useState)(null),x=_[0],P=_[1],w=(0,i.useRef)(0),E=(0,i.useRef)(A.default.canUseIntersectionObserver&&new IntersectionObserver(e=>{const t=e[0],r=t.isIntersecting,i=t.boundingClientRect.y;r&&w.current>i&&R({type:"advance"}),w.current=i},{threshold:1})),O=(0,I._q)(function(t){void 0===t&&(t=0),o&&(j.addDisjunctiveFacetRefinement("docusaurus_tag","default"),j.addDisjunctiveFacetRefinement("language",e),Object.entries(l.searchVersions).forEach(e=>{let t=e[0],r=e[1];j.addDisjunctiveFacetRefinement("docusaurus_tag","docs-"+t+"-"+r)})),j.setQuery(d).setPage(t).search()});return(0,i.useEffect)(()=>{if(!x)return;const e=E.current;return e?(e.observe(x),()=>e.unobserve(x)):()=>!0},[x]),(0,i.useEffect)(()=>{R({type:"reset"}),d&&(R({type:"loading"}),setTimeout(()=>{O()},300))},[d,l.searchVersions,O]),(0,i.useEffect)(()=>{y.lastPage&&0!==y.lastPage&&O(y.lastPage)},[O,y.lastPage]),(0,re.jsxs)(B.A,{children:[(0,re.jsx)(D.be,{title:p}),(0,re.jsx)(S.A,{children:(0,re.jsx)("meta",{property:"robots",content:"noindex, follow"})}),(0,re.jsxs)("div",{className:"container margin-vert--lg",children:[(0,re.jsx)(M.A,{as:"h1",children:p}),(0,re.jsxs)("form",{className:"row",onSubmit:e=>e.preventDefault(),children:[(0,re.jsx)("div",{className:(0,n.A)("col",X,{"col--9":l.versioningEnabled,"col--12":!l.versioningEnabled}),children:(0,re.jsx)("input",{type:"search",name:"q",className:$,placeholder:(0,k.T)({id:"theme.SearchPage.inputPlaceholder",message:"Type your search here",description:"The placeholder for search page input"}),"aria-label":(0,k.T)({id:"theme.SearchPage.inputLabel",message:"Search",description:"The ARIA label for search page input"}),onChange:e=>m(e.target.value),value:d,autoComplete:"off",autoFocus:!0})}),o&&l.versioningEnabled&&(0,re.jsx)(ie,{docsSearchVersionsHelpers:l})]}),(0,re.jsxs)("div",{className:"row",children:[(0,re.jsx)("div",{className:(0,n.A)("col","col--8",J),children:!!y.totalResults&&h(y.totalResults)}),(0,re.jsxs)("div",{className:(0,n.A)("col","col--4",U),children:[(0,re.jsx)("span",{children:(0,k.T)({id:"theme.SearchPage.algoliaLabel",message:"Powered by",description:"The text explain that the search powered by Algolia"})}),(0,re.jsx)(N.A,{to:"https://www.algolia.com/","aria-label":(0,k.T)({id:"theme.SearchPage.algoliaLabel",message:"Powered by Algolia",description:"The description label for Algolia mention"}),children:(0,re.jsx)(ne,{})})]})]}),y.items.length>0?(0,re.jsx)("main",{children:y.items.map((e,t)=>{let r=e.title,i=e.url,s=e.summary,a=e.breadcrumbs;return(0,re.jsxs)("article",{className:Z,children:[(0,re.jsx)(M.A,{as:"h2",className:z,children:(0,re.jsx)(N.A,{to:i,dangerouslySetInnerHTML:{__html:r}})}),a.length>0&&(0,re.jsx)("nav",{"aria-label":"breadcrumbs",children:(0,re.jsx)("ul",{className:(0,n.A)("breadcrumbs",K),children:a.map((e,t)=>(0,re.jsx)("li",{className:"breadcrumbs__item",dangerouslySetInnerHTML:{__html:e}},t))})}),s&&(0,re.jsx)("p",{className:G,dangerouslySetInnerHTML:{__html:s}})]},t)})}):[d&&!y.loading&&(0,re.jsx)("p",{children:(0,re.jsx)(k.A,{id:"theme.SearchPage.noResultsText",description:"The paragraph for empty search result",children:"No results were found"})},"no-results"),!!y.loading&&(0,re.jsx)("div",{className:ee},"spinner")],y.hasMore&&(0,re.jsx)("div",{className:te,ref:P,children:(0,re.jsx)(k.A,{id:"theme.SearchPage.fetchingNewResults",description:"The paragraph for fetching new search results",children:"Fetching new results..."})})]})]})}function ae(){return(0,re.jsx)(D.e3,{className:"search-page-wrapper",children:(0,re.jsx)(se,{})})}}}]); \ No newline at end of file diff --git a/assets/js/1b1c4260.5f9e1141.js b/assets/js/1b1c4260.5f9e1141.js new file mode 100644 index 000000000..6a4e06d83 --- /dev/null +++ b/assets/js/1b1c4260.5f9e1141.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[1406],{14178(e,t,s){s.r(t),s.d(t,{assets:()=>o,contentTitle:()=>a,default:()=>u,frontMatter:()=>r,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"develop/tools-and-features/ai-agent-skills","title":"AI Agent Skills","description":"Interactive Claude Code skills that guide you through setting up Bee and building on Swarm.","source":"@site/docs/develop/tools-and-features/ai-agent-skills.md","sourceDirName":"develop/tools-and-features","slug":"/develop/tools-and-features/ai-agent-skills","permalink":"/docs/develop/tools-and-features/ai-agent-skills","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/develop/tools-and-features/ai-agent-skills.md","tags":[],"version":"current","frontMatter":{"title":"AI Agent Skills","id":"ai-agent-skills","description":"Interactive Claude Code skills that guide you through setting up Bee and building on Swarm."},"sidebar":"develop","previous":{"title":"Overview","permalink":"/docs/develop/tools-and-features/introduction"},"next":{"title":"Swarm Cheatsheet","permalink":"/docs/develop/tools-and-features/cheatsheets"}}');var i=s(74848),l=s(28453);const r={title:"AI Agent Skills",id:"ai-agent-skills",description:"Interactive Claude Code skills that guide you through setting up Bee and building on Swarm."},a=void 0,o={},d=[{value:"Requirements",id:"requirements",level:2},{value:"Install",id:"install",level:2}];function c(e){const t={a:"a",code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,l.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.a,{href:"https://github.com/ethersphere/swarm-quickstart-skills",children:"Swarm Quickstart Skills"}),'\nis a set of interactive guides ("skills") that run inside\n',(0,i.jsx)(t.a,{href:"https://claude.com/product/claude-code",children:"Claude Code"}),". Instead of copying commands from\nthe docs by hand, the skills check your prerequisites first, run real commands\nagainst your Bee node, and explain what is happening at each step. Type ",(0,i.jsx)(t.code,{children:"/swarm"}),"\nand you are routed to the right next step for your current setup \u2014 installing a\nnode, buying a postage stamp, uploading files, or scaffolding a dApp."]}),"\n",(0,i.jsx)(t.h2,{id:"requirements",children:"Requirements"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"https://claude.com/product/claude-code",children:"Claude Code"})}),"\n",(0,i.jsx)(t.li,{children:"Node.js 18+"}),"\n",(0,i.jsxs)(t.li,{children:["A running Bee light node at ",(0,i.jsx)(t.code,{children:"http://localhost:1633"})," (for most skills)","\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:["The\neasiest way to install is to run ",(0,i.jsx)(t.code,{children:"/swarm"})," in Claude Code, which installs and starts a\nlight node for you."]}),"\n",(0,i.jsxs)(t.li,{children:["Alternatively, check out the\n",(0,i.jsx)(t.a,{href:"/docs/bee/installation/quick-start",children:"quick start"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(t.h2,{id:"install",children:"Install"}),"\n",(0,i.jsxs)(t.p,{children:["Clone the repo and copy the ",(0,i.jsx)(t.code,{children:".claude/"})," folder into your project:"]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-bash",children:"git clone https://github.com/ethersphere/swarm-quickstart-skills.git\ncp -r swarm-quickstart-skills/.claude/ /path/to/your-project/\n"})}),"\n",(0,i.jsx)(t.p,{children:"Then open Claude Code in your project and start with the entry point:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-bash",children:"cd your-project && claude\n"})}),"\n",(0,i.jsxs)(t.p,{children:["Type ",(0,i.jsx)(t.code,{children:"/swarm"})," to begin. See the\n",(0,i.jsx)(t.a,{href:"https://github.com/ethersphere/swarm-quickstart-skills",children:"swarm-quickstart-skills repository"}),"\nfor the full list of available skills."]}),"\n",(0,i.jsxs)(t.p,{children:["For a programmatic alternative aimed at agents, see the\n",(0,i.jsx)(t.a,{href:"https://github.com/ethersphere/swarm-mcp",children:"swarm-mcp"})," MCP server."]})]})}function u(e={}){const{wrapper:t}={...(0,l.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},28453(e,t,s){s.d(t,{R:()=>r,x:()=>a});var n=s(96540);const i={},l=n.createContext(i);function r(e){const t=n.useContext(l);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),n.createElement(l.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1c690199.9511ba9c.js b/assets/js/1c690199.9511ba9c.js new file mode 100644 index 000000000..bef91aa0d --- /dev/null +++ b/assets/js/1c690199.9511ba9c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[3047],{51340(e,r,n){n.r(r),n.d(r,{assets:()=>l,contentTitle:()=>i,default:()=>h,frontMatter:()=>a,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"bee/working-with-bee/backups","title":"Backups","description":"Details critical backup procedures for keys password and node data across various installation methods and platforms.","source":"@site/docs/bee/working-with-bee/backups.md","sourceDirName":"bee/working-with-bee","slug":"/bee/working-with-bee/backups","permalink":"/docs/bee/working-with-bee/backups","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/bee/working-with-bee/backups.md","tags":[],"version":"current","frontMatter":{"title":"Backups","id":"backups","description":"Details critical backup procedures for keys password and node data across various installation methods and platforms."},"sidebar":"bee","previous":{"title":"Monitoring Your Node","permalink":"/docs/bee/working-with-bee/monitoring"},"next":{"title":"Upgrading Bee","permalink":"/docs/bee/working-with-bee/upgrading-bee"}}');var s=n(74848),t=n(28453);n(4865),n(19365);const a={title:"Backups",id:"backups",description:"Details critical backup procedures for keys password and node data across various installation methods and platforms."},i=void 0,l={},d=[{value:"Bee Files",id:"bee-files",level:2},{value:"Statestore and Localstore.",id:"statestore-and-localstore",level:3},{value:"Stamperstore",id:"stamperstore",level:3},{value:"Keys",id:"keys",level:3},{value:"Data Directory Structure",id:"data-directory-structure",level:3},{value:"Data Directory Locations",id:"data-directory-locations",level:2},{value:"apt and yum / rpm Package Managers",id:"apt-and-yum--rpm-package-managers",level:3},{value:"Homebrew (amd64)",id:"homebrew-amd64",level:3},{value:"Homebrew (arm64)",id:"homebrew-arm64",level:3},{value:"scoop Package Manager",id:"scoop-package-manager",level:3},{value:"Shell Script & Binary Install",id:"shell-script--binary-install",level:3},{value:"Docker",id:"docker",level:3},{value:"Back-up your node data",id:"back-up-your-node-data",level:2},{value:"Back-up your password",id:"back-up-your-password",level:2},{value:"Back-up blockchain keys only",id:"back-up-blockchain-keys-only",level:2},{value:"Metamask Import",id:"metamask-import",level:2},{value:"View key and password for wallet import",id:"view-key-and-password-for-wallet-import",level:2},{value:"Get private key from keystore and password",id:"get-private-key-from-keystore-and-password",level:2},{value:"Restore from backup",id:"restore-from-backup",level:2}];function c(e){const r={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(r.p,{children:["Backing up your Bee node involves copying and saving files from the data directory specified in the ",(0,s.jsx)(r.code,{children:"dat-dir"})," configuration option, along with the node's password. The details of where and how this option is specified will vary depending on the type of ",(0,s.jsx)(r.a,{href:"/docs/bee/working-with-bee/configuration",children:"configuration method"})," used (YAML file, command line flag, or environment variable)."]}),"\n",(0,s.jsxs)(r.admonition,{type:"caution",children:[(0,s.jsxs)(r.p,{children:["A node's password may be specified in several different locations. It can be specified either through the ",(0,s.jsx)(r.code,{children:"password"})," option or the ",(0,s.jsx)(r.code,{children:"password-file"})," option. For a backup, you will need to either copy the ",(0,s.jsx)(r.code,{children:"password"})," option value, or copy the file itself from the location specified by the ",(0,s.jsx)(r.code,{children:"password-file"})," option."]}),(0,s.jsx)(r.p,{children:"Don't forget - it's not a backup until you're sure the backup files work! Make sure to test restoring from backup files and password to prevent loss of assets due to data loss or corruption."})]}),"\n",(0,s.jsx)(r.h2,{id:"bee-files",children:"Bee Files"}),"\n",(0,s.jsxs)(r.p,{children:["A full Bee node backup includes the ",(0,s.jsx)(r.code,{children:"keys"}),", ",(0,s.jsx)(r.code,{children:"localstore"}),", ",(0,s.jsx)(r.code,{children:"stamperstore"}),", ",(0,s.jsx)(r.code,{children:"statestore"}),", and ",(0,s.jsx)(r.code,{children:"password"})," files. The node should be stopped before taking a backup and not restarted until restoring the node from the backup to prevent the node from getting out of sync with the network."]}),"\n",(0,s.jsxs)(r.p,{children:["Key data from the ",(0,s.jsx)(r.code,{children:"keys"})," directory allows access to Bee node's Gnosis account (provided that you have also made sure to back the password for your keys). If your keys and password are lost or stolen it could lead to the loss of all assets in that account. The ",(0,s.jsx)(r.code,{children:"stamperstore"})," contains postage stamp data. If lost, previously purchased postage stamps will become unusable."]}),"\n",(0,s.jsx)(r.h3,{id:"statestore-and-localstore",children:"Statestore and Localstore."}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.code,{children:"statestore"})," retains data related to its operation, and the ",(0,s.jsx)(r.code,{children:"localstore"})," contains chunks locally which are frequently requested, pinned in the node, or are in the node's neighborhood of responsibility."]}),"\n",(0,s.jsx)(r.admonition,{type:"info",children:(0,s.jsxs)(r.p,{children:["As the data in ",(0,s.jsx)(r.code,{children:"statestore"})," and ",(0,s.jsx)(r.code,{children:"localstore"})," continually changes during normal operation of a node, when taking a backup the node should first be stopped and not re-connected to the Swarm network until restoring from the backup (otherwise the ",(0,s.jsx)(r.code,{children:"statestore"})," and ",(0,s.jsx)(r.code,{children:"localstore"})," files will get out of sync with the network). It is possible to restore using out of sync ",(0,s.jsx)(r.code,{children:"statestore"})," and ",(0,s.jsx)(r.code,{children:"localstore"})," files, however it may lead to data loss or unexpected behavior related to chunk uploads, postage stamps, and more."]})}),"\n",(0,s.jsx)(r.h3,{id:"stamperstore",children:"Stamperstore"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.code,{children:"stamperstore"})," contains postage stamp batch related data, and so is important to include in your backup if you have purchased any postage batches which you wish to continue using."]}),"\n",(0,s.jsx)(r.h3,{id:"keys",children:"Keys"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.code,{children:"keys"})," directory contains the following key files:"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.code,{children:"libp2p.key"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.code,{children:"libp2p_v2.key"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.code,{children:"pss.key"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.code,{children:"swarm.key"})}),"\n"]}),"\n",(0,s.jsx)(r.p,{children:"These keys are generated during the Bee node's initialisation and are required for maintaining access to your node."}),"\n",(0,s.jsx)(r.admonition,{type:"danger",children:(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.code,{children:"swarm.key"})," file grants full control over your node's Gnosis Chain account. If lost, you cannot recover funds. If stolen, your assets can be drained."]})}),"\n",(0,s.jsx)(r.admonition,{type:"info",children:(0,s.jsxs)(r.p,{children:["To use ",(0,s.jsx)(r.code,{children:"swarm.key"})," to manage the Gnosis account for a node through Metamask or other wallets, ",(0,s.jsx)(r.a,{href:"https://github.com/ethersphere/exportSwarmKey",children:"exportSwarmKeys"})," can be used to convert ",(0,s.jsx)(r.code,{children:"swarm.key"})," to a compatible format."]})}),"\n",(0,s.jsx)(r.h3,{id:"data-directory-structure",children:"Data Directory Structure"}),"\n",(0,s.jsx)(r.p,{children:"The data directory contains four directories. Its default location depends on the node install method and startup method used."}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{children:"\u251c\u2500\u2500 kademlia-metrics\n\u2502\xa0\xa0 \u2514\u2500\u2500 ...\n\u251c\u2500\u2500 keys\n\u2502\xa0\xa0 \u251c\u2500\u2500 libp2p.key\n\u2502\xa0\xa0 \u251c\u2500\u2500 libp2p_v2.key\n\u2502\xa0\xa0 \u251c\u2500\u2500 pss.key\n\u2502\xa0\xa0 \u2514\u2500\u2500 swarm.key\n\u251c\u2500\u2500 localstore\n\u2502\xa0\xa0 \u251c\u2500\u2500 indexstore\n\u2502\xa0\xa0 \u2514\u2500\u2500 sharky\n\u251c\u2500\u2500 password\n\u251c\u2500\u2500 stamperstore\n\u2502\xa0\xa0 \u2514\u2500\u2500 ...\n\u2514\u2500\u2500 statestore\n\u2502\xa0\xa0 \u2514\u2500\u2500 ...\n"})}),"\n",(0,s.jsx)(r.h2,{id:"data-directory-locations",children:"Data Directory Locations"}),"\n",(0,s.jsx)(r.p,{children:"The default data directory for your Bee node will depend on the installation method used."}),"\n",(0,s.jsxs)(r.admonition,{type:"caution",children:[(0,s.jsxs)(r.p,{children:["If Bee is installed to run as a service using a package manager such as ",(0,s.jsx)(r.code,{children:"apt"})," or ",(0,s.jsx)(r.code,{children:"yum"}),", then it can be started using your system's services manager such as ",(0,s.jsx)(r.code,{children:"systemctl"})," using a command like ",(0,s.jsx)(r.code,{children:"systemctl start bee"}),". However, after installing with a package manager, Bee can also by started using the ",(0,s.jsx)(r.code,{children:"bee start"})," command used for running Bee with a shell script / binary install. When the ",(0,s.jsx)(r.code,{children:"bee start"})," command is run, it will create a SECOND data directory alongside the default data directory for your package manager at the same directory it would for the shell script installation:"]}),(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{children:"/home//.bee\n"})}),(0,s.jsxs)(r.p,{children:["In that case, you would have two separate data directories in two different locations, and the directory used will depend on whether you start your node using a service manager like ",(0,s.jsx)(r.code,{children:"systemctl"})," or the ",(0,s.jsx)(r.code,{children:"bee start"})," command."]}),(0,s.jsx)(r.p,{children:"If you installed Bee via a package manager but sometimes start it manually, you may have two separate data directories:"}),(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["System service (",(0,s.jsx)(r.code,{children:"systemctl start bee"}),") \u2192 Uses ",(0,s.jsx)(r.code,{children:"/var/lib/bee"}),"."]}),"\n",(0,s.jsxs)(r.li,{children:["Manual start (",(0,s.jsx)(r.code,{children:"bee start"}),") \u2192 Uses ",(0,s.jsx)(r.code,{children:"/home//.bee"}),"."]}),"\n"]}),(0,s.jsx)(r.p,{children:(0,s.jsxs)(r.em,{children:["The exact directory will differ depending on your system. See ",(0,s.jsx)(r.a,{href:"/docs/bee/working-with-bee/configuration#default-data-and-config-directories",children:"Configuration page"}),"."]})})]}),"\n",(0,s.jsxs)(r.h3,{id:"apt-and-yum--rpm-package-managers",children:[(0,s.jsx)(r.em,{children:"apt"})," and ",(0,s.jsx)(r.em,{children:"yum / rpm"})," Package Managers"]}),"\n",(0,s.jsxs)(r.p,{children:["Default ",(0,s.jsx)(r.code,{children:"data-dir"})," location:"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{children:"/var/lib/bee\n"})}),"\n",(0,s.jsx)(r.h3,{id:"homebrew-amd64",children:"Homebrew (amd64)"}),"\n",(0,s.jsxs)(r.p,{children:["Default ",(0,s.jsx)(r.code,{children:"data-dir"})," location:"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{children:"/usr/local/var/lib/swarm-bee\n"})}),"\n",(0,s.jsx)(r.h3,{id:"homebrew-arm64",children:"Homebrew (arm64)"}),"\n",(0,s.jsxs)(r.p,{children:["Default ",(0,s.jsx)(r.code,{children:"data-dir"})," location:"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{children:"/opt/homebrew/var/lib/swarm-bee\n"})}),"\n",(0,s.jsxs)(r.h3,{id:"scoop-package-manager",children:[(0,s.jsx)(r.em,{children:"scoop"})," Package Manager"]}),"\n",(0,s.jsxs)(r.p,{children:["Default ",(0,s.jsx)(r.code,{children:"data-dir"})," location:"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{children:"./data\n"})}),"\n",(0,s.jsx)(r.h3,{id:"shell-script--binary-install",children:"Shell Script & Binary Install"}),"\n",(0,s.jsxs)(r.p,{children:["If you installed Bee using the ",(0,s.jsx)(r.a,{href:"/docs/bee/installation/shell-script-install",children:"automated shell script"})," or by ",(0,s.jsx)(r.a,{href:"/docs/bee/installation/build-from-source",children:"building Bee from source"}),", your data directory will typically be located at:"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",children:"/home//.bee\n"})}),"\n",(0,s.jsx)(r.h3,{id:"docker",children:"Docker"}),"\n",(0,s.jsxs)(r.p,{children:["Default ",(0,s.jsx)(r.code,{children:"data-dir"})," location:"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{children:"/home/bee/.bee\n"})}),"\n",(0,s.jsx)(r.h2,{id:"back-up-your-node-data",children:"Back-up your node data"}),"\n",(0,s.jsxs)(r.p,{children:["Copy entire ",(0,s.jsx)(r.code,{children:"bee"})," data folder to create a full backup. This will do a full backup of ",(0,s.jsx)(r.code,{children:"kademlia-metrics"}),", ",(0,s.jsx)(r.code,{children:"keys"}),", ",(0,s.jsx)(r.code,{children:"statestore"}),", ",(0,s.jsx)(r.code,{children:"stamperstore"}),", ",(0,s.jsx)(r.code,{children:"password"}),", and ",(0,s.jsx)(r.code,{children:"localstore"}),", files into a newly created ",(0,s.jsx)(r.code,{children:"/backup"})," directory. Make sure to save the backup directory to a safe location."]}),"\n",(0,s.jsx)(r.admonition,{type:"tip",children:(0,s.jsxs)(r.p,{children:["For a more lightweight backup, you can remove ",(0,s.jsx)(r.code,{children:"localstore"})," and ",(0,s.jsx)(r.code,{children:"localstore"}),". You can safely restore your node from the remaining files."]})}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{children:"mkdir backup\nsudo cp -r /var/lib/bee/ backup\n"})}),"\n",(0,s.jsx)(r.h2,{id:"back-up-your-password",children:"Back-up your password"}),"\n",(0,s.jsxs)(r.p,{children:["Depending on your ",(0,s.jsx)(r.a,{href:"/docs/bee/working-with-bee/configuration",children:"configuration"})," method, your password may be located in a variety of different locations. If you use a ",(0,s.jsx)(r.code,{children:".yaml"})," file for your configuration, then it might be found directly under the ",(0,s.jsx)(r.code,{children:"password"})," option, or it could be that the location of your password file is recorded by the ",(0,s.jsx)(r.code,{children:"password-file"})," option. In either case, make sure to record the password somewhere safe or include the password file as a part of your backup."]}),"\n",(0,s.jsxs)(r.p,{children:["The same applies to other configuration methods. If you use environment variables for specifying your configuration options, your password itself will likely be specified in a ",(0,s.jsx)(r.code,{children:".env"})," file somewhere which contains either the password itself in the ",(0,s.jsx)(r.code,{children:"BEE_PASSWORD"})," variable or the location of your password file in the ",(0,s.jsx)(r.code,{children:"BEE_PASSWORD_FILE"})," variable."]}),"\n",(0,s.jsxs)(r.p,{children:["The same again holds true for the command line flag method. Make sure you have the password you use with the ",(0,s.jsx)(r.code,{children:"--password"})," command line flag or the password file specified by the ",(0,s.jsx)(r.code,{children:"--password-file"})," flag saved in your backup."]}),"\n",(0,s.jsx)(r.h2,{id:"back-up-blockchain-keys-only",children:"Back-up blockchain keys only"}),"\n",(0,s.jsxs)(r.p,{children:["If you only need to export your node's blockchain keys, you need to export the ",(0,s.jsx)(r.code,{children:"swarm.key"})," UTC / JSON keystore file and the ",(0,s.jsx)(r.code,{children:"password"})," file used to encrypt it. First create a directory for your keys and then copy your keys to that directory."]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",children:"mkdir keystore\nsudo cp -r /var/lib/bee/keys/swarm.key /var/lib/bee/password keystore \n"})}),"\n",(0,s.jsx)(r.h2,{id:"metamask-import",children:"Metamask Import"}),"\n",(0,s.jsxs)(r.p,{children:["If you wish to import your Bee node\u2019s Gnosis Chain account into Metamask, find your ",(0,s.jsx)(r.code,{children:"swarm.key"})," and ",(0,s.jsx)(r.code,{children:"password"}),", then follow these steps:"]}),"\n",(0,s.jsx)(r.h2,{id:"view-key-and-password-for-wallet-import",children:"View key and password for wallet import"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",children:"sudo cat /var/lib/bee/keys/swarm.key \nsudo cat /var/lib/bee/password\n"})}),"\n",(0,s.jsx)(r.admonition,{type:"info",children:(0,s.jsxs)(r.p,{children:["Note that ",(0,s.jsx)(r.code,{children:"swarm.key"})," is in UTC / JSON keystores format and is encrypted by default by your password file inside the ",(0,s.jsx)(r.code,{children:"/bee"})," directory. Make sure to export both the ",(0,s.jsx)(r.code,{children:"swarm.key"})," file and the ",(0,s.jsx)(r.code,{children:"password"})," file in order to secure your wallet. If you need your private key exported from the keystore file, you may use one of a variety of Ethereum wallets which support exporting private keys from UTC files (such as ",(0,s.jsx)(r.a,{href:"https://metamask.io/",children:"Metamask"}),", however we offer no guarantees for any software, make sure you trust it completely before using it)."]})}),"\n",(0,s.jsx)(r.h2,{id:"get-private-key-from-keystore-and-password",children:"Get private key from keystore and password"}),"\n",(0,s.jsx)(r.p,{children:"To import to Metamask:"}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["View and copy the contents of your exported ",(0,s.jsx)(r.code,{children:"swarm.key"})," and ",(0,s.jsx)(r.code,{children:"password"})," files"]}),"\n",(0,s.jsx)(r.li,{children:'Go to Metamask and click "Account 1" --\x3e "Import Account"'}),"\n",(0,s.jsx)(r.li,{children:'Choose the "Select Type" dropdown menu and choose "JSON file"'}),"\n",(0,s.jsx)(r.li,{children:"Paste the password (Make sure to do this first)"}),"\n",(0,s.jsx)(r.li,{children:"Upload exported JSON file"}),"\n",(0,s.jsx)(r.li,{children:'Click "Import"'}),"\n"]}),"\n",(0,s.jsx)(r.p,{children:"To export your private key:"}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsx)(r.li,{children:'Go to Metamask and click "Account 1" to view the dropdown menu of all accounts'}),"\n",(0,s.jsx)(r.li,{children:"Click the three dots next to the account you want to export"}),"\n",(0,s.jsx)(r.li,{children:'Click "Account details"'}),"\n",(0,s.jsx)(r.li,{children:'Click "Show private key"'}),"\n",(0,s.jsx)(r.li,{children:"Enter your Metamask password (not your keystore password)"}),"\n",(0,s.jsx)(r.li,{children:"Copy your private key to a safe location"}),"\n"]}),"\n",(0,s.jsx)(r.h2,{id:"restore-from-backup",children:"Restore from backup"}),"\n",(0,s.jsx)(r.admonition,{type:"danger",children:(0,s.jsx)(r.p,{children:"Before restoring, make sure to check for any old node data from a previous node which has not yet been backed up, and back it up if needed."})}),"\n",(0,s.jsx)(r.admonition,{type:"tip",children:(0,s.jsxs)(r.p,{children:["The specific directories and commands for restoring will depend on which install method and system is used. The instructions below are for a Linux package manager based installation. See the ",(0,s.jsx)(r.a,{href:"/docs/bee/working-with-bee/configuration#default-data-and-config-directories",children:"configuration section"})," more more details about default file locations."]})}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["After ",(0,s.jsx)(r.a,{href:"/docs/bee/working-with-bee/uninstalling-bee",children:"uninstalling"})," any existing Bee installations, perform a new ",(0,s.jsx)(r.a,{href:"/docs/bee/installation/getting-started#installation-methods",children:"installation"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsx)(r.p,{children:"Remove any existing Bee node data before restoring. This prevents conflicts with old files:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{children:"sudo rm -r /var/lib/bee\n"})}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsx)(r.p,{children:"Navigate to backup directory and copy files to data folder."}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{children:"sudo cp -r //. /var/lib/bee\n"})}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsx)(r.p,{children:"Revert ownership of the data folder."}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{children:"sudo chown -R bee:bee /var/lib/bee\n"})}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Restart ",(0,s.jsx)(r.code,{children:"bee"})," and check logs."]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{children:"sudo systemctl restart bee\nsudo journalctl --lines=100 --follow --unit bee \n"})}),"\n"]}),"\n"]})]})}function h(e={}){const{wrapper:r}={...(0,t.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},19365(e,r,n){n.d(r,{A:()=>l});n(96540);var o=n(34164),s=n(47751);const t="tabItem_Ymn6";var a=n(74848);function i(e){let r=e.children,n=e.className,s=e.hidden;return(0,a.jsx)("div",{role:"tabpanel",className:(0,o.A)(t,n),hidden:s,children:r})}function l(e){let r=e.children,n=e.className,o=e.value;const t=(0,s.uc)(),l=t.selectedValue,d=t.lazy,c=o===l;return!c&&d?null:(0,a.jsx)(i,{className:n,hidden:!c,children:r})}},4865(e,r,n){n.d(r,{A:()=>m});n(96540);var o=n(34164),s=n(17559),t=n(47751),a=n(23104),i=n(92303);const l="tabList__CuJ",d="tabItem_LNqP";var c=n(74848);function h(e){let r=e.className;const n=(0,t.uc)(),s=n.selectedValue,i=n.selectValue,l=n.tabValues,h=n.block,u=[],p=(0,a.a_)().blockElementScrollPositionUntilNextRender,m=e=>{const r=e.currentTarget,n=u.indexOf(r),o=l[n].value;o!==s&&(p(r),i(o))},f=e=>{var r;let n=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{var o;const r=u.indexOf(e.currentTarget)+1;n=null!=(o=u[r])?o:u[0];break}case"ArrowLeft":{var s;const r=u.indexOf(e.currentTarget)-1;n=null!=(s=u[r])?s:u[u.length-1];break}}null==(r=n)||r.focus()};return(0,c.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.A)("tabs",{"tabs--block":h},r),children:l.map(e=>{let r=e.value,n=e.label,t=e.attributes;return(0,c.jsx)("li",Object.assign({role:"tab",tabIndex:s===r?0:-1,"aria-selected":s===r,ref:e=>{u.push(e)},onKeyDown:f,onClick:m},t,{className:(0,o.A)("tabs__item",d,null==t?void 0:t.className,{"tabs__item--active":s===r}),children:null!=n?n:r}),r)})})}function u(e){let r=e.children;return(0,c.jsx)("div",{className:"margin-top--md",children:r})}function p(e){let r=e.className,n=e.children;return(0,c.jsxs)("div",{className:(0,o.A)(s.G.tabs.container,"tabs-container",l),children:[(0,c.jsx)(h,{className:r}),(0,c.jsx)(u,{children:n})]})}function m(e){const r=(0,i.A)(),n=(0,t.OC)(e);return(0,c.jsx)(t.O_,{value:n,children:(0,c.jsx)(p,{className:e.className,children:(0,t.vT)(e.children)})},String(r))}},47751(e,r,n){n.d(r,{OC:()=>m,O_:()=>x,uc:()=>y,vT:()=>c});var o=n(96540),s=n(56347),t=n(205),a=n(57485),i=n(70679),l=n(31682),d=n(74848);function c(e){return o.Children.toArray(e).filter(e=>"\n"!==e)}function h(e){const r=e.values,n=e.children;return(0,o.useMemo)(()=>{const e=null!=r?r:function(e){return o.Children.toArray(e).flatMap(e=>{if(!e)return[];if((0,o.isValidElement)(e)&&function(e){const r=e.props;return!!r&&"object"==typeof r&&"value"in r}(e))return[e];const r="string"==typeof e.type?e.type:e.type.name;throw new Error("Docusaurus error: Bad child <"+r+'>: all children of the component should be , and every should have a unique "value" prop.\nIf you do not want to pass on a "value" prop to the direct children of , you can also pass an explicit prop.')}).map(e=>{let r=e.props;return{value:r.value,label:r.label,attributes:r.attributes,default:r.default}})}(n);return function(e){const r=(0,l.XI)(e,(e,r)=>e.value===r.value);if(r.length>0)throw new Error('Docusaurus error: Duplicate values "'+r.map(e=>"'"+e.value+"'").join(", ")+'" found in . Every value needs to be unique.')}(e),e},[r,n])}function u(e){let r=e.value;return e.tabValues.some(e=>e.value===r)}function p(e){let r=e.queryString,n=void 0!==r&&r,t=e.groupId;const i=(0,s.W6)(),l=function(e){let r=e.queryString,n=void 0!==r&&r,o=e.groupId;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!o)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=o?o:null}({queryString:n,groupId:t});return[(0,a.aZ)(l),(0,o.useCallback)(e=>{if(!l)return;const r=new URLSearchParams(i.location.search);r.set(l,e),i.replace(Object.assign({},i.location,{search:r.toString()}))},[l,i])]}function m(e){var r,n;const s=e.defaultValue,a=e.queryString,l=void 0!==a&&a,d=e.groupId,c=h(e),m=(0,o.useState)(()=>function(e){var r;let n=e.defaultValue,o=e.tabValues;if(0===o.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!u({value:n,tabValues:o}))throw new Error('Docusaurus error: The has a defaultValue "'+n+'" but none of its children has the corresponding value. Available values are: '+o.map(e=>e.value).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return n}const s=null!=(r=o.find(e=>e.default))?r:o[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:s,tabValues:c})),f=m[0],y=m[1],x=p({queryString:l,groupId:d}),b=x[0],j=x[1],k=function(e){const r=function(e){return e?"docusaurus.tab."+e:null}(e.groupId),n=(0,i.Dv)(r),s=n[0],t=n[1];return[s,(0,o.useCallback)(e=>{r&&t.set(e)},[r,t])]}({groupId:d}),w=k[0],g=k[1],v=(()=>{const e=null!=b?b:w;return u({value:e,tabValues:c})?e:null})();(0,t.A)(()=>{v&&y(v)},[v]);return{selectedValue:f,selectValue:(0,o.useCallback)(e=>{if(!u({value:e,tabValues:c}))throw new Error("Can't select invalid tab value="+e);y(e),j(e),g(e)},[j,g,c]),tabValues:c,lazy:null!=(r=e.lazy)&&r,block:null!=(n=e.block)&&n}}const f=(0,o.createContext)(null);function y(){const e=o.useContext(f);if(!e)throw new Error("useTabsContext() must be used within a Tabs component");return e}function x(e){return(0,d.jsx)(f.Provider,{value:e.value,children:e.children})}},28453(e,r,n){n.d(r,{R:()=>a,x:()=>i});var o=n(96540);const s={},t=o.createContext(s);function a(e){const r=o.useContext(t);return o.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function i(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),o.createElement(t.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/200.9b1a354e.js b/assets/js/200.9b1a354e.js new file mode 100644 index 000000000..0094d0257 --- /dev/null +++ b/assets/js/200.9b1a354e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[200],{60200(e,r,a){a.d(r,{diagram:()=>m});var t=a(19279),n=a(77454),l=(a(5637),a(76385),a(31293)),s=a(86827),i=a(78731),o=(0,i.lz)().Railroad.parser.LangiumParser,p=(0,s.K)(e=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{const r=e.elements.map(p);return 1===r.length?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{const r=e.alternatives.map(p);return 1===r.length?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:p(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:p(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:p(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),d=(0,s.K)(e=>({name:e.name,definition:p(e.definition)}),"transformRule"),u=(0,s.K)(e=>{(0,n.S)(e,t.db),e.title&&t.db.setTitle(e.title),e.rules.map(e=>t.db.addRule(d(e)))},"populateDb"),m={parser:{parse:(0,s.K)(e=>{t.db.clear(),l.R.debug("[Railroad Parser] Starting Langium parse");const r=o.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new i.zg(r);const a=r.value;l.R.debug("[Railroad Parser] Parsed rules:",a.rules.length),u(a),l.R.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:t.db}},db:t.db,renderer:t.U,styles:t.$}}}]); \ No newline at end of file diff --git a/assets/js/211ef201.2265f032.js b/assets/js/211ef201.2265f032.js new file mode 100644 index 000000000..067f9bdd2 --- /dev/null +++ b/assets/js/211ef201.2265f032.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[6635],{87396(e,t,r){r.r(t),r.d(t,{assets:()=>o,contentTitle:()=>d,default:()=>l,frontMatter:()=>a,metadata:()=>n,toc:()=>i});const n=JSON.parse('{"id":"desktop/backup-restore","title":"Backup and Restore","description":"Back up and restore your Bee node\'s wallet keys and data in the Swarm Desktop app.","source":"@site/docs/desktop/backup-restore.md","sourceDirName":"desktop","slug":"/desktop/backup-restore","permalink":"/docs/desktop/backup-restore","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/desktop/backup-restore.md","tags":[],"version":"current","frontMatter":{"title":"Backup and Restore","id":"backup-restore","description":"Back up and restore your Bee node\'s wallet keys and data in the Swarm Desktop app."},"sidebar":"desktop","previous":{"title":"Upload Content","permalink":"/docs/desktop/upload-content"},"next":{"title":"Publish a Website","permalink":"/docs/desktop/publish-a-website"}}');var c=r(74848),s=r(28453);const a={title:"Backup and Restore",id:"backup-restore",description:"Back up and restore your Bee node's wallet keys and data in the Swarm Desktop app."},d=void 0,o={},i=[{value:"Create a Backup",id:"create-a-backup",level:2},{value:"Back-up Gnosis Chain Key Only",id:"back-up-gnosis-chain-key-only",level:3},{value:"Restore from Backup",id:"restore-from-backup",level:2},{value:"Restore Gnosis Chain Account",id:"restore-gnosis-chain-account",level:3}];function u(e){const t={a:"a",code:"code",h2:"h2",h3:"h3",img:"img",p:"p",...(0,s.R)(),...e.components};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(t.h2,{id:"create-a-backup",children:"Create a Backup"}),"\n",(0,c.jsx)(t.p,{children:"To create a backup of your Bee node in Swarm Desktop, start by shutting down your node."}),"\n",(0,c.jsxs)(t.p,{children:["Right click the Bee icon in the System tray and select ",(0,c.jsx)(t.code,{children:"Stop Bee"})," and then ",(0,c.jsx)(t.code,{children:"Quit"})," to close and exit from Swarm Desktop:"]}),"\n",(0,c.jsx)(t.p,{children:(0,c.jsx)(t.img,{src:r(51419).A+"",width:"343",height:"502"})}),"\n",(0,c.jsxs)(t.p,{children:["Next navigate to the ",(0,c.jsx)(t.code,{children:"Settings"})," tab in the app and copy the location of the data directory as indicated in the ",(0,c.jsx)(t.code,{children:"Data DIR"})," field:"]}),"\n",(0,c.jsx)(t.p,{children:(0,c.jsx)(t.img,{src:r(89440).A+"",width:"2541",height:"1165"})}),"\n",(0,c.jsxs)(t.p,{children:["Navigate to the directory you just copied and create copies of all the files in that directory (",(0,c.jsx)(t.code,{children:"\\data-dir"}),"), including ",(0,c.jsx)(t.code,{children:"localstore"}),", ",(0,c.jsx)(t.code,{children:"statestore"}),", ",(0,c.jsx)(t.code,{children:"stamperstore"}),", ",(0,c.jsx)(t.code,{children:"kademlia-metrics"})," and ",(0,c.jsx)(t.code,{children:"keys"})," folders and store them in a secure and private location."]}),"\n",(0,c.jsx)(t.p,{children:(0,c.jsx)(t.img,{src:r(27478).A+"",width:"952",height:"495"})}),"\n",(0,c.jsxs)(t.p,{children:["In addition to the data folders, you will also need the password found in the ",(0,c.jsx)(t.code,{children:"config.yaml"})," file in order to restore a Bee node from backup. Move up one directory from ",(0,c.jsx)(t.code,{children:"Data DIR"})," to the ",(0,c.jsx)(t.code,{children:"Data"})," directory, and create a copy of the ",(0,c.jsx)(t.code,{children:"config.yaml"})," file and save it along with the other folders you just backed up:"]}),"\n",(0,c.jsx)(t.p,{children:(0,c.jsx)(t.img,{src:r(41453).A+"",width:"903",height:"535"})}),"\n",(0,c.jsxs)(t.p,{children:["Alternatively you may open the ",(0,c.jsx)(t.code,{children:"config.yaml"})," and save the password as a text file along with the rest of your backup files:"]}),"\n",(0,c.jsx)(t.p,{children:(0,c.jsx)(t.img,{src:r(87556).A+"",width:"1272",height:"641"})}),"\n",(0,c.jsxs)(t.p,{children:["Your completed backup should contain all the files from your data directory as well as your password (either in your ",(0,c.jsx)(t.code,{children:"config.yaml"})," file or as a separate file or written down.)"]}),"\n",(0,c.jsx)(t.p,{children:(0,c.jsx)(t.img,{src:r(4785).A+"",width:"1081",height:"519"})}),"\n",(0,c.jsx)(t.h3,{id:"back-up-gnosis-chain-key-only",children:"Back-up Gnosis Chain Key Only"}),"\n",(0,c.jsxs)(t.p,{children:["If you only wish to back-up your Gnosis Chain key, navigate to the ",(0,c.jsx)(t.code,{children:"\\data-dir\\keys"})," directory, and copy the ",(0,c.jsx)(t.code,{children:"swarm.key"})," to a safe location:"]}),"\n",(0,c.jsx)(t.p,{children:(0,c.jsx)(t.img,{src:r(10920).A+"",width:"1135",height:"427"})}),"\n",(0,c.jsxs)(t.p,{children:["You also need the password found in the ",(0,c.jsx)(t.code,{children:"config.yaml"})," file in order to access your Gnosis Chain account. Move up one directory from ",(0,c.jsx)(t.code,{children:"Data DIR"})," to the ",(0,c.jsx)(t.code,{children:"Data"})," directory, and create a copy of the ",(0,c.jsx)(t.code,{children:"config.yaml"})," file and save it along with the other folders you just backed up:"]}),"\n",(0,c.jsx)(t.p,{children:(0,c.jsx)(t.img,{src:r(41453).A+"",width:"903",height:"535"})}),"\n",(0,c.jsxs)(t.p,{children:["Alternatively you may open the ",(0,c.jsx)(t.code,{children:"config.yaml"})," and save the password as a text file along with the rest of your backup files:"]}),"\n",(0,c.jsx)(t.p,{children:(0,c.jsx)(t.img,{src:r(87556).A+"",width:"1272",height:"641"})}),"\n",(0,c.jsx)(t.h2,{id:"restore-from-backup",children:"Restore from Backup"}),"\n",(0,c.jsxs)(t.p,{children:["To restore from backup, begin with a ",(0,c.jsx)(t.a,{href:"/docs/desktop/install",children:"new install"})," of Swarm Desktop. Once the installation process is finished, navigate to the ",(0,c.jsx)(t.code,{children:"Settings"})," tab in the app and copy the install file directory as indicated in the ",(0,c.jsx)(t.code,{children:"Data DIR"})," field:"]}),"\n",(0,c.jsx)(t.p,{children:(0,c.jsx)(t.img,{src:r(89440).A+"",width:"2541",height:"1165"})}),"\n",(0,c.jsxs)(t.p,{children:["Before navigating to the directory you just copied, right click the Bee icon in the System tray and select ",(0,c.jsx)(t.code,{children:"Stop Bee"})," and then ",(0,c.jsx)(t.code,{children:"Quit"})," to close and exit from Swarm Desktop:"]}),"\n",(0,c.jsx)(t.p,{children:(0,c.jsx)(t.img,{src:r(51419).A+"",width:"343",height:"502"})}),"\n",(0,c.jsxs)(t.p,{children:["Next open your file explorer and navigate to the directory you just copied. Delete any files present in the directory, and replace them with your own backup copies (excluding the ",(0,c.jsx)(t.code,{children:"config.yaml"})," / password file):"]}),"\n",(0,c.jsx)(t.p,{children:(0,c.jsx)(t.img,{src:r(27478).A+"",width:"952",height:"495"})}),"\n",(0,c.jsxs)(t.p,{children:["Move up one directory from ",(0,c.jsx)(t.code,{children:"Data DIR"})," to ",(0,c.jsx)(t.code,{children:"Data"}),", and replace delete the ",(0,c.jsx)(t.code,{children:"config.yaml"})," file and replace it with the ",(0,c.jsx)(t.code,{children:"config.yaml"})," file from your backup."]}),"\n",(0,c.jsxs)(t.p,{children:["Alternatively if you have saved just the password and not the entire config file, open the default ",(0,c.jsx)(t.code,{children:"config.yaml"})," file in a text editor such as VS Code or a plain text editor:"]}),"\n",(0,c.jsx)(t.p,{children:(0,c.jsx)(t.img,{src:r(41453).A+"",width:"903",height:"535"})}),"\n",(0,c.jsx)(t.p,{children:(0,c.jsx)(t.img,{src:r(87556).A+"",width:"1272",height:"641"})}),"\n",(0,c.jsxs)(t.p,{children:["Replace the ",(0,c.jsx)(t.code,{children:"password"})," string with your own password which you saved from the ",(0,c.jsx)(t.code,{children:"config.yaml"})," backup."]}),"\n",(0,c.jsx)(t.p,{children:"Restart Swarm Desktop and check to see if the backup was restored successfully:"}),"\n",(0,c.jsx)(t.p,{children:(0,c.jsx)(t.img,{src:r(40767).A+"",width:"2543",height:"1178"})}),"\n",(0,c.jsx)(t.h3,{id:"restore-gnosis-chain-account",children:"Restore Gnosis Chain Account"}),"\n",(0,c.jsxs)(t.p,{children:["If you only wish to access your Gnosis Chain account, you can ",(0,c.jsx)(t.a,{href:"/docs/bee/working-with-bee/backups#metamask-import",children:"follow these instructions"})," for exporting to Metamask in order to access your account."]})]})}function l(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,c.jsx)(t,{...e,children:(0,c.jsx)(u,{...e})}):u(e)}},89440(e,t,r){r.d(t,{A:()=>n});const n=r.p+"assets/images/backup1-8c46c0948fcd723ac14a532a1fb3adc8.png"},51419(e,t,r){r.d(t,{A:()=>n});const n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVcAAAH2CAMAAADzrz9hAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAG/UExURQAAAwIBBgQDCQUECgIAAgMCBwYFDRwcHCwsLCkqLQcFDQgGECkpKQkHEisrKwQDCAUEDAEABSUlJe0cJCoqKgcFDwUECygoKAAAASMjIycnJwkGFAMBBggHDwICBAoIFTxAQ0BAQCIiIiEhIf///9cAAB8fIAQDBgCC/Onr7gUECAsHFX9/f8kAAMPDww8PELu6u9AAAMAAAKDM7RMSHsnJybne7t7e3n274TXA8Pb09TMyM+fMpSkqgenp6Z8rLdy6gWdnavI8NHwqLQqG2Z2dn+jevSSc2Pn5+a6urjg4OW5xc+bqzykqpVac/Hl5ehUVFrh+Lcrq7M7Ozil+vFJSUvzBEhGHwsqiLAJ0zuXl5SgzO5OTk11aXkRERrSztCuj3omJiimi0BRah9HR0tfX1xcWIBJZl+A4N2Cx/aWlpexXTiAkLiQ9Ufnf3+t3ePGhpfS+vh2U0Ojq4dzq4UtLS6HJ3XivyQNvxhtGZ7U3Nih0mdzq7tfe0RkcJCtWbVCTuVCb19wgIBR2qQV24SmSxuGvFnpkIkFypvCOjJO7z0ZnfWAgIKwLC7uLjIFjfZ9bbWWy2bpiZgMDCacMDDIA6rUAACAASURBVHja7J1Jb1s5EsflRXLkZSzbYymJlzR6ABtKgPZBA40OEtpAMDnFQGz4IMxlAB/yBTroXPwZ5tJfeB4fH/UWcSmSVW8TC+i0LUvt1i+lf1WRxWLn06cPBfuU2gWzI5kdHBxkvpTaVWL7BusZbFCwHa1tG62b2HFiXU+7llnHnWvRik+pguv2tjvXY0ez53oB4nqeWNX+ug20LrJBuV4UTMX13GD7QMPl2u26ct1yNGyuRasHV3d/peaaVwE411rErdrowLqvplyPtGaKV0auPbMNJGYL1RR3aOKWnKvGU49c/VSwssBaCtfjkvxV+/mXcIXqas/BKLgWufCHtrZw9bXWXAelcd2i56qtBwA64BunquJaSty6MEUtc/1qilu10ddEB5rCFcNv4esC9Y9bIh9w1QHBVRX/68aVOn811VmqeKVyRd+4Jfv0f4zMtn4t8ivGHZp6S13CQn21yO8KKW5BuZrKLKhfYnLtdD58UK0PQHXgSmG49augus51OBxq2VahA9ZcAfEfIw+g4KqqV13rWCjXCKWWKzSvUjH11dePH+VcTVKA5Zcq3QBwxYpb+yVz3a6zvprXXQNX17gFWB8w6wDJerZeByBcqfQAGrdUOPXrrnh5QBFqDqCEKo9bcK5Y6663t9LM9Tp24qIOaLji7A54cnXYJVBx9PVTK64Wq9nQ3aye58Kr736WiaOrrqq4njArgasTXwt/rTtXk7766gAV16riFlQHbONW1fo6FMa5dl3jVilcNTpQN65QIaic6wXFLqzbuqsNV/Ye65QPrOnrhV0/FjRuFfdRUPtbuua+IcGxlHXXuCZghtU3RFW/4vUPltI/ZJtnHZSnr1Z9Q1HYsu3LJN1/sa0LjP2u1XAdInBF7R/y4Crvd/Vfx3bQV5AWmD7/2P4qdACn37V8feXU/LlS6Wtz41Y1/a7Yccs3f61rPkCjA9l+V9g+rLrftbDfXXjAdW/b11+Pke02MRXXGHon2+9qt1+4vl+A2zdEyNWzztJAXeUDFxeu+4VFZa0rV5r1wU5HzZXrQI24DsrgelwS14IMXLj2u67pa125ekqBQQayXHNk3ftdmxW3vPT11qyvVFxrHLe8IpcN103KB/zXXSH5ALx/SFPBKvpd7ajadLzDqLLn0PS7shVWdV0AW3815QNXSF1E+Fy3d3TVFvY+bD5u2XMt67wmAtcYK/bGlqnecq0LypozQMb12Ld/iIarzF8pzm0jcJX6m++5IhXTTmImHTDpKvV5eGquNPuFm8A1otcArkodqCnXnW35p9333KZKWhOsJ3z9VX8mPstY/2O/88Y21UDSOuR9/gVrv3B3NxextmIBtuCqMe9z3APLPrcdaH9LCeeKily585pPE4ivXefkoHM19LmUfZ5AcBUSsMsMxvWAmOswa8hcj6vhCtIBY+zC5PoRYLA+t3LOaRR1wILrEYBrz0cHbLjykzHu+35V66uB693er6f9Jtjhu3/s3dU4buX88/thv1E2+kbOVeirmEsm5Srpw8qEqG+jfuNsdLeFY175gK5vqHfTb6TtXZLmA/m4peaqXCd812+o/bpfub4eqM9tNhZrBLaMOtaWa2I3/QbbDUHfK46+/rPfaPuG35+Jw3XUbK6j22rXB1SF1fd+v/EOS5y/Cq42/a4Hh03nenhJ2vcq9ms7VvuER3f9xtsVXb9bLh/4YNOH8b35XL956aq2z0WvAzquN83nelM3ruzr0+ZzfeesA/r2ISNXXao1aj7XEWl/ZqbeslnL7rfALin7MzVcdfsCG871+hqRazZutYErdp9LrtklMpd8oA1cTwi4po0u5rglO8rdCh24vESpX4tcbeNW9ts2cGXhB3PeAJSrbjs7+Ku7Dmj6Mnut0NeTavRVHbd6gStC3JItbLdEBy6r0AEd5bbELZvIBV13zfHvmOc9b7q/gs6/RHaZWJGr8ThBry36aqew18B1LGG86rI4pxG4OnGF7MdWgGEyJ9CBS0QdKHK1XSd05Poyjuwe8Lw/HqM/F9MY4+zr71Kui+n96l+uwC8twfrqq4pp9pSm9ZtYTBmhh6cvn03PfHhaRn8+v8ZEM8waw1WQNcQtHK6J4yU8zB/42X9el4JxQ7nm9VXdl5ntZrd9DytALxHfyTzShPjT/vA0HkceHOGZxF+kfwWTOUPGnp08J/MqJK4nloHLNG+gkzsQV4xb631uOa49N67PPx7TLybjiMQsQhTTnnz5vJiOl9E39+lTHp4eZxHM6B/xnPRVVXE1zRvQ5wOm+a4HTuvazyL+RMBiSjGS2Zxj5EFqljgs+0nkqPHj6XPSV+HqwGVJcUt7T4nz/lbeX+eJXk5YihB9tjml2UoIvnyOfriYLrlz8+ekr8LiKkihzhvQcAUc1Tz31FfB9T6rliuuzz/+N13GgsqefJ+LW4hcXfzVRwcM9ZaTvgpoKQhGOvvJz3B9ePqNycbLVyYPq0dXr+LfxQ/HHwMvfT0pq94i4prNXyesPJhE3z+/Rl88zItc+5N/sS+jRGDZXz0nfRX3afYw1+WmcsXQAYaN6eSSe14kmjGg59dYOotcX+K6jP9ViOdkXpU4tSjfPHXgEqtvQPDM6yuk7zWtDupV6bvGLbvApYpaxXMKufjWAa6+njvWWzXk6uCvUo9V6QXXAbUCSOS11wauJ5YCC9XV3cQCV1quoLPw57yUbcs+jK0O6OqBIleuBSXqa0u5Sv3awl83l6tpfXCNq1Zf264DULCqJcKTglAX8wHNnIFc2GJk27JviBG3hLKK9de3b/X5QOAK5ZqNWoyvWz7QFq62OmDef5HrgOmekqPVPVDt4Nq1LGSxuMprhOCvEq5W9daG6OtJ2XVs4AqPWy7rA0EHYHELuj4gm0sutro3KW5ZzRvIWMrVOJfcuX+gyf4K3YeV92kYx2efx1QHg2Gvt1n6Ct3X6kjNuF8YuDpxNSevTAd6G6gDKFw16688bAV9tdNXc60VuHrFLWA+8EvDDU8HoFxN92uFuCWfN/A2saK+Bq5+5zZVcQtw32Yv5AOGc/GSuKVcd02sbVyhdawfV3PcCv7qogMhbtHoa+BKzTXogJ8OhLilj1u28wby664hz7r0nJcn34el0tczYqPXVw7VPI9Uvv9CwPWsPGsSV835WDPXs9KNVAdszr/IuaLoK+rnFCw0lPp6i6evxfu2M/dDG7iWhRTnN1bNVXblm/pNlh7WnX9rWfmA6v7HDFkt10qoJr+YIm5B5w3k5r3urtdbCFwrykTdfjMsH7CNWzZ1LCwfaBpXmL5C5o7odUA9j6idXH3rWNe4FfwVI39V11lt5QqJW4FrfbkGHXCbN5CbmweMW7L1AdV5w7bFLdO9kMW4ZrVfIFnPcuM6G6dTxRQWj8AwPKdEfwXdt6mpE7hJdFWxTujENZ5z8/Mxnkek5rrMTXqsmb5K79nLmMpfKbmycWSxGbmuntkarqaZDn5c+RgsNmUsIruY8hk6i+n9LB2GE3PlE8wmiSDMxKydGupAds6AWgck90Qf5cl66cDLeJ7668PTnE9qivhmhjcxrnw0EZuowebAshFFz6/LJuurfi5pft3FJW5FQWkuuPKJTjM28DE7bCyOW+zn8TTDiDDXBPPYkgZy3cfiyrBFuGKufDZeRI97pxjmyHUgcs94tPF4fM9GZ0VWM65CX9PHdfoq3ScsWkx1GJnTu0sGZeq5Mvd8SSaUPQNzgzrHLThXV3/lyAo6wIiKYZsrrvkH6sa1GLds84FzzDwrnuIafcRjZEncYlFqzP5I3HOlA/yRP3/nEe3nY5P1db2GReW6KqUm42S2M/suilvTdAB0+qQ4D7tP8rI5kb/61rGucUvF1Vlf5Ypb23UXKn1tO9eq4lbgSlPHYurr5upAdsoAt3Wu7Nixet5bW9ZfbecNwOJW2uXSdq4qfzXtFxZ1QuWpeX1NiwAVV0R9reX+lnA+0H3xGgUIXH25ys5vruvApnBV6gBwHxbmr5Iuwqbo6xm+vkL6M+3qLUl3ZmoDA9dKyGL3aUL7M2257qtNy7V/VgXZszMCrtcU+YCK7DCxnch077E8tH6d8LK4lV2vNvW92uYDGo+N/HUwVMWt3DslBYzzW4pcu127/iH7uLVvMN05o8Ych1HqgO3cET3X4rQ8V66lsvXy+rU6loSr2l97q90Xsw6UAhhJTWT+qtOB4v2FvvrqwbXWpq23JCbm4mBxFWlAErg2lqubv6p1IMO1Vf4q0QECrunKqzZgafYLmmbFuKVad1XdryWfN7DuryqoGX1tFdeivzrd/6KsX1N9FcOIVVyZtVlfVeuD+jnPJrPl2vz5hDKuHXSu5kqrbf4q0YEYLQVXQ63Ven29RddXQDYQuLpzDfkAMtd1nlcJ1cGAlwMbkQ9Y369lMgXXXt42k6vufi1z3FJx3ZR8wO88vLqO3TSuxTqWhqvaX9uqAxb+Cji3ra63gr76nIcPXF3iljvXoANu92uZDLJb2C6ubKNQxC3IfBy7dVd1/tp2rt1u6q+295REr7qGOez6+qBspbBNXMUn29SJkZ/zvAvbfglcnbn660A7uQodMHEVOoDPte366nMPVOAauNZLB4rzsfC4bnDcWpvvGuIWBld5f0vg6qsD5nugAldVHVsW18w+YfBX6z63krnOxFCMNuhr4Bq4Vrf+SstVOtcJr59QcBWTCePRg3/898dj/IjLcFJ/fY2LLN/7terBdTWZMJ5H+vAUAWVj8n5WwfUWeO5F+LVdHqDm2pOYL9fVRDI+cuz5xyPSKBIHE5Sg+4UdJyuH62qCHh+Rx6aUvYwdJukGrkauTGkrIWs77x2LK4W+rnSAT3V94QELOocQWV9vy9BXSBWLFreWfJgui1uL3z7XnKsgW0+u8STX5WoyYTx68Ou/WdwCjXquQAewuQ4SQ9VXuYmBpP06ck3Z+Oir3k+JuFZahVUVt2i5/vnIhpkv+/Xl2oi6QC64VWJtKdfqDXq+uFk6ELgGroErJVff/FWcPPTmWqdhLhZci/MGhNUif63lpBw7rsV8wI1r/jyRymBc6zuDCML1RGFVc0VmQUa2YVwJKNCAhZ7T8OOKpq8kvkUBFqqvQmGr5UoVZsrn6tY3ZO4fcObabzZXv35Xlb72eoFr2ofxNmN+/hq4Zrl2vC3oAI0OBK60+hq4up0vDlwD13pwxckHAldsrj2AMa7bkbWRq6rf1TViBa6muW5++lo+14lFWwY9V9X6Vc25xpdu3weuuFwXU34P7xrJF9I7uKvnSqyvM45vMZ3XliuNvtJyfXi6X2FcTFn7EGt5m8zji6JBZANX2ftfNWQ+vy5zXFvvrzB9ZTWBF9eHp9py7ZBYSVzjk0X15IqzT+imA65clfraAB0owV+Hrlyz+QA/CTcJXDG4LqaM38MTy18Z45dxwhV6xICOK27/YLn62hcnYhhXdgRmLnQgyrQqzrMazjXRWdez203lShu36ryepeDaKUtfxf2xbeOa73e1ne8auJq42tyyScB156+/jo+17/+MBisVV/lUcrcpZM5cd4bf9t6dnvZLBkvxHz2N7P370ejw8PDvzP6W2BuZHd7c3dJx3dm+O33P/n9MDFApEDUWW3GNbHS3S8R1Z2dv9N7ItY/Xvk7aCG/L9c2bvWsartt7IwhXggMGFJHQnuubPRKuO3eHowgsgCsyWpIEg3MdWXF9c0fBdf+9BVcUun1K+z979/+TtrrHATzRLVTTdKZphiXZMqHgjoECG5xtkLg0R3IL/lASx3YUCiMQ8OCX6U2YerxR73a2Mze3ZDfnD75PWwqlFJ6HL4V269vp+EG0vnzv8zwtDkdxda9O3nU+iw/tauWM4jp8YeGuc96Oq9v+rO6RXAOTc1V/D9+cW3GVYD32d/W0lq3hXMlbk3fFHVeMmLTrkuyKI2607DJelW0WrmUd7IqZ4Ep1XGn7u9J9tq+zdcUd17Fcl9q5e4fCOxsC8kcYA4bbgdm62r2wOD1T1yUj1x+hsCTZbzswY1fa1lstDz1T16Ue1/ZGy9aTQGHt2mZN3fWu3tX+sG66awxM3VU5z+rrSpN2baulXSVYG15/wckWq96VamWw7riuS/poXdXC0l7SbsOA9NLtuna5PuA2NeEyxPRcewsr09rlKgw4bK98yAZ1JR58fvz57WPw0srnzJRcl7SuWlia9mXDq8vLYfmNywcSgMQrPXKMU/jN8z9Bnj+HvX8AfEyaznCFHBVAySODeL3e1uGSRnX98vbtSYJXSOWI+HRdtYVtNda1KP3/0XB4TXWF0JIZkRNzIOKfcn6DQuEZkKIoFN0juoYe6Vg7dZVdsS9PnwLXp0/fngDTk88nJ19m4to1CVxrkuu9bDYcdgV8sAQwMZVKl6R8+5/c1xvYXbzNYFAAfwo5wocSABmJRFhWJmXB36FQSGXtqavsiquu/K8ncq5Eq7jeXwu7EFh9rmZB/qLZCBuRYH+7oWF3oYuCIASFzXKO8nmTGIngyqpNBTdYwBqiB7q6v3z/fpXgvz/lfzm5knPpnp6rOmA7g0CWVVyXb91z+bxKBvaVK7FqIt++fRM9kG+Gp9kUBWFTELigmGtmNrkiSaO5hh6FZFO240pqx0BnvOJnrz68AK4nfEJCPT+vHMzCtXvCusKrtwDratjlhSeACQC0VAKNjZQk4WAyMPgeGCCV58BmeVMINgsFIVccfI+Q7BoCrIprXO+qtFXjunD26tX7BH/1Xz7x6Srxn3pl8q69ovNyVNdWYTuwAZcrvHbr1lo4C8YA1BWMASAaFFIsmxLKQLfQhHw7MsGykmAK3MoVSqVUEOIKPEFUUulNVNfWdl3Vvr5/r3GtzN7Vmw1LomDJAjfuZQPtOdbPlWvE2cIKnYuzOd9Kio03OIgrJw/X9p9GqVEWoa6qqeIajUa1rL2ubsn10xV4/VSvnFem7aodBIqsVNXl1UWwZIUXV5dBaV304LiEUpxtrJBiPC7SxTQbLwmQuzTSXSmVxWJy8D1CHVjJNbqluGpUdWOAoi72O7kAiYWn7oprXcP35SVrLZtdlJ8JZTUMcw1G4mykLKTi8YI0B+JsebArCd5HmwYHUe1ylUgVV5LUu3bqSuEusK2uVpvNajzZrFYD4fCMXFXYe8qTyqyGs8qmYPkeiivYuwIsaeGKxCNBWF+1rmA0r5BQ16iSLYU0WgWvvawaV4LKulxuns/l+PVMjud903bVF9bTcl1ru0L7yjVAXTeDqXQ6VRbKJTbFQVyDpfhW+yVSKOIwVrpVUdW0GvX7/QPrKruSHdfA7FxbsD19DUO/6pXNRimHUwRB4bl0YxNav2IhstVKPB0sEiSS61a1Kne2Wq36/VpXg7pKrtksrbgmZ+eqgc0uSgP2vrRu3VcGLeyL9nqSxSbW2po2i0mPF3IHIhdMs/IIaJS5IkXTKK5y/NKLX371D2JVXF1P+FyTf0Lm+J3spF2XjKJ11RRWhg2A3ZW0HQAbKLAhAOMgQEL75A0EVMvOrQHBmlywUCiUBa6ZJGkUVwk02gJtRc/aVVeCcAHYZKlYLGXCxVISsGap6brqJoGHBLISJklLN1yaZXeCcSczmUwSIxE/ehszqnf1GNeVIDwuqaOdZMlJXn9dGuRKUEaTQFq8SA9pfob5HP6eeNqqGlZc88gL5W71WAmFTdu1B3YaqON+Twaxdh4yhDxmOLLr0mDXrsJqZqwdZLtUW6y4ntVM17tQV21hVViPPVTVf+oj13Uk167HtY1cu2G7GmttWY+nb1uHq6u5rt2wbVlr2naOzm3EOlxdh3btp9nJHaIvrEbWSrrdR+WGsc7StR+sntZq6RzneKymuephce2mz+qmbVUjVou4tmG7ZC2Gqzs0XM86dF3NczWA1ctaNPhA1pm7dmA1srh9UDuqI7Ca6WoMa2HbroOkxmI11bW/rLV8DQ6tj6pVXDWwxrTWDDU2q9muXbD2oO0+4hFZTXfVy1rbVn+sxKisZrhiBETWkrgGB0mMzmqKaw+skazlQ4zDao5rLyxhd9QhWU1yNYC1ka3hwWOWcDWGtQNtnwPHpuY63ydr6lOc9I+tREdRNcP1DgaHtYQz+vFhVnC9rXlWnh8iGGY11x9BFsOs6Gp3WQyzjOud3ifp+tlQx3Cdn0d3tSUtNl6m5GozWmzsTNh1bm7u9sDn7fsJSKfuyqhB98Xyl+eVyzzS+978E9L+gLA/GvrnBmHvnK//9RDkr3oe1YyiL2qxWO2Cpqa2bg121f2NkPNnz579e2OjgvK+X0P6H2YNfYXf60BWlWUPkA4JB6qAFcACWdwarkz7LUIyl19eA9ZnGyCvLg+gdQr1/pRwCPpJ8jLrHwosSmNxXy22X+SCQa64H6v53Lbr6zM1G//aUAK5A3B8t/dGyd47eRJEoZ+lIosyCmwFibWW4VLVRKKa4jK1mg+3r+sGsuvu9SGfOAQ5fiPD+qGfZVtxVWC34UdFA9bCjrJM7BSStRo9c9d0e91Kj+ZKQF39u8eJ46Pr6+PDQ6Wx0DHwsNVXBRY6CKiLWKawzitfBr9eyMQuqFm7Mga3UF0PNrZR+iq5Hu2+e7d3dPgGxZU4A5i//vGQeajAnsHrus/t8HxEEEUhwvM73H6fwg7rOj8o8q/cmbTra8Bax+obG9tortcAdO8YzVUer4BUdYUO2ItaMcUwEW4/FtvnIgyTKtYuTHYFVTW67jKm62u5r3ksDwqL5nr8Zm/v6PhoF2W+EnV5N8Coc6AOO6hajKsyjLAv7bP2BYapcrGa+a5yJuW6raZeP8N+x87qdTRXad1KoK5bsqsM+xDJNRYLJhhGBJvXhYV9jmF+CcZi9nJdeN9xzf/98u98/QzN9fDo6Oj48Bht3RrZdaG6ngYTYUcw3VWVnZArcSajnp5uA9CPLz9iZweI69be7i5Yt47QXYeeA5v7sYV1Zv0Jw7DiFFznJzlfifypxApgpbq+BIVdQF+3/G8Sh7umrlsLbILheb7wwG6uUmFPJdZTqa7LoLAYYl/BPmv3GtFV2mc9HmGfJeaFKs8nEtLGYBqu6HOgUYS5UvVTOVJdl0FhEV1b5wVIc4AY9bygKi6Asy5p/2qa65wuCK474OQL4ZyLqEisFVBXyfUjhr4fODy+3jXrPPZCOo/ln4jNFM/wca5mmf2AgKWRWMGeoNKqq+QKLaxfc+FlT2GFuw573WXBB2C5VHU9InIlhkmURJNc54Z2TaOySvNPqascWGGjU7lO6G5dJxQeJMVyubxZNMVVPckaav+a3kFlxai8XFe5r7DCfu2BjZpxXXtBva6txgTXuWFc0+2rWcIwjxSpdYUW9kb/gEHo6w3Cxx/1cRgTXeeMchtz4rha0VVxRJ4DjutQ+yzp93Frq+u4Tmz/6syBWZ5vOa6OqzXmwLzjasK61bqM5bhOuK/OHDDF9TaI4zo517k+cVwdV2ef9fO43m3FcXX66sxXx9VxdeaAlV3vtuO4mtRXZw5M0LXLUHcO67g6rlZ2deaASfsBx9UUV6evZrg6c2Dy87V3vXJcx++rs26Zcr7lXB+wlmszFd9KDnV4B5fnL16cXx78JHNg0Cjo65pjd6qpFQwTAS3a06jkzz+8lvPh/+3d/UvbWhgH8G6zJEKo3CGoFxmUHVo6QgwMjaSQUSGYpuAdNwQha906GxCLdyLsh82Bt4yB4/7gdv/ie16a9TVvtfE26fN12qTVmn58+pxz4suu3yyD60zrgobrtk+wqN3BrrUIh1a46atS2Rtw9WFVKObHjoZdrUb4oQ2zpg72oeYDtutSVlPSsGtBd+3QJvDtkOQd+YffHH57k2VX78RrXNe32jm5qGJWDddqdVcKO7Lrw7FcZ9OV/u/Ps/YBW3NIuRb+cJgr33Y+hswEvv0Cffdzb58U7EWGXR8/nul8lq5ZJukCu5rmUFdb0UO669Uhe+m9/ILQS7J5A67j6WgSmbgWXVyuGqncj+5u4HEJ11ckhz/31MoeQvtk5zrrfSD+uKVpu9QV16vbJFuFViekvRLJ/T0Dfdnfu/z+74+7vzPuOv7zrpFcHU0p0lmWtXtC/zohNg48rlXs+h4Xqrrfk7oHJGd3Ga/XWfoArlPWT02TL1zc3t6GjkGnV8dX73/u93p/MtbuwVkr067TvqcVYdzSOt4fHLjpHR0d9W7DVgXHx1fkpXdJWT/81T34DOPWxBkXPFxJJptAEVackNH94usxyw/q+v0Sly24TgSvBxyLrLGEW8Z61As+OVA9HXE9yLjrrN+PtckMy6m3+ILnehS2jv26TK6TP+8a+bwLXhFobwuFaPWK84nB3nUvu9+p6xnU63RYPHiZ/MVRpP76C/a6+6H7AQ9cBwevoL9ObQVvcScQeZ4V7G34sRXenBLZuzPWCT5XwdVHVu+Q5QGeEfT+iXZ4F59OT09bn8my4FWaWB+wDwxlnV9djXZ4hSlbS+q6zUOS6APgOotr8BoWXMEV+gC4giu4giu4giu4gmsKU0jAVQBW/mkC57O2gJUv5ebuWn4NrPzO/F3XnqwvPetGOQHX8g6Uay4B17V8aclZuZWonl6ijFv5/Ivlhi2Vc8m45h/tLO9kS9hZySXlmt9+8bq0jMOXUNopx+mrMVzXWMrbj5LNs5D8NpaVkWxuriSSmONVfFff5OeUMo2/q9/XIbcgWWjXZ/FdF8N2c3Om/oqTlOeQa6Q+ML1vpMmV/GwBngv4xPOYR28lXoGoUx9J3A64MPX6ZFCt/rmvqXcPYazj41Yul1pXypp0X/US5pqpcSuC69p9s3yu+YfKLH0g/gwzXa4PsS7Ilis2A9e5uz6hc6wHawOZd4053Nx73CqXg1ew/ento9H17iALNsMKdQ1wm/c6K3Ch5bn69Yu0uj5IX8XHF+aaiuf/PVzXEnDNZc61CEkiOQ6SRMAVXMEVsoiuJYGvBoYXwDV+nlf5ghCYAl99Dq5xwGU4IQAAAtdJREFUw68LoVnnwTVmtoQoWd8C13j5PZKr8BRc4yUa67oArkm4CuAKruAKruAKruAKruAKruAKrv+3q22B6xyim2NXWAq4BqYtS5LcDnsvxxmFtRG4BqTlGkh1HBUZbmva7TWVPt1tznSc0XJFjihytshigutwilinXqRbdQdZxSmsKilLXa1xpiqPlCtOhZMRi6pn1VWkj4/Dj1Rnu/Stix+yK/qyasaQh25oxclqlenTXamYGNccLlccnfOuqSM7Xa6txmC70Qp0Jc9H4kofPnXVkdUUm5boy0oh65bjWPpg3zN1FQU3AexqNVmxVoa+CDXRwuXaVFgkzpHT5dpB597mOeoEurJLWalI/V0R6YGfSFExY90wFElSDKNOYIfGooory3Vyf5xUwRf4VXIHt8o2eWJU+m0AcUrKXBuGB3uOjEYkVxHV2K4bPGJzSgO/D5JYf5UQVmsMfQQS+/fHmaiJ+6mNG8HwrVhaRwNXpEqp6q8e7ATrtD5Qow6Ww1xRnVwvirb/55KMhrfZMEZhBq60GPGu96Vjt9abg3Ilrgila9xisJOs08YthdWXWmeuRAZfK/vPB0inaGMTRyfduBjHlQxWaXalsFNYffsAfsCqSV1Ze1XkgOkr6QRWu22RLtDyqddffaAyfKtoIZTiPsBgp7AGuHKKRXYdK9SVVCntBI2JMS543ML9FY24pmzc6sNOYQ1yrSEZEbJaBFd8q0xex12D51moWVMGSd88i+XkJMK6gK0n2TxeUgmzq0qiWFflkE8o+7bggHWBMzIapm5dEHO9JfZdzQotX7w4RY5kzuzqv441leE2kOF17H0i+1d0jQ1Hk+dd8IprKHDeZdaMnycMC7hGSzMeK7gmFHAFV3AFV3AFV3AFV3AFV3AFV/g9o2Vxhd+LSybwe5wJZSOK6wYHrjFTigC7UQLXGVrB05DeuuBNgIO/QwKu4AoBV3BNV/4DuEXajvy/CzEAAAAASUVORK5CYII="},41453(e,t,r){r.d(t,{A:()=>n});const n=r.p+"assets/images/backup4-40da9b86893f41f63c20c9dcbb917526.png"},87556(e,t,r){r.d(t,{A:()=>n});const n=r.p+"assets/images/backup5-9c88ce1dbc31bf5bc605e483f7c4160e.png"},40767(e,t,r){r.d(t,{A:()=>n});const n=r.p+"assets/images/backup6-2caa0591dcad44acdff485634fda84b7.png"},27478(e,t,r){r.d(t,{A:()=>n});const n=r.p+"assets/images/backup7-8f0717caefd9eb5cc4c4ffa5d2d7ddbe.png"},4785(e,t,r){r.d(t,{A:()=>n});const n=r.p+"assets/images/backup8-df2d8e580989ba3b39e7f0739ef25b5b.png"},10920(e,t,r){r.d(t,{A:()=>n});const n=r.p+"assets/images/backup9-30966c174373efbcd85466d5a2d2f565.png"},28453(e,t,r){r.d(t,{R:()=>a,x:()=>d});var n=r(96540);const c={},s=n.createContext(c);function a(e){const t=n.useContext(s);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(c):e.components||c:a(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2122.fce4a148.js b/assets/js/2122.fce4a148.js new file mode 100644 index 000000000..8de030188 --- /dev/null +++ b/assets/js/2122.fce4a148.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[2122],{2122(e,r,t){t.d(r,{diagram:()=>g});var a=t(19279),n=t(77454),s=(t(5637),t(76385),t(31293)),o=t(86827),i=t(78731),p=(0,i.Pz)().RailroadPeg.parser.LangiumParser,l=(0,o.K)(e=>{const r=e.alternatives.map(u);return 1===r.length?r[0]:{type:"choice",alternatives:r}},"transformOrderedChoice"),u=(0,o.K)(e=>{const r=e.elements.map(m);return 1===r.length?r[0]:{type:"sequence",elements:r}},"transformSequence"),m=(0,o.K)(e=>{const r=d(e.suffix);if(!e.operator)return r;return{type:"special",text:"&"===e.operator?`&${c(r)}`:`!${c(r)}`}},"transformPrefix"),c=(0,o.K)(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),d=(0,o.K)(e=>{const r=f(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),f=(0,o.K)(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return l(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),y=(0,o.K)(e=>({name:e.name,definition:l(e.definition)}),"transformRule"),P=(0,o.K)(e=>{(0,n.S)(e,a.db),e.title&&a.db.setTitle(e.title),e.rules.map(e=>a.db.addRule(y(e)))},"populateDb"),g={parser:{parse:(0,o.K)(e=>{a.db.clear(),s.R.debug("[PEG Parser] Starting Langium parse");const r=p.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new i.zg(r);const t=r.value;s.R.debug("[PEG Parser] Parsed rules:",t.rules.length),P(t),s.R.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:a.db}},db:a.db,renderer:a.U,styles:a.$}}}]); \ No newline at end of file diff --git a/assets/js/2130.c5495903.js b/assets/js/2130.c5495903.js new file mode 100644 index 000000000..dffc764d3 --- /dev/null +++ b/assets/js/2130.c5495903.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[2130],{22130(e,t,r){r.d(t,{default:()=>qn});class a extends Error{constructor(e,t){var r,n,i="KaTeX parse error: "+e,o=t&&t.loc;if(o&&o.start<=o.end){var s=o.lexer.input;r=o.start,n=o.end,r===s.length?i+=" at end of input: ":i+=" at position "+(r+1)+": ";var l=s.slice(r,n).replace(/[^]/g,"$&\u0332");i+=(r>15?"\u2026"+s.slice(r-15,r):s.slice(0,r))+l+(n+15e.replace(n,"-$1").toLowerCase(),o={"&":"&",">":">","<":"<",'"':""","'":"'"},s=/[&><"']/g,l=e=>String(e).replace(s,e=>o[e]),h=e=>"ordgroup"===e.type||"color"===e.type?1===e.body.length?h(e.body[0]):e:"font"===e.type?h(e.body):e,m=new Set(["mathord","textord","atom"]),c=e=>m.has(h(e).type),u={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand ",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function p(e){return void 0!==e.default?e.default:function(e){if("string"!=typeof e)return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}(Array.isArray(e.type)?e.type[0]:e.type)}function d(e,t,r,a){var n=r[t];e[t]=void 0!==n?a.processor?a.processor(n):n:p(a)}class g{constructor(e){for(var t of(void 0===e&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},Object.keys(u))){var r=u[t];r&&d(this,t,e,r)}}reportNonstrict(e,t,r){var n=this.strict;if("function"==typeof n&&(n=n(e,t,r)),n&&"ignore"!==n){if(!0===n||"error"===n)throw new a("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",r);"warn"===n?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,r){var a=this.strict;if("function"==typeof a)try{a=a(e,t,r)}catch(n){a="error"}return!(!a||"ignore"===a)&&(!0===a||"error"===a||("warn"===a?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),!1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+a+"': "+t+" ["+e+"]"),!1)))}isTrusted(e){if("url"in e&&e.url&&!e.protocol){var t=(e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?":"!==t[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"})(e.url);if(null==t)return!1;e.protocol=t}var r="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(r)}}class f{constructor(e,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=r}sup(){return v[b[this.id]]}sub(){return v[y[this.id]]}fracNum(){return v[x[this.id]]}fracDen(){return v[w[this.id]]}cramp(){return v[k[this.id]]}text(){return v[z[this.id]]}isTight(){return this.size>=2}}var v=[new f(0,0,!1),new f(1,0,!0),new f(2,1,!1),new f(3,1,!0),new f(4,2,!1),new f(5,2,!0),new f(6,3,!1),new f(7,3,!0)],b=[4,5,4,5,6,7,6,7],y=[5,5,5,5,7,7,7,7],x=[2,3,4,5,6,7,6,7],w=[3,3,5,5,7,7,7,7],k=[1,1,3,3,5,5,7,7],z=[0,1,2,3,2,3,2,3],S={DISPLAY:v[0],TEXT:v[2],SCRIPT:v[4],SCRIPTSCRIPT:v[6]},M=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];var A=[];function T(e){for(var t=0;t=A[t]&&e<=A[t+1])return!0;return!1}M.forEach(e=>e.blocks.forEach(e=>A.push(...e)));var B=e=>e+" "+e,C=80,q={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:B("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:B("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:B("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:B("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:B("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:B("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:B("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:B("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class I{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t{if("toText"in e)return e.toText();throw new Error("Expected MathDomNode with toText, got "+e.constructor.name)}).join("")}}var R={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},E={ex:!0,em:!0,mu:!0},H=function(e){return"string"!=typeof e&&(e=e.unit),e in R||e in E||"ex"===e},N=function(e,t){var r;if(e.unit in R)r=R[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{var n;if(n=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)r=n.fontMetrics().xHeight;else{if("em"!==e.unit)throw new a("Invalid unit: '"+e.unit+"'");r=n.fontMetrics().quad}n!==t&&(r*=n.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)},O=function(e){return+e.toFixed(4)+"em"},D=function(e){return e.filter(e=>e).join(" ")},L=function(e){var t="";for(var r of Object.keys(e)){var a=e[r];void 0!==a&&(t+=i(r)+":"+a+";")}return t},P=function(e,t,r){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");var a=t.getColor();a&&(this.style.color=a)}},F=function(e){var t=document.createElement(e);for(var r of(t.className=D(this.classes),Object.assign(t.style,this.style),Object.keys(this.attributes)))t.setAttribute(r,this.attributes[r]);for(var a=0;a/=\x00-\x1f]/,G=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+l(D(this.classes))+'"');var r=L(this.style);for(var n of(r&&(t+=' style="'+l(r)+'"'),Object.keys(this.attributes))){if(V.test(n))throw new a("Invalid attribute name '"+n+"'");t+=" "+n+'="'+l(this.attributes[n])+'"'}t+=">";for(var i=0;i"};class U{constructor(e,t,r,a){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,P.call(this,e,r,a),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return F.call(this,"span")}toMarkup(){return G.call(this,"span")}}class X{constructor(e,t,r,a){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,P.call(this,t,a),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return F.call(this,"a")}toMarkup(){return G.call(this,"a")}}class Y{constructor(e,t,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=r}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement("img");return e.src=this.src,e.alt=this.alt,e.className="mord",Object.assign(e.style,this.style),e}toMarkup(){var e=''+l(this.alt)+'=n[0]&&e<=n[1])return r.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[\xee\xef\xed\xec]/.test(this.text)&&(this.text=W[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;return this.italic>0&&((t=document.createElement("span")).style.marginRight=O(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=D(this.classes)),Object.keys(this.style).length>0&&(t=t||document.createElement("span"),Object.assign(t.style,this.style)),t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="0&&(r+="margin-right:"+O(this.italic)+";"),(r+=L(this.style))&&(e=!0,t+=' style="'+l(r)+'"');var a=l(this.text);return e?(t+=">",t+=a,t+=""):a}}class _{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);for(var r=0;r':''}}class Z{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e="","\\gt",!0),ae(ne,oe,fe,"\u2208","\\in",!0),ae(ne,oe,fe,"\ue020","\\@not"),ae(ne,oe,fe,"\u2282","\\subset",!0),ae(ne,oe,fe,"\u2283","\\supset",!0),ae(ne,oe,fe,"\u2286","\\subseteq",!0),ae(ne,oe,fe,"\u2287","\\supseteq",!0),ae(ne,se,fe,"\u2288","\\nsubseteq",!0),ae(ne,se,fe,"\u2289","\\nsupseteq",!0),ae(ne,oe,fe,"\u22a8","\\models"),ae(ne,oe,fe,"\u2190","\\leftarrow",!0),ae(ne,oe,fe,"\u2264","\\le"),ae(ne,oe,fe,"\u2264","\\leq",!0),ae(ne,oe,fe,"<","\\lt",!0),ae(ne,oe,fe,"\u2192","\\rightarrow",!0),ae(ne,oe,fe,"\u2192","\\to"),ae(ne,se,fe,"\u2271","\\ngeq",!0),ae(ne,se,fe,"\u2270","\\nleq",!0),ae(ne,oe,ve,"\xa0","\\ "),ae(ne,oe,ve,"\xa0","\\space"),ae(ne,oe,ve,"\xa0","\\nobreakspace"),ae(ie,oe,ve,"\xa0","\\ "),ae(ie,oe,ve,"\xa0"," "),ae(ie,oe,ve,"\xa0","\\space"),ae(ie,oe,ve,"\xa0","\\nobreakspace"),ae(ne,oe,ve,"","\\nobreak"),ae(ne,oe,ve,"","\\allowbreak"),ae(ne,oe,ge,",",","),ae(ne,oe,ge,";",";"),ae(ne,se,he,"\u22bc","\\barwedge",!0),ae(ne,se,he,"\u22bb","\\veebar",!0),ae(ne,oe,he,"\u2299","\\odot",!0),ae(ne,oe,he,"\u2295","\\oplus",!0),ae(ne,oe,he,"\u2297","\\otimes",!0),ae(ne,oe,be,"\u2202","\\partial",!0),ae(ne,oe,he,"\u2298","\\oslash",!0),ae(ne,se,he,"\u229a","\\circledcirc",!0),ae(ne,se,he,"\u22a1","\\boxdot",!0),ae(ne,oe,he,"\u25b3","\\bigtriangleup"),ae(ne,oe,he,"\u25bd","\\bigtriangledown"),ae(ne,oe,he,"\u2020","\\dagger"),ae(ne,oe,he,"\u22c4","\\diamond"),ae(ne,oe,he,"\u22c6","\\star"),ae(ne,oe,he,"\u25c3","\\triangleleft"),ae(ne,oe,he,"\u25b9","\\triangleright"),ae(ne,oe,de,"{","\\{"),ae(ie,oe,be,"{","\\{"),ae(ie,oe,be,"{","\\textbraceleft"),ae(ne,oe,me,"}","\\}"),ae(ie,oe,be,"}","\\}"),ae(ie,oe,be,"}","\\textbraceright"),ae(ne,oe,de,"{","\\lbrace"),ae(ne,oe,me,"}","\\rbrace"),ae(ne,oe,de,"[","\\lbrack",!0),ae(ie,oe,be,"[","\\lbrack",!0),ae(ne,oe,me,"]","\\rbrack",!0),ae(ie,oe,be,"]","\\rbrack",!0),ae(ne,oe,de,"(","\\lparen",!0),ae(ne,oe,me,")","\\rparen",!0),ae(ie,oe,be,"<","\\textless",!0),ae(ie,oe,be,">","\\textgreater",!0),ae(ne,oe,de,"\u230a","\\lfloor",!0),ae(ne,oe,me,"\u230b","\\rfloor",!0),ae(ne,oe,de,"\u2308","\\lceil",!0),ae(ne,oe,me,"\u2309","\\rceil",!0),ae(ne,oe,be,"\\","\\backslash"),ae(ne,oe,be,"\u2223","|"),ae(ne,oe,be,"\u2223","\\vert"),ae(ie,oe,be,"|","\\textbar",!0),ae(ne,oe,be,"\u2225","\\|"),ae(ne,oe,be,"\u2225","\\Vert"),ae(ie,oe,be,"\u2225","\\textbardbl"),ae(ie,oe,be,"~","\\textasciitilde"),ae(ie,oe,be,"\\","\\textbackslash"),ae(ie,oe,be,"^","\\textasciicircum"),ae(ne,oe,fe,"\u2191","\\uparrow",!0),ae(ne,oe,fe,"\u21d1","\\Uparrow",!0),ae(ne,oe,fe,"\u2193","\\downarrow",!0),ae(ne,oe,fe,"\u21d3","\\Downarrow",!0),ae(ne,oe,fe,"\u2195","\\updownarrow",!0),ae(ne,oe,fe,"\u21d5","\\Updownarrow",!0),ae(ne,oe,pe,"\u2210","\\coprod"),ae(ne,oe,pe,"\u22c1","\\bigvee"),ae(ne,oe,pe,"\u22c0","\\bigwedge"),ae(ne,oe,pe,"\u2a04","\\biguplus"),ae(ne,oe,pe,"\u22c2","\\bigcap"),ae(ne,oe,pe,"\u22c3","\\bigcup"),ae(ne,oe,pe,"\u222b","\\int"),ae(ne,oe,pe,"\u222b","\\intop"),ae(ne,oe,pe,"\u222c","\\iint"),ae(ne,oe,pe,"\u222d","\\iiint"),ae(ne,oe,pe,"\u220f","\\prod"),ae(ne,oe,pe,"\u2211","\\sum"),ae(ne,oe,pe,"\u2a02","\\bigotimes"),ae(ne,oe,pe,"\u2a01","\\bigoplus"),ae(ne,oe,pe,"\u2a00","\\bigodot"),ae(ne,oe,pe,"\u222e","\\oint"),ae(ne,oe,pe,"\u222f","\\oiint"),ae(ne,oe,pe,"\u2230","\\oiiint"),ae(ne,oe,pe,"\u2a06","\\bigsqcup"),ae(ne,oe,pe,"\u222b","\\smallint"),ae(ie,oe,ce,"\u2026","\\textellipsis"),ae(ne,oe,ce,"\u2026","\\mathellipsis"),ae(ie,oe,ce,"\u2026","\\ldots",!0),ae(ne,oe,ce,"\u2026","\\ldots",!0),ae(ne,oe,ce,"\u22ef","\\@cdots",!0),ae(ne,oe,ce,"\u22f1","\\ddots",!0),ae(ne,oe,be,"\u22ee","\\varvdots"),ae(ie,oe,be,"\u22ee","\\varvdots"),ae(ne,oe,le,"\u02ca","\\acute"),ae(ne,oe,le,"\u02cb","\\grave"),ae(ne,oe,le,"\xa8","\\ddot"),ae(ne,oe,le,"~","\\tilde"),ae(ne,oe,le,"\u02c9","\\bar"),ae(ne,oe,le,"\u02d8","\\breve"),ae(ne,oe,le,"\u02c7","\\check"),ae(ne,oe,le,"^","\\hat"),ae(ne,oe,le,"\u20d7","\\vec"),ae(ne,oe,le,"\u02d9","\\dot"),ae(ne,oe,le,"\u02da","\\mathring"),ae(ne,oe,ue,"\ue131","\\@imath"),ae(ne,oe,ue,"\ue237","\\@jmath"),ae(ne,oe,be,"\u0131","\u0131"),ae(ne,oe,be,"\u0237","\u0237"),ae(ie,oe,be,"\u0131","\\i",!0),ae(ie,oe,be,"\u0237","\\j",!0),ae(ie,oe,be,"\xdf","\\ss",!0),ae(ie,oe,be,"\xe6","\\ae",!0),ae(ie,oe,be,"\u0153","\\oe",!0),ae(ie,oe,be,"\xf8","\\o",!0),ae(ie,oe,be,"\xc6","\\AE",!0),ae(ie,oe,be,"\u0152","\\OE",!0),ae(ie,oe,be,"\xd8","\\O",!0),ae(ie,oe,le,"\u02ca","\\'"),ae(ie,oe,le,"\u02cb","\\`"),ae(ie,oe,le,"\u02c6","\\^"),ae(ie,oe,le,"\u02dc","\\~"),ae(ie,oe,le,"\u02c9","\\="),ae(ie,oe,le,"\u02d8","\\u"),ae(ie,oe,le,"\u02d9","\\."),ae(ie,oe,le,"\xb8","\\c"),ae(ie,oe,le,"\u02da","\\r"),ae(ie,oe,le,"\u02c7","\\v"),ae(ie,oe,le,"\xa8",'\\"'),ae(ie,oe,le,"\u02dd","\\H"),ae(ie,oe,le,"\u25ef","\\textcircled");var ye={"--":!0,"---":!0,"``":!0,"''":!0};ae(ie,oe,be,"\u2013","--",!0),ae(ie,oe,be,"\u2013","\\textendash"),ae(ie,oe,be,"\u2014","---",!0),ae(ie,oe,be,"\u2014","\\textemdash"),ae(ie,oe,be,"\u2018","`",!0),ae(ie,oe,be,"\u2018","\\textquoteleft"),ae(ie,oe,be,"\u2019","'",!0),ae(ie,oe,be,"\u2019","\\textquoteright"),ae(ie,oe,be,"\u201c","``",!0),ae(ie,oe,be,"\u201c","\\textquotedblleft"),ae(ie,oe,be,"\u201d","''",!0),ae(ie,oe,be,"\u201d","\\textquotedblright"),ae(ne,oe,be,"\xb0","\\degree",!0),ae(ie,oe,be,"\xb0","\\degree"),ae(ie,oe,be,"\xb0","\\textdegree",!0),ae(ne,oe,be,"\xa3","\\pounds"),ae(ne,oe,be,"\xa3","\\mathsterling",!0),ae(ie,oe,be,"\xa3","\\pounds"),ae(ie,oe,be,"\xa3","\\textsterling",!0),ae(ne,se,be,"\u2720","\\maltese"),ae(ie,se,be,"\u2720","\\maltese");for(var xe='0123456789/@."',we=0;we<14;we++){var ke=xe.charAt(we);ae(ne,oe,be,ke,ke)}for(var ze='0123456789!@*()-=+";:?/.,',Se=0;Se<25;Se++){var Me=ze.charAt(Se);ae(ie,oe,be,Me,Me)}for(var Ae,Te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Be=0;Be<52;Be++){var Ce=Te.charAt(Be);ae(ne,oe,ue,Ce,Ce),ae(ie,oe,be,Ce,Ce)}ae(ne,se,be,"C","\u2102"),ae(ie,se,be,"C","\u2102"),ae(ne,se,be,"H","\u210d"),ae(ie,se,be,"H","\u210d"),ae(ne,se,be,"N","\u2115"),ae(ie,se,be,"N","\u2115"),ae(ne,se,be,"P","\u2119"),ae(ie,se,be,"P","\u2119"),ae(ne,se,be,"Q","\u211a"),ae(ie,se,be,"Q","\u211a"),ae(ne,se,be,"R","\u211d"),ae(ie,se,be,"R","\u211d"),ae(ne,se,be,"Z","\u2124"),ae(ie,se,be,"Z","\u2124"),ae(ne,oe,ue,"h","\u210e"),ae(ie,oe,ue,"h","\u210e");for(var qe=0;qe<52;qe++){var Ie=Te.charAt(qe);ae(ne,oe,ue,Ie,Ae=String.fromCharCode(55349,56320+qe)),ae(ie,oe,be,Ie,Ae),ae(ne,oe,ue,Ie,Ae=String.fromCharCode(55349,56372+qe)),ae(ie,oe,be,Ie,Ae),ae(ne,oe,ue,Ie,Ae=String.fromCharCode(55349,56424+qe)),ae(ie,oe,be,Ie,Ae),ae(ne,oe,ue,Ie,Ae=String.fromCharCode(55349,56580+qe)),ae(ie,oe,be,Ie,Ae),ae(ne,oe,ue,Ie,Ae=String.fromCharCode(55349,56684+qe)),ae(ie,oe,be,Ie,Ae),ae(ne,oe,ue,Ie,Ae=String.fromCharCode(55349,56736+qe)),ae(ie,oe,be,Ie,Ae),ae(ne,oe,ue,Ie,Ae=String.fromCharCode(55349,56788+qe)),ae(ie,oe,be,Ie,Ae),ae(ne,oe,ue,Ie,Ae=String.fromCharCode(55349,56840+qe)),ae(ie,oe,be,Ie,Ae),ae(ne,oe,ue,Ie,Ae=String.fromCharCode(55349,56944+qe)),ae(ie,oe,be,Ie,Ae),qe<26&&(ae(ne,oe,ue,Ie,Ae=String.fromCharCode(55349,56632+qe)),ae(ie,oe,be,Ie,Ae),ae(ne,oe,ue,Ie,Ae=String.fromCharCode(55349,56476+qe)),ae(ie,oe,be,Ie,Ae))}ae(ne,oe,ue,"k",Ae=String.fromCharCode(55349,56668)),ae(ie,oe,be,"k",Ae);for(var Re=0;Re<10;Re++){var Ee=Re.toString();ae(ne,oe,ue,Ee,Ae=String.fromCharCode(55349,57294+Re)),ae(ie,oe,be,Ee,Ae),ae(ne,oe,ue,Ee,Ae=String.fromCharCode(55349,57314+Re)),ae(ie,oe,be,Ee,Ae),ae(ne,oe,ue,Ee,Ae=String.fromCharCode(55349,57324+Re)),ae(ie,oe,be,Ee,Ae),ae(ne,oe,ue,Ee,Ae=String.fromCharCode(55349,57334+Re)),ae(ie,oe,be,Ee,Ae)}for(var He="\xd0\xde\xfe",Ne=0;Ne<3;Ne++){var Oe=He.charAt(Ne);ae(ne,oe,ue,Oe,Oe),ae(ie,oe,be,Oe,Oe)}var De={mathClass:"mathbf",textClass:"textbf",font:"Main-Bold"},Le={mathClass:"mathnormal",textClass:"textit",font:"Math-Italic"},Pe={mathClass:"boldsymbol",textClass:"boldsymbol",font:"Main-BoldItalic"},Fe={mathClass:"",textClass:"",font:""},Ve={mathClass:"mathfrak",textClass:"textfrak",font:"Fraktur-Regular"},Ge={mathClass:"mathbb",textClass:"textbb",font:"AMS-Regular"},Ue={mathClass:"mathboldfrak",textClass:"textboldfrak",font:"Fraktur-Regular"},Xe={mathClass:"mathsf",textClass:"textsf",font:"SansSerif-Regular"},Ye={mathClass:"mathboldsf",textClass:"textboldsf",font:"SansSerif-Bold"},We={mathClass:"mathitsf",textClass:"textitsf",font:"SansSerif-Italic"},je={mathClass:"mathtt",textClass:"texttt",font:"Typewriter-Regular"},_e=[De,De,Le,Le,Pe,Pe,{mathClass:"mathscr",textClass:"textscr",font:"Script-Regular"},Fe,Fe,Fe,Ve,Ve,Ge,Ge,Ue,Ue,Xe,Xe,Ye,Ye,We,We,Fe,Fe,je,je],$e=[De,Fe,Xe,Ye,je],Ze=function(e,t,r){if(re[r][e]){var a=re[r][e].replace;a&&(e=a)}return{value:e,metrics:ee(e,t,r)}},Ke=function(e,t,r,a,n){var i,o=Ze(e,t,r),s=o.metrics;if(e=o.value,s){var l=s.italic;("text"===r||a&&"mathit"===a.font)&&(l=0),i=new j(e,s.height,s.depth,l,s.skew,s.width,n)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+r+"'"),i=new j(e,0,0,0,0,0,n);if(a){i.maxFontSize=a.sizeMultiplier,a.style.isTight()&&i.classes.push("mtight");var h=a.getColor();h&&(i.style.color=h)}return i},Je=function(e,t,r,a){return void 0===a&&(a=[]),"boldsymbol"===r.font&&Ze(e,"Main-Bold",t).metrics?Ke(e,"Main-Bold",t,r,a.concat(["mathbf"])):"\\"===e||"main"===re[t][e].font?Ke(e,"Main-Regular",t,r,a):Ke(e,"AMS-Regular",t,r,a.concat(["amsrm"]))},Qe=function(e,t,r){var n=e.mode,i=e.text,o=["mord"],{font:s,fontFamily:l,fontWeight:h,fontShape:m}=t,c="math"===n||"text"===n&&!!s,u=c?s:l,p="",d="";if(55349===i.charCodeAt(0)){var g=(e=>{var t=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536;if(119808<=t&&t<120484){var r=Math.floor((t-119808)/26);return _e[r]}if(120782<=t&&t<=120831){var n=Math.floor((t-120782)/10);return $e[n]}if(120485===t||120486===t)return _e[0];if(120486{if(D(e.classes)!==D(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||0!==e.italic&&e.hasClass("mathnormal"))return!1;if(1===e.classes.length){var r=e.classes[0];if("mbin"===r||"mord"===r)return!1}for(var a of Object.keys(e.style))if(e.style[a]!==t.style[a])return!1;for(var n of Object.keys(t.style))if(e.style[n]!==t.style[n])return!1;return!0},tt=e=>{for(var t=0;tt&&(t=i.height),i.depth>r&&(r=i.depth),i.maxFontSize>a&&(a=i.maxFontSize)}e.height=t,e.depth=r,e.maxFontSize=a},at=function(e,t,r,a){var n=new U(e,t,r,a);return rt(n),n},nt=(e,t,r,a)=>new U(e,t,r,a),it=function(e,t,r){var a=at([e],[],t);return a.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),a.style.borderBottomWidth=O(a.height),a.maxFontSize=1,a},ot=function(e){var t=new I(e);return rt(t),t},st=function(e,t){return e instanceof I?at([],[e],t):e},lt=function(e,t){for(var{children:r,depth:a}=function(e){if("individualShift"===e.positionType){for(var t=e.children,r=[t[0]],a=-t[0].shift-t[0].elem.depth,n=a,i=1;i{var r=at(["mspace"],[],t),a=N(e,t);return r.style.marginRight=O(a),r},mt=(e,t,r)=>{var a;switch(e){case"amsrm":a="AMS";break;case"textrm":a="Main";break;case"textsf":a="SansSerif";break;case"texttt":a="Typewriter";break;default:a=e}return a+"-"+("textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===r?"Italic":"Regular")},ct={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},ut={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},pt=function(e,t){var[r,a,n]=ut[e],i=new $(r),o=new _([i],{width:O(a),height:O(n),style:"width:"+O(a),viewBox:"0 0 "+1e3*a+" "+1e3*n,preserveAspectRatio:"xMinYMin"}),s=nt(["overlay"],[o],t);return s.height=n,s.style.height=O(n),s.style.width=O(a),s},dt={number:3,unit:"mu"},gt={number:4,unit:"mu"},ft={number:5,unit:"mu"},vt={mord:{mop:dt,mbin:gt,mrel:ft,minner:dt},mop:{mord:dt,mop:dt,mrel:ft,minner:dt},mbin:{mord:gt,mop:gt,mopen:gt,minner:gt},mrel:{mord:ft,mop:ft,mopen:ft,minner:ft},mopen:{},mclose:{mop:dt,mbin:gt,mrel:ft,minner:dt},mpunct:{mord:dt,mop:dt,mrel:ft,mopen:dt,mclose:dt,mpunct:dt,minner:dt},minner:{mord:dt,mop:dt,mbin:gt,mrel:ft,mopen:dt,mpunct:dt,minner:dt}},bt={mord:{mop:dt},mop:{mord:dt,mop:dt},mbin:{},mrel:{},mopen:{},mclose:{mop:dt},mpunct:{},minner:{mop:dt}},yt={},xt={},wt={};function kt(e){for(var{type:t,names:r,props:a,handler:n,htmlBuilder:i,mathmlBuilder:o}=e,s={type:t,numArgs:a.numArgs,argTypes:a.argTypes,allowedInArgument:!!a.allowedInArgument,allowedInText:!!a.allowedInText,allowedInMath:void 0===a.allowedInMath||a.allowedInMath,numOptionalArgs:a.numOptionalArgs||0,infix:!!a.infix,primitive:!!a.primitive,handler:n},l=0;l{var r=t.classes[0],a=e.classes[0];"mbin"===r&&Tt.has(a)?t.classes[0]="mord":"mbin"===a&&At.has(r)&&(e.classes[0]="mord")},{node:m},c,u),It(n,(e,t)=>{var r,a,n=Ht(t),i=Ht(e),o=n&&i?e.hasClass("mtight")?null==(r=bt[n])?void 0:r[i]:null==(a=vt[n])?void 0:a[i]:null;if(o)return ht(o,l)},{node:m},c,u),n},It=function(e,t,r,a,n){a&&e.push(a);for(var i=0;ir=>{e.splice(t+1,0,r),i++})(i)}}a&&e.pop()},Rt=function(e){return e instanceof I||e instanceof X||e instanceof U&&e.hasClass("enclosing")?e:null},Et=function(e,t){var r=Rt(e);if(r){var a=r.children;if(a.length){if("right"===t)return Et(a[a.length-1],"right");if("left"===t)return Et(a[0],"left")}}return e},Ht=function(e,t){if(!e)return null;t&&(e=Et(e,t));var r=e.classes[0];return Ct[r]||null},Nt=function(e,t){var r=["nulldelimiter"].concat(e.baseSizingClasses());return at(t.concat(r))},Ot=function(e,t,r){if(!e)return at();if(xt[e.type]){var n=xt[e.type](e,t);if(r&&t.size!==r.size){n=at(t.sizingClasses(r),[n],t);var i=t.sizeMultiplier/r.sizeMultiplier;n.height*=i,n.depth*=i}return n}throw new a("Got group of unknown type: '"+e.type+"'")};function Dt(e,t){var r=at(["base"],e,t),a=at(["strut"]);return a.style.height=O(r.height+r.depth),r.depth&&(a.style.verticalAlign=O(-r.depth)),r.children.unshift(a),r}function Lt(e,t){var r=null;1===e.length&&"tag"===e[0].type&&(r=e[0].tag,e=e[0].body);var a,n=qt(e,t,"root");2===n.length&&n[1].hasClass("tag")&&(a=n.pop());for(var i,o=[],s=[],l=0;l0&&(o.push(Dt(s,t)),s=[]),o.push(n[l]));s.length>0&&o.push(Dt(s,t)),r?((i=Dt(qt(r,t,!0),t)).classes=["tag"],o.push(i)):a&&o.push(a);var m=at(["katex-html"],o);if(m.setAttribute("aria-hidden","true"),i){var c=i.children[0];c.style.height=O(m.height+m.depth),m.depth&&(c.style.verticalAlign=O(-m.depth))}return m}function Pt(e){return new I(e)}class Ft{constructor(e,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=r||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=D(this.classes));for(var r=0;r0&&(e+=' class ="'+l(D(this.classes))+'"'),e+=">";for(var r=0;r"}toText(){return this.children.map(e=>e.toText()).join("")}}class Vt{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return l(this.toText())}toText(){return this.text}}class Gt{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?"\u200a":e>=.1666&&e<=.1667?"\u2009":e>=.2222&&e<=.2223?"\u2005":e>=.2777&&e<=.2778?"\u2005\u200a":e>=-.05556&&e<=-.05555?"\u200a\u2063":e>=-.1667&&e<=-.1666?"\u2009\u2063":e>=-.2223&&e<=-.2222?"\u205f\u2063":e>=-.2778&&e<=-.2777?"\u2005\u2063":null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",O(this.width)),e}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var Ut=new Set(["\\imath","\\jmath"]),Xt=new Set(["mrow","mtable"]),Yt=function(e,t,r){return!re[t][e]||!re[t][e].replace||55349===e.charCodeAt(0)||ye.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(e=re[t][e].replace),new Vt(e)},Wt=function(e){return 1===e.length?e[0]:new Ft("mrow",e)},jt={mathit:"italic",boldsymbol:e=>"textord"===e.type?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},_t=(e,t)=>{if("text"===e.mode){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold"}var r=t.font;if(!r||"mathnormal"===r)return null;var a=e.mode,n=jt[r];if(n)return"function"==typeof n?n(e):n;var i=e.text;if(Ut.has(i))return null;if(re[a][i]){var o=re[a][i].replace;o&&(i=o)}return ee(i,ct[r].fontName,a)?ct[r].variant:null};function $t(e){if(!e)return!1;if("mi"===e.type&&1===e.children.length){var t=e.children[0];return t instanceof Vt&&"."===t.text}if("mo"===e.type&&1===e.children.length&&"true"===e.getAttribute("separator")&&"0em"===e.getAttribute("lspace")&&"0em"===e.getAttribute("rspace")){var r=e.children[0];return r instanceof Vt&&","===r.text}return!1}var Zt=function(e,t,r){if(1===e.length){var a=Jt(e[0],t);return r&&a instanceof Ft&&"mo"===a.type&&(a.setAttribute("lspace","0em"),a.setAttribute("rspace","0em")),[a]}for(var n,i=[],o=0;o=1&&("mn"===n.type||$t(n))){var l=s.children[0];l instanceof Ft&&"mn"===l.type&&(l.children=[...n.children,...l.children],i.pop())}else if("mi"===n.type&&1===n.children.length){var h=n.children[0];if(h instanceof Vt&&"\u0338"===h.text&&("mo"===s.type||"mi"===s.type||"mn"===s.type)){var m=s.children[0];m instanceof Vt&&m.text.length>0&&(m.text=m.text.slice(0,1)+"\u0338"+m.text.slice(1),i.pop())}}}i.push(s),n=s}return i},Kt=function(e,t,r){return Wt(Zt(e,t,r))},Jt=function(e,t){if(!e)return new Ft("mrow");if(wt[e.type])return wt[e.type](e,t);throw new a("Got group of unknown type: '"+e.type+"'")};function Qt(e,t,r,a,n){var i,o=Zt(e,r);i=1===o.length&&o[0]instanceof Ft&&Xt.has(o[0].type)?o[0]:new Ft("mrow",o);var s=new Ft("annotation",[new Vt(t)]);s.setAttribute("encoding","application/x-tex");var l=new Ft("semantics",[i,s]),h=new Ft("math",[l]);return h.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),a&&h.setAttribute("display","block"),at([n?"katex":"katex-mathml"],[h])}var er=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],tr=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],rr=function(e,t){return t.size<2?e:er[e-1][t.size-1]};class ar{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||ar.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=tr[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(t,e),new ar(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:rr(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:tr[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=rr(ar.BASESIZE,e);return this.size===t&&this.textSize===ar.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==ar.BASESIZE?["sizing","reset-size"+this.size,"size"+ar.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!te[t=e>=5?0:e>=3?1:2]){var r=te[t]={cssEmPerMu:J.quad[t]/18};for(var a in J)J.hasOwnProperty(a)&&(r[a]=J[a][t])}return te[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}ar.BASESIZE=6;var nr=function(e){return new ar({style:e.displayMode?S.DISPLAY:S.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},ir=function(e,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),e=at(r,[e])}return e},or={widehat:"^",widecheck:"\u02c7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23df",overbrace:"\u23de",underbracket:"\u23b5",overbracket:"\u23b4",overgroup:"\u23e0",undergroup:"\u23e1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21d2",xRightarrow:"\u21d2",overleftharpoon:"\u21bc",xleftharpoonup:"\u21bc",overrightharpoon:"\u21c0",xrightharpoonup:"\u21c0",xLeftarrow:"\u21d0",xLeftrightarrow:"\u21d4",xhookleftarrow:"\u21a9",xhookrightarrow:"\u21aa",xmapsto:"\u21a6",xrightharpoondown:"\u21c1",xleftharpoondown:"\u21bd",xrightleftharpoons:"\u21cc",xleftrightharpoons:"\u21cb",xtwoheadleftarrow:"\u219e",xtwoheadrightarrow:"\u21a0",xlongequal:"=",xtofrom:"\u21c4",xrightleftarrows:"\u21c4",xrightequilibrium:"\u21cc",xleftequilibrium:"\u21cb","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},sr=function(e){var t=new Ft("mo",[new Vt(or[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},lr={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},hr=new Set(["widehat","widecheck","widetilde","utilde"]),mr=function(e,t){var{span:r,minWidth:a,height:n}=function(){var r=4e5,a=e.label.slice(1);if(hr.has(a)&&"base"in e){var n,i,o,s="ordgroup"===e.base.type?e.base.body.length:1;if(s>5)"widehat"===a||"widecheck"===a?(n=420,r=2364,o=.42,i=a+"4"):(n=312,r=2340,o=.34,i="tilde4");else{var l=[1,1,2,2,3,3][s];"widehat"===a||"widecheck"===a?(r=[0,1062,2364,2364,2364][l],n=[0,239,300,360,420][l],o=[0,.24,.3,.3,.36,.42][l],i=a+l):(r=[0,600,1033,2339,2340][l],n=[0,260,286,306,312][l],o=[0,.26,.286,.3,.306,.34][l],i="tilde"+l)}var h=new $(i),m=new _([h],{width:"100%",height:O(o),viewBox:"0 0 "+r+" "+n,preserveAspectRatio:"none"});return{span:nt([],[m],t),minWidth:0,height:o}}var c=[],u=lr[a];if(!u)throw new Error('No SVG data for "'+a+'".');var p,d,[g,f,v]=u,b=v/1e3,y=g.length;if(1===y){if(4!==u.length)throw new Error('Expected 4-tuple for single-path SVG data "'+a+'".');p=["hide-tail"],d=[u[3]]}else if(2===y)p=["halfarrow-left","halfarrow-right"],d=["xMinYMin","xMaxYMin"];else{if(3!==y)throw new Error("Correct katexImagesData or update code here to support\n "+y+" children.");p=["brace-left","brace-center","brace-right"],d=["xMinYMin","xMidYMin","xMaxYMin"]}for(var x=0;x0&&(r.style.minWidth=O(a)),r},cr={bin:1,close:1,inner:1,open:1,punct:1,rel:1},ur={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function pr(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function dr(e){var t=gr(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function gr(e){return e&&("atom"===e.type||ur.hasOwnProperty(e.type))?e:null}var fr=e=>{return e instanceof j?e:((t=e)instanceof U||t instanceof X||t instanceof I)&&1===e.children.length?fr(e.children[0]):void 0;var t},vr=(e,t)=>{var r,a,n;e&&"supsub"===e.type?(r=(a=pr(e.base,"accent")).base,e.base=r,n=function(e){if(e instanceof U)return e;throw new Error("Expected span but got "+String(e)+".")}(Ot(e,t)),e.base=a):r=(a=pr(e,"accent")).base;var i,o,s=Ot(r,t.havingCrampedStyle()),l=0;a.isShifty&&c(r)&&(l=null!=(i=null==(o=fr(s))?void 0:o.skew)?i:0);var h,m="\\c"===a.label,u=m?s.height+s.depth:Math.min(s.height,t.fontMetrics().xHeight);if(a.isStretchy)h=mr(a,t),h=lt({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:h,wrapperClasses:["svg-align"],wrapperStyle:l>0?{width:"calc(100% - "+O(2*l)+")",marginLeft:O(2*l)}:void 0}]});else{var p,d;"\\vec"===a.label?(p=pt("vec",t),d=ut.vec[1]):(p=function(e){if(e instanceof j)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}(p=Qe({type:"textord",mode:a.mode,text:a.label},t,"textord")),p.italic=0,d=p.width,m&&(u+=p.depth)),h=at(["accent-body"],[p]);var g="\\textcircled"===a.label;g&&(h.classes.push("accent-full"),u=s.height);var f=l;g||(f-=d/2),h.style.left=O(f),"\\textcircled"===a.label&&(h.style.top=".2em"),h=lt({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-u},{type:"elem",elem:h}]})}var v=at(["mord","accent"],[h],t);return n?(n.children[0]=v,n.height=Math.max(v.height,n.height),n.classes[0]="mord",n):v},br=(e,t)=>{var r=e.isStretchy?sr(e.label):new Ft("mo",[Yt(e.label,e.mode)]),a=new Ft("mover",[Jt(e.base,t),r]);return a.setAttribute("accent","true"),a},yr=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));kt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var r=St(t[0]),a=!yr.test(e.funcName),n=!a||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:a,isShifty:n,base:r}},htmlBuilder:vr,mathmlBuilder:br}),kt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var r=t[0],a=e.parser.mode;return"math"===a&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),a="text"),{type:"accent",mode:a,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:vr,mathmlBuilder:br}),kt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0];return{type:"accentUnder",mode:r.mode,label:a,base:n}},htmlBuilder:(e,t)=>{var r=Ot(e.base,t),a=mr(e,t),n="\\utilde"===e.label?.12:0,i=lt({positionType:"top",positionData:r.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:n},{type:"elem",elem:r}]});return at(["mord","accentunder"],[i],t)},mathmlBuilder:(e,t)=>{var r=sr(e.label),a=new Ft("munder",[Jt(e.base,t),r]);return a.setAttribute("accentunder","true"),a}});var xr=e=>{var t=new Ft("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};function wr(e,t){var r=qt(e.body,t,!0);return at([e.mclass],r,t)}function kr(e,t){var r,a=Zt(e.body,t);return"minner"===e.mclass?r=new Ft("mpadded",a):"mord"===e.mclass?e.isCharacterBox?(r=a[0]).type="mi":r=new Ft("mi",a):(e.isCharacterBox?(r=a[0]).type="mo":r=new Ft("mo",a),"mbin"===e.mclass?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):"mpunct"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===e.mclass&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}kt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:a,funcName:n}=e;return{type:"xArrow",mode:a.mode,label:n,body:t[0],below:r[0]}},htmlBuilder(e,t){var r,a=t.style,n=t.havingStyle(a.sup()),i=st(Ot(e.body,n,t),t),o="\\x"===e.label.slice(0,2)?"x":"cd";i.classes.push(o+"-arrow-pad"),e.below&&(n=t.havingStyle(a.sub()),(r=st(Ot(e.below,n,t),t)).classes.push(o+"-arrow-pad"));var s,l=mr(e,t),h=-t.fontMetrics().axisHeight+.5*l.height,m=-t.fontMetrics().axisHeight-.5*l.height-.111;if((i.depth>.25||"\\xleftequilibrium"===e.label)&&(m-=i.depth),r){var c=-t.fontMetrics().axisHeight+r.height+.5*l.height+.111;s=lt({positionType:"individualShift",children:[{type:"elem",elem:i,shift:m},{type:"elem",elem:l,shift:h,wrapperClasses:["svg-align"]},{type:"elem",elem:r,shift:c}]})}else s=lt({positionType:"individualShift",children:[{type:"elem",elem:i,shift:m},{type:"elem",elem:l,shift:h,wrapperClasses:["svg-align"]}]});return at(["mrel","x-arrow"],[s],t)},mathmlBuilder(e,t){var r,a=sr(e.label);if(a.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var n=xr(Jt(e.body,t));if(e.below){var i=xr(Jt(e.below,t));r=new Ft("munderover",[a,i,n])}else r=new Ft("mover",[a,n])}else if(e.below){var o=xr(Jt(e.below,t));r=new Ft("munder",[a,o])}else r=xr(),r=new Ft("mover",[a,r]);return r}}),kt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+a.slice(5),body:Mt(n),isCharacterBox:c(n)}},htmlBuilder:wr,mathmlBuilder:kr});var zr=e=>{var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};kt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:zr(t[0]),body:Mt(t[1]),isCharacterBox:c(t[1])}}}),kt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var r,{parser:a,funcName:n}=e,i=t[1],o=t[0];r="\\stackrel"!==n?zr(i):"mrel";var s={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==n,body:Mt(i)},l={type:"supsub",mode:o.mode,base:s,sup:"\\underset"===n?null:o,sub:"\\underset"===n?o:null};return{type:"mclass",mode:a.mode,mclass:r,body:[l],isCharacterBox:c(l)}},htmlBuilder:wr,mathmlBuilder:kr}),kt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:zr(t[0]),body:Mt(t[0])}},htmlBuilder(e,t){var r=qt(e.body,t,!0),a=at([e.mclass],r,t);return a.style.textShadow="0.02em 0.01em 0.04px",a},mathmlBuilder(e,t){var r=Zt(e.body,t),a=new Ft("mstyle",r);return a.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),a}});var Sr={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Mr=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),Ar=e=>"textord"===e.type&&"@"===e.text,Tr=(e,t)=>("mathord"===e.type||"atom"===e.type)&&e.text===t;function Br(e,t,r){var a=Sr[e];switch(a){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(a,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var n={type:"atom",text:a,mode:"math",family:"rel"},i={type:"ordgroup",mode:"math",body:[r.callFunction("\\\\cdleft",[t[0]],[]),r.callFunction("\\Big",[n],[]),r.callFunction("\\\\cdright",[t[1]],[])]};return r.callFunction("\\\\cdparent",[i],[]);case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return r.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}kt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:a}=e;return{type:"cdlabel",mode:r.mode,side:a.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup()),a=st(Ot(e.label,r,t),t);return a.classes.push("cd-label-"+e.side),a.style.bottom=O(.8-a.depth),a.height=0,a.depth=0,a},mathmlBuilder(e,t){var r=new Ft("mrow",[Jt(e.label,t)]);return(r=new Ft("mpadded",[r])).setAttribute("width","0"),"left"===e.side&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),(r=new Ft("mstyle",[r])).setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),kt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:r}=e;return{type:"cdlabelparent",mode:r.mode,fragment:t[0]}},htmlBuilder(e,t){var r=st(Ot(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder:(e,t)=>new Ft("mrow",[Jt(e.fragment,t)])}),kt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:r}=e,n=pr(t[0],"ordgroup").body,i="",o=0;o=1114111)throw new a("\\@char with invalid code point "+i);return l<=65535?s=String.fromCharCode(l):(l-=65536,s=String.fromCharCode(55296+(l>>10),56320+(1023&l))),{type:"textord",mode:r.mode,text:s}}});var Cr=(e,t)=>{var r=qt(e.body,t.withColor(e.color),!1);return ot(r)},qr=(e,t)=>{var r=Zt(e.body,t.withColor(e.color)),a=new Ft("mstyle",r);return a.setAttribute("mathcolor",e.color),a};kt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:r}=e,a=pr(t[0],"color-token").color,n=t[1];return{type:"color",mode:r.mode,color:a,body:Mt(n)}},htmlBuilder:Cr,mathmlBuilder:qr}),kt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:r,breakOnTokenText:a}=e,n=pr(t[0],"color-token").color;r.gullet.macros.set("\\current@color",n);var i=r.parseExpression(!0,a);return{type:"color",mode:r.mode,color:n,body:i}},htmlBuilder:Cr,mathmlBuilder:qr}),kt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var{parser:a}=e,n="["===a.gullet.future().text?a.parseSizeGroup(!0):null,i=!a.settings.displayMode||!a.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:a.mode,newLine:i,size:n&&pr(n,"size").value}},htmlBuilder(e,t){var r=at(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=O(N(e.size,t)))),r},mathmlBuilder(e,t){var r=new Ft("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",O(N(e.size,t)))),r}});var Ir={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Rr=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new a("Expected a control sequence",e);return t},Er=(e,t,r,a)=>{var n=e.gullet.macros.get(r.text);null==n&&(r.noexpand=!0,n={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,n,a)};kt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:r}=e;t.consumeSpaces();var n=t.fetch();if(Ir[n.text])return"\\global"!==r&&"\\\\globallong"!==r||(n.text=Ir[n.text]),pr(t.parseFunction(),"internal");throw new a("Invalid token after macro prefix",n)}}),kt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=t.gullet.popToken(),i=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new a("Expected a control sequence",n);for(var o,s=0,l=[[]];"{"!==t.gullet.future().text;)if("#"===(n=t.gullet.popToken()).text){if("{"===t.gullet.future().text){o=t.gullet.future(),l[s].push("{");break}if(n=t.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new a('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==s+1)throw new a('Argument number "'+n.text+'" out of order');s++,l.push([])}else{if("EOF"===n.text)throw new a("Expected a macro definition");l[s].push(n.text)}var{tokens:h}=t.gullet.consumeArg();return o&&h.unshift(o),"\\edef"!==r&&"\\xdef"!==r||(h=t.gullet.expandTokens(h)).reverse(),t.gullet.macros.set(i,{tokens:h,numArgs:s,delimiters:l},r===Ir[r]),{type:"internal",mode:t.mode}}}),kt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,a=Rr(t.gullet.popToken());t.gullet.consumeSpaces();var n=(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t})(t);return Er(t,a,n,"\\\\globallet"===r),{type:"internal",mode:t.mode}}}),kt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,a=Rr(t.gullet.popToken()),n=t.gullet.popToken(),i=t.gullet.popToken();return Er(t,a,i,"\\\\globalfuture"===r),t.gullet.pushToken(i),t.gullet.pushToken(n),{type:"internal",mode:t.mode}}});var Hr=function(e,t,r){var a=ee(re.math[e]&&re.math[e].replace||e,t,r);if(!a)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return a},Nr=function(e,t,r,a){var n=r.havingBaseStyle(t),i=at(a.concat(n.sizingClasses(r)),[e],r),o=n.sizeMultiplier/r.sizeMultiplier;return i.height*=o,i.depth*=o,i.maxFontSize=n.sizeMultiplier,i},Or=function(e,t,r){var a=t.havingBaseStyle(r),n=(1-t.sizeMultiplier/a.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=O(n),e.height-=n,e.depth+=n},Dr=function(e,t,r,a,n,i){var o=function(e,t,r,a){return Ke(e,"Size"+t+"-Regular",r,a)}(e,t,n,a),s=Nr(at(["delimsizing","size"+t],[o],a),S.TEXT,a,i);return r&&Or(s,a,S.TEXT),s},Lr=function(e,t,r){return{type:"elem",elem:at(["delimsizinginner","Size1-Regular"===t?"delim-size1":"delim-size4"],[at([],[Ke(e,t,r)])])}},Pr=function(e,t,r){var a=K["Size4-Regular"][e.charCodeAt(0)]?K["Size4-Regular"][e.charCodeAt(0)][4]:K["Size1-Regular"][e.charCodeAt(0)][4],n=new $("inner",function(e,t){switch(e){case"\u239c":return B("M291 0 H417 V"+t+" H291z");case"\u2223":return B("M145 0 H188 V"+t+" H145z");case"\u2225":return B("M145 0 H188 V"+t+" H145z")+B("M367 0 H410 V"+t+" H367z");case"\u239f":return B("M457 0 H583 V"+t+" H457z");case"\u23a2":return B("M319 0 H403 V"+t+" H319z");case"\u23a5":return B("M263 0 H347 V"+t+" H263z");case"\u23aa":return B("M384 0 H504 V"+t+" H384z");case"\u23d0":return B("M312 0 H355 V"+t+" H312z");case"\u2016":return B("M257 0 H300 V"+t+" H257z")+B("M478 0 H521 V"+t+" H478z");default:return""}}(e,Math.round(1e3*t))),i=new _([n],{width:O(a),height:O(t),style:"width:"+O(a),viewBox:"0 0 "+1e3*a+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=nt([],[i],r);return o.height=t,o.style.height=O(t),o.style.width=O(a),{type:"elem",elem:o}},Fr={type:"kern",size:-.008},Vr=new Set(["|","\\lvert","\\rvert","\\vert"]),Gr=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),Ur=function(e,t,r,a,n,i){var o,s,l,h,m="",c=0;o=l=h=e,s=null;var u="Size1-Regular";"\\uparrow"===e?l=h="\u23d0":"\\Uparrow"===e?l=h="\u2016":"\\downarrow"===e?o=l="\u23d0":"\\Downarrow"===e?o=l="\u2016":"\\updownarrow"===e?(o="\\uparrow",l="\u23d0",h="\\downarrow"):"\\Updownarrow"===e?(o="\\Uparrow",l="\u2016",h="\\Downarrow"):Vr.has(e)?(l="\u2223",m="vert",c=333):Gr.has(e)?(l="\u2225",m="doublevert",c=556):"["===e||"\\lbrack"===e?(o="\u23a1",l="\u23a2",h="\u23a3",u="Size4-Regular",m="lbrack",c=667):"]"===e||"\\rbrack"===e?(o="\u23a4",l="\u23a5",h="\u23a6",u="Size4-Regular",m="rbrack",c=667):"\\lfloor"===e||"\u230a"===e?(l=o="\u23a2",h="\u23a3",u="Size4-Regular",m="lfloor",c=667):"\\lceil"===e||"\u2308"===e?(o="\u23a1",l=h="\u23a2",u="Size4-Regular",m="lceil",c=667):"\\rfloor"===e||"\u230b"===e?(l=o="\u23a5",h="\u23a6",u="Size4-Regular",m="rfloor",c=667):"\\rceil"===e||"\u2309"===e?(o="\u23a4",l=h="\u23a5",u="Size4-Regular",m="rceil",c=667):"("===e||"\\lparen"===e?(o="\u239b",l="\u239c",h="\u239d",u="Size4-Regular",m="lparen",c=875):")"===e||"\\rparen"===e?(o="\u239e",l="\u239f",h="\u23a0",u="Size4-Regular",m="rparen",c=875):"\\{"===e||"\\lbrace"===e?(o="\u23a7",s="\u23a8",h="\u23a9",l="\u23aa",u="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(o="\u23ab",s="\u23ac",h="\u23ad",l="\u23aa",u="Size4-Regular"):"\\lgroup"===e||"\u27ee"===e?(o="\u23a7",h="\u23a9",l="\u23aa",u="Size4-Regular"):"\\rgroup"===e||"\u27ef"===e?(o="\u23ab",h="\u23ad",l="\u23aa",u="Size4-Regular"):"\\lmoustache"===e||"\u23b0"===e?(o="\u23a7",h="\u23ad",l="\u23aa",u="Size4-Regular"):"\\rmoustache"!==e&&"\u23b1"!==e||(o="\u23ab",h="\u23a9",l="\u23aa",u="Size4-Regular");var p=Hr(o,u,n),d=p.height+p.depth,g=Hr(l,u,n),f=g.height+g.depth,v=Hr(h,u,n),b=v.height+v.depth,y=0,x=1;if(null!==s){var w=Hr(s,u,n);y=w.height+w.depth,x=2}var k=d+b+y,z=k+Math.max(0,Math.ceil((t-k)/(x*f)))*x*f,M=a.fontMetrics().axisHeight;r&&(M*=a.sizeMultiplier);var A=z/2-M,T=[];if(m.length>0){var B=z-d-b,C=Math.round(1e3*z),q=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 v84 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 v84 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(m,Math.round(1e3*B)),I=new $(m,q),R=O(c/1e3),E=O(C/1e3),H=new _([I],{width:R,height:E,viewBox:"0 0 "+c+" "+C}),N=nt([],[H],a);N.height=C/1e3,N.style.width=R,N.style.height=E,T.push({type:"elem",elem:N})}else{if(T.push(Lr(h,u,n)),T.push(Fr),null===s){var D=z-d-b+.016;T.push(Pr(l,D,a))}else{var L=(z-d-b-y)/2+.016;T.push(Pr(l,L,a)),T.push(Fr),T.push(Lr(s,u,n)),T.push(Fr),T.push(Pr(l,L,a))}T.push(Fr),T.push(Lr(o,u,n))}var P=a.havingBaseStyle(S.TEXT),F=lt({positionType:"bottom",positionData:A,children:T});return Nr(at(["delimsizing","mult"],[F],P),S.TEXT,a,i)},Xr=.08,Yr=function(e,t,r,a,n){var i=function(e,t,r){t*=1e3;var a="";switch(e){case"sqrtMain":a=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,C);break;case"sqrtSize1":a=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,C);break;case"sqrtSize2":a=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,C);break;case"sqrtSize3":a=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,C);break;case"sqrtSize4":a=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,C);break;case"sqrtTall":a=function(e,t,r){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(r-54-t-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,C,r)}return a}(e,a,r),o=new $(e,i),s=new _([o],{width:"400em",height:O(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return nt(["hide-tail"],[s],n)},Wr=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","\\surd"]),jr=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1"]),_r=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),$r=[0,1.2,1.8,2.4,3],Zr=function(e,t,r,n,i){if("<"===e||"\\lt"===e||"\u27e8"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"\u27e9"!==e||(e="\\rangle"),Wr.has(e)||_r.has(e))return Dr(e,t,!1,r,n,i);if(jr.has(e))return Ur(e,$r[t],!1,r,n,i);throw new a("Illegal delimiter: '"+e+"'")},Kr=[{type:"small",style:S.SCRIPTSCRIPT},{type:"small",style:S.SCRIPT},{type:"small",style:S.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Jr=[{type:"small",style:S.SCRIPTSCRIPT},{type:"small",style:S.SCRIPT},{type:"small",style:S.TEXT},{type:"stack"}],Qr=[{type:"small",style:S.SCRIPTSCRIPT},{type:"small",style:S.SCRIPT},{type:"small",style:S.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],ea=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";var t=e.type;throw new Error("Add support for delim type '"+t+"' here.")},ta=function(e,t,r,a){for(var n=Math.min(2,3-a.style.size);nt)return i}return r[r.length-1]},ra=function(e,t,r,a,n,i){var o;"<"===e||"\\lt"===e||"\u27e8"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"\u27e9"!==e||(e="\\rangle"),o=_r.has(e)?Kr:Wr.has(e)?Qr:Jr;var s=ta(e,t,o,a);return"small"===s.type?function(e,t,r,a,n,i){var o=Ke(e,"Main-Regular",n,a),s=Nr(o,t,a,i);return r&&Or(s,a,t),s}(e,s.style,r,a,n,i):"large"===s.type?Dr(e,s.size,r,a,n,i):Ur(e,t,r,a,n,i)},aa=function(e,t,r,a,n,i){var o=a.fontMetrics().axisHeight*a.sizeMultiplier,s=5/a.fontMetrics().ptPerEm,l=Math.max(t-o,r+o),h=Math.max(l/500*901,2*l-s);return ra(e,h,!0,a,n,i)},na={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},ia=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27e8","\\rangle","\u27e9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function oa(e){return"isMiddle"in e}function sa(e,t){var r=gr(e);if(r&&ia.has(r.text))return r;throw new a(r?"Invalid delimiter '"+r.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function la(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}kt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var r=sa(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:na[e.funcName].size,mclass:na[e.funcName].mclass,delim:r.text}},htmlBuilder:(e,t)=>"."===e.delim?at([e.mclass]):Zr(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];"."!==e.delim&&t.push(Yt(e.delim,e.mode));var r=new Ft("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var a=O($r[e.size]);return r.setAttribute("minsize",a),r.setAttribute("maxsize",a),r}}),kt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new a("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:sa(t[0],e).text,color:r}}}),kt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=sa(t[0],e),a=e.parser;++a.leftrightDepth;var n=a.parseExpression(!1);--a.leftrightDepth,a.expect("\\right",!1);var i=pr(a.parseFunction(),"leftright-right");return{type:"leftright",mode:a.mode,body:n,left:r.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,t)=>{la(e);for(var r,a,n=qt(e.body,t,!0,["mopen","mclose"]),i=0,o=0,s=!1,l=0;l{la(e);var r=Zt(e.body,t);if("."!==e.left){var a=new Ft("mo",[Yt(e.left,e.mode)]);a.setAttribute("fence","true"),r.unshift(a)}if("."!==e.right){var n=new Ft("mo",[Yt(e.right,e.mode)]);n.setAttribute("fence","true"),e.rightColor&&n.setAttribute("mathcolor",e.rightColor),r.push(n)}return Wt(r)}}),kt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=sa(t[0],e);if(!e.parser.leftrightDepth)throw new a("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{var r;return"."===e.delim?r=Nt(t,[]):(r=Zr(e.delim,1,t,e.mode,[])).isMiddle={delim:e.delim,options:t},r},mathmlBuilder:(e,t)=>{var r="\\vert"===e.delim||"|"===e.delim?Yt("|","text"):Yt(e.delim,e.mode),a=new Ft("mo",[r]);return a.setAttribute("fence","true"),a.setAttribute("lspace","0.05em"),a.setAttribute("rspace","0.05em"),a}});var ha=(e,t)=>{var r,a,n,i,o=st(Ot(e.body,t),t),s=e.label.slice(1),l=t.sizeMultiplier,h=c(e.body);if("sout"===s)(r=at(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/l,a=-.5*t.fontMetrics().xHeight;else if("phase"===s){var m=N({number:.6,unit:"pt"},t),u=N({number:.35,unit:"ex"},t);l/=t.havingBaseSizing().sizeMultiplier;var p=o.height+o.depth+m+u;o.style.paddingLeft=O(p/2+m);var d=Math.floor(1e3*p*l),g="M400000 "+(n=d)+" H0 L"+n/2+" 0 l65 45 L145 "+(n-80)+" H400000z",f=new _([new $("phase",g)],{width:"400em",height:O(d/1e3),viewBox:"0 0 400000 "+d,preserveAspectRatio:"xMinYMin slice"});(r=nt(["hide-tail"],[f],t)).style.height=O(p),a=o.depth+m+u}else{var v,b;/cancel/.test(s)?h||o.classes.push("cancel-pad"):"angl"===s?o.classes.push("anglpad"):o.classes.push("boxpad");var y=0;/box/.test(s)?(y=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),b=v=t.fontMetrics().fboxsep+("colorbox"===s?0:y)):"angl"===s?(v=4*(y=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),b=Math.max(0,.25-o.depth)):b=v=h?.2:0,r=function(e,t,r,a,n){var i,o=e.height+e.depth+r+a;if(/fbox|color|angl/.test(t)){if(i=at(["stretchy",t],[],n),"fbox"===t){var s=n.color&&n.getColor();s&&(i.style.borderColor=s)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new Z({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new Z({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new _(l,{width:"100%",height:O(o)});i=nt([],[h],n)}return i.height=o,i.style.height=O(o),i}(o,s,v,b,t),/fbox|boxed|fcolorbox/.test(s)?(r.style.borderStyle="solid",r.style.borderWidth=O(y)):"angl"===s&&.049!==y&&(r.style.borderTopWidth=O(y),r.style.borderRightWidth=O(y)),a=o.depth+b,e.backgroundColor&&(r.style.backgroundColor=e.backgroundColor,e.borderColor&&(r.style.borderColor=e.borderColor))}if(e.backgroundColor)i=lt({positionType:"individualShift",children:[{type:"elem",elem:r,shift:a},{type:"elem",elem:o,shift:0}]});else{var x=/cancel|phase/.test(s)?["svg-align"]:[];i=lt({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:r,shift:a,wrapperClasses:x}]})}return/cancel/.test(s)&&(i.height=o.height,i.depth=o.depth),/cancel/.test(s)&&!h?at(["mord","cancel-lap"],[i],t):at(["mord"],[i],t)},ma=(e,t)=>{var r,a=new Ft(e.label.includes("colorbox")?"mpadded":"menclose",[Jt(e.body,t)]);switch(e.label){case"\\cancel":a.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":a.setAttribute("notation","downdiagonalstrike");break;case"\\phase":a.setAttribute("notation","phasorangle");break;case"\\sout":a.setAttribute("notation","horizontalstrike");break;case"\\fbox":a.setAttribute("notation","box");break;case"\\angl":a.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,a.setAttribute("width","+"+2*r+"pt"),a.setAttribute("height","+"+2*r+"pt"),a.setAttribute("lspace",r+"pt"),a.setAttribute("voffset",r+"pt"),"\\fcolorbox"===e.label){var n=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);a.setAttribute("style","border: "+O(n)+" solid "+e.borderColor)}break;case"\\xcancel":a.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&a.setAttribute("mathbackground",e.backgroundColor),a};kt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,t,r){var{parser:a,funcName:n}=e,i=pr(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:a.mode,label:n,backgroundColor:i,body:o}},htmlBuilder:ha,mathmlBuilder:ma}),kt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,t,r){var{parser:a,funcName:n}=e,i=pr(t[0],"color-token").color,o=pr(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:a.mode,label:n,backgroundColor:o,borderColor:i,body:s}},htmlBuilder:ha,mathmlBuilder:ma}),kt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\fbox",body:t[0]}}}),kt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];return{type:"enclose",mode:r.mode,label:a,body:n}},htmlBuilder:ha,mathmlBuilder:ma}),kt({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r,funcName:a}=e;"math"===r.mode&&r.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var n=t[0];return{type:"enclose",mode:r.mode,label:a,body:n}},htmlBuilder:ha,mathmlBuilder:ma}),kt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\angl",body:t[0]}}});var ca={};function ua(e){for(var{type:t,names:r,props:a,handler:n,htmlBuilder:i,mathmlBuilder:o}=e,s={type:t,numArgs:a.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n},l=0;l{if(!e.parser.settings.displayMode)throw new a("{"+e.envName+"} can be used only in display mode.")},ya=new Set(["gather","gather*"]);function xa(e){if(!e.includes("ed"))return!e.includes("*")}function wa(e,t,r){var{hskipBeforeAndAfter:n,addJot:i,cols:o,arraystretch:s,colSeparationType:l,autoTag:h,singleRow:m,emptySingleRow:c,maxNumCols:u,leqno:p}=t;if(e.gullet.beginGroup(),m||e.gullet.macros.set("\\cr","\\\\\\relax"),!s){var d=e.gullet.expandMacroAsText("\\arraystretch");if(null==d)s=1;else if(!(s=parseFloat(d))||s<0)throw new a("Invalid \\arraystretch: "+d)}e.gullet.beginGroup();var g=[],f=[g],v=[],b=[],y=null!=h?[]:void 0;function x(){h&&e.gullet.macros.set("\\@eqnsw","1",!0)}function w(){y&&(e.gullet.macros.get("\\df@tag")?(y.push(e.subparse([new fa("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):y.push(Boolean(h)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(x(),b.push(va(e));;){var k=e.parseExpression(!1,m?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var z={type:"ordgroup",mode:e.mode,body:k};r&&(z={type:"styling",mode:e.mode,style:r,resetFont:!0,body:[z]}),g.push(z);var S=e.fetch().text;if("&"===S){if(u&&g.length===u){if(m||l)throw new a("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===S){w(),1===g.length&&"styling"===z.type&&1===z.body.length&&"ordgroup"===z.body[0].type&&0===z.body[0].body.length&&(f.length>1||!c)&&f.pop(),b.length0&&(b+=.25),h.push({pos:b,isDashed:e[t]})}for(y(o[0]),r=0;r0&&(k<(T+=v)&&(k=T),T=0),e.addJot&&re))for(r=0;r=s)){var j,_,$=void 0;if(n>0||e.hskipBeforeAndAfter)0!==($=null!=(j=null==(_=V)?void 0:_.pregap)?j:u)&&((B=at(["arraycolsep"],[])).style.width=O($),R.push(B));var Z=[];for(r=0;r0){for(var ie=it("hline",t,m),oe=it("hdashline",t,m),se=[{type:"elem",elem:ne,shift:0}];h.length>0;){var le=h.pop(),he=le.pos-q;le.isDashed?se.push({type:"elem",elem:oe,shift:he}):se.push({type:"elem",elem:ie,shift:he})}ne=lt({positionType:"individualShift",children:se})}if(0===E.length)return at(["mord"],[ne],t);var me=lt({positionType:"individualShift",children:E}),ce=at(["tag"],[me],t);return ot([ne,ce])},Sa={c:"center ",l:"left ",r:"right "},Ma=function(e,t){for(var r=[],a=new Ft("mtd",[],["mtr-glue"]),n=new Ft("mtd",[],["mml-eqn-num"]),i=0;i0){var p=e.cols,d="",g=!1,f=0,v=p.length;"separator"===p[0].type&&(c+="top ",f=1),"separator"===p[p.length-1].type&&(c+="bottom ",v-=1);for(var b=f;b0?"left ":"",c+=S[S.length-1].length>0?"right ":"";for(var M=1;M0&&u&&(g=1),r[p]={type:"align",align:d,pregap:g,postgap:0}}return o.colSeparationType=u?"align":"alignat",o};ua({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var r=(gr(t[0])?[t[0]]:pr(t[0],"ordgroup").body).map(function(e){var t=dr(e).text;if("lcr".includes(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new a("Unknown column alignment: "+t,e)}),n={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return wa(e.parser,n,ka(e.envName))},htmlBuilder:za,mathmlBuilder:Ma}),ua({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===e.envName.charAt(e.envName.length-1)){var i=e.parser;if(i.consumeSpaces(),"["===i.fetch().text){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,!"lcr".includes(r))throw new a("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:r}]}}var o=wa(e.parser,n,ka(e.envName)),s=Math.max(0,...o.body.map(e=>e.length));return o.cols=new Array(s).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[o],left:t[0],right:t[1],rightColor:void 0}:o},htmlBuilder:za,mathmlBuilder:Ma}),ua({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t=wa(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:za,mathmlBuilder:Ma}),ua({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var r=(gr(t[0])?[t[0]]:pr(t[0],"ordgroup").body).map(function(e){var t=dr(e).text;if("lc".includes(t))return{type:"align",align:t};throw new a("Unknown column alignment: "+t,e)});if(r.length>1)throw new a("{subarray} can contain only one column");var n={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5},i=wa(e.parser,n,"script");if(i.body.length>0&&i.body[0].length>1)throw new a("{subarray} can contain only one column");return i},htmlBuilder:za,mathmlBuilder:Ma}),ua({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=wa(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},ka(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:za,mathmlBuilder:Ma}),ua({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Aa,htmlBuilder:za,mathmlBuilder:Ma}),ua({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){ya.has(e.envName)&&ba(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:xa(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return wa(e.parser,t,"display")},htmlBuilder:za,mathmlBuilder:Ma}),ua({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Aa,htmlBuilder:za,mathmlBuilder:Ma}),ua({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){ba(e);var t={autoTag:xa(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return wa(e.parser,t,"display")},htmlBuilder:za,mathmlBuilder:Ma}),ua({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(ba(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if("&"!==r&&"\\\\"!==r){if("\\end"===r){0===t[t.length-1].length&&t.pop();break}throw new a("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var n=[],i=[n],o=0;oAV".includes(m))throw new a('Expected one of "<>AV=|." after @',s[h]);for(var u=0;u<2;u++){for(var p=!0,d=h+1;d{var r=e.font,a=t.withFont(r);return Ot(e.body,a)},Ca=(e,t)=>{var r=e.font,a=t.withFont(r);return Jt(e.body,a)},qa={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};kt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=St(t[0]),i=a;return i in qa&&(i=qa[i]),{type:"font",mode:r.mode,font:i.slice(1),body:n}},htmlBuilder:Ba,mathmlBuilder:Ca}),kt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"mclass",mode:r.mode,mclass:zr(a),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:a}],isCharacterBox:c(a)}}}),kt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:a,breakOnTokenText:n}=e,{mode:i}=r,o=r.parseExpression(!0,n);return{type:"font",mode:i,font:"math"+a.slice(1),body:{type:"ordgroup",mode:r.mode,body:o}}},htmlBuilder:Ba,mathmlBuilder:Ca});var Ia=(e,t)=>t?{type:"styling",mode:e.mode,style:t,body:[e]}:e;kt({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var r,{parser:a,funcName:n}=e,i=t[0],o=t[1],s=null,l=null;switch(n){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,s="(",l=")";break;case"\\\\bracefrac":r=!1,s="\\{",l="\\}";break;case"\\\\brackfrac":r=!1,s="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}var h="\\cfrac"===n,m=null;return h||n.startsWith("\\d")?m="display":n.startsWith("\\t")&&(m="text"),Ia({type:"genfrac",mode:a.mode,numer:i,denom:o,continued:h,hasBarLine:r,leftDelim:s,rightDelim:l,barSize:null},m)},htmlBuilder:(e,t)=>{var r,a=t.style,n=a.fracNum(),i=a.fracDen();r=t.havingStyle(n);var o=Ot(e.numer,r,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;o.height=o.height0?3*c:7*c,d=t.fontMetrics().denom1):(m>0?(u=t.fontMetrics().num2,p=c):(u=t.fontMetrics().num3,p=3*c),d=t.fontMetrics().denom2),h){var x=t.fontMetrics().axisHeight;u-o.depth-(x+.5*m){var r=new Ft("mfrac",[Jt(e.numer,t),Jt(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var a=N(e.barSize,t);r.setAttribute("linethickness",O(a))}}else r.setAttribute("linethickness","0px");if(null!=e.leftDelim||null!=e.rightDelim){var n=[];if(null!=e.leftDelim){var i=new Ft("mo",[new Vt(e.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),n.push(i)}if(n.push(r),null!=e.rightDelim){var o=new Ft("mo",[new Vt(e.rightDelim.replace("\\",""))]);o.setAttribute("fence","true"),n.push(o)}return Wt(n)}return r}}),kt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:r,funcName:a,token:n}=e;switch(a){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:r.mode,replaceWith:t,token:n}}});var Ra=["display","text","script","scriptscript"],Ea=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};kt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var r,{parser:a}=e,n=t[4],i=t[5],o=St(t[0]),s="atom"===o.type&&"open"===o.family?Ea(o.text):null,l=St(t[1]),h="atom"===l.type&&"close"===l.family?Ea(l.text):null,m=pr(t[2],"size"),c=null;r=!!m.isBlank||(c=m.value).number>0;var u=null,p=t[3];if("ordgroup"===p.type){if(p.body.length>0){var d=pr(p.body[0],"textord");u=Ra[Number(d.text)]}}else p=pr(p,"textord"),u=Ra[Number(p.text)];return Ia({type:"genfrac",mode:a.mode,numer:n,denom:i,continued:!1,hasBarLine:r,barSize:c,leftDelim:s,rightDelim:h},u)}}),kt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:r,funcName:a,token:n}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:pr(t[0],"size").value,token:n}}}),kt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0],i=pr(t[1],"infix").size;if(!i)throw new Error("\\\\abovefrac expected size, but got "+String(i));var o=t[2],s=i.number>0;return{type:"genfrac",mode:r.mode,numer:n,denom:o,continued:!1,hasBarLine:s,barSize:i,leftDelim:null,rightDelim:null}}});var Ha=(e,t)=>{var r,a,n=t.style;"supsub"===e.type?(r=e.sup?Ot(e.sup,t.havingStyle(n.sup()),t):Ot(e.sub,t.havingStyle(n.sub()),t),a=pr(e.base,"horizBrace")):a=pr(e,"horizBrace");var i,o=Ot(a.base,t.havingBaseStyle(S.DISPLAY)),s=mr(a,t);if(i=a.isOver?lt({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s,wrapperClasses:["svg-align"]}]}):lt({positionType:"bottom",positionData:o.depth+.1+s.height,children:[{type:"elem",elem:s,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:o}]}),r){var l=at(["minner",a.isOver?"mover":"munder"],[i],t);i=a.isOver?lt({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]}):lt({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]})}return at(["minner",a.isOver?"mover":"munder"],[i],t)};kt({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:a}=e;return{type:"horizBrace",mode:r.mode,label:a,isOver:a.includes("\\over"),base:t[0]}},htmlBuilder:Ha,mathmlBuilder:(e,t)=>{var r=sr(e.label);return new Ft(e.isOver?"mover":"munder",[Jt(e.base,t),r])}}),kt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[1],n=pr(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:n})?{type:"href",mode:r.mode,href:n,body:Mt(a)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var r=qt(e.body,t,!1);return function(e,t,r,a){var n=new X(e,t,r,a);return rt(n),n}(e.href,[],r,t)},mathmlBuilder:(e,t)=>{var r=Kt(e.body,t);return r instanceof Ft||(r=new Ft("mrow",[r])),r.setAttribute("href",e.href),r}}),kt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=pr(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:a}))return r.formatUnsupportedCmd("\\url");for(var n=[],i=0;inew Ft("mrow",Zt(e.body,t.withFont("")))}),kt({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var r,{parser:n,funcName:i,token:o}=e,s=pr(t[0],"raw").string,l=t[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var h={};switch(i){case"\\htmlClass":h.class=s,r={command:"\\htmlClass",class:s};break;case"\\htmlId":h.id=s,r={command:"\\htmlId",id:s};break;case"\\htmlStyle":h.style=s,r={command:"\\htmlStyle",style:s};break;case"\\htmlData":for(var m=s.split(","),c=0;c{var r=qt(e.body,t,!1),a=["enclosing"];e.attributes.class&&a.push(...e.attributes.class.trim().split(/\s+/));var n=at(a,r,t);for(var i in e.attributes)"class"!==i&&e.attributes.hasOwnProperty(i)&&n.setAttribute(i,e.attributes[i]);return n},mathmlBuilder:(e,t)=>Kt(e.body,t)}),kt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:Mt(t[0]),mathml:Mt(t[1])}},htmlBuilder:(e,t)=>{var r=qt(e.html,t,!1);return ot(r)},mathmlBuilder:(e,t)=>Kt(e.mathml,t)});var Na=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new a("Invalid size: '"+e+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!H(r))throw new a("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};kt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{var{parser:n}=e,i={number:0,unit:"em"},o={number:.9,unit:"em"},s={number:0,unit:"em"},l="";if(r[0])for(var h=pr(r[0],"raw").string.split(","),m=0;m{var r=N(e.height,t),a=0;e.totalheight.number>0&&(a=N(e.totalheight,t)-r);var n=0;e.width.number>0&&(n=N(e.width,t));var i={height:O(r+a)};n>0&&(i.width=O(n)),a>0&&(i.verticalAlign=O(-a));var o=new Y(e.src,e.alt,i);return o.height=r,o.depth=a,o},mathmlBuilder:(e,t)=>{var r=new Ft("mglyph",[]);r.setAttribute("alt",e.alt);var a=N(e.height,t),n=0;if(e.totalheight.number>0&&(n=N(e.totalheight,t)-a,r.setAttribute("valign",O(-n))),r.setAttribute("height",O(a+n)),e.width.number>0){var i=N(e.width,t);r.setAttribute("width",O(i))}return r.setAttribute("src",e.src),r}}),kt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:a}=e,n=pr(t[0],"size");if(r.settings.strict){var i="m"===a[1],o="mu"===n.value.unit;i?(o||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" supports only mu units, not "+n.value.unit+" units"),"math"!==r.mode&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" works only in math mode")):o&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:n.value}},htmlBuilder:(e,t)=>ht(e.dimension,t),mathmlBuilder(e,t){var r=N(e.dimension,t);return new Gt(r)}}),kt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0];return{type:"lap",mode:r.mode,alignment:a.slice(5),body:n}},htmlBuilder:(e,t)=>{var r;"clap"===e.alignment?(r=at([],[Ot(e.body,t)]),r=at(["inner"],[r],t)):r=at(["inner"],[Ot(e.body,t)]);var a=at(["fix"],[]),n=at([e.alignment],[r,a],t),i=at(["strut"]);return i.style.height=O(n.height+n.depth),n.depth&&(i.style.verticalAlign=O(-n.depth)),n.children.unshift(i),n=at(["thinbox"],[n],t),at(["mord","vbox"],[n],t)},mathmlBuilder:(e,t)=>{var r=new Ft("mpadded",[Jt(e.body,t)]);if("rlap"!==e.alignment){var a="llap"===e.alignment?"-1":"-0.5";r.setAttribute("lspace",a+"width")}return r.setAttribute("width","0px"),r}}),kt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:r,parser:a}=e,n=a.mode;a.switchMode("math");var i="\\("===r?"\\)":"$",o=a.parseExpression(!1,i);return a.expect(i),a.switchMode(n),{type:"styling",mode:a.mode,style:"text",resetFont:!0,body:o}}}),kt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new a("Mismatched "+e.funcName)}});var Oa=(e,t)=>{switch(t.style.size){case S.DISPLAY.size:return e.display;case S.TEXT.size:return e.text;case S.SCRIPT.size:return e.script;case S.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};kt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:Mt(t[0]),text:Mt(t[1]),script:Mt(t[2]),scriptscript:Mt(t[3])}},htmlBuilder:(e,t)=>{var r=Oa(e,t),a=qt(r,t,!1);return ot(a)},mathmlBuilder:(e,t)=>{var r=Oa(e,t);return Kt(r,t)}});var Da=(e,t,r,a,n,i,o)=>{e=at([],[e]);var s,l,h,m=r&&c(r);if(t){var u=Ot(t,a.havingStyle(n.sup()),a);l={elem:u,kern:Math.max(a.fontMetrics().bigOpSpacing1,a.fontMetrics().bigOpSpacing3-u.depth)}}if(r){var p=Ot(r,a.havingStyle(n.sub()),a);s={elem:p,kern:Math.max(a.fontMetrics().bigOpSpacing2,a.fontMetrics().bigOpSpacing4-p.height)}}if(l&&s){var d=a.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+e.depth+o;h=lt({positionType:"bottom",positionData:d,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:O(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:O(i)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]})}else if(s){var g=e.height-o;h=lt({positionType:"top",positionData:g,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:O(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e}]})}else{if(!l)return e;var f=e.depth+o;h=lt({positionType:"bottom",positionData:f,children:[{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:O(i)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]})}var v=[h];if(s&&0!==i&&!m){var b=at(["mspace"],[],a);b.style.marginRight=O(i),v.unshift(b)}return at(["mop","op-limits"],v,a)},La=new Set(["\\smallint"]),Pa=(e,t)=>{var r,a,n,i=!1;"supsub"===e.type?(r=e.sup,a=e.sub,n=pr(e.base,"op"),i=!0):n=pr(e,"op");var o,s,l=t.style,h=!1;if(l.size===S.DISPLAY.size&&n.symbol&&!La.has(n.name)&&(h=!0),n.symbol){var m=h?"Size2-Regular":"Size1-Regular",c="";if("\\oiint"!==n.name&&"\\oiiint"!==n.name||(c=n.name.slice(1),n.name="oiint"===c?"\\iint":"\\iiint"),s=(o=Ke(n.name,m,"math",t,["mop","op-symbol",h?"large-op":"small-op"])).italic,c.length>0){var u=pt(c+"Size"+(h?"2":"1"),t);o=lt({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:u,shift:h?.08:0}]}),n.name="\\"+c,o.classes.unshift("mop"),o.italic=s}}else if(n.body){var p=qt(n.body,t,!0);1===p.length&&p[0]instanceof j?(o=p[0]).classes[0]="mop":o=at(["mop"],p,t)}else{for(var d=[],g=1;g{var r;if(e.symbol)r=new Ft("mo",[Yt(e.name,e.mode)]),La.has(e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new Ft("mo",Zt(e.body,t));else{r=new Ft("mi",[new Vt(e.name.slice(1))]);var a=new Ft("mo",[Yt("\u2061","text")]);r=e.parentIsSupSub?new Ft("mrow",[r,a]):Pt([r,a])}return r},Va={"\u220f":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22c0":"\\bigwedge","\u22c1":"\\bigvee","\u22c2":"\\bigcap","\u22c3":"\\bigcup","\u2a00":"\\bigodot","\u2a01":"\\bigoplus","\u2a02":"\\bigotimes","\u2a04":"\\biguplus","\u2a06":"\\bigsqcup"};kt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220f","\u2210","\u2211","\u22c0","\u22c1","\u22c2","\u22c3","\u2a00","\u2a01","\u2a02","\u2a04","\u2a06"],props:{numArgs:0},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=a;return 1===n.length&&(n=Va[n]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Pa,mathmlBuilder:Fa}),kt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Mt(a)}},htmlBuilder:Pa,mathmlBuilder:Fa});var Ga={"\u222b":"\\int","\u222c":"\\iint","\u222d":"\\iiint","\u222e":"\\oint","\u222f":"\\oiint","\u2230":"\\oiiint"};kt({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:Pa,mathmlBuilder:Fa}),kt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:Pa,mathmlBuilder:Fa}),kt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222b","\u222c","\u222d","\u222e","\u222f","\u2230"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:r}=e,a=r;return 1===a.length&&(a=Ga[a]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:Pa,mathmlBuilder:Fa});var Ua=(e,t)=>{var r,a,n,i,o=!1;if("supsub"===e.type?(r=e.sup,a=e.sub,n=pr(e.base,"operatorname"),o=!0):n=pr(e,"operatorname"),n.body.length>0){for(var s=(n.body.map(e=>{var t="text"in e?e.text:void 0;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e})),l=qt(s,t.withFont("mathrm"),!0),h=0;h{var{parser:r,funcName:a}=e,n=t[0];return{type:"operatorname",mode:r.mode,body:Mt(n),alwaysHandleSupSub:"\\operatornamewithlimits"===a,limits:!1,parentIsSupSub:!1}},htmlBuilder:Ua,mathmlBuilder:(e,t)=>{for(var r=Zt(e.body,t.withFont("mathrm")),a=!0,n=0;ne.toText()).join("");r=[new Vt(s)]}var l=new Ft("mi",r);l.setAttribute("mathvariant","normal");var h=new Ft("mo",[Yt("\u2061","text")]);return e.parentIsSupSub?new Ft("mrow",[l,h]):Pt([l,h])}}),da("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),zt({type:"ordgroup",htmlBuilder:(e,t)=>e.semisimple?ot(qt(e.body,t,!1)):at(["mord"],qt(e.body,t,!0),t),mathmlBuilder:(e,t)=>Kt(e.body,t,!0)}),kt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:r}=e,a=t[0];return{type:"overline",mode:r.mode,body:a}},htmlBuilder(e,t){var r=Ot(e.body,t.havingCrampedStyle()),a=it("overline-line",t),n=t.fontMetrics().defaultRuleThickness,i=lt({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*n},{type:"elem",elem:a},{type:"kern",size:n}]});return at(["mord","overline"],[i],t)},mathmlBuilder(e,t){var r=new Ft("mo",[new Vt("\u203e")]);r.setAttribute("stretchy","true");var a=new Ft("mover",[Jt(e.body,t),r]);return a.setAttribute("accent","true"),a}}),kt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"phantom",mode:r.mode,body:Mt(a)}},htmlBuilder:(e,t)=>{var r=qt(e.body,t.withPhantom(),!1);return ot(r)},mathmlBuilder:(e,t)=>{var r=Zt(e.body,t);return new Ft("mphantom",r)}}),da("\\hphantom","\\smash{\\phantom{#1}}"),kt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"vphantom",mode:r.mode,body:a}},htmlBuilder:(e,t)=>{var r=at(["inner"],[Ot(e.body,t.withPhantom())]),a=at(["fix"],[]);return at(["mord","rlap"],[r,a],t)},mathmlBuilder:(e,t)=>{var r=Zt(Mt(e.body),t),a=new Ft("mphantom",r),n=new Ft("mpadded",[a]);return n.setAttribute("width","0px"),n}}),kt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e,a=pr(t[0],"size").value,n=t[1];return{type:"raisebox",mode:r.mode,dy:a,body:n}},htmlBuilder(e,t){var r=Ot(e.body,t),a=N(e.dy,t);return lt({positionType:"shift",positionData:-a,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){var r=new Ft("mpadded",[Jt(e.body,t)]),a=e.dy.number+e.dy.unit;return r.setAttribute("voffset",a),r}}),kt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),kt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){var{parser:a}=e,n=r[0],i=pr(t[0],"size"),o=pr(t[1],"size");return{type:"rule",mode:a.mode,shift:n&&pr(n,"size").value,width:i.value,height:o.value}},htmlBuilder(e,t){var r=at(["mord","rule"],[],t),a=N(e.width,t),n=N(e.height,t),i=e.shift?N(e.shift,t):0;return r.style.borderRightWidth=O(a),r.style.borderTopWidth=O(n),r.style.bottom=O(i),r.width=a,r.height=n+i,r.depth=-i,r.maxFontSize=1.125*n*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=N(e.width,t),a=N(e.height,t),n=e.shift?N(e.shift,t):0,i=t.color&&t.getColor()||"black",o=new Ft("mspace");o.setAttribute("mathbackground",i),o.setAttribute("width",O(r)),o.setAttribute("height",O(a));var s=new Ft("mpadded",[o]);return n>=0?s.setAttribute("height",O(n)):(s.setAttribute("height",O(n)),s.setAttribute("depth",O(-n))),s.setAttribute("voffset",O(n)),s}});var Ya=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];kt({type:"sizing",names:Ya,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:r,funcName:a,parser:n}=e,i=n.parseExpression(!1,r);return{type:"sizing",mode:n.mode,size:Ya.indexOf(a)+1,body:i}},htmlBuilder:(e,t)=>{var r=t.havingSize(e.size);return Xa(e.body,r,t)},mathmlBuilder:(e,t)=>{var r=t.havingSize(e.size),a=Zt(e.body,r),n=new Ft("mstyle",a);return n.setAttribute("mathsize",O(r.sizeMultiplier)),n}}),kt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{var{parser:a}=e,n=!1,i=!1,o=r[0]&&pr(r[0],"ordgroup");if(o)for(var s,l=0;l{var r=at([],[Ot(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0),e.smashDepth&&(r.depth=0),e.smashHeight&&e.smashDepth)return at(["mord","smash"],[r],t);if(r.children)for(var a=0;a{var r=new Ft("mpadded",[Jt(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}}),kt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:a}=e,n=r[0],i=t[0];return{type:"sqrt",mode:a.mode,body:i,index:n}},htmlBuilder(e,t){var r=Ot(e.body,t.havingCrampedStyle());0===r.height&&(r.height=t.fontMetrics().xHeight),r=st(r,t);var a=t.fontMetrics().defaultRuleThickness,n=a;t.style.idr.height+r.depth+i&&(i=(i+m-r.height-r.depth)/2);var c=s.height-r.height-i-l;r.style.paddingLeft=O(h);var u=lt({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+c)},{type:"elem",elem:s},{type:"kern",size:l}]});if(e.index){var p=t.havingStyle(S.SCRIPTSCRIPT),d=Ot(e.index,p,t),g=.6*(u.height-u.depth),f=lt({positionType:"shift",positionData:-g,children:[{type:"elem",elem:d}]}),v=at(["root"],[f]);return at(["mord","sqrt"],[v,u],t)}return at(["mord","sqrt"],[u],t)},mathmlBuilder(e,t){var{body:r,index:a}=e;return a?new Ft("mroot",[Jt(r,t),Jt(a,t)]):new Ft("msqrt",[Jt(r,t)])}});var Wa={display:S.DISPLAY,text:S.TEXT,script:S.SCRIPT,scriptscript:S.SCRIPTSCRIPT};kt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:r,funcName:a,parser:n}=e,i=n.parseExpression(!0,r),o=a.slice(1,a.length-5);if(!(o in Wa))throw new Error("Unknown style: "+o);return{type:"styling",mode:n.mode,style:o,body:i}},htmlBuilder(e,t){var r=Wa[e.style],a=t.havingStyle(r);return e.resetFont&&(a=a.withFont("")),Xa(e.body,a,t)},mathmlBuilder(e,t){var r=Wa[e.style],a=t.havingStyle(r);e.resetFont&&(a=a.withFont(""));var n=Zt(e.body,a),i=new Ft("mstyle",n),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return i.setAttribute("scriptlevel",o[0]),i.setAttribute("displaystyle",o[1]),i}});zt({type:"supsub",htmlBuilder(e,t){var r=function(e,t){var r=e.base;return r?"op"===r.type?r.limits&&(t.style.size===S.DISPLAY.size||r.alwaysHandleSupSub)?Pa:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===S.DISPLAY.size||r.limits)?Ua:null:"accent"===r.type?c(r.base)?vr:null:"horizBrace"===r.type&&!e.sub===r.isOver?Ha:null:null}(e,t);if(r)return r(e,t);var a,n,i,{base:o,sup:s,sub:l}=e,h=Ot(o,t),m=t.fontMetrics(),u=0,p=0,d=o&&c(o);if(s){var g=t.havingStyle(t.style.sup());a=Ot(s,g,t),d||(u=h.height-g.fontMetrics().supDrop*g.sizeMultiplier/t.sizeMultiplier)}if(l){var f=t.havingStyle(t.style.sub());n=Ot(l,f,t),d||(p=h.depth+f.fontMetrics().subDrop*f.sizeMultiplier/t.sizeMultiplier)}i=t.style===S.DISPLAY?m.sup1:t.style.cramped?m.sup3:m.sup2;var v,b=t.sizeMultiplier,y=O(.5/m.ptPerEm/b),x=null;if(n){var w,k=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);if(h instanceof j||k)x=O(-(null!=(w=h.italic)?w:0))}if(a&&n){u=Math.max(u,i,a.depth+.25*m.xHeight),p=Math.max(p,m.sub2);var z=4*m.defaultRuleThickness;if(u-a.depth-(n.height-p)0&&(u+=M,p-=M)}v=lt({positionType:"individualShift",children:[{type:"elem",elem:n,shift:p,marginRight:y,marginLeft:x},{type:"elem",elem:a,shift:-u,marginRight:y}]})}else if(n){p=Math.max(p,m.sub1,n.height-.8*m.xHeight),v=lt({positionType:"shift",positionData:p,children:[{type:"elem",elem:n,marginLeft:x,marginRight:y}]})}else{if(!a)throw new Error("supsub must have either sup or sub.");u=Math.max(u,i,a.depth+.25*m.xHeight),v=lt({positionType:"shift",positionData:-u,children:[{type:"elem",elem:a,marginRight:y}]})}var A=Ht(h,"right")||"mord";return at([A],[h,at(["msupsub"],[v])],t)},mathmlBuilder(e,t){var r,a=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(a=!0,r=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var n,i=[Jt(e.base,t)];if(e.sub&&i.push(Jt(e.sub,t)),e.sup&&i.push(Jt(e.sup,t)),a)n=r?"mover":"munder";else if(e.sub)if(e.sup){var o=e.base;n=o&&"op"===o.type&&o.limits&&t.style===S.DISPLAY||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(t.style===S.DISPLAY||o.limits)?"munderover":"msubsup"}else{var s=e.base;n=s&&"op"===s.type&&s.limits&&(t.style===S.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===S.DISPLAY)?"munder":"msub"}else{var l=e.base;n=l&&"op"===l.type&&l.limits&&(t.style===S.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===S.DISPLAY)?"mover":"msup"}return new Ft(n,i)}}),zt({type:"atom",htmlBuilder:(e,t)=>Je(e.text,e.mode,t,["m"+e.family]),mathmlBuilder(e,t){var r=new Ft("mo",[Yt(e.text,e.mode)]);if("bin"===e.family){var a=_t(e,t);"bold-italic"===a&&r.setAttribute("mathvariant",a)}else"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false");return r}});var ja={mi:"italic",mn:"normal",mtext:"normal"};zt({type:"mathord",htmlBuilder:(e,t)=>Qe(e,t,"mathord"),mathmlBuilder(e,t){var r=new Ft("mi",[Yt(e.text,e.mode,t)]),a=_t(e,t)||"italic";return a!==ja[r.type]&&r.setAttribute("mathvariant",a),r}}),zt({type:"textord",htmlBuilder:(e,t)=>Qe(e,t,"textord"),mathmlBuilder(e,t){var r,a=Yt(e.text,e.mode,t),n=_t(e,t)||"normal";return r="text"===e.mode?new Ft("mtext",[a]):/[0-9]/.test(e.text)?new Ft("mn",[a]):"\\prime"===e.text?new Ft("mo",[a]):new Ft("mi",[a]),n!==ja[r.type]&&r.setAttribute("mathvariant",n),r}});var _a={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},$a={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};zt({type:"spacing",htmlBuilder(e,t){if($a.hasOwnProperty(e.text)){var r=$a[e.text].className||"";if("text"===e.mode){var n=Qe(e,t,"textord");return n.classes.push(r),n}return at(["mspace",r],[Je(e.text,e.mode,t)],t)}if(_a.hasOwnProperty(e.text))return at(["mspace",_a[e.text]],[],t);throw new a('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(!$a.hasOwnProperty(e.text)){if(_a.hasOwnProperty(e.text))return new Ft("mspace");throw new a('Unknown type of space "'+e.text+'"')}return new Ft("mtext",[new Vt("\xa0")])}});var Za=()=>{var e=new Ft("mtd",[]);return e.setAttribute("width","50%"),e};zt({type:"tag",mathmlBuilder(e,t){var r=new Ft("mtable",[new Ft("mtr",[Za(),new Ft("mtd",[Kt(e.body,t)]),Za(),new Ft("mtd",[Kt(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var Ka={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Ja={"\\textbf":"textbf","\\textmd":"textmd"},Qa={"\\textit":"textit","\\textup":"textup"},en=(e,t)=>{var r=e.font;return r?Ka[r]?t.withTextFontFamily(Ka[r]):Ja[r]?t.withTextFontWeight(Ja[r]):"\\emph"===r?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(Qa[r]):t};kt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];return{type:"text",mode:r.mode,body:Mt(n),font:a}},htmlBuilder(e,t){var r=en(e,t),a=qt(e.body,r,!0);return at(["mord","text"],a,r)},mathmlBuilder(e,t){var r=en(e,t);return Kt(e.body,r)}}),kt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=Ot(e.body,t),a=it("underline-line",t),n=t.fontMetrics().defaultRuleThickness,i=lt({positionType:"top",positionData:r.height,children:[{type:"kern",size:n},{type:"elem",elem:a},{type:"kern",size:3*n},{type:"elem",elem:r}]});return at(["mord","underline"],[i],t)},mathmlBuilder(e,t){var r=new Ft("mo",[new Vt("\u203e")]);r.setAttribute("stretchy","true");var a=new Ft("munder",[Jt(e.body,t),r]);return a.setAttribute("accentunder","true"),a}}),kt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=Ot(e.body,t),a=t.fontMetrics().axisHeight,n=.5*(r.height-a-(r.depth+a));return lt({positionType:"shift",positionData:n,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){var r=new Ft("mpadded",[Jt(e.body,t)],["vcenter"]);return new Ft("mrow",[r])}}),kt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new a("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=tn(e),a=[],n=t.havingStyle(t.style.text()),i=0;ie.body.replace(/ /g,e.star?"\u2423":"\xa0"),rn=yt,an="[ \r\n\t]",nn="(\\\\[a-zA-Z@]+)"+an+"*",on="[\u0300-\u036f]",sn=new RegExp(on+"+$"),ln="("+an+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-\u2027\u202a-\ud7ff\uf900-\uffff]"+on+"*|[\ud800-\udbff][\udc00-\udfff]"+on+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+nn+"|\\\\[^\ud800-\udfff])";class hn{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(ln,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new fa("EOF",new ga(this,t,t));var r=this.tokenRegex.exec(e);if(null===r||r.index!==t)throw new a("Unexpected character: '"+e[t]+"'",new fa(e[t],new ga(this,t,t+1)));var n=r[6]||r[3]||(r[2]?"\\ ":" ");if(14===this.catcodes[n]){var i=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===i?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=i+1,this.lex()}return new fa(n,new ga(this,t,this.tokenRegex.lastIndex))}}class mn{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new a("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,r){if(void 0===r&&(r=!1),r){for(var a=0;a0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var n=this.undefStack[this.undefStack.length-1];n&&!n.hasOwnProperty(e)&&(n[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}var cn=pa;da("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),da("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),da("\\@firstoftwo",function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),da("\\@secondoftwo",function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),da("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return 1===t[0].length&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),da("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),da("\\TextOrMath",function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var un={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};da("\\char",function(e){var t,r=e.popToken(),n=0;if("'"===r.text)t=8,r=e.popToken();else if('"'===r.text)t=16,r=e.popToken();else if("`"===r.text)if("\\"===(r=e.popToken()).text[0])n=r.text.charCodeAt(1);else{if("EOF"===r.text)throw new a("\\char` missing argument");n=r.text.charCodeAt(0)}else t=10;if(t){if(null==(n=un[r.text])||n>=t)throw new a("Invalid base-"+t+" digit "+r.text);for(var i;null!=(i=un[e.future().text])&&i{var i=e.consumeArg().tokens;if(1!==i.length)throw new a("\\newcommand's first argument must be a macro name");var o=i[0].text,s=e.isDefined(o);if(s&&!t)throw new a("\\newcommand{"+o+"} attempting to redefine "+o+"; use \\renewcommand");if(!s&&!r)throw new a("\\renewcommand{"+o+"} when command "+o+" does not yet exist; use \\newcommand");var l=0;if(1===(i=e.consumeArg().tokens).length&&"["===i[0].text){for(var h="",m=e.expandNextToken();"]"!==m.text&&"EOF"!==m.text;)h+=m.text,m=e.expandNextToken();if(!h.match(/^\s*[0-9]+\s*$/))throw new a("Invalid number of arguments: "+h);l=parseInt(h),i=e.consumeArg().tokens}return s&&n||e.macros.set(o,{tokens:i,numArgs:l}),""};da("\\newcommand",e=>pn(e,!1,!0,!1)),da("\\renewcommand",e=>pn(e,!0,!1,!1)),da("\\providecommand",e=>pn(e,!0,!0,!0)),da("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join("")),""}),da("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join("")),""}),da("\\show",e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),rn[r],re.math[r],re.text[r]),""}),da("\\bgroup","{"),da("\\egroup","}"),da("~","\\nobreakspace"),da("\\lq","`"),da("\\rq","'"),da("\\aa","\\r a"),da("\\AA","\\r A"),da("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xa9}"),da("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),da("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xae}"),da("\u212c","\\mathscr{B}"),da("\u2130","\\mathscr{E}"),da("\u2131","\\mathscr{F}"),da("\u210b","\\mathscr{H}"),da("\u2110","\\mathscr{I}"),da("\u2112","\\mathscr{L}"),da("\u2133","\\mathscr{M}"),da("\u211b","\\mathscr{R}"),da("\u212d","\\mathfrak{C}"),da("\u210c","\\mathfrak{H}"),da("\u2128","\\mathfrak{Z}"),da("\\Bbbk","\\Bbb{k}"),da("\\llap","\\mathllap{\\textrm{#1}}"),da("\\rlap","\\mathrlap{\\textrm{#1}}"),da("\\clap","\\mathclap{\\textrm{#1}}"),da("\\mathstrut","\\vphantom{(}"),da("\\underbar","\\underline{\\text{#1}}"),da("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}'),da("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),da("\\ne","\\neq"),da("\u2260","\\neq"),da("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),da("\u2209","\\notin"),da("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),da("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),da("\u225a","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225a}}"),da("\u225b","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225b}}"),da("\u225d","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225d}}"),da("\u225e","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225e}}"),da("\u225f","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225f}}"),da("\u27c2","\\perp"),da("\u203c","\\mathclose{!\\mkern-0.8mu!}"),da("\u220c","\\notni"),da("\u231c","\\ulcorner"),da("\u231d","\\urcorner"),da("\u231e","\\llcorner"),da("\u231f","\\lrcorner"),da("\xa9","\\copyright"),da("\xae","\\textregistered"),da("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),da("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),da("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),da("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),da("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),da("\u22ee","\\vdots"),da("\\varGamma","\\mathit{\\Gamma}"),da("\\varDelta","\\mathit{\\Delta}"),da("\\varTheta","\\mathit{\\Theta}"),da("\\varLambda","\\mathit{\\Lambda}"),da("\\varXi","\\mathit{\\Xi}"),da("\\varPi","\\mathit{\\Pi}"),da("\\varSigma","\\mathit{\\Sigma}"),da("\\varUpsilon","\\mathit{\\Upsilon}"),da("\\varPhi","\\mathit{\\Phi}"),da("\\varPsi","\\mathit{\\Psi}"),da("\\varOmega","\\mathit{\\Omega}"),da("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),da("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),da("\\boxed","\\fbox{$\\displaystyle{#1}$}"),da("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),da("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),da("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),da("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),da("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var dn={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},gn=new Set(["bin","rel"]);da("\\dots",function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in dn?t=dn[r]:("\\not"===r.slice(0,4)||r in re.math&&gn.has(re.math[r].group))&&(t="\\dotsb"),t});var fn={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};da("\\dotso",function(e){return e.future().text in fn?"\\ldots\\,":"\\ldots"}),da("\\dotsc",function(e){var t=e.future().text;return t in fn&&","!==t?"\\ldots\\,":"\\ldots"}),da("\\cdots",function(e){return e.future().text in fn?"\\@cdots\\,":"\\@cdots"}),da("\\dotsb","\\cdots"),da("\\dotsm","\\cdots"),da("\\dotsi","\\!\\cdots"),da("\\dotsx","\\ldots\\,"),da("\\DOTSI","\\relax"),da("\\DOTSB","\\relax"),da("\\DOTSX","\\relax"),da("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),da("\\,","\\tmspace+{3mu}{.1667em}"),da("\\thinspace","\\,"),da("\\>","\\mskip{4mu}"),da("\\:","\\tmspace+{4mu}{.2222em}"),da("\\medspace","\\:"),da("\\;","\\tmspace+{5mu}{.2777em}"),da("\\thickspace","\\;"),da("\\!","\\tmspace-{3mu}{.1667em}"),da("\\negthinspace","\\!"),da("\\negmedspace","\\tmspace-{4mu}{.2222em}"),da("\\negthickspace","\\tmspace-{5mu}{.277em}"),da("\\enspace","\\kern.5em "),da("\\enskip","\\hskip.5em\\relax"),da("\\quad","\\hskip1em\\relax"),da("\\qquad","\\hskip2em\\relax"),da("\\tag","\\@ifstar\\tag@literal\\tag@paren"),da("\\tag@paren","\\tag@literal{({#1})}"),da("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new a("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),da("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),da("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),da("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),da("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),da("\\newline","\\\\\\relax"),da("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var vn=O(K["Main-Regular"]["T".charCodeAt(0)][1]-.7*K["Main-Regular"]["A".charCodeAt(0)][1]);da("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+vn+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),da("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+vn+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),da("\\hspace","\\@ifstar\\@hspacer\\@hspace"),da("\\@hspace","\\hskip #1\\relax"),da("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),da("\\ordinarycolon",":"),da("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),da("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),da("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),da("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),da("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),da("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),da("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),da("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),da("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),da("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),da("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),da("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),da("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),da("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),da("\u2237","\\dblcolon"),da("\u2239","\\eqcolon"),da("\u2254","\\coloneqq"),da("\u2255","\\eqqcolon"),da("\u2a74","\\Coloneqq"),da("\\ratio","\\vcentcolon"),da("\\coloncolon","\\dblcolon"),da("\\colonequals","\\coloneqq"),da("\\coloncolonequals","\\Coloneqq"),da("\\equalscolon","\\eqqcolon"),da("\\equalscoloncolon","\\Eqqcolon"),da("\\colonminus","\\coloneq"),da("\\coloncolonminus","\\Coloneq"),da("\\minuscolon","\\eqcolon"),da("\\minuscoloncolon","\\Eqcolon"),da("\\coloncolonapprox","\\Colonapprox"),da("\\coloncolonsim","\\Colonsim"),da("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),da("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),da("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),da("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),da("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220c}}"),da("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),da("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),da("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),da("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),da("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),da("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),da("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),da("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),da("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),da("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),da("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),da("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),da("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),da("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),da("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),da("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),da("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),da("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),da("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228a}"),da("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2acb}"),da("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228b}"),da("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2acc}"),da("\\imath","\\html@mathml{\\@imath}{\u0131}"),da("\\jmath","\\html@mathml{\\@jmath}{\u0237}"),da("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27e6}}"),da("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27e7}}"),da("\u27e6","\\llbracket"),da("\u27e7","\\rrbracket"),da("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),da("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),da("\u2983","\\lBrace"),da("\u2984","\\rBrace"),da("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29b5}}"),da("\u29b5","\\minuso"),da("\\darr","\\downarrow"),da("\\dArr","\\Downarrow"),da("\\Darr","\\Downarrow"),da("\\lang","\\langle"),da("\\rang","\\rangle"),da("\\uarr","\\uparrow"),da("\\uArr","\\Uparrow"),da("\\Uarr","\\Uparrow"),da("\\N","\\mathbb{N}"),da("\\R","\\mathbb{R}"),da("\\Z","\\mathbb{Z}"),da("\\alef","\\aleph"),da("\\alefsym","\\aleph"),da("\\Alpha","\\mathrm{A}"),da("\\Beta","\\mathrm{B}"),da("\\bull","\\bullet"),da("\\Chi","\\mathrm{X}"),da("\\clubs","\\clubsuit"),da("\\cnums","\\mathbb{C}"),da("\\Complex","\\mathbb{C}"),da("\\Dagger","\\ddagger"),da("\\diamonds","\\diamondsuit"),da("\\empty","\\emptyset"),da("\\Epsilon","\\mathrm{E}"),da("\\Eta","\\mathrm{H}"),da("\\exist","\\exists"),da("\\harr","\\leftrightarrow"),da("\\hArr","\\Leftrightarrow"),da("\\Harr","\\Leftrightarrow"),da("\\hearts","\\heartsuit"),da("\\image","\\Im"),da("\\infin","\\infty"),da("\\Iota","\\mathrm{I}"),da("\\isin","\\in"),da("\\Kappa","\\mathrm{K}"),da("\\larr","\\leftarrow"),da("\\lArr","\\Leftarrow"),da("\\Larr","\\Leftarrow"),da("\\lrarr","\\leftrightarrow"),da("\\lrArr","\\Leftrightarrow"),da("\\Lrarr","\\Leftrightarrow"),da("\\Mu","\\mathrm{M}"),da("\\natnums","\\mathbb{N}"),da("\\Nu","\\mathrm{N}"),da("\\Omicron","\\mathrm{O}"),da("\\plusmn","\\pm"),da("\\rarr","\\rightarrow"),da("\\rArr","\\Rightarrow"),da("\\Rarr","\\Rightarrow"),da("\\real","\\Re"),da("\\reals","\\mathbb{R}"),da("\\Reals","\\mathbb{R}"),da("\\Rho","\\mathrm{P}"),da("\\sdot","\\cdot"),da("\\sect","\\S"),da("\\spades","\\spadesuit"),da("\\sub","\\subset"),da("\\sube","\\subseteq"),da("\\supe","\\supseteq"),da("\\Tau","\\mathrm{T}"),da("\\thetasym","\\vartheta"),da("\\weierp","\\wp"),da("\\Zeta","\\mathrm{Z}"),da("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),da("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),da("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),da("\\bra","\\mathinner{\\langle{#1}|}"),da("\\ket","\\mathinner{|{#1}\\rangle}"),da("\\braket","\\mathinner{\\langle{#1}\\rangle}"),da("\\Bra","\\left\\langle#1\\right|"),da("\\Ket","\\left|#1\\right\\rangle");var bn=e=>t=>{var r=t.consumeArg().tokens,a=t.consumeArg().tokens,n=t.consumeArg().tokens,i=t.consumeArg().tokens,o=t.macros.get("|"),s=t.macros.get("\\|");t.macros.beginGroup();var l=t=>r=>{e&&(r.macros.set("|",o),n.length&&r.macros.set("\\|",s));var i=t;!t&&n.length&&("|"===r.future().text&&(r.popToken(),i=!0));return{tokens:i?n:a,numArgs:0}};t.macros.set("|",l(!1)),n.length&&t.macros.set("\\|",l(!0));var h=t.consumeArg().tokens,m=t.expandTokens([...i,...h,...r]);return t.macros.endGroup(),{tokens:m.reverse(),numArgs:0}};da("\\bra@ket",bn(!1)),da("\\bra@set",bn(!0)),da("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),da("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),da("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),da("\\angln","{\\angl n}"),da("\\blue","\\textcolor{##6495ed}{#1}"),da("\\orange","\\textcolor{##ffa500}{#1}"),da("\\pink","\\textcolor{##ff00af}{#1}"),da("\\red","\\textcolor{##df0030}{#1}"),da("\\green","\\textcolor{##28ae7b}{#1}"),da("\\gray","\\textcolor{gray}{#1}"),da("\\purple","\\textcolor{##9d38bd}{#1}"),da("\\blueA","\\textcolor{##ccfaff}{#1}"),da("\\blueB","\\textcolor{##80f6ff}{#1}"),da("\\blueC","\\textcolor{##63d9ea}{#1}"),da("\\blueD","\\textcolor{##11accd}{#1}"),da("\\blueE","\\textcolor{##0c7f99}{#1}"),da("\\tealA","\\textcolor{##94fff5}{#1}"),da("\\tealB","\\textcolor{##26edd5}{#1}"),da("\\tealC","\\textcolor{##01d1c1}{#1}"),da("\\tealD","\\textcolor{##01a995}{#1}"),da("\\tealE","\\textcolor{##208170}{#1}"),da("\\greenA","\\textcolor{##b6ffb0}{#1}"),da("\\greenB","\\textcolor{##8af281}{#1}"),da("\\greenC","\\textcolor{##74cf70}{#1}"),da("\\greenD","\\textcolor{##1fab54}{#1}"),da("\\greenE","\\textcolor{##0d923f}{#1}"),da("\\goldA","\\textcolor{##ffd0a9}{#1}"),da("\\goldB","\\textcolor{##ffbb71}{#1}"),da("\\goldC","\\textcolor{##ff9c39}{#1}"),da("\\goldD","\\textcolor{##e07d10}{#1}"),da("\\goldE","\\textcolor{##a75a05}{#1}"),da("\\redA","\\textcolor{##fca9a9}{#1}"),da("\\redB","\\textcolor{##ff8482}{#1}"),da("\\redC","\\textcolor{##f9685d}{#1}"),da("\\redD","\\textcolor{##e84d39}{#1}"),da("\\redE","\\textcolor{##bc2612}{#1}"),da("\\maroonA","\\textcolor{##ffbde0}{#1}"),da("\\maroonB","\\textcolor{##ff92c6}{#1}"),da("\\maroonC","\\textcolor{##ed5fa6}{#1}"),da("\\maroonD","\\textcolor{##ca337c}{#1}"),da("\\maroonE","\\textcolor{##9e034e}{#1}"),da("\\purpleA","\\textcolor{##ddd7ff}{#1}"),da("\\purpleB","\\textcolor{##c6b9fc}{#1}"),da("\\purpleC","\\textcolor{##aa87ff}{#1}"),da("\\purpleD","\\textcolor{##7854ab}{#1}"),da("\\purpleE","\\textcolor{##543b78}{#1}"),da("\\mintA","\\textcolor{##f5f9e8}{#1}"),da("\\mintB","\\textcolor{##edf2df}{#1}"),da("\\mintC","\\textcolor{##e0e5cc}{#1}"),da("\\grayA","\\textcolor{##f6f7f7}{#1}"),da("\\grayB","\\textcolor{##f0f1f2}{#1}"),da("\\grayC","\\textcolor{##e3e5e6}{#1}"),da("\\grayD","\\textcolor{##d6d8da}{#1}"),da("\\grayE","\\textcolor{##babec2}{#1}"),da("\\grayF","\\textcolor{##888d93}{#1}"),da("\\grayG","\\textcolor{##626569}{#1}"),da("\\grayH","\\textcolor{##3b3e40}{#1}"),da("\\grayI","\\textcolor{##21242c}{#1}"),da("\\kaBlue","\\textcolor{##314453}{#1}"),da("\\kaGreen","\\textcolor{##71B307}{#1}");var yn={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class xn{constructor(e,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new mn(cn,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new hn(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,r,a;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:a,end:r}=this.consumeArg(["]"]))}else({tokens:a,start:t,end:r}=this.consumeArg());return this.pushToken(new fa("EOF",r.loc)),this.pushTokens(a),new fa("",ga.range(t,r))}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(e){var t=[],r=e&&e.length>0;r||this.consumeSpaces();var n,i=this.future(),o=0,s=0;do{if(n=this.popToken(),t.push(n),"{"===n.text)++o;else if("}"===n.text){if(-1===--o)throw new a("Extra }",n)}else if("EOF"===n.text)throw new a("Unexpected end of input in a macro argument, expected '"+(e&&r?e[s]:"}")+"'",n);if(e&&r)if((0===o||1===o&&"{"===e[s])&&n.text===e[s]){if(++s===e.length){t.splice(-s,s);break}}else s=0}while(0!==o||r);return"{"===i.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:i,end:n}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new a("The length of delimiters doesn't match the number of args!");for(var r=t[0],n=0;nthis.settings.maxExpand)throw new a("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),r=t.text,n=t.noexpand?null:this._getExpansion(r);if(null==n||e&&n.unexpandable){if(e&&null==n&&"\\"===r[0]&&!this.isDefined(r))throw new a("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);var i=n.tokens,o=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs)for(var s=(i=i.slice()).length-1;s>=0;--s){var l=i[s];if("#"===l.text){if(0===s)throw new a("Incomplete placeholder at end of macro body",l);if("#"===(l=i[--s]).text)i.splice(s+1,1);else{if(!/^[1-9]$/.test(l.text))throw new a("Not a valid argument number",l);i.splice(s,2,...o[+l.text-1])}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new fa(e)]):void 0}expandTokens(e){var t=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;)if(!1===this.expandOnce(!0)){var a=this.stack.pop();a.treatAsRelax&&(a.noexpand=!1,a.treatAsRelax=!1),t.push(a)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t?t.map(e=>e.text).join(""):t}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var r=this.lexer.catcodes[e];if(null!=r&&13!==r)return}var a="function"==typeof t?t(this):t;if("string"==typeof a){var n=0;if(a.includes("#"))for(var i=a.replace(/##/g,"");i.includes("#"+(n+1));)++n;for(var o=new hn(a,this.settings),s=[],l=o.lex();"EOF"!==l.text;)s.push(l),l=o.lex();return s.reverse(),{tokens:s,numArgs:n}}return a}isDefined(e){return this.macros.has(e)||rn.hasOwnProperty(e)||re.math.hasOwnProperty(e)||re.text.hasOwnProperty(e)||yn.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:rn.hasOwnProperty(e)&&!rn[e].primitive}}var wn=/^[\u208a\u208b\u208c\u208d\u208e\u2080\u2081\u2082\u2083\u2084\u2085\u2086\u2087\u2088\u2089\u2090\u2091\u2095\u1d62\u2c7c\u2096\u2097\u2098\u2099\u2092\u209a\u1d63\u209b\u209c\u1d64\u1d65\u2093\u1d66\u1d67\u1d68\u1d69\u1d6a]/,kn=Object.freeze({"\u208a":"+","\u208b":"-","\u208c":"=","\u208d":"(","\u208e":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1d62":"i","\u2c7c":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209a":"p","\u1d63":"r","\u209b":"s","\u209c":"t","\u1d64":"u","\u1d65":"v","\u2093":"x","\u1d66":"\u03b2","\u1d67":"\u03b3","\u1d68":"\u03c1","\u1d69":"\u03d5","\u1d6a":"\u03c7","\u207a":"+","\u207b":"-","\u207c":"=","\u207d":"(","\u207e":")","\u2070":"0","\xb9":"1","\xb2":"2","\xb3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1d2c":"A","\u1d2e":"B","\u1d30":"D","\u1d31":"E","\u1d33":"G","\u1d34":"H","\u1d35":"I","\u1d36":"J","\u1d37":"K","\u1d38":"L","\u1d39":"M","\u1d3a":"N","\u1d3c":"O","\u1d3e":"P","\u1d3f":"R","\u1d40":"T","\u1d41":"U","\u2c7d":"V","\u1d42":"W","\u1d43":"a","\u1d47":"b","\u1d9c":"c","\u1d48":"d","\u1d49":"e","\u1da0":"f","\u1d4d":"g","\u02b0":"h","\u2071":"i","\u02b2":"j","\u1d4f":"k","\u02e1":"l","\u1d50":"m","\u207f":"n","\u1d52":"o","\u1d56":"p","\u02b3":"r","\u02e2":"s","\u1d57":"t","\u1d58":"u","\u1d5b":"v","\u02b7":"w","\u02e3":"x","\u02b8":"y","\u1dbb":"z","\u1d5d":"\u03b2","\u1d5e":"\u03b3","\u1d5f":"\u03b4","\u1d60":"\u03d5","\u1d61":"\u03c7","\u1dbf":"\u03b8"}),zn={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030c":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030a":{text:"\\r",math:"\\mathring"},"\u030b":{text:"\\H"},"\u0327":{text:"\\c"}},Sn={"\xe1":"a\u0301","\xe0":"a\u0300","\xe4":"a\u0308","\u01df":"a\u0308\u0304","\xe3":"a\u0303","\u0101":"a\u0304","\u0103":"a\u0306","\u1eaf":"a\u0306\u0301","\u1eb1":"a\u0306\u0300","\u1eb5":"a\u0306\u0303","\u01ce":"a\u030c","\xe2":"a\u0302","\u1ea5":"a\u0302\u0301","\u1ea7":"a\u0302\u0300","\u1eab":"a\u0302\u0303","\u0227":"a\u0307","\u01e1":"a\u0307\u0304","\xe5":"a\u030a","\u01fb":"a\u030a\u0301","\u1e03":"b\u0307","\u0107":"c\u0301","\u1e09":"c\u0327\u0301","\u010d":"c\u030c","\u0109":"c\u0302","\u010b":"c\u0307","\xe7":"c\u0327","\u010f":"d\u030c","\u1e0b":"d\u0307","\u1e11":"d\u0327","\xe9":"e\u0301","\xe8":"e\u0300","\xeb":"e\u0308","\u1ebd":"e\u0303","\u0113":"e\u0304","\u1e17":"e\u0304\u0301","\u1e15":"e\u0304\u0300","\u0115":"e\u0306","\u1e1d":"e\u0327\u0306","\u011b":"e\u030c","\xea":"e\u0302","\u1ebf":"e\u0302\u0301","\u1ec1":"e\u0302\u0300","\u1ec5":"e\u0302\u0303","\u0117":"e\u0307","\u0229":"e\u0327","\u1e1f":"f\u0307","\u01f5":"g\u0301","\u1e21":"g\u0304","\u011f":"g\u0306","\u01e7":"g\u030c","\u011d":"g\u0302","\u0121":"g\u0307","\u0123":"g\u0327","\u1e27":"h\u0308","\u021f":"h\u030c","\u0125":"h\u0302","\u1e23":"h\u0307","\u1e29":"h\u0327","\xed":"i\u0301","\xec":"i\u0300","\xef":"i\u0308","\u1e2f":"i\u0308\u0301","\u0129":"i\u0303","\u012b":"i\u0304","\u012d":"i\u0306","\u01d0":"i\u030c","\xee":"i\u0302","\u01f0":"j\u030c","\u0135":"j\u0302","\u1e31":"k\u0301","\u01e9":"k\u030c","\u0137":"k\u0327","\u013a":"l\u0301","\u013e":"l\u030c","\u013c":"l\u0327","\u1e3f":"m\u0301","\u1e41":"m\u0307","\u0144":"n\u0301","\u01f9":"n\u0300","\xf1":"n\u0303","\u0148":"n\u030c","\u1e45":"n\u0307","\u0146":"n\u0327","\xf3":"o\u0301","\xf2":"o\u0300","\xf6":"o\u0308","\u022b":"o\u0308\u0304","\xf5":"o\u0303","\u1e4d":"o\u0303\u0301","\u1e4f":"o\u0303\u0308","\u022d":"o\u0303\u0304","\u014d":"o\u0304","\u1e53":"o\u0304\u0301","\u1e51":"o\u0304\u0300","\u014f":"o\u0306","\u01d2":"o\u030c","\xf4":"o\u0302","\u1ed1":"o\u0302\u0301","\u1ed3":"o\u0302\u0300","\u1ed7":"o\u0302\u0303","\u022f":"o\u0307","\u0231":"o\u0307\u0304","\u0151":"o\u030b","\u1e55":"p\u0301","\u1e57":"p\u0307","\u0155":"r\u0301","\u0159":"r\u030c","\u1e59":"r\u0307","\u0157":"r\u0327","\u015b":"s\u0301","\u1e65":"s\u0301\u0307","\u0161":"s\u030c","\u1e67":"s\u030c\u0307","\u015d":"s\u0302","\u1e61":"s\u0307","\u015f":"s\u0327","\u1e97":"t\u0308","\u0165":"t\u030c","\u1e6b":"t\u0307","\u0163":"t\u0327","\xfa":"u\u0301","\xf9":"u\u0300","\xfc":"u\u0308","\u01d8":"u\u0308\u0301","\u01dc":"u\u0308\u0300","\u01d6":"u\u0308\u0304","\u01da":"u\u0308\u030c","\u0169":"u\u0303","\u1e79":"u\u0303\u0301","\u016b":"u\u0304","\u1e7b":"u\u0304\u0308","\u016d":"u\u0306","\u01d4":"u\u030c","\xfb":"u\u0302","\u016f":"u\u030a","\u0171":"u\u030b","\u1e7d":"v\u0303","\u1e83":"w\u0301","\u1e81":"w\u0300","\u1e85":"w\u0308","\u0175":"w\u0302","\u1e87":"w\u0307","\u1e98":"w\u030a","\u1e8d":"x\u0308","\u1e8b":"x\u0307","\xfd":"y\u0301","\u1ef3":"y\u0300","\xff":"y\u0308","\u1ef9":"y\u0303","\u0233":"y\u0304","\u0177":"y\u0302","\u1e8f":"y\u0307","\u1e99":"y\u030a","\u017a":"z\u0301","\u017e":"z\u030c","\u1e91":"z\u0302","\u017c":"z\u0307","\xc1":"A\u0301","\xc0":"A\u0300","\xc4":"A\u0308","\u01de":"A\u0308\u0304","\xc3":"A\u0303","\u0100":"A\u0304","\u0102":"A\u0306","\u1eae":"A\u0306\u0301","\u1eb0":"A\u0306\u0300","\u1eb4":"A\u0306\u0303","\u01cd":"A\u030c","\xc2":"A\u0302","\u1ea4":"A\u0302\u0301","\u1ea6":"A\u0302\u0300","\u1eaa":"A\u0302\u0303","\u0226":"A\u0307","\u01e0":"A\u0307\u0304","\xc5":"A\u030a","\u01fa":"A\u030a\u0301","\u1e02":"B\u0307","\u0106":"C\u0301","\u1e08":"C\u0327\u0301","\u010c":"C\u030c","\u0108":"C\u0302","\u010a":"C\u0307","\xc7":"C\u0327","\u010e":"D\u030c","\u1e0a":"D\u0307","\u1e10":"D\u0327","\xc9":"E\u0301","\xc8":"E\u0300","\xcb":"E\u0308","\u1ebc":"E\u0303","\u0112":"E\u0304","\u1e16":"E\u0304\u0301","\u1e14":"E\u0304\u0300","\u0114":"E\u0306","\u1e1c":"E\u0327\u0306","\u011a":"E\u030c","\xca":"E\u0302","\u1ebe":"E\u0302\u0301","\u1ec0":"E\u0302\u0300","\u1ec4":"E\u0302\u0303","\u0116":"E\u0307","\u0228":"E\u0327","\u1e1e":"F\u0307","\u01f4":"G\u0301","\u1e20":"G\u0304","\u011e":"G\u0306","\u01e6":"G\u030c","\u011c":"G\u0302","\u0120":"G\u0307","\u0122":"G\u0327","\u1e26":"H\u0308","\u021e":"H\u030c","\u0124":"H\u0302","\u1e22":"H\u0307","\u1e28":"H\u0327","\xcd":"I\u0301","\xcc":"I\u0300","\xcf":"I\u0308","\u1e2e":"I\u0308\u0301","\u0128":"I\u0303","\u012a":"I\u0304","\u012c":"I\u0306","\u01cf":"I\u030c","\xce":"I\u0302","\u0130":"I\u0307","\u0134":"J\u0302","\u1e30":"K\u0301","\u01e8":"K\u030c","\u0136":"K\u0327","\u0139":"L\u0301","\u013d":"L\u030c","\u013b":"L\u0327","\u1e3e":"M\u0301","\u1e40":"M\u0307","\u0143":"N\u0301","\u01f8":"N\u0300","\xd1":"N\u0303","\u0147":"N\u030c","\u1e44":"N\u0307","\u0145":"N\u0327","\xd3":"O\u0301","\xd2":"O\u0300","\xd6":"O\u0308","\u022a":"O\u0308\u0304","\xd5":"O\u0303","\u1e4c":"O\u0303\u0301","\u1e4e":"O\u0303\u0308","\u022c":"O\u0303\u0304","\u014c":"O\u0304","\u1e52":"O\u0304\u0301","\u1e50":"O\u0304\u0300","\u014e":"O\u0306","\u01d1":"O\u030c","\xd4":"O\u0302","\u1ed0":"O\u0302\u0301","\u1ed2":"O\u0302\u0300","\u1ed6":"O\u0302\u0303","\u022e":"O\u0307","\u0230":"O\u0307\u0304","\u0150":"O\u030b","\u1e54":"P\u0301","\u1e56":"P\u0307","\u0154":"R\u0301","\u0158":"R\u030c","\u1e58":"R\u0307","\u0156":"R\u0327","\u015a":"S\u0301","\u1e64":"S\u0301\u0307","\u0160":"S\u030c","\u1e66":"S\u030c\u0307","\u015c":"S\u0302","\u1e60":"S\u0307","\u015e":"S\u0327","\u0164":"T\u030c","\u1e6a":"T\u0307","\u0162":"T\u0327","\xda":"U\u0301","\xd9":"U\u0300","\xdc":"U\u0308","\u01d7":"U\u0308\u0301","\u01db":"U\u0308\u0300","\u01d5":"U\u0308\u0304","\u01d9":"U\u0308\u030c","\u0168":"U\u0303","\u1e78":"U\u0303\u0301","\u016a":"U\u0304","\u1e7a":"U\u0304\u0308","\u016c":"U\u0306","\u01d3":"U\u030c","\xdb":"U\u0302","\u016e":"U\u030a","\u0170":"U\u030b","\u1e7c":"V\u0303","\u1e82":"W\u0301","\u1e80":"W\u0300","\u1e84":"W\u0308","\u0174":"W\u0302","\u1e86":"W\u0307","\u1e8c":"X\u0308","\u1e8a":"X\u0307","\xdd":"Y\u0301","\u1ef2":"Y\u0300","\u0178":"Y\u0308","\u1ef8":"Y\u0303","\u0232":"Y\u0304","\u0176":"Y\u0302","\u1e8e":"Y\u0307","\u0179":"Z\u0301","\u017d":"Z\u030c","\u1e90":"Z\u0302","\u017b":"Z\u0307","\u03ac":"\u03b1\u0301","\u1f70":"\u03b1\u0300","\u1fb1":"\u03b1\u0304","\u1fb0":"\u03b1\u0306","\u03ad":"\u03b5\u0301","\u1f72":"\u03b5\u0300","\u03ae":"\u03b7\u0301","\u1f74":"\u03b7\u0300","\u03af":"\u03b9\u0301","\u1f76":"\u03b9\u0300","\u03ca":"\u03b9\u0308","\u0390":"\u03b9\u0308\u0301","\u1fd2":"\u03b9\u0308\u0300","\u1fd1":"\u03b9\u0304","\u1fd0":"\u03b9\u0306","\u03cc":"\u03bf\u0301","\u1f78":"\u03bf\u0300","\u03cd":"\u03c5\u0301","\u1f7a":"\u03c5\u0300","\u03cb":"\u03c5\u0308","\u03b0":"\u03c5\u0308\u0301","\u1fe2":"\u03c5\u0308\u0300","\u1fe1":"\u03c5\u0304","\u1fe0":"\u03c5\u0306","\u03ce":"\u03c9\u0301","\u1f7c":"\u03c9\u0300","\u038e":"\u03a5\u0301","\u1fea":"\u03a5\u0300","\u03ab":"\u03a5\u0308","\u1fe9":"\u03a5\u0304","\u1fe8":"\u03a5\u0306","\u038f":"\u03a9\u0301","\u1ffa":"\u03a9\u0300"};class Mn{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new xn(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new a("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new fa("}")),this.gullet.pushTokens(e);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r}parseExpression(e,t){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var a=this.fetch();if(Mn.endOfExpression.has(a.text))break;if(t&&a.text===t)break;if(e&&rn[a.text]&&rn[a.text].infix)break;var n=this.parseAtom(t);if(!n)break;"internal"!==n.type&&r.push(n)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t,r=-1,n=0;n=128))return null;this.settings.strict&&(T(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),i={type:"textord",mode:"text",loc:ga.range(e),text:t}}if(this.consume(),o)for(var h=0;ht.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*n.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*n.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),t.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},o.prototype.propogateDisplacementToChildren=function(t,e){for(var i,r=this.getChild().getNodes(),n=0;n0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),i=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(i),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},v.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var i=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(i,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},v.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},i=0;i1)for(a=0;ar&&(r=Math.floor(s.y)),o=Math.floor(s.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new c(g.WORLD_CENTER_X-s.x/2,g.WORLD_CENTER_Y-s.y/2))},v.radialLayout=function(t,e,i){var r=Math.max(this.maxDiagonalInTree(t),h.DEFAULT_RADIAL_SEPARATION);v.branchRadialLayout(e,null,0,359,0,r);var n=y.calculateBounds(t),o=new E;o.setDeviceOrgX(n.getMinX()),o.setDeviceOrgY(n.getMinY()),o.setWorldOrgX(i.x),o.setWorldOrgY(i.y);for(var s=0;s1;){var E=y[0];y.splice(0,1);var A=g.indexOf(E);A>=0&&g.splice(A,1),p--,u--}c=null!=e?(g.indexOf(y[0])+1)%p:0;for(var N=Math.abs(r-i)/u,T=c;d!=u;T=++T%p){var L=g[T].getOtherEnd(t);if(L!=e){var _=(i+d*N)%360,m=(_+N)%360;v.branchRadialLayout(L,t,_,m,n+o,o),d++}}},v.maxDiagonalInTree=function(t){for(var e=p.MIN_VALUE,i=0;ie&&(e=r)}return e},v.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},v.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var i=[],r=this.graphManager.getAllNodes(),n=0;n1){var r="DummyCompound_"+i;t.memberGroups[r]=e[i];var n=e[i][0].getParent(),o=new s(t.graphManager);o.id=r,o.paddingLeft=n.paddingLeft||0,o.paddingRight=n.paddingRight||0,o.paddingBottom=n.paddingBottom||0,o.paddingTop=n.paddingTop||0,t.idToDummyNode[r]=o;var a=t.getGraphManager().add(t.newGraph(),o),h=n.getChild();h.add(o);for(var l=0;l=0;t--){var e=this.compoundOrder[t],i=e.id,r=e.paddingLeft,n=e.paddingTop;this.adjustLocations(this.tiledMemberPack[i],e.rect.x,e.rect.y,r,n)}},v.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach(function(i){var r=t.idToDummyNode[i],n=r.paddingLeft,o=r.paddingTop;t.adjustLocations(e[i],r.rect.x,r.rect.y,n,o)})},v.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var i=t.getChild();if(null==i)return this.toBeTiled[e]=!1,!1;for(var r=i.getNodes(),n=0;n0)return this.toBeTiled[e]=!1,!1;if(null!=o.getChild()){if(!this.getToBeTiled(o))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[o.id]=!1}return this.toBeTiled[e]=!0,!0},v.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),i=0,r=0;rh&&(h=g.rect.height)}i+=h+t.verticalPadding}},v.prototype.tileCompoundMembers=function(t,e){var i=this;this.tiledMemberPack=[],Object.keys(t).forEach(function(r){var n=e[r];i.tiledMemberPack[r]=i.tileNodes(t[r],n.paddingLeft+n.paddingRight),n.rect.width=i.tiledMemberPack[r].width,n.rect.height=i.tiledMemberPack[r].height})},v.prototype.tileNodes=function(t,e){var i={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:h.TILING_PADDING_VERTICAL,horizontalPadding:h.TILING_PADDING_HORIZONTAL};t.sort(function(t,e){return t.rect.width*t.rect.height>e.rect.width*e.rect.height?-1:t.rect.width*t.rect.height0&&(o+=t.horizontalPadding),t.rowWidth[i]=o,t.width0&&(s+=t.verticalPadding);var a=0;s>t.rowHeight[i]&&(a=t.rowHeight[i],t.rowHeight[i]=s,a=t.rowHeight[i]-a),t.height+=a,t.rows[i].push(e)},v.prototype.getShortestRowIndex=function(t){for(var e=-1,i=Number.MAX_VALUE,r=0;ri&&(e=r,i=t.rowWidth[r]);return e},v.prototype.canAddHorizontal=function(t,e,i){var r=this.getShortestRowIndex(t);if(r<0)return!0;var n=t.rowWidth[r];if(n+t.horizontalPadding+e<=t.width)return!0;var o,s,a=0;return t.rowHeight[r]0&&(a=i+t.verticalPadding-t.rowHeight[r]),o=t.width-n>=e+t.horizontalPadding?(t.height+a)/(n+e+t.horizontalPadding):(t.height+a)/t.width,a=i+t.verticalPadding,(s=t.widtho&&e!=i){r.splice(-1,1),t.rows[i].push(n),t.rowWidth[e]=t.rowWidth[e]-o,t.rowWidth[i]=t.rowWidth[i]+o,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=Number.MIN_VALUE,a=0;as&&(s=r[a].height);e>0&&(s+=t.verticalPadding);var h=t.rowHeight[e]+t.rowHeight[i];t.rowHeight[e]=s,t.rowHeight[i]0)for(var g=n;g<=o;g++)h[0]+=this.grid[g][s-1].length+this.grid[g][s].length-1;if(o0)for(g=s;g<=a;g++)h[3]+=this.grid[n-1][g].length+this.grid[n][g].length-1;for(var u,c,d=p.MAX_VALUE,f=0;f0&&(s=i.getGraphManager().add(i.newGraph(),o),this.processChildrenList(s,u,i))}},u.prototype.stop=function(){return this.stopped=!0,this};var d=function(t){t("layout","cose-bilkent",u)};"undefined"!=typeof cytoscape&&d(cytoscape),t.exports=d}])},t.exports=r(i(87799))},23143(t){var e;e=function(){return function(t){var e={};function i(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=26)}([function(t,e,i){"use strict";function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,t.exports=r},function(t,e,i){"use strict";var r=i(2),n=i(8),o=i(9);function s(t,e,i){r.call(this,i),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=i,this.bendpoints=[],this.source=t,this.target=e}for(var a in s.prototype=Object.create(r.prototype),r)s[a]=r[a];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(t,e){for(var i=this.getOtherEnd(t),r=e.getGraphManager().getRoot();;){if(i.getOwner()==e)return i;if(i.getOwner()==r)break;i=i.getOwner().getParent()}return null},s.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=n.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,i){"use strict";t.exports=function(t){this.vGraphObject=t}},function(t,e,i){"use strict";var r=i(2),n=i(10),o=i(13),s=i(0),a=i(16),h=i(4);function l(t,e,i,s){null==i&&null==s&&(s=e),r.call(this,s),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=n.MIN_VALUE,this.inclusionTreeDepth=n.MAX_VALUE,this.vGraphObject=s,this.edges=[],this.graphManager=t,this.rect=null!=i&&null!=e?new o(e.x,e.y,i.width,i.height):new o}for(var g in l.prototype=Object.create(r.prototype),r)l[g]=r[g];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(t){this.rect.width=t},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(t){this.rect.height=t},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new h(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new h(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.prototype.setRect=function(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},l.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},l.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},l.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},l.prototype.getEdgeListToNode=function(t){var e=[],i=this;return i.edges.forEach(function(r){if(r.target==t){if(r.source!=i)throw"Incorrect edge source!";e.push(r)}}),e},l.prototype.getEdgesBetween=function(t){var e=[],i=this;return i.edges.forEach(function(r){if(r.source!=i&&r.target!=i)throw"Incorrect edge source and/or target";r.target!=t&&r.source!=t||e.push(r)}),e},l.prototype.getNeighborsList=function(){var t=new Set,e=this;return e.edges.forEach(function(i){if(i.source==e)t.add(i.target);else{if(i.target!=e)throw"Incorrect incidency!";t.add(i.source)}}),t},l.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),i=0;ie&&(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)),this.labelHeight>i&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-i)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-i),this.setHeight(this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==n.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},l.prototype.transform=function(t){var e=this.rect.x;e>s.WORLD_BOUNDARY?e=s.WORLD_BOUNDARY:e<-s.WORLD_BOUNDARY&&(e=-s.WORLD_BOUNDARY);var i=this.rect.y;i>s.WORLD_BOUNDARY?i=s.WORLD_BOUNDARY:i<-s.WORLD_BOUNDARY&&(i=-s.WORLD_BOUNDARY);var r=new h(e,i),n=t.inverseTransformPoint(r);this.setLocation(n.x,n.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=l},function(t,e,i){"use strict";function r(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(t){this.x=t},r.prototype.setY=function(t){this.y=t},r.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=r},function(t,e,i){"use strict";var r=i(2),n=i(10),o=i(0),s=i(6),a=i(3),h=i(1),l=i(13),g=i(12),u=i(11);function c(t,e,i){r.call(this,i),this.estimatedSize=n.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(var d in c.prototype=Object.create(r.prototype),r)c[d]=r[d];c.prototype.getNodes=function(){return this.nodes},c.prototype.getEdges=function(){return this.edges},c.prototype.getGraphManager=function(){return this.graphManager},c.prototype.getParent=function(){return this.parent},c.prototype.getLeft=function(){return this.left},c.prototype.getRight=function(){return this.right},c.prototype.getTop=function(){return this.top},c.prototype.getBottom=function(){return this.bottom},c.prototype.isConnected=function(){return this.isConnected},c.prototype.add=function(t,e,i){if(null==e&&null==i){var r=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(r)>-1)throw"Node already in graph!";return r.owner=this,this.getNodes().push(r),r}var n=t;if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(i)>-1))throw"Source or target not in graph!";if(e.owner!=i.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=i.owner?null:(n.source=e,n.target=i,n.isInterGraph=!1,this.getEdges().push(n),e.edges.push(n),i!=e&&i.edges.push(n),n)},c.prototype.remove=function(t){var e=t;if(t instanceof a){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var i=e.edges.slice(),r=i.length,n=0;n-1&&g>-1))throw"Source and/or target doesn't know this edge!";if(o.source.edges.splice(l,1),o.target!=o.source&&o.target.edges.splice(g,1),-1==(s=o.source.owner.getEdges().indexOf(o)))throw"Not in owner's edge list!";o.source.owner.getEdges().splice(s,1)}},c.prototype.updateLeftTop=function(){for(var t,e,i,r=n.MAX_VALUE,o=n.MAX_VALUE,s=this.getNodes(),a=s.length,h=0;h(t=l.getTop())&&(r=t),o>(e=l.getLeft())&&(o=e)}return r==n.MAX_VALUE?null:(i=null!=s[0].getParent().paddingLeft?s[0].getParent().paddingLeft:this.margin,this.left=o-i,this.top=r-i,new g(this.left,this.top))},c.prototype.updateBounds=function(t){for(var e,i,r,o,s,a=n.MAX_VALUE,h=-n.MAX_VALUE,g=n.MAX_VALUE,u=-n.MAX_VALUE,c=this.nodes,d=c.length,p=0;p(e=f.getLeft())&&(a=e),h<(i=f.getRight())&&(h=i),g>(r=f.getTop())&&(g=r),u<(o=f.getBottom())&&(u=o)}var y=new l(a,g,h-a,u-g);a==n.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),s=null!=c[0].getParent().paddingLeft?c[0].getParent().paddingLeft:this.margin,this.left=y.x-s,this.right=y.x+y.width+s,this.top=y.y-s,this.bottom=y.y+y.height+s},c.calculateBounds=function(t){for(var e,i,r,o,s=n.MAX_VALUE,a=-n.MAX_VALUE,h=n.MAX_VALUE,g=-n.MAX_VALUE,u=t.length,c=0;c(e=d.getLeft())&&(s=e),a<(i=d.getRight())&&(a=i),h>(r=d.getTop())&&(h=r),g<(o=d.getBottom())&&(g=o)}return new l(s,h,a-s,g-h)},c.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},c.prototype.getEstimatedSize=function(){if(this.estimatedSize==n.MIN_VALUE)throw"assert failed";return this.estimatedSize},c.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,i=e.length,r=0;r=this.nodes.length){var h=0;n.forEach(function(e){e.owner==t&&h++}),h==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},t.exports=c},function(t,e,i){"use strict";var r,n=i(1);function o(t){r=i(5),this.layout=t,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),i=this.add(t,e);return this.setRootGraph(i),this.rootGraph},o.prototype.add=function(t,e,i,r,n){if(null==i&&null==r&&null==n){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return t.parent=e,e.child=t,t}n=i,i=t;var o=(r=e).getOwner(),s=n.getOwner();if(null==o||o.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==s||s.getGraphManager()!=this)throw"Target not in this graph mgr!";if(o==s)return i.isInterGraph=!1,o.add(i,r,n);if(i.isInterGraph=!0,i.source=r,i.target=n,this.edges.indexOf(i)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(i),null==i.source||null==i.target)throw"Edge source and/or target is null!";if(-1!=i.source.edges.indexOf(i)||-1!=i.target.edges.indexOf(i))throw"Edge already in source and/or target incidency list!";return i.source.edges.push(i),i.target.edges.push(i),i},o.prototype.remove=function(t){if(t instanceof r){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var i,o=[],s=(o=o.concat(e.getEdges())).length,a=0;a=e.getRight()?i[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(i[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(i[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var o=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(o=1);var s=o*i[0],a=i[1]/o;i[0]s)return i[0]=r,i[1]=h,i[2]=o,i[3]=A,!1;if(no)return i[0]=a,i[1]=n,i[2]=E,i[3]=s,!1;if(ro?(i[0]=g,i[1]=u,_=!0):(i[0]=l,i[1]=h,_=!0):O===D&&(r>o?(i[0]=a,i[1]=h,_=!0):(i[0]=c,i[1]=u,_=!0)),-I===D?o>r?(i[2]=v,i[3]=A,m=!0):(i[2]=E,i[3]=y,m=!0):I===D&&(o>r?(i[2]=f,i[3]=y,m=!0):(i[2]=N,i[3]=A,m=!0)),_&&m)return!1;if(r>o?n>s?(w=this.getCardinalDirection(O,D,4),R=this.getCardinalDirection(I,D,2)):(w=this.getCardinalDirection(-O,D,3),R=this.getCardinalDirection(-I,D,1)):n>s?(w=this.getCardinalDirection(-O,D,1),R=this.getCardinalDirection(-I,D,3)):(w=this.getCardinalDirection(O,D,2),R=this.getCardinalDirection(I,D,4)),!_)switch(w){case 1:M=h,C=r+-p/D,i[0]=C,i[1]=M;break;case 2:C=c,M=n+d*D,i[0]=C,i[1]=M;break;case 3:M=u,C=r+p/D,i[0]=C,i[1]=M;break;case 4:C=g,M=n+-d*D,i[0]=C,i[1]=M}if(!m)switch(R){case 1:x=y,G=o+-L/D,i[2]=G,i[3]=x;break;case 2:G=N,x=s+T*D,i[2]=G,i[3]=x;break;case 3:x=A,G=o+L/D,i[2]=G,i[3]=x;break;case 4:G=v,x=s+-T*D,i[2]=G,i[3]=x}}return!1},n.getCardinalDirection=function(t,e,i){return t>e?i:1+i%4},n.getIntersection=function(t,e,i,n){if(null==n)return this.getIntersection2(t,e,i);var o,s,a,h,l,g,u,c=t.x,d=t.y,p=e.x,f=e.y,y=i.x,E=i.y,v=n.x,A=n.y;return 0===(u=(o=f-d)*(h=y-v)-(s=A-E)*(a=c-p))?null:new r((a*(g=v*E-y*A)-h*(l=p*d-c*f))/u,(s*l-o*g)/u)},n.angleOfVector=function(t,e,i,r){var n=void 0;return t!==i?(n=Math.atan((r-e)/(i-t)),i0?1:t<0?-1:0},r.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},r.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=r},function(t,e,i){"use strict";function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,t.exports=r},function(t,e,i){"use strict";var r=function(){function t(t,e){for(var i=0;i0&&e;){for(a.push(l[0]);a.length>0&&e;){var g=a[0];a.splice(0,1),s.add(g);var u=g.getEdges();for(o=0;o-1&&l.splice(f,1)}s=new Set,h=new Map}else t=[]}return t},c.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],i=t.source,r=this.graphManager.calcLowestCommonAncestor(t.source,t.target),n=0;n0){for(var n=this.edgeToDummyNodes.get(i),o=0;o=0&&e.splice(u,1),g.getNeighborsList().forEach(function(t){if(i.indexOf(t)<0){var e=r.get(t)-1;1==e&&h.push(t),r.set(t,e)}})}i=i.concat(h),1!=e.length&&2!=e.length||(n=!0,o=e[0])}return o},c.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=c},function(t,e,i){"use strict";function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=1e4*Math.sin(r.seed++),r.x-Math.floor(r.x)},t.exports=r},function(t,e,i){"use strict";var r=i(4);function n(t,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}n.prototype.getWorldOrgX=function(){return this.lworldOrgX},n.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},n.prototype.getWorldOrgY=function(){return this.lworldOrgY},n.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},n.prototype.getWorldExtX=function(){return this.lworldExtX},n.prototype.setWorldExtX=function(t){this.lworldExtX=t},n.prototype.getWorldExtY=function(){return this.lworldExtY},n.prototype.setWorldExtY=function(t){this.lworldExtY=t},n.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},n.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},n.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},n.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},n.prototype.getDeviceExtX=function(){return this.ldeviceExtX},n.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},n.prototype.getDeviceExtY=function(){return this.ldeviceExtY},n.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},n.prototype.transformX=function(t){var e=0,i=this.lworldExtX;return 0!=i&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/i),e},n.prototype.transformY=function(t){var e=0,i=this.lworldExtY;return 0!=i&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/i),e},n.prototype.inverseTransformX=function(t){var e=0,i=this.ldeviceExtX;return 0!=i&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/i),e},n.prototype.inverseTransformY=function(t){var e=0,i=this.ldeviceExtY;return 0!=i&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/i),e},n.prototype.inverseTransformPoint=function(t){return new r(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=n},function(t,e,i){"use strict";var r=i(15),n=i(7),o=i(0),s=i(8),a=i(9);function h(){r.call(this),this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=n.DEFAULT_EDGE_LENGTH,this.springConstant=n.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=n.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=n.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=n.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=n.MAX_ITERATIONS}for(var l in h.prototype=Object.create(r.prototype),r)h[l]=r[l];h.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},h.prototype.calcIdealEdgeLengths=function(){for(var t,e,i,r,s,a,h=this.getGraphManager().getAllEdges(),l=0;ln.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*n.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-n.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>n.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(n.COOLING_ADAPTATION_FACTOR,1-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*(1-n.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},h.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),i=0;i0&&void 0!==arguments[0])||arguments[0],a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],h=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&s&&this.updateGrid(),o=new Set,t=0;t(h=e.getEstimatedSize()*this.gravityRangeFactor)||a>h)&&(t.gravitationForceX=-this.gravityConstant*n,t.gravitationForceY=-this.gravityConstant*o):(s>(h=e.getEstimatedSize()*this.compoundGravityRangeFactor)||a>h)&&(t.gravitationForceX=-this.gravityConstant*n*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*o*this.compoundGravityConstant)},h.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=a.length||l>=a[0].length))for(var g=0;gt}}]),t}();t.exports=o},function(t,e,i){"use strict";var r=function(){function t(t,e){for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sequence1=e,this.sequence2=i,this.match_score=r,this.mismatch_penalty=n,this.gap_penalty=o,this.iMax=e.length+1,this.jMax=i.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;i--){var r=this.listeners[i];r.event===t&&r.callback===e&&this.listeners.splice(i,1)}},n.emit=function(t,e){for(var i=0;if});var r=i(31293),n=i(86827),o=i(90165),s=i(43457),a=i(70451);function h(t,e){t.forEach(t=>{const i={id:t.id,labelText:t.label,height:t.height,width:t.width,padding:t.padding??0};Object.keys(t).forEach(e=>{["id","label","height","width","padding","x","y"].includes(e)||(i[e]=t[e])}),e.add({group:"nodes",data:i,position:{x:t.x??0,y:t.y??0}})})}function l(t,e){t.forEach(t=>{const i={id:t.id,source:t.start,target:t.end};Object.keys(t).forEach(e=>{["id","start","end"].includes(e)||(i[e]=t[e])}),e.add({group:"edges",data:i})})}function g(t){return new Promise(e=>{const i=(0,a.Ltv)("body").append("div").attr("id","cy").attr("style","display:none"),n=(0,o.A)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});i.remove(),h(t.nodes,n),l(t.edges,n),n.nodes().forEach(function(t){t.layoutDimensions=()=>{const e=t.data();return{w:e.width,h:e.height}}});n.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),n.ready(t=>{r.R.info("Cytoscape ready",t),e(n)})})}function u(t){return t.nodes().map(t=>{const e=t.data(),i=t.position(),r={id:e.id,x:i.x,y:i.y};return Object.keys(e).forEach(t=>{"id"!==t&&(r[t]=e[t])}),r})}function c(t){return t.edges().map(t=>{const e=t.data(),i=t._private.rscratch,r={id:e.id,source:e.source,target:e.target,startX:i.startX,startY:i.startY,midX:i.midX,midY:i.midY,endX:i.endX,endY:i.endY};return Object.keys(e).forEach(t=>{["id","source","target"].includes(t)||(r[t]=e[t])}),r})}async function d(t,e){r.R.debug("Starting cose-bilkent layout algorithm");try{p(t);const e=await g(t),i=u(e),n=c(e);return r.R.debug(`Layout completed: ${i.length} nodes, ${n.length} edges`),{nodes:i,edges:n}}catch(i){throw r.R.error("Error in cose-bilkent layout algorithm:",i),i}}function p(t){if(!t)throw new Error("Layout data is required");if(!t.config)throw new Error("Configuration is required in layout data");if(!t.rootNode)throw new Error("Root node is required");if(!t.nodes||!Array.isArray(t.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(t.edges))throw new Error("Edges array is required in layout data");return!0}o.A.use(s),(0,n.K)(h,"addNodes"),(0,n.K)(l,"addEdges"),(0,n.K)(g,"createCytoscapeInstance"),(0,n.K)(u,"extractPositionedNodes"),(0,n.K)(c,"extractPositionedEdges"),(0,n.K)(d,"executeCoseBilkentLayout"),(0,n.K)(p,"validateLayoutData");var f=(0,n.K)(async(t,e,{insertCluster:i,insertEdge:r,insertEdgeLabel:n,insertMarkers:o,insertNode:s,log:a,positionEdgeLabel:h},{algorithm:l})=>{const g={},u={},c=e.select("g");o(c,t.markers,t.type,t.diagramId);const p=c.insert("g").attr("class","subgraphs"),f=c.insert("g").attr("class","edgePaths"),y=c.insert("g").attr("class","edgeLabels"),E=c.insert("g").attr("class","nodes");a.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(t.nodes.map(async e=>{if(e.isGroup){const t={...e};u[e.id]=t,g[e.id]=t,await i(p,e)}else{const i={...e};g[e.id]=i;const r=await s(E,e,{config:t.config,dir:t.direction||"TB"}),n=r.node().getBBox();i.width=n.width,i.height=n.height,i.domId=r,a.debug(`Node ${e.id} dimensions: ${n.width}x${n.height}`)}})),a.debug("Running cose-bilkent layout algorithm");const v={...t,nodes:t.nodes.map(t=>{const e=g[t.id];return{...t,width:e.width,height:e.height}})},A=await d(v,t.config);a.debug("Positioning nodes based on layout results"),A.nodes.forEach(t=>{const e=g[t.id];e?.domId&&(e.domId.attr("transform",`translate(${t.x}, ${t.y})`),e.x=t.x,e.y=t.y,a.debug(`Positioned node ${e.id} at center (${t.x}, ${t.y})`))}),A.edges.forEach(e=>{const i=t.edges.find(t=>t.id===e.id);i&&(i.points=[{x:e.startX,y:e.startY},{x:e.midX,y:e.midY},{x:e.endX,y:e.endY}])}),a.debug("Inserting and positioning edges"),await Promise.all(t.edges.map(async e=>{await n(y,e);const i=g[e.start??""],o=g[e.end??""];if(i&&o){const n=A.edges.find(t=>t.id===e.id);if(n){a.debug("APA01 positionedEdge",n);const s={...e},l=r(f,s,u,t.type,i,o,t.diagramId);h(s,l)}else{const n={...e,points:[{x:i.x||0,y:i.y||0},{x:o.x||0,y:o.y||0}]},s=r(f,n,u,t.type,i,o,t.diagramId);h(n,s)}}})),a.debug("Cose-bilkent rendering completed")},"render")}}]); \ No newline at end of file diff --git a/assets/js/2223.77e8f577.js b/assets/js/2223.77e8f577.js new file mode 100644 index 000000000..e52ad372d --- /dev/null +++ b/assets/js/2223.77e8f577.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[2223],{2223(e,s,c){c.d(s,{createRailroadServices:()=>a.l});var a=c(38426);c(4954)}}]); \ No newline at end of file diff --git a/assets/js/2237.c64b8161.js b/assets/js/2237.c64b8161.js new file mode 100644 index 000000000..e1ac358a9 --- /dev/null +++ b/assets/js/2237.c64b8161.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[2237],{23363(e,t,n){n.d(t,{A:()=>a});n(96540);var i=n(34164),o=n(21312),s=n(51107),r=n(74848);function a(e){let t=e.className;return(0,r.jsx)("main",{className:(0,i.A)("container margin-vert--xl",t),children:(0,r.jsx)("div",{className:"row",children:(0,r.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,r.jsx)(s.A,{as:"h1",className:"hero__title",children:(0,r.jsx)(o.A,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,r.jsx)("p",{children:(0,r.jsx)(o.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,r.jsx)("p",{children:(0,r.jsx)(o.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}},82237(e,t,n){n.r(t),n.d(t,{default:()=>d});n(96540);var i=n(21312),o=n(45500),s=n(36882),r=n(23363),a=n(74848);function d(){const e=(0,i.T)({id:"theme.NotFound.title",message:"Page Not Found"});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.be,{title:e}),(0,a.jsx)(s.A,{children:(0,a.jsx)(r.A,{})})]})}}}]); \ No newline at end of file diff --git a/assets/js/2355.920431e0.js b/assets/js/2355.920431e0.js new file mode 100644 index 000000000..3f8947909 --- /dev/null +++ b/assets/js/2355.920431e0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[2355],{52355(e,s,c){c.d(s,{createEventModelingServices:()=>a.g});var a=c(82688);c(4954)}}]); \ No newline at end of file diff --git a/assets/js/243e784f.87e32b8f.js b/assets/js/243e784f.87e32b8f.js new file mode 100644 index 000000000..52c566ed1 --- /dev/null +++ b/assets/js/243e784f.87e32b8f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[1914],{51022(e,t,s){s.r(t),s.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>l,frontMatter:()=>a,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"concepts/incentives/overview","title":"Incentives Overview","description":"Describes dual incentive mechanisms combining storage incentives for data retention and bandwidth incentives for data relay.","source":"@site/docs/concepts/incentives/overview.mdx","sourceDirName":"concepts/incentives","slug":"/concepts/incentives/overview","permalink":"/docs/concepts/incentives/overview","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/concepts/incentives/overview.mdx","tags":[],"version":"current","frontMatter":{"title":"Incentives Overview","id":"overview","description":"Describes dual incentive mechanisms combining storage incentives for data retention and bandwidth incentives for data relay."},"sidebar":"concepts","previous":{"title":"Erasure Coding","permalink":"/docs/concepts/DISC/erasure-coding"},"next":{"title":"Redistribution Game","permalink":"/docs/concepts/incentives/redistribution-game"}}');var i=s(74848),r=s(28453);s(47650);const a={title:"Incentives Overview",id:"overview",description:"Describes dual incentive mechanisms combining storage incentives for data retention and bandwidth incentives for data relay."},o=void 0,c={},d=[{value:"Storage Incentives",id:"storage-incentives",level:2},{value:"Postage Stamps",id:"postage-stamps",level:3},{value:"Redistribution Game",id:"redistribution-game",level:3},{value:"Price Oracle",id:"price-oracle",level:3},{value:"Bandwidth Incentives",id:"bandwidth-incentives",level:2}];function h(e){const t={a:"a",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(t.p,{children:["A key challenge in decentralized data networks is incentivizing users to store and transmit data. Swarm addresses this with two incentive mechanisms: ",(0,i.jsx)(t.strong,{children:"storage incentives"}),", which reward nodes for storing data, and ",(0,i.jsx)(t.strong,{children:"bandwidth incentives"}),", which reward nodes for relaying data. Together, these mechanisms establish a self-sustaining economic system where nodes are compensated for contributing resources honestly."]}),"\n",(0,i.jsxs)(t.p,{children:["Swarm's storage incentives are detailed in the ",(0,i.jsx)(t.a,{href:"https://www.ethswarm.org/swarm-storage-incentives.pdf",children:"Future Proof Storage"})," paper and ",(0,i.jsx)(t.a,{href:"https://papers.ethswarm.org/p/book-of-swarm/",children:"The Book of Swarm"}),"."]}),"\n",(0,i.jsx)(t.h2,{id:"storage-incentives",children:"Storage Incentives"}),"\n",(0,i.jsx)(t.p,{children:"Storage incentives reward node operators for providing disk space and reliably storing data. The system is governed by three interconnected smart contracts:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Postage Stamp Contract"}),' \u2013 Handles payments for uploading data by way of purchasing "postage stamp batches".']}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Redistribution Contract"})," \u2013 Distributes payments for postage stamps to nodes that store data."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Price Oracle Contract"})," \u2013 Uses network redundancy data to determine postage stamp prices."]}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["If you want to dig into the code, check out the ",(0,i.jsx)(t.a,{href:"https://github.com/ethersphere/storage-incentives",children:"incentives contracts repo"}),"\nYou can find the on-chain address for each contract within the docs ",(0,i.jsx)(t.a,{href:"/docs/references/smart-contracts#storage-incentives-contracts",children:"here"}),", however since the contracts there are updated manually, they may at times fall slightly behind the most recent changes. For the most up to date address for each storage incentives contract refer to the ",(0,i.jsx)(t.a,{href:"https://github.com/ethersphere/go-storage-incentives-abi/commits/master/abi/abi_mainnet.go",children:"storage incentives ABI repo"}),", and you can also find past addresses of older versions of the incentives contracts by reviewing previous commits."]}),"\n",(0,i.jsx)(t.h3,{id:"postage-stamps",children:"Postage Stamps"}),"\n",(0,i.jsx)(t.p,{children:"Postage stamps are required to upload data to Swarm, similar to how real-world postage stamps prepay for mail delivery. Instead of being purchased individually, they are bought in batches using xBZZ through the postage stamp smart contract."}),"\n",(0,i.jsxs)(t.p,{children:["The xBZZ used to buy postage stamps is later redistributed as storage incentives. The ",(0,i.jsx)(t.strong,{children:"price oracle contract"})," adjusts postage stamp pricing based on network redundancy to ensure a sustainable level of storage. You can find more details about postage stamps ",(0,i.jsx)(t.a,{href:"/docs/concepts/incentives/postage-stamps",children:"here"}),"."]}),"\n",(0,i.jsx)(t.h3,{id:"redistribution-game",children:"Redistribution Game"}),"\n",(0,i.jsxs)(t.p,{children:["The redistribution game determines how xBZZ from postage stamp purchases is distributed among full staking nodes that store data. The system is designed so that ",(0,i.jsx)(t.strong,{children:"honestly storing assigned data"})," is the most profitable strategy. Rules for this process are encoded in the ",(0,i.jsx)(t.a,{href:"https://github.com/ethersphere/storage-incentives",children:"redistribution smart contract"}),"."]}),"\n",(0,i.jsxs)(t.p,{children:["Additionally, the game generates a ",(0,i.jsx)(t.strong,{children:"utilization signal"}),", which the price oracle uses to regulate postage stamp prices. Read more ",(0,i.jsx)(t.a,{href:"/docs/concepts/incentives/redistribution-game",children:"here"}),"."]}),"\n",(0,i.jsx)(t.h3,{id:"price-oracle",children:"Price Oracle"}),"\n",(0,i.jsxs)(t.p,{children:["The price oracle contract dynamically adjusts postage stamp prices based on network utilization data from the redistribution contract. This mechanism ensures optimal redundancy by increasing or decreasing the price of storage as needed. ",(0,i.jsx)(t.a,{href:"/docs/concepts/incentives/price-oracle",children:"Read more"}),"."]}),"\n",(0,i.jsx)(t.h2,{id:"bandwidth-incentives",children:"Bandwidth Incentives"}),"\n",(0,i.jsxs)(t.p,{children:["Nodes in Swarm not only store data but relay data across the network. ",(0,i.jsx)(t.strong,{children:"Bandwidth incentives"})," compensate nodes for these services."]}),"\n",(0,i.jsxs)(t.p,{children:["The ",(0,i.jsx)(t.strong,{children:"Swarm Accounting Protocol (SWAP)"})," facilitates bandwidth payments between nodes, which can be settled either ",(0,i.jsx)(t.strong,{children:"in-kind"})," (data exchange) or via ",(0,i.jsx)(t.strong,{children:"cheques"})," processed through a ",(0,i.jsx)(t.strong,{children:"chequebook contract"})," on Gnosis Chain. Only full nodes can participate in SWAP."]}),"\n",(0,i.jsxs)(t.p,{children:["Read more ",(0,i.jsx)(t.a,{href:"/docs/concepts/incentives/bandwidth-incentives",children:"here"}),"."]})]})}function l(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},47650(e,t,s){s.d(t,{v:()=>n});const n={postageStampContract:"0x45a1502382541Cd610CC9068e88727426b696293",stakingContract:"0xda2a16EE889E7F04980A8d597b48c8D51B9518F4",redistributionContract:"0x5069cdfB3D9E56d23B1cAeE83CE6109A7E4fd62d",priceOracleContract:"0x47EeF336e7fE5bED98499A4696bce8f28c1B0a8b"}},28453(e,t,s){s.d(t,{R:()=>a,x:()=>o});var n=s(96540);const i={},r=n.createContext(i);function a(e){const t=n.useContext(r);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),n.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2637.f8950fe6.js b/assets/js/2637.f8950fe6.js new file mode 100644 index 000000000..ecb702df5 --- /dev/null +++ b/assets/js/2637.f8950fe6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[2637],{82637(e,r,a){a.d(r,{diagram:()=>c});var t=a(5637),s=a(76385),n=a(31293),d=a(86827),i=a(78731),o={version:"11.17.0"},c={parser:{parse:(0,d.K)(async e=>{const r=await(0,i.qg)("info",e);n.R.debug(r)},"parse")},db:{getVersion:(0,d.K)(()=>o.version,"getVersion")},renderer:{draw:(0,d.K)((e,r,a)=>{n.R.debug("rendering info diagram\n"+e);const d=(0,t.D)(r);(0,s.a$)(d,100,400,!0);d.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${a}`)},"draw")}}}}]); \ No newline at end of file diff --git a/assets/js/26592542.6ac7d3bc.js b/assets/js/26592542.6ac7d3bc.js new file mode 100644 index 000000000..59d1a7a02 --- /dev/null +++ b/assets/js/26592542.6ac7d3bc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[1612],{29831(e,n,o){o.r(n),o.d(n,{assets:()=>c,contentTitle:()=>d,default:()=>g,frontMatter:()=>l,metadata:()=>s,toc:()=>h});const s=JSON.parse('{"id":"bee/installation/shell-script-install","title":"Shell Script Install","description":"Provides flexible installation using an automated shell script supporting Linux and macOS with customizable configuration options.","source":"@site/docs/bee/installation/shell-script.md","sourceDirName":"bee/installation","slug":"/bee/installation/shell-script-install","permalink":"/docs/bee/installation/shell-script-install","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/bee/installation/shell-script.md","tags":[],"version":"current","frontMatter":{"title":"Shell Script Install","id":"shell-script-install","description":"Provides flexible installation using an automated shell script supporting Linux and macOS with customizable configuration options."},"sidebar":"bee","previous":{"title":"Quickstart","permalink":"/docs/bee/installation/quick-start"},"next":{"title":"Docker Install","permalink":"/docs/bee/installation/docker"}}');var t=o(74848),i=o(28453),a=o(4865),r=o(19365);const l={title:"Shell Script Install",id:"shell-script-install",description:"Provides flexible installation using an automated shell script supporting Linux and macOS with customizable configuration options."},d=void 0,c={},h=[{value:"Install and Start Your Node",id:"install-and-start-your-node",level:2},{value:"Run Shell Script",id:"run-shell-script",level:3},{value:"Node Startup Commands",id:"node-startup-commands",level:3},{value:"Example Startup Output",id:"example-startup-output",level:3},{value:"Fund and Stake",id:"fund-and-stake",level:2},{value:"Fund node",id:"fund-node",level:3},{value:"Initialize full node",id:"initialize-full-node",level:3},{value:"Stake node",id:"stake-node",level:3},{value:"Set Target Neighborhood",id:"set-target-neighborhood",level:3},{value:"Logs and monitoring",id:"logs-and-monitoring",level:3},{value:"Back Up Keys",id:"back-up-keys",level:2},{value:"Getting help",id:"getting-help",level:2},{value:"Next Steps to Consider",id:"next-steps-to-consider",level:2},{value:"Access the Swarm",id:"access-the-swarm",level:3},{value:"Explore the API",id:"explore-the-api",level:3},{value:"Run a hive!",id:"run-a-hive",level:3},{value:"Start building DAPPs on Swarm",id:"start-building-dapps-on-swarm",level:3}];function u(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:["The official ",(0,t.jsx)(n.a,{href:"https://github.com/ethersphere/bee/blob/master/install.sh",children:"shell script"})," provided by Swarm automatically detects your system and installs the correct version of Bee. This installation method is an excellent choice if you're looking for a minimalistic and flexible option for your Bee node installation."]}),"\n",(0,t.jsx)(n.admonition,{type:"warning",children:(0,t.jsx)(n.p,{children:"Note that we append 127.0.0.1 (localhost) to our Bee API's port (1633 by default), since we do not want to expose our Bee API endpoint to the public internet, as that would allow anyone to control our node. Make sure you do the same. Additionally, it's recommended to use a firewall to restrict access to your node(s)."})}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["This guide uses command line flag options in the node startup commands such as ",(0,t.jsx)(n.code,{children:"--blockchain-rpc-endpoint"}),", however, there are ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/configuration",children:"several other methods available for configuring options"}),"."]})}),"\n",(0,t.jsx)(n.h2,{id:"install-and-start-your-node",children:"Install and Start Your Node"}),"\n",(0,t.jsx)(n.p,{children:"Below is a step-by-step guide for installing and setting up your Bee node using the shell script installation method."}),"\n",(0,t.jsx)(n.h3,{id:"run-shell-script",children:"Run Shell Script"}),"\n",(0,t.jsxs)(n.p,{children:["Run the install shell script using either ",(0,t.jsx)(n.code,{children:"curl"})," or ",(0,t.jsx)(n.code,{children:"wget"}),":"]}),"\n",(0,t.jsx)(n.admonition,{type:"caution",children:(0,t.jsxs)(n.p,{children:["In the example below, the version is specified using ",(0,t.jsx)(n.code,{children:"TAG=v2.8.1"}),". Check the ",(0,t.jsx)(n.a,{href:"https://github.com/ethersphere/bee/tags",children:"latest Bee releases"}),' and if needed, update the command to install the most recent version (note that in tags containing "rc," the abbreviation stands for "release candidate", and these versions should be used for testing purposes only).']})}),"\n",(0,t.jsxs)(n.admonition,{type:"info",children:[(0,t.jsx)(n.p,{children:"Note that while this shell script supports many commonly used Unix-like systems, it is not quite a universal installer tool. The architectures it supports include:"}),(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"1. Linux:"})}),(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"linux-386"})," (32-bit x86)"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"linux-amd64"})," (64-bit x86)"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"linux-arm64"})," (64-bit ARM)"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"linux-armv6"})," (32-bit ARM v6)"]}),"\n"]}),(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"2. macOS (Darwin):"})}),(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"darwin-arm64"})," (Apple Silicon, M1/M2/M3)"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"darwin-amd64"})," (Intel-based Mac)"]}),"\n"]}),(0,t.jsxs)(n.p,{children:["This means the script works on most modern Linux distributions and macOS versions that match these architectures. Windows users can use ",(0,t.jsx)(n.a,{href:"https://learn.microsoft.com/en-us/windows/wsl/install",children:"WSL"}),"."]})]}),"\n",(0,t.jsx)(n.admonition,{type:"caution",children:(0,t.jsxs)(n.p,{children:["You may need to install ",(0,t.jsx)(n.a,{href:"https://curl.se/",children:(0,t.jsx)(n.code,{children:"curl"})})," or ",(0,t.jsx)(n.a,{href:"https://www.gnu.org/software/wget/",children:(0,t.jsx)(n.code,{children:"wget"})})," if your system doesn't have one of them pre-installed and the shell script command fails to run."]})}),"\n",(0,t.jsxs)(a.A,{defaultValue:"curl",values:[{label:"Curl",value:"curl"},{label:"Wget",value:"wget"}],children:[(0,t.jsx)(r.A,{value:"curl",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl -s https://raw.githubusercontent.com/ethersphere/bee/master/install.sh | TAG=v2.8.1 bash\n"})})}),(0,t.jsxs)(r.A,{value:"wget",children:[(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"wget"})}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"wget -q -O - https://raw.githubusercontent.com/ethersphere/bee/master/install.sh | TAG=v2.8.1 bash\n"})})]})]}),"\n",(0,t.jsx)(n.p,{children:"Let's check that the script ran properly:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash=",children:"bee \n"})}),"\n",(0,t.jsx)(n.p,{children:"If the script ran without any problems you should see this:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash=",children:'Ethereum Swarm Bee\n\nUsage:\n bee [command]\n\nAvailable Commands:\n start Start a Swarm node\n init Initialise a Swarm node\n deploy Deploy and fund the chequebook contract\n version Print version number\n db Perform basic DB related operations\n split Split a file into chunks\n printconfig Print default or provided configuration in yaml format\n help Help about any command\n completion Generate the autocompletion script for the specified shell\n\nFlags:\n --config string config file (default is $HOME/.bee.yaml)\n -h, --help help for bee\n\nUse "bee [command] --help" for more information about a command.\n'})}),"\n",(0,t.jsx)(n.h3,{id:"node-startup-commands",children:"Node Startup Commands"}),"\n",(0,t.jsxs)(n.p,{children:["Let's try starting up our node for the first time with the command below. Make sure to pick a ",(0,t.jsx)(n.a,{href:"https://xkcd.com/936/",children:"strong password"})," of your own:"]}),"\n",(0,t.jsxs)(n.p,{children:["Below are startup commands configured for each of the three Bee node types, ",(0,t.jsx)(n.em,{children:(0,t.jsx)(n.strong,{children:"full"})}),", ",(0,t.jsx)(n.em,{children:(0,t.jsx)(n.strong,{children:"light"})}),", and ",(0,t.jsx)(n.em,{children:(0,t.jsx)(n.strong,{children:"ultra-light"})}),". Refer to the ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/node-types",children:"Node Types"})," page to learn more about each node type and decide which one best suits your needs."]}),"\n",(0,t.jsxs)(a.A,{defaultValue:"full",values:[{label:"Full",value:"full"},{label:"Light",value:"light"},{label:"Ultra Light",value:"ultra-light"}],children:[(0,t.jsxs)(r.A,{value:"full",children:[(0,t.jsxs)(n.p,{children:["For the full node, we have ",(0,t.jsx)(n.code,{children:"--full-node"})," and ",(0,t.jsx)(n.code,{children:"--swap-enable"})," both enabled, and we've used ",(0,t.jsx)(n.code,{children:"--blockchain-rpc-endpoint"})," to set our RPC endpoint as ",(0,t.jsx)(n.code,{children:"https://xdai.fairdatasociety.org"}),". Your RPC endpoint may differ depending on your setup."]}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"bee start \\\n --password flummoxedgranitecarrot \\\n --full-node \\\n --swap-enable \\\n --api-addr 127.0.0.1:1633 \\\n --blockchain-rpc-endpoint https://xdai.fairdatasociety.org\n"})})]}),(0,t.jsxs)(r.A,{value:"light",children:[(0,t.jsxs)(n.p,{children:["For the light node, we omit ",(0,t.jsx)(n.code,{children:"--full-node"}),", keeping the rest the same as the full node setup."]}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"bee start \\\n --password flummoxedgranitecarrot \\\n --swap-enable \\\n --api-addr 127.0.0.1:1633 \\\n --blockchain-rpc-endpoint https://xdai.fairdatasociety.org\n"})})]}),(0,t.jsxs)(r.A,{value:"ultra-light",children:[(0,t.jsxs)(n.p,{children:["For the ultra-light node, we omit all three of the relevant settings to disable them (since they default to ",(0,t.jsx)(n.code,{children:"false"}),"), ",(0,t.jsx)(n.code,{children:"--full-node"}),", ",(0,t.jsx)(n.code,{children:"--swap-enable"}),", and ",(0,t.jsx)(n.code,{children:"--blockchain-rpc-endpoint"}),"."]}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"bee start \\\n --password flummoxedgranitecarrot \\\n --api-addr 127.0.0.1:1633 \n"})})]})]}),"\n",(0,t.jsxs)(n.admonition,{type:"info",children:[(0,t.jsx)(n.p,{children:"Command explained:"}),(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"bee start"})}),": This is the command to start the Bee node."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"--password flummoxedgranitecarrot"})}),': The password to decrypt the private key associated with the node. Replace "flummoxedgranitecarrot" with your actual password.']}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"--full-node"})}),": This option enables the node to run in full mode, sharing its disk with the network, and becoming eligible for staking."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"--swap-enable"})}),": This flag enables SWAP, which is the bandwidth incentives scheme for Swarm. It will initiate a transaction to set up the SWAP chequebook on Gnosis Chain (required for light and full nodes)."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"--api-addr 127.0.0.1:1633"})}),": Specifies that the Bee API will be accessible locally only via ",(0,t.jsx)(n.code,{children:"127.0.0.1"})," on port ",(0,t.jsx)(n.code,{children:"1633"})," and not accessible to the public."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"--blockchain-rpc-endpoint https://xdai.fairdatasociety.org"})}),": Sets the RPC endpoint for interacting with the Gnosis blockchain (required for light and full nodes)."]}),"\n"]}),"\n"]})]}),"\n",(0,t.jsx)(n.h3,{id:"example-startup-output",children:"Example Startup Output"}),"\n",(0,t.jsxs)(a.A,{defaultValue:"full",values:[{label:"Full",value:"full"},{label:"Light",value:"light"},{label:"Ultra Light",value:"ultra-light"}],children:[(0,t.jsxs)(r.A,{value:"full",children:[(0,t.jsx)(n.p,{children:"The node has successfully started, but it still needs funding with xDAI (for Gnosis Chain transactions) and xBZZ (for uploads, downloads, and staking)."}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'Welcome to Swarm.... Bzzz Bzzzz Bzzzz\n \\ /\n \\ o ^ o /\n \\ ( ) /\n ____________(%%%%%%%)____________\n ( / / )%%%%%%%( \\ \\ )\n (___/___/__/ \\__\\___\\___)\n ( / /(%%%%%%%)\\ \\ )\n (__/___/ (%%%%%%%) \\___\\__)\n /( )\\\n / (%%%%%) \\\n (%%%)\n !\n\nDISCLAIMER:\nThis software is provided to you "as is", use at your own risk and without warranties of any kind.\nIt is your responsibility to read and understand how Swarm works and the implications of running this software.\nThe usage of Bee involves various risks, including, but not limited to:\ndamage to hardware or loss of funds associated with the Ethereum account connected to your node.\nNo developers or entity involved will be liable for any claims and damages associated with your use,\ninability to use, or your interaction with other nodes or the software.\n\nversion: 2.2.0-06a0aca7 - planned to be supported until 11 December 2024, please follow https://ethswarm.org/\n\n"time"="2024-09-24 18:15:34.383102" "level"="info" "logger"="node" "msg"="bee version" "version"="2.2.0-06a0aca7"\n"time"="2024-09-24 18:15:34.428546" "level"="info" "logger"="node" "msg"="swarm public key" "public_key"="0373fe2ab33ab836635fc35864cf708fa0f4a775c0cf76ca851551e7787b58d040"\n"time"="2024-09-24 18:15:34.520686" "level"="info" "logger"="node" "msg"="pss public key" "public_key"="03a341032724f1f9bb04f1d9b22607db485cccd74174331c701f3a6957d94d95c1"\n"time"="2024-09-24 18:15:34.520716" "level"="info" "logger"="node" "msg"="using ethereum address" "address"="0x1A801dd3ec955E905ca424a85C3423599bfb0E66"\n"time"="2024-09-24 18:15:34.533789" "level"="info" "logger"="node" "msg"="fetching target neighborhood from suggester" "url"="https://api.swarmscan.io/v1/network/neighborhoods/suggestion"\n"time"="2024-09-24 18:15:36.773501" "level"="info" "logger"="node" "msg"="mining a new overlay address to target the selected neighborhood" "target"="00100010110"\n"time"="2024-09-24 18:15:36.776550" "level"="info" "logger"="node" "msg"="using overlay address" "address"="22d502d022de0f8e9d477bc61144d0d842d9d82b8241568c6fe4e41f0b466615"\n"time"="2024-09-24 18:15:36.776576" "level"="info" "logger"="node" "msg"="starting with an enabled chain backend"\n"time"="2024-09-24 18:15:37.388997" "level"="info" "logger"="node" "msg"="connected to blockchain backend" "version"="erigon/2.60.7/linux-amd64/go1.21.5"\n"time"="2024-09-24 18:15:37.577840" "level"="info" "logger"="node" "msg"="using chain with network network" "chain_id"=100 "network_id"=1\n"time"="2024-09-24 18:15:37.593747" "level"="info" "logger"="node" "msg"="starting debug & api server" "address"="127.0.0.1:1633"\n"time"="2024-09-24 18:15:37.969782" "level"="info" "logger"="node" "msg"="using default factory address" "chain_id"=100 "factory_address"="0xC2d5A532cf69AA9A1378737D8ccDEF884B6E7420"\n"time"="2024-09-24 18:15:38.160249" "level"="info" "logger"="node/chequebook" "msg"="no chequebook found, deploying new one."\n"time"="2024-09-24 18:15:38.728534" "level"="warning" "logger"="node/chequebook" "msg"="cannot continue until there is at least min xDAI (for Gas) available on address" "min_amount"="0.0003750000017" "address"="0x1A801dd3ec955E905ca424a85C3423599bfb0E66"\n'})})]}),(0,t.jsxs)(r.A,{value:"light",children:[(0,t.jsx)(n.p,{children:"Here you can see that the node has started up successfully, but our node still needs to be funded with xDAI and xBZZ (xDAI for Gnosis Chain transactions and xBZZ for uploads/downloads). Continue to the next section for funding instructions."}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'Welcome to Swarm.... Bzzz Bzzzz Bzzzz\n \\ /\n \\ o ^ o /\n \\ ( ) /\n ____________(%%%%%%%)____________\n ( / / )%%%%%%%( \\ \\ )\n (___/___/__/ \\__\\___\\___)\n ( / /(%%%%%%%)\\ \\ )\n (__/___/ (%%%%%%%) \\___\\__)\n /( )\\\n / (%%%%%) \\\n (%%%)\n !\n\nDISCLAIMER:\nThis software is provided to you "as is", use at your own risk and without warranties of any kind.\nIt is your responsibility to read and understand how Swarm works and the implications of running this software.\nThe usage of Bee involves various risks, including, but not limited to:\ndamage to hardware or loss of funds associated with the Ethereum account connected to your node.\nNo developers or entity involved will be liable for any claims and damages associated with your use,\ninability to use, or your interaction with other nodes or the software.\n\nversion: 2.2.0-06a0aca7 - planned to be supported until 11 December 2024, please follow https://ethswarm.org/\n\n"time"="2025-01-24 12:57:21.274657" "level"="info" "logger"="node" "msg"="bee version" "version"="2.2.0-06a0aca7"\n"time"="2025-01-24 12:57:21.274854" "level"="warning" "logger"="node" "msg"="your node is outdated, please check for the latest version"\n"time"="2025-01-24 12:57:21.449064" "level"="info" "logger"="node" "msg"="swarm public key" "public_key"="03c356839a5570c758e812d0c248b135f0dc8ffa2b8404a97597e456f4fe5f7ee8"\n"time"="2025-01-24 12:57:21.805033" "level"="info" "logger"="node" "msg"="pss public key" "public_key"="036c63b7c544ad401a5dbfb463f71cda265eec74c1d0d9cbc9db2abd6b3e4f11e9"\n"time"="2025-01-24 12:57:21.805124" "level"="info" "logger"="node" "msg"="using ethereum address" "address"="0x5c39545873Bd663b0bB0716ED87dE0E399Aae419"\n"time"="2025-01-24 12:57:21.815765" "level"="info" "logger"="node" "msg"="using overlay address" "address"="74539eab1dbd5c722bb8ba10cef55f715e38f298b706fb1866af49f4fd15d8d3"\n"time"="2025-01-24 12:57:21.815855" "level"="info" "logger"="node" "msg"="starting with an enabled chain backend"\n"time"="2025-01-24 12:57:21.861341" "level"="info" "logger"="node" "msg"="connected to blockchain backend" "version"="Nethermind/v1.30.1+2b75a75a/linux-x64/dotnet9.0.0"\n"time"="2025-01-24 12:57:21.869117" "level"="info" "logger"="node" "msg"="using chain with network network" "chain_id"=100 "network_id"=1\n"time"="2025-01-24 12:57:21.880930" "level"="info" "logger"="node" "msg"="starting debug & api server" "address"="127.0.0.1:1633"\n"time"="2025-01-24 12:57:21.897675" "level"="info" "logger"="node" "msg"="using default factory address" "chain_id"=100 "factory_address"="0xC2d5A532cf69AA9A1378737D8ccDEF884B6E7420"\n"time"="2025-01-24 12:57:21.911463" "level"="info" "logger"="node/chequebook" "msg"="no chequebook found, deploying new one."\n"time"="2025-01-24 12:57:21.938038" "level"="warning" "logger"="node/chequebook" "msg"="cannot continue until there is at least min xDAI (for Gas) available on address" "min_amount"="0.000250000002" "address"="0x5c39545873Bd663b0bB0716ED87dE0E399Aae419"\n'})})]}),(0,t.jsxs)(r.A,{value:"ultra-light",children:[(0,t.jsx)(n.p,{children:"If you've started in ultra-light mode, you should see output which looks something like this, and you're done! Your node is now successfully running in ultra-light mode. You can now skip down to the final section on this page about logs and monitoring."}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:' root@noah-bee:~# bee start \\\n --password flummoxedgranitecarrot \\\n --api-addr 127.0.0.1:1633\n\nWelcome to Swarm.... Bzzz Bzzzz Bzzzz\n \\ /\n \\ o ^ o /\n \\ ( ) /\n ____________(%%%%%%%)____________\n ( / / )%%%%%%%( \\ \\ )\n (___/___/__/ \\__\\___\\___)\n ( / /(%%%%%%%)\\ \\ )\n (__/___/ (%%%%%%%) \\___\\__)\n /( )\\\n / (%%%%%) \\\n (%%%)\n !\n\nDISCLAIMER:\nThis software is provided to you "as is", use at your own risk and without warranties of any kind.\nIt is your responsibility to read and understand how Swarm works and the implications of running this software.\nThe usage of Bee involves various risks, including, but not limited to:\ndamage to hardware or loss of funds associated with the Ethereum account connected to your node.\nNo developers or entity involved will be liable for any claims and damages associated with your use,\ninability to use, or your interaction with other nodes or the software.\n\nversion: 2.2.0-06a0aca7 - planned to be supported until 11 December 2024, please follow https://ethswarm.org/\n\n"time"="2025-01-24 12:51:06.981505" "level"="info" "logger"="node" "msg"="bee version" "version"="2.2.0-06a0aca7"\n"time"="2025-01-24 12:51:06.981658" "level"="warning" "logger"="node" "msg"="your node is outdated, please check for the latest version"\n"time"="2025-01-24 12:51:07.131555" "level"="info" "logger"="node" "msg"="swarm public key" "public_key"="03c356839a5570c758e812d0c248b135f0dc8ffa2b8404a97597e456f4fe5f7ee8"\n"time"="2025-01-24 12:51:07.402847" "level"="info" "logger"="node" "msg"="pss public key" "public_key"="036c63b7c544ad401a5dbfb463f71cda265eec74c1d0d9cbc9db2abd6b3e4f11e9"\n"time"="2025-01-24 12:51:07.402915" "level"="info" "logger"="node" "msg"="using ethereum address" "address"="0x5c39545873Bd663b0bB0716ED87dE0E399Aae419"\n"time"="2025-01-24 12:51:07.416074" "level"="info" "logger"="node" "msg"="using overlay address" "address"="74539eab1dbd5c722bb8ba10cef55f715e38f298b706fb1866af49f4fd15d8d3"\n"time"="2025-01-24 12:51:07.416149" "level"="info" "logger"="node" "msg"="starting with a disabled chain backend"\n"time"="2025-01-24 12:51:07.416242" "level"="info" "logger"="node" "msg"="using chain with network network" "chain_id"=100 "network_id"=1\n"time"="2025-01-24 12:51:07.428047" "level"="info" "logger"="node" "msg"="starting debug & api server" "address"="127.0.0.1:1633"\n"time"="2025-01-24 12:51:07.464425" "level"="info" "logger"="node" "msg"="using datadir" "path"="/root/.bee"\n"time"="2025-01-24 12:51:07.486853" "level"="info" "logger"="migration-RefCountSizeInc" "msg"="starting migration of replacing chunkstore items to increase refCnt capacity"\n"time"="2025-01-24 12:51:07.486921" "level"="info" "logger"="migration-RefCountSizeInc" "msg"="migration complete"\n"time"="2025-01-24 12:51:07.489133" "level"="info" "logger"="node" "msg"="starting reserve repair tool, do not interrupt or kill the process..."\n"time"="2025-01-24 12:51:07.489346" "level"="info" "logger"="node" "msg"="removed all bin index entries"\n"time"="2025-01-24 12:51:07.489430" "level"="info" "logger"="node" "msg"="removed all chunk bin items" "total_entries"=0\n"time"="2025-01-24 12:51:07.489482" "level"="info" "logger"="node" "msg"="counted all batch radius entries" "total_entries"=0\n"time"="2025-01-24 12:51:07.489520" "level"="info" "logger"="node" "msg"="parallel workers" "count"=2\n"time"="2025-01-24 12:51:07.489612" "level"="info" "logger"="node" "msg"="migrated all chunk entries" "new_size"=0 "missing_chunks"=0 "invalid_sharky_chunks"=0\n"time"="2025-01-24 12:51:07.489659" "level"="info" "logger"="migration-step-04" "msg"="starting sharky recovery"\n"time"="2025-01-24 12:51:07.514853" "level"="info" "logger"="migration-step-04" "msg"="finished sharky recovery"\n"time"="2025-01-24 12:51:07.515253" "level"="info" "logger"="migration-step-05" "msg"="start removing upload items"\n"time"="2025-01-24 12:51:07.515374" "level"="info" "logger"="migration-step-05" "msg"="finished removing upload items"\n"time"="2025-01-24 12:51:07.515434" "level"="info" "logger"="migration-step-06" "msg"="start adding stampHash to BatchRadiusItems, ChunkBinItems and StampIndexItems"\n"time"="2025-01-24 12:51:07.515571" "level"="info" "logger"="migration-step-06" "msg"="finished migrating items" "seen"=0 "migrated"=0\n"time"="2025-01-24 12:51:07.517270" "level"="info" "logger"="node" "msg"="starting in ultra-light mode"\n'})})]})]}),"\n",(0,t.jsx)(n.h2,{id:"fund-and-stake",children:"Fund and Stake"}),"\n",(0,t.jsx)(n.p,{children:"Running a full node for the purpose of earning xBZZ by sharing disk space and participating in the redistribution game requires a minimum of 10 xBZZ and a small amount of xDAI (for initializing the chequebook contract and for paying for redistribution-related transactions)."}),"\n",(0,t.jsx)(n.p,{children:"While running a light node requires a small amount of xDAI to pay for initializing the chequebook contract and a smaller amount of xBZZ to pay for uploads and downloads."}),"\n",(0,t.jsx)(n.h3,{id:"fund-node",children:"Fund node"}),"\n",(0,t.jsx)(n.p,{children:"Check the logs from the previous step. Look for the line which says:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:'"time"="2024-09-24 18:15:34.520716" "level"="info" "logger"="node" "msg"="using ethereum address" "address"="0x1A801dd3ec955E905ca424a85C3423599bfb0E66"\n'})}),"\n",(0,t.jsx)(n.p,{children:"That address is your node's address on Gnosis Chain which needs to be funded with xDAI (and also xBZZ if you plan on doing any uploading or on staking). Copy it and save it for the next step."}),"\n",(0,t.jsx)(n.p,{children:"You can also use the following command:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl -s localhost:1633/addresses | jq .ethereum\n"})}),"\n",(0,t.jsx)(n.p,{children:"Which will return your node's address:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'"0x1A801dd3ec955E905ca424a85C3423599bfb0E66"\n'})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.em,{children:(0,t.jsx)(n.strong,{children:"How Much to Send?"})})}),"\n",(0,t.jsx)(n.p,{children:"Only a very small amount of xDAI is needed to get started, 0.1 xDAI is more than enough."}),"\n",(0,t.jsx)(n.p,{children:"For very small short term uploads you can start with ~0.2 xBZZ, but the required amount will scale up with the volume and duration of storage required."}),"\n",(0,t.jsx)(n.p,{children:"You will also need at least 10 xBZZ if you plan on staking."}),"\n",(0,t.jsx)(n.h3,{id:"initialize-full-node",children:"Initialize full node"}),"\n",(0,t.jsxs)(n.p,{children:["After sending the required tokens of ~0.1 xDAI and 10 xBZZ (or a smaller amount of xBZZ if you don't plan on staking) to your node's Gnosis Chain address, close the bee process in your terminal (",(0,t.jsx)(n.code,{children:"Ctrl + C"}),"). Then start it again with the same command:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"bee start \\\n --password flummoxedgranitecarrot \\\n --full-node \\\n --swap-enable \\\n --api-addr 127.0.0.1:1633 \\\n --blockchain-rpc-endpoint https://xdai.fairdatasociety.org\n"})}),"\n",(0,t.jsx)(n.p,{children:"After funding and restarting your node, the logs printed to the terminal should look something like this:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'Welcome to Swarm.... Bzzz Bzzzz Bzzzz\n \\ /\n \\ o ^ o /\n \\ ( ) /\n ____________(%%%%%%%)____________\n ( / / )%%%%%%%( \\ \\ )\n (___/___/__/ \\__\\___\\___)\n ( / /(%%%%%%%)\\ \\ )\n (__/___/ (%%%%%%%) \\___\\__)\n /( )\\\n / (%%%%%) \\\n (%%%)\n !\n\nDISCLAIMER:\nThis software is provided to you "as is", use at your own risk and without warranties of any kind.\nIt is your responsibility to read and understand how Swarm works and the implications of running this software.\nThe usage of Bee involves various risks, including, but not limited to:\ndamage to hardware or loss of funds associated with the Ethereum account connected to your node.\nNo developers or entity involved will be liable for any claims and damages associated with your use,\ninability to use, or your interaction with other nodes or the software.\n\nversion: 2.2.0-06a0aca7 - planned to be supported until 11 December 2024, please follow https://ethswarm.org/\n\n"time"="2024-09-24 18:57:16.710417" "level"="info" "logger"="node" "msg"="bee version" "version"="2.2.0-06a0aca7"\n"time"="2024-09-24 18:57:16.760154" "level"="info" "logger"="node" "msg"="swarm public key" "public_key"="0373fe2ab33ab836635fc35864cf708fa0f4a775c0cf76ca851551e7787b58d040"\n"time"="2024-09-24 18:57:16.854594" "level"="info" "logger"="node" "msg"="pss public key" "public_key"="03a341032724f1f9bb04f1d9b22607db485cccd74174331c701f3a6957d94d95c1"\n"time"="2024-09-24 18:57:16.854651" "level"="info" "logger"="node" "msg"="using ethereum address" "address"="0x1A801dd3ec955E905ca424a85C3423599bfb0E66"\n"time"="2024-09-24 18:57:16.866697" "level"="info" "logger"="node" "msg"="using overlay address" "address"="22d502d022de0f8e9d477bc61144d0d842d9d82b8241568c6fe4e41f0b466615"\n"time"="2024-09-24 18:57:16.866730" "level"="info" "logger"="node" "msg"="starting with an enabled chain backend"\n"time"="2024-09-24 18:57:17.485408" "level"="info" "logger"="node" "msg"="connected to blockchain backend" "version"="erigon/2.60.1/linux-amd64/go1.21.5"\n"time"="2024-09-24 18:57:17.672282" "level"="info" "logger"="node" "msg"="using chain with network network" "chain_id"=100 "network_id"=1\n"time"="2024-09-24 18:57:17.686479" "level"="info" "logger"="node" "msg"="starting debug & api server" "address"="127.0.0.1:1633"\n"time"="2024-09-24 18:57:18.065029" "level"="info" "logger"="node" "msg"="using default factory address" "chain_id"=100 "factory_address"="0xC2d5A532cf69AA9A1378737D8ccDEF884B6E7420"\n"time"="2024-09-24 18:57:18.252410" "level"="info" "logger"="node/chequebook" "msg"="no chequebook found, deploying new one."\n"time"="2024-09-24 18:57:19.576100" "level"="info" "logger"="node/chequebook" "msg"="deploying new chequebook" "tx"="0xf7bc9c5b04e96954c7f70cecfe717cad9cdc5d64b6ec080b2cbe712166ce262a"\n"time"="2024-09-24 18:57:27.619377" "level"="info" "logger"="node/transaction" "msg"="pending transaction confirmed" "sender_address"="0x1A801dd3ec955E905ca424a85C3423599bfb0E66" "tx"="0xf7bc9c5b04e96954c7f70cecfe717cad9cdc5d64b6ec080b2cbe712166ce262a"\n"time"="2024-09-24 18:57:27.619437" "level"="info" "logger"="node/chequebook" "msg"="chequebook deployed" "chequebook_address"="0x261a07a63dC1e7200d51106155C8929b432181fb"\n'})}),"\n",(0,t.jsx)(n.p,{children:"Here we can see that after our node has been funded, it was able to issue the transactions for deploying the chequebook contract, which is a prerequisite for running a staking node."}),"\n",(0,t.jsxs)(n.p,{children:["Next your node will begin to sync ",(0,t.jsx)(n.a,{href:"/docs/develop/tools-and-features/buy-a-stamp-batch",children:"postage stamp data"}),", which can take ~5 to 10 minutes. You will see this log message while your node is syncing postage stamp data:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'"time"="2024-09-24 22:21:19.664897" "level"="info" "logger"="node" "msg"="waiting to sync postage contract data, this may take a while... more info available in Debug loglevel"\n'})}),"\n",(0,t.jsx)(n.p,{children:"After your node finishes syncing postage stamp data it will start in full node mode and begin to sync all the chunks of data it is responsible for storing as a full node:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'"time"="2024-09-24 22:30:19.154067" "level"="info" "logger"="node" "msg"="starting in full mode"\n"time"="2024-09-24 22:30:19.155320" "level"="info" "logger"="node/multiresolver" "msg"="name resolver: no name resolution service provided"\n"time"="2024-09-24 22:30:19.341032" "level"="info" "logger"="node/storageincentives" "msg"="entered new phase" "phase"="reveal" "round"=237974 "block"=36172090\n"time"="2024-09-24 22:30:33.610825" "level"="info" "logger"="node/kademlia" "msg"="disconnected peer" "peer_address"="6ceb30c7afc11716f866d19b7eeda9836757031ed056b61961e949f6e705b49e"\n'})}),"\n",(0,t.jsx)(n.p,{children:"This process can take a while, even up to several hours depending on your system and network. You can check the progress of your node through the logs which print out to the Bee API:"}),"\n",(0,t.jsxs)(n.p,{children:["You check your node's progress with the ",(0,t.jsx)(n.code,{children:"/status"})," endpoint:"]}),"\n",(0,t.jsxs)(n.admonition,{type:"info",children:[(0,t.jsxs)(n.p,{children:["The ",(0,t.jsxs)(n.a,{href:"https://jqlang.org/",children:[(0,t.jsx)(n.code,{children:"jq"})," utility"]})," jq utility formats API responses for easier reading:"]}),(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Install it using your system\u2019s package manager."}),"\n",(0,t.jsxs)(n.li,{children:["If you don't want to use it, remove ",(0,t.jsx)(n.code,{children:"| jq"})," from all commands."]}),"\n"]})]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl -s http://localhost:1633/status | jq\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'{\n "overlay": "22dc155fe072e131449ec7ea2f77de16f4735f06257ebaa5daf2fdcf14267fd9",\n "proximity": 256,\n "beeMode": "full",\n "reserveSize": 686217,\n "reserveSizeWithinRadius": 321888,\n "pullsyncRate": 497.8747754074074,\n "storageRadius": 11,\n "connectedPeers": 148,\n "neighborhoodSize": 4,\n "batchCommitment": 74510761984,\n "isReachable": false,\n "lastSyncedBlock": 36172390\n}\n'})}),"\n",(0,t.jsxs)(n.p,{children:["We can see that our node has not yet finished syncing chunks since the ",(0,t.jsx)(n.code,{children:"pullsyncRate"})," is around 497 chunks per second. Once the node is fully synced, this value will go to zero. However, we do not need to wait until our node is fully synced in order to stake our node, so we can now move immediately to the next step."]}),"\n",(0,t.jsx)(n.h3,{id:"stake-node",children:"Stake node"}),"\n",(0,t.jsx)(n.p,{children:"Now we're ready to stake. We'll slightly modify our startup command so that it runs in the background instead of taking control of our terminal:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"nohup bee start \\\n --password flummoxedgranitecarrot \\\n --full-node \\\n --swap-enable \\\n --api-addr 127.0.0.1:1633 \\\n --blockchain-rpc-endpoint https://xdai.fairdatasociety.org > bee.log 2>&1 &\n"})}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"nohup"})}),": ",(0,t.jsx)(n.code,{children:"nohup"})," prevents the ",(0,t.jsx)(n.code,{children:"bee start"})," process from stopping when the terminal closes."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"> bee.log 2>&1"})}),": Redirects both standard output and standard error to a log file called ",(0,t.jsx)(n.code,{children:"bee.log"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"&"})}),": This sends the process to the background, allowing the terminal to be used for other commands while the Bee node continues running."]}),"\n"]}),"\n"]})}),"\n",(0,t.jsx)(n.p,{children:"Let's check the Bee API to confirm the node is running:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"curl localhost:1633\n"})}),"\n",(0,t.jsx)(n.p,{children:"If the node is running we should see:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"Ethereum Swarm Bee\n"})}),"\n",(0,t.jsx)(n.p,{children:"Now with our node properly running in the background, we're ready to stake our node. You can use the following command to stake 10 xBZZ:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl -XPOST localhost:1633/stake/100000000000000000\n"})}),"\n",(0,t.jsxs)(n.p,{children:["If the staking transaction is successful a ",(0,t.jsx)(n.code,{children:"txHash"})," will be returned:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:'{"txHash":"0x258d64720fe7abade794f14ef3261534ff823ef3e2e0011c431c31aea75c2dd5"}\n'})}),"\n",(0,t.jsxs)(n.p,{children:["We can also confirm that our node has been staked with the ",(0,t.jsx)(n.code,{children:"/stake"})," endpoint:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl localhost:1633/stake\n"})}),"\n",(0,t.jsx)(n.p,{children:"The results will be displayed in PLUR units (1 PLUR is equal to 1e-16 xBZZ). If you have properly staked the minimum 10 xBZZ, you should see the output below:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'{"stakedAmount":"100000000000000000"}\n'})}),"\n",(0,t.jsx)(n.p,{children:"Congratulations! You have now installed your Bee node and are connected to the network as a full staking node. Your node will now be in the process of syncing chunks from the network. Once the node is fully synced, your node will finally be eligible to earn staking rewards."}),"\n",(0,t.jsx)(n.h3,{id:"set-target-neighborhood",children:"Set Target Neighborhood"}),"\n",(0,t.jsxs)(n.p,{children:["When installing your Bee node it will automatically be assigned a neighborhood. However, when running a full node with staking there are benefits to periodically updating your node's neighborhood. Learn more about why and how to set your node's target neighborhood ",(0,t.jsx)(n.a,{href:"/docs/bee/installation/set-target-neighborhood",children:"here"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"logs-and-monitoring",children:"Logs and monitoring"}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["You can learn more about Bee logs ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/logs-and-files",children:"here"}),"."]})}),"\n",(0,t.jsxs)(n.p,{children:["With our previously modified command, our Bee node will now be running in the background and the logs will be written to the ",(0,t.jsx)(n.code,{children:"bee.log"})," file. To review our node's logs we can simply view the file contents:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"cat bee.log\n"})}),"\n",(0,t.jsx)(n.p,{children:"The file will continue to update with all the latest logs as they are output:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'"time"="2024-09-27 18:05:34.096641" "level"="info" "logger"="node/kademlia" "msg"="connected to peer" "peer_address"="03b48e678938d63c0761c74a805fbe0446684c9c417330c2bec600ecfd6c492f" "proximity_order"=8\n"time"="2024-09-27 18:05:35.168425" "level"="info" "logger"="node/kademlia" "msg"="connected to peer" "peer_address"="0e9388fff473a9c74535337c32cc74d8f921514d2635d0c4a49c6e8022f5594e" "proximity_order"=4\n"time"="2024-09-27 18:05:35.532723" "level"="info" "logger"="node/kademlia" "msg"="disconnected peer" "peer_address"="3c195cd8882ee537d170e92d959ad6bd72a76a50097a671c72646e83b45a1832"\n'})}),"\n",(0,t.jsxs)(n.p,{children:["There are many different ways to monitor your Bee node's process, but one convenient way to do so is the ",(0,t.jsx)(n.a,{href:"https://github.com/aristocratos/bashtop",children:"bashtop command line tool"}),". The method of ",(0,t.jsx)(n.a,{href:"https://github.com/aristocratos/bashtop?tab=readme-ov-file#installation",children:"installation"})," will vary depending on your system."]}),"\n",(0,t.jsxs)(n.p,{children:["After installation, we can launch it with the ",(0,t.jsx)(n.code,{children:"bashtop"})," command:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"bashtop\n"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:o(70040).A+"",width:"1814",height:"1054"})}),"\n",(0,t.jsxs)(n.p,{children:["We can use the ",(0,t.jsx)(n.code,{children:"f"})," key to filter for our Bee node's specific process by searching for the ",(0,t.jsx)(n.code,{children:"bee"})," keyword (use the arrow keys to navigate and ",(0,t.jsx)(n.code,{children:"enter"})," to select). From here we can view info about our node's process, or shut it down using the ",(0,t.jsx)(n.code,{children:"t"}),' key (for "terminate").']}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:o(44531).A+"",width:"1794",height:"1062"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Checking the Node's status with the Bee API"})}),"\n",(0,t.jsxs)(n.p,{children:["To check your node's status as a staking node, we can use the ",(0,t.jsx)(n.code,{children:"/redistributionstate"})," endpoint:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl -s http://localhost:1633/redistributionstate | jq\n"})}),"\n",(0,t.jsx)(n.p,{children:"Below is the output for a node that has been running for several days:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'{\n "minimumGasFunds": "11080889201250000",\n "hasSufficientFunds": true,\n "isFrozen": false,\n "isFullySynced": true,\n "phase": "claim",\n "round": 212859,\n "lastWonRound": 207391,\n "lastPlayedRound": 210941,\n "lastFrozenRound": 210942,\n "lastSelectedRound": 212553,\n "lastSampleDuration": 491687776653,\n "block": 32354719,\n "reward": "1804537795127017472",\n "fees": "592679945236926714",\n "isHealthy": true\n}\n'})}),"\n",(0,t.jsxs)(n.p,{children:["For a complete breakdown of this output, check out ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/bee-api#redistributionstate",children:"this section in the Bee docs"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["You can read more other important endpoints for monitoring your Bee node in the ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/bee-api",children:"official Bee docs"}),", and you can find complete information about all available endpoints in ",(0,t.jsx)(n.a,{href:"/api/",children:"the API reference docs"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"back-up-keys",children:"Back Up Keys"}),"\n",(0,t.jsxs)(n.p,{children:["Once your node is up and running, make sure to ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/backups",children:"back up your keys"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"getting-help",children:"Getting help"}),"\n",(0,t.jsxs)(n.p,{children:["The CLI has built-in documentation. Running ",(0,t.jsx)(n.code,{children:"bee"})," gives you an entry point to the documentation. Running ",(0,t.jsx)(n.code,{children:"bee start -h"})," or ",(0,t.jsx)(n.code,{children:"bee start --help"})," will tell you how you can configure your Bee node via the command line arguments."]}),"\n",(0,t.jsxs)(n.p,{children:["You may also check out the ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/configuration",children:"configuration guide"}),", or simply run your Bee terminal command with the ",(0,t.jsx)(n.code,{children:"--help"})," flag, eg. ",(0,t.jsx)(n.code,{children:"bee start --help"})," or ",(0,t.jsx)(n.code,{children:"bee --help"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"next-steps-to-consider",children:"Next Steps to Consider"}),"\n",(0,t.jsx)(n.h3,{id:"access-the-swarm",children:"Access the Swarm"}),"\n",(0,t.jsxs)(n.p,{children:["If you'd like to start uploading or downloading files to Swarm, ",(0,t.jsx)(n.a,{href:"/docs/develop/introduction",children:"start here"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"explore-the-api",children:"Explore the API"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/bee-api",children:"Bee API"})," is the primary method for interacting with Bee and getting information about Bee. After installing Bee and getting it up and running, it's a good idea to start getting familiar with the API."]}),"\n",(0,t.jsx)(n.h3,{id:"run-a-hive",children:"Run a hive!"}),"\n",(0,t.jsxs)(n.p,{children:["If you would like to run a hive of many Bees, check out the ",(0,t.jsx)(n.a,{href:"/docs/bee/installation/hive",children:"hive operators"})," section for information on how to operate and monitor many Bees at once."]}),"\n",(0,t.jsx)(n.h3,{id:"start-building-dapps-on-swarm",children:"Start building DAPPs on Swarm"}),"\n",(0,t.jsxs)(n.p,{children:["If you would like to start building decentralised applications on Swarm, check out our section for ",(0,t.jsx)(n.a,{href:"/docs/develop/introduction",children:"developing with Bee"}),"."]})]})}function g(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(u,{...e})}):u(e)}},19365(e,n,o){o.d(n,{A:()=>l});o(96540);var s=o(34164),t=o(47751);const i="tabItem_Ymn6";var a=o(74848);function r(e){let n=e.children,o=e.className,t=e.hidden;return(0,a.jsx)("div",{role:"tabpanel",className:(0,s.A)(i,o),hidden:t,children:n})}function l(e){let n=e.children,o=e.className,s=e.value;const i=(0,t.uc)(),l=i.selectedValue,d=i.lazy,c=s===l;return!c&&d?null:(0,a.jsx)(r,{className:o,hidden:!c,children:n})}},4865(e,n,o){o.d(n,{A:()=>m});o(96540);var s=o(34164),t=o(17559),i=o(47751),a=o(23104),r=o(92303);const l="tabList__CuJ",d="tabItem_LNqP";var c=o(74848);function h(e){let n=e.className;const o=(0,i.uc)(),t=o.selectedValue,r=o.selectValue,l=o.tabValues,h=o.block,u=[],g=(0,a.a_)().blockElementScrollPositionUntilNextRender,m=e=>{const n=e.currentTarget,o=u.indexOf(n),s=l[o].value;s!==t&&(g(n),r(s))},p=e=>{var n;let o=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{var s;const n=u.indexOf(e.currentTarget)+1;o=null!=(s=u[n])?s:u[0];break}case"ArrowLeft":{var t;const n=u.indexOf(e.currentTarget)-1;o=null!=(t=u[n])?t:u[u.length-1];break}}null==(n=o)||n.focus()};return(0,c.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":h},n),children:l.map(e=>{let n=e.value,o=e.label,i=e.attributes;return(0,c.jsx)("li",Object.assign({role:"tab",tabIndex:t===n?0:-1,"aria-selected":t===n,ref:e=>{u.push(e)},onKeyDown:p,onClick:m},i,{className:(0,s.A)("tabs__item",d,null==i?void 0:i.className,{"tabs__item--active":t===n}),children:null!=o?o:n}),n)})})}function u(e){let n=e.children;return(0,c.jsx)("div",{className:"margin-top--md",children:n})}function g(e){let n=e.className,o=e.children;return(0,c.jsxs)("div",{className:(0,s.A)(t.G.tabs.container,"tabs-container",l),children:[(0,c.jsx)(h,{className:n}),(0,c.jsx)(u,{children:o})]})}function m(e){const n=(0,r.A)(),o=(0,i.OC)(e);return(0,c.jsx)(i.O_,{value:o,children:(0,c.jsx)(g,{className:e.className,children:(0,i.vT)(e.children)})},String(n))}},47751(e,n,o){o.d(n,{OC:()=>m,O_:()=>b,uc:()=>f,vT:()=>c});var s=o(96540),t=o(56347),i=o(205),a=o(57485),r=o(70679),l=o(31682),d=o(74848);function c(e){return s.Children.toArray(e).filter(e=>"\n"!==e)}function h(e){const n=e.values,o=e.children;return(0,s.useMemo)(()=>{const e=null!=n?n:function(e){return s.Children.toArray(e).flatMap(e=>{if(!e)return[];if((0,s.isValidElement)(e)&&function(e){const n=e.props;return!!n&&"object"==typeof n&&"value"in n}(e))return[e];const n="string"==typeof e.type?e.type:e.type.name;throw new Error("Docusaurus error: Bad child <"+n+'>: all children of the component should be , and every should have a unique "value" prop.\nIf you do not want to pass on a "value" prop to the direct children of , you can also pass an explicit prop.')}).map(e=>{let n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}})}(o);return function(e){const n=(0,l.XI)(e,(e,n)=>e.value===n.value);if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map(e=>"'"+e.value+"'").join(", ")+'" found in . Every value needs to be unique.')}(e),e},[n,o])}function u(e){let n=e.value;return e.tabValues.some(e=>e.value===n)}function g(e){let n=e.queryString,o=void 0!==n&&n,i=e.groupId;const r=(0,t.W6)(),l=function(e){let n=e.queryString,o=void 0!==n&&n,s=e.groupId;if("string"==typeof o)return o;if(!1===o)return null;if(!0===o&&!s)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=s?s:null}({queryString:o,groupId:i});return[(0,a.aZ)(l),(0,s.useCallback)(e=>{if(!l)return;const n=new URLSearchParams(r.location.search);n.set(l,e),r.replace(Object.assign({},r.location,{search:n.toString()}))},[l,r])]}function m(e){var n,o;const t=e.defaultValue,a=e.queryString,l=void 0!==a&&a,d=e.groupId,c=h(e),m=(0,s.useState)(()=>function(e){var n;let o=e.defaultValue,s=e.tabValues;if(0===s.length)throw new Error("Docusaurus error: the component requires at least one children component");if(o){if(!u({value:o,tabValues:s}))throw new Error('Docusaurus error: The has a defaultValue "'+o+'" but none of its children has the corresponding value. Available values are: '+s.map(e=>e.value).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return o}const t=null!=(n=s.find(e=>e.default))?n:s[0];if(!t)throw new Error("Unexpected error: 0 tabValues");return t.value}({defaultValue:t,tabValues:c})),p=m[0],f=m[1],b=g({queryString:l,groupId:d}),x=b[0],w=b[1],v=function(e){const n=function(e){return e?"docusaurus.tab."+e:null}(e.groupId),o=(0,r.Dv)(n),t=o[0],i=o[1];return[t,(0,s.useCallback)(e=>{n&&i.set(e)},[n,i])]}({groupId:d}),j=v[0],y=v[1],_=(()=>{const e=null!=x?x:j;return u({value:e,tabValues:c})?e:null})();(0,i.A)(()=>{_&&f(_)},[_]);return{selectedValue:p,selectValue:(0,s.useCallback)(e=>{if(!u({value:e,tabValues:c}))throw new Error("Can't select invalid tab value="+e);f(e),w(e),y(e)},[w,y,c]),tabValues:c,lazy:null!=(n=e.lazy)&&n,block:null!=(o=e.block)&&o}}const p=(0,s.createContext)(null);function f(){const e=s.useContext(p);if(!e)throw new Error("useTabsContext() must be used within a Tabs component");return e}function b(e){return(0,d.jsx)(p.Provider,{value:e.value,children:e.children})}},70040(e,n,o){o.d(n,{A:()=>s});const s=o.p+"assets/images/bashtop_01-73cd0ea30d1be4b01a75026584e7ec98.png"},44531(e,n,o){o.d(n,{A:()=>s});const s=o.p+"assets/images/bashtop_02-b57cd049a17f75c4d900a4f3ae5c3173.png"},28453(e,n,o){o.d(n,{R:()=>a,x:()=>r});var s=o(96540);const t={},i=s.createContext(t);function a(e){const n=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2693.f6f7ef84.js b/assets/js/2693.f6f7ef84.js new file mode 100644 index 000000000..f72ee6ca8 --- /dev/null +++ b/assets/js/2693.f6f7ef84.js @@ -0,0 +1,2 @@ +/*! For license information please see 2693.f6f7ef84.js.LICENSE.txt */ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[2693],{92693(e,t,n){n.r(t),n.d(t,{DocSearchModal:()=>Sh});var r=n(96540);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:u}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){o=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(o)throw a}}}}function p(e,t,n){return(t=w(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t3?(u=h===r)&&(s=a[(o=a[4])?5:(o=3,3)],a[4]=a[5]=e):a[0]<=p&&((u=n<2&&pr||r>h)&&(a[4]=n,a[5]=r,f.n=h,o=0))}if(u||n>1)return i;throw d=!0,r}return function(u,l,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===l&&p(l,h),o=l,s=h;(t=o<2?e:s)||!d;){a||(o?o<3?(o>1&&(f.n=-1),p(o,s)):f.n=s:f.v=s);try{if(c=2,a){if(o||(u="next"),t=a[u]){if(!(t=t.call(a,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,o<2&&(o=0)}else 1===o&&(t=a.return)&&t.call(a),o<2&&(s=TypeError("The iterator does not provide a '"+u+"' method"),o=1);a=e}else if((t=(d=f.n<0)?s:n.call(r,f))!==i)break}catch(t){a=e,o=1,s=t}finally{c=1}}return{value:t,done:d}}}(n,u,a),!0),c}var i={};function o(){}function s(){}function c(){}t=Object.getPrototypeOf;var l=[][r]?t(t([][r]())):(b(t={},r,function(){return this}),t),d=c.prototype=o.prototype=Object.create(l);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,b(e,u,"GeneratorFunction")),e.prototype=Object.create(d),e}return s.prototype=c,b(d,"constructor",c),b(c,"constructor",s),s.displayName="GeneratorFunction",b(c,u,"GeneratorFunction"),b(d),b(d,u,"Generator"),b(d,r,function(){return this}),b(d,"toString",function(){return"[object Generator]"}),(E=function(){return{w:a,m:f}})()}function b(e,t,n,r){var u=Object.defineProperty;try{u({},"",{})}catch(e){u=0}b=function(e,t,n,r){function a(t,n){b(e,t,function(e){return this._invoke(t,n,e)})}t?u?u(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},b(e,t,n,r)}function C(e,t){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},C(e,t)}function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,u,a,i,o=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(o.push(r.value),o.length!==t);s=!0);}catch(e){c=!0,u=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw u}}return o}}(e,t)||S(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||S(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function S(e,t){if(e){if("string"==typeof e)return u(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function x(e){var t="function"==typeof Map?new Map:void 0;return x=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return c(e,arguments,v(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),C(n,e)},x(e)}function B(){B=function(e,t){return new n(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function n(e,r,u){var a=RegExp(e,r);return t.set(a,u||t.get(e)),C(a,n.prototype)}function r(e,n){var r=t.get(n);return Object.keys(r).reduce(function(t,n){var u=r[n];if("number"==typeof u)t[n]=e[u];else{for(var a=0;void 0===e[u[a]]&&a+1]+)(>|$)/g,function(e,t,n){if(""===n)return e;var r=a[t];return Array.isArray(r)?"$"+r.join("$"):"number"==typeof r?"$"+r:""}))}if("function"==typeof u){var i=this;return e[Symbol.replace].call(this,n,function(){var e=arguments;return"object"!=typeof e[e.length-1]&&(e=[].slice.call(e)).push(r(e,i)),u.apply(this,e)})}return e[Symbol.replace].call(this,n,u)},B.apply(this,arguments)}function I(e,t){var n=void 0;return function(){for(var r=arguments.length,u=new Array(r),a=0;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(u[n]=e[n]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(u[n]=e[n])}return u}function J(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 K(e){for(var t=1;t=3||2===n&&r>=4||1===n&&r>=10);function a(t,n,r){if(u&&void 0!==r){var a=r[0].__autocomplete_algoliaCredentials,i={"X-Algolia-Application-Id":a.appId,"X-Algolia-API-Key":a.apiKey};e.apply(void 0,[t].concat(U(n),[{headers:i}]))}else e.apply(void 0,[t].concat(U(n)))}return{init:function(t,n){e("init",{appId:t,apiKey:n})},setAuthenticatedUserToken:function(t){e("setAuthenticatedUserToken",t)},setUserToken:function(t){e("setUserToken",t)},clickedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&a("clickedObjectIDsAfterSearch",Q(t),t[0].items)},clickedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&a("clickedObjectIDs",Q(t),t[0].items)},clickedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&e.apply(void 0,["clickedFilters"].concat(n))},convertedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&a("convertedObjectIDsAfterSearch",Q(t),t[0].items)},convertedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&a("convertedObjectIDs",Q(t),t[0].items)},convertedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&e.apply(void 0,["convertedFilters"].concat(n))},viewedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&t.reduce(function(e,t){var n=t.items,r=H(t,$);return[].concat(U(e),U(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,n=[],r=0;r0&&e.apply(void 0,["viewedFilters"].concat(n))}}}function Y(e){var t=e.items.reduce(function(e,t){var n;return e[t.__autocomplete_indexName]=(null!==(n=e[t.__autocomplete_indexName])&&void 0!==n?n:[]).concat(t),e},{});return Object.keys(t).map(function(e){return{index:e,items:t[e],algoliaSource:["autocomplete"]}})}function X(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function ee(e){return ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ee(e)}function te(e){return function(e){if(Array.isArray(e))return ne(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ne(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ne(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&se({onItemsChange:u,items:n,insights:c,state:t}))}},0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(e){var t=e.setContext,n=e.onSelect,r=e.onActive;function u(e){t({algoliaInsightsPlugin:{__algoliaSearchParameters:ue(ue({},o?{clickAnalytics:!0}:{}),e?{userToken:de(e)}:{}),insights:c}})}s("addAlgoliaAgent","insights-plugin"),u(),s("onUserTokenChange",function(e){u(e)}),s("getUserToken",null,function(e,t){u(t)}),n(function(e){var t=e.item,n=e.state,r=e.event,u=e.source;X(t)&&a({state:n,event:r,insights:c,item:t,insightsEvents:[ue({eventName:"Item Selected"},M({item:t,items:u.getItems().filter(X)}))]})}),r(function(e){var t=e.item,n=e.source,r=e.state,u=e.event;X(t)&&i({state:r,event:u,insights:c,item:t,insightsEvents:[ue({eventName:"Item Active"},M({item:t,items:n.getItems().filter(X)}))]})})},onStateChange:function(e){var t=e.state;d({state:t})},__autocomplete_pluginOptions:e}}function le(){var e,t=arguments.length>1?arguments[1]:void 0;return[].concat(te(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]),["autocomplete-internal"],te(null!==(e=t.algoliaInsightsPlugin)&&void 0!==e&&e.__automaticInsights?["autocomplete-automatic"]:[]))}function de(e){return"number"==typeof e?e.toString():e}function fe(e,t){var n=t;return{then:function(t,r){return fe(e.then(he(t,n,e),he(r,n,e)),n)},catch:function(t){return fe(e.catch(he(t,n,e)),n)},finally:function(t){return t&&n.onCancelList.push(t),fe(e.finally(he(t&&function(){return n.onCancelList=[],t()},n,e)),n)},cancel:function(){n.isCanceled=!0;var e=n.onCancelList;n.onCancelList=[],e.forEach(function(e){e()})},isCanceled:function(){return!0===n.isCanceled}}}function pe(e){return fe(e,{isCanceled:!1,onCancelList:[]})}function he(e,t,n){return e?function(n){return t.isCanceled?n:e(n)}:n}var ve,me=!0;function De(e,t,n,r){if(!n)return null;if(e<0&&(null===t||null!==r&&0===t))return n+e;var u=(null===t?-1:t)+e;return u<=-1||u>=n?null===r?null:0:u}function ye(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 ge(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:u}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){o=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(o)throw a}}}}(e);try{for(a.s();!(n=a.n()).done;){var i,o,s,c=null===(i=n.value.__autocomplete_pluginOptions)||void 0===i||null===(o=(s=i).awaitSubmit)||void 0===o?void 0:o.call(s);if("number"==typeof c)u.push(c);else if(!0===c){r=!0;break}}}catch(e){a.e(e)}finally{a.f()}return r?t.wait():u.length>0?t.wait(Math.max.apply(Math,u)):void 0};function Ae(e){var t=function(e){var t=e.collections.map(function(e){return e.items.length}).reduce(function(e,t,n){var r=(e[n-1]||0)+t;return e.push(r),e},[]).reduce(function(t,n){return n<=e.activeItemId?t+1:t},0);return e.collections[t]}(e);if(!t)return null;var n=t.items[function(e){for(var t=e.state,n=e.collection,r=!1,u=0,a=0;!1===r;){var i=t.collections[u];if(i===n){r=!0;break}a+=i.items.length,u++}return t.activeItemId-a}({state:e,collection:t})],r=t.source;return{item:n,itemInputValue:r.getItemInputValue({item:n,state:e}),itemUrl:r.getItemUrl({item:n,state:e}),source:r}}function ke(e,t,n){return[e,null==n?void 0:n.sourceId,t].filter(Boolean).join("-").replace(/\s/g,"")}var we=/((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;function _e(e){return e.nativeEvent||e}function Se(e){return Se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Se(e)}function xe(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 Be(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Se(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==Se(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===Se(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ie(e){return Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ie(e)}function Oe(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 Te(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0},reshape:function(e){return e.sources}},e),{},{id:null!==(n=e.id)&&void 0!==n?n:"autocomplete-".concat(T++),plugins:u,initialState:Re({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var n;null===(n=e.onStateChange)||void 0===n||n.call(e,t),u.forEach(function(e){var n;return null===(n=e.onStateChange)||void 0===n?void 0:n.call(e,t)})},onSubmit:function(t){var n;null===(n=e.onSubmit)||void 0===n||n.call(e,t),u.forEach(function(e){var n;return null===(n=e.onSubmit)||void 0===n?void 0:n.call(e,t)})},onReset:function(t){var n;null===(n=e.onReset)||void 0===n||n.call(e,t),u.forEach(function(e){var n;return null===(n=e.onReset)||void 0===n?void 0:n.call(e,t)})},getSources:function(n){return Promise.all([].concat(function(e){return function(e){if(Array.isArray(e))return Ne(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Ne(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ne(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(u.map(function(e){return e.getSources})),[e.getSources]).filter(Boolean).map(function(e){return function(e,t){var n=[];return Promise.resolve(e(t)).then(function(e){return Promise.all(e.filter(function(e){return Boolean(e)}).map(function(e){if(e.sourceId,n.includes(e.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(e.sourceId)," is not unique."));n.push(e.sourceId);var t={getItemInputValue:function(e){return e.state.query},getItemUrl:function(){},onSelect:function(e){(0,e.setIsOpen)(!1)},onActive:z,onResolve:z};Object.keys(t).forEach(function(e){t[e].__default=!0});var r=ge(ge({},t),e);return Promise.resolve(r)}))})}(e,n)})).then(function(e){return O(e)}).then(function(e){return e.map(function(e){return Re(Re({},e),{},{onSelect:function(n){e.onSelect(n),t.forEach(function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,n)})},onActive:function(n){e.onActive(n),t.forEach(function(e){var t;return null===(t=e.onActive)||void 0===t?void 0:t.call(e,n)})},onResolve:function(n){e.onResolve(n),t.forEach(function(e){var t;return null===(t=e.onResolve)||void 0===t?void 0:t.call(e,n)})}})})})},navigator:Re({navigate:function(e){var t=e.itemUrl;r.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,n=r.open(t,"_blank","noopener");null==n||n.focus()},navigateNewWindow:function(e){var t=e.itemUrl;r.open(t,"_blank","noopener")}},e.navigator)})}function Le(e){return Le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Le(e)}function $e(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 qe(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(u[n]=e[n]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(u[n]=e[n])}return u}(e,et);ot&&u.environment.clearTimeout(ot);var c=s.setCollections,l=s.setIsOpen,d=s.setQuery,f=s.setActiveItemId,p=s.setStatus,h=s.setContext;if(d(a),f(u.defaultActiveItemId),!a&&!1===u.openOnFocus){var v,m=o.getState().collections.map(function(e){return nt(nt({},e),{},{items:[]})});p("idle"),c(m),l(null!==(v=r.isOpen)&&void 0!==v?v:u.shouldPanelOpen({state:o.getState()}));var D=pe(st(m).then(function(){return Promise.resolve()}));return o.pendingRequests.add(D)}p("loading"),ot=u.environment.setTimeout(function(){p("stalled")},u.stallThreshold);var y=pe(st(u.getSources(nt({query:a,refresh:i,state:o.getState()},s)).then(function(e){return Promise.all(e.map(function(e){return Promise.resolve(e.getItems(nt({query:a,refresh:i,state:o.getState()},s))).then(function(t){return function(e,t,n){if(u=e,Boolean(null==u?void 0:u.execute)){var r="algolia"===e.requesterId?Object.assign.apply(Object,[{}].concat(We(Object.keys(n.context).map(function(e){var t;return null===(t=n.context[e])||void 0===t?void 0:t.__algoliaSearchParameters})))):{};return Je(Je({},e),{},{requests:e.queries.map(function(n){return{query:"algolia"===e.requesterId?Je(Je({},n),{},{params:Je(Je({},r),n.params)}):n,sourceId:t,transformResponse:e.transformResponse}})})}var u;return{items:e,sourceId:t}}(t,e.sourceId,o.getState())})})).then(Ye).then(function(t){var n,r=t.some(function(e){return function(e){return!Array.isArray(e)&&Boolean(null==e?void 0:e._automaticInsights)}(e.items)});return r&&h({algoliaInsightsPlugin:nt(nt({},(null===(n=o.getState().context)||void 0===n?void 0:n.algoliaInsightsPlugin)||{}),{},{__automaticInsights:r})}),function(e,t,n){return t.map(function(t){var r,u=e.filter(function(e){return e.sourceId===t.sourceId}),a=u.map(function(e){return e.items}),i=u[0].transformResponse,o=i?i({results:r=a,hits:r.map(function(e){return e.hits}).filter(Boolean),facetHits:r.map(function(e){var t;return null===(t=e.facetHits)||void 0===t?void 0:t.map(function(e){return{label:e.value,count:e.count,_highlightResult:{label:{value:e.highlighted}}}})}).filter(Boolean)}):a;return t.onResolve({source:t,results:a,items:o,state:n.getState()}),o.every(Boolean),'The `getItems` function from source "'.concat(t.sourceId,'" must return an array of items but returned ').concat(JSON.stringify(void 0),".\n\nDid you forget to return items?\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems"),{source:t,items:o}})}(t,e,o)}).then(function(e){return function(e){var t=e.props,n=e.state,r=e.collections.reduce(function(e,t){return qe(qe({},e),{},Ue({},t.source.sourceId,qe(qe({},t.source),{},{getItems:function(){return O(t.items)}})))},{}),u=t.plugins.reduce(function(e,t){return t.reshape?t.reshape(e):e},{sourcesBySourceId:r,state:n}).sourcesBySourceId;return O(t.reshape({sourcesBySourceId:u,sources:Object.values(u),state:n})).filter(Boolean).map(function(e){return{source:e,items:e.getItems()}})}({collections:e,props:u,state:o.getState()})})}))).then(function(e){var n;p("idle"),c(e);var d=u.shouldPanelOpen({state:o.getState()});l(null!==(n=r.isOpen)&&void 0!==n?n:u.openOnFocus&&!a&&d||d);var f=Ae(o.getState());if(null!==o.getState().activeItemId&&f){var h=f.item,v=f.itemInputValue,m=f.itemUrl,D=f.source;D.onActive(nt({event:t,item:h,itemInputValue:v,itemUrl:m,refresh:i,source:D,state:o.getState()},s))}}).finally(function(){p("idle"),ot&&u.environment.clearTimeout(ot)});return o.pendingRequests.add(y)}function lt(e){return lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lt(e)}var dt=["event","props","refresh","store"];function ft(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 pt(e){for(var t=1;t=0||(u[n]=e[n]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(u[n]=e[n])}return u}function wt(e){var t=e.props,n=e.refresh,r=e.store,u=kt(e,mt);return{getEnvironmentProps:function(e){var n=e.inputElement,u=e.formElement,a=e.panelElement;function i(e){!r.getState().isOpen&&r.pendingRequests.isEmpty()||e.target===n||!1===[u,a].some(function(t){return(n=t)===(r=e.target)||n.contains(r);var n,r})&&(r.dispatch("blur",null),t.debug||r.pendingRequests.cancelAll())}return Ct({onTouchStart:i,onMouseDown:i,onTouchMove:function(e){!1!==r.getState().isOpen&&n===t.environment.document.activeElement&&e.target!==n&&n.blur()}},kt(e,Dt))},getRootProps:function(e){return Ct({role:"combobox","aria-expanded":r.getState().isOpen,"aria-haspopup":"listbox","aria-controls":r.getState().isOpen?r.getState().collections.map(function(e){var n=e.source;return ke(t.id,"list",n)}).join(" "):void 0,"aria-labelledby":ke(t.id,"label")},e)},getFormProps:function(e){e.inputElement;var a=kt(e,yt),i=function(a){var i;t.onSubmit(Ct({event:a,refresh:n,state:r.getState()},u)),r.dispatch("submit",null),null===(i=e.inputElement)||void 0===i||i.blur()};return Ct({action:"",noValidate:!0,role:"search",onSubmit:function(e){e.preventDefault();var n=Ce(t.plugins,r.pendingRequests);void 0!==n?n.then(function(){return i(e)}):i(e)},onReset:function(a){var i;a.preventDefault(),t.onReset(Ct({event:a,refresh:n,state:r.getState()},u)),r.dispatch("reset",null),null===(i=e.inputElement)||void 0===i||i.focus()}},a)},getLabelProps:function(e){return Ct({htmlFor:ke(t.id,"input"),id:ke(t.id,"label")},e)},getInputProps:function(e){var a;function i(e){(t.openOnFocus||Boolean(r.getState().query))&&ct(Ct({event:e,props:t,query:r.getState().completion||r.getState().query,refresh:n,store:r},u)),r.dispatch("focus",null)}var o=e||{};o.inputElement;var s=o.maxLength,c=void 0===s?512:s,l=kt(o,gt),d=Ae(r.getState()),f=function(e){return Boolean(e&&e.match(we))}((null===(a=t.environment.navigator)||void 0===a?void 0:a.userAgent)||""),p=t.enterKeyHint||(null!=d&&d.itemUrl&&!f?"go":"search");return Ct({"aria-autocomplete":"both","aria-activedescendant":r.getState().isOpen&&null!==r.getState().activeItemId?ke(t.id,"item-".concat(r.getState().activeItemId),null==d?void 0:d.source):void 0,"aria-controls":r.getState().isOpen?r.getState().collections.filter(function(e){return e.items.length>0}).map(function(e){var n=e.source;return ke(t.id,"list",n)}).join(" "):void 0,"aria-labelledby":ke(t.id,"label"),value:r.getState().completion||r.getState().query,id:ke(t.id,"input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:p,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:c,type:"search",onChange:function(e){var a=e.currentTarget.value;t.ignoreCompositionEvents&&_e(e).isComposing?u.setQuery(a):ct(Ct({event:e,props:t,query:a.slice(0,c),refresh:n,store:r},u))},onCompositionEnd:function(e){ct(Ct({event:e,props:t,query:e.currentTarget.value.slice(0,c),refresh:n,store:r},u))},onKeyDown:function(e){_e(e).isComposing||function(e){var t=e.event,n=e.props,r=e.refresh,u=e.store,a=function(e,t){if(null==e)return{};var n,r,u=function(e,t){if(null==e)return{};var n,r,u={},a=Object.keys(e);for(r=0;r=0||(u[n]=e[n]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(u[n]=e[n])}return u}(e,dt);if("ArrowUp"===t.key||"ArrowDown"===t.key){var i=function(){var e=Ae(u.getState()),t=n.environment.document.getElementById(ke(n.id,"item-".concat(u.getState().activeItemId),null==e?void 0:e.source));t&&(t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded(!1):t.scrollIntoView(!1))},o=function(){var e=Ae(u.getState());if(null!==u.getState().activeItemId&&e){var n=e.item,i=e.itemInputValue,o=e.itemUrl,s=e.source;s.onActive(pt({event:t,item:n,itemInputValue:i,itemUrl:o,refresh:r,source:s,state:u.getState()},a))}};t.preventDefault(),!1===u.getState().isOpen&&(n.openOnFocus||Boolean(u.getState().query))?ct(pt({event:t,props:n,query:u.getState().query,refresh:r,store:u},a)).then(function(){u.dispatch(t.key,{nextActiveItemId:n.defaultActiveItemId}),o(),setTimeout(i,0)}):(u.dispatch(t.key,{}),o(),i())}else if("Escape"===t.key)t.preventDefault(),u.dispatch(t.key,null),u.pendingRequests.cancelAll();else if("Tab"===t.key)u.dispatch("blur",null),u.pendingRequests.cancelAll();else if("Enter"===t.key){if(null===u.getState().activeItemId||u.getState().collections.every(function(e){return 0===e.items.length})){var s=Ce(n.plugins,u.pendingRequests);return void(void 0!==s?s.then(u.pendingRequests.cancelAll):n.debug||u.pendingRequests.cancelAll())}t.preventDefault();var c=Ae(u.getState()),l=c.item,d=c.itemInputValue,f=c.itemUrl,p=c.source;if(t.metaKey||t.ctrlKey)void 0!==f&&(p.onSelect(pt({event:t,item:l,itemInputValue:d,itemUrl:f,refresh:r,source:p,state:u.getState()},a)),n.navigator.navigateNewTab({itemUrl:f,item:l,state:u.getState()}));else if(t.shiftKey)void 0!==f&&(p.onSelect(pt({event:t,item:l,itemInputValue:d,itemUrl:f,refresh:r,source:p,state:u.getState()},a)),n.navigator.navigateNewWindow({itemUrl:f,item:l,state:u.getState()}));else if(t.altKey);else{if(void 0!==f)return p.onSelect(pt({event:t,item:l,itemInputValue:d,itemUrl:f,refresh:r,source:p,state:u.getState()},a)),void n.navigator.navigate({itemUrl:f,item:l,state:u.getState()});ct(pt({event:t,nextState:{isOpen:!1},props:n,query:d,refresh:r,store:u},a)).then(function(){p.onSelect(pt({event:t,item:l,itemInputValue:d,itemUrl:f,refresh:r,source:p,state:u.getState()},a))})}}}(Ct({event:e,props:t,refresh:n,store:r},u))},onFocus:i,onBlur:z,onClick:function(n){e.inputElement!==t.environment.document.activeElement||r.getState().isOpen||i(n)}},l)},getPanelProps:function(e){return Ct({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){r.dispatch("mouseleave",null)}},e)},getListProps:function(e){var n=e||{},r=n.source,u=kt(n,Ft);return Ct({role:"listbox","aria-labelledby":ke(t.id,"label"),id:ke(t.id,"list",r)},u)},getItemProps:function(e){var a=e.item,i=e.source,o=kt(e,Et);return Ct({id:ke(t.id,"item-".concat(a.__autocomplete_id),i),role:"option","aria-selected":r.getState().activeItemId===a.__autocomplete_id,onMouseMove:function(e){if(a.__autocomplete_id!==r.getState().activeItemId){r.dispatch("mousemove",a.__autocomplete_id);var t=Ae(r.getState());if(null!==r.getState().activeItemId&&t){var i=t.item,o=t.itemInputValue,s=t.itemUrl,c=t.source;c.onActive(Ct({event:e,item:i,itemInputValue:o,itemUrl:s,refresh:n,source:c,state:r.getState()},u))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var o=i.getItemInputValue({item:a,state:r.getState()}),s=i.getItemUrl({item:a,state:r.getState()});(s?Promise.resolve():ct(Ct({event:e,nextState:{isOpen:!1},props:t,query:o,refresh:n,store:r},u))).then(function(){i.onSelect(Ct({event:e,item:a,itemInputValue:o,itemUrl:s,refresh:n,source:i,state:r.getState()},u))})}},o)}}}function _t(e){return _t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_t(e)}function St(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 xt(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"",n="string"==typeof e?e:e.source,r={replace:function(e,t){var u="string"==typeof t?t:t.source;return u=u.replace(bn.caret,"$1"),n=n.replace(e,u),r},getRegex:function(){return new RegExp(n,t)}};return r}var En=function(){try{return!!new RegExp("(?<=1)(?/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\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\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\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\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\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\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\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\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDDC0-\uDDF3\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD40-\uDD59\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDD40-\uDD65\uDD6F-\uDD85\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDEC2-\uDEC7\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61\uDF80-\uDF89\uDF8B\uDF8E\uDF90-\uDFB5\uDFB7\uDFD1\uDFD3]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDED0-\uDEE3\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8\uDFC0-\uDFE0\uDFF0-\uDFF9]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDDB0-\uDDDB\uDDE0-\uDDE9\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD80E\uD80F\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46\uDC60-\uDFFF]|\uD810[\uDC00-\uDFFA]|\uD811[\uDC00-\uDE46]|\uD818[\uDD00-\uDD1D\uDD30-\uDD39]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDD40-\uDD6C\uDD70-\uDD79\uDE40-\uDE96\uDEA0-\uDEB8\uDEBB-\uDED3\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3\uDFF2-\uDFF6]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD833[\uDCF0-\uDCF9]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\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]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDCD0-\uDCEB\uDCF0-\uDCF9\uDDD0-\uDDED\uDDF0-\uDDFA\uDEC0-\uDEDE\uDEE0-\uDEE2\uDEE4\uDEE5\uDEE7-\uDEED\uDEF0-\uDEF4\uDEFE\uDEFF\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\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]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79])/,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:function(e){return new RegExp("^( {0,3}".concat(e,")((?:[\t ][^\\n]*)?(?:\\n|$))"))},nextBulletRegex:function(e){return new RegExp("^ {0,".concat(Math.min(3,e-1),"}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))"))},hrRegex:function(e){return new RegExp("^ {0,".concat(Math.min(3,e-1),"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)"))},fencesBeginRegex:function(e){return new RegExp("^ {0,".concat(Math.min(3,e-1),"}(?:```|~~~)"))},headingBeginRegex:function(e){return new RegExp("^ {0,".concat(Math.min(3,e-1),"}#"))},htmlBeginRegex:function(e){return new RegExp("^ {0,".concat(Math.min(3,e-1),"}<(?:[a-z].*>|!--)"),"i")}},Cn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,An=/(?:[*+-]|\d{1,9}[.)])/,kn=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,wn=Fn(kn).replace(/bull/g,An).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),_n=Fn(kn).replace(/bull/g,An).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Sn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,xn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Bn=Fn(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",xn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),In=Fn(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,An).getRegex(),On="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|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Tn=/|$))/,Pn=Fn("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",Tn).replace("tag",On).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),jn=Fn(Sn).replace("hr",Cn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",On).getRegex(),Nn={blockquote:Fn(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",jn).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:Bn,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:Cn,html:Pn,lheading:wn,list:In,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:jn,table:gn,text:/^[^\n]+/},zn=Fn("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Cn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",On).getRegex(),Rn=g(g({},Nn),{},{lheading:_n,table:zn,paragraph:Fn(Sn).replace("hr",Cn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",zn).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",On).getRegex()}),Mn=g(g({},Nn),{},{html:Fn("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Tn).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+|$)/,fences:gn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Fn(Sn).replace("hr",Cn).replace("heading"," *#{1,6} *[^\n]").replace("lheading",wn).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),Zn=/^( {2,}|\\)\n(?!\s*$)/,Ln=/(?:[!-\/:-@\[-`\{-~\xA1-\xA9\xAB\xAC\xAE-\xB1\xB4\xB6-\xB8\xBB\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u037E\u0384\u0385\u0387\u03F6\u0482\u055A-\u055F\u0589\u058A\u058D-\u058F\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0606-\u060F\u061B\u061D-\u061F\u066A-\u066D\u06D4\u06DE\u06E9\u06FD\u06FE\u0700-\u070D\u07F6-\u07F9\u07FE\u07FF\u0830-\u083E\u085E\u0888\u0964\u0965\u0970\u09F2\u09F3\u09FA\u09FB\u09FD\u0A76\u0AF0\u0AF1\u0B70\u0BF3-\u0BFA\u0C77\u0C7F\u0C84\u0D4F\u0D79\u0DF4\u0E3F\u0E4F\u0E5A\u0E5B\u0F01-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F85\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u104A-\u104F\u109E\u109F\u10FB\u1360-\u1368\u1390-\u1399\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DB\u1800-\u180A\u1940\u1944\u1945\u19DE-\u19FF\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2010-\u2027\u2030-\u205E\u207A-\u207E\u208A-\u208E\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2775\u2794-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3001-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u303F\u309B\u309C\u30A0\u30FB\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAA77-\uAA79\uAADE\uAADF\uAAF0\uAAF1\uAB5B\uAB6A\uAB6B\uABEB\uFB29\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD00-\uDD02\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDC77\uDC78\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEC8\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDD8E\uDD8F\uDEAD\uDED0-\uDED8\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3F]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFD5-\uDFF1\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3F\uDF44\uDF45]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F[\uDC9C\uDC9F]|\uD833[\uDC00-\uDCEF\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE8B]|\uD838[\uDD4F\uDEFF]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA])/,$n=/(?:[\t-\r -\/:-@\[-`\{-~\xA0-\xA9\xAB\xAC\xAE-\xB1\xB4\xB6-\xB8\xBB\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u037E\u0384\u0385\u0387\u03F6\u0482\u055A-\u055F\u0589\u058A\u058D-\u058F\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0606-\u060F\u061B\u061D-\u061F\u066A-\u066D\u06D4\u06DE\u06E9\u06FD\u06FE\u0700-\u070D\u07F6-\u07F9\u07FE\u07FF\u0830-\u083E\u085E\u0888\u0964\u0965\u0970\u09F2\u09F3\u09FA\u09FB\u09FD\u0A76\u0AF0\u0AF1\u0B70\u0BF3-\u0BFA\u0C77\u0C7F\u0C84\u0D4F\u0D79\u0DF4\u0E3F\u0E4F\u0E5A\u0E5B\u0F01-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F85\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u104A-\u104F\u109E\u109F\u10FB\u1360-\u1368\u1390-\u1399\u1400\u166D\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DB\u1800-\u180A\u1940\u1944\u1945\u19DE-\u19FF\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2000-\u200A\u2010-\u2029\u202F-\u205F\u207A-\u207E\u208A-\u208E\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2775\u2794-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u303F\u309B\u309C\u30A0\u30FB\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAA77-\uAA79\uAADE\uAADF\uAAF0\uAAF1\uAB5B\uAB6A\uAB6B\uABEB\uFB29\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFEFF\uFF01-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD00-\uDD02\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDC77\uDC78\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEC8\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDD8E\uDD8F\uDEAD\uDED0-\uDED8\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3F]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFD5-\uDFF1\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3F\uDF44\uDF45]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F[\uDC9C\uDC9F]|\uD833[\uDC00-\uDCEF\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE8B]|\uD838[\uDD4F\uDEFF]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA])/,qn=/(?:[\0-\x08\x0E-\x1F0-9A-Za-z\x7F-\x9F\xAA\xAD\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376-\u037D\u037F-\u0383\u0386\u0388-\u03F5\u03F7-\u0481\u0483-\u0559\u0560-\u0588\u058B\u058C\u0590-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7-\u05F2\u05F5-\u0605\u0610-\u061A\u061C\u0620-\u0669\u066E-\u06D3\u06D5-\u06DD\u06DF-\u06E8\u06EA-\u06FC\u06FF\u070E-\u07F5\u07FA-\u07FD\u0800-\u082F\u083F-\u085D\u085F-\u0887\u0889-\u0963\u0966-\u096F\u0971-\u09F1\u09F4-\u09F9\u09FC\u09FE-\u0A75\u0A77-\u0AEF\u0AF2-\u0B6F\u0B71-\u0BF2\u0BFB-\u0C76\u0C78-\u0C7E\u0C80-\u0C83\u0C85-\u0D4E\u0D50-\u0D78\u0D7A-\u0DF3\u0DF5-\u0E3E\u0E40-\u0E4E\u0E50-\u0E59\u0E5C-\u0F00\u0F18\u0F19\u0F20-\u0F33\u0F35\u0F37\u0F39\u0F3E-\u0F84\u0F86-\u0FBD\u0FC6\u0FCD\u0FDB-\u1049\u1050-\u109D\u10A0-\u10FA\u10FC-\u135F\u1369-\u138F\u139A-\u13FF\u1401-\u166C\u166F-\u167F\u1681-\u169A\u169D-\u16EA\u16EE-\u1734\u1737-\u17D3\u17D7\u17DC-\u17FF\u180B-\u193F\u1941-\u1943\u1946-\u19DD\u1A00-\u1A1D\u1A20-\u1A9F\u1AA7\u1AAE-\u1B4D\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BFB\u1C00-\u1C3A\u1C40-\u1C7D\u1C80-\u1CBF\u1CC8-\u1CD2\u1CD4-\u1FBC\u1FBE\u1FC2-\u1FCC\u1FD0-\u1FDC\u1FE0-\u1FEC\u1FF0-\u1FFC\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u2079\u207F-\u2089\u208F-\u209F\u20C2-\u20FF\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u218C-\u218F\u242A-\u243F\u244B-\u249B\u24EA-\u24FF\u2776-\u2793\u2B74\u2B75\u2C00-\u2CE4\u2CEB-\u2CF8\u2CFD\u2D00-\u2D6F\u2D71-\u2DFF\u2E2F\u2E5E-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3040-\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u318F\u3192-\u3195\u31A0-\u31BF\u31E6-\u31EE\u31F0-\u31FF\u321F-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48F\uA4C7-\uA4FD\uA500-\uA60C\uA610-\uA672\uA674-\uA67D\uA67F-\uA6F1\uA6F8-\uA6FF\uA717-\uA71F\uA722-\uA788\uA78B-\uA827\uA82C-\uA835\uA83A-\uA873\uA878-\uA8CD\uA8D0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA95E\uA960-\uA9C0\uA9CE-\uA9DD\uA9E0-\uAA5B\uAA60-\uAA76\uAA7A-\uAADD\uAAE0-\uAAEF\uAAF2-\uAB5A\uAB5C-\uAB69\uAB6C-\uABEA\uABEC-\uD7FF\uE000-\uFB28\uFB2A-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDD0-\uFDFB\uFE00-\uFE0F\uFE1A-\uFE2F\uFE53\uFE67\uFE6C-\uFEFE\uFF00\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]|\uD800[\uDC00-\uDCFF\uDD03-\uDD36\uDD40-\uDD78\uDD8A\uDD8B\uDD8F\uDD9D-\uDD9F\uDDA1-\uDDCF\uDDFD-\uDF9E\uDFA0-\uDFCF\uDFD1-\uDFFF]|\uD801[\uDC00-\uDD6E\uDD70-\uDFFF]|\uD802[\uDC00-\uDC56\uDC58-\uDC76\uDC79-\uDD1E\uDD20-\uDD3E\uDD40-\uDE4F\uDE59-\uDE7E\uDE80-\uDEC7\uDEC9-\uDEEF\uDEF7-\uDF38\uDF40-\uDF98\uDF9D-\uDFFF]|\uD803[\uDC00-\uDD6D\uDD6F-\uDD8D\uDD90-\uDEAC\uDEAE-\uDECF\uDED9-\uDF54\uDF5A-\uDF85\uDF8A-\uDFFF]|\uD804[\uDC00-\uDC46\uDC4E-\uDCBA\uDCBD\uDCC2-\uDD3F\uDD44-\uDD73\uDD76-\uDDC4\uDDC9-\uDDCC\uDDCE-\uDDDA\uDDDC\uDDE0-\uDE37\uDE3E-\uDEA8\uDEAA-\uDFD3\uDFD6\uDFD9-\uDFFF]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5C\uDC5E-\uDCC5\uDCC7-\uDDC0\uDDD8-\uDE40\uDE44-\uDE5F\uDE6D-\uDEB8\uDEBA-\uDF3B\uDF40-\uDFFF]|\uD806[\uDC00-\uDC3A\uDC3C-\uDD43\uDD47-\uDDE1\uDDE3-\uDE3E\uDE47-\uDE99\uDE9D\uDEA3-\uDEFF\uDF0A-\uDFE0\uDFE2-\uDFFF]|\uD807[\uDC00-\uDC40\uDC46-\uDC6F\uDC72-\uDEF6\uDEF9-\uDF42\uDF50-\uDFD4\uDFF2-\uDFFE]|[\uD808\uD80A\uD80C-\uD819\uD81C-\uD82E\uD830-\uD832\uD837\uD83F-\uDBFF][\uDC00-\uDFFF]|\uD809[\uDC00-\uDC6F\uDC75-\uDFFF]|\uD80B[\uDC00-\uDFF0\uDFF3-\uDFFF]|\uD81A[\uDC00-\uDE6D\uDE70-\uDEF4\uDEF6-\uDF36\uDF40-\uDF43\uDF46-\uDFFF]|\uD81B[\uDC00-\uDD6C\uDD70-\uDE96\uDE9B-\uDFE1\uDFE3-\uDFFF]|\uD82F[\uDC00-\uDC9B\uDC9D\uDC9E\uDCA0-\uDFFF]|\uD833[\uDCF0-\uDCF9\uDCFD-\uDCFF\uDEB4-\uDEB9\uDED1-\uDEDF\uDEF1-\uDF4F\uDFC4-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDD65-\uDD69\uDD6D-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDDEB-\uDDFF\uDE42-\uDE44\uDE46-\uDEFF\uDF57-\uDFFF]|\uD835[\uDC00-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE8C-\uDFFF]|\uD838[\uDC00-\uDD4E\uDD50-\uDEFE\uDF00-\uDFFF]|\uD839[\uDC00-\uDDFE\uDE00-\uDFFF]|\uD83A[\uDC00-\uDD5D\uDD60-\uDFFF]|\uD83B[\uDC00-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDD2D\uDD2F-\uDEEF\uDEF2-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDD0C\uDDAE-\uDDE5\uDE03-\uDE0F\uDE3C-\uDE3F\uDE49-\uDE4F\uDE52-\uDE5F\uDE66-\uDEFF]|\uD83D[\uDED9-\uDEDB\uDEED-\uDEEF\uDEFD-\uDEFF\uDFDA-\uDFDF\uDFEC-\uDFEF\uDFF1-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE\uDCAF\uDCBC-\uDCBF\uDCC2-\uDCCF\uDCD9-\uDCFF\uDE58-\uDE5F\uDE6E\uDE6F\uDE7D-\uDE7F\uDE8B-\uDE8D\uDEC7\uDEC9-\uDECC\uDEDD\uDEDE\uDEEB-\uDEEE\uDEF9-\uDEFF\uDF93\uDFF0-\uDFF9\uDFFB-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Un=Fn(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,$n).getRegex(),Vn=/(?!~)(?:[!-\/:-@\[-`\{-~\xA1-\xA9\xAB\xAC\xAE-\xB1\xB4\xB6-\xB8\xBB\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u037E\u0384\u0385\u0387\u03F6\u0482\u055A-\u055F\u0589\u058A\u058D-\u058F\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0606-\u060F\u061B\u061D-\u061F\u066A-\u066D\u06D4\u06DE\u06E9\u06FD\u06FE\u0700-\u070D\u07F6-\u07F9\u07FE\u07FF\u0830-\u083E\u085E\u0888\u0964\u0965\u0970\u09F2\u09F3\u09FA\u09FB\u09FD\u0A76\u0AF0\u0AF1\u0B70\u0BF3-\u0BFA\u0C77\u0C7F\u0C84\u0D4F\u0D79\u0DF4\u0E3F\u0E4F\u0E5A\u0E5B\u0F01-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F85\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u104A-\u104F\u109E\u109F\u10FB\u1360-\u1368\u1390-\u1399\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DB\u1800-\u180A\u1940\u1944\u1945\u19DE-\u19FF\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2010-\u2027\u2030-\u205E\u207A-\u207E\u208A-\u208E\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2775\u2794-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3001-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u303F\u309B\u309C\u30A0\u30FB\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAA77-\uAA79\uAADE\uAADF\uAAF0\uAAF1\uAB5B\uAB6A\uAB6B\uABEB\uFB29\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD00-\uDD02\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDC77\uDC78\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEC8\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDD8E\uDD8F\uDEAD\uDED0-\uDED8\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3F]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFD5-\uDFF1\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3F\uDF44\uDF45]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F[\uDC9C\uDC9F]|\uD833[\uDC00-\uDCEF\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE8B]|\uD838[\uDD4F\uDEFF]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA])/,Hn=Fn(/link|precode-code|html/,"g").replace("link",B(/\[(?:[^\[\]`]|(`+)[^`]+\1(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/,{a:1})).replace("precode-",En?"(?]*?>/).getRegex(),Jn=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Kn=Fn(Jn,"u").replace(/punct/g,Ln).getRegex(),Wn=Fn(Jn,"u").replace(/punct/g,Vn).getRegex(),Qn="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Gn=Fn(Qn,"gu").replace(/notPunctSpace/g,qn).replace(/punctSpace/g,$n).replace(/punct/g,Ln).getRegex(),Yn=Fn(Qn,"gu").replace(/notPunctSpace/g,/(?:(?:[\0-\x08\x0E-\x1F0-9A-Za-z\x7F-\x9F\xAA\xAD\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376-\u037D\u037F-\u0383\u0386\u0388-\u03F5\u03F7-\u0481\u0483-\u0559\u0560-\u0588\u058B\u058C\u0590-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7-\u05F2\u05F5-\u0605\u0610-\u061A\u061C\u0620-\u0669\u066E-\u06D3\u06D5-\u06DD\u06DF-\u06E8\u06EA-\u06FC\u06FF\u070E-\u07F5\u07FA-\u07FD\u0800-\u082F\u083F-\u085D\u085F-\u0887\u0889-\u0963\u0966-\u096F\u0971-\u09F1\u09F4-\u09F9\u09FC\u09FE-\u0A75\u0A77-\u0AEF\u0AF2-\u0B6F\u0B71-\u0BF2\u0BFB-\u0C76\u0C78-\u0C7E\u0C80-\u0C83\u0C85-\u0D4E\u0D50-\u0D78\u0D7A-\u0DF3\u0DF5-\u0E3E\u0E40-\u0E4E\u0E50-\u0E59\u0E5C-\u0F00\u0F18\u0F19\u0F20-\u0F33\u0F35\u0F37\u0F39\u0F3E-\u0F84\u0F86-\u0FBD\u0FC6\u0FCD\u0FDB-\u1049\u1050-\u109D\u10A0-\u10FA\u10FC-\u135F\u1369-\u138F\u139A-\u13FF\u1401-\u166C\u166F-\u167F\u1681-\u169A\u169D-\u16EA\u16EE-\u1734\u1737-\u17D3\u17D7\u17DC-\u17FF\u180B-\u193F\u1941-\u1943\u1946-\u19DD\u1A00-\u1A1D\u1A20-\u1A9F\u1AA7\u1AAE-\u1B4D\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BFB\u1C00-\u1C3A\u1C40-\u1C7D\u1C80-\u1CBF\u1CC8-\u1CD2\u1CD4-\u1FBC\u1FBE\u1FC2-\u1FCC\u1FD0-\u1FDC\u1FE0-\u1FEC\u1FF0-\u1FFC\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u2079\u207F-\u2089\u208F-\u209F\u20C2-\u20FF\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u218C-\u218F\u242A-\u243F\u244B-\u249B\u24EA-\u24FF\u2776-\u2793\u2B74\u2B75\u2C00-\u2CE4\u2CEB-\u2CF8\u2CFD\u2D00-\u2D6F\u2D71-\u2DFF\u2E2F\u2E5E-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3040-\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u318F\u3192-\u3195\u31A0-\u31BF\u31E6-\u31EE\u31F0-\u31FF\u321F-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48F\uA4C7-\uA4FD\uA500-\uA60C\uA610-\uA672\uA674-\uA67D\uA67F-\uA6F1\uA6F8-\uA6FF\uA717-\uA71F\uA722-\uA788\uA78B-\uA827\uA82C-\uA835\uA83A-\uA873\uA878-\uA8CD\uA8D0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA95E\uA960-\uA9C0\uA9CE-\uA9DD\uA9E0-\uAA5B\uAA60-\uAA76\uAA7A-\uAADD\uAAE0-\uAAEF\uAAF2-\uAB5A\uAB5C-\uAB69\uAB6C-\uABEA\uABEC-\uD7FF\uE000-\uFB28\uFB2A-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDD0-\uFDFB\uFE00-\uFE0F\uFE1A-\uFE2F\uFE53\uFE67\uFE6C-\uFEFE\uFF00\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]|\uD800[\uDC00-\uDCFF\uDD03-\uDD36\uDD40-\uDD78\uDD8A\uDD8B\uDD8F\uDD9D-\uDD9F\uDDA1-\uDDCF\uDDFD-\uDF9E\uDFA0-\uDFCF\uDFD1-\uDFFF]|\uD801[\uDC00-\uDD6E\uDD70-\uDFFF]|\uD802[\uDC00-\uDC56\uDC58-\uDC76\uDC79-\uDD1E\uDD20-\uDD3E\uDD40-\uDE4F\uDE59-\uDE7E\uDE80-\uDEC7\uDEC9-\uDEEF\uDEF7-\uDF38\uDF40-\uDF98\uDF9D-\uDFFF]|\uD803[\uDC00-\uDD6D\uDD6F-\uDD8D\uDD90-\uDEAC\uDEAE-\uDECF\uDED9-\uDF54\uDF5A-\uDF85\uDF8A-\uDFFF]|\uD804[\uDC00-\uDC46\uDC4E-\uDCBA\uDCBD\uDCC2-\uDD3F\uDD44-\uDD73\uDD76-\uDDC4\uDDC9-\uDDCC\uDDCE-\uDDDA\uDDDC\uDDE0-\uDE37\uDE3E-\uDEA8\uDEAA-\uDFD3\uDFD6\uDFD9-\uDFFF]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5C\uDC5E-\uDCC5\uDCC7-\uDDC0\uDDD8-\uDE40\uDE44-\uDE5F\uDE6D-\uDEB8\uDEBA-\uDF3B\uDF40-\uDFFF]|\uD806[\uDC00-\uDC3A\uDC3C-\uDD43\uDD47-\uDDE1\uDDE3-\uDE3E\uDE47-\uDE99\uDE9D\uDEA3-\uDEFF\uDF0A-\uDFE0\uDFE2-\uDFFF]|\uD807[\uDC00-\uDC40\uDC46-\uDC6F\uDC72-\uDEF6\uDEF9-\uDF42\uDF50-\uDFD4\uDFF2-\uDFFE]|[\uD808\uD80A\uD80C-\uD819\uD81C-\uD82E\uD830-\uD832\uD837\uD83F-\uDBFF][\uDC00-\uDFFF]|\uD809[\uDC00-\uDC6F\uDC75-\uDFFF]|\uD80B[\uDC00-\uDFF0\uDFF3-\uDFFF]|\uD81A[\uDC00-\uDE6D\uDE70-\uDEF4\uDEF6-\uDF36\uDF40-\uDF43\uDF46-\uDFFF]|\uD81B[\uDC00-\uDD6C\uDD70-\uDE96\uDE9B-\uDFE1\uDFE3-\uDFFF]|\uD82F[\uDC00-\uDC9B\uDC9D\uDC9E\uDCA0-\uDFFF]|\uD833[\uDCF0-\uDCF9\uDCFD-\uDCFF\uDEB4-\uDEB9\uDED1-\uDEDF\uDEF1-\uDF4F\uDFC4-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDD65-\uDD69\uDD6D-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDDEB-\uDDFF\uDE42-\uDE44\uDE46-\uDEFF\uDF57-\uDFFF]|\uD835[\uDC00-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE8C-\uDFFF]|\uD838[\uDC00-\uDD4E\uDD50-\uDEFE\uDF00-\uDFFF]|\uD839[\uDC00-\uDDFE\uDE00-\uDFFF]|\uD83A[\uDC00-\uDD5D\uDD60-\uDFFF]|\uD83B[\uDC00-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDD2D\uDD2F-\uDEEF\uDEF2-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDD0C\uDDAE-\uDDE5\uDE03-\uDE0F\uDE3C-\uDE3F\uDE49-\uDE4F\uDE52-\uDE5F\uDE66-\uDEFF]|\uD83D[\uDED9-\uDEDB\uDEED-\uDEEF\uDEFD-\uDEFF\uDFDA-\uDFDF\uDFEC-\uDFEF\uDFF1-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE\uDCAF\uDCBC-\uDCBF\uDCC2-\uDCCF\uDCD9-\uDCFF\uDE58-\uDE5F\uDE6E\uDE6F\uDE7D-\uDE7F\uDE8B-\uDE8D\uDEC7\uDEC9-\uDECC\uDEDD\uDEDE\uDEEB-\uDEEE\uDEF9-\uDEFF\uDF93\uDFF0-\uDFF9\uDFFB-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])|~)/).replace(/punctSpace/g,/(?!~)(?:[\t-\r -\/:-@\[-`\{-~\xA0-\xA9\xAB\xAC\xAE-\xB1\xB4\xB6-\xB8\xBB\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u037E\u0384\u0385\u0387\u03F6\u0482\u055A-\u055F\u0589\u058A\u058D-\u058F\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0606-\u060F\u061B\u061D-\u061F\u066A-\u066D\u06D4\u06DE\u06E9\u06FD\u06FE\u0700-\u070D\u07F6-\u07F9\u07FE\u07FF\u0830-\u083E\u085E\u0888\u0964\u0965\u0970\u09F2\u09F3\u09FA\u09FB\u09FD\u0A76\u0AF0\u0AF1\u0B70\u0BF3-\u0BFA\u0C77\u0C7F\u0C84\u0D4F\u0D79\u0DF4\u0E3F\u0E4F\u0E5A\u0E5B\u0F01-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F85\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u104A-\u104F\u109E\u109F\u10FB\u1360-\u1368\u1390-\u1399\u1400\u166D\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DB\u1800-\u180A\u1940\u1944\u1945\u19DE-\u19FF\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2000-\u200A\u2010-\u2029\u202F-\u205F\u207A-\u207E\u208A-\u208E\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2775\u2794-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u303F\u309B\u309C\u30A0\u30FB\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAA77-\uAA79\uAADE\uAADF\uAAF0\uAAF1\uAB5B\uAB6A\uAB6B\uABEB\uFB29\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFEFF\uFF01-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD00-\uDD02\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDC77\uDC78\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEC8\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDD8E\uDD8F\uDEAD\uDED0-\uDED8\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3F]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFD5-\uDFF1\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3F\uDF44\uDF45]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F[\uDC9C\uDC9F]|\uD833[\uDC00-\uDCEF\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE8B]|\uD838[\uDD4F\uDEFF]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA])/).replace(/punct/g,Vn).getRegex(),Xn=Fn("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,qn).replace(/punctSpace/g,$n).replace(/punct/g,Ln).getRegex(),er=Fn(/\\(punct)/,"gu").replace(/punct/g,Ln).getRegex(),tr=Fn(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("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])?)+(?![-_])/).getRegex(),nr=Fn(Tn).replace("(?:--\x3e|$)","--\x3e").getRegex(),rr=Fn("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",nr).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ur=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,ar=Fn(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ur).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ir=Fn(/^!?\[(label)\]\[(ref)\]/).replace("label",ur).replace("ref",xn).getRegex(),or=Fn(/^!?\[(ref)\](?:\[\])?/).replace("ref",xn).getRegex(),sr=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,cr={_backpedal:gn,anyPunctuation:er,autolink:tr,blockSkip:Hn,br:Zn,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:gn,emStrongLDelim:Kn,emStrongRDelimAst:Gn,emStrongRDelimUnd:Xn,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:ar,nolink:or,punctuation:Un,reflink:ir,reflinkSearch:Fn("reflink|nolink(?!\\()","g").replace("reflink",ir).replace("nolink",or).getRegex(),tag:rr,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},mr=function(e){return vr[e]};function Dr(e,t){if(t){if(bn.escapeTest.test(e))return e.replace(bn.escapeReplace,mr)}else if(bn.escapeTestNoEncode.test(e))return e.replace(bn.escapeReplaceNoEncode,mr);return e}function yr(e){try{e=encodeURI(e).replace(bn.percentDecode,"%")}catch(e){return null}return e}function gr(e,t){var n,r=e.replace(bn.findPipe,function(e,t,n){for(var r=!1,u=t;--u>=0&&"\\"===n[u];)r=!r;return r?"|":" |"}).split(bn.splitPipe),u=0;if(r[0].trim()||r.shift(),r.length>0&&!(null!==(n=r.at(-1))&&void 0!==n&&n.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length0)return{type:"space",raw:t[0]}}},{key:"code",value:function(e){var t=this.rules.block.code.exec(e);if(t){var n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Fr(n,"\n")}}}},{key:"fences",value:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t,n){var r=e.match(n.other.indentCodeCompensation);if(null===r)return t;var u=r[1];return t.split("\n").map(function(e){var t=e.match(n.other.beginningSpace);return null===t?e:A(t,1)[0].length>=u.length?e.slice(u.length):e}).join("\n")}(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}},{key:"heading",value:function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(this.rules.other.endingHash.test(n)){var r=Fr(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}},{key:"hr",value:function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Fr(t[0],"\n")}}},{key:"blockquote",value:function(e){var t=this.rules.block.blockquote.exec(e);if(t){for(var n=Fr(t[0],"\n").split("\n"),r="",u="",a=[];n.length>0;){var i=!1,o=[],s=void 0;for(s=0;s1,a={type:"list",raw:"",ordered:u,start:u?+r.slice(0,-1):"",loose:!1,items:[]};r=u?"\\d{1,9}\\".concat(r.slice(-1)):"\\".concat(r),this.options.pedantic&&(r=u?r:"[*+-]");for(var i=this.rules.other.listItemRegex(r),o=!1;e;){var s=!1,c="",l="";if(!(n=i.exec(e))||this.rules.block.hr.test(e))break;c=n[0],e=e.substring(c.length);var d=n[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,function(e){return" ".repeat(3*e.length)}),f=e.split("\n",1)[0],p=!d.trim(),h=0;if(this.options.pedantic?(h=2,l=d.trimStart()):p?h=n[1].length+1:(h=(h=n[2].search(this.rules.other.nonSpaceChar))>4?1:h,l=d.slice(h),h+=n[1].length),p&&this.rules.other.blankLine.test(f)&&(c+=f+"\n",e=e.substring(f.length+1),s=!0),!s)for(var v=this.rules.other.nextBulletRegex(h),m=this.rules.other.hrRegex(h),D=this.rules.other.fencesBeginRegex(h),y=this.rules.other.headingBeginRegex(h),g=this.rules.other.htmlBeginRegex(h);e;){var F=e.split("\n",1)[0],E=void 0;if(f=F,E=this.options.pedantic?f=f.replace(this.rules.other.listReplaceNesting," "):f.replace(this.rules.other.tabCharGlobal," "),D.test(f)||y.test(f)||g.test(f)||v.test(f)||m.test(f))break;if(E.search(this.rules.other.nonSpaceChar)>=h||!f.trim())l+="\n"+E.slice(h);else{if(p||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||D.test(d)||y.test(d)||m.test(d))break;l+="\n"+f}!p&&!f.trim()&&(p=!0),c+=F+"\n",e=e.substring(F.length+1),d=E.slice(h)}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(o=!0));var b=null,C=void 0;this.options.gfm&&(b=this.rules.other.listIsTask.exec(l))&&(C="[ ] "!==b[0],l=l.replace(this.rules.other.listReplaceTask,"")),a.items.push({type:"list_item",raw:c,task:!!b,checked:C,loose:!1,text:l,tokens:[]}),a.raw+=c}var A=a.items.at(-1);if(!A)return;A.raw=A.raw.trimEnd(),A.text=A.text.trimEnd(),a.raw=a.raw.trimEnd();for(var k=0;k0&&w.some(function(e){return t.rules.other.anyLine.test(e.raw)});a.loose=_}if(a.loose)for(var S=0;S0?-2:-1}(t[2],"()");if(-2===u)return;if(u>-1){var a=(0===t[0].indexOf("!")?5:4)+t[1].length+u;t[2]=t[2].substring(0,u),t[0]=t[0].substring(0,a).trim(),t[3]=""}}var i=t[2],o="";if(this.options.pedantic){var s=this.rules.other.pedanticHrefTitle.exec(i);s&&(i=s[1],o=s[3])}else o=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(i=this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?i.slice(1):i.slice(1,-1)),Er(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}},{key:"reflink",value:function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!r){var u=n[0].charAt(0);return{type:"text",raw:u,text:u}}return Er(n,r,n[0],this.lexer,this.rules)}}},{key:"emStrong",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!r[1]&&!r[2]||!n||this.rules.inline.punctuation.exec(n))){var u,a,i=k(r[0]).length-1,o=i,s=0,c="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+i);null!=(r=c.exec(t));)if(u=r[1]||r[2]||r[3]||r[4]||r[5]||r[6])if(a=k(u).length,r[3]||r[4])o+=a;else if(!((r[5]||r[6])&&i%3)||(i+a)%3){if(!((o-=a)>0)){a=Math.min(a,a+o+s);var l=k(r[0])[0].length,d=e.slice(0,i+r.index+l+a);if(Math.min(i,a)%2){var f=d.slice(1,-1);return{type:"em",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}var p=d.slice(2,-2);return{type:"strong",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}}else s+=a}}},{key:"codespan",value:function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),u=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&u&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}},{key:"br",value:function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}},{key:"del",value:function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}},{key:"autolink",value:function(e){var t,n,r=this.rules.inline.autolink.exec(e);if(r)return n="@"===r[2]?"mailto:"+(t=r[1]):t=r[1],{type:"link",raw:r[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}},{key:"url",value:function(e){var t;if(t=this.rules.inline.url.exec(e)){var n,r;if("@"===t[2])r="mailto:"+(n=t[0]);else{var u;do{var a,i;u=t[0],t[0]=null!==(a=null===(i=this.rules.inline._backpedal.exec(t[0]))||void 0===i?void 0:i[0])&&void 0!==a?a:""}while(u!==t[0]);n=t[0],r="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}},{key:"inlineText",value:function(e){var t=this.rules.inline.text.exec(e);if(t){var n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}}]),Cr=function(){function e(t){s(this,e),p(this,"tokens",void 0),p(this,"options",void 0),p(this,"state",void 0),p(this,"tokenizer",void 0),p(this,"inlineQueue",void 0),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Dn,this.options.tokenizer=this.options.tokenizer||new br,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var n={other:bn,block:pr.normal,inline:hr.normal};this.options.pedantic?(n.block=pr.pedantic,n.inline=hr.pedantic):this.options.gfm&&(n.block=pr.gfm,this.options.breaks?n.inline=hr.breaks:n.inline=hr.gfm),this.tokenizer.rules=n}return d(e,[{key:"lex",value:function(e){e=e.replace(bn.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:[],u=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=function(){var t,a,i;if(null!==(t=n.options.extensions)&&void 0!==t&&null!==(t=t.block)&&void 0!==t&&t.some(function(t){return!!(i=t.call({lexer:n},e,r))&&(e=e.substring(i.raw.length),r.push(i),!0)}))return 0;if(i=n.tokenizer.space(e)){e=e.substring(i.raw.length);var o=r.at(-1);return 1===i.raw.length&&void 0!==o?o.raw+="\n":r.push(i),0}if(i=n.tokenizer.code(e)){e=e.substring(i.raw.length);var s=r.at(-1);return"paragraph"===(null==s?void 0:s.type)||"text"===(null==s?void 0:s.type)?(s.raw+=(s.raw.endsWith("\n")?"":"\n")+i.raw,s.text+="\n"+i.text,n.inlineQueue.at(-1).src=s.text):r.push(i),0}if(i=n.tokenizer.fences(e))return e=e.substring(i.raw.length),r.push(i),0;if(i=n.tokenizer.heading(e))return e=e.substring(i.raw.length),r.push(i),0;if(i=n.tokenizer.hr(e))return e=e.substring(i.raw.length),r.push(i),0;if(i=n.tokenizer.blockquote(e))return e=e.substring(i.raw.length),r.push(i),0;if(i=n.tokenizer.list(e))return e=e.substring(i.raw.length),r.push(i),0;if(i=n.tokenizer.html(e))return e=e.substring(i.raw.length),r.push(i),0;if(i=n.tokenizer.def(e)){e=e.substring(i.raw.length);var c=r.at(-1);return"paragraph"===(null==c?void 0:c.type)||"text"===(null==c?void 0:c.type)?(c.raw+=(c.raw.endsWith("\n")?"":"\n")+i.raw,c.text+="\n"+i.raw,n.inlineQueue.at(-1).src=c.text):n.tokens.links[i.tag]||(n.tokens.links[i.tag]={href:i.href,title:i.title},r.push(i)),0}if(i=n.tokenizer.table(e))return e=e.substring(i.raw.length),r.push(i),0;if(i=n.tokenizer.lheading(e))return e=e.substring(i.raw.length),r.push(i),0;var l=e;if(null!==(a=n.options.extensions)&&void 0!==a&&a.startBlock){var d,f=1/0,p=e.slice(1);n.options.extensions.startBlock.forEach(function(e){"number"==typeof(d=e.call({lexer:n},p))&&d>=0&&(f=Math.min(f,d))}),f<1/0&&f>=0&&(l=e.substring(0,f+1))}if(n.state.top&&(i=n.tokenizer.paragraph(l))){var h=r.at(-1);return u&&"paragraph"===(null==h?void 0:h.type)?(h.raw+=(h.raw.endsWith("\n")?"":"\n")+i.raw,h.text+="\n"+i.text,n.inlineQueue.pop(),n.inlineQueue.at(-1).src=h.text):r.push(i),u=l.length!==e.length,e=e.substring(i.raw.length),0}if(i=n.tokenizer.text(e)){e=e.substring(i.raw.length);var v=r.at(-1);return"text"===(null==v?void 0:v.type)?(v.raw+=(v.raw.endsWith("\n")?"":"\n")+i.raw,v.text+="\n"+i.text,n.inlineQueue.pop(),n.inlineQueue.at(-1).src=v.text):r.push(i),0}if(e){var m="Infinite loop on byte: "+e.charCodeAt(0);if(n.options.silent)return console.error(m),1;throw new Error(m)}};for(this.options.pedantic&&(e=e.replace(bn.tabCharGlobal," ").replace(bn.spaceLine,""));e&&(0===(t=a())||1!==t););return this.state.top=!0,r}},{key:"inline",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}},{key:"inlineTokens",value:function(e){var t,n,r,u=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=e,o=null;if(this.tokens.links){var s=Object.keys(this.tokens.links);if(s.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(i));)s.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(i));)i=i.slice(0,o.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(i));)r=o[2]?o[2].length:0,i=i.slice(0,o.index+r)+"["+"a".repeat(o[0].length-r-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=null!==(t=null===(n=this.options.hooks)||void 0===n||null===(n=n.emStrongMask)||void 0===n?void 0:n.call({lexer:this},i))&&void 0!==t?t:i;for(var c,l=!1,d="",f=function(){var t,n,r;if(l||(d=""),l=!1,null!==(t=u.options.extensions)&&void 0!==t&&null!==(t=t.inline)&&void 0!==t&&t.some(function(t){return!!(r=t.call({lexer:u},e,a))&&(e=e.substring(r.raw.length),a.push(r),!0)}))return 0;if(r=u.tokenizer.escape(e))return e=e.substring(r.raw.length),a.push(r),0;if(r=u.tokenizer.tag(e))return e=e.substring(r.raw.length),a.push(r),0;if(r=u.tokenizer.link(e))return e=e.substring(r.raw.length),a.push(r),0;if(r=u.tokenizer.reflink(e,u.tokens.links)){e=e.substring(r.raw.length);var o=a.at(-1);return"text"===r.type&&"text"===(null==o?void 0:o.type)?(o.raw+=r.raw,o.text+=r.text):a.push(r),0}if(r=u.tokenizer.emStrong(e,i,d))return e=e.substring(r.raw.length),a.push(r),0;if(r=u.tokenizer.codespan(e))return e=e.substring(r.raw.length),a.push(r),0;if(r=u.tokenizer.br(e))return e=e.substring(r.raw.length),a.push(r),0;if(r=u.tokenizer.del(e))return e=e.substring(r.raw.length),a.push(r),0;if(r=u.tokenizer.autolink(e))return e=e.substring(r.raw.length),a.push(r),0;if(!u.state.inLink&&(r=u.tokenizer.url(e)))return e=e.substring(r.raw.length),a.push(r),0;var s=e;if(null!==(n=u.options.extensions)&&void 0!==n&&n.startInline){var c,f=1/0,p=e.slice(1);u.options.extensions.startInline.forEach(function(e){"number"==typeof(c=e.call({lexer:u},p))&&c>=0&&(f=Math.min(f,c))}),f<1/0&&f>=0&&(s=e.substring(0,f+1))}if(r=u.tokenizer.inlineText(s)){e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(d=r.raw.slice(-1)),l=!0;var h=a.at(-1);return"text"===(null==h?void 0:h.type)?(h.raw+=r.raw,h.text+=r.text):a.push(r),0}if(e){var v="Infinite loop on byte: "+e.charCodeAt(0);if(u.options.silent)return console.error(v),1;throw new Error(v)}};e&&(0===(c=f())||1!==c););return a}}],[{key:"rules",get:function(){return{block:pr,inline:hr}}},{key:"lex",value:function(t,n){return new e(n).lex(t)}},{key:"lexInline",value:function(t,n){return new e(n).inlineTokens(t)}}])}(),Ar=d(function e(t){s(this,e),p(this,"options",void 0),p(this,"parser",void 0),this.options=t||Dn},[{key:"space",value:function(e){return""}},{key:"code",value:function(e){var t,n=e.text,r=e.lang,u=e.escaped,a=null===(t=(r||"").match(bn.notSpaceStart))||void 0===t?void 0:t[0],i=n.replace(bn.endingNewline,"")+"\n";return a?'
'+(u?i:Dr(i,!0))+"
\n":"
"+(u?i:Dr(i,!0))+"
\n"}},{key:"blockquote",value:function(e){var t=e.tokens;return"
\n".concat(this.parser.parse(t),"
\n")}},{key:"html",value:function(e){return e.text}},{key:"def",value:function(e){return""}},{key:"heading",value:function(e){var t=e.tokens,n=e.depth;return"").concat(this.parser.parseInline(t),"\n")}},{key:"hr",value:function(e){return"
\n"}},{key:"list",value:function(e){for(var t=e.ordered,n=e.start,r="",u=0;u\n"+r+"\n"}},{key:"listitem",value:function(e){var t="";if(e.task){var n,r=this.checkbox({checked:!!e.checked});e.loose?"paragraph"===(null===(n=e.tokens[0])||void 0===n?void 0:n.type)?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=r+" "+Dr(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):t+=r+" "}return t+=this.parser.parse(e.tokens,!!e.loose),"
  • ".concat(t,"
  • \n")}},{key:"checkbox",value:function(e){return"'}},{key:"paragraph",value:function(e){var t=e.tokens;return"

    ".concat(this.parser.parseInline(t),"

    \n")}},{key:"table",value:function(e){for(var t="",n="",r=0;r")),"\n\n"+t+"\n"+u+"
    \n"}},{key:"tablerow",value:function(e){var t=e.text;return"\n".concat(t,"\n")}},{key:"tablecell",value:function(e){var t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?"<".concat(n,' align="').concat(e.align,'">'):"<".concat(n,">"))+t+"\n")}},{key:"strong",value:function(e){var t=e.tokens;return"".concat(this.parser.parseInline(t),"")}},{key:"em",value:function(e){var t=e.tokens;return"".concat(this.parser.parseInline(t),"")}},{key:"codespan",value:function(e){var t=e.text;return"".concat(Dr(t,!0),"")}},{key:"br",value:function(e){return"
    "}},{key:"del",value:function(e){var t=e.tokens;return"".concat(this.parser.parseInline(t),"")}},{key:"link",value:function(e){var t=e.href,n=e.title,r=e.tokens,u=this.parser.parseInline(r),a=yr(t);if(null===a)return u;var i='
    "+u+""}},{key:"image",value:function(e){var t=e.href,n=e.title,r=e.text,u=e.tokens;u&&(r=this.parser.parseInline(u,this.parser.textRenderer));var a=yr(t);if(null===a)return Dr(r);var i='').concat(r,'"}},{key:"text",value:function(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Dr(e.text)}}]),kr=d(function e(){s(this,e)},[{key:"strong",value:function(e){return e.text}},{key:"em",value:function(e){return e.text}},{key:"codespan",value:function(e){return e.text}},{key:"del",value:function(e){return e.text}},{key:"html",value:function(e){return e.text}},{key:"text",value:function(e){return e.text}},{key:"link",value:function(e){return""+e.text}},{key:"image",value:function(e){return""+e.text}},{key:"br",value:function(){return""}}]),wr=function(){function e(t){s(this,e),p(this,"options",void 0),p(this,"renderer",void 0),p(this,"textRenderer",void 0),this.options=t||Dn,this.options.renderer=this.options.renderer||new Ar,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new kr}return d(e,[{key:"parse",value:function(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="",r=0;r1&&void 0!==arguments[1]?arguments[1]:this.renderer,n="",r=0;r"u"||null===n)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof n)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=e),a.async)return i(E().m(function r(){var u,i,o,s,c,l,d,f,p,h,v;return E().w(function(r){for(;;)switch(r.n){case 0:if(!a.hooks){r.n=2;break}return r.n=1,a.hooks.preprocess(n);case 1:c=r.v,r.n=3;break;case 2:c=n;case 3:if(u=c,!a.hooks){r.n=5;break}return r.n=4,a.hooks.provideLexer();case 4:l=r.v,r.n=6;break;case 5:l=e?Cr.lex:Cr.lexInline;case 6:return d=l,r.n=7,d(u,a);case 7:if(i=r.v,!a.hooks){r.n=9;break}return r.n=8,a.hooks.processAllTokens(i);case 8:f=r.v,r.n=10;break;case 9:f=i;case 10:if(o=f,!a.walkTokens){r.n=11;break}return r.n=11,Promise.all(t.walkTokens(o,a.walkTokens));case 11:if(!a.hooks){r.n=13;break}return r.n=12,a.hooks.provideParser();case 12:p=r.v,r.n=14;break;case 13:p=e?wr.parse:wr.parseInline;case 14:return h=p,r.n=15,h(o,a);case 15:if(s=r.v,!a.hooks){r.n=17;break}return r.n=16,a.hooks.postprocess(s);case 16:v=r.v,r.n=18;break;case 17:v=s;case 18:return r.a(2,v)}},r)}))().catch(o);try{a.hooks&&(n=a.hooks.preprocess(n));var s=(a.hooks?a.hooks.provideLexer():e?Cr.lex:Cr.lexInline)(n,a);a.hooks&&(s=a.hooks.processAllTokens(s)),a.walkTokens&&t.walkTokens(s,a.walkTokens);var c=(a.hooks?a.hooks.provideParser():e?wr.parse:wr.parseInline)(s,a);return a.hooks&&(c=a.hooks.postprocess(c)),c}catch(e){return o(e)}}}},{key:"onError",value:function(e,t){return function(n){if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){var r="

    An error occurred:

    "+Dr(n.message+"",!0)+"
    ";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}}]),xr=new Sr;function Br(e,t){return xr.parse(e,t)}function Ir(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}Br.options=Br.setOptions=function(e){return xr.setOptions(e),Br.defaults=xr.defaults,yn(Br.defaults),Br},Br.getDefaults=function(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},Br.defaults=Dn,Br.use=function(){return xr.use.apply(xr,arguments),Br.defaults=xr.defaults,yn(Br.defaults),Br},Br.walkTokens=function(e,t){return xr.walkTokens(e,t)},Br.parseInline=xr.parseInline,Br.Parser=wr,Br.parser=wr.parse,Br.Renderer=Ar,Br.TextRenderer=kr,Br.Lexer=Cr,Br.lexer=Cr.lex,Br.Tokenizer=br,Br.Hooks=_r,Br.parse=Br,Br.options,Br.setOptions,Br.use,Br.walkTokens,Br.parseInline,wr.parse,Cr.lex;var Or=new Br.Renderer;Or.code=function(e){var t=e.text,n=e.lang,r=void 0===n?"":n,u=e.escaped,a=r?"language-".concat(r):"",i=u?t:Ir(t),o=encodeURIComponent(t);return'\n
    \n \n
    ').concat(i,"
    \n
    \n ")},Or.link=function(e){var t=e.href,n=e.title,r=e.text,u=n?' title="'.concat(Ir(n),'"'):"",a=t?Ir(t):"",i=Ir(r);return'').concat(i,"")};var Tr=(0,r.memo)(function(e){var t=e.content,n=e.copyButtonText,u=e.copyButtonCopiedText,a=e.isStreaming,i=(0,r.useMemo)(function(){return Br.parse(t,{gfm:!0,breaks:!0,renderer:Or})},[t]),o=(0,r.useRef)(null);return(0,r.useEffect)(function(){var e=o.current;if(e)return Array.from(e.querySelectorAll(".DocSearch-CodeSnippet-CopyButton")).forEach(function(e){var t=e.querySelector(".DocSearch-CodeSnippet-CopyButton-Label");t&&(t.textContent=n),e.classList.remove("DocSearch-CodeSnippet-CopyButton--copied")}),e.addEventListener("click",t),function(){e.removeEventListener("click",t)};function t(e){var t,r=e.target.closest(".DocSearch-CodeSnippet-CopyButton");if(r){var a=null!==(t=r.getAttribute("data-code"))&&void 0!==t?t:"";navigator.clipboard.writeText(decodeURIComponent(a)).catch(function(){});var i=r.querySelector(".DocSearch-CodeSnippet-CopyButton-Label");if(i){r.classList.add("DocSearch-CodeSnippet-CopyButton--copied");var o=n;i.textContent=u,setTimeout(function(){r.classList.remove("DocSearch-CodeSnippet-CopyButton--copied"),i.textContent=o},1500)}}}},[i,n,u]),r.createElement("div",{ref:o,className:"DocSearch-Markdown-Content ".concat(a?"DocSearch-Markdown-Content--streaming":""),dangerouslySetInnerHTML:{__html:i}})});function Pr(e){var t=e.part,n=e.translations,u=e.onSearchQueryClick,a=n.searchingText,i=n.preToolCallText,o=n.toolCallResultText;switch(t.state){case"input-streaming":return r.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent-Tool Tool--PartialCall shimmer"},r.createElement(Wt,{className:"DocSearch-AskAiScreen-SmallerLoadingIcon"}),r.createElement("span",null,a));case"input-available":return r.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent-Tool Tool--Call shimmer"},r.createElement(Wt,{className:"DocSearch-AskAiScreen-SmallerLoadingIcon"}),r.createElement("span",null,i," ",'"'.concat(t.input.query||"",'" ...')));case"output-available":var s,c,l="tool-searchIndex"===t.type?t.output.query:t.input.query,d=null!==(s=null===(c=t.output.hits)||void 0===c?void 0:c.length)&&void 0!==s?s:0;return r.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent-Tool Tool--Result"},r.createElement(Xt,null),r.createElement("span",null,o," ",u?r.createElement("span",{role:"button",tabIndex:0,className:"DocSearch-AskAiScreen-MessageContent-Tool-Query",onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),u(l||""))},onClick:function(){return u(l||"")}}," ",'"',l||"",'"'):r.createElement("span",{className:"DocSearch-AskAiScreen-MessageContent-Tool-Query"},' "',l||"",'"')," ","found ",d," results"));default:return null}}Tr.displayName="MemoizedMarkdown";var jr=new Set(["AI-203","AI-205","AI-224","AI-225"]);function Nr(e,t){for(var n=0,r=Object.entries(e);n]*>/g,"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}var $r=function(e,t){var n=t[0].parts.find(function(e){return"text"===e.type}),r=null!=n&&n.text?Lr(n.text):"";return{query:e,objectID:r,messages:t,type:"askAI",anchor:"stored",content:null,hierarchy:{lvl0:"askAI",lvl1:r,lvl2:null,lvl3:null,lvl4:null,lvl5:null,lvl6:null},url:"",url_without_anchor:""}},qr=function(e){return null==e?void 0:e.parts.find(function(e){return"text"===e.type})};function Ur(e){return!!e&&((t=e.toLowerCase()).includes("ai-217")||/thread\s+depth/.test(t));var t}function Vr(e){var t;return!!e&&function(e){if(Ur(e))return!0;try{var t,n=JSON.parse(e),r=null!==(t=n.code)&&void 0!==t?t:n.errorCode;return"string"==typeof r&&"AI-217"===r.toUpperCase()||Ur("string"==typeof n.message?n.message:"")}catch(e){return!1}}(null!==(t=e.message)&&void 0!==t?t:"")}function Hr(e,t){return!!e&&(!!Vr(e)||!!t&&function(e){return Zr(e).blocking}(e))}function Jr(e){var t;if(!e)return!1;var n=null!==(t=e.message)&&void 0!==t?t:"";if(/TokenOutputLimitError/i.test(n))return!0;if(/could not complete response due to token output limits/i.test(n))return!0;try{var r=JSON.parse(n);if("string"==typeof r.type&&/^TokenOutputLimitError$/i.test(r.type.trim()))return!0;if("string"==typeof r.error&&/token output limits/i.test(r.error))return!0}catch(e){}return!1}function Kr(e){var t=e.trim();if(t)for(var n=0;n<10;){n+=1;try{var r=JSON.parse(t);if("string"!=typeof r){if(r&&"object"===_(r)&&!Array.isArray(r)){var u=r,a=Nr(u,"message");return a||(Nr(u,"error")||void 0)}return}var i=r.trim();if(!i)return;t=i}catch(e){if(!/\\"/.test(t)){var o=/"message"\s*:\s*"((?:[^"\\]|\\.)*)"/.exec(t);if(null!=o&&o[1])return o[1].replace(/\\"/g,'"').replace(/\\\\/g,"\\").trim();var s=/"error"\s*:\s*"((?:[^"\\]|\\.)*)"/.exec(t);return null!=s&&s[1]?s[1].replace(/\\"/g,'"').replace(/\\\\/g,"\\").trim():void 0}t=t.replace(/\\"/g,'"').replace(/\\\\/g,"\\").trim()}}}function Wr(e){var t;if(e){var n=null!==(t=e.message)&&void 0!==t?t:"",r=Kr(n);if(r)return r;var u=n.trim().replace(/\s*\(AI-\d{3}\)\s*$/i,"").trim();return""!==u?u:void 0}}var Qr=["translations"];function Gr(e){var t=e.disclaimerText;return r.createElement("p",{className:"DocSearch-AskAiScreen-Disclaimer"},t)}function Yr(e){var t,n,u,a=e.exchange,i=e.askAiError,o=e.isLastExchange,s=e.loadingStatus,c=e.onSearchQueryClick,l=e.translations,d=e.conversations,p=e.onFeedback,h=e.agentStudio,v=a.userMessage,m=a.assistantMessage,D=l.stoppedStreamingText,y=void 0===D?"You stopped this response":D,g=l.errorTitleText,F=void 0===g?"Chat error":g,E=l.preToolCallText,b=void 0===E?"Searching...":E,C=l.afterToolCallText,A=void 0===C?"Searched for":C,k=l.duringToolCallText,w=void 0===k?"Searching...":k,_=Hr(i,Boolean(h)),S=(0,r.useMemo)(function(){return qr(m)},[m]),x=(0,r.useMemo)(function(){return qr(v)},[v]),B=r.useMemo(function(){return e=m,t=[],n=new Set,e?(e.parts.forEach(function(e){if("text"===e.type&&0!==e.text.length){var r,u=e.text.replace(/```[\s\S]*?```/g,"").replace(/`[^`]*`/g,""),a=f(u.matchAll(/\[([^\]]*)\]\(([^)]+)\)/g));try{for(a.s();!(r=a.n()).done;){var i=r.value,o=i[1].trim(),s=i[2];n.has(s)||(n.add(s),t.push({url:s,title:o||void 0}))}}catch(e){a.e(e)}finally{a.f()}var c,l=f(u.matchAll(/(?"{}|\\^`[\]]+/g));try{for(l.s();!(c=l.n()).done;){var d=c.value[0].replace(/[.,;:!?]+$/,"");n.has(d)||(n.add(d),t.push({url:d}))}}catch(e){l.e(e)}finally{l.f()}}}),t):[];var e,t,n},[m]),I=r.useMemo(function(){return function(e){for(var t=[],n=0;n0&&u.push(c),a++}u.length>1?t.push({type:"aggregated-tool-call",queries:u}):1===u.length&&t.push(r),n=a-1}else t.push(r)}return t}((null==m?void 0:m.parts)||[])},[m]),O=(null===(t=v.metadata)||void 0===t?void 0:t.stopped)||(null==m||null===(n=m.metadata)||void 0===n?void 0:n.stopped),T=!O&&(!o||o&&"ready"===s&&Boolean(m)),P=["submitted","streaming"].includes(s)&&o&&!I.some(function(e){return"step-start"!==e.type}),j=h?(null==m?void 0:m.id)||a.id:(null==v?void 0:v.id)||a.id;return r.createElement("div",{className:"DocSearch-AskAiScreen-Response-Container"},r.createElement("div",{className:"DocSearch-AskAiScreen-Response"},r.createElement("div",{className:"DocSearch-AskAiScreen-Message DocSearch-AskAiScreen-Message--user"},r.createElement("p",{className:"DocSearch-AskAiScreen-Query"},null!==(u=null==x?void 0:x.text)&&void 0!==u?u:"")),r.createElement("div",{className:"DocSearch-AskAiScreen-Message DocSearch-AskAiScreen-Message--assistant"},r.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent"},"error"===s&&i&&o&&!_&&r.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent DocSearch-AskAiScreen-Error"},r.createElement(en,null),r.createElement("div",{className:"DocSearch-AskAiScreen-Error-Content"},r.createElement("h4",{className:"DocSearch-AskAiScreen-Error-Title"},F),r.createElement(Tr,{content:i.message,copyButtonText:"",copyButtonCopiedText:"",isStreaming:!1}))),P&&r.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent-Reasoning"},r.createElement("span",{className:"shimmer"},l.thinkingText||"Thinking...")),I.map(function(e,t){var n=t;return"string"==typeof e?r.createElement(Tr,{key:n,content:e,copyButtonText:l.copyButtonText||"Copy",copyButtonCopiedText:l.copyButtonCopiedText||"Copied!",isStreaming:"streaming"===s}):"aggregated-tool-call"===e.type?r.createElement(mn,{key:n,queries:e.queries,translations:l,onSearchQueryClick:c}):"reasoning"===e.type&&"streaming"===e.state?r.createElement("div",{key:n,className:"DocSearch-AskAiScreen-MessageContent-Reasoning shimmer"},r.createElement(Wt,{className:"DocSearch-AskAiScreen-SmallerLoadingIcon"}),r.createElement("span",{className:"shimmer"},"Reasoning...")):"text"===e.type?r.createElement(Tr,{key:n,content:e.text,copyButtonText:l.copyButtonText||"Copy",copyButtonCopiedText:l.copyButtonCopiedText||"Copied!",isStreaming:"streaming"===e.state}):"tool-searchIndex"===e.type||"tool-algolia_search_index"===e.type?r.createElement(Pr,{key:n,translations:{preToolCallText:b,searchingText:w,toolCallResultText:A},part:e,onSearchQueryClick:c}):null})),O&&r.createElement("p",{className:"DocSearck-AskAiScreen-MessageContent-Stopped"},y)),r.createElement("div",{className:"DocSearch-AskAiScreen-Answer-Footer"},r.createElement(Xr,{id:j,showActions:T,latestAssistantMessageContent:(null==S?void 0:S.text)||null,translations:l,conversations:d,onFeedback:p}))),B.length>0?r.createElement(eu,{urlsToDisplay:B,relatedSourcesText:l.relatedSourcesText}):null)}function Xr(e){var t,n=e.id,u=e.showActions,a=e.latestAssistantMessageContent,o=e.translations,s=e.conversations,c=e.onFeedback,l=r.useMemo(function(){var e,t,r=null===(e=s.getOne)||void 0===e?void 0:e.call(s,n);return null!==(t=null==r?void 0:r.feedback)&&void 0!==t?t:null},[s,n]),d=A(r.useState(l),2),f=d[0],p=d[1],h=A(r.useState(!1),2),v=h[0],m=h[1],D=A(r.useState(null),2),y=D[0],g=D[1],F=(t=i(E().m(function e(t){var r;return E().w(function(e){for(;;)switch(e.p=e.n){case 0:if(!v){e.n=1;break}return e.a(2);case 1:return g(null),m(!0),e.p=2,e.n=3,null==c?void 0:c(n,"like"===t?1:0);case 3:p(t),e.n=5;break;case 4:e.p=4,r=e.v,g(r);case 5:return e.p=5,m(!1),e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])})),function(e){return t.apply(this,arguments)}),b=o.likeButtonTitle,C=void 0===b?"Like":b,k=o.dislikeButtonTitle,w=void 0===k?"Dislike":k,_=o.thanksForFeedbackText,S=void 0===_?"Thanks for your feedback!":_;return u&&a?r.createElement("div",{className:"DocSearch-AskAiScreen-Actions"},null===f?r.createElement(r.Fragment,null,v?r.createElement(Wt,{className:"DocSearch-AskAiScreen-SmallerLoadingIcon"}):r.createElement(r.Fragment,null,r.createElement(uu,{title:C,onClick:function(){return F("like")}}),r.createElement(au,{title:w,onClick:function(){return F("dislike")}})),y&&r.createElement("p",{className:"DocSearch-AskAiScreen-FeedbackText"},y.message||"An error occured")):r.createElement("p",{className:"DocSearch-AskAiScreen-FeedbackText DocSearch-AskAiScreen-FeedbackText--visible"},S),r.createElement(ru,{translations:o,onClick:function(){return navigator.clipboard.writeText(a)}})):null}function eu(e){var t=e.urlsToDisplay,n=e.relatedSourcesText;return r.createElement("div",{className:"DocSearch-AskAiScreen-RelatedSources"},r.createElement("p",{className:"DocSearch-AskAiScreen-RelatedSources-Title"},n||"Related sources"),r.createElement("div",{className:"DocSearch-AskAiScreen-RelatedSources-List"},t.length>0&&t.map(function(e){return r.createElement("a",{key:e.url,href:e.url,className:"DocSearch-AskAiScreen-RelatedSources-Item-Link",target:"_blank",rel:"noopener noreferrer"},r.createElement(nu,null),r.createElement("span",null,e.title||e.url))})))}function tu(e){var t=e.translations,n=void 0===t?{}:t,u=F(e,Qr),a=n.disclaimerText,i=void 0===a?"Answers are generated with AI which can make mistakes. Verify responses.":a,o=n.startNewConversationButtonText,s=void 0===o?"Start a new conversation":o,c=u.messages,l=u.askAiError,d=u.status,f=u.agentStudio,p=(0,r.useMemo)(function(){return"error"===d&&Hr(l,Boolean(f))},[d,l,f]),h=(0,r.useMemo)(function(){return function(e){if(e){if(Jr(e)){var t=Wr(e);return t&&!function(e){var t=e.trim();return t.startsWith("{")&&t.endsWith("}")}(t)?t:"Could not complete response due to token output limits"}return Wr(e)}}(l)},[l]),v=function(e,t){return!e||!Jr(e)&&(!!Vr(e)||!t||Zr(e).showNewConversationLink)}(l,Boolean(f)),m=(0,r.useMemo)(function(){for(var e=[],t=0;t").replace(/"/g,'"').replace(/'/g,"'"):null},[e.title]);return e.collection&&0!==e.collection.items.length?"askAI"===e.collection.source.sourceId?r.createElement("section",{className:"DocSearch-AskAi-Section"},r.createElement("ul",e.getListProps({source:e.collection.source}),r.createElement(fu,h({item:e.collection.items[0],translations:e.translations},e)))):(e.collection.source.sourceId,r.createElement("section",{className:"DocSearch-Hits"},r.createElement("div",{className:"DocSearch-Hit-source"},t),r.createElement("ul",e.getListProps({source:e.collection.source}),e.collection.items.map(function(t,n){return r.createElement(du,h({key:[e.title,t.objectID].join(":"),item:t,index:n},e))})))):null}function du(e){var t=e.item,n=e.index,u=e.renderIcon,a=e.renderAction,i=e.getItemProps,o=e.onItemClick,s=e.collection,c=e.hitComponent;return r.createElement("li",h({className:["DocSearch-Hit",t.__docsearch_parent&&"DocSearch-Hit--Child"].filter(Boolean).join(" ")},i({item:t,source:s.source,onClick:function(e){o(t,e)}})),r.createElement(c,{hit:t},r.createElement("div",{className:"DocSearch-Hit-Container"},u({item:t,index:n}),t.hierarchy[t.type]&&"lvl1"===t.type&&r.createElement("div",{className:"DocSearch-Hit-content-wrapper"},r.createElement(su,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.lvl1"}),t.content&&r.createElement(su,{className:"DocSearch-Hit-path",hit:t,attribute:"content"})),"askAI"===t.type&&r.createElement("div",{className:"DocSearch-Hit-content-wrapper"},r.createElement("span",{className:"DocSearch-Hit-title"},Lr(t.hierarchy.lvl1||""))),t.hierarchy[t.type]&&("lvl2"===t.type||"lvl3"===t.type||"lvl4"===t.type||"lvl5"===t.type||"lvl6"===t.type)&&r.createElement("div",{className:"DocSearch-Hit-content-wrapper"},r.createElement(su,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.".concat(t.type)}),r.createElement(su,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),"content"===t.type&&r.createElement("div",{className:"DocSearch-Hit-content-wrapper"},r.createElement(su,{className:"DocSearch-Hit-title",hit:t,attribute:"content"}),r.createElement(su,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),a({item:t}))))}function fu(e){var t=e.item,n=e.getItemProps,u=e.onItemClick,a=e.translations,i=e.collection,o=F(e,cu),s=a||{},c=s.askAiPlaceholder,l=void 0===c?"Ask AI: ":c,d=s.noResultsAskAiPlaceholder,f=void 0===d?"Didn't find it in the docs? Ask AI to help: ":d,p=1===o.state.collections.length?f:l;return r.createElement("li",h({className:"DocSearch-Hit"},n({item:t,source:i.source,onClick:function(e){u(t,e)}})),r.createElement("div",{className:"DocSearch-Hit--AskAI"},r.createElement("div",{className:"DocSearch-Hit-AskAIButton DocSearch-Hit-Container"},r.createElement("div",{className:" DocSearch-Hit-AskAIButton-icon DocSearch-Hit-icon"},r.createElement(Qt,null)),r.createElement("div",{className:"DocSearch-Hit-AskAIButton-title"},r.createElement("span",{className:"DocSearch-Hit-AskAIButton-title-highlight"},p),r.createElement("mark",{className:"DocSearch-Hit-AskAIButton-title-query"},String(t.query||""))))))}var pu=["onAskAiToggle"];function hu(e){var t=e.onAskAiToggle,n=F(e,pu),u=r.useMemo(function(){return n.state.collections[2]},[n.state]);return r.useEffect(function(){u&&0!==u.items.length||t(!0)},[u,t]),r.createElement("div",{className:"DocSearch-Dropdown-Container DocSearch-Conversation-History"},r.createElement(lu,h({},n,{key:u.source.sourceId,title:"",translations:n.translations,collection:u,renderIcon:function(){return r.createElement("div",{className:"DocSearch-Hit-icon"},r.createElement(Qt,null))},renderAction:function(e){var t=e.item;return r.createElement("div",{className:"DocSearch-Hit-action"},r.createElement("button",{type:"button",className:"DocSearch-Hit-action-button",onClick:function(e){e.preventDefault(),e.stopPropagation(),n.conversations.remove(t),n.refresh()}},r.createElement(Yt,null)))}})))}function vu(e){var t=e.translations,n=void 0===t?{}:t,u=n.titleText,a=void 0===u?"Unable to fetch results":u,i=n.helpText,o=void 0===i?"You might want to check your network connection.":i;return r.createElement("div",{className:"DocSearch-ErrorScreen"},r.createElement("div",{className:"DocSearch-Screen-Icon"},r.createElement(cn,null)),r.createElement("p",{className:"DocSearch-Title"},a),r.createElement("p",{className:"DocSearch-Help"},o))}function mu(e){var t=e.translations,n=void 0===t?{}:t,u=e.suggestedQuestions,a=void 0===u?[]:u,i=e.selectSuggestedQuestion,o=n.newConversationTitle,s=void 0===o?"How can I help you today?":o,c=n.newConversationDescription,l=void 0===c?"I search through your documentation to help you find setup guides, feature details and troubleshooting tips, fast.":c;return r.createElement("div",{className:"DocSearch-NewConversationScreen"},r.createElement("h3",{className:"DocSearch-NewConversationScreen-Title"},s),r.createElement("p",{className:"DocSearch-NewConversationScreen-Description"},l),r.createElement("div",{className:"DocSearch-NewConversationScreen-SuggestedQuestions"},a.map(function(e){return r.createElement("button",{key:e.objectID,type:"button",className:"DocSearch-NewConversationScreen-SuggestedQuestion",onClick:function(){return i(e)}},e.question)})))}var Du=["translations"];function yu(e){var t=e.translations,n=void 0===t?{}:t,u=F(e,Du),a=n.noResultsText,i=void 0===a?"No results found for":a,o=n.suggestedQueryText,s=void 0===o?"Try searching for":o,c=n.reportMissingResultsText,l=void 0===c?"Believe this query should return results?":c,d=n.reportMissingResultsLinkText,f=void 0===d?"Let us know.":d,p=u.state.context.searchSuggestions;return r.createElement("div",{className:"DocSearch-NoResults ".concat(u.canHandleAskAi?"DocSearch-NoResults--withAskAi":"")},r.createElement("div",{className:"DocSearch-Screen-Icon"},r.createElement(ln,null)),r.createElement("p",{className:"DocSearch-Title"},i,' "',r.createElement("strong",null,u.state.query),'"'),p&&p.length>0&&r.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},r.createElement("p",{className:"DocSearch-Help"},s,":"),r.createElement("div",{className:"DocSearch-NoResults-Prefill-List-Items"},p.slice(0,3).reduce(function(e,t){return[].concat(k(e),[r.createElement("p",{key:t},r.createElement(Xt,{size:16}),r.createElement("button",{className:"DocSearch-Prefill",key:t,type:"button",onClick:function(){u.setQuery(t.toLowerCase()+" "),u.refresh(),u.inputRef.current.focus()}},t))])},[]))),u.getMissingResultsUrl&&r.createElement("p",{className:"DocSearch-Help"},"".concat(l," "),r.createElement("a",{href:u.getMissingResultsUrl({query:u.state.query}),target:"_blank",rel:"noopener noreferrer"},f)))}function gu(e,t,n){return e.reduce(function(e,r){var u=t(r);return e.hasOwnProperty(u)||(e[u]=[]),e[u].length<(n||5)&&e[u].push(r),e},{})}function Fu(e){return e}function Eu(e){return 1===e.button||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}function bu(){}var Cu=/(|<\/mark>)/g,Au=RegExp(Cu.source);function ku(e){var t,n,r=e;if(!r.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var u=r.__docsearch_parent?null===(t=r.__docsearch_parent)||void 0===t||null===(t=t._highlightResult)||void 0===t||null===(t=t.hierarchy)||void 0===t?void 0:t.lvl0:null===(n=e._highlightResult)||void 0===n||null===(n=n.hierarchy)||void 0===n?void 0:n.lvl0;return u?u.value&&Au.test(u.value)?u.value.replace(Cu,""):u.value:e.hierarchy.lvl0}var wu=["translations"];function _u(e){var t=e.translations,n=void 0===t?{}:t,u=F(e,wu);return r.createElement("div",{className:"DocSearch-Dropdown-Container"},u.state.collections.map(function(e){if(0===e.items.length)return null;var t=ku(e.items[0]);return r.createElement(lu,h({},u,{key:e.source.sourceId,translations:n,title:t,collection:e,renderIcon:function(t){var n,u=t.item,a=t.index;return r.createElement(r.Fragment,null,u.__docsearch_parent&&r.createElement("svg",{className:"DocSearch-Hit-Tree",viewBox:"0 0 24 54"},r.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},u.__docsearch_parent!==(null===(n=e.items[a+1])||void 0===n?void 0:n.__docsearch_parent)?r.createElement("path",{d:"M8 6v21M20 27H8.3"}):r.createElement("path",{d:"M8 6v42M20 27H8.3"}))),r.createElement("div",{className:"DocSearch-Hit-icon"},r.createElement(rn,{type:u.type})))},renderAction:function(){return r.createElement("div",{className:"DocSearch-Hit-action"},r.createElement(tn,null))}}))}),u.resultsFooterComponent&&r.createElement("section",{className:"DocSearch-HitsFooter"},r.createElement(u.resultsFooterComponent,{state:u.state})))}var Su=["translations"];function xu(e){var t=e.translations,n=void 0===t?{}:t,u=F(e,Su),a=n.recentSearchesTitle,i=void 0===a?"Recent":a,o=n.saveRecentSearchButtonTitle,s=void 0===o?"Save this search":o,c=n.removeRecentSearchButtonTitle,l=void 0===c?"Remove this search from history":c,d=n.favoriteSearchesTitle,f=void 0===d?"Favorite":d,p=n.removeFavoriteSearchButtonTitle,v=void 0===p?"Remove this search from favorites":p,m=n.recentConversationsTitle,D=void 0===m?"Recent conversations":m,y=n.removeRecentConversationButtonTitle,g=void 0===y?"Remove this conversation from history":y;return r.createElement("div",{className:"DocSearch-Dropdown-Container"},r.createElement(lu,h({},u,{title:i,collection:u.state.collections[0],renderIcon:function(){return r.createElement("div",{className:"DocSearch-Hit-icon"},r.createElement(Gt,null))},renderAction:function(e){var t=e.item;return r.createElement(r.Fragment,null,r.createElement("div",{className:"DocSearch-Hit-action"},r.createElement("button",{className:"DocSearch-Hit-action-button",title:s,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),u.favoriteSearches.add(t),u.recentSearches.remove(t),u.refresh()}},r.createElement(on,null))),r.createElement("div",{className:"DocSearch-Hit-action"},r.createElement("button",{className:"DocSearch-Hit-action-button",title:l,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),u.recentSearches.remove(t),u.refresh()}},r.createElement(Yt,null))))}})),r.createElement(lu,h({},u,{title:f,collection:u.state.collections[1],renderIcon:function(){return r.createElement("div",{className:"DocSearch-Hit-icon"},r.createElement(on,null))},renderAction:function(e){var t=e.item;return r.createElement("div",{className:"DocSearch-Hit-action"},r.createElement("button",{className:"DocSearch-Hit-action-button",title:v,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),u.favoriteSearches.remove(t),u.refresh()}},r.createElement(Yt,null)))}})),r.createElement(lu,h({},u,{title:D,collection:u.state.collections[2],renderIcon:function(){return r.createElement("div",{className:"DocSearch-Hit-icon"},r.createElement(Qt,null))},renderAction:function(e){var t=e.item;return r.createElement("div",{className:"DocSearch-Hit-action"},r.createElement("button",{className:"DocSearch-Hit-action-button",title:g,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),u.conversations.remove(t),u.refresh()}},r.createElement(Yt,null)))}})))}var Bu=["translations"],Iu=r.memo(function(e){var t,n=e.translations,u=void 0===n?{}:n,a=F(e,Bu);return a.canHandleAskAi&&a.isAskAiActive&&"conversation-history"===a.askAiState?r.createElement(hu,a):a.canHandleAskAi&&a.isAskAiActive&&"new-conversation"===a.askAiState?r.createElement(mu,{translations:null==u?void 0:u.newConversation,selectSuggestedQuestion:a.selectSuggestedQuestion,suggestedQuestions:a.suggestedQuestions}):a.isAskAiActive&&a.canHandleAskAi?r.createElement(tu,h({},a,{messages:a.messages,status:a.status,askAiError:a.askAiError,translations:null==u?void 0:u.askAiScreen,agentStudio:a.agentStudio})):"error"===(null===(t=a.state)||void 0===t?void 0:t.status)?r.createElement(vu,{translations:null==u?void 0:u.errorScreen}):a.state.query?a.hasCollections||a.canHandleAskAi?r.createElement(r.Fragment,null,r.createElement(_u,h({},a,{translations:null==u?void 0:u.resultsScreen})),a.canHandleAskAi&&1===a.state.collections.length&&r.createElement(yu,h({},a,{translations:null==u?void 0:u.noResultsScreen}))):r.createElement(yu,h({},a,{translations:null==u?void 0:u.noResultsScreen})):r.createElement(xu,h({},a,{hasCollections:a.hasCollections,translations:null==u?void 0:u.startScreen}))},function(e,t){return"loading"===t.state.status||"stalled"===t.state.status});function Ou(e){var t=e.size,n=void 0===t?20:t,u=e.color,a=void 0===u?"currentColor":u;return r.createElement("svg",{width:n,height:n,className:"DocSearch-Back-Icon",viewBox:"0 0 24 24",fill:"none",stroke:a,strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},r.createElement("path",{d:"m12 19-7-7 7-7"}),r.createElement("path",{d:"M19 12H5"}))}var Tu=["children","className","onClick"],Pu=r.createContext({open:!1,setOpen:function(e){}});function ju(e){var t=e.children,n=A(r.useState(!1),2),u=n[0],a=n[1],i=r.useRef(null);return r.useEffect(function(){function e(e){var t;null!==(t=i.current)&&void 0!==t&&t.contains(e.target)||a(!1)}return u&&window.addEventListener("click",e),function(){window.removeEventListener("click",e)}},[u]),r.createElement(Pu.Provider,{value:{open:u,setOpen:a}},r.createElement("div",{ref:i,className:"DocSearch-Menu"},t))}function Nu(e){var t=e.heading,n=e.shimmer,u=void 0!==n&&n;return r.createElement("span",{className:"DocSearch-Modal-heading".concat(u?" shimmer":"")},t)}ju.Trigger=function(e){var t=e.children,n=e.className,u=void 0===n?"":n,a=e.disabled,i=r.useContext(Pu),o=i.open,s=i.setOpen;return r.createElement("button",{type:"button",className:"DocSearch-Menu-trigger ".concat(u).concat(a?" disabled":""),"aria-disabled":a,onClick:function(){a||s(!o)}},t)},ju.Content=function(e){var t=e.children,n=r.useContext(Pu).open;return r.createElement("div",{className:"DocSearch-Menu-content".concat(n?" open":"")},t)},ju.Item=function(e){var t=e.children,n=e.className,u=void 0===n?"":n,a=e.onClick,i=F(e,Tu),o=r.useContext(Pu).setOpen;return r.createElement("button",h({type:"button",className:"DocSearch-Menu-item ".concat(u),onClick:function(e){a&&(a(e),o(!1))}},i),t)};var zu=["translations","askAiState","onAskAiToggle","setAskAiState"];function Ru(e){var t=e.translations,n=void 0===t?{}:t,u=e.askAiState,a=e.onAskAiToggle,i=e.setAskAiState,o=F(e,zu),s=n.clearButtonTitle,c=void 0===s?"Clear":s,l=n.clearButtonAriaLabel,d=void 0===l?"Clear the query":l,f=n.closeButtonText,p=void 0===f?"Close":f,v=n.closeButtonAriaLabel,m=void 0===v?"Close":v,D=n.searchInputLabel,y=void 0===D?"Search":D,E=n.backToKeywordSearchButtonText,b=void 0===E?"Back to keyword search":E,C=n.backToKeywordSearchButtonAriaLabel,A=void 0===C?"Back to keyword search":C,k=n.placeholderTextAskAiStreaming,w=void 0===k?"Answering...":k,_=n.newConversationPlaceholder,S=void 0===_?"Ask a question":_,x=n.conversationHistoryTitle,B=void 0===x?"My conversation history":x,I=n.startNewConversationText,O=void 0===I?"Start a new conversation":I,T=n.viewConversationHistoryText,P=void 0===T?"Conversation history":T,j=n.threadDepthErrorPlaceholder,N=void 0===j?"Conversation limit reached":j,z=o.getFormProps({inputElement:o.inputRef.current}).onReset;r.useEffect(function(){o.autoFocus&&o.inputRef.current&&o.inputRef.current.focus()},[o.autoFocus,o.inputRef]),r.useEffect(function(){o.isFromSelection&&o.inputRef.current&&o.inputRef.current.select()},[o.isFromSelection,o.inputRef]);var R=r.useMemo(function(){var e=o.state.collections[2];return!!e&&e.items.length>0},[o.state.collections]),M=o.getInputProps({inputElement:o.inputRef.current,autoFocus:o.autoFocus,maxLength:512}),Z=new Set(["ArrowUp","ArrowDown","Enter"]),L=M.onKeyDown,$=M.onChange,q="streaming"===o.askAiStatus||"submitted"===o.askAiStatus,U="stalled"===o.state.status,V=o.isAskAiActive&&"conversation-history"!==u,H=o.isThreadDepthError||!1,J=o.placeholder;"new-conversation"===u&&(J=S),H&&o.isAskAiActive&&"minimal"!==o.askAiBlockingChrome&&(J=N);var K=null;q&&(K=w),"conversation-history"===u&&(K=B),r.useEffect(function(){"streaming"!==o.askAiStatus&&"submitted"!==o.askAiStatus&&o.inputRef.current&&o.inputRef.current.focus()},[o.askAiStatus,o.inputRef]);var W=g(g({},M),{},{enterKeyHint:o.isAskAiActive?"enter":"search",onKeyDown:function(e){if(o.isAskAiActive&&Z.has(e.key))return"Enter"===e.key&&!q&&o.state.query&&o.onAskAgain(o.state.query),e.preventDefault(),void e.stopPropagation();null==L||L(e)},onChange:function(e){if(o.isAskAiActive)return o.setQuery(e.currentTarget.value),e.preventDefault(),void e.stopPropagation();null==$||$(e)},disabled:q||H&&o.isAskAiActive}),Q=r.useCallback(function(){if(!H)return"conversation-history"===u?(a(!0),void i("initial")):void a(!1);o.onNewConversation()},[u,H,a,i,o]);return r.createElement(r.Fragment,null,r.createElement("form",{className:"DocSearch-Form",onSubmit:function(e){e.preventDefault()},onReset:z},o.isAskAiActive?r.createElement(r.Fragment,null,r.createElement("button",{type:"button",tabIndex:0,className:"DocSearch-Action DocSearch-AskAi-Return",title:b,"aria-label":A,onClick:Q},r.createElement(Ou,null))):r.createElement(r.Fragment,null,U&&r.createElement("div",{className:"DocSearch-LoadingIndicator"},r.createElement(Wt,null)),!U&&r.createElement("label",h({className:"DocSearch-MagnifierLabel"},o.getLabelProps()),r.createElement(Xt,null),r.createElement("span",{className:"DocSearch-VisuallyHiddenForAccessibility"},y))),K&&r.createElement(Nu,{heading:K,shimmer:q}),r.createElement("input",h({className:"DocSearch-Input",ref:o.inputRef},W,{placeholder:J,hidden:Boolean(K)})),r.createElement("div",{className:"DocSearch-Actions"},r.createElement("button",{className:"DocSearch-Clear",type:"reset","aria-label":d,hidden:!o.state.query,tabIndex:o.state.query?0:-1,"aria-hidden":o.state.query?"false":"true"},c),o.state.query&&r.createElement("div",{className:"DocSearch-Divider"}),q&&r.createElement(r.Fragment,null,r.createElement("button",{type:"button",className:"DocSearch-Action DocSearch-StopStreaming",onClick:o.onStopAskAiStreaming},r.createElement(sn,null)),r.createElement("div",{className:"DocSearch-Divider"})),V&&r.createElement(r.Fragment,null,r.createElement(ju,null,r.createElement(ju.Trigger,{className:"DocSearch-Action"},r.createElement(dn,null)),r.createElement(ju.Content,null,r.createElement(ju.Item,{onClick:o.onNewConversation},r.createElement(pn,null),O),R&&r.createElement(ju.Item,{onClick:o.onViewConversationHistory},r.createElement(fn,null),P))),r.createElement("div",{className:"DocSearch-Divider"})),r.createElement("button",{type:"button",title:p,className:"DocSearch-Action DocSearch-Close","aria-label":m,onClick:o.onClose},r.createElement(Yt,null)))))}function Mu(){if("undefined"!=typeof window&&window.localStorage){var e=[];for(var t in window.localStorage)if(t.includes("__DOCSEARCH_")){var n=window.localStorage[t];e.push({key:t,size:n.length+t.length})}e.sort(function(e,t){return t.size-e.size});for(var r=Math.ceil(e.length/2),u=0;u-1&&a.splice(i,1),a.unshift(n),a=a.slice(0,r),u.setItem(a)},remove:function(e){a=a.filter(function(t){return t.objectID!==e.objectID}),u.setItem(a)},getAll:function(){return a}}}var qu,Uu="vercel.ai.error",Vu=Symbol.for(Uu),Hu=class e extends Error{constructor({name:e,message:t,cause:n}){super(t),this[qu]=!0,this.name=e,this.cause=n}static isInstance(t){return e.hasMarker(t,Uu)}static hasMarker(e,t){const n=Symbol.for(t);return null!=e&&"object"==typeof e&&n in e&&"boolean"==typeof e[n]&&!0===e[n]}};qu=Vu;var Ju=Hu;function Ku(e){return null==e?"unknown error":"string"==typeof e?e:e instanceof Error?e.message:JSON.stringify(e)}var Wu,Qu="AI_InvalidArgumentError",Gu=`vercel.ai.error.${Qu}`,Yu=Symbol.for(Gu),Xu=class extends Ju{constructor({message:e,cause:t,argument:n}){super({name:Qu,message:e,cause:t}),this[Wu]=!0,this.argument=n}static isInstance(e){return Ju.hasMarker(e,Gu)}};Wu=Yu;var ea,ta="AI_JSONParseError",na=`vercel.ai.error.${ta}`,ra=Symbol.for(na),ua=class extends Ju{constructor({text:e,cause:t}){super({name:ta,message:`JSON parsing failed: Text: ${e}.\nError message: ${Ku(t)}`,cause:t}),this[ea]=!0,this.text=e}static isInstance(e){return Ju.hasMarker(e,na)}};ea=ra;var aa,ia="AI_TypeValidationError",oa=`vercel.ai.error.${ia}`,sa=Symbol.for(oa);aa=sa;var ca=class e extends Ju{constructor({value:e,cause:t}){super({name:ia,message:`Type validation failed: Value: ${JSON.stringify(e)}.\nError message: ${Ku(t)}`,cause:t}),this[aa]=!0,this.value=e}static isInstance(e){return Ju.hasMarker(e,oa)}static wrap({value:t,cause:n}){return e.isInstance(n)&&n.value===t?n:new e({value:t,cause:n})}},la=function(){function e(t,n){var r;return s(this,e),(r=o(this,e,[t])).name="ParseError",r.type=n.type,r.field=n.field,r.value=n.value,r.line=n.line,r}return m(e,x(Error)),d(e)}();function da(e){}var fa=function(){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.onError,u=n.onRetry,a=n.onComment;return s(this,e),o(this,e,[{start:function(e){t=function(e){if("function"==typeof e)throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");var t,n=e.onEvent,r=void 0===n?da:n,u=e.onError,a=void 0===u?da:u,i=e.onRetry,o=void 0===i?da:i,s=e.onComment,c="",l=!0,d="",p="";function h(e){if(""===e)return d.length>0&&r({id:t,event:p||void 0,data:d.endsWith("\n")?d.slice(0,-1):d}),t=void 0,d="",void(p="");if(e.startsWith(":"))s&&s(e.slice(e.startsWith(": ")?2:1));else{var n=e.indexOf(":");if(-1===n)v(e,"",e);else{var u=e.slice(0,n),a=" "===e[n+1]?2:1;v(u,e.slice(n+a),e)}}}function v(e,n,r){switch(e){case"event":p=n;break;case"data":d="".concat(d).concat(n,"\n");break;case"id":t=n.includes("\0")?void 0:n;break;case"retry":/^\d+$/.test(n)?o(parseInt(n,10)):a(new la('Invalid `retry` value: "'.concat(n,'"'),{type:"invalid-retry",value:n,line:r}));break;default:a(new la('Unknown field "'.concat(e.length>20?"".concat(e.slice(0,20),"\u2026"):e,'"'),{type:"unknown-field",field:e,value:n,line:r}))}}return{feed:function(e){var t,n=l?e.replace(/^\xEF\xBB\xBF/,""):e,r=function(e){for(var t=[],n="",r=0;r0&&void 0!==arguments[0]?arguments[0]:{}).consume&&h(c),l=!0,t=void 0,d="",p="",c=""}}}({onEvent:function(t){e.enqueue(t)},onError:function(t){"terminate"===r?e.error(t):"function"==typeof r&&r(t)},onRetry:u,onComment:a})},transform:function(e){t.feed(e)}}])}return m(e,x(TransformStream)),d(e)}();function pa(e,t,n){var r;function u(n,r){var u,a,o;for(var s in Object.defineProperty(n,"_zod",{value:null!==(u=n._zod)&&void 0!==u?u:{},enumerable:!1}),null!==(a=(o=n._zod).traits)&&void 0!==a||(o.traits=new Set),n._zod.traits.add(e),t(n,r),i.prototype)s in n||Object.defineProperty(n,s,{value:i.prototype[s].bind(n)});n._zod.constr=i,n._zod.def=r}var a=function(e){function t(){return s(this,t),o(this,t,arguments)}return m(t,e),d(t)}(null!==(r=null==n?void 0:n.Parent)&&void 0!==r?r:Object);function i(e){var t,r,i=null!=n&&n.Parent?new a:this;u(i,e),null!==(t=(r=i._zod).deferred)&&void 0!==t||(r.deferred=[]);var o,s=f(i._zod.deferred);try{for(s.s();!(o=s.n()).done;)(0,o.value)()}catch(e){s.e(e)}finally{s.f()}return i}return Object.defineProperty(a,"name",{value:e}),Object.defineProperty(i,"init",{value:u}),Object.defineProperty(i,Symbol.hasInstance,{value:function(t){var r;return!!(null!=n&&n.Parent&&t instanceof n.Parent)||(null==t||null===(r=t._zod)||void 0===r||null===(r=r.traits)||void 0===r?void 0:r.has(e))}}),Object.defineProperty(i,"name",{value:e}),i}var ha=function(){function e(){return s(this,e),o(this,e,["Encountered Promise during synchronous parse. Use .parseAsync() instead."])}return m(e,x(Error)),d(e)}(),va=function(){function e(t){var n;return s(this,e),(n=o(this,e,["Encountered unidirectional transform during encode: ".concat(t)])).name="ZodEncodeError",n}return m(e,x(Error)),d(e)}(),ma={};function Da(e){return ma}function ya(e){var t=Object.values(e).filter(function(e){return"number"==typeof e});return Object.entries(e).filter(function(e){var n=A(e,2),r=n[0];return n[1],-1===t.indexOf(+r)}).map(function(e){var t=A(e,2);return t[0],t[1]})}function ga(e,t){return"bigint"==typeof t?t.toString():t}function Fa(e){return{get value(){var t=e();return Object.defineProperty(this,"value",{value:t}),t}}}function Ea(e){return null==e}function ba(e){var t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}var Ca=Symbol("evaluating");function Aa(e,t,n){var r=void 0;Object.defineProperty(e,t,{get:function(){if(r!==Ca)return void 0===r&&(r=Ca,r=n()),r},set:function(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function ka(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function wa(){for(var e={},t=arguments.length,n=new Array(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:0;if(!0===e.aborted)return!0;for(var n=t;nu&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=function(r){(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ii=pa("$ZodCheckMultipleOf",function(e,t){_i.init(e,t),e._zod.onattach.push(function(e){var n,r;null!==(n=(r=e._zod.bag).multipleOf)&&void 0!==n||(r.multipleOf=t.value)}),e._zod.check=function(n){if(_(n.value)!==_(t.value))throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===function(e,t){var n=(e.toString().split(".")[1]||"").length,r=t.toString(),u=(r.split(".")[1]||"").length;if(0===u&&/\d?e-\d?/.test(r)){var a=r.match(/\d?e-(\d?)/);null!=a&&a[1]&&(u=Number.parseInt(a[1]))}var i=n>u?n:u;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/Math.pow(10,i)}(n.value,t.value))||n.issues.push({origin:_(n.value),code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Oi=pa("$ZodCheckNumberFormat",function(e,t){var n;_i.init(e,t),t.format=t.format||"float64";var r=null===(n=t.format)||void 0===n?void 0:n.includes("int"),u=r?"int":"number",a=A(za[t.format],2),i=a[0],o=a[1];e._zod.onattach.push(function(e){var n=e._zod.bag;n.format=t.format,n.minimum=i,n.maximum=o,r&&(n.pattern=Ei)}),e._zod.check=function(n){var a=n.value;if(r){if(!Number.isInteger(a))return void n.issues.push({expected:u,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});if(!Number.isSafeInteger(a))return void(a>0?n.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:u,continue:!t.abort}):n.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:u,continue:!t.abort}))}ao&&n.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inst:e})}}),Ti=pa("$ZodCheckMaxSize",function(e,t){var n,r;_i.init(e,t),null!==(n=(r=e._zod.def).when)&&void 0!==n||(r.when=function(e){var t=e.value;return!Ea(t)&&void 0!==t.size}),e._zod.onattach.push(function(e){var n,r=null!==(n=e._zod.bag.maximum)&&void 0!==n?n:Number.POSITIVE_INFINITY;t.maximumr&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=function(n){var r=n.value;r.size>=t.minimum||n.issues.push({origin:$a(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ji=pa("$ZodCheckSizeEquals",function(e,t){var n,r;_i.init(e,t),null!==(n=(r=e._zod.def).when)&&void 0!==n||(r.when=function(e){var t=e.value;return!Ea(t)&&void 0!==t.size}),e._zod.onattach.push(function(e){var n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=function(n){var r=n.value,u=r.size;if(u!==t.size){var a=u>t.size;n.issues.push(g(g({origin:$a(r)},a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size}),{},{inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort}))}}}),Ni=pa("$ZodCheckMaxLength",function(e,t){var n,r;_i.init(e,t),null!==(n=(r=e._zod.def).when)&&void 0!==n||(r.when=function(e){var t=e.value;return!Ea(t)&&void 0!==t.length}),e._zod.onattach.push(function(e){var n,r=null!==(n=e._zod.bag.maximum)&&void 0!==n?n:Number.POSITIVE_INFINITY;t.maximumr&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=function(n){var r=n.value;if(!(r.length>=t.minimum)){var u=qa(r);n.issues.push({origin:u,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}}),Ri=pa("$ZodCheckLengthEquals",function(e,t){var n,r;_i.init(e,t),null!==(n=(r=e._zod.def).when)&&void 0!==n||(r.when=function(e){var t=e.value;return!Ea(t)&&void 0!==t.length}),e._zod.onattach.push(function(e){var n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=function(n){var r=n.value,u=r.length;if(u!==t.length){var a=qa(r),i=u>t.length;n.issues.push(g(g({origin:a},i?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length}),{},{inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort}))}}}),Mi=pa("$ZodCheckStringFormat",function(e,t){var n,r,u,a;_i.init(e,t),e._zod.onattach.push(function(e){var n,r=e._zod.bag;r.format=t.format,t.pattern&&(null!==(n=r.patterns)&&void 0!==n||(r.patterns=new Set),r.patterns.add(t.pattern))}),t.pattern?null!==(n=(u=e._zod).check)&&void 0!==n||(u.check=function(n){t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push(g(g({origin:"string",code:"invalid_format",format:t.format,input:n.value},t.pattern?{pattern:t.pattern.toString()}:{}),{},{inst:e,continue:!t.abort}))}):null!==(r=(a=e._zod).check)&&void 0!==r||(a.check=function(){})}),Zi=pa("$ZodCheckRegex",function(e,t){Mi.init(e,t),e._zod.check=function(n){t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Li=pa("$ZodCheckLowerCase",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=ki),Mi.init(e,t)}),$i=pa("$ZodCheckUpperCase",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=wi),Mi.init(e,t)}),qi=pa("$ZodCheckIncludes",function(e,t){_i.init(e,t);var n=Pa(t.includes),r=new RegExp("number"==typeof t.position?"^.{".concat(t.position,"}").concat(n):n);t.pattern=r,e._zod.onattach.push(function(e){var t,n=e._zod.bag;null!==(t=n.patterns)&&void 0!==t||(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=function(n){n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Ui=pa("$ZodCheckStartsWith",function(e,t){var n;_i.init(e,t);var r=new RegExp("^".concat(Pa(t.prefix),".*"));null!==(n=t.pattern)&&void 0!==n||(t.pattern=r),e._zod.onattach.push(function(e){var t,n=e._zod.bag;null!==(t=n.patterns)&&void 0!==t||(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=function(n){n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Vi=pa("$ZodCheckEndsWith",function(e,t){var n;_i.init(e,t);var r=new RegExp(".*".concat(Pa(t.suffix),"$"));null!==(n=t.pattern)&&void 0!==n||(t.pattern=r),e._zod.onattach.push(function(e){var t,n=e._zod.bag;null!==(t=n.patterns)&&void 0!==t||(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=function(n){n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function Hi(e,t,n){var r;e.issues.length&&(r=t.issues).push.apply(r,k(Ma(n,e.issues)))}var Ji=pa("$ZodCheckProperty",function(e,t){_i.init(e,t),e._zod.check=function(e){var n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(function(n){return Hi(n,e,t.property)});Hi(n,e,t.property)}}),Ki=pa("$ZodCheckMimeType",function(e,t){_i.init(e,t);var n=new Set(t.mime);e._zod.onattach.push(function(e){e._zod.bag.mime=t.mime}),e._zod.check=function(r){n.has(r.value.type)||r.issues.push({code:"invalid_value",values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),Wi=pa("$ZodCheckOverwrite",function(e,t){_i.init(e,t),e._zod.check=function(e){e.value=t.tx(e.value)}}),Qi=d(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];s(this,e),this.content=[],this.indent=0,this&&(this.args=t)},[{key:"indented",value:function(e){this.indent+=1,e(this),this.indent-=1}},{key:"write",value:function(e){var t=this;if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});var n,r=e.split("\n").filter(function(e){return e}),u=Math.min.apply(Math,k(r.map(function(e){return e.length-e.trimStart().length}))),a=r.map(function(e){return e.slice(u)}).map(function(e){return" ".repeat(2*t.indent)+e}),i=f(a);try{for(i.s();!(n=i.n()).done;){var o=n.value;this.content.push(o)}}catch(e){i.e(e)}finally{i.f()}}},{key:"compile",value:function(){var e,t=Function,n=null==this?void 0:this.args,r=k((null!==(e=null==this?void 0:this.content)&&void 0!==e?e:[""]).map(function(e){return" ".concat(e)}));return c(t,k(n).concat([r.join("\n")]))}}]),Gi={major:4,minor:1,patch:12},Yi=pa("$ZodType",function(e,t){var n,r;null!=e||(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Gi;var u=k(null!==(n=e._zod.def.checks)&&void 0!==n?n:[]);e._zod.traits.has("$ZodCheck")&&u.unshift(e);var a,o=f(u);try{for(o.s();!(a=o.n()).done;){var s,c=f(a.value._zod.onattach);try{for(c.s();!(s=c.n()).done;)(0,s.value)(e)}catch(e){c.e(e)}finally{c.f()}}}catch(e){o.e(e)}finally{o.f()}if(0===u.length){var l,d;null!==(l=(r=e._zod).deferred)&&void 0!==l||(r.deferred=[]),null===(d=e._zod.deferred)||void 0===d||d.push(function(){e._zod.run=e._zod.parse})}else{var p=function(e,t,n){var r,u,a=Ra(e),o=f(t);try{var s=function(){var t=u.value;if(t._zod.def.when){if(!t._zod.def.when(e))return 0}else if(a)return 0;var o=e.issues.length,s=t._zod.check(e);if(s instanceof Promise&&!1===(null==n?void 0:n.async))throw new ha;if(r||s instanceof Promise)r=(null!=r?r:Promise.resolve()).then(i(E().m(function t(){return E().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,s;case 1:if(e.issues.length!==o){t.n=2;break}return t.a(2);case 2:a||(a=Ra(e,o));case 3:return t.a(2)}},t)})));else{if(e.issues.length===o)return 0;a||(a=Ra(e,o))}};for(o.s();!(u=o.n()).done;)s()}catch(e){o.e(e)}finally{o.f()}return r?r.then(function(){return e}):e},h=function(t,n,r){if(Ra(t))return t.aborted=!0,t;var a=p(n,u,r);if(a instanceof Promise){if(!1===r.async)throw new ha;return a.then(function(t){return e._zod.parse(t,r)})}return e._zod.parse(a,r)};e._zod.run=function(t,n){if(n.skipChecks)return e._zod.parse(t,n);if("backward"===n.direction){var r=e._zod.parse({value:t.value,issues:[]},g(g({},n),{},{skipChecks:!0}));return r instanceof Promise?r.then(function(e){return h(e,t,n)}):h(r,t,n)}var a=e._zod.parse(t,n);if(a instanceof Promise){if(!1===n.async)throw new ha;return a.then(function(e){return p(e,u,n)})}return p(a,u,n)}}e["~standard"]={validate:function(t){try{var n,r=Ga(e,t);return r.success?{value:r.data}:{issues:null===(n=r.error)||void 0===n?void 0:n.issues}}catch(n){return Xa(e,t).then(function(e){var t;return e.success?{value:e.data}:{issues:null===(t=e.error)||void 0===t?void 0:t.issues}})}},vendor:"zod",version:1}}),Xi=pa("$ZodString",function(e,t){var n,r,u;Yi.init(e,t),e._zod.pattern=null!==(n=k(null!==(r=null==e||null===(u=e._zod.bag)||void 0===u?void 0:u.patterns)&&void 0!==r?r:[]).pop())&&void 0!==n?n:function(e){var t,n,r=e?"[\\s\\S]{".concat(null!==(t=null==e?void 0:e.minimum)&&void 0!==t?t:0,",").concat(null!==(n=null==e?void 0:e.maximum)&&void 0!==n?n:"","}"):"[\\s\\S]*";return new RegExp("^".concat(r,"$"))}(e._zod.bag),e._zod.parse=function(n,r){if(t.coerce)try{n.value=String(n.value)}catch(r){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),eo=pa("$ZodStringFormat",function(e,t){Mi.init(e,t),Xi.init(e,t)}),to=pa("$ZodGUID",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=oi),eo.init(e,t)}),no=pa("$ZodUUID",function(e,t){var n;if(t.version){var r,u={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===u)throw new Error('Invalid UUID version: "'.concat(t.version,'"'));null!==(r=t.pattern)&&void 0!==r||(t.pattern=si(u))}else null!==(n=t.pattern)&&void 0!==n||(t.pattern=si());eo.init(e,t)}),ro=pa("$ZodEmail",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=ci),eo.init(e,t)}),uo=pa("$ZodURL",function(e,t){eo.init(e,t),e._zod.check=function(n){try{var r=n.value.trim(),u=new URL(r);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(u.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:mi.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(u.protocol.endsWith(":")?u.protocol.slice(0,-1):u.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(t.normalize?n.value=u.href:n.value=r)}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),ao=pa("$ZodEmoji",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),eo.init(e,t)}),io=pa("$ZodNanoID",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=ai),eo.init(e,t)}),oo=pa("$ZodCUID",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=ei),eo.init(e,t)}),so=pa("$ZodCUID2",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=ti),eo.init(e,t)}),co=pa("$ZodULID",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=ni),eo.init(e,t)}),lo=pa("$ZodXID",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=ri),eo.init(e,t)}),fo=pa("$ZodKSUID",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=ui),eo.init(e,t)}),po=pa("$ZodISODateTime",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=function(e){var t=Fi({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");var r="".concat(t,"(?:").concat(n.join("|"),")");return new RegExp("^".concat(yi,"T(?:").concat(r,")$"))}(t)),eo.init(e,t)}),ho=pa("$ZodISODate",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=gi),eo.init(e,t)}),vo=pa("$ZodISOTime",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=new RegExp("^".concat(Fi(t),"$"))),eo.init(e,t)}),mo=pa("$ZodISODuration",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=ii),eo.init(e,t)}),Do=pa("$ZodIPv4",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=li),eo.init(e,t),e._zod.onattach.push(function(e){e._zod.bag.format="ipv4"})}),yo=pa("$ZodIPv6",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=di),eo.init(e,t),e._zod.onattach.push(function(e){e._zod.bag.format="ipv6"}),e._zod.check=function(n){try{new URL("http://[".concat(n.value,"]"))}catch(r){n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),go=pa("$ZodCIDRv4",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=fi),eo.init(e,t)}),Fo=pa("$ZodCIDRv6",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=pi),eo.init(e,t),e._zod.check=function(n){var r=n.value.split("/");try{if(2!==r.length)throw new Error;var u=A(r,2),a=u[0],i=u[1];if(!i)throw new Error;var o=Number(i);if("".concat(o)!==i)throw new Error;if(o<0||o>128)throw new Error;new URL("http://[".concat(a,"]"))}catch(r){n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Eo(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch(e){return!1}}var bo=pa("$ZodBase64",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=hi),eo.init(e,t),e._zod.onattach.push(function(e){e._zod.bag.contentEncoding="base64"}),e._zod.check=function(n){Eo(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),Co=pa("$ZodBase64URL",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=vi),eo.init(e,t),e._zod.onattach.push(function(e){e._zod.bag.contentEncoding="base64url"}),e._zod.check=function(n){(function(e){if(!vi.test(e))return!1;var t=e.replace(/[-_]/g,function(e){return"-"===e?"+":"/"});return Eo(t.padEnd(4*Math.ceil(t.length/4),"="))})(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Ao=pa("$ZodE164",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Di),eo.init(e,t)}),ko=pa("$ZodJWT",function(e,t){eo.init(e,t),e._zod.check=function(n){(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{var n=e.split(".");if(3!==n.length)return!1;var r=A(n,1)[0];if(!r)return!1;var u=JSON.parse(atob(r));return!("typ"in u&&"JWT"!==(null==u?void 0:u.typ)||!u.alg||t&&(!("alg"in u)||u.alg!==t))}catch(e){return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),wo=pa("$ZodNumber",function(e,t){var n;Yi.init(e,t),e._zod.pattern=null!==(n=e._zod.bag.pattern)&&void 0!==n?n:bi,e._zod.parse=function(n,r){if(t.coerce)try{n.value=Number(n.value)}catch(e){}var u=n.value;if("number"==typeof u&&!Number.isNaN(u)&&Number.isFinite(u))return n;var a="number"==typeof u?Number.isNaN(u)?"NaN":Number.isFinite(u)?void 0:"Infinity":void 0;return n.issues.push(g({expected:"number",code:"invalid_type",input:u,inst:e},a?{received:a}:{})),n}}),_o=pa("$ZodNumber",function(e,t){Oi.init(e,t),wo.init(e,t)}),So=pa("$ZodBoolean",function(e,t){Yi.init(e,t),e._zod.pattern=Ci,e._zod.parse=function(n,r){if(t.coerce)try{n.value=Boolean(n.value)}catch(e){}var u=n.value;return"boolean"==typeof u||n.issues.push({expected:"boolean",code:"invalid_type",input:u,inst:e}),n}}),xo=pa("$ZodNull",function(e,t){Yi.init(e,t),e._zod.pattern=Ai,e._zod.values=new Set([null]),e._zod.parse=function(t,n){var r=t.value;return null===r||t.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),t}}),Bo=pa("$ZodUnknown",function(e,t){Yi.init(e,t),e._zod.parse=function(e){return e}}),Io=pa("$ZodNever",function(e,t){Yi.init(e,t),e._zod.parse=function(t,n){return t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t}});function Oo(e,t,n){var r;e.issues.length&&(r=t.issues).push.apply(r,k(Ma(n,e.issues))),t.value[n]=e.value}var To=pa("$ZodArray",function(e,t){Yi.init(e,t),e._zod.parse=function(n,r){var u=n.value;if(!Array.isArray(u))return n.issues.push({expected:"array",code:"invalid_type",input:u,inst:e}),n;n.value=Array(u.length);for(var a=[],i=function(e){var i=u[e],o=t.element._zod.run({value:i,issues:[]},r);o instanceof Promise?a.push(o.then(function(t){return Oo(t,n,e)})):Oo(o,n,e)},o=0;o ({\n ...iss,\n path: iss.path ? [").concat(h,", ...iss.path] : [").concat(h,"]\n })));\n }\n \n \n if (").concat(p,".value === undefined) {\n if (").concat(h," in input) {\n newResult[").concat(h,"] = undefined;\n }\n } else {\n newResult[").concat(h,"] = ").concat(p,".value;\n }\n \n "))}}catch(e){l.e(e)}finally{l.f()}t.write("payload.value = newResult;"),t.write("return payload;");var v=t.compile();return function(t,n){return v(e,t,n)}}(t.shape)),l=n(l,d),c?No([],p,l,d,r,e):l):u(l,d):(l.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),l)}});function Mo(e,t,n,r){var u,a=f(e);try{for(a.s();!(u=a.n()).done;){var i=u.value;if(0===i.issues.length)return t.value=i.value,t}}catch(e){a.e(e)}finally{a.f()}var o=e.filter(function(e){return!Ra(e)});return 1===o.length?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(function(e){return e.issues.map(function(e){return La(e,r,Da())})})}),t)}var Zo=pa("$ZodUnion",function(e,t){Yi.init(e,t),Aa(e._zod,"optin",function(){return t.options.some(function(e){return"optional"===e._zod.optin})?"optional":void 0}),Aa(e._zod,"optout",function(){return t.options.some(function(e){return"optional"===e._zod.optout})?"optional":void 0}),Aa(e._zod,"values",function(){if(t.options.every(function(e){return e._zod.values}))return new Set(t.options.flatMap(function(e){return Array.from(e._zod.values)}))}),Aa(e._zod,"pattern",function(){if(t.options.every(function(e){return e._zod.pattern})){var e=t.options.map(function(e){return e._zod.pattern});return new RegExp("^(".concat(e.map(function(e){return ba(e.source)}).join("|"),")$"))}});var n=1===t.options.length,r=t.options[0]._zod.run;e._zod.parse=function(u,a){if(n)return r(u,a);var i,o=!1,s=[],c=f(t.options);try{for(c.s();!(i=c.n()).done;){var l=i.value._zod.run({value:u.value,issues:[]},a);if(l instanceof Promise)s.push(l),o=!0;else{if(0===l.issues.length)return l;s.push(l)}}}catch(e){c.e(e)}finally{c.f()}return o?Promise.all(s).then(function(t){return Mo(t,u,e,a)}):Mo(s,u,e,a)}}),Lo=pa("$ZodDiscriminatedUnion",function(e,t){Zo.init(e,t);var n=e._zod.parse;Aa(e._zod,"propValues",function(){var e,n={},r=f(t.options);try{for(r.s();!(e=r.n()).done;){var u=e.value,a=u._zod.propValues;if(!a||0===Object.keys(a).length)throw new Error('Invalid discriminated union option at index "'.concat(t.options.indexOf(u),'"'));for(var i=0,o=Object.entries(a);i0&&n.issues.push({code:"unrecognized_keys",input:u,inst:e,keys:s})}else{n.value={};var p,h=f(Reflect.ownKeys(u));try{var v=function(){var i=p.value;if("__proto__"===i)return 0;var o=t.keyType._zod.run({value:i,issues:[]},r);if(o instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(o.issues.length)return n.issues.push({code:"invalid_key",origin:"record",issues:o.issues.map(function(e){return La(e,r,Da())}),input:i,path:[i],inst:e}),n.value[o.value]=o.value,0;var s,c=t.valueType._zod.run({value:u[i],issues:[]},r);c instanceof Promise?a.push(c.then(function(e){var t;e.issues.length&&(t=n.issues).push.apply(t,k(Ma(i,e.issues))),n.value[o.value]=e.value})):(c.issues.length&&(s=n.issues).push.apply(s,k(Ma(i,c.issues))),n.value[o.value]=c.value)};for(h.s();!(p=h.n()).done;)v()}catch(e){h.e(e)}finally{h.f()}}return a.length?Promise.all(a).then(function(){return n}):n}}),Ho=pa("$ZodEnum",function(e,t){Yi.init(e,t);var n=ya(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp("^(".concat(n.filter(function(e){return Ta.has(_(e))}).map(function(e){return"string"==typeof e?Pa(e):e.toString()}).join("|"),")$")),e._zod.parse=function(t,u){var a=t.value;return r.has(a)||t.issues.push({code:"invalid_value",values:n,input:a,inst:e}),t}}),Jo=pa("$ZodLiteral",function(e,t){if(Yi.init(e,t),0===t.values.length)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(t.values),e._zod.pattern=new RegExp("^(".concat(t.values.map(function(e){return"string"==typeof e?Pa(e):e?Pa(e.toString()):String(e)}).join("|"),")$")),e._zod.parse=function(n,r){var u=n.value;return e._zod.values.has(u)||n.issues.push({code:"invalid_value",values:t.values,input:u,inst:e}),n}}),Ko=pa("$ZodTransform",function(e,t){Yi.init(e,t),e._zod.parse=function(n,r){if("backward"===r.direction)throw new va(e.constructor.name);var u=t.transform(n.value,n);if(r.async)return(u instanceof Promise?u:Promise.resolve(u)).then(function(e){return n.value=e,n});if(u instanceof Promise)throw new ha;return n.value=u,n}});function Wo(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}var Qo=pa("$ZodOptional",function(e,t){Yi.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Aa(e._zod,"values",function(){return t.innerType._zod.values?new Set([].concat(k(t.innerType._zod.values),[void 0])):void 0}),Aa(e._zod,"pattern",function(){var e=t.innerType._zod.pattern;return e?new RegExp("^(".concat(ba(e.source),")?$")):void 0}),e._zod.parse=function(e,n){if("optional"===t.innerType._zod.optin){var r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(function(t){return Wo(t,e.value)}):Wo(r,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),Go=pa("$ZodNullable",function(e,t){Yi.init(e,t),Aa(e._zod,"optin",function(){return t.innerType._zod.optin}),Aa(e._zod,"optout",function(){return t.innerType._zod.optout}),Aa(e._zod,"pattern",function(){var e=t.innerType._zod.pattern;return e?new RegExp("^(".concat(ba(e.source),"|null)$")):void 0}),Aa(e._zod,"values",function(){return t.innerType._zod.values?new Set([].concat(k(t.innerType._zod.values),[null])):void 0}),e._zod.parse=function(e,n){return null===e.value?e:t.innerType._zod.run(e,n)}}),Yo=pa("$ZodDefault",function(e,t){Yi.init(e,t),e._zod.optin="optional",Aa(e._zod,"values",function(){return t.innerType._zod.values}),e._zod.parse=function(e,n){if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;var r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(function(e){return Xo(e,t)}):Xo(r,t)}});function Xo(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}var es=pa("$ZodPrefault",function(e,t){Yi.init(e,t),e._zod.optin="optional",Aa(e._zod,"values",function(){return t.innerType._zod.values}),e._zod.parse=function(e,n){return"backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n)}}),ts=pa("$ZodNonOptional",function(e,t){Yi.init(e,t),Aa(e._zod,"values",function(){var e=t.innerType._zod.values;return e?new Set(k(e).filter(function(e){return void 0!==e})):void 0}),e._zod.parse=function(n,r){var u=t.innerType._zod.run(n,r);return u instanceof Promise?u.then(function(t){return ns(t,e)}):ns(u,e)}});function ns(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var rs=pa("$ZodCatch",function(e,t){Yi.init(e,t),Aa(e._zod,"optin",function(){return t.innerType._zod.optin}),Aa(e._zod,"optout",function(){return t.innerType._zod.optout}),Aa(e._zod,"values",function(){return t.innerType._zod.values}),e._zod.parse=function(e,n){if("backward"===n.direction)return t.innerType._zod.run(e,n);var r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(function(r){return e.value=r.value,r.issues.length&&(e.value=t.catchValue(g(g({},e),{},{error:{issues:r.issues.map(function(e){return La(e,n,Da())})},input:e.value})),e.issues=[]),e}):(e.value=r.value,r.issues.length&&(e.value=t.catchValue(g(g({},e),{},{error:{issues:r.issues.map(function(e){return La(e,n,Da())})},input:e.value})),e.issues=[]),e)}}),us=pa("$ZodPipe",function(e,t){Yi.init(e,t),Aa(e._zod,"values",function(){return t.in._zod.values}),Aa(e._zod,"optin",function(){return t.in._zod.optin}),Aa(e._zod,"optout",function(){return t.out._zod.optout}),Aa(e._zod,"propValues",function(){return t.in._zod.propValues}),e._zod.parse=function(e,n){if("backward"===n.direction){var r=t.out._zod.run(e,n);return r instanceof Promise?r.then(function(e){return as(e,t.in,n)}):as(r,t.in,n)}var u=t.in._zod.run(e,n);return u instanceof Promise?u.then(function(e){return as(e,t.out,n)}):as(u,t.out,n)}});function as(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var is=pa("$ZodReadonly",function(e,t){Yi.init(e,t),Aa(e._zod,"propValues",function(){return t.innerType._zod.propValues}),Aa(e._zod,"values",function(){return t.innerType._zod.values}),Aa(e._zod,"optin",function(){return t.innerType._zod.optin}),Aa(e._zod,"optout",function(){return t.innerType._zod.optout}),e._zod.parse=function(e,n){if("backward"===n.direction)return t.innerType._zod.run(e,n);var r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(os):os(r)}});function os(e){return e.value=Object.freeze(e.value),e}var ss=pa("$ZodLazy",function(e,t){Yi.init(e,t),Aa(e._zod,"innerType",function(){return t.getter()}),Aa(e._zod,"pattern",function(){return e._zod.innerType._zod.pattern}),Aa(e._zod,"propValues",function(){return e._zod.innerType._zod.propValues}),Aa(e._zod,"optin",function(){var t;return null!==(t=e._zod.innerType._zod.optin)&&void 0!==t?t:void 0}),Aa(e._zod,"optout",function(){var t;return null!==(t=e._zod.innerType._zod.optout)&&void 0!==t?t:void 0}),e._zod.parse=function(t,n){return e._zod.innerType._zod.run(t,n)}}),cs=pa("$ZodCustom",function(e,t){_i.init(e,t),Yi.init(e,t),e._zod.parse=function(e,t){return e},e._zod.check=function(n){var r=n.value,u=t.fn(r);if(u instanceof Promise)return u.then(function(t){return ls(t,n,r,e)});ls(u,n,r,e)}});function ls(e,t,n,r){if(!e){var u,a={code:"custom",input:n,inst:r,path:k(null!==(u=r._zod.def.path)&&void 0!==u?u:[]),continue:!r._zod.def.abort};r._zod.def.params&&(a.params=r._zod.def.params),t.issues.push(Ua(a))}}var ds=d(function e(){s(this,e),this._map=new WeakMap,this._idmap=new Map},[{key:"add",value:function(e){var t=arguments.length<=1?void 0:arguments[1];if(this._map.set(e,t),t&&"object"===_(t)&&"id"in t){if(this._idmap.has(t.id))throw new Error("ID ".concat(t.id," already exists in the registry"));this._idmap.set(t.id,e)}return this}},{key:"clear",value:function(){return this._map=new WeakMap,this._idmap=new Map,this}},{key:"remove",value:function(e){var t=this._map.get(e);return t&&"object"===_(t)&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}},{key:"get",value:function(e){var t=e._zod.parent;if(t){var n,r=g({},null!==(n=this.get(t))&&void 0!==n?n:{});delete r.id;var u=g(g({},r),this._map.get(e));return Object.keys(u).length?u:void 0}return this._map.get(e)}},{key:"has",value:function(e){return this._map.has(e)}}]);var fs=new ds;function ps(e,t){return new e(g({type:"string",format:"guid",check:"string_format",abort:!1},Na(t)))}function hs(e,t){return new xi(g(g({check:"less_than"},Na(t)),{},{value:e,inclusive:!1}))}function vs(e,t){return new xi(g(g({check:"less_than"},Na(t)),{},{value:e,inclusive:!0}))}function ms(e,t){return new Bi(g(g({check:"greater_than"},Na(t)),{},{value:e,inclusive:!1}))}function Ds(e,t){return new Bi(g(g({check:"greater_than"},Na(t)),{},{value:e,inclusive:!0}))}function ys(e,t){return new Ii(g(g({check:"multiple_of"},Na(t)),{},{value:e}))}function gs(e,t){return new Ni(g(g({check:"max_length"},Na(t)),{},{maximum:e}))}function Fs(e,t){return new zi(g(g({check:"min_length"},Na(t)),{},{minimum:e}))}function Es(e,t){return new Ri(g(g({check:"length_equals"},Na(t)),{},{length:e}))}function bs(e,t){return new Zi(g(g({check:"string_format",format:"regex"},Na(t)),{},{pattern:e}))}function Cs(e){return new Li(g({check:"string_format",format:"lowercase"},Na(e)))}function As(e){return new $i(g({check:"string_format",format:"uppercase"},Na(e)))}function ks(e,t){return new qi(g(g({check:"string_format",format:"includes"},Na(t)),{},{includes:e}))}function ws(e,t){return new Ui(g(g({check:"string_format",format:"starts_with"},Na(t)),{},{prefix:e}))}function _s(e,t){return new Vi(g(g({check:"string_format",format:"ends_with"},Na(t)),{},{suffix:e}))}function Ss(e){return new Wi({check:"overwrite",tx:e})}function xs(e){return Ss(function(t){return t.normalize(e)})}function Bs(){return Ss(function(e){return e.trim()})}function Is(){return Ss(function(e){return e.toLowerCase()})}function Os(){return Ss(function(e){return e.toUpperCase()})}var Ts=d(function e(t){var n,r,u,a,i;s(this,e),this.counter=0,this.metadataRegistry=null!==(n=null==t?void 0:t.metadata)&&void 0!==n?n:fs,this.target=null!==(r=null==t?void 0:t.target)&&void 0!==r?r:"draft-2020-12",this.unrepresentable=null!==(u=null==t?void 0:t.unrepresentable)&&void 0!==u?u:"throw",this.override=null!==(a=null==t?void 0:t.override)&&void 0!==a?a:function(){},this.io=null!==(i=null==t?void 0:t.io)&&void 0!==i?i:"output",this.seen=new Map},[{key:"process",value:function(e){var t,n,r,u,a=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{path:[],schemaPath:[]},o=e._zod.def,s=this.seen.get(e);if(s)return s.count++,i.schemaPath.includes(e)&&(s.cycle=i.path),s.schema;var c={schema:{},count:1,cycle:void 0,path:i.path};this.seen.set(e,c);var l=null===(t=(n=e._zod).toJSONSchema)||void 0===t?void 0:t.call(n);if(l)c.schema=l;else{var d=g(g({},i),{},{schemaPath:[].concat(k(i.schemaPath),[e]),path:i.path}),p=e._zod.parent;if(p)c.ref=p,this.process(p,d),this.seen.get(p).isParent=!0;else{var h=c.schema;switch(o.type){case"string":var v=h;v.type="string";var m,D=e._zod.bag,y=D.minimum,F=D.maximum,E=D.format,b=D.patterns,C=D.contentEncoding;if("number"==typeof y&&(v.minLength=y),"number"==typeof F&&(v.maxLength=F),E&&(v.format=null!==(m={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""}[E])&&void 0!==m?m:E,""===v.format&&delete v.format),C&&(v.contentEncoding=C),b&&b.size>0){var A=k(b);1===A.length?v.pattern=A[0].source:A.length>1&&(c.schema.allOf=k(A.map(function(e){return g(g({},"draft-7"===a.target||"draft-4"===a.target||"openapi-3.0"===a.target?{type:"string"}:{}),{},{pattern:e.source})})))}break;case"number":var w=h,S=e._zod.bag,x=S.minimum,B=S.maximum,I=S.format,O=S.multipleOf,T=S.exclusiveMaximum,P=S.exclusiveMinimum;"string"==typeof I&&I.includes("int")?w.type="integer":w.type="number","number"==typeof P&&("draft-4"===this.target||"openapi-3.0"===this.target?(w.minimum=P,w.exclusiveMinimum=!0):w.exclusiveMinimum=P),"number"==typeof x&&(w.minimum=x,"number"==typeof P&&"draft-4"!==this.target&&(P>=x?delete w.minimum:delete w.exclusiveMinimum)),"number"==typeof T&&("draft-4"===this.target||"openapi-3.0"===this.target?(w.maximum=T,w.exclusiveMaximum=!0):w.exclusiveMaximum=T),"number"==typeof B&&(w.maximum=B,"number"==typeof T&&"draft-4"!==this.target&&(T<=B?delete w.maximum:delete w.exclusiveMaximum)),"number"==typeof O&&(w.multipleOf=O);break;case"boolean":case"success":h.type="boolean";break;case"bigint":if("throw"===this.unrepresentable)throw new Error("BigInt cannot be represented in JSON Schema");break;case"symbol":if("throw"===this.unrepresentable)throw new Error("Symbols cannot be represented in JSON Schema");break;case"null":"openapi-3.0"===this.target?(h.type="string",h.nullable=!0,h.enum=[null]):h.type="null";break;case"any":case"unknown":break;case"undefined":if("throw"===this.unrepresentable)throw new Error("Undefined cannot be represented in JSON Schema");break;case"void":if("throw"===this.unrepresentable)throw new Error("Void cannot be represented in JSON Schema");break;case"never":h.not={};break;case"date":if("throw"===this.unrepresentable)throw new Error("Date cannot be represented in JSON Schema");break;case"array":var j=h,N=e._zod.bag,z=N.minimum,R=N.maximum;"number"==typeof z&&(j.minItems=z),"number"==typeof R&&(j.maxItems=R),j.type="array",j.items=this.process(o.element,g(g({},d),{},{path:[].concat(k(d.path),["items"])}));break;case"object":var M,Z=h;Z.type="object",Z.properties={};var L=o.shape;for(var $ in L)Z.properties[$]=this.process(L[$],g(g({},d),{},{path:[].concat(k(d.path),["properties",$])}));var q=new Set(Object.keys(L)),U=new Set(k(q).filter(function(e){var t=o.shape[e]._zod;return"input"===a.io?void 0===t.optin:void 0===t.optout}));U.size>0&&(Z.required=Array.from(U)),"never"===(null===(M=o.catchall)||void 0===M?void 0:M._zod.def.type)?Z.additionalProperties=!1:o.catchall?o.catchall&&(Z.additionalProperties=this.process(o.catchall,g(g({},d),{},{path:[].concat(k(d.path),["additionalProperties"])}))):"output"===this.io&&(Z.additionalProperties=!1);break;case"union":var V=h,H=o.options.map(function(e,t){return a.process(e,g(g({},d),{},{path:[].concat(k(d.path),["anyOf",t])}))});V.anyOf=H;break;case"intersection":var J=h,K=this.process(o.left,g(g({},d),{},{path:[].concat(k(d.path),["allOf",0])})),W=this.process(o.right,g(g({},d),{},{path:[].concat(k(d.path),["allOf",1])})),Q=function(e){return"allOf"in e&&1===Object.keys(e).length},G=[].concat(k(Q(K)?K.allOf:[K]),k(Q(W)?W.allOf:[W]));J.allOf=G;break;case"tuple":var Y=h;Y.type="array";var X="draft-2020-12"===this.target?"prefixItems":"items",ee="draft-2020-12"===this.target||"openapi-3.0"===this.target?"items":"additionalItems",te=o.items.map(function(e,t){return a.process(e,g(g({},d),{},{path:[].concat(k(d.path),[X,t])}))}),ne=o.rest?this.process(o.rest,g(g({},d),{},{path:[].concat(k(d.path),[ee],k("openapi-3.0"===this.target?[o.items.length]:[]))})):null;"draft-2020-12"===this.target?(Y.prefixItems=te,ne&&(Y.items=ne)):"openapi-3.0"===this.target?(Y.items={anyOf:te},ne&&Y.items.anyOf.push(ne),Y.minItems=te.length,ne||(Y.maxItems=te.length)):(Y.items=te,ne&&(Y.additionalItems=ne));var re=e._zod.bag,ue=re.minimum,ae=re.maximum;"number"==typeof ue&&(Y.minItems=ue),"number"==typeof ae&&(Y.maxItems=ae);break;case"record":var ie=h;ie.type="object","draft-7"!==this.target&&"draft-2020-12"!==this.target||(ie.propertyNames=this.process(o.keyType,g(g({},d),{},{path:[].concat(k(d.path),["propertyNames"])}))),ie.additionalProperties=this.process(o.valueType,g(g({},d),{},{path:[].concat(k(d.path),["additionalProperties"])}));break;case"map":if("throw"===this.unrepresentable)throw new Error("Map cannot be represented in JSON Schema");break;case"set":if("throw"===this.unrepresentable)throw new Error("Set cannot be represented in JSON Schema");break;case"enum":var oe=h,se=ya(o.entries);se.every(function(e){return"number"==typeof e})&&(oe.type="number"),se.every(function(e){return"string"==typeof e})&&(oe.type="string"),oe.enum=se;break;case"literal":var ce,le=h,de=[],fe=f(o.values);try{for(fe.s();!(ce=fe.n()).done;){var pe=ce.value;if(void 0===pe){if("throw"===this.unrepresentable)throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof pe){if("throw"===this.unrepresentable)throw new Error("BigInt literals cannot be represented in JSON Schema");de.push(Number(pe))}else de.push(pe)}}catch(e){fe.e(e)}finally{fe.f()}if(0===de.length);else if(1===de.length){var he=de[0];le.type=null===he?"null":_(he),"draft-4"===this.target||"openapi-3.0"===this.target?le.enum=[he]:le.const=he}else de.every(function(e){return"number"==typeof e})&&(le.type="number"),de.every(function(e){return"string"==typeof e})&&(le.type="string"),de.every(function(e){return"boolean"==typeof e})&&(le.type="string"),de.every(function(e){return null===e})&&(le.type="null"),le.enum=de;break;case"file":var ve=h,me={type:"string",format:"binary",contentEncoding:"binary"},De=e._zod.bag,ye=De.minimum,ge=De.maximum,Fe=De.mime;void 0!==ye&&(me.minLength=ye),void 0!==ge&&(me.maxLength=ge),Fe?1===Fe.length?(me.contentMediaType=Fe[0],Object.assign(ve,me)):ve.anyOf=Fe.map(function(e){return g(g({},me),{},{contentMediaType:e})}):Object.assign(ve,me);break;case"transform":if("throw"===this.unrepresentable)throw new Error("Transforms cannot be represented in JSON Schema");break;case"nullable":var Ee=this.process(o.innerType,d);"openapi-3.0"===this.target?(c.ref=o.innerType,h.nullable=!0):h.anyOf=[Ee,{type:"null"}];break;case"nonoptional":case"promise":case"optional":this.process(o.innerType,d),c.ref=o.innerType;break;case"default":this.process(o.innerType,d),c.ref=o.innerType,h.default=JSON.parse(JSON.stringify(o.defaultValue));break;case"prefault":this.process(o.innerType,d),c.ref=o.innerType,"input"===this.io&&(h._prefault=JSON.parse(JSON.stringify(o.defaultValue)));break;case"catch":var be;this.process(o.innerType,d),c.ref=o.innerType;try{be=o.catchValue(void 0)}catch(e){throw new Error("Dynamic catch values are not supported in JSON Schema")}h.default=be;break;case"nan":if("throw"===this.unrepresentable)throw new Error("NaN cannot be represented in JSON Schema");break;case"template_literal":var Ce=h,Ae=e._zod.pattern;if(!Ae)throw new Error("Pattern not found in template literal");Ce.type="string",Ce.pattern=Ae.source;break;case"pipe":var ke="input"===this.io?"transform"===o.in._zod.def.type?o.out:o.in:o.out;this.process(ke,d),c.ref=ke;break;case"readonly":this.process(o.innerType,d),c.ref=o.innerType,h.readOnly=!0;break;case"lazy":var we=e._zod.innerType;this.process(we,d),c.ref=we;break;case"custom":if("throw"===this.unrepresentable)throw new Error("Custom types cannot be represented in JSON Schema");break;case"function":if("throw"===this.unrepresentable)throw new Error("Function types cannot be represented in JSON Schema")}}}var _e=this.metadataRegistry.get(e);return _e&&Object.assign(c.schema,_e),"input"===this.io&&Ps(e)&&(delete c.schema.examples,delete c.schema.default),"input"===this.io&&c.schema._prefault&&(null!==(r=(u=c.schema).default)&&void 0!==r||(u.default=c.schema._prefault)),delete c.schema._prefault,this.seen.get(e).schema}},{key:"emit",value:function(e,t){var n,r,u,a,i,o,s=this,c={cycles:null!==(n=null==t?void 0:t.cycles)&&void 0!==n?n:"ref",reused:null!==(r=null==t?void 0:t.reused)&&void 0!==r?r:"inline",external:null!==(u=null==t?void 0:t.external)&&void 0!==u?u:void 0},l=this.seen.get(e);if(!l)throw new Error("Unprocessed schema. This is a bug in Zod.");var d=function(e){if(!e[1].schema.$ref){var t=e[1],n=function(e){var t,n="draft-2020-12"===s.target?"$defs":"definitions";if(c.external){var r,u,a,i,o=null===(r=c.external.registry.get(e[0]))||void 0===r?void 0:r.id,d=null!==(u=c.external.uri)&&void 0!==u?u:function(e){return e};if(o)return{ref:d(o)};var f=null!==(a=null!==(i=e[1].defId)&&void 0!==i?i:e[1].schema.id)&&void 0!==a?a:"schema".concat(s.counter++);return e[1].defId=f,{defId:f,ref:"".concat(d("__shared"),"#/").concat(n,"/").concat(f)}}if(e[1]===l)return{ref:"#"};var p="".concat("#","/").concat(n,"/"),h=null!==(t=e[1].schema.id)&&void 0!==t?t:"__schema".concat(s.counter++);return{defId:h,ref:p+h}}(e),r=n.ref,u=n.defId;t.def=g({},t.schema),u&&(t.defId=u);var a=t.schema;for(var i in a)delete a[i];a.$ref=r}};if("throw"===c.cycles){var p,h=f(this.seen.entries());try{for(h.s();!(p=h.n()).done;){var v,m=p.value[1];if(m.cycle)throw new Error("Cycle detected: "+"#/".concat(null===(v=m.cycle)||void 0===v?void 0:v.join("/"),"/")+'\n\nSet the `cycles` parameter to `"ref"` to resolve cyclical schemas with defs.')}}catch(e){h.e(e)}finally{h.f()}}var D,y=f(this.seen.entries());try{for(y.s();!(D=y.n()).done;){var F,E=D.value,b=E[1];if(e!==E[0]){if(c.external){var C,A=null===(C=c.external.registry.get(E[0]))||void 0===C?void 0:C.id;if(e!==E[0]&&A){d(E);continue}}((null===(F=this.metadataRegistry.get(E[0]))||void 0===F?void 0:F.id)||b.cycle||b.count>1&&"ref"===c.reused)&&d(E)}else d(E)}}catch(e){y.e(e)}finally{y.f()}var w,_=function(e,t){var n,r,u=s.seen.get(e),a=null!==(n=u.def)&&void 0!==n?n:u.schema,i=g({},a);if(null!==u.ref){var o=u.ref;if(u.ref=null,o){_(o,t);var c,l=s.seen.get(o).schema;!l.$ref||"draft-7"!==t.target&&"draft-4"!==t.target&&"openapi-3.0"!==t.target?(Object.assign(a,l),Object.assign(a,i)):(a.allOf=null!==(c=a.allOf)&&void 0!==c?c:[],a.allOf.push(l))}u.isParent||s.override({zodSchema:e,jsonSchema:a,path:null!==(r=u.path)&&void 0!==r?r:[]})}},S=f(k(this.seen.entries()).reverse());try{for(S.s();!(w=S.n()).done;){var x=w.value;_(x[0],{target:this.target})}}catch(e){S.e(e)}finally{S.f()}var B={};if("draft-2020-12"===this.target?B.$schema="https://json-schema.org/draft/2020-12/schema":"draft-7"===this.target?B.$schema="http://json-schema.org/draft-07/schema#":"draft-4"===this.target?B.$schema="http://json-schema.org/draft-04/schema#":"openapi-3.0"===this.target||console.warn("Invalid target: ".concat(this.target)),null!==(a=c.external)&&void 0!==a&&a.uri){var I,O=null===(I=c.external.registry.get(e))||void 0===I?void 0:I.id;if(!O)throw new Error("Schema is missing an `id` property");B.$id=c.external.uri(O)}Object.assign(B,l.def);var T,P=null!==(i=null===(o=c.external)||void 0===o?void 0:o.defs)&&void 0!==i?i:{},j=f(this.seen.entries());try{for(j.s();!(T=j.n()).done;){var N=T.value[1];N.def&&N.defId&&(P[N.defId]=N.def)}}catch(e){j.e(e)}finally{j.f()}c.external||Object.keys(P).length>0&&("draft-2020-12"===this.target?B.$defs=P:B.definitions=P);try{return JSON.parse(JSON.stringify(B))}catch(e){throw new Error("Error converting schema to JSON.")}}}]);function Ps(e,t){var n=null!=t?t:{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);var r=e._zod.def;switch(r.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":case"custom":case"success":case"catch":case"function":return!1;case"array":return Ps(r.element,n);case"object":for(var u in r.shape)if(Ps(r.shape[u],n))return!0;return!1;case"union":var a,i=f(r.options);try{for(i.s();!(a=i.n()).done;)if(Ps(a.value,n))return!0}catch(e){i.e(e)}finally{i.f()}return!1;case"intersection":return Ps(r.left,n)||Ps(r.right,n);case"tuple":var o,s=f(r.items);try{for(s.s();!(o=s.n()).done;)if(Ps(o.value,n))return!0}catch(e){s.e(e)}finally{s.f()}return!(!r.rest||!Ps(r.rest,n));case"record":case"map":return Ps(r.keyType,n)||Ps(r.valueType,n);case"set":return Ps(r.valueType,n);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":case"default":case"prefault":return Ps(r.innerType,n);case"lazy":return Ps(r.getter(),n);case"transform":return!0;case"pipe":return Ps(r.in,n)||Ps(r.out,n)}throw new Error("Unknown schema type: ".concat(r.type))}var js=Object.freeze({__proto__:null,endsWith:_s,gt:ms,gte:Ds,includes:ks,length:Es,lowercase:Cs,lt:hs,lte:vs,maxLength:gs,maxSize:function(e,t){return new Ti(g(g({check:"max_size"},Na(t)),{},{maximum:e}))},mime:function(e,t){return new Ki(g({check:"mime_type",mime:e},Na(t)))},minLength:Fs,minSize:function(e,t){return new Pi(g(g({check:"min_size"},Na(t)),{},{minimum:e}))},multipleOf:ys,negative:function(e){return hs(0,e)},nonnegative:function(e){return Ds(0,e)},nonpositive:function(e){return vs(0,e)},normalize:xs,overwrite:Ss,positive:function(e){return ms(0,e)},property:function(e,t,n){return new Ji(g({check:"property",property:e,schema:t},Na(n)))},regex:bs,size:function(e,t){return new ji(g(g({check:"size_equals"},Na(t)),{},{size:e}))},startsWith:ws,toLowerCase:Is,toUpperCase:Os,trim:Bs,uppercase:As}),Ns=pa("ZodISODateTime",function(e,t){po.init(e,t),uc.init(e,t)});var zs=pa("ZodISODate",function(e,t){ho.init(e,t),uc.init(e,t)});var Rs=pa("ZodISOTime",function(e,t){vo.init(e,t),uc.init(e,t)});var Ms=pa("ZodISODuration",function(e,t){mo.init(e,t),uc.init(e,t)});var Zs,Ls=pa("ZodError",function(e,t){Ha.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:function(t){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e.message},n={_errors:[]},r=function(e){var u,a=f(e.issues);try{for(a.s();!(u=a.n()).done;){var i=u.value;if("invalid_union"===i.code&&i.errors.length)i.errors.map(function(e){return r({issues:e})});else if("invalid_key"===i.code)r({issues:i.issues});else if("invalid_element"===i.code)r({issues:i.issues});else if(0===i.path.length)n._errors.push(t(i));else for(var o=n,s=0;s1&&void 0!==arguments[1]?arguments[1]:function(e){return e.message},r={},u=[],a=f(e.issues);try{for(a.s();!(t=a.n()).done;){var i=t.value;i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(n(i))):u.push(n(i))}}catch(e){a.e(e)}finally{a.f()}return{formErrors:u,fieldErrors:r}}(e,t)}},addIssue:{value:function(t){e.issues.push(t),e.message=JSON.stringify(e.issues,ga,2)}},addIssues:{value:function(t){var n;(n=e.issues).push.apply(n,k(t)),e.message=JSON.stringify(e.issues,ga,2)}},isEmpty:{get:function(){return 0===e.issues.length}}})},{Parent:Error}),$s=Ka(Ls),qs=Wa(Ls),Us=Qa(Ls),Vs=Ya(Ls),Hs=(Zs=Ls,function(e,t,n){var r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Ka(Zs)(e,t,r)}),Js=function(e){return function(t,n,r){return Ka(e)(t,n,r)}}(Ls),Ks=function(e){return t=i(E().m(function t(n,r,u){var a;return E().w(function(t){for(;;)if(0===t.n)return a=u?Object.assign(u,{direction:"backward"}):{direction:"backward"},t.a(2,Wa(e)(n,r,a))},t)})),function(e,n,r){return t.apply(this,arguments)};var t}(Ls),Ws=function(e){return t=i(E().m(function t(n,r,u){return E().w(function(t){for(;;)if(0===t.n)return t.a(2,Wa(e)(n,r,u))},t)})),function(e,n,r){return t.apply(this,arguments)};var t}(Ls),Qs=function(e){return function(t,n,r){var u=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Qa(e)(t,n,u)}}(Ls),Gs=function(e){return function(t,n,r){return Qa(e)(t,n,r)}}(Ls),Ys=function(e){return t=i(E().m(function t(n,r,u){var a;return E().w(function(t){for(;;)if(0===t.n)return a=u?Object.assign(u,{direction:"backward"}):{direction:"backward"},t.a(2,Ya(e)(n,r,a))},t)})),function(e,n,r){return t.apply(this,arguments)};var t}(Ls),Xs=function(e){return t=i(E().m(function t(n,r,u){return E().w(function(t){for(;;)if(0===t.n)return t.a(2,Ya(e)(n,r,u))},t)})),function(e,n,r){return t.apply(this,arguments)};var t}(Ls),ec=pa("ZodType",function(e,t){return Yi.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=function(){for(var n,r=arguments.length,u=new Array(r),a=0;a1&&void 0!==arguments[1]?arguments[1]:{})}(t,n))},e.superRefine=function(t){return e.check(function(e){var t=function(e){var t=new _i(g({check:"custom"},Na(void 0)));return t._zod.check=e,t}(function(n){return n.addIssue=function(e){if("string"==typeof e)n.issues.push(Ua(e,n.value,t._zod.def));else{var r,u,a,i,o=e;o.fatal&&(o.continue=!1),null!==(r=o.code)&&void 0!==r||(o.code="custom"),null!==(u=o.input)&&void 0!==u||(o.input=n.value),null!==(a=o.inst)&&void 0!==a||(o.inst=t),null!==(i=o.continue)&&void 0!==i||(o.continue=!t._zod.def.abort),n.issues.push(Ua(o))}},e(n.value,n)});return t}(t))},e.overwrite=function(t){return e.check(Ss(t))},e.optional=function(){return Xc(e)},e.nullable=function(){return tl(e)},e.nullish=function(){return Xc(tl(e))},e.nonoptional=function(t){return function(e,t){return new ul(g({type:"nonoptional",innerType:e},Na(t)))}(e,t)},e.array=function(){return zc(e)},e.or=function(t){return $c([e,t])},e.and=function(t){return new Uc({type:"intersection",left:e,right:t})},e.transform=function(t){return ol(e,new Gc({type:"transform",transform:t}))},e.default=function(t){return n=t,new nl({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():Oa(n)}});var n},e.prefault=function(t){return n=t,new rl({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():Oa(n)}});var n},e.catch=function(t){return new al({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:function(){return n}});var n},e.pipe=function(t){return ol(e,t)},e.readonly=function(){return new ll({type:"readonly",innerType:e})},e.describe=function(t){var n=e.clone();return fs.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:function(){var t;return null===(t=fs.get(e))||void 0===t?void 0:t.description},configurable:!0}),e.meta=function(){if(0===arguments.length)return fs.get(e);var t=e.clone();return fs.add(t,arguments.length<=0?void 0:arguments[0]),t},e.isOptional=function(){return e.safeParse(void 0).success},e.isNullable=function(){return e.safeParse(null).success},e}),tc=pa("_ZodString",function(e,t){var n,r,u;Xi.init(e,t),ec.init(e,t);var a=e._zod.bag;e.format=null!==(n=a.format)&&void 0!==n?n:null,e.minLength=null!==(r=a.minimum)&&void 0!==r?r:null,e.maxLength=null!==(u=a.maximum)&&void 0!==u?u:null,e.regex=function(){return e.check(bs.apply(js,arguments))},e.includes=function(){return e.check(ks.apply(js,arguments))},e.startsWith=function(){return e.check(ws.apply(js,arguments))},e.endsWith=function(){return e.check(_s.apply(js,arguments))},e.min=function(){return e.check(Fs.apply(js,arguments))},e.max=function(){return e.check(gs.apply(js,arguments))},e.length=function(){return e.check(Es.apply(js,arguments))},e.nonempty=function(){for(var t=arguments.length,n=new Array(t),r=0;r0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");var r=wa(e._zod.def,{get shape(){var n=g(g({},e._zod.def.shape),t);return ka(this,"shape",n),n},checks:[]});return ja(e,r)}(e,t)},e.safeExtend=function(t){return function(e,t){if(!Ia(t))throw new Error("Invalid input to safeExtend: expected a plain object");var n=g(g({},e._zod.def),{},{get shape(){var n=g(g({},e._zod.def.shape),t);return ka(this,"shape",n),n},checks:e._zod.def.checks});return ja(e,n)}(e,t)},e.merge=function(t){return function(e,t){var n=wa(e._zod.def,{get shape(){var n=g(g({},e._zod.def.shape),t._zod.def.shape);return ka(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return ja(e,n)}(e,t)},e.pick=function(t){return function(e,t){var n=e._zod.def;return ja(e,wa(e._zod.def,{get shape(){var e={};for(var r in t){if(!(r in n.shape))throw new Error('Unrecognized key: "'.concat(r,'"'));t[r]&&(e[r]=n.shape[r])}return ka(this,"shape",e),e},checks:[]}))}(e,t)},e.omit=function(t){return function(e,t){var n=e._zod.def,r=wa(e._zod.def,{get shape(){var r=g({},e._zod.def.shape);for(var u in t){if(!(u in n.shape))throw new Error('Unrecognized key: "'.concat(u,'"'));t[u]&&delete r[u]}return ka(this,"shape",r),r},checks:[]});return ja(e,r)}(e,t)},e.partial=function(){return function(e,t,n){var r=wa(t._zod.def,{get shape(){var r=t._zod.def.shape,u=g({},r);if(n)for(var a in n){if(!(a in r))throw new Error('Unrecognized key: "'.concat(a,'"'));n[a]&&(u[a]=e?new e({type:"optional",innerType:r[a]}):r[a])}else for(var i in r)u[i]=e?new e({type:"optional",innerType:r[i]}):r[i];return ka(this,"shape",u),u},checks:[]});return ja(t,r)}(Yc,e,arguments.length<=0?void 0:arguments[0])},e.required=function(){return function(e,t,n){var r=wa(t._zod.def,{get shape(){var r=t._zod.def.shape,u=g({},r);if(n)for(var a in n){if(!(a in u))throw new Error('Unrecognized key: "'.concat(a,'"'));n[a]&&(u[a]=new e({type:"nonoptional",innerType:r[a]}))}else for(var i in r)u[i]=new e({type:"nonoptional",innerType:r[i]});return ka(this,"shape",u),u},checks:[]});return ja(t,r)}(ul,e,arguments.length<=0?void 0:arguments[0])}});function Mc(e,t){var n=g({type:"object",shape:null!=e?e:{}},Na(t));return new Rc(n)}function Zc(e,t){return new Rc(g({type:"object",shape:e,catchall:jc()},Na(t)))}var Lc=pa("ZodUnion",function(e,t){Zo.init(e,t),ec.init(e,t),e.options=t.options});function $c(e,t){return new Lc(g({type:"union",options:e},Na(t)))}var qc=pa("ZodDiscriminatedUnion",function(e,t){Lc.init(e,t),Lo.init(e,t)}),Uc=pa("ZodIntersection",function(e,t){$o.init(e,t),ec.init(e,t)}),Vc=pa("ZodRecord",function(e,t){Vo.init(e,t),ec.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Hc(e,t,n){return new Vc(g({type:"record",keyType:e,valueType:t},Na(n)))}var Jc=pa("ZodEnum",function(e,t){Ho.init(e,t),ec.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);var n=new Set(Object.keys(t.entries));e.extract=function(e,r){var u,a={},i=f(e);try{for(i.s();!(u=i.n()).done;){var o=u.value;if(!n.has(o))throw new Error("Key ".concat(o," not found in enum"));a[o]=t.entries[o]}}catch(e){i.e(e)}finally{i.f()}return new Jc(g(g(g({},t),{},{checks:[]},Na(r)),{},{entries:a}))},e.exclude=function(e,r){var u,a=g({},t.entries),i=f(e);try{for(i.s();!(u=i.n()).done;){var o=u.value;if(!n.has(o))throw new Error("Key ".concat(o," not found in enum"));delete a[o]}}catch(e){i.e(e)}finally{i.f()}return new Jc(g(g(g({},t),{},{checks:[]},Na(r)),{},{entries:a}))}});function Kc(e,t){var n=Array.isArray(e)?Object.fromEntries(e.map(function(e){return[e,e]})):e;return new Jc(g({type:"enum",entries:n},Na(t)))}var Wc=pa("ZodLiteral",function(e,t){Jo.init(e,t),ec.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get:function(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Qc(e,t){return new Wc(g({type:"literal",values:Array.isArray(e)?e:[e]},Na(t)))}var Gc=pa("ZodTransform",function(e,t){Ko.init(e,t),ec.init(e,t),e._zod.parse=function(n,r){if("backward"===r.direction)throw new va(e.constructor.name);n.addIssue=function(r){if("string"==typeof r)n.issues.push(Ua(r,n.value,t));else{var u,a,i,o=r;o.fatal&&(o.continue=!1),null!==(u=o.code)&&void 0!==u||(o.code="custom"),null!==(a=o.input)&&void 0!==a||(o.input=n.value),null!==(i=o.inst)&&void 0!==i||(o.inst=e),n.issues.push(Ua(o))}};var u=t.transform(n.value,n);return u instanceof Promise?u.then(function(e){return n.value=e,n}):(n.value=u,n)}}),Yc=pa("ZodOptional",function(e,t){Qo.init(e,t),ec.init(e,t),e.unwrap=function(){return e._zod.def.innerType}});function Xc(e){return new Yc({type:"optional",innerType:e})}var el=pa("ZodNullable",function(e,t){Go.init(e,t),ec.init(e,t),e.unwrap=function(){return e._zod.def.innerType}});function tl(e){return new el({type:"nullable",innerType:e})}var nl=pa("ZodDefault",function(e,t){Yo.init(e,t),ec.init(e,t),e.unwrap=function(){return e._zod.def.innerType},e.removeDefault=e.unwrap}),rl=pa("ZodPrefault",function(e,t){es.init(e,t),ec.init(e,t),e.unwrap=function(){return e._zod.def.innerType}}),ul=pa("ZodNonOptional",function(e,t){ts.init(e,t),ec.init(e,t),e.unwrap=function(){return e._zod.def.innerType}}),al=pa("ZodCatch",function(e,t){rs.init(e,t),ec.init(e,t),e.unwrap=function(){return e._zod.def.innerType},e.removeCatch=e.unwrap}),il=pa("ZodPipe",function(e,t){us.init(e,t),ec.init(e,t),e.in=t.in,e.out=t.out});function ol(e,t){return new il({type:"pipe",in:e,out:t})}var sl,cl,ll=pa("ZodReadonly",function(e,t){is.init(e,t),ec.init(e,t),e.unwrap=function(){return e._zod.def.innerType}}),dl=pa("ZodLazy",function(e,t){ss.init(e,t),ec.init(e,t),e.unwrap=function(){return e._zod.def.getter()}}),fl=pa("ZodCustom",function(e,t){cs.init(e,t),ec.init(e,t)});function pl(e,t){return function(e,t,n){var r,u=Na(n);return null!==(r=u.abort)&&void 0!==r||(u.abort=!0),new e(g({type:"custom",check:"custom",fn:t},u))}(fl,null!=e?e:function(){return!0},t)}function hl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{error:"Input not instance of ".concat(e.name)},n=new fl(g({type:"custom",check:"custom",fn:function(t){return t instanceof e},abort:!0},Na(t)));return n._zod.bag.Class=e,n}!function(e){e.assertEqual=function(e){},e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=function(e){var t,n={},r=f(e);try{for(r.s();!(t=r.n()).done;){var u=t.value;n[u]=u}}catch(e){r.e(e)}finally{r.f()}return n},e.getValidEnumValues=function(t){var n,r={},u=f(e.objectKeys(t).filter(function(e){return"number"!=typeof t[t[e]]}));try{for(u.s();!(n=u.n()).done;){var a=n.value;r[a]=t[a]}}catch(e){u.e(e)}finally{u.f()}return e.objectValues(r)},e.objectValues=function(t){return e.objectKeys(t).map(function(e){return t[e]})},e.objectKeys="function"==typeof Object.keys?function(e){return Object.keys(e)}:function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=function(e,t){var n,r=f(e);try{for(r.s();!(n=r.n()).done;){var u=n.value;if(t(u))return u}}catch(e){r.e(e)}finally{r.f()}},e.isInteger="function"==typeof Number.isInteger?function(e){return Number.isInteger(e)}:function(e){return"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e},e.joinValues=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" | ";return e.map(function(e){return"string"==typeof e?"'".concat(e,"'"):e}).join(t)},e.jsonStringifyReplacer=function(e,t){return"bigint"==typeof t?t.toString():t}}(sl||(sl={})),function(e){e.mergeShapes=function(e,t){return g(g({},e),t)}}(cl||(cl={}));var vl=sl.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ml=function(e){switch(_(e)){case"undefined":return vl.undefined;case"string":return vl.string;case"number":return Number.isNaN(e)?vl.nan:vl.number;case"boolean":return vl.boolean;case"function":return vl.function;case"bigint":return vl.bigint;case"symbol":return vl.symbol;case"object":return Array.isArray(e)?vl.array:null===e?vl.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?vl.promise:"undefined"!=typeof Map&&e instanceof Map?vl.map:"undefined"!=typeof Set&&e instanceof Set?vl.set:"undefined"!=typeof Date&&e instanceof Date?vl.date:vl.object;default:return vl.unknown}},Dl=sl.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),yl=function(){function e(t){var n;s(this,e),(n=o(this,e)).issues=[],n.addIssue=function(e){n.issues=[].concat(k(n.issues),[e])},n.addIssues=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];n.issues=[].concat(k(n.issues),k(e))};var r=(this instanceof e?this.constructor:void 0).prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,r):n.__proto__=r,n.name="ZodError",n.issues=t,n}return m(e,x(Error)),d(e,[{key:"errors",get:function(){return this.issues}},{key:"format",value:function(e){var t=e||function(e){return e.message},n={_errors:[]},r=function(e){var u,a=f(e.issues);try{for(a.s();!(u=a.n()).done;){var i=u.value;if("invalid_union"===i.code)i.unionErrors.map(r);else if("invalid_return_type"===i.code)r(i.returnTypeError);else if("invalid_arguments"===i.code)r(i.argumentsError);else if(0===i.path.length)n._errors.push(t(i));else for(var o=n,s=0;s0&&void 0!==arguments[0]?arguments[0]:function(e){return e.message},n=Object.create(null),r=[],u=f(this.issues);try{for(u.s();!(e=u.n()).done;){var a=e.value;if(a.path.length>0){var i=a.path[0];n[i]=n[i]||[],n[i].push(t(a))}else r.push(t(a))}}catch(e){u.e(e)}finally{u.f()}return{formErrors:r,fieldErrors:n}}},{key:"formErrors",get:function(){return this.flatten()}}],[{key:"assert",value:function(t){if(!(t instanceof e))throw new Error("Not a ZodError: ".concat(t))}}])}();yl.create=function(e){return new yl(e)};var gl=function(e,t){var n;switch(e.code){case Dl.invalid_type:n=e.received===vl.undefined?"Required":"Expected ".concat(e.expected,", received ").concat(e.received);break;case Dl.invalid_literal:n="Invalid literal value, expected ".concat(JSON.stringify(e.expected,sl.jsonStringifyReplacer));break;case Dl.unrecognized_keys:n="Unrecognized key(s) in object: ".concat(sl.joinValues(e.keys,", "));break;case Dl.invalid_union:n="Invalid input";break;case Dl.invalid_union_discriminator:n="Invalid discriminator value. Expected ".concat(sl.joinValues(e.options));break;case Dl.invalid_enum_value:n="Invalid enum value. Expected ".concat(sl.joinValues(e.options),", received '").concat(e.received,"'");break;case Dl.invalid_arguments:n="Invalid function arguments";break;case Dl.invalid_return_type:n="Invalid function return type";break;case Dl.invalid_date:n="Invalid date";break;case Dl.invalid_string:"object"===_(e.validation)?"includes"in e.validation?(n='Invalid input: must include "'.concat(e.validation.includes,'"'),"number"==typeof e.validation.position&&(n="".concat(n," at one or more positions greater than or equal to ").concat(e.validation.position))):"startsWith"in e.validation?n='Invalid input: must start with "'.concat(e.validation.startsWith,'"'):"endsWith"in e.validation?n='Invalid input: must end with "'.concat(e.validation.endsWith,'"'):sl.assertNever(e.validation):n="regex"!==e.validation?"Invalid ".concat(e.validation):"Invalid";break;case Dl.too_small:n="array"===e.type?"Array must contain ".concat(e.exact?"exactly":e.inclusive?"at least":"more than"," ").concat(e.minimum," element(s)"):"string"===e.type?"String must contain ".concat(e.exact?"exactly":e.inclusive?"at least":"over"," ").concat(e.minimum," character(s)"):"number"===e.type||"bigint"===e.type?"Number must be ".concat(e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than ").concat(e.minimum):"date"===e.type?"Date must be ".concat(e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than ").concat(new Date(Number(e.minimum))):"Invalid input";break;case Dl.too_big:n="array"===e.type?"Array must contain ".concat(e.exact?"exactly":e.inclusive?"at most":"less than"," ").concat(e.maximum," element(s)"):"string"===e.type?"String must contain ".concat(e.exact?"exactly":e.inclusive?"at most":"under"," ").concat(e.maximum," character(s)"):"number"===e.type?"Number must be ".concat(e.exact?"exactly":e.inclusive?"less than or equal to":"less than"," ").concat(e.maximum):"bigint"===e.type?"BigInt must be ".concat(e.exact?"exactly":e.inclusive?"less than or equal to":"less than"," ").concat(e.maximum):"date"===e.type?"Date must be ".concat(e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"," ").concat(new Date(Number(e.maximum))):"Invalid input";break;case Dl.custom:n="Invalid input";break;case Dl.invalid_intersection_types:n="Intersection results could not be merged";break;case Dl.not_multiple_of:n="Number must be a multiple of ".concat(e.multipleOf);break;case Dl.not_finite:n="Number must be finite";break;default:n=t.defaultError,sl.assertNever(e)}return{message:n}},Fl=gl;function El(){return Fl}var bl=function(e){var t=e.data,n=e.path,r=e.errorMaps,u=e.issueData,a=[].concat(k(n),k(u.path||[])),i=g(g({},u),{},{path:a});if(void 0!==u.message)return g(g({},u),{},{path:a,message:u.message});var o,s="",c=r.filter(function(e){return!!e}).slice().reverse(),l=f(c);try{for(l.s();!(o=l.n()).done;)s=(0,o.value)(i,{data:t,defaultError:s}).message}catch(e){l.e(e)}finally{l.f()}return g(g({},u),{},{path:a,message:s})};function Cl(e,t){var n=El(),r=bl({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===gl?void 0:gl].filter(function(e){return!!e})});e.common.issues.push(r)}var Al,kl=function(){function e(){s(this,e),this.value="valid"}return d(e,[{key:"dirty",value:function(){"valid"===this.value&&(this.value="dirty")}},{key:"abort",value:function(){"aborted"!==this.value&&(this.value="aborted")}}],[{key:"mergeArray",value:function(e,t){var n,r=[],u=f(t);try{for(u.s();!(n=u.n()).done;){var a=n.value;if("aborted"===a.status)return wl;"dirty"===a.status&&e.dirty(),r.push(a.value)}}catch(e){u.e(e)}finally{u.f()}return{status:e.value,value:r}}},{key:"mergeObjectAsync",value:(t=i(E().m(function t(n,r){var u,a,i,o,s,c,l;return E().w(function(t){for(;;)switch(t.p=t.n){case 0:u=[],a=f(r),t.p=1,a.s();case 2:if((i=a.n()).done){t.n=6;break}return o=i.value,t.n=3,o.key;case 3:return s=t.v,t.n=4,o.value;case 4:c=t.v,u.push({key:s,value:c});case 5:t.n=2;break;case 6:t.n=8;break;case 7:t.p=7,l=t.v,a.e(l);case 8:return t.p=8,a.f(),t.f(8);case 9:return t.a(2,e.mergeObjectSync(n,u))}},t,null,[[1,7,8,9]])})),function(e,n){return t.apply(this,arguments)})},{key:"mergeObjectSync",value:function(e,t){var n,r={},u=f(t);try{for(u.s();!(n=u.n()).done;){var a=n.value,i=a.key,o=a.value;if("aborted"===i.status)return wl;if("aborted"===o.status)return wl;"dirty"===i.status&&e.dirty(),"dirty"===o.status&&e.dirty(),"__proto__"===i.value||void 0===o.value&&!a.alwaysSet||(r[i.value]=o.value)}}catch(e){u.e(e)}finally{u.f()}return{status:e.value,value:r}}}]);var t}(),wl=Object.freeze({status:"aborted"}),_l=function(e){return{status:"dirty",value:e}},Sl=function(e){return{status:"valid",value:e}},xl=function(e){return"aborted"===e.status},Bl=function(e){return"dirty"===e.status},Il=function(e){return"valid"===e.status},Ol=function(e){return"undefined"!=typeof Promise&&e instanceof Promise};!function(e){e.errToObj=function(e){return"string"==typeof e?{message:e}:e||{}},e.toString=function(e){return"string"==typeof e?e:null==e?void 0:e.message}}(Al||(Al={}));var Tl=d(function e(t,n,r,u){s(this,e),this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=u},[{key:"path",get:function(){var e,t;return this._cachedPath.length||(Array.isArray(this._key)?(e=this._cachedPath).push.apply(e,k(this._path).concat(k(this._key))):(t=this._cachedPath).push.apply(t,k(this._path).concat([this._key]))),this._cachedPath}}]),Pl=function(e,t){if(Il(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;var t=new yl(e.common.issues);return this._error=t,this._error}}};function jl(e){if(!e)return{};var t=e.errorMap,n=e.invalid_type_error,r=e.required_error,u=e.description;if(t&&(n||r))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:u}:{errorMap:function(t,u){var a,i,o=e.message;return"invalid_enum_value"===t.code?{message:null!=o?o:u.defaultError}:void 0===u.data?{message:null!==(i=null!=o?o:r)&&void 0!==i?i:u.defaultError}:"invalid_type"!==t.code?{message:u.defaultError}:{message:null!==(a=null!=o?o:n)&&void 0!==a?a:u.defaultError}},description:u}}var Nl,zl=function(){return d(function e(t){var n=this;s(this,e),this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:function(e){return n["~validate"](e)}}},[{key:"description",get:function(){return this._def.description}},{key:"_getType",value:function(e){return ml(e.data)}},{key:"_getOrReturnCtx",value:function(e,t){return t||{common:e.parent.common,data:e.data,parsedType:ml(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}},{key:"_processInputParams",value:function(e){return{status:new kl,ctx:{common:e.parent.common,data:e.data,parsedType:ml(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}},{key:"_parseSync",value:function(e){var t=this._parse(e);if(Ol(t))throw new Error("Synchronous parse encountered promise.");return t}},{key:"_parseAsync",value:function(e){var t=this._parse(e);return Promise.resolve(t)}},{key:"parse",value:function(e,t){var n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}},{key:"safeParse",value:function(e,t){var n,r={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ml(e)},u=this._parseSync({data:e,path:r.path,parent:r});return Pl(r,u)}},{key:"~validate",value:function(e){var t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ml(e)};if(!this["~standard"].async)try{var n=this._parseSync({data:e,path:[],parent:t});return Il(n)?{value:n.value}:{issues:t.common.issues}}catch(e){var r;null!=e&&null!==(r=e.message)&&void 0!==r&&null!==(r=r.toLowerCase())&&void 0!==r&&r.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(function(e){return Il(e)?{value:e.value}:{issues:t.common.issues}})}},{key:"parseAsync",value:(e=i(E().m(function e(t,n){var r;return E().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.safeParseAsync(t,n);case 1:if(!(r=e.v).success){e.n=2;break}return e.a(2,r.data);case 2:throw r.error;case 3:return e.a(2)}},e,this)})),function(t,n){return e.apply(this,arguments)})},{key:"safeParseAsync",value:function(){var e=i(E().m(function e(t,n){var r,u,a;return E().w(function(e){for(;;)switch(e.n){case 0:return r={common:{issues:[],contextualErrorMap:null==n?void 0:n.errorMap,async:!0},path:(null==n?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ml(t)},u=this._parse({data:t,path:r.path,parent:r}),e.n=1,Ol(u)?u:Promise.resolve(u);case 1:return a=e.v,e.a(2,Pl(r,a))}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()},{key:"refine",value:function(e,t){return this._refinement(function(n,r){var u=e(n),a=function(){return r.addIssue(g({code:Dl.custom},function(e){return"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t}(n)))};return"undefined"!=typeof Promise&&u instanceof Promise?u.then(function(e){return!!e||(a(),!1)}):!!u||(a(),!1)})}},{key:"refinement",value:function(e,t){return this._refinement(function(n,r){return!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1)})}},{key:"_refinement",value:function(e){return new Rd({schema:this,typeName:Ud.ZodEffects,effect:{type:"refinement",refinement:e}})}},{key:"superRefine",value:function(e){return this._refinement(e)}},{key:"optional",value:function(){return Md.create(this,this._def)}},{key:"nullable",value:function(){return Zd.create(this,this._def)}},{key:"nullish",value:function(){return this.nullable().optional()}},{key:"array",value:function(){return gd.create(this)}},{key:"promise",value:function(){return zd.create(this,this._def)}},{key:"or",value:function(e){return bd.create([this,e],this._def)}},{key:"and",value:function(e){return wd.create(this,e,this._def)}},{key:"transform",value:function(e){return new Rd(g(g({},jl(this._def)),{},{schema:this,typeName:Ud.ZodEffects,effect:{type:"transform",transform:e}}))}},{key:"default",value:function(e){var t="function"==typeof e?e:function(){return e};return new Ld(g(g({},jl(this._def)),{},{innerType:this,defaultValue:t,typeName:Ud.ZodDefault}))}},{key:"brand",value:function(){return new Vd(g({typeName:Ud.ZodBranded,type:this},jl(this._def)))}},{key:"catch",value:function(e){var t="function"==typeof e?e:function(){return e};return new $d(g(g({},jl(this._def)),{},{innerType:this,catchValue:t,typeName:Ud.ZodCatch}))}},{key:"describe",value:function(e){return new(0,this.constructor)(g(g({},this._def),{},{description:e}))}},{key:"pipe",value:function(e){return Hd.create(this,e)}},{key:"readonly",value:function(){return Jd.create(this)}},{key:"isOptional",value:function(){return this.safeParse(void 0).success}},{key:"isNullable",value:function(){return this.safeParse(null).success}}]);var e}(),Rl=/^c[^\s-]{8,}$/i,Ml=/^[0-9a-z]+$/,Zl=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Ll=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,$l=/^[a-z0-9_-]{21}$/i,ql=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ul=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Vl=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Hl=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Jl=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Kl=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Wl=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ql=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Gl=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Yl="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Xl=new RegExp("^".concat(Yl,"$"));function ed(e){var t="[0-5]\\d";e.precision?t="".concat(t,"\\.\\d{").concat(e.precision,"}"):null==e.precision&&(t="".concat(t,"(\\.\\d+)?"));var n=e.precision?"+":"?";return"([01]\\d|2[0-3]):[0-5]\\d(:".concat(t,")").concat(n)}function td(e){return new RegExp("^".concat(ed(e),"$"))}function nd(e){var t="".concat(Yl,"T").concat(ed(e)),n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t="".concat(t,"(").concat(n.join("|"),")"),new RegExp("^".concat(t,"$"))}function rd(e,t){return!("v4"!==t&&t||!Hl.test(e))||!("v6"!==t&&t||!Kl.test(e))}function ud(e,t){if(!ql.test(e))return!1;try{var n=A(e.split("."),1)[0];if(!n)return!1;var r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),u=JSON.parse(atob(r));return!("object"!==_(u)||null===u||"typ"in u&&"JWT"!==(null==u?void 0:u.typ)||!u.alg||t&&u.alg!==t)}catch(e){return!1}}function ad(e,t){return!("v4"!==t&&t||!Jl.test(e))||!("v6"!==t&&t||!Wl.test(e))}var id=function(){function e(){return s(this,e),o(this,e,arguments)}return m(e,zl),d(e,[{key:"_parse",value:function(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==vl.string){var t=this._getOrReturnCtx(e);return Cl(t,{code:Dl.invalid_type,expected:vl.string,received:t.parsedType}),wl}var n,r=new kl,u=void 0,a=f(this._def.checks);try{for(a.s();!(n=a.n()).done;){var i=n.value;if("min"===i.kind)e.data.lengthi.value&&(Cl(u=this._getOrReturnCtx(e,u),{code:Dl.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if("length"===i.kind){var o=e.data.length>i.value,s=e.data.lengtht)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"maxLength",get:function(){var e,t=null,n=f(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;"max"===r.kind&&(null===t||r.valuer?n:r;return Number.parseInt(e.toFixed(u).replace(".",""))%Number.parseInt(t.toFixed(u).replace(".",""))/Math.pow(10,u)}id.create=function(e){var t;return new id(g({checks:[],typeName:Ud.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t},jl(e)))};var sd=function(){function e(){var t;return s(this,e),(t=o(this,e,arguments)).min=t.gte,t.max=t.lte,t.step=t.multipleOf,t}return m(e,zl),d(e,[{key:"_parse",value:function(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==vl.number){var t=this._getOrReturnCtx(e);return Cl(t,{code:Dl.invalid_type,expected:vl.number,received:t.parsedType}),wl}var n,r=void 0,u=new kl,a=f(this._def.checks);try{for(a.s();!(n=a.n()).done;){var i=n.value;"int"===i.kind?sl.isInteger(e.data)||(Cl(r=this._getOrReturnCtx(e,r),{code:Dl.invalid_type,expected:"integer",received:"float",message:i.message}),u.dirty()):"min"===i.kind?(i.inclusive?e.datai.value:e.data>=i.value)&&(Cl(r=this._getOrReturnCtx(e,r),{code:Dl.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),u.dirty()):"multipleOf"===i.kind?0!==od(e.data,i.value)&&(Cl(r=this._getOrReturnCtx(e,r),{code:Dl.not_multiple_of,multipleOf:i.value,message:i.message}),u.dirty()):"finite"===i.kind?Number.isFinite(e.data)||(Cl(r=this._getOrReturnCtx(e,r),{code:Dl.not_finite,message:i.message}),u.dirty()):sl.assertNever(i)}}catch(e){a.e(e)}finally{a.f()}return{status:u.value,value:e.data}}},{key:"gte",value:function(e,t){return this.setLimit("min",e,!0,Al.toString(t))}},{key:"gt",value:function(e,t){return this.setLimit("min",e,!1,Al.toString(t))}},{key:"lte",value:function(e,t){return this.setLimit("max",e,!0,Al.toString(t))}},{key:"lt",value:function(e,t){return this.setLimit("max",e,!1,Al.toString(t))}},{key:"setLimit",value:function(t,n,r,u){return new e(g(g({},this._def),{},{checks:[].concat(k(this._def.checks),[{kind:t,value:n,inclusive:r,message:Al.toString(u)}])}))}},{key:"_addCheck",value:function(t){return new e(g(g({},this._def),{},{checks:[].concat(k(this._def.checks),[t])}))}},{key:"int",value:function(e){return this._addCheck({kind:"int",message:Al.toString(e)})}},{key:"positive",value:function(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Al.toString(e)})}},{key:"negative",value:function(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Al.toString(e)})}},{key:"nonpositive",value:function(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Al.toString(e)})}},{key:"nonnegative",value:function(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Al.toString(e)})}},{key:"multipleOf",value:function(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Al.toString(t)})}},{key:"finite",value:function(e){return this._addCheck({kind:"finite",message:Al.toString(e)})}},{key:"safe",value:function(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Al.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Al.toString(e)})}},{key:"minValue",get:function(){var e,t=null,n=f(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;"min"===r.kind&&(null===t||r.value>t)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"maxValue",get:function(){var e,t=null,n=f(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;"max"===r.kind&&(null===t||r.valuen)&&(n=u.value):"max"===u.kind&&(null===t||u.valuea.value:e.data>=a.value)&&(Cl(n=this._getOrReturnCtx(e,n),{code:Dl.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty()):"multipleOf"===a.kind?e.data%a.value!==BigInt(0)&&(Cl(n=this._getOrReturnCtx(e,n),{code:Dl.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):sl.assertNever(a)}}catch(e){u.e(e)}finally{u.f()}return{status:r.value,value:e.data}}},{key:"_getInvalidInput",value:function(e){var t=this._getOrReturnCtx(e);return Cl(t,{code:Dl.invalid_type,expected:vl.bigint,received:t.parsedType}),wl}},{key:"gte",value:function(e,t){return this.setLimit("min",e,!0,Al.toString(t))}},{key:"gt",value:function(e,t){return this.setLimit("min",e,!1,Al.toString(t))}},{key:"lte",value:function(e,t){return this.setLimit("max",e,!0,Al.toString(t))}},{key:"lt",value:function(e,t){return this.setLimit("max",e,!1,Al.toString(t))}},{key:"setLimit",value:function(t,n,r,u){return new e(g(g({},this._def),{},{checks:[].concat(k(this._def.checks),[{kind:t,value:n,inclusive:r,message:Al.toString(u)}])}))}},{key:"_addCheck",value:function(t){return new e(g(g({},this._def),{},{checks:[].concat(k(this._def.checks),[t])}))}},{key:"positive",value:function(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Al.toString(e)})}},{key:"negative",value:function(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Al.toString(e)})}},{key:"nonpositive",value:function(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Al.toString(e)})}},{key:"nonnegative",value:function(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Al.toString(e)})}},{key:"multipleOf",value:function(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Al.toString(t)})}},{key:"minValue",get:function(){var e,t=null,n=f(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;"min"===r.kind&&(null===t||r.value>t)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"maxValue",get:function(){var e,t=null,n=f(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;"max"===r.kind&&(null===t||r.valuei.value&&(Cl(u=this._getOrReturnCtx(e,u),{code:Dl.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):sl.assertNever(i)}}catch(e){a.e(e)}finally{a.f()}return{status:r.value,value:new Date(e.data.getTime())}}},{key:"_addCheck",value:function(t){return new e(g(g({},this._def),{},{checks:[].concat(k(this._def.checks),[t])}))}},{key:"min",value:function(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:Al.toString(t)})}},{key:"max",value:function(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:Al.toString(t)})}},{key:"minDate",get:function(){var e,t=null,n=f(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;"min"===r.kind&&(null===t||r.value>t)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return null!=t?new Date(t):null}},{key:"maxDate",get:function(){var e,t=null,n=f(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;"max"===r.kind&&(null===t||r.valueu.exactLength.value,i=n.data.lengthu.maxLength.value&&(Cl(n,{code:Dl.too_big,maximum:u.maxLength.value,type:"array",inclusive:!0,exact:!1,message:u.maxLength.message}),r.dirty()),n.common.async)return Promise.all(k(n.data).map(function(e,t){return u.type._parseAsync(new Tl(n,e,n.path,t))})).then(function(e){return kl.mergeArray(r,e)});var o=k(n.data).map(function(e,t){return u.type._parseSync(new Tl(n,e,n.path,t))});return kl.mergeArray(r,o)}},{key:"element",get:function(){return this._def.type}},{key:"min",value:function(t,n){return new e(g(g({},this._def),{},{minLength:{value:t,message:Al.toString(n)}}))}},{key:"max",value:function(t,n){return new e(g(g({},this._def),{},{maxLength:{value:t,message:Al.toString(n)}}))}},{key:"length",value:function(t,n){return new e(g(g({},this._def),{},{exactLength:{value:t,message:Al.toString(n)}}))}},{key:"nonempty",value:function(e){return this.min(1,e)}}])}();function Fd(e){if(e instanceof Ed){var t={};for(var n in e.shape){var r=e.shape[n];t[n]=Md.create(Fd(r))}return new Ed(g(g({},e._def),{},{shape:function(){return t}}))}return e instanceof gd?new gd(g(g({},e._def),{},{type:Fd(e.element)})):e instanceof Md?Md.create(Fd(e.unwrap())):e instanceof Zd?Zd.create(Fd(e.unwrap())):e instanceof _d?_d.create(e.items.map(function(e){return Fd(e)})):e}gd.create=function(e,t){return new gd(g({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ud.ZodArray},jl(t)))};var Ed=function(){function e(){var t;return s(this,e),(t=o(this,e,arguments))._cached=null,t.nonstrict=t.passthrough,t.augment=t.extend,t}return m(e,zl),d(e,[{key:"_getCached",value:function(){if(null!==this._cached)return this._cached;var e=this._def.shape(),t=sl.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}},{key:"_parse",value:function(e){if(this._getType(e)!==vl.object){var t=this._getOrReturnCtx(e);return Cl(t,{code:Dl.invalid_type,expected:vl.object,received:t.parsedType}),wl}var n=this._processInputParams(e),r=n.status,u=n.ctx,a=this._getCached(),o=a.shape,s=a.keys,c=[];if(!(this._def.catchall instanceof Dd&&"strip"===this._def.unknownKeys))for(var l in u.data)s.includes(l)||c.push(l);var d,p=[],h=f(s);try{for(h.s();!(d=h.n()).done;){var v=d.value,m=o[v],D=u.data[v];p.push({key:{status:"valid",value:v},value:m._parse(new Tl(u,D,u.path,v)),alwaysSet:v in u.data})}}catch(e){h.e(e)}finally{h.f()}if(this._def.catchall instanceof Dd){var y=this._def.unknownKeys;if("passthrough"===y){var g,F=f(c);try{for(F.s();!(g=F.n()).done;){var b=g.value;p.push({key:{status:"valid",value:b},value:{status:"valid",value:u.data[b]}})}}catch(e){F.e(e)}finally{F.f()}}else if("strict"===y)c.length>0&&(Cl(u,{code:Dl.unrecognized_keys,keys:c}),r.dirty());else if("strip"!==y)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{var C,A=this._def.catchall,k=f(c);try{for(k.s();!(C=k.n()).done;){var w=C.value,_=u.data[w];p.push({key:{status:"valid",value:w},value:A._parse(new Tl(u,_,u.path,w)),alwaysSet:w in u.data})}}catch(e){k.e(e)}finally{k.f()}}return u.common.async?Promise.resolve().then(i(E().m(function e(){var t,n,r,u,a,i,o;return E().w(function(e){for(;;)switch(e.p=e.n){case 0:t=[],n=f(p),e.p=1,n.s();case 2:if((r=n.n()).done){e.n=6;break}return u=r.value,e.n=3,u.key;case 3:return a=e.v,e.n=4,u.value;case 4:i=e.v,t.push({key:a,value:i,alwaysSet:u.alwaysSet});case 5:e.n=2;break;case 6:e.n=8;break;case 7:e.p=7,o=e.v,n.e(o);case 8:return e.p=8,n.f(),e.f(8);case 9:return e.a(2,t)}},e,null,[[1,7,8,9]])}))).then(function(e){return kl.mergeObjectSync(r,e)}):kl.mergeObjectSync(r,p)}},{key:"shape",get:function(){return this._def.shape()}},{key:"strict",value:function(t){var n=this;return Al.errToObj,new e(g(g({},this._def),{},{unknownKeys:"strict"},void 0!==t?{errorMap:function(e,r){var u,a,i,o,s=null!==(u=null===(a=(i=n._def).errorMap)||void 0===a?void 0:a.call(i,e,r).message)&&void 0!==u?u:r.defaultError;return"unrecognized_keys"===e.code?{message:null!==(o=Al.errToObj(t).message)&&void 0!==o?o:s}:{message:s}}}:{}))}},{key:"strip",value:function(){return new e(g(g({},this._def),{},{unknownKeys:"strip"}))}},{key:"passthrough",value:function(){return new e(g(g({},this._def),{},{unknownKeys:"passthrough"}))}},{key:"extend",value:function(t){var n=this;return new e(g(g({},this._def),{},{shape:function(){return g(g({},n._def.shape()),t)}}))}},{key:"merge",value:function(t){var n=this;return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:function(){return g(g({},n._def.shape()),t._def.shape())},typeName:Ud.ZodObject})}},{key:"setKey",value:function(e,t){return this.augment(p({},e,t))}},{key:"catchall",value:function(t){return new e(g(g({},this._def),{},{catchall:t}))}},{key:"pick",value:function(t){var n,r={},u=f(sl.objectKeys(t));try{for(u.s();!(n=u.n()).done;){var a=n.value;t[a]&&this.shape[a]&&(r[a]=this.shape[a])}}catch(e){u.e(e)}finally{u.f()}return new e(g(g({},this._def),{},{shape:function(){return r}}))}},{key:"omit",value:function(t){var n,r={},u=f(sl.objectKeys(this.shape));try{for(u.s();!(n=u.n()).done;){var a=n.value;t[a]||(r[a]=this.shape[a])}}catch(e){u.e(e)}finally{u.f()}return new e(g(g({},this._def),{},{shape:function(){return r}}))}},{key:"deepPartial",value:function(){return Fd(this)}},{key:"partial",value:function(t){var n,r={},u=f(sl.objectKeys(this.shape));try{for(u.s();!(n=u.n()).done;){var a=n.value,i=this.shape[a];t&&!t[a]?r[a]=i:r[a]=i.optional()}}catch(e){u.e(e)}finally{u.f()}return new e(g(g({},this._def),{},{shape:function(){return r}}))}},{key:"required",value:function(t){var n,r={},u=f(sl.objectKeys(this.shape));try{for(u.s();!(n=u.n()).done;){var a=n.value;if(t&&!t[a])r[a]=this.shape[a];else{for(var i=this.shape[a];i instanceof Md;)i=i._def.innerType;r[a]=i}}}catch(e){u.e(e)}finally{u.f()}return new e(g(g({},this._def),{},{shape:function(){return r}}))}},{key:"keyof",value:function(){return Pd(sl.objectKeys(this.shape))}}])}();Ed.create=function(e,t){return new Ed(g({shape:function(){return e},unknownKeys:"strip",catchall:Dd.create(),typeName:Ud.ZodObject},jl(t)))},Ed.strictCreate=function(e,t){return new Ed(g({shape:function(){return e},unknownKeys:"strict",catchall:Dd.create(),typeName:Ud.ZodObject},jl(t)))},Ed.lazycreate=function(e,t){return new Ed(g({shape:e,unknownKeys:"strip",catchall:Dd.create(),typeName:Ud.ZodObject},jl(t)))};var bd=function(){function e(){return s(this,e),o(this,e,arguments)}return m(e,zl),d(e,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx,n=this._def.options;if(t.common.async)return Promise.all(n.map(function(){var e=i(E().m(function e(n){var r,u,a;return E().w(function(e){for(;;)switch(e.n){case 0:return r=g(g({},t),{},{common:g(g({},t.common),{},{issues:[]}),parent:null}),e.n=1,n._parseAsync({data:t.data,path:t.path,parent:r});case 1:return u=e.v,a=r,e.a(2,{result:u,ctx:a})}},e)}));return function(t){return e.apply(this,arguments)}}())).then(function(e){var n,r=f(e);try{for(r.s();!(n=r.n()).done;){var u=n.value;if("valid"===u.result.status)return u.result}}catch(e){r.e(e)}finally{r.f()}var a,i=f(e);try{for(i.s();!(a=i.n()).done;){var o,s=a.value;if("dirty"===s.result.status)return(o=t.common.issues).push.apply(o,k(s.ctx.common.issues)),s.result}}catch(e){i.e(e)}finally{i.f()}var c=e.map(function(e){return new yl(e.ctx.common.issues)});return Cl(t,{code:Dl.invalid_union,unionErrors:c}),wl});var r,u,a=void 0,o=[],s=f(n);try{for(s.s();!(r=s.n()).done;){var c=r.value,l=g(g({},t),{},{common:g(g({},t.common),{},{issues:[]}),parent:null}),d=c._parseSync({data:t.data,path:t.path,parent:l});if("valid"===d.status)return d;"dirty"!==d.status||a||(a={result:d,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}}catch(e){s.e(e)}finally{s.f()}if(a)return(u=t.common.issues).push.apply(u,k(a.ctx.common.issues)),a.result;var p=o.map(function(e){return new yl(e)});return Cl(t,{code:Dl.invalid_union,unionErrors:p}),wl}},{key:"options",get:function(){return this._def.options}}])}();bd.create=function(e,t){return new bd(g({options:e,typeName:Ud.ZodUnion},jl(t)))};var Cd=function(e){return e instanceof Od?Cd(e.schema):e instanceof Rd?Cd(e.innerType()):e instanceof Td?[e.value]:e instanceof jd?e.options:e instanceof Nd?sl.objectValues(e.enum):e instanceof Ld?Cd(e._def.innerType):e instanceof pd?[void 0]:e instanceof hd?[null]:e instanceof Md?[void 0].concat(k(Cd(e.unwrap()))):e instanceof Zd?[null].concat(k(Cd(e.unwrap()))):e instanceof Vd||e instanceof Jd?Cd(e.unwrap()):e instanceof $d?Cd(e._def.innerType):[]},Ad=function(){function e(){return s(this,e),o(this,e,arguments)}return m(e,zl),d(e,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx;if(t.parsedType!==vl.object)return Cl(t,{code:Dl.invalid_type,expected:vl.object,received:t.parsedType}),wl;var n=this.discriminator,r=t.data[n],u=this.optionsMap.get(r);return u?t.common.async?u._parseAsync({data:t.data,path:t.path,parent:t}):u._parseSync({data:t.data,path:t.path,parent:t}):(Cl(t,{code:Dl.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),wl)}},{key:"discriminator",get:function(){return this._def.discriminator}},{key:"options",get:function(){return this._def.options}},{key:"optionsMap",get:function(){return this._def.optionsMap}}],[{key:"create",value:function(t,n,r){var u,a=new Map,i=f(n);try{for(i.s();!(u=i.n()).done;){var o=u.value,s=Cd(o.shape[t]);if(!s.length)throw new Error("A discriminator value for key `".concat(t,"` could not be extracted from all schema options"));var c,l=f(s);try{for(l.s();!(c=l.n()).done;){var d=c.value;if(a.has(d))throw new Error("Discriminator property ".concat(String(t)," has duplicate value ").concat(String(d)));a.set(d,o)}}catch(e){l.e(e)}finally{l.f()}}}catch(e){i.e(e)}finally{i.f()}return new e(g({typeName:Ud.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:a},jl(r)))}}])}();function kd(e,t){var n=ml(e),r=ml(t);if(e===t)return{valid:!0,data:e};if(n===vl.object&&r===vl.object){var u,a=sl.objectKeys(t),i=sl.objectKeys(e).filter(function(e){return-1!==a.indexOf(e)}),o=g(g({},e),t),s=f(i);try{for(s.s();!(u=s.n()).done;){var c=u.value,l=kd(e[c],t[c]);if(!l.valid)return{valid:!1};o[c]=l.data}}catch(e){s.e(e)}finally{s.f()}return{valid:!0,data:o}}if(n===vl.array&&r===vl.array){if(e.length!==t.length)return{valid:!1};for(var d=[],p=0;pthis._def.items.length&&(Cl(u,{code:Dl.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());var a=k(u.data).map(function(e,n){var r=t._def.items[n]||t._def.rest;return r?r._parse(new Tl(u,e,u.path,n)):null}).filter(function(e){return!!e});return u.common.async?Promise.all(a).then(function(e){return kl.mergeArray(r,e)}):kl.mergeArray(r,a)}},{key:"items",get:function(){return this._def.items}},{key:"rest",value:function(t){return new e(g(g({},this._def),{},{rest:t}))}}])}();_d.create=function(e,t){if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new _d(g({items:e,typeName:Ud.ZodTuple,rest:null},jl(t)))};var Sd=function(){function e(){return s(this,e),o(this,e,arguments)}return m(e,zl),d(e,[{key:"keySchema",get:function(){return this._def.keyType}},{key:"valueSchema",get:function(){return this._def.valueType}},{key:"_parse",value:function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx;if(r.parsedType!==vl.object)return Cl(r,{code:Dl.invalid_type,expected:vl.object,received:r.parsedType}),wl;var u=[],a=this._def.keyType,i=this._def.valueType;for(var o in r.data)u.push({key:a._parse(new Tl(r,o,r.path,o)),value:i._parse(new Tl(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?kl.mergeObjectAsync(n,u):kl.mergeObjectSync(n,u)}},{key:"element",get:function(){return this._def.valueType}}],[{key:"create",value:function(t,n,r){return new e(n instanceof zl?g({keyType:t,valueType:n,typeName:Ud.ZodRecord},jl(r)):g({keyType:id.create(),valueType:t,typeName:Ud.ZodRecord},jl(n)))}}])}(),xd=function(){function e(){return s(this,e),o(this,e,arguments)}return m(e,zl),d(e,[{key:"keySchema",get:function(){return this._def.keyType}},{key:"valueSchema",get:function(){return this._def.valueType}},{key:"_parse",value:function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx;if(r.parsedType!==vl.map)return Cl(r,{code:Dl.invalid_type,expected:vl.map,received:r.parsedType}),wl;var u=this._def.keyType,a=this._def.valueType,o=k(r.data.entries()).map(function(e,t){var n=A(e,2),i=n[0],o=n[1];return{key:u._parse(new Tl(r,i,r.path,[t,"key"])),value:a._parse(new Tl(r,o,r.path,[t,"value"]))}});if(r.common.async){var s=new Map;return Promise.resolve().then(i(E().m(function e(){var t,r,u,a,i,c;return E().w(function(e){for(;;)switch(e.p=e.n){case 0:t=f(o),e.p=1,t.s();case 2:if((r=t.n()).done){e.n=7;break}return u=r.value,e.n=3,u.key;case 3:return a=e.v,e.n=4,u.value;case 4:if(i=e.v,"aborted"!==a.status&&"aborted"!==i.status){e.n=5;break}return e.a(2,wl);case 5:"dirty"!==a.status&&"dirty"!==i.status||n.dirty(),s.set(a.value,i.value);case 6:e.n=2;break;case 7:e.n=9;break;case 8:e.p=8,c=e.v,t.e(c);case 9:return e.p=9,t.f(),e.f(9);case 10:return e.a(2,{status:n.value,value:s})}},e,null,[[1,8,9,10]])})))}var c,l=new Map,d=f(o);try{for(d.s();!(c=d.n()).done;){var p=c.value,h=p.key,v=p.value;if("aborted"===h.status||"aborted"===v.status)return wl;"dirty"!==h.status&&"dirty"!==v.status||n.dirty(),l.set(h.value,v.value)}}catch(e){d.e(e)}finally{d.f()}return{status:n.value,value:l}}}])}();xd.create=function(e,t,n){return new xd(g({valueType:t,keyType:e,typeName:Ud.ZodMap},jl(n)))};var Bd=function(){function e(){return s(this,e),o(this,e,arguments)}return m(e,zl),d(e,[{key:"_parse",value:function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx;if(r.parsedType!==vl.set)return Cl(r,{code:Dl.invalid_type,expected:vl.set,received:r.parsedType}),wl;var u=this._def;null!==u.minSize&&r.data.sizeu.maxSize.value&&(Cl(r,{code:Dl.too_big,maximum:u.maxSize.value,type:"set",inclusive:!0,exact:!1,message:u.maxSize.message}),n.dirty());var a=this._def.valueType;function i(e){var t,r=new Set,u=f(e);try{for(u.s();!(t=u.n()).done;){var a=t.value;if("aborted"===a.status)return wl;"dirty"===a.status&&n.dirty(),r.add(a.value)}}catch(e){u.e(e)}finally{u.f()}return{status:n.value,value:r}}var o=k(r.data.values()).map(function(e,t){return a._parse(new Tl(r,e,r.path,t))});return r.common.async?Promise.all(o).then(function(e){return i(e)}):i(o)}},{key:"min",value:function(t,n){return new e(g(g({},this._def),{},{minSize:{value:t,message:Al.toString(n)}}))}},{key:"max",value:function(t,n){return new e(g(g({},this._def),{},{maxSize:{value:t,message:Al.toString(n)}}))}},{key:"size",value:function(e,t){return this.min(e,t).max(e,t)}},{key:"nonempty",value:function(e){return this.min(1,e)}}])}();Bd.create=function(e,t){return new Bd(g({valueType:e,minSize:null,maxSize:null,typeName:Ud.ZodSet},jl(t)))};var Id=function(){function e(){var t;return s(this,e),(t=o(this,e,arguments)).validate=t.implement,t}return m(e,zl),d(e,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx;if(t.parsedType!==vl.function)return Cl(t,{code:Dl.invalid_type,expected:vl.function,received:t.parsedType}),wl;function n(e,n){return bl({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,El(),gl].filter(function(e){return!!e}),issueData:{code:Dl.invalid_arguments,argumentsError:n}})}function r(e,n){return bl({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,El(),gl].filter(function(e){return!!e}),issueData:{code:Dl.invalid_return_type,returnTypeError:n}})}var u={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof zd){var o=this;return Sl(i(E().m(function e(){var t,i,s,c,l,d,f,p=arguments;return E().w(function(e){for(;;)switch(e.n){case 0:for(t=p.length,i=new Array(t),s=0;s1&&void 0!==arguments[1]?arguments[1]:this._def;return e.create(t,g(g({},this._def),n))}},{key:"exclude",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._def;return e.create(this.options.filter(function(e){return!t.includes(e)}),g(g({},this._def),n))}}])}();jd.create=Pd;var Nd=function(){function e(){return s(this,e),o(this,e,arguments)}return m(e,zl),d(e,[{key:"_parse",value:function(e){var t=sl.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==vl.string&&n.parsedType!==vl.number){var r=sl.objectValues(t);return Cl(n,{expected:sl.joinValues(r),received:n.parsedType,code:Dl.invalid_type}),wl}if(this._cache||(this._cache=new Set(sl.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){var u=sl.objectValues(t);return Cl(n,{received:n.data,code:Dl.invalid_enum_value,options:u}),wl}return Sl(e.data)}},{key:"enum",get:function(){return this._def.values}}])}();Nd.create=function(e,t){return new Nd(g({values:e,typeName:Ud.ZodNativeEnum},jl(t)))};var zd=function(){function e(){return s(this,e),o(this,e,arguments)}return m(e,zl),d(e,[{key:"unwrap",value:function(){return this._def.type}},{key:"_parse",value:function(e){var t=this,n=this._processInputParams(e).ctx;if(n.parsedType!==vl.promise&&!1===n.common.async)return Cl(n,{code:Dl.invalid_type,expected:vl.promise,received:n.parsedType}),wl;var r=n.parsedType===vl.promise?n.data:Promise.resolve(n.data);return Sl(r.then(function(e){return t._def.type.parseAsync(e,{path:n.path,errorMap:n.common.contextualErrorMap})}))}}])}();zd.create=function(e,t){return new zd(g({type:e,typeName:Ud.ZodPromise},jl(t)))};var Rd=function(){function e(){return s(this,e),o(this,e,arguments)}return m(e,zl),d(e,[{key:"innerType",value:function(){return this._def.schema}},{key:"sourceType",value:function(){return this._def.schema._def.typeName===Ud.ZodEffects?this._def.schema.sourceType():this._def.schema}},{key:"_parse",value:function(e){var t=this,n=this._processInputParams(e),r=n.status,u=n.ctx,a=this._def.effect||null,o={addIssue:function(e){Cl(u,e),e.fatal?r.abort():r.dirty()},get path(){return u.path}};if(o.addIssue=o.addIssue.bind(o),"preprocess"===a.type){var s=a.transform(u.data,o);if(u.common.async)return Promise.resolve(s).then(function(){var e=i(E().m(function e(n){var a;return E().w(function(e){for(;;)switch(e.n){case 0:if("aborted"!==r.value){e.n=1;break}return e.a(2,wl);case 1:return e.n=2,t._def.schema._parseAsync({data:n,path:u.path,parent:u});case 2:if("aborted"!==(a=e.v).status){e.n=3;break}return e.a(2,wl);case 3:if("dirty"!==a.status){e.n=4;break}return e.a(2,_l(a.value));case 4:if("dirty"!==r.value){e.n=5;break}return e.a(2,_l(a.value));case 5:return e.a(2,a)}},e)}));return function(t){return e.apply(this,arguments)}}());if("aborted"===r.value)return wl;var c=this._def.schema._parseSync({data:s,path:u.path,parent:u});return"aborted"===c.status?wl:"dirty"===c.status||"dirty"===r.value?_l(c.value):c}if("refinement"===a.type){var l=function(e){var t=a.refinement(e,o);if(u.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===u.common.async){var d=this._def.schema._parseSync({data:u.data,path:u.path,parent:u});return"aborted"===d.status?wl:("dirty"===d.status&&r.dirty(),l(d.value),{status:r.value,value:d.value})}return this._def.schema._parseAsync({data:u.data,path:u.path,parent:u}).then(function(e){return"aborted"===e.status?wl:("dirty"===e.status&&r.dirty(),l(e.value).then(function(){return{status:r.value,value:e.value}}))})}if("transform"===a.type){if(!1===u.common.async){var f=this._def.schema._parseSync({data:u.data,path:u.path,parent:u});if(!Il(f))return wl;var p=a.transform(f.value,o);if(p instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:p}}return this._def.schema._parseAsync({data:u.data,path:u.path,parent:u}).then(function(e){return Il(e)?Promise.resolve(a.transform(e.value,o)).then(function(e){return{status:r.value,value:e}}):wl})}sl.assertNever(a)}}])}();Rd.create=function(e,t,n){return new Rd(g({schema:e,typeName:Ud.ZodEffects,effect:t},jl(n)))},Rd.createWithPreprocess=function(e,t,n){return new Rd(g({schema:t,effect:{type:"preprocess",transform:e},typeName:Ud.ZodEffects},jl(n)))};var Md=function(){function e(){return s(this,e),o(this,e,arguments)}return m(e,zl),d(e,[{key:"_parse",value:function(e){return this._getType(e)===vl.undefined?Sl(void 0):this._def.innerType._parse(e)}},{key:"unwrap",value:function(){return this._def.innerType}}])}();Md.create=function(e,t){return new Md(g({innerType:e,typeName:Ud.ZodOptional},jl(t)))};var Zd=function(){function e(){return s(this,e),o(this,e,arguments)}return m(e,zl),d(e,[{key:"_parse",value:function(e){return this._getType(e)===vl.null?Sl(null):this._def.innerType._parse(e)}},{key:"unwrap",value:function(){return this._def.innerType}}])}();Zd.create=function(e,t){return new Zd(g({innerType:e,typeName:Ud.ZodNullable},jl(t)))};var Ld=function(){function e(){return s(this,e),o(this,e,arguments)}return m(e,zl),d(e,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx,n=t.data;return t.parsedType===vl.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}},{key:"removeDefault",value:function(){return this._def.innerType}}])}();Ld.create=function(e,t){return new Ld(g({innerType:e,typeName:Ud.ZodDefault,defaultValue:"function"==typeof t.default?t.default:function(){return t.default}},jl(t)))};var $d=function(){function e(){return s(this,e),o(this,e,arguments)}return m(e,zl),d(e,[{key:"_parse",value:function(e){var t=this,n=this._processInputParams(e).ctx,r=g(g({},n),{},{common:g(g({},n.common),{},{issues:[]})}),u=this._def.innerType._parse({data:r.data,path:r.path,parent:g({},r)});return Ol(u)?u.then(function(e){return{status:"valid",value:"valid"===e.status?e.value:t._def.catchValue({get error(){return new yl(r.common.issues)},input:r.data})}}):{status:"valid",value:"valid"===u.status?u.value:this._def.catchValue({get error(){return new yl(r.common.issues)},input:r.data})}}},{key:"removeCatch",value:function(){return this._def.innerType}}])}();$d.create=function(e,t){return new $d(g({innerType:e,typeName:Ud.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:function(){return t.catch}},jl(t)))};var qd=function(){function e(){return s(this,e),o(this,e,arguments)}return m(e,zl),d(e,[{key:"_parse",value:function(e){if(this._getType(e)!==vl.nan){var t=this._getOrReturnCtx(e);return Cl(t,{code:Dl.invalid_type,expected:vl.nan,received:t.parsedType}),wl}return{status:"valid",value:e.data}}}])}();qd.create=function(e){return new qd(g({typeName:Ud.ZodNaN},jl(e)))};var Ud,Vd=function(){function e(){return s(this,e),o(this,e,arguments)}return m(e,zl),d(e,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx,n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}},{key:"unwrap",value:function(){return this._def.type}}])}(),Hd=function(){function e(){return s(this,e),o(this,e,arguments)}return m(e,zl),d(e,[{key:"_parse",value:function(e){var t=this,n=this._processInputParams(e),r=n.status,u=n.ctx;if(u.common.async){var a=function(){var e=i(E().m(function e(){var n;return E().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,t._def.in._parseAsync({data:u.data,path:u.path,parent:u});case 1:if("aborted"!==(n=e.v).status){e.n=2;break}return e.a(2,wl);case 2:if("dirty"!==n.status){e.n=3;break}return r.dirty(),e.a(2,_l(n.value));case 3:return e.a(2,t._def.out._parseAsync({data:n.value,path:u.path,parent:u}));case 4:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return a()}var o=this._def.in._parseSync({data:u.data,path:u.path,parent:u});return"aborted"===o.status?wl:"dirty"===o.status?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:u.path,parent:u})}}],[{key:"create",value:function(t,n){return new e({in:t,out:n,typeName:Ud.ZodPipeline})}}])}(),Jd=function(){function e(){return s(this,e),o(this,e,arguments)}return m(e,zl),d(e,[{key:"_parse",value:function(e){var t=this._def.innerType._parse(e),n=function(e){return Il(e)&&(e.value=Object.freeze(e.value)),e};return Ol(t)?t.then(function(e){return n(e)}):n(t)}},{key:"unwrap",value:function(){return this._def.innerType}}])}();Jd.create=function(e,t){return new Jd(g({innerType:e,typeName:Ud.ZodReadonly},jl(t)))},Ed.lazycreate,function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(Ud||(Ud={})),id.create,sd.create,qd.create,cd.create,ld.create,dd.create,fd.create,pd.create,hd.create,vd.create,md.create,Dd.create,yd.create,gd.create,Ed.create,Ed.strictCreate,bd.create,Ad.create,wd.create,_d.create,Sd.create,xd.create,Bd.create,Id.create,Od.create,Td.create,jd.create,Nd.create,zd.create,Rd.create,Md.create,Zd.create,Rd.createWithPreprocess,Hd.create;var Kd=({prefix:e,size:t=16,alphabet:n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const u=()=>{const e=n.length,r=new Array(t);for(let u=0;u`${e}${r}${u()}`},Wd=Kd();function Qd(e=globalThis){var t,n,r;return e.window?"runtime/browser":(null==(t=e.navigator)?void 0:t.userAgent)?`runtime/${e.navigator.userAgent.toLowerCase()}`:(null==(r=null==(n=e.process)?void 0:n.versions)?void 0:r.node)?`runtime/node.js/${e.process.version.substring(0)}`:e.EdgeRuntime?"runtime/vercel-edge":"runtime/unknown"}function Gd(e){if(null==e)return{};const t={};if(e instanceof Headers)e.forEach((e,n)=>{t[n.toLowerCase()]=e});else{Array.isArray(e)||(e=Object.entries(e));for(const[n,r]of e)null!=r&&(t[n.toLowerCase()]=r)}return t}function Yd(e,...t){const n=new Headers(Gd(e)),r=n.get("user-agent")||"";return n.set("user-agent",[r,...t].filter(Boolean).join(" ")),Object.fromEntries(n.entries())}var Xd=/"__proto__"\s*:/,ef=/"constructor"\s*:/;function tf(e){const t=JSON.parse(e);return null===t||"object"!=typeof t||!1===Xd.test(e)&&!1===ef.test(e)?t:function(e){let t=[e];for(;t.length;){const e=t;t=[];for(const n of e){if(Object.prototype.hasOwnProperty.call(n,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(n,"constructor")&&Object.prototype.hasOwnProperty.call(n.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const e in n){const r=n[e];r&&"object"==typeof r&&t.push(r)}}}return e}(t)}var nf=Symbol.for("vercel.ai.validator");async function rf({value:e,schema:t}){const n=await uf({value:e,schema:t});if(!n.success)throw ca.wrap({value:e,cause:n.error});return n.value}async function uf({value:e,schema:t}){const n=function(e){return function(e){return"object"==typeof e&&null!==e&&nf in e&&!0===e[nf]&&"validate"in e}(e)?e:"function"==typeof e?e():(t=e,n=async e=>{const n=await t["~standard"].validate(e);return null==n.issues?{success:!0,value:n.value}:{success:!1,error:new ca({value:e,cause:n.issues})}},{[nf]:!0,validate:n});var t,n}(t);try{if(null==n.validate)return{success:!0,value:e,rawValue:e};const t=await n.validate(e);return t.success?{success:!0,value:t.value,rawValue:e}:{success:!1,error:ca.wrap({value:e,cause:t.error}),rawValue:e}}catch(t){return{success:!1,error:ca.wrap({value:e,cause:t}),rawValue:e}}}async function af({text:e,schema:t}){try{const n=function(e){const{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch(t){return tf(e)}try{return tf(e)}finally{Error.stackTraceLimit=t}}(e);return null==t?{success:!0,value:n,rawValue:n}:await uf({value:n,schema:t})}catch(t){return{success:!1,error:ua.isInstance(t)?t:new ua({text:e,cause:t}),rawValue:void 0}}}async function of(e){return"function"==typeof e&&(e=e()),Promise.resolve(e)}var sf=(e,t)=>{let n=0;for(;nff(e,t,n))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return pf(e)}}var pf=e=>{const t={type:"integer",format:"unix-time"};for(const n of e.checks)switch(n.kind){case"min":t.minimum=n.value;break;case"max":t.maximum=n.value}return t},hf=void 0,vf=/^[cC][^\s-]{8,}$/,mf=/^[0-9a-z]+$/,Df=/^[0-9A-HJKMNP-TV-Z]{26}$/,yf=/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,gf=()=>(void 0===hf&&(hf=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),hf),Ff=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Ef=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,bf=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Cf=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Af=/^[a-zA-Z0-9_-]{21}$/,kf=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;function wf(e,t){const n={type:"string"};if(e.checks)for(const r of e.checks)switch(r.kind){case"min":n.minLength="number"==typeof n.minLength?Math.max(n.minLength,r.value):r.value;break;case"max":n.maxLength="number"==typeof n.maxLength?Math.min(n.maxLength,r.value):r.value;break;case"email":switch(t.emailStrategy){case"format:email":xf(n,"email",r.message,t);break;case"format:idn-email":xf(n,"idn-email",r.message,t);break;case"pattern:zod":Bf(n,yf,r.message,t)}break;case"url":xf(n,"uri",r.message,t);break;case"uuid":xf(n,"uuid",r.message,t);break;case"regex":Bf(n,r.regex,r.message,t);break;case"cuid":Bf(n,vf,r.message,t);break;case"cuid2":Bf(n,mf,r.message,t);break;case"startsWith":Bf(n,RegExp(`^${_f(r.value,t)}`),r.message,t);break;case"endsWith":Bf(n,RegExp(`${_f(r.value,t)}$`),r.message,t);break;case"datetime":xf(n,"date-time",r.message,t);break;case"date":xf(n,"date",r.message,t);break;case"time":xf(n,"time",r.message,t);break;case"duration":xf(n,"duration",r.message,t);break;case"length":n.minLength="number"==typeof n.minLength?Math.max(n.minLength,r.value):r.value,n.maxLength="number"==typeof n.maxLength?Math.min(n.maxLength,r.value):r.value;break;case"includes":Bf(n,RegExp(_f(r.value,t)),r.message,t);break;case"ip":"v6"!==r.version&&xf(n,"ipv4",r.message,t),"v4"!==r.version&&xf(n,"ipv6",r.message,t);break;case"base64url":Bf(n,Cf,r.message,t);break;case"jwt":Bf(n,kf,r.message,t);break;case"cidr":"v6"!==r.version&&Bf(n,Ff,r.message,t),"v4"!==r.version&&Bf(n,Ef,r.message,t);break;case"emoji":Bf(n,gf(),r.message,t);break;case"ulid":Bf(n,Df,r.message,t);break;case"base64":switch(t.base64Strategy){case"format:binary":xf(n,"binary",r.message,t);break;case"contentEncoding:base64":n.contentEncoding="base64";break;case"pattern:zod":Bf(n,bf,r.message,t)}break;case"nanoid":Bf(n,Af,r.message,t)}return n}function _f(e,t){return"escape"===t.patternStrategy?function(e){let t="";for(let n=0;ne.format))?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:t,...n&&r.errorMessages&&{errorMessage:{format:n}}})):e.format=t}function Bf(e,t,n,r){var u;e.pattern||(null==(u=e.allOf)?void 0:u.some(e=>e.pattern))?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:If(t,r),...n&&r.errorMessages&&{errorMessage:{pattern:n}}})):e.pattern=If(t,r)}function If(e,t){var n;if(!t.applyRegexFlags||!e.flags)return e.source;const r=e.flags.includes("i"),u=e.flags.includes("m"),a=e.flags.includes("s"),i=r?e.source.toLowerCase():e.source;let o="",s=!1,c=!1,l=!1;for(let d=0;d{switch(t){case Ud.ZodString:return wf(e,n);case Ud.ZodNumber:return function(e){const t={type:"number"};if(!e.checks)return t;for(const n of e.checks)switch(n.kind){case"int":t.type="integer";break;case"min":n.inclusive?t.minimum=n.value:t.exclusiveMinimum=n.value;break;case"max":n.inclusive?t.maximum=n.value:t.exclusiveMaximum=n.value;break;case"multipleOf":t.multipleOf=n.value}return t}(e);case Ud.ZodObject:return function(e,t){const n={type:"object",properties:{}},r=[],u=e.shape();for(const i in u){let e=u[i];if(void 0===e||void 0===e._def)continue;const a=Pf(e),o=Nf(e._def,{...t,currentPath:[...t.currentPath,"properties",i],propertyPath:[...t.currentPath,"properties",i]});void 0!==o&&(n.properties[i]=o,a||r.push(i))}r.length&&(n.required=r);const a=function(e,t){if("ZodNever"!==e.catchall._def.typeName)return Nf(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return"strict"===t.removeAdditionalStrategy?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}(e,t);return void 0!==a&&(n.additionalProperties=a),n}(e,n);case Ud.ZodBigInt:return function(e){const t={type:"integer",format:"int64"};if(!e.checks)return t;for(const n of e.checks)switch(n.kind){case"min":n.inclusive?t.minimum=n.value:t.exclusiveMinimum=n.value;break;case"max":n.inclusive?t.maximum=n.value:t.exclusiveMaximum=n.value;break;case"multipleOf":t.multipleOf=n.value}return t}(e);case Ud.ZodBoolean:return{type:"boolean"};case Ud.ZodDate:return ff(e,n);case Ud.ZodUndefined:return{not:{}};case Ud.ZodNull:return{type:"null"};case Ud.ZodArray:return function(e,t){var n,r,u;const a={type:"array"};return(null==(n=e.type)?void 0:n._def)&&(null==(u=null==(r=e.type)?void 0:r._def)?void 0:u.typeName)!==Ud.ZodAny&&(a.items=Nf(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&(a.minItems=e.minLength.value),e.maxLength&&(a.maxItems=e.maxLength.value),e.exactLength&&(a.minItems=e.exactLength.value,a.maxItems=e.exactLength.value),a}(e,n);case Ud.ZodUnion:case Ud.ZodDiscriminatedUnion:return function(e,t){const n=e.options instanceof Map?Array.from(e.options.values()):e.options;if(n.every(e=>e._def.typeName in Tf&&(!e._def.checks||!e._def.checks.length))){const e=n.reduce((e,t)=>{const n=Tf[t._def.typeName];return n&&!e.includes(n)?[...e,n]:e},[]);return{type:e.length>1?e:e[0]}}if(n.every(e=>"ZodLiteral"===e._def.typeName&&!e.description)){const e=n.reduce((e,t)=>{const n=typeof t._def.value;switch(n){case"string":case"number":case"boolean":return[...e,n];case"bigint":return[...e,"integer"];case"object":if(null===t._def.value)return[...e,"null"];default:return e}},[]);if(e.length===n.length){const t=e.filter((e,t,n)=>n.indexOf(e)===t);return{type:t.length>1?t:t[0],enum:n.reduce((e,t)=>e.includes(t._def.value)?e:[...e,t._def.value],[])}}}else if(n.every(e=>"ZodEnum"===e._def.typeName))return{type:"string",enum:n.reduce((e,t)=>[...e,...t._def.values.filter(t=>!e.includes(t))],[])};return((e,t)=>{const n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((e,n)=>Nf(e._def,{...t,currentPath:[...t.currentPath,"anyOf",`${n}`]})).filter(e=>!!e&&(!t.strictUnions||"object"==typeof e&&Object.keys(e).length>0));return n.length?{anyOf:n}:void 0})(e,t)}(e,n);case Ud.ZodIntersection:return function(e,t){const n=[Nf(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),Nf(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(e=>!!e),r=[];return n.forEach(e=>{if("type"in(t=e)&&"string"===t.type||!("allOf"in t)){let t=e;if("additionalProperties"in e&&!1===e.additionalProperties){const{additionalProperties:n,...r}=e;t=r}r.push(t)}else r.push(...e.allOf);var t}),r.length?{allOf:r}:void 0}(e,n);case Ud.ZodTuple:return function(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((e,n)=>Nf(e._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((e,t)=>void 0===t?e:[...e,t],[]),additionalItems:Nf(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((e,n)=>Nf(e._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((e,t)=>void 0===t?e:[...e,t],[])}}(e,n);case Ud.ZodRecord:return Of(e,n);case Ud.ZodLiteral:return function(e){const t=typeof e.value;return"bigint"!==t&&"number"!==t&&"boolean"!==t&&"string"!==t?{type:Array.isArray(e.value)?"array":"object"}:{type:"bigint"===t?"integer":t,const:e.value}}(e);case Ud.ZodEnum:return function(e){return{type:"string",enum:Array.from(e.values)}}(e);case Ud.ZodNativeEnum:return function(e){const t=e.values,n=Object.keys(e.values).filter(e=>"number"!=typeof t[t[e]]).map(e=>t[e]),r=Array.from(new Set(n.map(e=>typeof e)));return{type:1===r.length?"string"===r[0]?"string":"number":["string","number"],enum:n}}(e);case Ud.ZodNullable:return function(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[Tf[e.innerType._def.typeName],"null"]};const n=Nf(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return n&&{anyOf:[n,{type:"null"}]}}(e,n);case Ud.ZodOptional:return((e,t)=>{var n;if(t.currentPath.toString()===(null==(n=t.propertyPath)?void 0:n.toString()))return Nf(e.innerType._def,t);const r=Nf(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:{}},r]}:{}})(e,n);case Ud.ZodMap:return function(e,t){return"record"===t.mapStrategy?Of(e,t):{type:"array",maxItems:125,items:{type:"array",items:[Nf(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||{},Nf(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||{}],minItems:2,maxItems:2}}}(e,n);case Ud.ZodSet:return function(e,t){const n={type:"array",uniqueItems:!0,items:Nf(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&(n.minItems=e.minSize.value),e.maxSize&&(n.maxItems=e.maxSize.value),n}(e,n);case Ud.ZodLazy:return()=>e.getter()._def;case Ud.ZodPromise:return function(e,t){return Nf(e.type._def,t)}(e,n);case Ud.ZodNaN:case Ud.ZodNever:return{not:{}};case Ud.ZodEffects:return function(e,t){return"input"===t.effectStrategy?Nf(e.schema._def,t):{}}(e,n);case Ud.ZodAny:case Ud.ZodUnknown:return{};case Ud.ZodDefault:return function(e,t){return{...Nf(e.innerType._def,t),default:e.defaultValue()}}(e,n);case Ud.ZodBranded:return df(e,n);case Ud.ZodReadonly:case Ud.ZodCatch:return((e,t)=>Nf(e.innerType._def,t))(e,n);case Ud.ZodPipeline:return((e,t)=>{if("input"===t.pipeStrategy)return Nf(e.in._def,t);if("output"===t.pipeStrategy)return Nf(e.out._def,t);const n=Nf(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]});return{allOf:[n,Nf(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",n?"1":"0"]})].filter(e=>void 0!==e)}})(e,n);case Ud.ZodFunction:case Ud.ZodVoid:case Ud.ZodSymbol:default:return}};function Nf(e,t,n=!1){var r;const u=t.seen.get(e);if(t.override){const a=null==(r=t.override)?void 0:r.call(t,e,t,u,n);if(a!==cf)return a}if(u&&!n){const e=zf(u,t);if(void 0!==e)return e}const a={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,a);const i=jf(e,e.typeName,t),o="function"==typeof i?Nf(i(),t):i;if(o&&Rf(e,t,o),t.postProcess){const n=t.postProcess(o,e,t);return a.jsonSchema=o,n}return a.jsonSchema=o,o}var zf=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:sf(t.currentPath,e.path)};case"none":case"seen":return e.path.lengtht.currentPath[n]===e)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),{}):"seen"===t.$refStrategy?{}:void 0}},Rf=(e,t,n)=>(e.description&&(n.description=e.description),n),Mf=(e,t)=>{var n;const r=(e=>{const t=(e=>"string"==typeof e?{...lf,name:e}:{...lf,...e})(e),n=void 0!==t.name?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([e,n])=>[n._def,{def:n._def,path:[...t.basePath,t.definitionPath,e],jsonSchema:void 0}]))}})(t);let u="object"==typeof t&&t.definitions?Object.entries(t.definitions).reduce((e,[t,n])=>{var u;return{...e,[t]:null!=(u=Nf(n._def,{...r,currentPath:[...r.basePath,r.definitionPath,t]},!0))?u:{}}},{}):void 0;const a="string"==typeof t?t:"title"===(null==t?void 0:t.nameStrategy)||null==t?void 0:t.name,i=null!=(n=Nf(e._def,void 0===a?r:{...r,currentPath:[...r.basePath,r.definitionPath,a]},!1))?n:{},o="object"==typeof t&&void 0!==t.name&&"title"===t.nameStrategy?t.name:void 0;void 0!==o&&(i.title=o);const s=void 0===a?u?{...i,[r.definitionPath]:u}:i:{$ref:[..."relative"===r.$refStrategy?[]:r.basePath,r.definitionPath,a].join("/"),[r.definitionPath]:{...u,[a]:i}};return s.$schema="http://json-schema.org/draft-07/schema#",s};function Zf(e,t){return function(e){return"_zod"in e}(e)?function(e){return $f(()=>function(e,t){if(e instanceof ds){var n,r=new Ts(t),u={},a=f(e._idmap.entries());try{for(a.s();!(n=a.n()).done;){var i=A(n.value,2),o=(i[0],i[1]);r.process(o)}}catch(e){a.e(e)}finally{a.f()}var s,c={},l={registry:e,uri:null==t?void 0:t.uri,defs:u},d=f(e._idmap.entries());try{for(d.s();!(s=d.n()).done;){var h=A(s.value,2),v=h[0],m=h[1];c[v]=r.emit(m,g(g({},t),{},{external:l}))}}catch(e){d.e(e)}finally{d.f()}if(Object.keys(u).length>0){var D="draft-2020-12"===r.target?"$defs":"definitions";c.__shared=p({},D,u)}return{schemas:c}}var y=new Ts(t);return y.process(e),y.emit(e,t)}(e,{target:"draft-7",io:"output",reused:"inline"}),{validate:async t=>{const n=await Vs(e,t);return n.success?{success:!0,value:n.data}:{success:!1,error:n.error}}})}(e):function(e){return $f(()=>Mf(e,{$refStrategy:"none"}),{validate:async t=>{const n=await e.safeParseAsync(t);return n.success?{success:!0,value:n.data}:{success:!1,error:n.error}}})}(e)}var Lf=Symbol.for("vercel.ai.schema");function $f(e,{validate:t}={}){return{[Lf]:!0,_type:void 0,[nf]:!0,get jsonSchema(){return"function"==typeof e&&(e=e()),e},validate:t}}var qf,Uf=Object.defineProperty,Vf="AI_NoObjectGeneratedError",Hf=`vercel.ai.error.${Vf}`,Jf=Symbol.for(Hf),Kf=class extends Ju{constructor({message:e="No object generated.",cause:t,text:n,response:r,usage:u,finishReason:a}){super({name:Vf,message:e,cause:t}),this[qf]=!0,this.text=n,this.response=r,this.usage=u,this.finishReason=a}static isInstance(e){return Ju.hasMarker(e,Hf)}};qf=Jf;var Wf="5.0.93",Qf=$c([rc(),hl(Uint8Array),hl(ArrayBuffer),pl(e=>{var t,n;return null!=(n=null==(t=globalThis.Buffer)?void 0:t.isBuffer(e))&&n},{message:"Must be a Buffer"})]),Gf=new dl({type:"lazy",getter:()=>$c([Ic(),rc(),kc(),xc(),Hc(rc(),Gf),zc(Gf)])}),Yf=Hc(rc(),Hc(rc(),Gf)),Xf=Mc({type:Qc("text"),text:rc(),providerOptions:Yf.optional()}),ep=Mc({type:Qc("image"),image:$c([Qf,hl(URL)]),mediaType:rc().optional(),providerOptions:Yf.optional()}),tp=Mc({type:Qc("file"),data:$c([Qf,hl(URL)]),filename:rc().optional(),mediaType:rc(),providerOptions:Yf.optional()}),np=Mc({type:Qc("reasoning"),text:rc(),providerOptions:Yf.optional()}),rp=Mc({type:Qc("tool-call"),toolCallId:rc(),toolName:rc(),input:Tc(),providerOptions:Yf.optional(),providerExecuted:xc().optional()}),up=new qc(g({type:"union",options:[Mc({type:Qc("text"),value:rc()}),Mc({type:Qc("json"),value:Gf}),Mc({type:Qc("error-text"),value:rc()}),Mc({type:Qc("error-json"),value:Gf}),Mc({type:Qc("content"),value:zc($c([Mc({type:Qc("text"),text:rc()}),Mc({type:Qc("media"),data:rc(),mediaType:rc()})]))})],discriminator:"type"},Na(void 0))),ap=Mc({type:Qc("tool-result"),toolCallId:rc(),toolName:rc(),output:up,providerOptions:Yf.optional()}),ip=Mc({role:Qc("system"),content:rc(),providerOptions:Yf.optional()}),op=Mc({role:Qc("user"),content:$c([rc(),zc($c([Xf,ep,tp]))]),providerOptions:Yf.optional()}),sp=Mc({role:Qc("assistant"),content:$c([rc(),zc($c([Xf,tp,np,rp,ap]))]),providerOptions:Yf.optional()});$c([ip,op,sp,Mc({role:Qc("tool"),content:zc(ap),providerOptions:Yf.optional()})]),Kd({prefix:"aitxt",size:24}),TransformStream;var cp=function(){let e;return()=>(null==e&&(e=Zf($c([Zc({type:Qc("text-start"),id:rc(),providerMetadata:Yf.optional()}),Zc({type:Qc("text-delta"),id:rc(),delta:rc(),providerMetadata:Yf.optional()}),Zc({type:Qc("text-end"),id:rc(),providerMetadata:Yf.optional()}),Zc({type:Qc("error"),errorText:rc()}),Zc({type:Qc("tool-input-start"),toolCallId:rc(),toolName:rc(),providerExecuted:xc().optional(),dynamic:xc().optional()}),Zc({type:Qc("tool-input-delta"),toolCallId:rc(),inputTextDelta:rc()}),Zc({type:Qc("tool-input-available"),toolCallId:rc(),toolName:rc(),input:Tc(),providerExecuted:xc().optional(),providerMetadata:Yf.optional(),dynamic:xc().optional()}),Zc({type:Qc("tool-input-error"),toolCallId:rc(),toolName:rc(),input:Tc(),providerExecuted:xc().optional(),providerMetadata:Yf.optional(),dynamic:xc().optional(),errorText:rc()}),Zc({type:Qc("tool-output-available"),toolCallId:rc(),output:Tc(),providerExecuted:xc().optional(),dynamic:xc().optional(),preliminary:xc().optional()}),Zc({type:Qc("tool-output-error"),toolCallId:rc(),errorText:rc(),providerExecuted:xc().optional(),dynamic:xc().optional()}),Zc({type:Qc("reasoning-start"),id:rc(),providerMetadata:Yf.optional()}),Zc({type:Qc("reasoning-delta"),id:rc(),delta:rc(),providerMetadata:Yf.optional()}),Zc({type:Qc("reasoning-end"),id:rc(),providerMetadata:Yf.optional()}),Zc({type:Qc("source-url"),sourceId:rc(),url:rc(),title:rc().optional(),providerMetadata:Yf.optional()}),Zc({type:Qc("source-document"),sourceId:rc(),mediaType:rc(),title:rc(),filename:rc().optional(),providerMetadata:Yf.optional()}),Zc({type:Qc("file"),url:rc(),mediaType:rc(),providerMetadata:Yf.optional()}),Zc({type:pl(e=>"string"==typeof e&&e.startsWith("data-"),{message:'Type must start with "data-"'}),id:rc().optional(),data:Tc(),transient:xc().optional()}),Zc({type:Qc("start-step")}),Zc({type:Qc("finish-step")}),Zc({type:Qc("start"),messageId:rc().optional(),messageMetadata:Tc().optional()}),Zc({type:Qc("finish"),finishReason:Kc(["stop","length","content-filter","tool-calls","error","other","unknown"]).optional(),messageMetadata:Tc().optional()}),Zc({type:Qc("abort")}),Zc({type:Qc("message-metadata"),messageMetadata:Tc()})]))),e)}();function lp(e,t){if(void 0===e&&void 0===t)return;if(void 0===e)return t;if(void 0===t)return e;const n={...e};for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const u=t[r];if(void 0===u)continue;const a=r in e?e[r]:void 0,i=!(null===u||"object"!=typeof u||Array.isArray(u)||u instanceof Date||u instanceof RegExp),o=!(null==a||"object"!=typeof a||Array.isArray(a)||a instanceof Date||a instanceof RegExp);n[r]=i&&o?lp(a,u):u}return n}function dp(e){const t=["ROOT"];let n=-1,r=null;function u(e,u,a){switch(e){case'"':n=u,t.pop(),t.push(a),t.push("INSIDE_STRING");break;case"f":case"t":case"n":n=u,r=u,t.pop(),t.push(a),t.push("INSIDE_LITERAL");break;case"-":t.pop(),t.push(a),t.push("INSIDE_NUMBER");break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":n=u,t.pop(),t.push(a),t.push("INSIDE_NUMBER");break;case"{":n=u,t.pop(),t.push(a),t.push("INSIDE_OBJECT_START");break;case"[":n=u,t.pop(),t.push(a),t.push("INSIDE_ARRAY_START")}}function a(e,r){switch(e){case",":t.pop(),t.push("INSIDE_OBJECT_AFTER_COMMA");break;case"}":n=r,t.pop()}}function i(e,r){switch(e){case",":t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break;case"]":n=r,t.pop()}}for(let s=0;s=0;s--)switch(t[s]){case"INSIDE_STRING":o+='"';break;case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":o+="}";break;case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":o+="]";break;case"INSIDE_LITERAL":{const t=e.substring(r,e.length);"true".startsWith(t)?o+="true".slice(t.length):"false".startsWith(t)?o+="false".slice(t.length):"null".startsWith(t)&&(o+="null".slice(t.length))}}return o}async function fp(e){if(void 0===e)return{value:void 0,state:"undefined-input"};let t=await af({text:e});return t.success?{value:t.value,state:"successful-parse"}:(t=await af({text:dp(e)}),t.success?{value:t.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}function pp(e){return e.type.startsWith("tool-")}function hp(e){return pp(e)||function(e){return"dynamic-tool"===e.type}(e)}function vp(e){return e.type.split("-").slice(1).join("-")}function mp({lastMessage:e,messageId:t}){return{message:"assistant"===(null==e?void 0:e.role)?e:{id:t,metadata:void 0,role:"assistant",parts:[]},activeTextParts:{},activeReasoningParts:{},partialToolCalls:{}}}function Dp({stream:e,messageMetadataSchema:t,dataPartSchemas:n,runUpdateMessageJob:r,onError:u,onToolCall:a,onData:i}){return e.pipeThrough(new TransformStream({async transform(e,o){await r(async({state:r,write:s})=>{var c,l,d,f;function p(e){const t=r.message.parts.filter(pp).find(t=>t.toolCallId===e);if(null==t)throw new Error("tool-output-error must be preceded by a tool-input-available");return t}function h(e){const t=r.message.parts.filter(e=>"dynamic-tool"===e.type).find(t=>t.toolCallId===e);if(null==t)throw new Error("tool-output-error must be preceded by a tool-input-available");return t}function v(e){var t;const n=r.message.parts.find(t=>pp(t)&&t.toolCallId===e.toolCallId),u=e,a=n;null!=n?(n.state=e.state,a.input=u.input,a.output=u.output,a.errorText=u.errorText,a.rawInput=u.rawInput,a.preliminary=u.preliminary,a.providerExecuted=null!=(t=u.providerExecuted)?t:n.providerExecuted,null!=u.providerMetadata&&"input-available"===n.state&&(n.callProviderMetadata=u.providerMetadata)):r.message.parts.push({type:`tool-${e.toolName}`,toolCallId:e.toolCallId,state:e.state,input:u.input,output:u.output,rawInput:u.rawInput,errorText:u.errorText,providerExecuted:u.providerExecuted,preliminary:u.preliminary,...null!=u.providerMetadata?{callProviderMetadata:u.providerMetadata}:{}})}function m(e){var t,n;const u=r.message.parts.find(t=>"dynamic-tool"===t.type&&t.toolCallId===e.toolCallId),a=e,i=u;null!=u?(u.state=e.state,i.toolName=e.toolName,i.input=a.input,i.output=a.output,i.errorText=a.errorText,i.rawInput=null!=(t=a.rawInput)?t:i.rawInput,i.preliminary=a.preliminary,i.providerExecuted=null!=(n=a.providerExecuted)?n:u.providerExecuted,null!=a.providerMetadata&&"input-available"===u.state&&(u.callProviderMetadata=a.providerMetadata)):r.message.parts.push({type:"dynamic-tool",toolName:e.toolName,toolCallId:e.toolCallId,state:e.state,input:a.input,output:a.output,errorText:a.errorText,preliminary:a.preliminary,providerExecuted:a.providerExecuted,...null!=a.providerMetadata?{callProviderMetadata:a.providerMetadata}:{}})}async function D(e){if(null!=e){const n=null!=r.message.metadata?lp(r.message.metadata,e):e;null!=t&&await rf({value:n,schema:t}),r.message.metadata=n}}switch(e.type){case"text-start":{const t={type:"text",text:"",providerMetadata:e.providerMetadata,state:"streaming"};r.activeTextParts[e.id]=t,r.message.parts.push(t),s();break}case"text-delta":{const t=r.activeTextParts[e.id];t.text+=e.delta,t.providerMetadata=null!=(c=e.providerMetadata)?c:t.providerMetadata,s();break}case"text-end":{const t=r.activeTextParts[e.id];t.state="done",t.providerMetadata=null!=(l=e.providerMetadata)?l:t.providerMetadata,delete r.activeTextParts[e.id],s();break}case"reasoning-start":{const t={type:"reasoning",text:"",providerMetadata:e.providerMetadata,state:"streaming"};r.activeReasoningParts[e.id]=t,r.message.parts.push(t),s();break}case"reasoning-delta":{const t=r.activeReasoningParts[e.id];t.text+=e.delta,t.providerMetadata=null!=(d=e.providerMetadata)?d:t.providerMetadata,s();break}case"reasoning-end":{const t=r.activeReasoningParts[e.id];t.providerMetadata=null!=(f=e.providerMetadata)?f:t.providerMetadata,t.state="done",delete r.activeReasoningParts[e.id],s();break}case"file":r.message.parts.push({type:"file",mediaType:e.mediaType,url:e.url}),s();break;case"source-url":r.message.parts.push({type:"source-url",sourceId:e.sourceId,url:e.url,title:e.title,providerMetadata:e.providerMetadata}),s();break;case"source-document":r.message.parts.push({type:"source-document",sourceId:e.sourceId,mediaType:e.mediaType,title:e.title,filename:e.filename,providerMetadata:e.providerMetadata}),s();break;case"tool-input-start":{const t=r.message.parts.filter(pp);r.partialToolCalls[e.toolCallId]={text:"",toolName:e.toolName,index:t.length,dynamic:e.dynamic},e.dynamic?m({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-streaming",input:void 0,providerExecuted:e.providerExecuted}):v({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-streaming",input:void 0,providerExecuted:e.providerExecuted}),s();break}case"tool-input-delta":{const t=r.partialToolCalls[e.toolCallId];t.text+=e.inputTextDelta;const{value:n}=await fp(t.text);t.dynamic?m({toolCallId:e.toolCallId,toolName:t.toolName,state:"input-streaming",input:n}):v({toolCallId:e.toolCallId,toolName:t.toolName,state:"input-streaming",input:n}),s();break}case"tool-input-available":e.dynamic?m({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-available",input:e.input,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}):v({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-available",input:e.input,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}),s(),a&&!e.providerExecuted&&await a({toolCall:e});break;case"tool-input-error":e.dynamic?m({toolCallId:e.toolCallId,toolName:e.toolName,state:"output-error",input:e.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}):v({toolCallId:e.toolCallId,toolName:e.toolName,state:"output-error",input:void 0,rawInput:e.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}),s();break;case"tool-output-available":if(e.dynamic){const t=h(e.toolCallId);m({toolCallId:e.toolCallId,toolName:t.toolName,state:"output-available",input:t.input,output:e.output,preliminary:e.preliminary})}else{const t=p(e.toolCallId);v({toolCallId:e.toolCallId,toolName:vp(t),state:"output-available",input:t.input,output:e.output,providerExecuted:e.providerExecuted,preliminary:e.preliminary})}s();break;case"tool-output-error":if(e.dynamic){const t=h(e.toolCallId);m({toolCallId:e.toolCallId,toolName:t.toolName,state:"output-error",input:t.input,errorText:e.errorText,providerExecuted:e.providerExecuted})}else{const t=p(e.toolCallId);v({toolCallId:e.toolCallId,toolName:vp(t),state:"output-error",input:t.input,rawInput:t.rawInput,errorText:e.errorText,providerExecuted:e.providerExecuted})}s();break;case"start-step":r.message.parts.push({type:"step-start"});break;case"finish-step":r.activeTextParts={},r.activeReasoningParts={};break;case"start":null!=e.messageId&&(r.message.id=e.messageId),await D(e.messageMetadata),null==e.messageId&&null==e.messageMetadata||s();break;case"finish":null!=e.finishReason&&(r.finishReason=e.finishReason),await D(e.messageMetadata),null!=e.messageMetadata&&s();break;case"message-metadata":await D(e.messageMetadata),null!=e.messageMetadata&&s();break;case"error":null==u||u(new Error(e.errorText));break;default:if(function(e){return e.type.startsWith("data-")}(e)){null!=(null==n?void 0:n[e.type])&&await rf({value:e.data,schema:n[e.type]});const t=e;if(t.transient){null==i||i(t);break}const u=null!=t.id?r.message.parts.find(e=>t.type===e.type&&t.id===e.id):void 0;null!=u?u.data=t.data:r.message.parts.push(t),null==i||i(t),s()}}o.enqueue(e)})}}))}Kd({prefix:"aitxt",size:24}),Kd({prefix:"aiobj",size:24});var yp=class{constructor(){this.queue=[],this.isProcessing=!1}async processQueue(){if(!this.isProcessing){for(this.isProcessing=!0;this.queue.length>0;)await this.queue[0](),this.queue.shift();this.isProcessing=!1}}async run(e){return new Promise((t,n)=>{this.queue.push(async()=>{try{await e(),t()}catch(e){n(e)}}),this.processQueue()})}};Kd({prefix:"aiobj",size:24}),((e,t)=>{for(var n in t)Uf(e,n,{get:t[n],enumerable:!0})})({},{object:()=>bp,text:()=>Ep});var gp,Fp,Ep=()=>({type:"text",responseFormat:{type:"text"},parsePartial:async({text:e})=>({partial:e}),parseOutput:async({text:e})=>e}),bp=({schema:e})=>{const t=function(e){return null==e?$f({properties:{},additionalProperties:!1}):"object"==typeof(t=e)&&null!==t&&Lf in t&&!0===t[Lf]&&"jsonSchema"in t&&"validate"in t?e:"function"==typeof e?e():Zf(e);var t}(e);return{type:"object",responseFormat:{type:"json",schema:t.jsonSchema},async parsePartial({text:e}){const t=await fp(e);switch(t.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:t.value};default:{const e=t.state;throw new Error(`Unsupported parse state: ${e}`)}}},async parseOutput({text:e},n){const r=await af({text:e});if(!r.success)throw new Kf({message:"No object generated: could not parse the response.",cause:r.error,text:e,response:n.response,usage:n.usage,finishReason:n.finishReason});const u=await uf({value:r.value,schema:t});if(!u.success)throw new Kf({message:"No object generated: response did not match schema.",cause:u.error,text:e,response:n.response,usage:n.usage,finishReason:n.finishReason});return u.value}}},Cp=class{constructor({api:e="/api/chat",credentials:t,headers:n,body:r,fetch:u,prepareSendMessagesRequest:a,prepareReconnectToStreamRequest:i}){this.api=e,this.credentials=t,this.headers=n,this.body=r,this.fetch=u,this.prepareSendMessagesRequest=a,this.prepareReconnectToStreamRequest=i}async sendMessages({abortSignal:e,...t}){var n,r,u,a,i;const o=await of(this.body),s=await of(this.headers),c=await of(this.credentials),l={...Gd(s),...Gd(t.headers)},d=await(null==(n=this.prepareSendMessagesRequest)?void 0:n.call(this,{api:this.api,id:t.chatId,messages:t.messages,body:{...o,...t.body},headers:l,credentials:c,requestMetadata:t.metadata,trigger:t.trigger,messageId:t.messageId})),f=null!=(r=null==d?void 0:d.api)?r:this.api,p=void 0!==(null==d?void 0:d.headers)?Gd(d.headers):l,h=void 0!==(null==d?void 0:d.body)?d.body:{...o,...t.body,id:t.chatId,messages:t.messages,trigger:t.trigger,messageId:t.messageId},v=null!=(u=null==d?void 0:d.credentials)?u:c,m=null!=(a=this.fetch)?a:globalThis.fetch,D=await m(f,{method:"POST",headers:Yd({"Content-Type":"application/json",...p},`ai-sdk/${Wf}`,Qd()),body:JSON.stringify(h),credentials:v,signal:e});if(!D.ok)throw new Error(null!=(i=await D.text())?i:"Failed to fetch the chat response.");if(!D.body)throw new Error("The response body is empty.");return this.processResponseStream(D.body)}async reconnectToStream(e){var t,n,r,u,a;const i=await of(this.body),o=await of(this.headers),s=await of(this.credentials),c={...Gd(o),...Gd(e.headers)},l=await(null==(t=this.prepareReconnectToStreamRequest)?void 0:t.call(this,{api:this.api,id:e.chatId,body:{...i,...e.body},headers:c,credentials:s,requestMetadata:e.metadata})),d=null!=(n=null==l?void 0:l.api)?n:`${this.api}/${e.chatId}/stream`,f=void 0!==(null==l?void 0:l.headers)?Gd(l.headers):c,p=null!=(r=null==l?void 0:l.credentials)?r:s,h=null!=(u=this.fetch)?u:globalThis.fetch,v=await h(d,{method:"GET",headers:Yd(f,`ai-sdk/${Wf}`,Qd()),credentials:p});if(204===v.status)return null;if(!v.ok)throw new Error(null!=(a=await v.text())?a:"Failed to fetch the chat response.");if(!v.body)throw new Error("The response body is empty.");return this.processResponseStream(v.body)}},Ap=class extends Cp{constructor(e={}){super(e)}processResponseStream(e){return function({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new fa).pipeThrough(new TransformStream({async transform({data:e},n){"[DONE]"!==e&&n.enqueue(await af({text:e,schema:t}))}}))}({stream:e,schema:cp}).pipeThrough(new TransformStream({async transform(e,t){if(!e.success)throw e.error;t.enqueue(e.value)}}))}},kp=class{constructor({generateId:e=Wd,id:t=e(),transport:n=new Ap,messageMetadataSchema:r,dataPartSchemas:u,state:a,onError:i,onToolCall:o,onFinish:s,onData:c,sendAutomaticallyWhen:l}){this.activeResponse=void 0,this.jobExecutor=new yp,this.sendMessage=async(e,t)=>{var n,r,u,a;if(null==e)return void await this.makeRequest({trigger:"submit-message",messageId:null==(n=this.lastMessage)?void 0:n.id,...t});let i;if("text"in e||"files"in e){const t=Array.isArray(e.files)?e.files:await async function(e){if(null==e)return[];if(!(globalThis.FileList&&e instanceof globalThis.FileList))throw new Error("FileList is not supported in the current environment");return Promise.all(Array.from(e).map(async e=>{const{name:t,type:n}=e;return{type:"file",mediaType:n,filename:t,url:await new Promise((t,n)=>{const r=new FileReader;r.onload=e=>{var n;t(null==(n=e.target)?void 0:n.result)},r.onerror=e=>n(e),r.readAsDataURL(e)})}}))}(e.files);i={parts:[...t,..."text"in e&&null!=e.text?[{type:"text",text:e.text}]:[]]}}else i=e;if(null!=e.messageId){const t=this.state.messages.findIndex(t=>t.id===e.messageId);if(-1===t)throw new Error(`message with id ${e.messageId} not found`);if("user"!==this.state.messages[t].role)throw new Error(`message with id ${e.messageId} is not a user message`);this.state.messages=this.state.messages.slice(0,t+1),this.state.replaceMessage(t,{...i,id:e.messageId,role:null!=(r=i.role)?r:"user",metadata:e.metadata})}else this.state.pushMessage({...i,id:null!=(u=i.id)?u:this.generateId(),role:null!=(a=i.role)?a:"user",metadata:e.metadata});await this.makeRequest({trigger:"submit-message",messageId:e.messageId,...t})},this.regenerate=async({messageId:e,...t}={})=>{const n=null==e?this.state.messages.length-1:this.state.messages.findIndex(t=>t.id===e);if(-1===n)throw new Error(`message ${e} not found`);this.state.messages=this.state.messages.slice(0,"assistant"===this.messages[n].role?n:n+1),await this.makeRequest({trigger:"regenerate-message",messageId:e,...t})},this.resumeStream=async(e={})=>{await this.makeRequest({trigger:"resume-stream",...e})},this.clearError=()=>{"error"===this.status&&(this.state.error=void 0,this.setStatus({status:"ready"}))},this.addToolOutput=async({state:e="output-available",tool:t,toolCallId:n,output:r,errorText:u})=>this.jobExecutor.run(async()=>{var t,a;const i=this.state.messages,o=i[i.length-1];this.state.replaceMessage(i.length-1,{...o,parts:o.parts.map(t=>hp(t)&&t.toolCallId===n?{...t,state:e,output:r,errorText:u}:t)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(t=>hp(t)&&t.toolCallId===n?{...t,state:e,output:r,errorText:u}:t)),"streaming"!==this.status&&"submitted"!==this.status&&(null==(t=this.sendAutomaticallyWhen)?void 0:t.call(this,{messages:this.state.messages}))&&this.makeRequest({trigger:"submit-message",messageId:null==(a=this.lastMessage)?void 0:a.id})}),this.addToolResult=this.addToolOutput,this.stop=async()=>{var e;"streaming"!==this.status&&"submitted"!==this.status||(null==(e=this.activeResponse)?void 0:e.abortController)&&this.activeResponse.abortController.abort()},this.id=t,this.transport=n,this.generateId=e,this.messageMetadataSchema=r,this.dataPartSchemas=u,this.state=a,this.onError=i,this.onToolCall=o,this.onFinish=s,this.onData=c,this.sendAutomaticallyWhen=l}get status(){return this.state.status}setStatus({status:e,error:t}){this.status!==e&&(this.state.status=e,this.state.error=t)}get error(){return this.state.error}get messages(){return this.state.messages}get lastMessage(){return this.state.messages[this.state.messages.length-1]}set messages(e){this.state.messages=e}async makeRequest({trigger:e,metadata:t,headers:n,body:r,messageId:u}){var a,i,o,s;this.setStatus({status:"submitted",error:void 0});const c=this.lastMessage;let l=!1,d=!1,f=!1;try{const a={state:mp({lastMessage:this.state.snapshot(c),messageId:this.generateId()}),abortController:new AbortController};let i;if(a.abortController.signal.addEventListener("abort",()=>{l=!0}),this.activeResponse=a,"resume-stream"===e){const e=await this.transport.reconnectToStream({chatId:this.id,metadata:t,headers:n,body:r});if(null==e)return void this.setStatus({status:"ready"});i=e}else i=await this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:a.abortController.signal,metadata:t,headers:n,body:r,trigger:e,messageId:u});const o=e=>this.jobExecutor.run(()=>e({state:a.state,write:()=>{var e;this.setStatus({status:"streaming"}),a.state.message.id===(null==(e=this.lastMessage)?void 0:e.id)?this.state.replaceMessage(this.state.messages.length-1,a.state.message):this.state.pushMessage(a.state.message)}}));await async function({stream:e,onError:t}){const n=e.getReader();try{for(;;){const{done:e}=await n.read();if(e)break}}catch(e){null==t||t(e)}finally{n.releaseLock()}}({stream:Dp({stream:i,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:o,onError:e=>{throw e}}),onError:e=>{throw e}}),this.setStatus({status:"ready"})}catch(e){if(l||"AbortError"===e.name)return l=!0,this.setStatus({status:"ready"}),null;f=!0,e instanceof TypeError&&(e.message.toLowerCase().includes("fetch")||e.message.toLowerCase().includes("network"))&&(d=!0),this.onError&&e instanceof Error&&this.onError(e),this.setStatus({status:"error",error:e})}finally{try{null==(i=this.onFinish)||i.call(this,{message:this.activeResponse.state.message,messages:this.state.messages,isAbort:l,isDisconnect:d,isError:f,finishReason:null==(a=this.activeResponse)?void 0:a.state.finishReason})}catch(e){console.error(e)}this.activeResponse=void 0}(null==(o=this.sendAutomaticallyWhen)?void 0:o.call(this,{messages:this.state.messages}))&&!f&&await this.makeRequest({trigger:"submit-message",messageId:null==(s=this.lastMessage)?void 0:s.id,metadata:t,headers:n,body:r})}};function wp({messages:e}){const t=e[e.length-1];if(!t)return!1;if("assistant"!==t.role)return!1;const n=t.parts.reduce((e,t,n)=>"step-start"===t.type?n:e,-1),r=t.parts.slice(n+1).filter(hp).filter(e=>!e.providerExecuted);return r.length>0&&r.every(e=>"output-available"===e.state||"output-error"===e.state)}var _p,Sp,xp,Bp,Ip,Op,Tp,Pp,jp,Np,zp=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((Fp||(Fp=1,gp=function(e,t){if("function"!=typeof e)throw new TypeError("Expected the first argument to be a `function`, got `".concat(_(e),"`."));var n,r=0;return function(){for(var u=this,a=arguments.length,i=new Array(a),o=0;o{if(!t.has(e))throw TypeError("Cannot "+n)},Mp=(e,t,n)=>(Rp(e,t,"read from private field"),n?n.call(e):t.get(e)),Zp=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Lp=(e,t,n,r)=>(Rp(e,t,"write to private field"),t.set(e,n),n),$p=class{constructor(e=[]){Zp(this,_p,void 0),Zp(this,Sp,"ready"),Zp(this,xp,void 0),Zp(this,Bp,new Set),Zp(this,Ip,new Set),Zp(this,Op,new Set),this.pushMessage=e=>{Lp(this,_p,Mp(this,_p).concat(e)),Mp(this,Tp).call(this)},this.popMessage=()=>{Lp(this,_p,Mp(this,_p).slice(0,-1)),Mp(this,Tp).call(this)},this.replaceMessage=(e,t)=>{Lp(this,_p,[...Mp(this,_p).slice(0,e),this.snapshot(t),...Mp(this,_p).slice(e+1)]),Mp(this,Tp).call(this)},this.snapshot=e=>structuredClone(e),this["~registerMessagesCallback"]=(e,t)=>{const n=t?(r=e,null!=(u=t)?zp(r,u):r):e;var r,u;return Mp(this,Bp).add(n),()=>{Mp(this,Bp).delete(n)}},this["~registerStatusCallback"]=e=>(Mp(this,Ip).add(e),()=>{Mp(this,Ip).delete(e)}),this["~registerErrorCallback"]=e=>(Mp(this,Op).add(e),()=>{Mp(this,Op).delete(e)}),Zp(this,Tp,()=>{Mp(this,Bp).forEach(e=>e())}),Zp(this,Pp,()=>{Mp(this,Ip).forEach(e=>e())}),Zp(this,jp,()=>{Mp(this,Op).forEach(e=>e())}),Lp(this,_p,e)}get status(){return Mp(this,Sp)}set status(e){Lp(this,Sp,e),Mp(this,Pp).call(this)}get error(){return Mp(this,xp)}set error(e){Lp(this,xp,e),Mp(this,jp).call(this)}get messages(){return Mp(this,_p)}set messages(e){Lp(this,_p,[...e]),Mp(this,Tp).call(this)}};_p=new WeakMap,Sp=new WeakMap,xp=new WeakMap,Bp=new WeakMap,Ip=new WeakMap,Op=new WeakMap,Tp=new WeakMap,Pp=new WeakMap,jp=new WeakMap;var qp=class extends kp{constructor({messages:e,...t}){const n=new $p(e);super({...t,state:n}),Zp(this,Np,void 0),this["~registerMessagesCallback"]=(e,t)=>Mp(this,Np)["~registerMessagesCallback"](e,t),this["~registerStatusCallback"]=e=>Mp(this,Np)["~registerStatusCallback"](e),this["~registerErrorCallback"]=e=>Mp(this,Np)["~registerErrorCallback"](e),Lp(this,Np,n)}};Np=new WeakMap;var Up="askai_token",Vp=function(e){return"https://".concat(e,".algolia.net/agent-studio/1")},Hp=function(e){if(!e)return!0;try{var t=function(e){var t=A(e.split("."),1)[0];return JSON.parse(atob(t))}(e),n=t.exp;return Date.now()/1e3>n-30}catch(e){return!0}},Jp=null,Kp=function(){var e=i(E().m(function e(t){var n,r,u,a,i,o;return E().w(function(e){for(;;)switch(e.n){case 0:if(n=t.assistantId,r=t.abortSignal,u=t.useStagingEnv,a=void 0!==u&&u,i=sessionStorage.getItem(Up),Hp(i)){e.n=1;break}return e.a(2,i);case 1:return o=a?Ut:qt,Jp||(Jp=fetch("".concat(o,"/token"),{method:"POST",headers:{"x-algolia-assistant-id":n,"content-type":"application/json"},signal:r}).then(function(e){return e.json()}).then(function(e){var t=e.token,n=e.success,r=e.message;if(!n&&r)throw new Error(r);return sessionStorage.setItem(Up,t),t}).finally(function(){return Jp=null})),e.a(2,Jp)}},e)}));return function(t){return e.apply(this,arguments)}}(),Wp=function(){var e=i(E().m(function e(t){var n,r,u,a,i,o,s,c,l,d;return E().w(function(e){for(;;)switch(e.n){case 0:return n=t.assistantId,r=t.thumbs,u=t.messageId,a=t.appId,i=t.abortSignal,o=t.useStagingEnv,s=void 0!==o&&o,(c=new Headers).set("x-algolia-assistant-id",n),c.set("content-type","application/json"),e.n=1,Kp({assistantId:n,abortSignal:i,useStagingEnv:s});case 1:return l=e.v,c.set("authorization","TOKEN ".concat(l)),d=s?Ut:qt,e.a(2,fetch("".concat(d,"/feedback"),{method:"POST",body:JSON.stringify({appId:a,messageId:u,thumbs:r}),headers:c}))}},e)}));return function(t){return e.apply(this,arguments)}}(),Qp=function(e){var t=e.agentId,n=e.vote,r=e.messageId,u=e.appId,a=e.apiKey,i=e.abortSignal,o=new Headers;o.set("x-algolia-application-id",u),o.set("x-algolia-api-key",a),o.set("content-type","application/json");var s="".concat(Vp(u),"/feedback");return fetch(s,{method:"POST",body:JSON.stringify({messageId:r,agentId:t,vote:n}),headers:o,signal:i})},Gp=["assistantId","apiKey","appId","indexName","useStagingEnv"];function Yp(e){var t,n="algolia-client-js-".concat(e.key);function r(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function u(){return JSON.parse(r().getItem(n)||"{}")}function a(e){r().setItem(n,JSON.stringify(e))}return{get:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then(function(){var n,r,i;return n=e.timeToLive?1e3*e.timeToLive:null,r=u(),a(i=Object.fromEntries(Object.entries(r).filter(function(e){return void 0!==A(e,2)[1].timestamp}))),n&&a(Object.fromEntries(Object.entries(i).filter(function(e){var t=A(e,2)[1],r=(new Date).getTime();return!(t.timestamp+n2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then(function(e){return Promise.all([e,n.miss(e)])}).then(function(e){return A(e,1)[0]})},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,r){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return n.get(e,r,u).catch(function(){return Xp({caches:t}).get(e,r,u)})},set:function(e,r){return n.set(e,r).catch(function(){return Xp({caches:t}).set(e,r)})},delete:function(e){return n.delete(e).catch(function(){return Xp({caches:t}).delete(e)})},clear:function(){return n.clear().catch(function(){return Xp({caches:t}).clear()})}}}function eh(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(n,r){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(n);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var i=r();return i.then(function(e){return u.miss(e)}).then(function(){return i})},set:function(n,r){return t[JSON.stringify(n)]=e.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function th(e){var t=e.algoliaAgents,n=e.client,r=e.version,u=function(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var n="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(n)&&(t.value="".concat(t.value).concat(n)),t}};return t}(r).add({segment:n,version:r});return t.forEach(function(e){return u.add(e)}),u}var nh=12e4;function rh(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"up",n=Date.now();return g(g({},e),{},{status:t,lastUpdate:n,isUp:function(){return"up"===t||Date.now()-n>nh},isTimedOut:function(){return"timed out"===t&&Date.now()-n<=nh}})}var uh=function(){function e(t,n){var r;return s(this,e),p(r=o(this,e,[t]),"name","AlgoliaError"),n&&(r.name=n),r}return m(e,x(Error)),d(e)}(),ah=function(){function e(t,n,r){var u;return s(this,e),p(u=o(this,e,[t,r]),"stackTrace",void 0),u.stackTrace=n,u}return m(e,uh),d(e)}(),ih=function(){function e(t){return s(this,e),o(this,e,["Unreachable hosts - your application id may be incorrect. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support",t,"RetryError"])}return m(e,ah),d(e)}(),oh=function(){function e(t,n,r){var u,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"ApiError";return s(this,e),p(u=o(this,e,[t,r,a]),"status",void 0),u.status=n,u}return m(e,ah),d(e)}(),sh=function(){function e(t,n){var r;return s(this,e),p(r=o(this,e,[t,"DeserializationError"]),"response",void 0),r.response=n,r}return m(e,uh),d(e)}(),ch=function(){function e(t,n,r,u){var a;return s(this,e),p(a=o(this,e,[t,n,u,"DetailedApiError"]),"error",void 0),a.error=r,a}return m(e,oh),d(e)}();function lh(e,t,n){var r,u=(r=n,Object.keys(r).filter(function(e){return void 0!==r[e]}).sort().map(function(e){return"".concat(e,"=").concat(encodeURIComponent("[object Array]"===Object.prototype.toString.call(r[e])?r[e].join(","):r[e]).replace(/\+/g,"%20"))}).join("&")),a="".concat(e.protocol,"://").concat(e.url).concat(e.port?":".concat(e.port):"","/").concat("/"===t.charAt(0)?t.substring(1):t);return u.length&&(a+="?".concat(u)),a}function dh(e,t){if("GET"!==e.method&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:g(g({},e.data),t.data);return JSON.stringify(n)}}function fh(e,t,n){var r=g(g(g({Accept:"application/json"},e),t),n),u={};return Object.keys(r).forEach(function(e){var t=r[e];u[e.toLowerCase()]=t}),u}function ph(e){try{return JSON.parse(e.content)}catch(t){throw new sh(t.message,e)}}function hh(e,t){var n=e.content,r=e.status;try{var u=JSON.parse(n);return"error"in u?new ch(u.message,r,u.error,t):new oh(u.message,r,t)}catch(e){}return new oh(n,r,t)}function vh(e){var t=e.isTimedOut,n=e.status;return t||function(e){return!e.isTimedOut&&0===~~e.status}({isTimedOut:t,status:n})||2!=~~(n/100)&&4!=~~(n/100)}function mh(e){return 2==~~(e.status/100)}function Dh(e){return e.map(function(e){return yh(e)})}function yh(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return g(g({},e),{},{request:g(g({},e.request),{},{headers:g(g({},e.request.headers),t)})})}var gh=["appId","apiKey","authMode","algoliaAgents"],Fh=["params"],Eh="5.43.0";function bh(e){return[{url:"".concat(e,"-dsn.algolia.net"),accept:"read",protocol:"https"},{url:"".concat(e,".algolia.net"),accept:"write",protocol:"https"}].concat(function(e){for(var t=e,n=e.length-1;n>0;n--){var r=Math.floor(Math.random()*(n+1)),u=e[n];t[n]=e[r],t[r]=u}return t}([{url:"".concat(e,"-1.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-2.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-3.algolianet.com"),accept:"readWrite",protocol:"https"}]))}var Ch="4.6.3";function Ah(e,t,n){var u=r.useMemo(function(){var r=function(e,t){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!t||"string"!=typeof t)throw new Error("`apiKey` is missing.");return function(e){var t=e.appId,n=e.apiKey,r=e.authMode,u=e.algoliaAgents,a=F(e,gh),o=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"WithinHeaders",r={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:function(){return"WithinHeaders"===n?r:{}},queryParameters:function(){return"WithinQueryParameters"===n?r:{}}}}(t,n,r),s=function(e){var t=e.hosts,n=e.hostsCache,r=e.baseHeaders,u=e.logger,a=e.baseQueryParameters,o=e.algoliaAgent,s=e.timeouts,c=e.requester,l=e.requestsCache,d=e.responsesCache;function f(e){return p.apply(this,arguments)}function p(){return(p=i(E().m(function e(t){var r,u,a,i,o;return E().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Promise.all(t.map(function(e){return n.get(e,function(){return Promise.resolve(rh(e))})}));case 1:return r=e.v,u=r.filter(function(e){return e.isUp()}),a=r.filter(function(e){return e.isTimedOut()}),i=[].concat(k(u),k(a)),o=i.length>0?i:t,e.a(2,{hosts:o,getTimeout:function(e,t){return(0===a.length&&0===e?1:a.length+3+e)*t}})}},e)}))).apply(this,arguments)}function h(e,t){return v.apply(this,arguments)}function v(){return v=i(E().m(function e(l,d){var p,h,v,m,D,y,F,b,C,A,w,_,S,x=arguments;return E().w(function(e){for(;;)switch(e.n){case 0:if(p=!(x.length>2&&void 0!==x[2])||x[2],h=[],v=dh(l,d),m=fh(r,l.headers,d.headers),D="GET"===l.method?g(g({},l.data),d.data):{},y=g(g(g({},a),l.queryParameters),D),o.value&&(y["x-algolia-agent"]=o.value),d&&d.queryParameters)for(F=0,b=Object.keys(d.queryParameters);F1&&void 0!==arguments[1]?arguments[1]:{},n=e.useReadTransporter||"GET"===e.method;if(!n)return h(e,t,n);var u=function(){return h(e,t)};if(!0!==(t.cacheable||e.cacheable))return u();var i={request:e,requestOptions:t,transporter:{queryParameters:a,headers:r}};return d.get(i,function(){return l.get(i,function(){return l.set(i,u()).then(function(e){return Promise.all([l.delete(i),e])},function(e){return Promise.all([l.delete(i),Promise.reject(e)])}).then(function(e){var t=A(e,2);return t[0],t[1]})})},{miss:function(e){return d.set(i,e)}})},requestsCache:l,responsesCache:d}}(g(g({hosts:bh(t)},a),{},{algoliaAgent:th({algoliaAgents:u,client:"Lite",version:Eh}),baseHeaders:g(g({"content-type":"text/plain"},o.headers()),a.baseHeaders),baseQueryParameters:g(g({},o.queryParameters()),a.baseQueryParameters)}));return{transporter:s,appId:t,apiKey:n,clearCache:function(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then(function(){})},get _ua(){return s.algoliaAgent.value},addAlgoliaAgent:function(e,t){s.algoliaAgent.add({segment:e,version:t})},setClientApiKey:function(e){var t=e.apiKey;r&&"WithinHeaders"!==r?s.baseQueryParameters["x-algolia-api-key"]=t:s.baseHeaders["x-algolia-api-key"]=t},searchForHits:function(e,t){return this.search(e,t)},searchForFacets:function(e,t){return this.search(e,t)},customPost:function(e,t){var n=e.path,r=e.parameters,u=e.body;if(!n)throw new Error("Parameter `path` is required when calling `customPost`.");var a={method:"POST",path:"/{path}".replace("{path}",n),queryParameters:r||{},headers:{},data:u||{}};return s.request(a,t)},getRecommendations:function(e,t){if(e&&Array.isArray(e)&&(e={requests:e}),!e)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!e.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");var n={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return s.request(n,t)},search:function(e,t){if(e&&Array.isArray(e)){var n={requests:e.map(function(e){var t=e.params,n=F(e,Fh);return"facet"===n.type?g(g(g({},n),t),{},{type:"facet"}):g(g(g({},n),t),{},{facet:void 0,maxFacetHits:void 0,facetQuery:void 0})})};e=n}if(!e)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!e.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");var r={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return s.request(r,t)}}}(g({appId:e,apiKey:t,timeouts:{connect:1e3,read:2e3,write:3e4},logger:{debug:function(e,t){return Promise.resolve()},info:function(e,t){return Promise.resolve()},error:function(e,t){return Promise.resolve()}},requester:{send:function(e){return new Promise(function(t){var n=new XMLHttpRequest;n.open(e.method,e.url,!0),Object.keys(e.headers).forEach(function(t){return n.setRequestHeader(t,e.headers[t])});var r,u=function(e,r){return setTimeout(function(){n.abort(),t({status:0,content:r,isTimedOut:!0})},e)},a=u(e.connectTimeout,"Connection timeout");n.onreadystatechange=function(){n.readyState>n.OPENED&&void 0===r&&(clearTimeout(a),r=u(e.responseTimeout,"Socket timeout"))},n.onerror=function(){0===n.status&&(clearTimeout(a),clearTimeout(r),t({content:n.responseText||"Network request failed",status:n.status,isTimedOut:!1}))},n.onload=function(){clearTimeout(a),clearTimeout(r),t({content:n.responseText,status:n.status,isTimedOut:!1})},n.send(e.data)})}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:eh(),requestsCache:eh({serializable:!1}),hostsCache:Xp({caches:[Yp({key:"".concat(Eh,"-").concat(e)}),eh()]})},void 0))}(e,t);return r.addAlgoliaAgent("docsearch",Ch),!1===/docsearch.js \(.*\)/.test(r.transporter.algoliaAgent.value)&&r.addAlgoliaAgent("docsearch-react",Ch),n(r)},[e,t,n]);return u}var kh=["appId","apiKey","askAi","maxResultsPerGroup","theme","onClose","transformItems","hitComponent","resultsFooterComponent","navigator","initialScrollY","transformSearchClient","disableUserPersonalization","initialQuery","translations","getMissingResultsUrl","insights","onAskAiToggle","interceptAskAiEvent","isAskAiActive","recentSearchesLimit","recentSearchesWithFavoritesLimit","indices","indexName","searchParameters","isHybridModeSupported"],wh=["footer","searchBox"],_h=function(){var e=i(E().m(function e(t){var n,r,u,a,i,o,s,c,l,d,f,p,h,v,m,D,y,F,b;return E().w(function(e){for(;;)switch(e.p=e.n){case 0:return n=t.query,r=t.state,u=t.setContext,a=t.setStatus,i=t.searchClient,o=t.indexes,s=t.snippetLength,c=t.insights,l=t.appId,d=t.apiKey,f=t.maxResultsPerGroup,p=t.transformItems,h=void 0===p?Fu:p,v=t.saveRecentSearch,m=t.onClose,D=c,e.p=1,e.n=2,i.search({requests:o.map(function(e){var t,r,u,a,i,o,c,l="string"==typeof e?e:e.name,d="string"==typeof e?{}:e.searchParameters;return g({query:n,indexName:l,attributesToRetrieve:null!==(t=null==d?void 0:d.attributesToRetrieve)&&void 0!==t?t:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:null!==(r=null==d?void 0:d.attributesToSnippet)&&void 0!==r?r:["hierarchy.lvl1:".concat(s.current),"hierarchy.lvl2:".concat(s.current),"hierarchy.lvl3:".concat(s.current),"hierarchy.lvl4:".concat(s.current),"hierarchy.lvl5:".concat(s.current),"hierarchy.lvl6:".concat(s.current),"content:".concat(s.current)],snippetEllipsisText:null!==(u=null==d?void 0:d.snippetEllipsisText)&&void 0!==u?u:"\u2026",highlightPreTag:null!==(a=null==d?void 0:d.highlightPreTag)&&void 0!==a?a:"",highlightPostTag:null!==(i=null==d?void 0:d.highlightPostTag)&&void 0!==i?i:"",hitsPerPage:null!==(o=null==d?void 0:d.hitsPerPage)&&void 0!==o?o:20,clickAnalytics:null!==(c=null==d?void 0:d.clickAnalytics)&&void 0!==c?c:D},null!=d?d:{})})});case 2:return y=e.v,F=y.results,e.a(2,F.flatMap(function(e){var t,n=e,a=n.hits,i=n.nbHits,o=gu(h(a),function(e){return ku(e)},f);if(r.context.searchSuggestions.length0&&G.forEach(function(e){xe.push("string"==typeof e?{name:e}:e)}),xe.length<1)throw new Error("Must supply either `indexName` or `indices` for DocSearch to work");var Be=xe[0].name,Ie=r.useRef($u({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(Be),limit:10})).current,Oe=r.useRef($u({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(Be),limit:0===Ie.getAll().length?J:W})).current,Te=A(r.useState(!1),2),Pe=Te[0],je=Te[1],Ne=function(e){var t=e.assistantId,n=e.apiKey,u=e.appId,a=e.indexName,o=e.useStagingEnv,s=void 0!==o&&o,c=F(e,Gp),l=(0,r.useRef)(new AbortController),d=A((0,r.useState)(function(){return Wd()}),2),f=d[0],p=d[1],h=(0,r.useRef)(null),v=(0,r.useRef)(null),m=(0,r.useRef)(null),D=(0,r.useMemo)(function(){return c.agentStudio?function(e){var t=e.appId,n=e.apiKey,r=e.assistantId,u=e.searchParameters;return new Ap({api:"".concat(Vp(t),"/agents/").concat(r,"/completions?stream=true&compatibilityMode=ai-sdk-5"),headers:{"x-algolia-application-id":t,"x-algolia-api-key":n},body:u?{algolia:{searchParameters:u}}:{}})}({apiKey:n,appId:u,assistantId:null!=t?t:"",searchParameters:c.searchParameters}):function(e){var t,n=e.assistantId,r=e.apiKey,u=e.indexName,a=e.searchParameters,o=e.appId,s=e.abortControllerRef,c=e.useStagingEnv;return new Ap({api:c?Ut:qt,headers:(t=i(E().m(function e(){var t;return E().w(function(e){for(;;)switch(e.n){case 0:if(n){e.n=1;break}throw new Error("Ask AI assistant ID is required");case 1:return e.n=2,Kp({assistantId:n,abortSignal:s.current.signal,useStagingEnv:c});case 2:return t=e.v,e.a(2,g(g({},t?{authorization:"TOKEN ".concat(t)}:{}),{},{"X-Algolia-API-Key":r,"X-Algolia-Application-Id":o,"X-Algolia-Index-Name":u,"X-Algolia-Assistant-Id":n||"","X-AI-SDK-Version":"v5"}))}},e)})),function(){return t.apply(this,arguments)}),body:a?{searchParameters:a}:{}})}({assistantId:null!=t?t:"",apiKey:n,appId:u,indexName:a,searchParameters:c.searchParameters,abortControllerRef:l,useStagingEnv:s})},[n,u,t,a,s,c]),y=function({experimental_throttle:e,resume:t=!1,...n}={}){const u=(0,r.useRef)("chat"in n?n.chat:new qp(n));("chat"in n&&n.chat!==u.current||"id"in n&&u.current.id!==n.id)&&(u.current="chat"in n?n.chat:new qp(n));const a="id"in n?n.id:null,i=(0,r.useCallback)(t=>u.current["~registerMessagesCallback"](t,e),[e,a]),o=(0,r.useSyncExternalStore)(i,()=>u.current.messages,()=>u.current.messages),s=(0,r.useSyncExternalStore)(u.current["~registerStatusCallback"],()=>u.current.status,()=>u.current.status),c=(0,r.useSyncExternalStore)(u.current["~registerErrorCallback"],()=>u.current.error,()=>u.current.error),l=(0,r.useCallback)(e=>{"function"==typeof e&&(e=e(u.current.messages)),u.current.messages=e},[u]);return(0,r.useEffect)(()=>{t&&u.current.resumeStream()},[t,u]),{id:u.current.id,messages:o,setMessages:l,sendMessage:u.current.sendMessage,regenerate:u.current.regenerate,clearError:u.current.clearError,stop:u.current.stop,error:c,resumeStream:u.current.resumeStream,status:s,addToolResult:u.current.addToolOutput,addToolOutput:u.current.addToolOutput}}((0,r.useMemo)(function(){return{id:f,sendAutomaticallyWhen:wp,transport:D}},[f,D])),b=y.messages,C=y.sendMessage,k=y.status,w=y.setMessages,S=y.error,x=y.stop,B=y.clearError;v.current=C,m.current=w;var I=(0,r.useRef)(function(e){var t=e.limit,n=void 0===t?5:t,r=Zu(e.key),u=r.getItem().slice(0,n);return{add:function(e){var t=e.objectID,a=e.query,i=u.findIndex(function(e){return e.objectID===t||e.query===a});i>-1?u[i]=e:(u.unshift(e),u=u.slice(0,n)),r.setItem(u)},addFeedback:function(e,t){var n=u.find(function(t){var n;return null===(n=t.messages)||void 0===n?void 0:n.some(function(t){return t.id===e})});if(n&&n.messages){var a=n.messages.find(function(t){return t.id===e});a&&(a.feedback=t,r.setItem(u))}},getOne:function(e){var t,n=u.find(function(t){var n;return null===(n=t.messages)||void 0===n?void 0:n.some(function(t){return t.id===e})});return null==n||null===(t=n.messages)||void 0===t?void 0:t.find(function(t){return t.id===e})},getAll:function(){return u},remove:function(e){u=u.filter(function(t){return t.objectID!==e.objectID}),r.setItem(u)},getConversation:function(e){var t=u.find(function(t){var n;return null===(n=t.messages)||void 0===n?void 0:n.some(function(t){return t.id===e})});if(t&&t.messages)return t}}}({key:"__DOCSEARCH_ASKAI_CONVERSATIONS__".concat(a),limit:10})).current,O=(0,r.useCallback)(function(){var e=i(E().m(function e(r,a){var i;return E().w(function(e){for(;;)switch(e.n){case 0:if(t){e.n=1;break}return e.a(2);case 1:return e.n=2,c.agentStudio?Qp({agentId:t,vote:a,messageId:r,appId:u,apiKey:n,abortSignal:l.current.signal}):Wp({assistantId:t,thumbs:a,messageId:r,appId:u,abortSignal:l.current.signal,useStagingEnv:s});case 2:if(!(e.v.status>=300)){e.n=3;break}throw new Error("Failed, try again later.");case 3:null===(i=I.addFeedback)||void 0===i||i.call(I,r,1===a?"like":"dislike");case 4:return e.a(2)}},e)}));return function(t,n){return e.apply(this,arguments)}}(),[t,c.agentStudio,u,n,s,I]),T=(0,r.useCallback)(function(){l.current.abort(),l.current=new AbortController},[]),P=(0,r.useCallback)(function(e){T(),h.current=null!=e?e:null,p(Wd())},[T]);(0,r.useEffect)(function(){var e=h.current;if(null!==e){var t=v.current,n=m.current;if("sendText"===e.kind){var r;if(!t)return;return h.current=null,void t({text:e.text},null!==(r=e.requestOptions)&&void 0!==r?r:{})}if("sendUserMessage"===e.kind){var u;if(!t)return;return h.current=null,void t(e.message,null!==(u=e.requestOptions)&&void 0!==u?u:{})}n&&(h.current=null,n(e.messages))}},[f]);var j=function(){var e=i(E().m(function e(){return E().w(function(e){for(;;)switch(e.n){case 0:return l.current.abort(),e.n=1,x();case 1:l.current=new AbortController;case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),N=(0,r.useMemo)(function(){for(var e=[],t=0;t0){var d=c.detail[0],f=d.msg,p=d.loc.at(-1);l="".concat(f,": ").concat(p)}return new Error(l)}o=Kr(r)||("string"==typeof s.message&&""!==s.message.trim()?s.message.trim():"string"==typeof s.error&&""!==s.error.trim()?s.error.trim():r);var h=null!==(t=s.code)&&void 0!==t?t:s.errorCode;if("string"==typeof h&&""!==h.trim()){var v=h.trim();o.toUpperCase().includes(v.toUpperCase())||(o="".concat(o," (").concat(v,")"))}return new Error(o)}(S):S},[S,c.agentStudio]);return{messages:b,sendMessage:C,status:k,setMessages:w,clearError:B,resetAskAiAbortScope:T,resetAskAiChatSession:P,askAiError:R,stopAskAiStreaming:j,isStreaming:z,exchanges:N,conversations:I,sendFeedback:O}}({assistantId:Ee,apiKey:(null==Fe?void 0:Fe.apiKey)||s,appId:(null==Fe?void 0:Fe.appId)||o,indexName:(null==Fe?void 0:Fe.indexName)||Be,searchParameters:be,useStagingEnv:Ce,agentStudio:Se}),ze=Ne.messages,Re=Ne.status,Me=Ne.sendMessage,Ze=Ne.stopAskAiStreaming,Le=Ne.askAiError,$e=Ne.sendFeedback,qe=Ne.conversations,Ue=Ne.clearError,Ve=Ne.resetAskAiAbortScope,He=Ne.resetAskAiChatSession,Je=r.useRef(Re);r.useEffect(function(){if(!P){if("streaming"===Je.current&&"ready"===Re){Pe&&ze.at(-1)&&(ze.at(-1).metadata={stopped:!0});var e=ze[0];if(null!=e&&e.parts){var t,n=f(e.parts);try{for(n.s();!(t=n.n()).done;){var r=t.value;"text"===r.type&&qe.add($r(r.text,ze))}}catch(e){n.e(e)}finally{n.f()}}}Je.current=Re}},[Re,ze,qe,P,Pe]);var Ke=r.useMemo(function(){return"error"===Re&&Hr(Le,Se)},[Re,Le,Se]),We=r.useMemo(function(){if(Ke&&"new-conversation"!==ke)return Jr(Le)?"minimal":"thread-depth"},[Ke,ke,Le]),Qe=r.useCallback(function(e){var t=e.hierarchy,n=["lvl6","lvl5","lvl4","lvl3","lvl2","lvl1","lvl0"].find(function(e){return t[e]});return g(g({},e),{},{type:n||"lvl0",content:null})},[]),Ge=r.useCallback(function(e){if(!P){var t="content"===e.type?e.__docsearch_parent||Qe(e):e;t&&-1===Ie.getAll().findIndex(function(e){return e.objectID===t.objectID})&&Oe.add(t)}},[Ie,Oe,P,Qe]),Ye=r.useCallback(function(e){if(oe.context.algoliaInsightsPlugin&&e.__autocomplete_id){var t=e,n={eventName:"Item Selected",index:t.__autocomplete_indexName,items:[t],positions:[e.__autocomplete_id],queryID:t.__autocomplete_queryID};oe.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(n)}},[oe.context.algoliaInsightsPlugin]),Xe=r.useRef(void 0),et=r.useCallback(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(e){var r={query:t,suggestedQuestionId:null==n?void 0:n.objectID};if(null!=q&&q(r))return void(Xe.current&&Xe.current.setQuery(""))}if(e&&"new-conversation"===ke&&we("initial"),$(e,{query:t,suggestedQuestionId:null==n?void 0:n.objectID}),!te){je(!1),Ve(),Ue();var u={};if(n&&(u.body={suggestedQuestionId:n.objectID}),Me({role:"user",parts:[{type:"text",text:t}]},u),he.current){var a=he.current;"function"==typeof a.scrollTo?a.scrollTo({top:0,behavior:"smooth"}):a.scrollTop=0}Xe.current&&Xe.current.setQuery("")}},[$,q,ke,we,te,Ue,Ve,Me]),tt=r.useCallback(function(){var e=i(E().m(function e(t,n){return E().w(function(e){for(;;)switch(e.n){case 0:if(Ee&&o){e.n=1;break}return e.a(2);case 1:return e.n=2,$e(t,n);case 2:return e.a(2)}},e)}));return function(t,n){return e.apply(this,arguments)}}(),[Ee,o,$e]);Xe.current||(Xe.current=$t({id:"docsearch",defaultActiveItemId:0,openOnFocus:!0,initialState:{query:ye,context:{searchSuggestions:[]}},insights:Boolean(L),navigator:S,onStateChange:function(e){se(e.state)},getSources:function(e){var t=e.query,n=e.state,r=e.setContext,u=e.setStatus;if(!t){var a=function(e){var t=e.recentSearches,n=e.favoriteSearches,r=e.saveRecentSearch,u=e.onClose;return e.disableUserPersonalization?[]:[{sourceId:"recentSearches",onSelect:function(e){var t=e.item,n=e.event;r(t),Eu(n)||u()},getItemUrl:function(e){return e.item.url},getItems:function(){return t.getAll()}},{sourceId:"favoriteSearches",onSelect:function(e){var t=e.item,n=e.event;r(t),Eu(n)||u()},getItemUrl:function(e){return e.item.url},getItems:function(){return n.getAll()}}]}({recentSearches:Oe,favoriteSearches:Ie,saveRecentSearch:Ge,onClose:v,disableUserPersonalization:P}),i=ce?[{sourceId:"recentConversations",getItems:function(){return P?[]:qe.getAll()},onSelect:function(e){var t=e.item;t.messages&&(He({kind:"setMessages",messages:t.messages}),$(!0))}}]:[];return[].concat(k(a),i)}var c={context:n.context},d=_h({query:t,state:c,setContext:r,setStatus:u,searchClient:ge,indexes:xe,snippetLength:me,insights:Boolean(L),appId:o,apiKey:s,maxResultsPerGroup:l,transformItems:D,saveRecentSearch:Ge,onClose:v}),f=ce?[{sourceId:"askAI",getItems:function(){return[{type:"askAI",query:t,url_without_anchor:"",objectID:"ask-ai-button",content:null,url:"",anchor:null,hierarchy:{lvl0:"Ask AI",lvl1:t,lvl2:null,lvl3:null,lvl4:null,lvl5:null,lvl6:null},_highlightResult:{},_snippetResult:{},__docsearch_parent:null}]},onSelect:function(e){var t=e.item;"askAI"===t.type&&t.query&&et(!0,t.query)}}]:[];return d.then(function(e){return[].concat(f,k(e))})}}));var nt,rt,ut=Xe.current,at=ut.getEnvironmentProps,it=ut.getRootProps,ot=ut.refresh;!function(e){var t=e.getEnvironmentProps,n=e.panelElement,u=e.formElement,a=e.inputElement;r.useEffect(function(){if(n&&u&&a){var e=t({panelElement:n,formElement:u,inputElement:a}),r=e.onTouchStart,i=e.onTouchMove;return window.addEventListener("touchstart",r),window.addEventListener("touchmove",i),function(){window.removeEventListener("touchstart",r),window.removeEventListener("touchmove",i)}}},[t,n,u,a])}({getEnvironmentProps:at,panelElement:he.current,formElement:pe.current,inputElement:ve.current}),nt={container:de.current},rt=nt.container,r.useEffect(function(){if(rt){var e=rt.querySelectorAll("a[href]:not([disabled]), button:not([disabled]), input:not([disabled])"),t=e[0],n=e[e.length-1];return rt.addEventListener("keydown",r),function(){rt.removeEventListener("keydown",r)}}function r(e){"Tab"===e.key&&(e.shiftKey?document.activeElement===t&&(e.preventDefault(),n.focus()):document.activeElement===n&&(e.preventDefault(),t.focus()))}},[rt]),function(e){var t=e.theme;(0,r.useEffect)(function(){if(t){var e=document.documentElement.dataset.theme;if(t!==e)return document.documentElement.dataset.theme=t,function(){void 0===e?delete document.documentElement.dataset.theme:document.documentElement.dataset.theme=e}}},[t])}({theme:d}),r.useEffect(function(){return document.body.classList.add("DocSearch--active"),function(){var e,t;document.body.classList.remove("DocSearch--active"),null===(e=(t=window).scrollTo)||void 0===e||e.call(t,0,B)}},[]),r.useEffect(function(){"undefined"!=typeof window&&window.localStorage&&function(){if("undefined"==typeof window||!window.localStorage)return 0;var e=0;for(var t in window.localStorage)window.localStorage.hasOwnProperty(t)&&(e+=window.localStorage[t].length+t.length);return e}()>4194304&&Mu()},[]),r.useLayoutEffect(function(){var e=window.innerWidth-document.body.clientWidth;return document.body.style.marginInlineEnd="".concat(e,"px"),function(){document.body.style.marginInlineEnd="0px"}},[]),r.useEffect(function(){window.matchMedia("(max-width: 768px)").matches&&(me.current=5)},[]),r.useEffect(function(){var e;he.current&&!V&&("function"==typeof(e=he.current).scrollTo?e.scrollTo({top:0,behavior:"smooth"}):e.scrollTop=0)},[oe.query,V]),r.useEffect(function(){ye.length>0&&(ot(),ve.current&&ve.current.focus())},[ye,ot]),r.useEffect(function(){function e(){if(fe.current){var e=.01*window.innerHeight;fe.current.style.setProperty("--docsearch-vh","".concat(e,"px"))}}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}},[]);var st=r.useRef(V);r.useEffect(function(){st.current&&!V&&(ut.refresh(),Ue(),He()),st.current=V},[V,ut,Ue,He]),r.useEffect(function(){we("initial")},[V,we]);var ct=function(){var e=i(E().m(function e(){return E().w(function(e){for(;;)switch(e.n){case 0:return je(!0),e.n=1,Ze();case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),lt=function(){Ue(),He(),we("new-conversation")},dt=!0,ft=oe.collections.some(function(e){return e.items.length>0});return"idle"!==oe.status||!1!==ft||0!==oe.query.length||V||(dt=!1),r.createElement("div",h({ref:de},it({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container","stalled"===oe.status&&"DocSearch-Container--Stalled","error"===oe.status&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(e){e.target===e.currentTarget&&v()}}),r.createElement("div",{className:"DocSearch-Modal",ref:fe},r.createElement("header",{className:"DocSearch-SearchBar",ref:pe},r.createElement(Ru,h({},ut,{state:oe,placeholder:le||"Search docs",autoFocus:0===ye.length,inputRef:ve,isFromSelection:Boolean(ye)&&ye===De,translations:ue,isAskAiActive:V,askAiStatus:Re,askAiError:Le,askAiState:ke,setAskAiState:we,isThreadDepthError:Ke&&"new-conversation"!==ke,askAiBlockingChrome:We,onClose:v,onAskAiToggle:$,onAskAgain:function(e){et(!0,e)},onStopAskAiStreaming:ct,onNewConversation:lt,onViewConversationHistory:function(){we("conversation-history")}}))),dt&&r.createElement("div",{className:"DocSearch-Dropdown",ref:he},r.createElement(Iu,h({},ut,{indexName:Be,state:oe,hitComponent:b,resultsFooterComponent:w,disableUserPersonalization:P,recentSearches:Oe,favoriteSearches:Ie,conversations:qe,inputRef:ve,translations:ae,getMissingResultsUrl:M,isAskAiActive:V,canHandleAskAi:ce,messages:ze,askAiError:Le,status:Re,hasCollections:ft,askAiState:ke,selectAskAiQuestion:et,suggestedQuestions:_e,selectSuggestedQuestion:function(e){et(!0,e.question,e)},agentStudio:Se,onAskAiToggle:$,onNewConversation:lt,onItemClick:function(e,t){if("askAI"===e.type&&e.query){if("stored"===e.anchor&&"messages"in e){He({kind:"setMessages",messages:e.messages});var n={query:e.query,messageId:e.messages[0].id};if(null!=q&&q(n))return Xe.current&&Xe.current.setQuery(""),void t.preventDefault();$(!0,n)}else et(!0,e.query);return we("initial"),void t.preventDefault()}Ye(e),Ge(e),Eu(t)||v()},onFeedback:tt}))),r.createElement("footer",{className:"DocSearch-Footer"},r.createElement(Jt,{translations:re,isAskAiActive:V}))))}}}]); \ No newline at end of file diff --git a/assets/js/2693.f6f7ef84.js.LICENSE.txt b/assets/js/2693.f6f7ef84.js.LICENSE.txt new file mode 100644 index 000000000..775d3936b --- /dev/null +++ b/assets/js/2693.f6f7ef84.js.LICENSE.txt @@ -0,0 +1 @@ +/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ diff --git a/assets/js/275a8dd8.4c604eda.js b/assets/js/275a8dd8.4c604eda.js new file mode 100644 index 000000000..24c112e22 --- /dev/null +++ b/assets/js/275a8dd8.4c604eda.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[4304],{95617(e,t,n){n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>d,default:()=>u,frontMatter:()=>s,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"concepts/DISC/kademlia","title":"Kademlia","description":"Details distributed hash table algorithm using XOR distance metrics for efficient decentralized lookups and network routing.","source":"@site/docs/concepts/DISC/kademlia.mdx","sourceDirName":"concepts/DISC","slug":"/concepts/DISC/kademlia","permalink":"/docs/concepts/DISC/kademlia","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/concepts/DISC/kademlia.mdx","tags":[],"version":"current","frontMatter":{"title":"Kademlia","id":"kademlia","description":"Details distributed hash table algorithm using XOR distance metrics for efficient decentralized lookups and network routing."},"sidebar":"concepts","previous":{"title":"DISC","permalink":"/docs/concepts/DISC/"},"next":{"title":"Neighborhoods","permalink":"/docs/concepts/DISC/neighborhoods"}}');var r=n(74848),o=n(28453);const a=n.p+"assets/images/bos_fig_2_3-53841f6e16aa27a058942aaa6a8badcc.jpg",s={title:"Kademlia",id:"kademlia",description:"Details distributed hash table algorithm using XOR distance metrics for efficient decentralized lookups and network routing."},d=void 0,l={},c=[{value:"Kademlia Key Concepts",id:"kademlia-key-concepts",level:2},{value:"XOR Distance Metric",id:"xor-distance-metric",level:3},{value:"Routing Table",id:"routing-table",level:3},{value:"Kademlia Advantages",id:"kademlia-advantages",level:2},{value:"Efficient Lookups",id:"efficient-lookups",level:3},{value:"Fault Tolerance",id:"fault-tolerance",level:3},{value:"Scalability",id:"scalability",level:3},{value:"Kademlia in Swarm",id:"kademlia-in-swarm",level:2},{value:"Proximity Order & Neighborhoods",id:"proximity-order--neighborhoods",level:3},{value:"Forwarding Kademlia",id:"forwarding-kademlia",level:3},{value:"Neighborhood Based Storage Incentives",id:"neighborhood-based-storage-incentives",level:3}];function h(e){const t={a:"a",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.p,{children:"Kademlia is a distributed hash table (DHT) algorithm used in peer-to-peer networks to efficiently store and retrieve data without relying on centralized servers. It organizes nodes into an overlay network that ensures efficient routing using a binary tree structure."}),"\n",(0,r.jsx)(t.h2,{id:"kademlia-key-concepts",children:"Kademlia Key Concepts"}),"\n",(0,r.jsx)(t.h3,{id:"xor-distance-metric",children:(0,r.jsx)(t.strong,{children:"XOR Distance Metric"})}),"\n",(0,r.jsx)(t.p,{children:'Kademlia uses a distance metric based on the XOR (exclusive OR) between any addresses. This allows nodes to calculate "distance" from each other. Lookups are made by recursively querying nodes that are progressively closer to the target.'}),"\n",(0,r.jsx)(t.h3,{id:"routing-table",children:(0,r.jsx)(t.strong,{children:"Routing Table"})}),"\n",(0,r.jsx)(t.p,{children:"Each node in a Kademlia network maintains a routing table containing information about other nodes, organized by the XOR distance between node IDs."}),"\n",(0,r.jsx)(t.h2,{id:"kademlia-advantages",children:"Kademlia Advantages"}),"\n",(0,r.jsx)(t.h3,{id:"efficient-lookups",children:(0,r.jsx)(t.strong,{children:"Efficient Lookups"})}),"\n",(0,r.jsx)(t.p,{children:"To retrieve a specific chunk, a node uses Kademlia's lookup process to find and fetch the chunk from a node in the neighborhood where it is stored. The number of hops required for a chunk to be retrieved is logarithmic to the number of nodes in the network, meaning lookups remain efficient even as the network grows larger and larger."}),"\n",(0,r.jsx)(t.h3,{id:"fault-tolerance",children:(0,r.jsx)(t.strong,{children:"Fault Tolerance"})}),"\n",(0,r.jsx)(t.p,{children:"Because nodes' peer lists are regularly refreshed through lookups and interactions, and because redundant copies of data are replicated within the network, the network remains functional even when individual nodes leave or fail."}),"\n",(0,r.jsx)(t.h3,{id:"scalability",children:(0,r.jsx)(t.strong,{children:"Scalability"})}),"\n",(0,r.jsx)(t.p,{children:"Kademlia's design allows it to scale to large networks, as each node only needs to keep track of a small subset of the total nodes in the network. The required set of connected peers grows logarithmically with the number of nodes, making it efficient even in large networks."}),"\n",(0,r.jsx)(t.h2,{id:"kademlia-in-swarm",children:"Kademlia in Swarm"}),"\n",(0,r.jsx)(t.p,{children:"Swarm's version of Kademlia differs from commonly used implementations of Kademlia in several important ways:"}),"\n",(0,r.jsx)(t.h3,{id:"proximity-order--neighborhoods",children:"Proximity Order & Neighborhoods"}),"\n",(0,r.jsxs)(t.p,{children:["Swarm introduces the concept of ",(0,r.jsx)(t.a,{href:"/docs/references/glossary#proximity-order-po",children:"proximity order (PO)"})," as a discrete measure of node relatedness between two addresses. In contrast with Kademlia distance which is an exact measure of relatedness, PO is used to measure the relatedness between two addresses on a discrete scale based on the number of shared leading bits. Since this metric ignores all the bits after the shared leading bits, it is not an exact measure of distance between any two addresses."]}),"\n",(0,r.jsxs)(t.p,{children:["In Swarm's version of Kademlia, nodes are grouped into ",(0,r.jsx)(t.a,{href:"/docs/concepts/DISC/neighborhoods",children:"neighborhoods"})," of nodes based on PO (ie., neighborhood are composed of nodes which all share the same leading binary prefix bits). Each neighborhood of nodes is responsible for storing the same set of chunks."]}),"\n",(0,r.jsx)(t.p,{children:"Neighborhoods are important for ensuring data redundancy, and they also play a role in the incentives system which guarantees nodes are rewarded for contributing resources to the network."}),"\n",(0,r.jsx)(t.h3,{id:"forwarding-kademlia",children:"Forwarding Kademlia"}),"\n",(0,r.jsx)(t.p,{children:"Kademlia comes in two flavors, iterative and forwarding. In iterative Kademlia, the requesting node directly queries each node it contacts for nodes that are progressively closer to the target until the node with the requested chunk is found. The chunk is then sent directly from the storer node to the node which initiated the request."}),"\n",(0,r.jsx)(t.p,{children:"In contrast, Swarm makes use of forwarding Kademlia. Here each node forwards the query to the next closest node in the network, and this process continues until a node with the requested chunk is found. Once the chunk is found, it is sent back along the same chain of nodes rather than sent directly to the initiator of the request."}),"\n",(0,r.jsx)(t.p,{children:"The main advantage of forwarding Kademlia is that it maintains the anonymity of the node which initiated the request."}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{}),(0,r.jsx)(t.th,{children:"Iterative Kademlia"}),(0,r.jsx)(t.th,{children:"Forwarding Kademlia (Swarm)"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Who queries the next node"}),(0,r.jsx)(t.td,{children:"The requesting node, directly"}),(0,r.jsx)(t.td,{children:"Each intermediate node forwards the query"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Chunk return path"}),(0,r.jsx)(t.td,{children:"Sent directly from storer to requester"}),(0,r.jsx)(t.td,{children:"Relayed back along the same chain of nodes"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Requester anonymity"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"Yes"})]})]})]}),"\n",(0,r.jsxs)("div",{style:{textAlign:"center"},children:[(0,r.jsx)("img",{src:a,className:"responsive-image"}),(0,r.jsx)("p",{style:{fontStyle:"italic",marginTop:"0.5rem"},children:(0,r.jsxs)(t.p,{children:["Source: ",(0,r.jsx)("a",{href:"https://www.ethswarm.org/the-book-of-swarm-2.pdf#subsection.2.1.3",target:"_blank",children:'The Book of Swarm - Figure 2.3 - "Iterative and Forwarding Kademlia routing"'})]})})]}),"\n",(0,r.jsx)(t.h3,{id:"neighborhood-based-storage-incentives",children:"Neighborhood Based Storage Incentives"}),"\n",(0,r.jsx)(t.p,{children:'Swarm introduces a storage incentives layer on top of its Kademlia implementation in order to reward nodes for continuing to provide resources to the network. Neighborhoods play a key role in the storage incentives mechanism. Storage incentives take the role of a "game" in which nodes play to win a reward for storing the correct data. Each round in the game, one neighborhood is chosen to play, and all nodes within the same neighborhood participate as a group. The nodes each compare the data they are storing with each other to make sure they are all storing the data they are responsible for, and one node is chosen to win from among the group. You can read more about how storage incentives work in the dedicated page for storage incentives.'})]})}function u(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},28453(e,t,n){n.d(t,{R:()=>a,x:()=>s});var i=n(96540);const r={},o=i.createContext(r);function a(e){const t=i.useContext(o);return i.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function s(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),i.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2822.a4922b77.js b/assets/js/2822.a4922b77.js new file mode 100644 index 000000000..38d03677e --- /dev/null +++ b/assets/js/2822.a4922b77.js @@ -0,0 +1 @@ +(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[2822],{97375(t){t.exports=function(){"use strict";return function(t,e){var n=e.prototype,i=n.format;n.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return i.bind(this)(t);var s=this.$utils(),r=(t||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(t){switch(t){case"Q":return Math.ceil((e.$M+1)/3);case"Do":return n.ordinal(e.$D);case"gggg":return e.weekYear();case"GGGG":return e.isoWeekYear();case"wo":return n.ordinal(e.week(),"W");case"w":case"ww":return s.s(e.week(),"w"===t?1:2,"0");case"W":case"WW":return s.s(e.isoWeek(),"W"===t?1:2,"0");case"k":case"kk":return s.s(String(0===e.$H?24:e.$H),"k"===t?1:2,"0");case"X":return Math.floor(e.$d.getTime()/1e3);case"x":return e.$d.getTime();case"z":return"["+e.offsetName()+"]";case"zzz":return"["+e.offsetName("long")+"]";default:return t}});return i.bind(this)(r)}}}()},90445(t){t.exports=function(){"use strict";var t={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"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,i=/\d\d/,s=/\d\d?/,r=/\d*[^-_:/,()\s\d]+/,a={},o=function(t){return(t=+t)+(t>68?1900:2e3)},c=function(t){return function(e){this[t]=+e}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t)}],d=function(t){var e=a[t];return e&&(e.indexOf?e:e.s.concat(e.f))},u=function(t,e){var n,i=a.meridiem;if(i){for(var s=1;s<=24;s+=1)if(t.indexOf(i(s,0,e))>-1){n=s>12;break}}else n=t===(e?"pm":"PM");return n},h={A:[r,function(t){this.afternoon=u(t,!1)}],a:[r,function(t){this.afternoon=u(t,!0)}],Q:[n,function(t){this.month=3*(t-1)+1}],S:[n,function(t){this.milliseconds=100*+t}],SS:[i,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[s,c("seconds")],ss:[s,c("seconds")],m:[s,c("minutes")],mm:[s,c("minutes")],H:[s,c("hours")],h:[s,c("hours")],HH:[s,c("hours")],hh:[s,c("hours")],D:[s,c("day")],DD:[i,c("day")],Do:[r,function(t){var e=a.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var i=1;i<=31;i+=1)e(i).replace(/\[|\]/g,"")===t&&(this.day=i)}],w:[s,c("week")],ww:[i,c("week")],M:[s,c("month")],MM:[i,c("month")],MMM:[r,function(t){var e=d("months"),n=(d("monthsShort")||e.map(function(t){return t.slice(0,3)})).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[r,function(t){var e=d("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,c("year")],YY:[i,function(t){this.year=o(t)}],YYYY:[/\d{4}/,c("year")],Z:l,ZZ:l};function f(n){var i,s;i=n,s=a&&a.formats;for(var r=(n=i.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(e,n,i){var r=i&&i.toUpperCase();return n||s[i]||t[i]||s[r].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(t,e,n){return e||n.slice(1)})})).match(e),o=r.length,c=0;c-1)return new Date(("X"===e?1e3:1)*t);var s=f(e)(t),r=s.year,a=s.month,o=s.day,c=s.hours,l=s.minutes,d=s.seconds,u=s.milliseconds,h=s.zone,m=s.week,y=new Date,k=o||(r||a?1:y.getDate()),g=r||y.getFullYear(),p=0;r&&!a||(p=a>0?a-1:y.getMonth());var v,T=c||0,x=l||0,b=d||0,w=u||0;return h?new Date(Date.UTC(g,p,k,T,x,b,w+60*h.offset*1e3)):n?new Date(Date.UTC(g,p,k,T,x,b,w)):(v=new Date(g,p,k,T,x,b,w),m&&(v=i(v).week(m).toDate()),v)}catch(t){return new Date("")}}(e,o,i,n),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),d&&e!=this.format(o)&&(this.$d=new Date("")),a={}}else if(o instanceof Array)for(var h=o.length,m=1;m<=h;m+=1){r[1]=o[m-1];var y=n.apply(this,r);if(y.isValid()){this.$d=y.$d,this.$L=y.$L,this.init();break}m===h&&(this.$d=new Date(""))}else s.call(this,t)}}}()},43522(t){t.exports=function(){"use strict";var t,e,n=1e3,i=6e4,s=36e5,r=864e5,a=31536e6,o=2628e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,l=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,d={years:a,months:o,days:r,hours:s,minutes:i,seconds:n,milliseconds:1,weeks:6048e5},u=function(t){return t instanceof p},h=function(t,e,n){return new p(t,n,e.$l)},f=function(t){return e.p(t)+"s"},m=function(t){return t<0},y=function(t){return m(t)?Math.ceil(t):Math.floor(t)},k=function(t){return Math.abs(t)},g=function(t,e){return t?m(t)?{negative:!0,format:""+k(t)+e}:{negative:!1,format:""+t+e}:{negative:!1,format:""}},p=function(){function m(t,e,n){var i=this;if(this.$d={},this.$l=n,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),e)return h(t*d[f(e)],this);if("number"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if("object"==typeof t)return Object.keys(t).forEach(function(e){i.$d[f(e)]=t[e]}),this.calMilliseconds(),this;if("string"==typeof t){var s=t.match(c);if(s){var r=s.slice(2).map(function(t){return null!=t?Number(t):0});return this.$d.years=r[0],this.$d.months=r[1],this.$d.weeks=r[2],this.$d.days=r[3],this.$d.hours=r[4],this.$d.minutes=r[5],this.$d.seconds=r[6],this.calMilliseconds(),this}}return this}var k=m.prototype;return k.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce(function(e,n){return e+(t.$d[n]||0)*d[n]},0)},k.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=y(t/a),t%=a,this.$d.months=y(t/o),t%=o,this.$d.days=y(t/r),t%=r,this.$d.hours=y(t/s),t%=s,this.$d.minutes=y(t/i),t%=i,this.$d.seconds=y(t/n),t%=n,this.$d.milliseconds=t},k.toISOString=function(){var t=g(this.$d.years,"Y"),e=g(this.$d.months,"M"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var i=g(n,"D"),s=g(this.$d.hours,"H"),r=g(this.$d.minutes,"M"),a=this.$d.seconds||0;this.$d.milliseconds&&(a+=this.$d.milliseconds/1e3,a=Math.round(1e3*a)/1e3);var o=g(a,"S"),c=t.negative||e.negative||i.negative||s.negative||r.negative||o.negative,l=s.format||r.format||o.format?"T":"",d=(c?"-":"")+"P"+t.format+e.format+i.format+l+s.format+r.format+o.format;return"P"===d||"-P"===d?"P0D":d},k.toJSON=function(){return this.toISOString()},k.format=function(t){var n=t||"YYYY-MM-DDTHH:mm:ss",i={Y:this.$d.years,YY:e.s(this.$d.years,2,"0"),YYYY:e.s(this.$d.years,4,"0"),M:this.$d.months,MM:e.s(this.$d.months,2,"0"),D:this.$d.days,DD:e.s(this.$d.days,2,"0"),H:this.$d.hours,HH:e.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:e.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:e.s(this.$d.seconds,2,"0"),SSS:e.s(this.$d.milliseconds,3,"0")};return n.replace(l,function(t,e){return e||String(i[t])})},k.as=function(t){return this.$ms/d[f(t)]},k.get=function(t){var e=this.$ms,n=f(t);return"milliseconds"===n?e%=1e3:e="weeks"===n?y(e/d[n]):this.$d[n],e||0},k.add=function(t,e,n){var i;return i=e?t*d[f(e)]:u(t)?t.$ms:h(t,this).$ms,h(this.$ms+i*(n?-1:1),this)},k.subtract=function(t,e){return this.add(t,e,!0)},k.locale=function(t){var e=this.clone();return e.$l=t,e},k.clone=function(){return h(this.$ms,this)},k.humanize=function(e){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!e)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},m}(),v=function(t,e,n){return t.add(e.years()*n,"y").add(e.months()*n,"M").add(e.days()*n,"d").add(e.hours()*n,"h").add(e.minutes()*n,"m").add(e.seconds()*n,"s").add(e.milliseconds()*n,"ms")};return function(n,i,s){t=s,e=s().$utils(),s.duration=function(t,e){var n=s.locale();return h(t,{$l:n},e)},s.isDuration=u;var r=i.prototype.add,a=i.prototype.subtract;i.prototype.add=function(t,e){return u(t)?v(this,t,1):r.bind(this)(t,e)},i.prototype.subtract=function(t,e){return u(t)?v(this,t,-1):a.bind(this)(t,e)}}}()},68313(t){t.exports=function(){"use strict";var t="day";return function(e,n,i){var s=function(e){return e.add(4-e.isoWeekday(),t)},r=n.prototype;r.isoWeekYear=function(){return s(this).year()},r.isoWeek=function(e){if(!this.$utils().u(e))return this.add(7*(e-this.isoWeek()),t);var n,r,a,o=s(this),c=(n=this.isoWeekYear(),a=4-(r=(this.$u?i.utc:i)().year(n).startOf("year")).isoWeekday(),r.isoWeekday()>4&&(a+=7),r.add(a,t));return o.diff(c,"week")+1},r.isoWeekday=function(t){return this.$utils().u(t)?this.day()||7:this.day(this.day()%7?t:t-7)};var a=r.startOf;r.startOf=function(t,e){var n=this.$utils(),i=!!n.u(e)||e;return"isoweek"===n.p(t)?i?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):a.bind(this)(t,e)}}}()},92822(t,e,n){"use strict";n.d(e,{diagram:()=>Nt});var i=n(16459),s=n(76385),r=n(31293),a=n(86827),o=n(16750),c=n(74353),l=n(68313),d=n(90445),u=n(97375),h=n(43522),f=n(70451),m=function(){var t=(0,a.K)(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],i=[1,27],s=[1,28],r=[1,29],o=[1,30],c=[1,31],l=[1,32],d=[1,33],u=[1,34],h=[1,9],f=[1,10],m=[1,11],y=[1,12],k=[1,13],g=[1,14],p=[1,15],v=[1,16],T=[1,19],x=[1,20],b=[1,21],w=[1,22],$=[1,23],_=[1,25],D=[1,35],S={trace:(0,a.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:(0,a.K)(function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setWeekday("monday");break;case 9:i.setWeekday("tuesday");break;case 10:i.setWeekday("wednesday");break;case 11:i.setWeekday("thursday");break;case 12:i.setWeekday("friday");break;case 13:i.setWeekday("saturday");break;case 14:i.setWeekday("sunday");break;case 15:i.setWeekend("friday");break;case 16:i.setWeekend("saturday");break;case 17:i.setDateFormat(r[o].substr(11)),this.$=r[o].substr(11);break;case 18:i.enableInclusiveEndDates(),this.$=r[o].substr(18);break;case 19:i.TopAxis(),this.$=r[o].substr(8);break;case 20:i.setAxisFormat(r[o].substr(11)),this.$=r[o].substr(11);break;case 21:i.setTickInterval(r[o].substr(13)),this.$=r[o].substr(13);break;case 22:i.setExcludes(r[o].substr(9)),this.$=r[o].substr(9);break;case 23:i.setIncludes(r[o].substr(9)),this.$=r[o].substr(9);break;case 24:i.setTodayMarker(r[o].substr(12)),this.$=r[o].substr(12);break;case 27:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 28:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 29:case 30:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 31:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 33:i.addTask(r[o-1],r[o]),this.$="task";break;case 34:this.$=r[o-1],i.setClickEvent(r[o-1],r[o],null);break;case 35:this.$=r[o-2],i.setClickEvent(r[o-2],r[o-1],r[o]);break;case 36:this.$=r[o-2],i.setClickEvent(r[o-2],r[o-1],null),i.setLink(r[o-2],r[o]);break;case 37:this.$=r[o-3],i.setClickEvent(r[o-3],r[o-2],r[o-1]),i.setLink(r[o-3],r[o]);break;case 38:this.$=r[o-2],i.setClickEvent(r[o-2],r[o],null),i.setLink(r[o-2],r[o-1]);break;case 39:this.$=r[o-3],i.setClickEvent(r[o-3],r[o-1],r[o]),i.setLink(r[o-3],r[o-2]);break;case 40:this.$=r[o-1],i.setLink(r[o-1],r[o]);break;case 41:case 47:this.$=r[o-1]+" "+r[o];break;case 42:case 43:case 45:this.$=r[o-2]+" "+r[o-1]+" "+r[o];break;case 44:case 46:this.$=r[o-3]+" "+r[o-2]+" "+r[o-1]+" "+r[o]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:i,14:s,15:r,16:o,17:c,18:l,19:18,20:d,21:u,22:h,23:f,24:m,25:y,26:k,27:g,28:p,29:v,30:T,31:x,33:b,35:w,36:$,37:24,38:_,40:D},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:i,14:s,15:r,16:o,17:c,18:l,19:18,20:d,21:u,22:h,23:f,24:m,25:y,26:k,27:g,28:p,29:v,30:T,31:x,33:b,35:w,36:$,37:24,38:_,40:D},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:(0,a.K)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,a.K)(function(t){var e=this,n=[0],i=[],s=[null],r=[],o=this.table,c="",l=0,d=0,u=0,h=r.slice.call(arguments,1),f=Object.create(this.lexer),m={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(m.yy[y]=this.yy[y]);f.setInput(t,m.yy),m.yy.lexer=f,m.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var k=f.yylloc;r.push(k);var g=f.options&&f.options.ranges;function p(){var t;return"number"!=typeof(t=i.pop()||f.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof m.yy.parseError?this.parseError=m.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,a.K)(function(t){n.length=n.length-2*t,s.length=s.length-t,r.length=r.length-t},"popStack"),(0,a.K)(p,"lex");for(var v,T,x,b,w,$,_,D,S,C={};;){if(x=n[n.length-1],this.defaultActions[x]?b=this.defaultActions[x]:(null==v&&(v=p()),b=o[x]&&o[x][v]),void 0===b||!b.length||!b[0]){var M="";for($ in S=[],o[x])this.terminals_[$]&&$>2&&S.push("'"+this.terminals_[$]+"'");M=f.showPosition?"Parse error on line "+(l+1)+":\n"+f.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==v?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(M,{text:f.match,token:this.terminals_[v]||v,line:f.yylineno,loc:k,expected:S})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+v);switch(b[0]){case 1:n.push(v),s.push(f.yytext),r.push(f.yylloc),n.push(b[1]),v=null,T?(v=T,T=null):(d=f.yyleng,c=f.yytext,l=f.yylineno,k=f.yylloc,u>0&&u--);break;case 2:if(_=this.productions_[b[1]][1],C.$=s[s.length-_],C._$={first_line:r[r.length-(_||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(_||1)].first_column,last_column:r[r.length-1].last_column},g&&(C._$.range=[r[r.length-(_||1)].range[0],r[r.length-1].range[1]]),void 0!==(w=this.performAction.apply(C,[c,d,l,m.yy,b[1],s,r].concat(h))))return w;_&&(n=n.slice(0,-1*_*2),s=s.slice(0,-1*_),r=r.slice(0,-1*_)),n.push(this.productions_[b[1]][0]),s.push(C.$),r.push(C._$),D=o[n[n.length-2]][n[n.length-1]],n.push(D);break;case 3:return!0}}return!0},"parse")},C=function(){return{EOF:1,parseError:(0,a.K)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,a.K)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,a.K)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,a.K)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,a.K)(function(){return this._more=!0,this},"more"),reject:(0,a.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,a.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,a.K)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,a.K)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,a.K)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,a.K)(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},"test_match"),next:(0,a.K)(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,a.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,a.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,a.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,a.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,a.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,a.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,a.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,a.K)(function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 15:case 18:case 21:case 24:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:case 9:case 10:case 12:case 13:break;case 11:return 10;case 14:this.begin("href");break;case 16:return 43;case 17:this.begin("callbackname");break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 22:return 42;case 23:this.begin("click");break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,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],inclusive:!0}}}}();function M(){this.yy={}}return S.lexer=C,(0,a.K)(M,"Parser"),M.prototype=S,S.Parser=M,new M}();m.parser=m;var y=m;c.extend(l),c.extend(d),c.extend(u);var k,g,p={friday:5,saturday:6},v="",T="",x=void 0,b="",w=[],$=[],_=new Map,D=[],S=[],C="",M="",K=["active","done","crit","milestone","vert"],Y=[],E="",L=!1,A=!1,O="sunday",I="saturday",F=0,W=(0,a.K)(function(){D=[],S=[],C="",Y=[],pt=0,k=void 0,g=void 0,bt=[],v="",T="",M="",x=void 0,b="",w=[],$=[],L=!1,A=!1,F=0,_=new Map,E="",(0,s.IU)(),O="sunday",I="saturday"},"clear"),P=(0,a.K)(function(t){E=t},"setDiagramId"),H=(0,a.K)(function(t){T=t},"setAxisFormat"),N=(0,a.K)(function(){return T},"getAxisFormat"),B=(0,a.K)(function(t){x=t},"setTickInterval"),z=(0,a.K)(function(){return x},"getTickInterval"),R=(0,a.K)(function(t){b=t},"setTodayMarker"),G=(0,a.K)(function(){return b},"getTodayMarker"),j=(0,a.K)(function(t){v=t},"setDateFormat"),U=(0,a.K)(function(){L=!0},"enableInclusiveEndDates"),V=(0,a.K)(function(){return L},"endDatesAreInclusive"),Z=(0,a.K)(function(){A=!0},"enableTopAxis"),X=(0,a.K)(function(){return A},"topAxisEnabled"),q=(0,a.K)(function(t){M=t},"setDisplayMode"),Q=(0,a.K)(function(){return M},"getDisplayMode"),J=(0,a.K)(function(){return v},"getDateFormat"),tt=(0,a.K)((t,e)=>{const n=e.toLowerCase().split(/[\s,]+/).filter(t=>""!==t);return[...new Set([...t,...n])]},"mergeTokens"),et=(0,a.K)(function(t){w=tt(w,t)},"setIncludes"),nt=(0,a.K)(function(){return w},"getIncludes"),it=(0,a.K)(function(t){$=tt($,t)},"setExcludes"),st=(0,a.K)(function(){return $},"getExcludes"),rt=(0,a.K)(function(){return _},"getLinks"),at=(0,a.K)(function(t){C=t,D.push(t)},"addSection"),ot=(0,a.K)(function(){return D},"getSections"),ct=(0,a.K)(function(){let t=St();let e=0;for(;!t&&e<10;)t=St(),e++;return S=bt},"getTasks"),lt=(0,a.K)(function(t,e,n,i){const s=t.format(e.trim()),r=t.format("YYYY-MM-DD");return!i.includes(s)&&!i.includes(r)&&(!(!n.includes("weekends")||t.isoWeekday()!==p[I]&&t.isoWeekday()!==p[I]+1)||(!!n.includes(t.format("dddd").toLowerCase())||(n.includes(s)||n.includes(r))))},"isInvalidDate"),dt=(0,a.K)(function(t){O=t},"setWeekday"),ut=(0,a.K)(function(){return O},"getWeekday"),ht=(0,a.K)(function(t){I=t},"setWeekend"),ft=(0,a.K)(function(t,e,n,i){if(!n.length||t.manualEndTime)return;let s,r;s=t.startTime instanceof Date?c(t.startTime):c(t.startTime,e,!0),s=s.add(1,"d"),r=t.endTime instanceof Date?c(t.endTime):c(t.endTime,e,!0);const[a,o]=mt(s,r,e,n,i);t.endTime=a.toDate(),t.renderEndTime=o},"checkTaskDates"),mt=(0,a.K)(function(t,e,n,i,s){let r=!1,a=null;const o=e.add(1e4,"d");for(;t<=e;){if(r||(a=e.toDate()),r=lt(t,n,i,s),r&&(e=e.add(1,"d"))>o)throw new Error("Failed to find a valid date that was not excluded by `excludes` after 10,000 iterations.");t=t.add(1,"d")}return[e,a]},"fixTaskDates"),yt=(0,a.K)(function(t,e,n){n=n.trim();if((0,a.K)(t=>{const e=t.trim();return"x"===e||"X"===e},"isTimestampFormat")(e)&&/^\d+$/.test(n))return new Date(Number(n));const i=/^after\s+(?[\d\w- ]+)/.exec(n);if(null!==i){let t=null;for(const n of i.groups.ids.split(" ")){let e=_t(n);void 0!==e&&(!t||e.endTime>t.endTime)&&(t=e)}if(t)return t.endTime;const e=new Date;return e.setHours(0,0,0,0),e}let s=c(n,e.trim(),!0);if(s.isValid())return s.toDate();{r.R.debug("Invalid date:"+n),r.R.debug("With date format:"+e.trim());const t=new Date(n);if(void 0===t||isNaN(t.getTime())||t.getFullYear()<-1e4||t.getFullYear()>1e4)throw new Error("Invalid date:"+n);return t}},"getStartDate"),kt=(0,a.K)(function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return null!==e?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),gt=(0,a.K)(function(t,e,n,i=!1){n=n.trim();const s=/^until\s+(?[\d\w- ]+)/.exec(n);if(null!==s){let t=null;for(const n of s.groups.ids.split(" ")){let e=_t(n);void 0!==e&&(!t||e.startTime{window.open(n,"_self")}),_.set(t,n))}),Mt(t,"clickable")},"setLink"),Mt=(0,a.K)(function(t,e){t.split(",").forEach(function(t){let n=_t(t);void 0!==n&&n.classes.push(e)})},"setClass"),Kt=(0,a.K)(function(t,e,n){if("loose"!==(0,s.D7)().securityLevel)return;if(void 0===e)return;let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t{i._K.runFunc(e,...r)})},"setClickFun"),Yt=(0,a.K)(function(t,e){Y.push(function(){const n=E?`${E}-${t}`:t,i=document.querySelector(`[id="${n}"]`);null!==i&&i.addEventListener("click",function(){e()})},function(){const n=E?`${E}-${t}`:t,i=document.querySelector(`[id="${n}-text"]`);null!==i&&i.addEventListener("click",function(){e()})})},"pushFun"),Et=(0,a.K)(function(t,e,n){t.split(",").forEach(function(t){Kt(t,e,n)}),Mt(t,"clickable")},"setClickEvent"),Lt=(0,a.K)(function(t){Y.forEach(function(e){e(t)})},"bindFunctions"),At={getConfig:(0,a.K)(()=>(0,s.D7)().gantt,"getConfig"),clear:W,setDateFormat:j,getDateFormat:J,enableInclusiveEndDates:U,endDatesAreInclusive:V,enableTopAxis:Z,topAxisEnabled:X,setAxisFormat:H,getAxisFormat:N,setTickInterval:B,getTickInterval:z,setTodayMarker:R,getTodayMarker:G,setAccTitle:s.SV,getAccTitle:s.iN,setDiagramTitle:s.ke,getDiagramTitle:s.ab,setDiagramId:P,setDisplayMode:q,getDisplayMode:Q,setAccDescription:s.EI,getAccDescription:s.m7,addSection:at,getSections:ot,getTasks:ct,addTask:$t,findTaskById:_t,addTaskOrg:Dt,setIncludes:et,getIncludes:nt,setExcludes:it,getExcludes:st,setClickEvent:Et,setLink:Ct,getLinks:rt,bindFunctions:Lt,parseDuration:kt,isInvalidDate:lt,setWeekday:dt,getWeekday:ut,setWeekend:ht};function Ot(t,e,n){let i=!0;for(;i;)i=!1,n.forEach(function(n){const s=new RegExp("^\\s*"+n+"\\s*$");t[0].match(s)&&(e[n]=!0,t.shift(1),i=!0)})}(0,a.K)(Ot,"getTaskTags"),c.extend(h);var It,Ft=(0,a.K)(function(){r.R.debug("Something is calling, setConf, remove the call")},"setConf"),Wt={monday:f.ABi,tuesday:f.PGu,wednesday:f.GuW,thursday:f.Mol,friday:f.TUC,saturday:f.rGn,sunday:f.YPH},Pt=(0,a.K)((t,e)=>{let n=[...t].map(()=>-1/0),i=[...t].sort((t,e)=>t.startTime-e.startTime||t.order-e.order),s=0;for(const r of i)for(let t=0;t=n[t]){n[t]=r.endTime,r.order=t+e,t>s&&(s=t);break}return s},"getMaxIntersections"),Ht=1e4,Nt={parser:y,db:At,renderer:{setConf:Ft,draw:(0,a.K)(function(t,e,n,i){const o=(0,s.D7)().gantt;i.db.setDiagramId(e);const l=(0,s.D7)().securityLevel;let d;"sandbox"===l&&(d=(0,f.Ltv)("#i"+e));const u="sandbox"===l?(0,f.Ltv)(d.nodes()[0].contentDocument.body):(0,f.Ltv)("body"),h="sandbox"===l?d.nodes()[0].contentDocument:document,m=h.getElementById(e);void 0===(It=m.parentElement.offsetWidth)&&(It=1200),void 0!==o.useWidth&&(It=o.useWidth);const y=i.db.getTasks(),k=y.filter(t=>!t.vert);let g=[];for(const s of k)g.push(s.type);g=K(g);const p={};let v=2*o.topPadding;if("compact"===i.db.getDisplayMode()||"compact"===o.displayMode){const t={};for(const n of k)void 0===t[n.section]?t[n.section]=[n]:t[n.section].push(n);let e=0;for(const n of Object.keys(t)){const i=Pt(t[n],e)+1;e+=i,v+=i*(o.barHeight+o.barGap),p[n]=i}}else{v+=k.length*(o.barHeight+o.barGap);for(const t of g)p[t]=k.filter(e=>e.type===t).length}m.setAttribute("viewBox","0 0 "+It+" "+v);const T=u.select(`[id="${e}"]`),x=(0,f.w7C)().domain([(0,f.jkA)(y,function(t){return t.startTime}),(0,f.T9B)(y,function(t){return t.endTime})]).rangeRound([0,It-o.leftPadding-o.rightPadding]);function b(t,e){const n=t.startTime,i=e.startTime;let s=0;return n>i?s=1:nt.vert===e.vert?0:t.vert?1:-1);const u=t.filter(t=>!t.vert),h=[...new Set(u.map(t=>t.order))].map(t=>u.find(e=>e.order===t));T.append("g").selectAll("rect").data(h).enter().append("rect").attr("x",0).attr("y",function(t,e){return t.order*n+r-2}).attr("width",function(){return d-o.rightPadding/2}).attr("height",n).attr("class",function(t){for(const[e,n]of g.entries())if(t.type===n)return"section section"+e%o.numberSectionStyles;return"section section0"}).enter();const m=T.append("g").selectAll("rect").data(t).enter(),y=i.db.getLinks();m.append("rect").attr("id",function(t){return e+"-"+t.id}).attr("rx",3).attr("ry",3).attr("x",function(t){return t.milestone?x(t.startTime)+a+.5*(x(t.endTime)-x(t.startTime))-.5*c:x(t.startTime)+a}).attr("y",function(t,e){return e=t.order,t.vert?o.gridLineStartPadding:e*n+r}).attr("width",function(t){return t.milestone?c:t.vert?.08*c:x(t.renderEndTime||t.endTime)-x(t.startTime)}).attr("height",function(t){return t.vert?u.length*(o.barHeight+o.barGap)+2*o.barHeight:c}).attr("transform-origin",function(t,e){return e=t.order,(x(t.startTime)+a+.5*(x(t.endTime)-x(t.startTime))).toString()+"px "+(e*n+r+.5*c).toString()+"px"}).attr("class",function(t){let e="";t.classes.length>0&&(e=t.classes.join(" "));let n=0;for(const[s,r]of g.entries())t.type===r&&(n=s%o.numberSectionStyles);let i="";return t.active?t.crit?i+=" activeCrit":i=" active":t.done?i=t.crit?" doneCrit":" done":t.crit&&(i+=" crit"),0===i.length&&(i=" task"),t.milestone&&(i=" milestone "+i),t.vert&&(i=" vert "+i),i+=n,i+=" "+e,"task"+i}),m.append("text").attr("id",function(t){return e+"-"+t.id+"-text"}).text(function(t){return t.task}).attr("font-size",o.fontSize).attr("x",function(t){let e=x(t.startTime),n=x(t.renderEndTime||t.endTime);if(t.milestone&&(e+=.5*(x(t.endTime)-x(t.startTime))-.5*c,n=e+c),t.vert)return x(t.startTime)+a;const i=this.getBBox().width;return i>n-e?n+i+1.5*o.leftPadding>d?e+a-5:n+a+5:(n-e)/2+e+a}).attr("y",function(t,e){return t.vert?o.gridLineStartPadding+u.length*(o.barHeight+o.barGap)+60:t.order*n+o.barHeight/2+(o.fontSize/2-2)+r}).attr("text-height",c).attr("class",function(t){const e=x(t.startTime);let n=x(t.endTime);t.milestone&&(n=e+c);const i=this.getBBox().width;let s="";t.classes.length>0&&(s=t.classes.join(" "));let r=0;for(const[c,l]of g.entries())t.type===l&&(r=c%o.numberSectionStyles);let a="";return t.active&&(a=t.crit?"activeCritText"+r:"activeText"+r),t.done?a=t.crit?a+" doneCritText"+r:a+" doneText"+r:t.crit&&(a=a+" critText"+r),t.milestone&&(a+=" milestoneText"),t.vert&&(a+=" vertText"),i>n-e?n+i+1.5*o.leftPadding>d?s+" taskTextOutsideLeft taskTextOutside"+r+" "+a:s+" taskTextOutsideRight taskTextOutside"+r+" "+a+" width-"+i:s+" taskText taskText"+r+" "+a+" width-"+i});if("sandbox"===(0,s.D7)().securityLevel){let t;t=(0,f.Ltv)("#i"+e);const n=t.nodes()[0].contentDocument;m.filter(function(t){return y.has(t.id)}).each(function(t){var i=n.querySelector("#"+CSS.escape(e+"-"+t.id)),s=n.querySelector("#"+CSS.escape(e+"-"+t.id+"-text"));const r=i.parentNode;var a=n.createElement("a");a.setAttribute("xlink:href",y.get(t.id)),a.setAttribute("target","_top"),r.appendChild(a),a.appendChild(i),a.appendChild(s)})}}function _(t,n,s,a,l,d,u,h){if(0===u.length&&0===h.length)return;let f,m;for(const{startTime:e,endTime:i}of d)(void 0===f||em)&&(m=i);if(!f||!m)return;if(c(m).diff(c(f),"year")>5)return void r.R.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");const y=i.db.getDateFormat(),k=[];let g=null,p=c(f);for(;p.valueOf()<=m;)i.db.isInvalidDate(p,y,u,h)?g?g.end=p:g={start:p,end:p}:g&&(k.push(g),g=null),p=p.add(1,"d");T.append("g").selectAll("rect").data(k).enter().append("rect").attr("id",t=>e+"-exclude-"+t.start.format("YYYY-MM-DD")).attr("x",t=>x(t.start.startOf("day"))+s).attr("y",o.gridLineStartPadding).attr("width",t=>x(t.end.endOf("day"))-x(t.start.startOf("day"))).attr("height",l-n-o.gridLineStartPadding).attr("transform-origin",function(e,n){return(x(e.start)+s+.5*(x(e.end)-x(e.start))).toString()+"px "+(n*t+.5*l).toString()+"px"}).attr("class","exclude-range")}function D(t,e,n,i){if(n<=0||t>e)return 1/0;const s=e-t,r=c.duration({[i??"day"]:n}).asMilliseconds();return r<=0?1/0:Math.ceil(s/r)}function S(t,e,n,s){const a=i.db.getDateFormat(),c=i.db.getAxisFormat();let l;l=c||("D"===a?"%d":o.axisFormat??"%Y-%m-%d");let d=(0,f.l78)(x).tickSize(-s+e+o.gridLineStartPadding).tickFormat((0,f.DCK)(l));const u=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(i.db.getTickInterval()||o.tickInterval);if(null!==u){const t=parseInt(u[1],10);if(isNaN(t)||t<=0)r.R.warn(`Invalid tick interval value: "${u[1]}". Skipping custom tick interval.`);else{const e=u[2],n=i.db.getWeekday()||o.weekday,s=x.domain(),a=D(s[0],s[1],t,e);if(a>Ht)r.R.warn(`The tick interval "${t}${e}" would generate ${a} ticks, which exceeds the maximum allowed (10000). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(e){case"millisecond":d.ticks(f.t6C.every(t));break;case"second":d.ticks(f.ucG.every(t));break;case"minute":d.ticks(f.wXd.every(t));break;case"hour":d.ticks(f.Agd.every(t));break;case"day":d.ticks(f.UAC.every(t));break;case"week":d.ticks(Wt[n].every(t));break;case"month":d.ticks(f.Ui6.every(t))}}}if(T.append("g").attr("class","grid").attr("transform","translate("+t+", "+(s-50)+")").call(d).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),i.db.topAxisEnabled()||o.topAxis){let n=(0,f.tlR)(x).tickSize(-s+e+o.gridLineStartPadding).tickFormat((0,f.DCK)(l));if(null!==u){const t=parseInt(u[1],10);if(isNaN(t)||t<=0)r.R.warn(`Invalid tick interval value: "${u[1]}". Skipping custom tick interval.`);else{const e=u[2],s=i.db.getWeekday()||o.weekday,r=x.domain();if(D(r[0],r[1],t,e)<=Ht)switch(e){case"millisecond":n.ticks(f.t6C.every(t));break;case"second":n.ticks(f.ucG.every(t));break;case"minute":n.ticks(f.wXd.every(t));break;case"hour":n.ticks(f.Agd.every(t));break;case"day":n.ticks(f.UAC.every(t));break;case"week":n.ticks(Wt[s].every(t));break;case"month":n.ticks(f.Ui6.every(t))}}}T.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(n).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function C(t,e){let n=0;const i=Object.keys(p).map(t=>[t,p[t]]);T.append("g").selectAll("text").data(i).enter().append(function(t){const e=t[0].split(s.Y2.lineBreakRegex),n=-(e.length-1)/2,i=h.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("dy",n+"em");for(const[s,r]of e.entries()){const t=h.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttribute("alignment-baseline","central"),t.setAttribute("x","10"),s>0&&t.setAttribute("dy","1em"),t.textContent=r,i.appendChild(t)}return i}).attr("x",10).attr("y",function(s,r){if(!(r>0))return s[1]*t/2+e;for(let a=0;a`\n .mermaid-main-font {\n font-family: ${t.fontFamily};\n }\n\n .exclude-range {\n fill: ${t.excludeBkgColor};\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: ${t.sectionBkgColor};\n }\n\n .section2 {\n fill: ${t.sectionBkgColor2};\n }\n\n .section1,\n .section3 {\n fill: ${t.altSectionBkgColor};\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle1 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle2 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle3 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle {\n text-anchor: start;\n font-family: ${t.fontFamily};\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ${t.gridColor};\n opacity: 0.8;\n shape-rendering: crispEdges;\n }\n\n .grid .tick text {\n font-family: ${t.fontFamily};\n fill: ${t.textColor};\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ${t.todayLineColor};\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: ${t.fontFamily};\n }\n\n .taskTextOutsideRight {\n fill: ${t.taskTextDarkColor};\n text-anchor: start;\n font-family: ${t.fontFamily};\n }\n\n .taskTextOutsideLeft {\n fill: ${t.taskTextDarkColor};\n text-anchor: end;\n }\n\n\n /* Special case clickable */\n\n .task.clickable {\n cursor: pointer;\n }\n\n .taskText.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ${t.taskTextColor};\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ${t.taskBkgColor};\n stroke: ${t.taskBorderColor};\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ${t.taskTextOutsideColor};\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ${t.taskTextOutsideColor};\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ${t.activeTaskBkgColor};\n stroke: ${t.activeTaskBorderColor};\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ${t.doneTaskBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n /* Done task text displayed outside the bar sits against the diagram background,\n not against the done-task bar, so it must use the outside/contrast color. */\n .doneText0.taskTextOutsideLeft,\n .doneText0.taskTextOutsideRight,\n .doneText1.taskTextOutsideLeft,\n .doneText1.taskTextOutsideRight,\n .doneText2.taskTextOutsideLeft,\n .doneText2.taskTextOutsideRight,\n .doneText3.taskTextOutsideLeft,\n .doneText3.taskTextOutsideRight {\n fill: ${t.taskTextOutsideColor} !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.critBkgColor};\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.activeTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n /* Done-crit task text outside the bar \u2014 same reasoning as doneText above. */\n .doneCritText0.taskTextOutsideLeft,\n .doneCritText0.taskTextOutsideRight,\n .doneCritText1.taskTextOutsideLeft,\n .doneCritText1.taskTextOutsideRight,\n .doneCritText2.taskTextOutsideLeft,\n .doneCritText2.taskTextOutsideRight,\n .doneCritText3.taskTextOutsideLeft,\n .doneCritText3.taskTextOutsideRight {\n fill: ${t.taskTextOutsideColor} !important;\n }\n\n .vert {\n stroke: ${t.vertLineColor};\n }\n\n .vertText {\n font-size: 15px;\n text-anchor: middle;\n fill: ${t.vertLineColor} !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.titleColor||t.textColor};\n font-family: ${t.fontFamily};\n }\n`,"getStyles")}}}]); \ No newline at end of file diff --git a/assets/js/2824.7be7eda9.js b/assets/js/2824.7be7eda9.js new file mode 100644 index 000000000..6ca838624 --- /dev/null +++ b/assets/js/2824.7be7eda9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[2824],{64918(t,e,s){s.d(e,{o:()=>i});var i=(0,s(86827).K)(()=>"\n /* Font Awesome icon styling - consolidated */\n .label-icon {\n display: inline-block;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n }\n \n .node .label-icon path {\n fill: currentColor;\n stroke: revert;\n stroke-width: revert;\n }\n","getIconStyles")},338(t,e,s){s.d(e,{CP:()=>h,Ck:()=>A,HT:()=>p,PB:()=>d,aC:()=>c,lC:()=>u,m:()=>o,tk:()=>l});var i=s(76385),n=s(86827),a=s(16750),r=s(70451),l=(0,n.K)((t,e)=>{const s=t.append("rect");if(s.attr("x",e.x),s.attr("y",e.y),s.attr("fill",e.fill),s.attr("stroke",e.stroke),s.attr("width",e.width),s.attr("height",e.height),e.name&&s.attr("name",e.name),e.rx&&s.attr("rx",e.rx),e.ry&&s.attr("ry",e.ry),void 0!==e.attrs)for(const i in e.attrs)s.attr(i,e.attrs[i]);return e.class&&s.attr("class",e.class),s},"drawRect"),u=(0,n.K)((t,e)=>{const s={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};l(t,s).lower()},"drawBackgroundRect"),o=(0,n.K)((t,e)=>{const s=e.text.replace(i.H1," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),e.class&&n.attr("class",e.class);const a=n.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.text(s),n},"drawText"),c=(0,n.K)((t,e,s,i)=>{const n=t.append("image");n.attr("x",e),n.attr("y",s);const r=(0,a.J)(i);n.attr("xlink:href",r)},"drawImage"),h=(0,n.K)((t,e,s,i)=>{const n=t.append("use");n.attr("x",e),n.attr("y",s);const r=(0,a.J)(i);n.attr("xlink:href",`#${r}`)},"drawEmbeddedImage"),d=(0,n.K)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),p=(0,n.K)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),A=(0,n.K)(()=>{let t=(0,r.Ltv)(".mermaidTooltip");return t.empty()&&(t=(0,r.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip")},2824(t,e,s){s.d(e,{Lh:()=>D,NM:()=>f,_$:()=>y,tM:()=>E});var i=s(64918),n=s(96755),a=s(1672),r=s(9417),l=s(338),u=s(16459),o=s(76385),c=s(31293),h=s(86827),d=s(70451),p=s(99418),A=function(){var t=(0,h.K)(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[1,18],s=[1,19],i=[1,20],n=[1,41],a=[1,26],r=[1,42],l=[1,24],u=[1,25],o=[1,32],c=[1,33],d=[1,34],p=[1,45],A=[1,35],y=[1,36],g=[1,37],m=[1,38],b=[1,27],C=[1,28],k=[1,29],f=[1,30],E=[1,31],T=[1,44],D=[1,46],F=[1,43],B=[1,47],_=[1,9],$=[1,8,9],x=[1,58],S=[1,59],N=[1,60],L=[1,61],v=[1,62],I=[1,63],w=[1,64],O=[1,8,9,41],R=[1,77],K=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],P=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],M=[13,60,86,100,102,103],G=[13,60,73,74,86,100,102,103],U=[13,60,68,69,70,71,72,86,100,102,103],Y=[1,103],z=[1,121],Q=[1,117],W=[1,113],j=[1,119],X=[1,114],H=[1,115],V=[1,116],q=[1,118],J=[1,120],Z=[22,50,60,61,82,86,87,88,89,90],tt=[1,128],et=[12,39],st=[1,8,9,39,41,44,46],it=[1,8,9,22],nt=[1,153],at=[1,8,9,61],rt=[1,8,9,22,50,60,61,82,86,87,88,89,90],lt={trace:(0,h.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:(0,h.K)(function(t,e,s,i,n,a,r){var l=a.length-1;switch(n){case 8:this.$=a[l-1];break;case 9:case 10:case 13:case 15:case 46:this.$=a[l];break;case 11:case 14:this.$=a[l-2]+"."+a[l];break;case 12:case 16:case 110:this.$=a[l-1]+a[l];break;case 17:case 18:this.$=a[l-1]+"~"+a[l]+"~";break;case 19:i.addRelation(a[l]);break;case 20:a[l-1].title=i.cleanupLabel(a[l]),i.addRelation(a[l-1]);break;case 31:this.$=a[l].trim(),i.setAccTitle(this.$);break;case 32:case 33:this.$=a[l].trim(),i.setAccDescription(this.$);break;case 34:i.addClassesToNamespace(a[l-3],a[l-1][0],a[l-1][1]),i.popNamespace();break;case 35:i.addClassesToNamespace(a[l-4],a[l-1][0],a[l-1][1]),i.popNamespace();break;case 36:this.$=i.addNamespace(a[l]);break;case 37:this.$=i.addNamespace(a[l-1],a[l]);break;case 38:this.$=[[a[l]],[]];break;case 39:this.$=[[a[l-1]],[]];break;case 40:a[l][0].unshift(a[l-2]),this.$=a[l];break;case 41:this.$=[[],[a[l]]];break;case 42:this.$=[[],[a[l-1]]];break;case 43:a[l][1].unshift(a[l-2]),this.$=a[l];break;case 44:case 45:this.$=[[],[]];break;case 48:i.setCssClass(a[l-2],a[l]);break;case 49:i.addMembers(a[l-3],a[l-1]);break;case 51:i.setCssClass(a[l-5],a[l-3]),i.addMembers(a[l-5],a[l-1]);break;case 52:i.addAnnotation(a[l-3],a[l-1]);break;case 53:i.addAnnotation(a[l-6],a[l-4]),i.addMembers(a[l-6],a[l-1]);break;case 54:i.addAnnotation(a[l-5],a[l-3]);break;case 55:this.$=a[l],i.addClass(a[l]);break;case 56:this.$=a[l-1],i.addClass(a[l-1]),i.setClassLabel(a[l-1],a[l]);break;case 60:i.addAnnotation(a[l],a[l-2]);break;case 61:case 74:case 107:this.$=[a[l]];break;case 62:a[l].push(a[l-1]),this.$=a[l];break;case 63:case 65:case 66:break;case 64:i.addMember(a[l-1],i.cleanupLabel(a[l]));break;case 67:this.$={id1:a[l-2],id2:a[l],relation:a[l-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:a[l-3],id2:a[l],relation:a[l-1],relationTitle1:a[l-2],relationTitle2:"none"};break;case 69:this.$={id1:a[l-3],id2:a[l],relation:a[l-2],relationTitle1:"none",relationTitle2:a[l-1]};break;case 70:this.$={id1:a[l-4],id2:a[l],relation:a[l-2],relationTitle1:a[l-3],relationTitle2:a[l-1]};break;case 71:this.$=i.addNote(a[l],a[l-1]);break;case 72:this.$=i.addNote(a[l]);break;case 73:this.$=a[l-2],i.defineClass(a[l-1],a[l]);break;case 75:this.$=a[l-2].concat([a[l]]);break;case 76:i.setDirection("TB");break;case 77:i.setDirection("BT");break;case 78:i.setDirection("RL");break;case 79:i.setDirection("LR");break;case 80:this.$={type1:a[l-2],type2:a[l],lineType:a[l-1]};break;case 81:this.$={type1:"none",type2:a[l],lineType:a[l-1]};break;case 82:this.$={type1:a[l-1],type2:"none",lineType:a[l]};break;case 83:this.$={type1:"none",type2:"none",lineType:a[l]};break;case 84:this.$=i.relationType.AGGREGATION;break;case 85:this.$=i.relationType.EXTENSION;break;case 86:this.$=i.relationType.COMPOSITION;break;case 87:this.$=i.relationType.DEPENDENCY;break;case 88:this.$=i.relationType.LOLLIPOP;break;case 89:this.$=i.lineType.LINE;break;case 90:this.$=i.lineType.DOTTED_LINE;break;case 91:case 97:this.$=a[l-2],i.setClickEvent(a[l-1],a[l]);break;case 92:case 98:this.$=a[l-3],i.setClickEvent(a[l-2],a[l-1]),i.setTooltip(a[l-2],a[l]);break;case 93:this.$=a[l-2],i.setLink(a[l-1],a[l]);break;case 94:this.$=a[l-3],i.setLink(a[l-2],a[l-1],a[l]);break;case 95:this.$=a[l-3],i.setLink(a[l-2],a[l-1]),i.setTooltip(a[l-2],a[l]);break;case 96:this.$=a[l-4],i.setLink(a[l-3],a[l-2],a[l]),i.setTooltip(a[l-3],a[l-1]);break;case 99:this.$=a[l-3],i.setClickEvent(a[l-2],a[l-1],a[l]);break;case 100:this.$=a[l-4],i.setClickEvent(a[l-3],a[l-2],a[l-1]),i.setTooltip(a[l-3],a[l]);break;case 101:this.$=a[l-3],i.setLink(a[l-2],a[l]);break;case 102:this.$=a[l-4],i.setLink(a[l-3],a[l-1],a[l]);break;case 103:this.$=a[l-4],i.setLink(a[l-3],a[l-1]),i.setTooltip(a[l-3],a[l]);break;case 104:this.$=a[l-5],i.setLink(a[l-4],a[l-2],a[l]),i.setTooltip(a[l-4],a[l-1]);break;case 105:this.$=a[l-2],i.setCssStyle(a[l-1],a[l]);break;case 106:i.setCssClass(a[l-1],a[l]);break;case 108:a[l-2].push(a[l]),this.$=a[l-2]}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:s,37:i,38:22,42:n,43:23,46:a,48:r,51:l,52:u,54:o,56:c,57:d,60:p,62:A,63:y,64:g,65:m,75:b,76:C,78:k,82:f,83:E,86:T,100:D,102:F,103:B},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(_,[2,5],{8:[1,48]}),{8:[1,49]},t($,[2,19],{22:[1,50]}),t($,[2,21]),t($,[2,22]),t($,[2,23]),t($,[2,24]),t($,[2,25]),t($,[2,26]),t($,[2,27]),t($,[2,28]),t($,[2,29]),t($,[2,30]),{34:[1,51]},{36:[1,52]},t($,[2,33]),t($,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:x,69:S,70:N,71:L,72:v,73:I,74:w}),{39:[1,65]},t(O,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t($,[2,65]),t($,[2,66]),{16:69,60:p,86:T,100:D,102:F},{16:39,17:40,19:70,60:p,86:T,100:D,102:F,103:B},{16:39,17:40,19:71,60:p,86:T,100:D,102:F,103:B},{16:39,17:40,19:72,60:p,86:T,100:D,102:F,103:B},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:p,86:T,100:D,102:F,103:B},{13:R,55:76},{58:78,60:[1,79]},t($,[2,76]),t($,[2,77]),t($,[2,78]),t($,[2,79]),t(K,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:p,86:T,100:D,102:F,103:B}),t(K,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:p,86:T,100:D,102:F,103:B},{16:39,17:40,19:87,60:p,86:T,100:D,102:F,103:B},t(P,[2,133]),t(P,[2,134]),t(P,[2,135]),t(P,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(_,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:e,35:s,37:i,42:n,46:a,48:r,51:l,52:u,54:o,56:c,57:d,60:p,62:A,63:y,64:g,65:m,75:b,76:C,78:k,82:f,83:E,86:T,100:D,102:F,103:B}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:s,37:i,38:22,42:n,43:23,46:a,48:r,51:l,52:u,54:o,56:c,57:d,60:p,62:A,63:y,64:g,65:m,75:b,76:C,78:k,82:f,83:E,86:T,100:D,102:F,103:B},t($,[2,20]),t($,[2,31]),t($,[2,32]),{13:[1,91],16:39,17:40,19:90,60:p,86:T,100:D,102:F,103:B},{53:92,66:56,67:57,68:x,69:S,70:N,71:L,72:v,73:I,74:w},t($,[2,64]),{67:93,73:I,74:w},t(M,[2,83],{66:94,68:x,69:S,70:N,71:L,72:v}),t(G,[2,84]),t(G,[2,85]),t(G,[2,86]),t(G,[2,87]),t(G,[2,88]),t(U,[2,89]),t(U,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:n,43:23,48:r,54:o,56:c},{16:100,60:p,86:T,100:D,102:F},{41:[1,102],45:101,51:Y},{16:104,60:p,86:T,100:D,102:F},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:z,50:Q,59:110,60:W,82:j,84:111,85:112,86:X,87:H,88:V,89:q,90:J},{60:[1,122]},{13:R,55:123},t(O,[2,72]),t(O,[2,138]),{22:z,50:Q,59:124,60:W,61:[1,125],82:j,84:111,85:112,86:X,87:H,88:V,89:q,90:J},t(Z,[2,74]),{16:39,17:40,19:126,60:p,86:T,100:D,102:F,103:B},t(K,[2,16]),t(K,[2,17]),t(K,[2,18]),{11:127,12:tt,39:[2,36]},t(et,[2,9],{16:85,17:86,15:130,18:[1,129],60:p,86:T,100:D,102:F,103:B}),t(et,[2,10]),t(st,[2,55],{11:131,12:tt}),t(_,[2,7]),{9:[1,132]},t(it,[2,67]),{16:39,17:40,19:133,60:p,86:T,100:D,102:F,103:B},{13:[1,135],16:39,17:40,19:134,60:p,86:T,100:D,102:F,103:B},t(M,[2,82],{66:136,68:x,69:S,70:N,71:L,72:v}),t(M,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:n,43:23,48:r,54:o,56:c},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(O,[2,48],{39:[1,142]}),{41:[1,143]},t(O,[2,50]),{41:[2,61],45:144,51:Y},{47:[1,145]},{16:39,17:40,19:146,60:p,86:T,100:D,102:F,103:B},t($,[2,91],{13:[1,147]}),t($,[2,93],{13:[1,149],77:[1,148]}),t($,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t($,[2,105],{61:nt}),t(at,[2,107],{85:154,22:z,50:Q,60:W,82:j,86:X,87:H,88:V,89:q,90:J}),t(rt,[2,109]),t(rt,[2,111]),t(rt,[2,112]),t(rt,[2,113]),t(rt,[2,114]),t(rt,[2,115]),t(rt,[2,116]),t(rt,[2,117]),t(rt,[2,118]),t(rt,[2,119]),t($,[2,106]),t(O,[2,71]),t($,[2,73],{61:nt}),{60:[1,155]},t(K,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:p,86:T,100:D,102:F,103:B},t(et,[2,12]),t(st,[2,56]),{1:[2,4]},t(it,[2,69]),t(it,[2,68]),{16:39,17:40,19:158,60:p,86:T,100:D,102:F,103:B},t(M,[2,80]),t(O,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:n,43:23,48:r,54:o,56:c},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:n,43:23,48:r,54:o,56:c},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:n,43:23,48:r,54:o,56:c},{45:163,51:Y},t(O,[2,49]),{41:[2,62]},t(O,[2,52],{39:[1,164]}),t($,[2,60]),t($,[2,92]),t($,[2,94]),t($,[2,95],{77:[1,165]}),t($,[2,98]),t($,[2,99],{13:[1,166]}),t($,[2,101],{13:[1,168],77:[1,167]}),{22:z,50:Q,60:W,82:j,84:169,85:112,86:X,87:H,88:V,89:q,90:J},t(rt,[2,110]),t(Z,[2,75]),{14:[1,170]},t(et,[2,11]),t(it,[2,70]),t(O,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:Y},t($,[2,96]),t($,[2,100]),t($,[2,102]),t($,[2,103],{77:[1,174]}),t(at,[2,108],{85:154,22:z,50:Q,60:W,82:j,86:X,87:H,88:V,89:q,90:J}),t(st,[2,8]),t(O,[2,51]),{41:[1,175]},t(O,[2,54]),t($,[2,104]),t(O,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:(0,h.K)(function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},"parseError"),parse:(0,h.K)(function(t){var e=this,s=[0],i=[],n=[null],a=[],r=this.table,l="",u=0,o=0,c=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),A={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(A.yy[y]=this.yy[y]);p.setInput(t,A.yy),A.yy.lexer=p,A.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var g=p.yylloc;a.push(g);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof A.yy.parseError?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,h.K)(function(t){s.length=s.length-2*t,n.length=n.length-t,a.length=a.length-t},"popStack"),(0,h.K)(b,"lex");for(var C,k,f,E,T,D,F,B,_,$={};;){if(f=s[s.length-1],this.defaultActions[f]?E=this.defaultActions[f]:(null==C&&(C=b()),E=r[f]&&r[f][C]),void 0===E||!E.length||!E[0]){var x="";for(D in _=[],r[f])this.terminals_[D]&&D>2&&_.push("'"+this.terminals_[D]+"'");x=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[C]||C)+"'":"Parse error on line "+(u+1)+": Unexpected "+(1==C?"end of input":"'"+(this.terminals_[C]||C)+"'"),this.parseError(x,{text:p.match,token:this.terminals_[C]||C,line:p.yylineno,loc:g,expected:_})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+f+", token: "+C);switch(E[0]){case 1:s.push(C),n.push(p.yytext),a.push(p.yylloc),s.push(E[1]),C=null,k?(C=k,k=null):(o=p.yyleng,l=p.yytext,u=p.yylineno,g=p.yylloc,c>0&&c--);break;case 2:if(F=this.productions_[E[1]][1],$.$=n[n.length-F],$._$={first_line:a[a.length-(F||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(F||1)].first_column,last_column:a[a.length-1].last_column},m&&($._$.range=[a[a.length-(F||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply($,[l,o,u,A.yy,E[1],n,a].concat(d))))return T;F&&(s=s.slice(0,-1*F*2),n=n.slice(0,-1*F),a=a.slice(0,-1*F)),s.push(this.productions_[E[1]][0]),n.push($.$),a.push($._$),B=r[s[s.length-2]][s[s.length-1]],s.push(B);break;case 3:return!0}}return!0},"parse")},ut=function(){return{EOF:1,parseError:(0,h.K)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,h.K)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,h.K)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,h.K)(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,h.K)(function(){return this._more=!0,this},"more"),reject:(0,h.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,h.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,h.K)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,h.K)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,h.K)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,h.K)(function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var a in n)this[a]=n[a];return!1}return!1},"test_match"),next:(0,h.K)(function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;ae[0].length)){if(e=s,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,h.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,h.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,h.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,h.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,h.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,h.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,h.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,h.K)(function(t,e,s,i){switch(s){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:case 5:case 14:case 31:case 37:case 41:case 48:break;case 6:return this.begin("acc_title"),33;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),35;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 19:case 22:case 24:case 59:case 62:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 36:return 8;case 15:case 16:return 7;case 17:case 38:case 46:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 79;case 23:return 80;case 25:return"STR";case 26:this.begin("string");break;case 27:return 82;case 28:return 57;case 29:return this.begin("namespace"),42;case 30:case 40:return this.popState(),8;case 32:return this.begin("namespace-body"),39;case 33:this.popState(),this.less(0);break;case 34:case 44:return this.popState(),41;case 35:case 45:return"EOF_IN_STRUCT";case 39:return this.begin("class"),48;case 42:return this.popState(),this.popState(),41;case 43:return this.begin("class-body"),39;case 47:return"OPEN_IN_STRUCT";case 49:return"MEMBER";case 50:return 83;case 51:return 75;case 52:return 76;case 53:return 78;case 54:return 54;case 55:return 56;case 56:return 46;case 57:return 47;case 58:return 81;case 60:return"GENERICTYPE";case 61:this.begin("generic");break;case 63:return"BQUOTE_STR";case 64:this.begin("bqstring");break;case 65:case 66:case 67:case 68:return 77;case 69:case 70:return 69;case 71:case 72:return 71;case 73:return 70;case 74:return 68;case 75:return 72;case 76:return 73;case 77:return 74;case 78:return 22;case 79:return 44;case 80:return 100;case 81:return 18;case 82:return"PLUS";case 83:return 87;case 84:return 61;case 85:case 86:return 89;case 87:return 90;case 88:case 89:return"EQUALS";case 90:return 60;case 91:return 12;case 92:return 14;case 93:return"PUNCTUATION";case 94:return 86;case 95:return 102;case 96:case 97:return 50;case 98:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\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]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\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\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-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\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\u0D60\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-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\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\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\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\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,29,34,35,36,37,38,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},namespace:{rules:[26,29,30,31,32,33,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},"class-body":{rules:[26,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},class:{rules:[26,40,41,42,43,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr:{rules:[9,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_title:{rules:[7,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_args:{rules:[22,23,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_name:{rules:[19,20,21,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},href:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},struct:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},generic:{rules:[26,50,51,52,53,54,55,56,57,58,59,60,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},bqstring:{rules:[26,50,51,52,53,54,55,56,57,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},string:{rules:[24,25,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,39,50,51,52,53,54,55,56,57,58,61,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,92,93,94,95,96,97,98],inclusive:!0}}}}();function ot(){this.yy={}}return lt.lexer=ut,(0,h.K)(ot,"Parser"),ot.prototype=lt,lt.Parser=ot,new ot}();A.parser=A;var y=A,g=["#","+","~","-",""],m=class{static{(0,h.K)(this,"ClassMember")}constructor(t,e){this.memberType=e,this.visibility="",this.classifier="",this.text="";const s=(0,o.jZ)(t,(0,o.D7)());this.parseMember(s)}getDisplayDetails(){let t=this.visibility+(0,o.QO)(this.id);"method"===this.memberType&&(t+=`(${(0,o.QO)(this.parameters.trim())})`,this.returnType&&(t+=" : "+(0,o.QO)(this.returnType))),t=t.trim();return{displayText:t,cssStyle:this.parseClassifier()}}parseMember(t){let e="";if("method"===this.memberType){const s=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t);if(s){const t=s[1]?s[1].trim():"";if(g.includes(t)&&(this.visibility=t),this.id=s[2],this.parameters=s[3]?s[3].trim():"",e=s[4]?s[4].trim():"",this.returnType=s[5]?s[5].trim():"",""===e){const t=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(t)&&(e=t,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const s=t.length,i=t.substring(0,1),n=t.substring(s-1);g.includes(i)&&(this.visibility=i),/[$*]/.exec(n)&&(e=n),this.id=t.substring(""===this.visibility?0:1,""===e?s:s-1)}this.classifier=e,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();const s=`${this.visibility?"\\"+this.visibility:""}${(0,o.QO)(this.id)}${"method"===this.memberType?`(${(0,o.QO)(this.parameters)})${this.returnType?" : "+(0,o.QO)(this.returnType):""}`:""}`;this.text=s.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},b="classId-",C=0,k=(0,h.K)(t=>o.Y2.sanitizeText(t,(0,o.D7)()),"sanitizeText"),f=class t{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=new Map,this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=(0,h.K)(t=>{const e=(0,l.Ck)();(0,d.Ltv)(t).select("svg").selectAll("g").filter(function(){return null!==(0,d.Ltv)(this).attr("title")}).on("mouseover",t=>{const s=(0,d.Ltv)(t.currentTarget),i=s.attr("title");if(!i)return;const n=t.currentTarget.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.html(p.A.sanitize(i)).style("left",`${window.scrollX+n.left+n.width/2}px`).style("top",`${window.scrollY+n.bottom+4}px`),s.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0),(0,d.Ltv)(t.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=o.SV,this.getAccTitle=o.iN,this.setAccDescription=o.EI,this.getAccDescription=o.m7,this.setDiagramTitle=o.ke,this.getDiagramTitle=o.ab,this.getConfig=(0,h.K)(()=>(0,o.D7)().class,"getConfig"),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.popNamespace=this.popNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}static{(0,h.K)(this,"ClassDB")}splitClassNameAndType(t){const e=o.Y2.sanitizeText(t,(0,o.D7)());let s="",i=e;if(e.indexOf("~")>0){const t=e.split("~");i=k(t[0]),s=k(t[1])}return{className:i,type:s}}setClassLabel(t,e){const s=o.Y2.sanitizeText(t,(0,o.D7)());e&&(e=k(e));const{className:i}=this.splitClassNameAndType(s);this.classes.get(i).label=e,this.classes.get(i).text=`${e}${this.classes.get(i).type?`<${this.classes.get(i).type}>`:""}`}addClass(t){const e=o.Y2.sanitizeText(t,(0,o.D7)()),{className:s,type:i}=this.splitClassNameAndType(e);if(this.classes.has(s))return;const n=o.Y2.sanitizeText(s,(0,o.D7)());this.classes.set(n,{id:n,type:i,label:n,text:`${n}${i?`<${i}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:b+n+"-"+C}),C++}addInterface(t,e){const s={id:`interface${this.interfaces.length}`,label:t,classId:e};this.interfaces.push(s)}setDiagramId(t){this.diagramId=t}lookUpDomId(t){const e=o.Y2.sanitizeText(t,(0,o.D7)());if(this.classes.has(e)){const t=this.classes.get(e).domId;return this.diagramId?`${this.diagramId}-${t}`:t}throw new Error("Class not found: "+e)}clear(){this.relations=[],this.classes=new Map,this.notes=new Map,this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.direction="TB",(0,o.IU)()}getClass(t){return this.classes.get(t)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(t){const e="number"==typeof t?`note${t}`:t;return this.notes.get(e)}getNotes(){return this.notes}addRelation(t){c.R.debug("Adding relation: "+JSON.stringify(t));const e=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];t.relation.type1!==this.relationType.LOLLIPOP||e.includes(t.relation.type2)?t.relation.type2!==this.relationType.LOLLIPOP||e.includes(t.relation.type1)?(this.addClass(t.id1),this.addClass(t.id2)):(this.addClass(t.id1),this.addInterface(t.id2,t.id1),t.id2="interface"+(this.interfaces.length-1)):(this.addClass(t.id2),this.addInterface(t.id1,t.id2),t.id1="interface"+(this.interfaces.length-1)),t.id1=this.splitClassNameAndType(t.id1).className,t.id2=this.splitClassNameAndType(t.id2).className,t.relationTitle1=o.Y2.sanitizeText(t.relationTitle1.trim(),(0,o.D7)()),t.relationTitle2=o.Y2.sanitizeText(t.relationTitle2.trim(),(0,o.D7)()),this.relations.push(t)}addAnnotation(t,e){const s=this.splitClassNameAndType(t).className;this.classes.get(s).annotations.push(e)}addMember(t,e){this.addClass(t);const s=this.splitClassNameAndType(t).className,i=this.classes.get(s);if("string"==typeof e){const t=e.trim();t.startsWith("<<")&&t.endsWith(">>")?i.annotations.push(k(t.substring(2,t.length-2))):t.indexOf(")")>0?i.methods.push(new m(t,"method")):t&&i.members.push(new m(t,"attribute"))}}addMembers(t,e){Array.isArray(e)&&(e.reverse(),e.forEach(e=>this.addMember(t,e)))}addNote(t,e){const s=this.notes.size,i={id:`note${s}`,class:e,text:t,index:s};return this.notes.set(i.id,i),i.id}cleanupLabel(t){return t.startsWith(":")&&(t=t.substring(1)),k(t.trim())}setCssClass(t,e){t.split(",").forEach(t=>{let s=t;/\d/.exec(t[0])&&(s=b+s),s=this.splitClassNameAndType(s).className;const i=this.classes.get(s);i&&(i.cssClasses+=" "+e)})}defineClass(t,e){for(const s of t){let t=this.styleClasses.get(s);void 0===t&&(t={id:s,styles:[],textStyles:[]},this.styleClasses.set(s,t)),e&&e.forEach(e=>{if(/color/.exec(e)){const s=e.replace("fill","bgFill");t.textStyles.push(s)}t.styles.push(e)}),this.classes.forEach(t=>{t.cssClasses.includes(s)&&t.styles.push(...e.flatMap(t=>t.split(",")))})}}setTooltip(t,e){t.split(",").forEach(t=>{if(void 0!==e){const s=this.splitClassNameAndType(t).className,i=this.classes.get(s);i&&(i.tooltip=k(e))}})}getTooltip(t,e){return e&&this.namespaces.has(e)?this.namespaces.get(e).classes.get(t).tooltip:this.classes.get(t).tooltip}setLink(t,e,s){const i=(0,o.D7)();t.split(",").forEach(t=>{let n=t;/\d/.exec(t[0])&&(n=b+n),n=this.splitClassNameAndType(n).className;const a=this.classes.get(n);a&&(a.link=u._K.formatUrl(e,i),"sandbox"===i.securityLevel?a.linkTarget="_top":a.linkTarget="string"==typeof s?k(s):"_blank")}),this.setCssClass(t,"clickable")}setClickEvent(t,e,s){t.split(",").forEach(t=>{this.setClickFunc(t,e,s);const i=this.splitClassNameAndType(t).className,n=this.classes.get(i);n&&(n.haveCallback=!0)}),this.setCssClass(t,"clickable")}setClickFunc(t,e,s){const i=o.Y2.sanitizeText(t,(0,o.D7)());if("loose"!==(0,o.D7)().securityLevel)return;if(void 0===e)return;const n=this.splitClassNameAndType(i).className;if(this.classes.has(n)){let t=[];if("string"==typeof s){t=s.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e{const s=this.lookUpDomId(n),i=document.querySelector(`[id="${s}"]`);null!==i&&i.addEventListener("click",()=>{u._K.runFunc(e,...t)},!1)})}}bindFunctions(t){this.functions.forEach(e=>{e(t)})}escapeHtml(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}getDirection(){return this.direction}setDirection(t){this.direction=t}static resolveQualifiedId(t,e){const s=e.at(-1);return s?`${s}.${t}`:t}static getAncestorIds(t){const e=t.split("."),s=new Array(e.length);s[0]=e[0];for(let i=1;i0?a[t-1]:void 0,r=t===a.length-1,l=r&&s?s:n[t];this.namespaces.has(e)?r&&(this.namespaces.get(e).explicit=!0):this.namespaces.set(e,this.createNamespaceNode(e,l,i,r)),i&&this.linkParentChild(i,e)}return i}popNamespace(){this.namespaceStack.pop()}getNamespace(t){return this.namespaces.get(t)}getNamespaces(){return this.namespaces}addClassesToNamespace(t,e,s){if(this.namespaces.has(t)){for(const s of e){const{className:e}=this.splitClassNameAndType(s),i=this.getClass(e);i.parent=t,this.namespaces.get(t).classes.set(e,i)}for(const e of s){const s=this.getNote(e);s.parent=t,this.namespaces.get(t).notes.set(e,s)}}}setCssStyle(t,e){const s=this.classes.get(t);if(e&&s)for(const i of e)i.includes(",")?s.styles.push(...i.split(",")):s.styles.push(i)}getArrowMarker(t){let e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}resolveExplicitAncestor(t){let e=t;for(;e;){const t=this.namespaces.get(e);if(!t)return;if(t.explicit)return e;e=t.parent}}getData(){const t=[],e=[],s=(0,o.D7)(),i=s.class?.hierarchicalNamespaces??!0;for(const a of this.namespaces.values()){if(!i&&!a.explicit)continue;const e={id:a.id,label:i?a.label:a.id,isGroup:!0,padding:s.class.padding??16,shape:"rect",cssStyles:[],look:s.look,parentId:i?a.parent:void 0};t.push(e)}for(const a of this.classes.values()){const e=i?a.parent:this.resolveExplicitAncestor(a.parent),n={...a,type:void 0,isGroup:!1,parentId:e,look:s.look};t.push(n)}for(const a of this.notes.values()){const n=i?a.parent:this.resolveExplicitAncestor(a.parent),r={id:a.id,label:a.text,isGroup:!1,shape:"note",padding:s.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${s.themeVariables.noteBkgColor}`,`stroke: ${s.themeVariables.noteBorderColor}`],look:s.look,parentId:n,labelType:"markdown"};t.push(r);const l=this.classes.get(a.class)?.id;if(l){const t={id:`edgeNote${a.index}`,start:a.id,end:l,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:s.look};e.push(t)}}for(const a of this.interfaces){const e={id:a.id,label:a.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:s.look};t.push(e)}let n=0;for(const a of this.relations){n++;const t={id:(0,u.rY)(a.id1,a.id2,{prefix:"id",counter:n}),start:a.id1,end:a.id2,type:"normal",label:a.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(a.relation.type1),arrowTypeEnd:this.getArrowMarker(a.relation.type2),startLabelRight:"none"===a.relationTitle1?"":a.relationTitle1,endLabelLeft:"none"===a.relationTitle2?"":a.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:a.style||"",pattern:1==a.relation.lineType?"dashed":"solid",look:s.look,labelType:"markdown"};e.push(t)}return{nodes:t,edges:e,other:{},config:s,direction:this.getDirection()}}},E=(0,h.K)(t=>`g.classGroup text {\n fill: ${t.nodeBorder||t.classText};\n stroke: none;\n font-family: ${t.fontFamily};\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span {\n color: ${t.titleColor};\n }\n .cluster-label span p {\n background-color: transparent;\n }\n\n .cluster rect {\n fill: ${t.clusterBkg};\n stroke: ${t.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span {\n color: ${t.titleColor};\n }\n\n.nodeLabel, .edgeLabel {\n color: ${t.classText};\n}\n\n.noteLabel .nodeLabel, .noteLabel .edgeLabel {\n color: ${t.noteTextColor};\n}\n.edgeLabel .label rect {\n fill: ${t.mainBkg};\n}\n.label text {\n fill: ${t.classText};\n}\n\n.labelBkg {\n background: ${t.mainBkg};\n}\n.edgeLabel .label span {\n background: ${t.mainBkg};\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: ${t.strokeWidth};\n }\n\n\n.divider {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.classGroup line {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ${t.nodeBorder};\n font-size: 10px;\n}\n\n.relation {\n stroke: ${t.lineColor};\n stroke-width: ${t.strokeWidth};\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n.dotted-line{\n stroke-dasharray: 1 2;\n}\n\n[id$="-compositionStart"], .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-compositionEnd"], .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-dependencyStart"], .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-dependencyEnd"], .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-extensionStart"], .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-extensionEnd"], .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-aggregationStart"], .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-aggregationEnd"], .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-lollipopStart"], .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-lollipopEnd"], .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n line-height: initial;\n}\n\n.classTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n\n.edgeLabel[data-look="neo"] {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n}\n ${(0,i.o)()}\n`,"getStyles"),T=(0,h.K)((t,e="TB")=>{if(!t.doc)return e;let s=e;for(const i of t.doc)"dir"===i.stmt&&(s=i.value);return s},"getDir"),D={getClasses:(0,h.K)(function(t,e){return e.db.getClasses()},"getClasses"),draw:(0,h.K)(async function(t,e,s,i){c.R.info("REF0:"),c.R.info("Drawing class diagram (v3)",e);const{securityLevel:l,state:h,layout:d}=(0,o.D7)();i.db.setDiagramId(e);const p=i.db.getData(),A=(0,n.A)(e,l);p.type=i.type,p.layoutAlgorithm=(0,r.q7)(d),p.nodeSpacing=h?.nodeSpacing||50,p.rankSpacing=h?.rankSpacing||50,p.markers=["aggregation","extension","composition","dependency","lollipop"],p.diagramId=e,await(0,r.XX)(p,A);u._K.insertTitle(A,"classDiagramTitleText",h?.titleTopMargin??25,i.db.getDiagramTitle()),(0,a.P)(A,8,"classDiagram",h?.useMaxWidth??!0)},"draw"),getDir:T}},1672(t,e,s){s.d(e,{P:()=>r});var i=s(76385),n=s(31293),a=s(86827),r=(0,a.K)((t,e,s,a)=>{t.attr("class",s);const{width:r,height:o,x:c,y:h}=l(t,e);(0,i.a$)(t,o,r,a);const d=u(c,h,r,o,e);t.attr("viewBox",d),n.R.debug(`viewBox configured: ${d} with padding: ${e}`)},"setupViewPortForSVG"),l=(0,a.K)((t,e)=>{const s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}},"calculateDimensionsWithPadding"),u=(0,a.K)((t,e,s,i,n)=>`${t-n} ${e-n} ${s} ${i}`,"createViewBox")},96755(t,e,s){s.d(e,{A:()=>a});var i=s(86827),n=s(70451),a=(0,i.K)((t,e)=>{let s;"sandbox"===e&&(s=(0,n.Ltv)("#i"+t));return("sandbox"===e?(0,n.Ltv)(s.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement")}}]); \ No newline at end of file diff --git a/assets/js/2857.16577cad.js b/assets/js/2857.16577cad.js new file mode 100644 index 000000000..6786f960b --- /dev/null +++ b/assets/js/2857.16577cad.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[2857],{62857(e,t,n){n.d(t,{captureNodeSizes:()=>s});var o=n(86827);function i(){if("undefined"!=typeof globalThis)return globalThis}function r(){return"undefined"==typeof location?"browser-dev":`${location.pathname}${location.search}`}function a(e,t){const n=i();if(!n)return;const o=t.node(),r=(o&&"ownerSVGElement"in o?o.ownerSVGElement:null)??o,a=r?.id??"(unknown)";n.mermaidCapturedSizes??=[];const s={svgId:a,sizes:e};n.mermaidCapturedSizes.push(s),n.mermaidLastCapturedSizes=s}function s(e,t){const n=[];for(const o of t.nodes)o.isGroup||n.push({id:o.id,width:o.width??0,height:o.height??0});0!==n.length&&a({metadata:{captureVersion:1,capturedAt:(new Date).toISOString(),capturedFrom:r()},nodes:n},e)}(0,o.K)(i,"getCaptureGlobal"),(0,o.K)(function(){return Boolean(i()?.mermaidCaptureSizes)},"shouldCaptureSizes"),(0,o.K)(r,"capturedFromLocation"),(0,o.K)(a,"emitCapturedSizes"),(0,o.K)(s,"captureNodeSizes")}}]); \ No newline at end of file diff --git a/assets/js/28daae68.4fedb984.js b/assets/js/28daae68.4fedb984.js new file mode 100644 index 000000000..952558ee6 --- /dev/null +++ b/assets/js/28daae68.4fedb984.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[6572],{43240(e,n,a){a.r(n),a.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>h,frontMatter:()=>s,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"develop/gateway-proxy","title":"Run a Gateway","description":"Run a Bee node as a public HTTP gateway so anyone can access Swarm-hosted content from an ordinary web browser.","source":"@site/docs/develop/gateway.md","sourceDirName":"develop","slug":"/develop/gateway-proxy","permalink":"/docs/develop/gateway-proxy","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/develop/gateway.md","tags":[],"version":"current","frontMatter":{"title":"Run a Gateway","id":"gateway-proxy","description":"Run a Bee node as a public HTTP gateway so anyone can access Swarm-hosted content from an ordinary web browser."},"sidebar":"develop","previous":{"title":"Website Routing","permalink":"/docs/develop/routing"},"next":{"title":"Dynamic Content","permalink":"/docs/develop/dynamic-content"}}');var t=a(74848),i=a(28453);const s={title:"Run a Gateway",id:"gateway-proxy",description:"Run a Bee node as a public HTTP gateway so anyone can access Swarm-hosted content from an ordinary web browser."},o=void 0,d={},c=[{value:"Part 1 \u2014 Running a Swarm Gateway (HTTP, minimal setup)",id:"part-1--running-a-swarm-gateway-http-minimal-setup",level:2},{value:"Prerequisites",id:"prerequisites",level:3},{value:"1. Configure DNS for your domain",id:"1-configure-dns-for-your-domain",level:3},{value:"2. Create a Docker network",id:"2-create-a-docker-network",level:3},{value:"3. Pull the gateway image",id:"3-pull-the-gateway-image",level:3},{value:"4. Run the gateway",id:"4-run-the-gateway",level:3},{value:"5. Verify operation",id:"5-verify-operation",level:3},{value:"6. Test with existing content",id:"6-test-with-existing-content",level:3},{value:"7. Optional: restrict uploads using authentication",id:"7-optional-restrict-uploads-using-authentication",level:3},{value:"Part 2 \u2014 Securing your gateway with TLS (HTTPS)",id:"part-2--securing-your-gateway-with-tls-https",level:2},{value:"Prerequisites",id:"prerequisites-1",level:3},{value:"1. Reconfigure the gateway to not expose port 80",id:"1-reconfigure-the-gateway-to-not-expose-port-80",level:3},{value:"2. Create a Caddy configuration",id:"2-create-a-caddy-configuration",level:3},{value:"3. Run Caddy",id:"3-run-caddy",level:3},{value:"4. Verify operation",id:"4-verify-operation",level:3}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"A Swarm gateway is an HTTP server that makes Swarm-hosted websites reachable from an ordinary web browser, without visitors needing to run their own Bee node. This guide shows how to run your Bee node as a public HTTP gateway."}),"\n",(0,t.jsxs)(n.p,{children:["This guide explains how to use the ",(0,t.jsx)(n.a,{href:"https://github.com/ethersphere/swarm-gateway",children:"swarm-gateway"})," tool to set up your node in gateway mode. Running your node in gateway mode exposes it publicly, allowing access through any typical browser or http API."]}),"\n",(0,t.jsx)(n.p,{children:"It is divided into several parts:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Part 1 - Basic setup"}),"\n",(0,t.jsx)(n.li,{children:"Part 2 - Securing your gateway with TLS"}),"\n",(0,t.jsx)(n.li,{children:"Part 3 - Optional features"}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"part-1--running-a-swarm-gateway-http-minimal-setup",children:"Part 1 \u2014 Running a Swarm Gateway (HTTP, minimal setup)"}),"\n",(0,t.jsxs)(n.admonition,{type:"info",children:[(0,t.jsxs)(n.p,{children:["Historically, the main tool for running a Swarm HTTP gateway was ",(0,t.jsx)(n.a,{href:"https://github.com/ethersphere/gateway-proxy",children:"gateway-proxy"}),", however it is planned to be deprecated in favor of ",(0,t.jsx)(n.a,{href:"https://github.com/ethersphere/swarm-gateway",children:"swarm-gateway"}),"."]}),(0,t.jsxs)(n.p,{children:["At the time of writing, ",(0,t.jsx)(n.code,{children:"gateway-proxy"})," still contains some features that are not yet implemented in ",(0,t.jsx)(n.code,{children:"swarm-gateway"})," - unless you have a specific need for these features however, ",(0,t.jsx)(n.code,{children:"swarm-gateway"})," is strongly recommended."]})]}),"\n",(0,t.jsxs)(n.p,{children:["This guide describes how to run a Swarm HTTP gateway using ",(0,t.jsx)(n.code,{children:"swarm-gateway"})," and Bee with a minimal configuration."]}),"\n",(0,t.jsx)(n.p,{children:"At the end of this section, the gateway will be reachable at:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"http://your-domain.example\n"})}),"\n",(0,t.jsx)(n.p,{children:"Swarm content will be accessible at:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"http://your-domain.example/bzz//\n"})}),"\n",(0,t.jsxs)(n.admonition,{title:"Security notice",type:"warning",children:[(0,t.jsx)(n.p,{children:"This setup uses plain HTTP."}),(0,t.jsxs)(n.p,{children:["Traffic is not encrypted and any ",(0,t.jsx)(n.code,{children:"Authorization"})," headers can be observed by intermediaries on the network path. This configuration is not suitable for production use."]}),(0,t.jsx)(n.p,{children:"The purpose of this section is to verify that the gateway is working. HTTPS is added in a later part of the guide."})]}),"\n",(0,t.jsx)(n.p,{children:"The guide in this section:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Runs ",(0,t.jsx)(n.code,{children:"swarm-gateway"})," using Docker"]}),"\n",(0,t.jsx)(n.li,{children:"Connects it to an existing Bee node"}),"\n",(0,t.jsx)(n.li,{children:"Exposes it publicly over HTTP"}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{type:"danger",children:(0,t.jsx)(n.p,{children:"This part of the guide does not cover setting up TLS, so your gateway will be accessible through plain HTTP, not HTTPS, making it highly insecure. It should not be exposed publicly without first setting up TLS, which is covered in the next section."})}),"\n",(0,t.jsx)(n.h3,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["A VPS with:","\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"A public IP address"}),"\n",(0,t.jsxs)(n.li,{children:["Port ",(0,t.jsx)(n.strong,{children:"80"})," open"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.li,{children:"Docker"}),"\n",(0,t.jsx)(n.li,{children:"A domain for hosting your gateway publicly"}),"\n",(0,t.jsx)(n.li,{children:"A running Bee node in Docker"}),"\n",(0,t.jsx)(n.li,{children:"A valid stamp batch"}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"1-configure-dns-for-your-domain",children:"1. Configure DNS for your domain"}),"\n",(0,t.jsx)(n.p,{children:"Create an A record in your DNS provider pointing your domain to your server's IP address:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"your-domain.example -> \n"})}),"\n",(0,t.jsx)(n.p,{children:"After DNS propagation, verify that the domain resolves to your server (this may take some time, to verify more quickly, try pinging from a different machine or VPS):"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"ping your-domain.example\n"})}),"\n",(0,t.jsx)(n.h3,{id:"2-create-a-docker-network",children:"2. Create a Docker network"}),"\n",(0,t.jsx)(n.p,{children:"The gateway container must be able to communicate with your Bee node, for this, both containers must be on the same Docker network."}),"\n",(0,t.jsx)(n.p,{children:"Create a network and attach the Bee container to it:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"docker network create swarm-net\ndocker network connect swarm-net bee-1\n"})}),"\n",(0,t.jsx)(n.p,{children:"Verify:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"docker network inspect swarm-net\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The output should list ",(0,t.jsx)(n.code,{children:"bee-1"})," as an attached container."]}),"\n",(0,t.jsx)(n.h3,{id:"3-pull-the-gateway-image",children:"3. Pull the gateway image"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"docker pull ethersphere/swarm-gateway:0.1.6\n"})}),"\n",(0,t.jsx)(n.h3,{id:"4-run-the-gateway",children:"4. Run the gateway"}),"\n",(0,t.jsx)(n.p,{children:"Start the gateway container:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'docker run -d --restart unless-stopped \\\n --name swarm-gateway \\\n --network swarm-net \\\n -p 80:3000 \\\n -e HOSTNAME="your-domain.example" \\\n -e BEE_API_URL="http://bee-1:1633" \\\n -e DATABASE_CONFIG="{}" \\\n ethersphere/swarm-gateway:0.1.6\n'})}),"\n",(0,t.jsx)(n.p,{children:"In this configuration, database-backed features such as subdomain rewrites and moderation are not configured."}),"\n",(0,t.jsx)(n.h3,{id:"5-verify-operation",children:"5. Verify operation"}),"\n",(0,t.jsx)(n.p,{children:"From your local machine (not the server on your VPS):"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl http://your-domain.example/health\n"})}),"\n",(0,t.jsx)(n.p,{children:"Expected output:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"OK\n"})}),"\n",(0,t.jsx)(n.h3,{id:"6-test-with-existing-content",children:"6. Test with existing content"}),"\n",(0,t.jsx)(n.p,{children:"To confirm the gateway is correctly serving content from Swarm, request a reference that is already on the network. The following hash points to a small JSON file:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"http://your-domain.example/bzz/f3f5e25c90824876c2468b9bdf0d842cd05dc5f0974681789b9729bc155c4f65/\n"})}),"\n",(0,t.jsx)(n.p,{children:"Expected output:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "octalmage.com": "bzz://45f0f1e13b70e2919e59fdc5bcf3a99bcbe19dc1be6ebdebe3f89794b77c19ab/",\n "o8.is": "bzz://4cd43b1c0ebc257f79cc45ebd9774e1251e34f08026325c78ef2ca46972935cc/",\n "dist.o8.is": "bzz://0890110b61109aee2b6f0d071cedce584868bb29dcb7e41b1c0388d6cf775ace/"\n}\n'})}),"\n",(0,t.jsxs)(n.p,{children:["If the JSON is returned, your gateway is correctly fetching and serving content from Swarm. To serve your own content, upload a file or website through your Bee node (see the ",(0,t.jsx)(n.a,{href:"/docs/develop/upload-and-download",children:"Upload and Download"})," and ",(0,t.jsx)(n.a,{href:"/docs/develop/host-your-website",children:"Host a Webpage"})," guides) and use the resulting reference in place of the one above."]}),"\n",(0,t.jsx)(n.h3,{id:"7-optional-restrict-uploads-using-authentication",children:"7. Optional: restrict uploads using authentication"}),"\n",(0,t.jsx)(n.p,{children:"By default, the gateway allows anyone to upload content using your Bee node."}),"\n",(0,t.jsx)(n.p,{children:"To restrict uploads, set:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"AUTH_SECRET"})," \u2014 a long random string"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"SOFT_AUTH=true"})," \u2014 only require authentication for POST requests"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Example (add these lines to the ",(0,t.jsx)(n.code,{children:"docker run"})," command):"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'-e AUTH_SECRET="replace-with-a-long-random-secret" \\\n-e SOFT_AUTH="true" \\\n'})}),"\n",(0,t.jsx)(n.p,{children:"A minimal gateway setup consists of:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"A working Swarm HTTP gateway"}),"\n",(0,t.jsx)(n.li,{children:"Connected to your Bee node"}),"\n",(0,t.jsxs)(n.li,{children:["Exposing content publicly over ",(0,t.jsx)(n.code,{children:"/bzz/"})]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"The setup is intentionally minimal and suitable for testing and development, however without TLS, it is not secure and should never be used in production or publicly exposed."}),"\n",(0,t.jsx)(n.p,{children:"The next section explains how to enable TLS so that your gateway can be securely accessed through HTTPS."}),"\n",(0,t.jsx)(n.h2,{id:"part-2--securing-your-gateway-with-tls-https",children:"Part 2 \u2014 Securing your gateway with TLS (HTTPS)"}),"\n",(0,t.jsxs)(n.p,{children:["This section explains how to secure your gateway using ",(0,t.jsx)(n.strong,{children:"TLS (HTTPS)"})," with ",(0,t.jsx)(n.strong,{children:"Caddy"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["Caddy is used here as a front-facing web server that automatically manages TLS certificates and forwards traffic to ",(0,t.jsx)(n.code,{children:"swarm-gateway"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"In this setup:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Caddy is responsible only for HTTPS and certificate management"}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"swarm-gateway"})," continues to act as the application gateway and reverse proxy for Bee"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"At the end of this section, your gateway will be reachable at:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"https://your-domain.example\n"})}),"\n",(0,t.jsx)(n.p,{children:"And all HTTP traffic will be automatically redirected to HTTPS."}),"\n",(0,t.jsx)(n.h3,{id:"prerequisites-1",children:"Prerequisites"}),"\n",(0,t.jsx)(n.p,{children:"In addition to the prerequisites from Part 1:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Your domain must already point to your VPS IP address"}),"\n",(0,t.jsxs)(n.li,{children:["Ports ",(0,t.jsx)(n.strong,{children:"80"})," and ",(0,t.jsx)(n.strong,{children:"443"})," must be open on your VPS firewall"]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"1-reconfigure-the-gateway-to-not-expose-port-80",children:"1. Reconfigure the gateway to not expose port 80"}),"\n",(0,t.jsxs)(n.p,{children:["Caddy will become the public entry point, so ",(0,t.jsx)(n.code,{children:"swarm-gateway"})," should no longer be exposed directly."]}),"\n",(0,t.jsx)(n.p,{children:"Stop and remove the existing container:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"docker stop swarm-gateway\ndocker rm swarm-gateway\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Recreate it ",(0,t.jsx)(n.strong,{children:"without"})," publishing port 80:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'docker run -d --restart unless-stopped \\\n --name swarm-gateway \\\n --network swarm-net \\\n -e HOSTNAME="your-domain.example" \\\n -e BEE_API_URL="http://bee-1:1633" \\\n -e DATABASE_CONFIG="{}" \\\n ethersphere/swarm-gateway:0.1.6\n'})}),"\n",(0,t.jsx)(n.p,{children:"The gateway is now only accessible from within the Docker network."}),"\n",(0,t.jsx)(n.h3,{id:"2-create-a-caddy-configuration",children:"2. Create a Caddy configuration"}),"\n",(0,t.jsx)(n.p,{children:"Create a directory for the Caddy configuration:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"mkdir -p ~/caddy\ncd ~/caddy\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Create a file named ",(0,t.jsx)(n.code,{children:"Caddyfile"}),":"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"nano Caddyfile\n"})}),"\n",(0,t.jsx)(n.p,{children:"Add the following configuration (replace the domain):"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-caddy",children:"your-domain.example {\n reverse_proxy swarm-gateway:3000\n}\n"})}),"\n",(0,t.jsx)(n.h3,{id:"3-run-caddy",children:"3. Run Caddy"}),"\n",(0,t.jsx)(n.p,{children:"Start Caddy in Docker and attach it to the same Docker network:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"docker run -d --restart unless-stopped \\\n --name caddy \\\n --network swarm-net \\\n -p 80:80 \\\n -p 443:443 \\\n -v $HOME/caddy/Caddyfile:/etc/caddy/Caddyfile \\\n -v caddy_data:/data \\\n -v caddy_config:/config \\\n caddy:2\n"})}),"\n",(0,t.jsx)(n.p,{children:"Caddy will automatically:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Obtain a TLS certificate for your domain"}),"\n",(0,t.jsx)(n.li,{children:"Renew it before it expires"}),"\n",(0,t.jsx)(n.li,{children:"Redirect all HTTP traffic to HTTPS"}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"4-verify-operation",children:"4. Verify operation"}),"\n",(0,t.jsx)(n.p,{children:"From your local machine:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl https://your-domain.example/health\n"})}),"\n",(0,t.jsx)(n.p,{children:"Expected output:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"OK\n"})}),"\n",(0,t.jsx)(n.p,{children:"You can also verify that HTTP is redirected to HTTPS:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl -I http://your-domain.example/health\n"})}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Next:"})," ",(0,t.jsx)(n.a,{href:"/docs/develop/dynamic-content",children:"Dynamic Content"})," \u2014 return to app development and learn how feeds add a mutable pointer layer on top of Swarm's immutable storage."]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},28453(e,n,a){a.d(n,{R:()=>s,x:()=>o});var r=a(96540);const t={},i=r.createContext(t);function s(e){const n=r.useContext(i);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:s(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2fb51a8e.b11ba4b7.js b/assets/js/2fb51a8e.b11ba4b7.js new file mode 100644 index 000000000..6b1676ac8 --- /dev/null +++ b/assets/js/2fb51a8e.b11ba4b7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[2563],{75832(e,t,s){s.r(t),s.d(t,{assets:()=>a,contentTitle:()=>c,default:()=>h,frontMatter:()=>r,metadata:()=>n,toc:()=>l});const n=JSON.parse('{"id":"concepts/access-control","title":"Access Control","description":"Introduces Access Control Trie (ACT) for managing encryption and permissions in decentralized storage with content sharing capabilities.","source":"@site/docs/concepts/access-control.md","sourceDirName":"concepts","slug":"/concepts/access-control","permalink":"/docs/concepts/access-control","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/concepts/access-control.md","tags":[],"version":"current","frontMatter":{"title":"Access Control","id":"access-control","description":"Introduces Access Control Trie (ACT) for managing encryption and permissions in decentralized storage with content sharing capabilities."},"sidebar":"concepts","previous":{"title":"PSS","permalink":"/docs/concepts/pss"}}');var i=s(74848),o=s(28453);const r={title:"Access Control",id:"access-control",description:"Introduces Access Control Trie (ACT) for managing encryption and permissions in decentralized storage with content sharing capabilities."},c=void 0,a={},l=[{value:"Key Concepts",id:"key-concepts",level:2},{value:"Session",id:"session",level:3},{value:"ACT lookup table",id:"act-lookup-table",level:3},{value:"History",id:"history",level:3},{value:"Encryption",id:"encryption",level:3}];function d(e){const t={a:"a",admonition:"admonition",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.p,{children:"The Access Control Trie (ACT) implements the operation of encryption at the chunk level, with the presence of a decryption/encryption key being the only distinction between accessing private and public data."}),"\n",(0,i.jsx)(t.admonition,{type:"info",children:(0,i.jsxs)(t.p,{children:["This article describes the high level concepts and functionalities of ACT. If you're ready to try it out for yourself, please refer to this ",(0,i.jsx)(t.a,{href:"/docs/develop/act",children:"hands on usage guide with specific details"}),"."]})}),"\n",(0,i.jsx)(t.p,{children:"In decentralized public data storage systems like Swarm, data is distributed across multiple nodes. Ensuring\nconfidentiality, integrity, and availability becomes paramount. The Access Control Trie (ACT) addresses these challenges\nby managing access control information for Swarm nodes."}),"\n",(0,i.jsx)(t.h2,{id:"key-concepts",children:"Key Concepts"}),"\n",(0,i.jsx)(t.p,{children:"From the perspective of access controlled content, we can identify two main roles:"}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Role"}),(0,i.jsx)(t.th,{children:"Rights & responsibilities"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.strong,{children:"Content Publisher"})}),(0,i.jsx)(t.td,{children:(0,i.jsxs)("ul",{children:[(0,i.jsx)("li",{children:"Publishers upload data and grant access to viewers based on their wallets\u2019 public keys."}),(0,i.jsx)("li",{children:"They can also revoke access from specific viewers."})]})})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.strong,{children:"Grantee (Content Viewer)"})}),(0,i.jsx)(t.td,{children:(0,i.jsxs)("ul",{children:[(0,i.jsx)("li",{children:"Grantees can access the content version allowed by the publisher."}),(0,i.jsx)("li",{children:"However, they may be blocked from accessing new versions of the content."})]})})]})]})]}),"\n",(0,i.jsx)(t.p,{children:"The control is defined by a process to obtain the full (decrypted) reference to the protected content uploaded by the\npublisher, which makes granted access possible."}),"\n",(0,i.jsx)(t.p,{children:"For the management of access by multiple grantees (viewers), an additional layer is introduced to derive the access key\nfrom their specific session key. This data structure, the lookup table for ACT, is implemented as key-value store in a\nSwarm manifest format. The publisher is able to add and remove grantees from this ACT."}),"\n",(0,i.jsx)(t.h3,{id:"session",children:"Session"}),"\n",(0,i.jsx)(t.p,{children:"For each grantee, their public key is used as the session key. Using Diffie-Hellman key derivation, two additional keys\nwill be derived from the session key: a lookup key and an access key decryption key (used for symmetric encryption of\nthe access key). This means each grantee will have the content's access key specifically encrypted for them, and only\nthey will be able to decrypt this, thus gain access to the content."}),"\n",(0,i.jsx)(t.h3,{id:"act-lookup-table",children:"ACT lookup table"}),"\n",(0,i.jsx)(t.p,{children:"The ACT lookup table is a key-value store implemented over a Swarm manifest. It holds lookup keys and encrypted access\nkeys prepared for the grantees when they are added to the ACT (granting access to the content)."}),"\n",(0,i.jsx)(t.h3,{id:"history",children:"History"}),"\n",(0,i.jsx)(t.p,{children:"The history of the ACT is maintained as well. This allows to retrieve a historical version of the ACT based on the\ntimestamp attached to it. This also ensures that grantees will be able to retrieve the content version they were\ngranted access to (using the relevant timestamp), even if their access to newer versions were revoked."}),"\n",(0,i.jsx)(t.h3,{id:"encryption",children:"Encryption"}),"\n",(0,i.jsx)(t.p,{children:"It is important to emphasise that all elements of the process will undergo encryption. Including the grantee list\nitself, which is encrypted using the publisher\u2019s own lookup key, as well as the grantee list\u2019s content reference. This\nensures that the security of the process and the data is always maintained."})]})}function h(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},28453(e,t,s){s.d(t,{R:()=>r,x:()=>c});var n=s(96540);const i={},o=n.createContext(i);function r(e){const t=n.useContext(o);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),n.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3086.c40ad293.js b/assets/js/3086.c40ad293.js new file mode 100644 index 000000000..350ebe0dd --- /dev/null +++ b/assets/js/3086.c40ad293.js @@ -0,0 +1 @@ +(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[3086],{27293(e,t,n){"use strict";n.d(t,{A:()=>S});var s=n(96540),a=n(74848);function c(e){var t;const n=function(e){const t=s.Children.toArray(e),n=t.find(e=>s.isValidElement(e)&&"mdxAdmonitionTitle"===e.type),c=t.filter(e=>e!==n);return{mdxAdmonitionTitle:null==n?void 0:n.props.children,rest:c.length>0?(0,a.jsx)(a.Fragment,{children:c}):null}}(e.children),c=n.mdxAdmonitionTitle,r=n.rest,i=null!=(t=e.title)?t:c;return Object.assign({},e,i&&{title:i},{children:r})}var r=n(34164),i=n(21312),o=n(17559);const l="admonition_xJq3",d="admonitionHeading_Gvgb",u="admonitionIcon_Rf37",m="admonitionContent_BuS1";function h(e){let t=e.type,n=e.className,s=e.children,c=e.id;return(0,a.jsx)("div",{className:(0,r.A)(o.G.common.admonition,o.G.common.admonitionType(t),l,n),id:c,children:s})}function f(e){let t=e.icon,n=e.title;return(0,a.jsxs)("div",{className:d,children:[(0,a.jsx)("span",{className:u,children:t}),n]})}function g(e){let t=e.children;return t?(0,a.jsx)("div",{className:m,children:t}):null}function j(e){const t=e.type,n=e.icon,s=e.title,c=e.children,r=e.className,i=e.id;return(0,a.jsxs)(h,{type:t,className:r,id:i,children:[s||n?(0,a.jsx)(f,{title:s,icon:n}):null,(0,a.jsx)(g,{children:c})]})}function p(e){return(0,a.jsx)("svg",Object.assign({viewBox:"0 0 14 16"},e,{children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})}))}const b={icon:(0,a.jsx)(p,{}),title:(0,a.jsx)(i.A,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function x(e){return(0,a.jsx)(j,Object.assign({},b,e,{className:(0,r.A)("alert alert--secondary",e.className),children:e.children}))}function v(e){return(0,a.jsx)("svg",Object.assign({viewBox:"0 0 12 16"},e,{children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})}))}const N={icon:(0,a.jsx)(v,{}),title:(0,a.jsx)(i.A,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function A(e){return(0,a.jsx)(j,Object.assign({},N,e,{className:(0,r.A)("alert alert--success",e.className),children:e.children}))}function y(e){return(0,a.jsx)("svg",Object.assign({viewBox:"0 0 14 16"},e,{children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})}))}const w={icon:(0,a.jsx)(y,{}),title:(0,a.jsx)(i.A,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function C(e){return(0,a.jsx)(j,Object.assign({},w,e,{className:(0,r.A)("alert alert--info",e.className),children:e.children}))}function k(e){return(0,a.jsx)("svg",Object.assign({viewBox:"0 0 16 16"},e,{children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})}))}const O={icon:(0,a.jsx)(k,{}),title:(0,a.jsx)(i.A,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})};function B(e){return(0,a.jsx)("svg",Object.assign({viewBox:"0 0 12 16"},e,{children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})}))}const _={icon:(0,a.jsx)(B,{}),title:(0,a.jsx)(i.A,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})};const L={icon:(0,a.jsx)(k,{}),title:(0,a.jsx)(i.A,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})};const T={note:x,tip:A,info:C,warning:function(e){return(0,a.jsx)(j,Object.assign({},O,e,{className:(0,r.A)("alert alert--warning",e.className),children:e.children}))},danger:function(e){return(0,a.jsx)(j,Object.assign({},_,e,{className:(0,r.A)("alert alert--danger",e.className),children:e.children}))}},E={secondary:e=>(0,a.jsx)(x,Object.assign({title:"secondary"},e)),important:e=>(0,a.jsx)(C,Object.assign({title:"important"},e)),success:e=>(0,a.jsx)(A,Object.assign({title:"success"},e)),caution:function(e){return(0,a.jsx)(j,Object.assign({},L,e,{className:(0,r.A)("alert alert--warning",e.className),children:e.children}))}},M=Object.assign({},T,E);function S(e){const t=c(e),n=(s=t.type,M[s]||(console.warn('No admonition component found for admonition type "'+s+'". Using Info as fallback.'),M.info));var s;return(0,a.jsx)(n,Object.assign({},t))}},4336(e,t,n){"use strict";n.d(t,{A:()=>x});n(96540);var s=n(34164),a=n(21312),c=n(17559),r=n(28774),i=n(98587);const o="iconEdit_Z9Sw";var l=n(74848);const d=["className"];function u(e){let t=e.className,n=(0,i.A)(e,d);return(0,l.jsx)("svg",Object.assign({fill:"currentColor",height:"20",width:"20",viewBox:"0 0 40 40",className:(0,s.A)(o,t),"aria-hidden":"true"},n,{children:(0,l.jsx)("g",{children:(0,l.jsx)("path",{d:"m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"})})}))}function m(e){let t=e.editUrl;return(0,l.jsxs)(r.A,{to:t,className:c.G.common.editThisPage,children:[(0,l.jsx)(u,{}),(0,l.jsx)(a.A,{id:"theme.common.editThisPage",description:"The link label to edit the current page",children:"Edit this page"})]})}var h=n(36266);function f(e){let t=e.lastUpdatedAt;const n=new Date(t),s=(0,h.i)({day:"numeric",month:"short",year:"numeric",timeZone:"UTC"}).format(n);return(0,l.jsx)(a.A,{id:"theme.lastUpdated.atDate",description:"The words used to describe on which date a page has been last updated",values:{date:(0,l.jsx)("b",{children:(0,l.jsx)("time",{dateTime:n.toISOString(),itemProp:"dateModified",children:s})})},children:" on {date}"})}function g(e){let t=e.lastUpdatedBy;return(0,l.jsx)(a.A,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:(0,l.jsx)("b",{children:t})},children:" by {user}"})}function j(e){let t=e.lastUpdatedAt,n=e.lastUpdatedBy;return(0,l.jsxs)("span",{className:c.G.common.lastUpdated,children:[(0,l.jsx)(a.A,{id:"theme.lastUpdated.lastUpdatedAtBy",description:"The sentence used to display when a page has been last updated, and by who",values:{atDate:t?(0,l.jsx)(f,{lastUpdatedAt:t}):"",byUser:n?(0,l.jsx)(g,{lastUpdatedBy:n}):""},children:"Last updated{atDate}{byUser}"}),!1]})}const p="lastUpdated_JAkA",b="noPrint_WFHX";function x(e){let t=e.className,n=e.editUrl,a=e.lastUpdatedAt,c=e.lastUpdatedBy;return(0,l.jsxs)("div",{className:(0,s.A)("row",t),children:[(0,l.jsx)("div",{className:(0,s.A)("col",b),children:n&&(0,l.jsx)(m,{editUrl:n})}),(0,l.jsx)("div",{className:(0,s.A)("col",p),children:(a||c)&&(0,l.jsx)(j,{lastUpdatedAt:a,lastUpdatedBy:c})})]})}},1393(e,t,n){"use strict";n.d(t,{A:()=>Ye});var s=n(96540),a=n(28453),c=n(5260),r=n(98587),i=n(92303),o=n(34164),l=n(95293),d=n(6342);function u(){const e=(0,d.p)().prism,t=(0,l.G)().colorMode,n=e.theme,s=e.darkTheme||n;return"dark"===t?s:n}var m=n(17559),h=n(8634),f=n(18426),g=n.n(f),j=n(89532),p=n(74848);const b=(0,h.A)(/title=(["'])(.*?)\1/,{quote:1,title:2}),x=(0,h.A)(/\{([\d,-]+)\}/,{range:1}),v={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},N=Object.assign({},v,{lua:{start:"--",end:""},wasm:{start:"\\;\\;",end:""},tex:{start:"%",end:""},vb:{start:"['\u2018\u2019]",end:""},vbnet:{start:"(?:_\\s*)?['\u2018\u2019]",end:""},rem:{start:"[Rr][Ee][Mm]\\b",end:""},f90:{start:"!",end:""},ml:{start:"\\(\\*",end:"\\*\\)"},cobol:{start:"\\*>",end:""}}),A=Object.keys(v);function y(e,t){const n=e.map(e=>{const n=N[e],s=n.start,a=n.end;return"(?:"+s+"\\s*("+t.flatMap(e=>{var t,n;return[e.line,null==(t=e.block)?void 0:t.start,null==(n=e.block)?void 0:n.end].filter(Boolean)}).join("|")+")\\s*"+a+")"}).join("|");return new RegExp("^\\s*(?:"+n+")\\s*$")}function w(e){let t=e.showLineNumbers,n=e.metastring;return"boolean"==typeof t?t?1:void 0:"number"==typeof t?t:function(e){const t=null==e?void 0:e.split(" ").find(e=>e.startsWith("showLineNumbers"));if(t){if(t.startsWith("showLineNumbers=")){const e=t.replace("showLineNumbers=","");return parseInt(e,10)}return 1}}(n)}function C(e,t){const n=t.language,s=t.magicComments;if(void 0===n)return{lineClassNames:{},code:e};const a=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return y(["js","jsBlock"],t);case"jsx":case"tsx":return y(["js","jsBlock","jsx"],t);case"html":return y(["js","jsBlock","html"],t);case"python":case"py":case"bash":return y(["bash"],t);case"markdown":case"md":return y(["html","jsx","bash"],t);case"tex":case"latex":case"matlab":return y(["tex"],t);case"lua":case"haskell":return y(["lua"],t);case"sql":return y(["lua","jsBlock"],t);case"wasm":return y(["wasm"],t);case"vb":case"vba":case"visual-basic":return y(["vb","rem"],t);case"vbnet":return y(["vbnet","rem"],t);case"batch":return y(["rem"],t);case"basic":return y(["rem","f90"],t);case"fsharp":return y(["js","ml"],t);case"ocaml":case"sml":return y(["ml"],t);case"fortran":return y(["f90"],t);case"cobol":return y(["cobol"],t);default:return y(A,t)}}(n,s),c=e.split(/\r?\n/),r=Object.fromEntries(s.map(e=>[e.className,{start:0,range:""}])),i=Object.fromEntries(s.filter(e=>e.line).map(e=>{let t=e.className;return[e.line,t]})),o=Object.fromEntries(s.filter(e=>e.block).map(e=>{let t=e.className;return[e.block.start,t]})),l=Object.fromEntries(s.filter(e=>e.block).map(e=>{let t=e.className;return[e.block.end,t]}));for(let u=0;uvoid 0!==e);i[t]?r[i[t]].range+=u+",":o[t]?r[o[t]].start=u:l[t]&&(r[l[t]].range+=r[l[t]].start+"-"+(u-1)+","),c.splice(u,1)}const d={};return Object.entries(r).forEach(e=>{let t=e[0],n=e[1].range;g()(n).forEach(e=>{null!=d[e]||(d[e]=[]),d[e].push(t)})}),{code:c.join("\n"),lineClassNames:d}}function k(e,t){var n;const s=e.replace(/\r?\n$/,"");return null!=(n=function(e,t){let n=t.metastring,s=t.magicComments;if(n&&x.test(n)){const t=n.match(x).groups.range;if(0===s.length)throw new Error("A highlight range has been given in code block's metastring (``` "+n+"), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.");const a=s[0].className,c=g()(t).filter(e=>e>0).map(e=>[e-1,[a]]);return{lineClassNames:Object.fromEntries(c),code:e}}return null}(s,Object.assign({},t)))?n:C(s,Object.assign({},t))}function O(e){const t=function(e){var t,n,s,a;return null!=(t=null==(a=null!=(n=null!=(s=e.language)?s:function(e){if(!e)return;const t=e.split(" ").find(e=>e.startsWith("language-"));return null==t?void 0:t.replace(/language-/,"")}(e.className))?n:e.defaultLanguage)?void 0:a.toLowerCase())?t:"text"}({language:e.language,defaultLanguage:e.defaultLanguage,className:e.className}),n=k(e.code,{metastring:e.metastring,magicComments:e.magicComments,language:t}),s=n.lineClassNames,a=n.code,c=function(e){let t=e.className,n=e.language;return(0,o.A)(t,n&&!(null!=t&&t.includes("language-"+n))&&"language-"+n)}({className:e.className,language:t}),r=(i=e.metastring,(null!=(l=null==i||null==(d=i.match(b))?void 0:d.groups.title)?l:"")||e.title);var i,l,d;const u=w({showLineNumbers:e.showLineNumbers,metastring:e.metastring});return{codeInput:e.code,code:a,className:c,language:t,title:r,lineNumbersStart:u,lineClassNames:s}}const B=(0,s.createContext)(null);function _(e){let t=e.metadata,n=e.wordWrap,a=e.children;const c=(0,s.useMemo)(()=>({metadata:t,wordWrap:n}),[t,n]);return(0,p.jsx)(B.Provider,{value:c,children:a})}function L(){const e=(0,s.useContext)(B);if(null===e)throw new j.dV("CodeBlockContextProvider");return e}const T="codeBlockContainer_Ckt0",E=["as"];function M(e){let t=e.as,n=(0,r.A)(e,E);const s=function(e){const t={color:"--prism-color",backgroundColor:"--prism-background-color"},n={};return Object.entries(e.plain).forEach(e=>{let s=e[0],a=e[1];const c=t[s];c&&"string"==typeof a&&(n[c]=a)}),n}(u());return(0,p.jsx)(t,Object.assign({},n,{style:s,className:(0,o.A)(n.className,T,m.G.common.codeBlock)}))}const S="codeBlock_bY9V",z="codeBlockStandalone_MEMb",U="codeBlockLines_e6Vv",I="codeBlockLinesWithNumbering_o6Pm";function H(e){let t=e.children,n=e.className;return(0,p.jsx)(M,{as:"pre",tabIndex:0,className:(0,o.A)(z,"thin-scrollbar",n),children:(0,p.jsx)("code",{className:U,children:t})})}const R={attributes:!0,characterData:!0,childList:!0,subtree:!0};function V(e,t){const n=(0,s.useState)(),a=n[0],c=n[1],r=(0,s.useCallback)(()=>{var t;c(null==(t=e.current)?void 0:t.closest("[role=tabpanel][hidden]"))},[e,c]);(0,s.useEffect)(()=>{r()},[r]),function(e,t,n){void 0===n&&(n=R);const a=(0,j._q)(t),c=(0,j.Be)(n);(0,s.useEffect)(()=>{const t=new MutationObserver(a);return e&&t.observe(e,c),()=>t.disconnect()},[e,a,c])}(a,e=>{e.forEach(e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(t(),r())})},{attributes:!0,characterData:!1,childList:!1,subtree:!1})}function P(e){return e.children}var W=n(71765);const D=["line","token"];function q(e){e.line,e.token;let t=(0,r.A)(e,D);return(0,p.jsx)("span",Object.assign({},t))}const F="codeLine_lJS_",G="codeLineNumber_Tfdd",J="codeLineContent_feaV";function Z(){return(0,p.jsx)("br",{})}function $(e){let t=e.line,n=e.classNames,s=e.showLineNumbers,a=e.getLineProps,c=e.getTokenProps;const r=function(e){const t=1===e.length&&"\n"===e[0].content?e[0]:void 0;return t?[Object.assign({},t,{content:""})]:e}(t),i=a({line:r,className:(0,o.A)(n,s&&F)}),l=r.map((e,t)=>{const n=c({token:e});return(0,p.jsx)(q,Object.assign({},n,{line:r,token:e,children:n.children}),t)});return(0,p.jsxs)("div",Object.assign({},i,{children:[s?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("span",{className:G}),(0,p.jsx)("span",{className:J,children:l})]}):l,(0,p.jsx)(Z,{})]}))}const X=s.forwardRef((e,t)=>(0,p.jsx)("pre",Object.assign({ref:t,tabIndex:0},e,{className:(0,o.A)(e.className,S,"thin-scrollbar")})));function Q(e){const t=L().metadata;return(0,p.jsx)("code",Object.assign({},e,{className:(0,o.A)(e.className,U,void 0!==t.lineNumbersStart&&I),style:Object.assign({},e.style,{counterReset:void 0===t.lineNumbersStart?void 0:"line-count "+(t.lineNumbersStart-1)})}))}function Y(e){let t=e.className;const n=L(),s=n.metadata,a=n.wordWrap,c=u(),r=s.code,i=s.language,l=s.lineNumbersStart,d=s.lineClassNames;return(0,p.jsx)(W.f4,{theme:c,code:r,language:i,children:e=>{let n=e.className,s=e.style,c=e.tokens,r=e.getLineProps,i=e.getTokenProps;return(0,p.jsx)(X,{ref:a.codeBlockRef,className:(0,o.A)(t,n),style:s,children:(0,p.jsx)(Q,{children:c.map((e,t)=>(0,p.jsx)($,{line:e,getLineProps:r,getTokenProps:i,classNames:d[t],showLineNumbers:void 0!==l},t))})})}})}var K=n(78478),ee=n(21312);const te=["className"];function ne(e){let t=e.className,n=(0,r.A)(e,te);return(0,p.jsx)("button",Object.assign({type:"button"},n,{className:(0,o.A)("clean-btn",t)}))}function se(e){return(0,p.jsx)("svg",Object.assign({viewBox:"0 0 24 24"},e,{children:(0,p.jsx)("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"})}))}function ae(e){return(0,p.jsx)("svg",Object.assign({viewBox:"0 0 24 24"},e,{children:(0,p.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})}))}const ce={copyButtonCopied:"copyButtonCopied_Vdqa",copyButtonIcons:"copyButtonIcons_IEyt",copyButtonIcon:"copyButtonIcon_TrPX",copyButtonSuccessIcon:"copyButtonSuccessIcon_cVMy"};function re(e){return e?(0,ee.T)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,ee.T)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"})}function ie(){const e=L().metadata.code,t=(0,s.useState)(!1),a=t[0],c=t[1],r=(0,s.useRef)(void 0),i=(0,s.useCallback)(()=>{(async function(e){return navigator.clipboard?navigator.clipboard.writeText(e):(0,(await n.e(3436).then(n.bind(n,33436))).default)(e)})(e).then(()=>{c(!0),r.current=window.setTimeout(()=>{c(!1)},1e3)})},[e]);return(0,s.useEffect)(()=>()=>window.clearTimeout(r.current),[]),{copyCode:i,isCopied:a}}function oe(e){let t=e.className;const n=ie(),s=n.copyCode,a=n.isCopied;return(0,p.jsx)(ne,{"aria-label":re(a),title:(0,ee.T)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,o.A)(t,ce.copyButton,a&&ce.copyButtonCopied),onClick:s,children:(0,p.jsxs)("span",{className:ce.copyButtonIcons,"aria-hidden":"true",children:[(0,p.jsx)(se,{className:ce.copyButtonIcon}),(0,p.jsx)(ae,{className:ce.copyButtonSuccessIcon})]})})}function le(e){return(0,p.jsx)("svg",Object.assign({viewBox:"0 0 24 24"},e,{children:(0,p.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})}))}const de="wordWrapButtonIcon_b1P5",ue="wordWrapButtonEnabled_uzNF";function me(e){let t=e.className;const n=L().wordWrap;if(!(n.isEnabled||n.isCodeScrollable))return!1;const s=(0,ee.T)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,p.jsx)(ne,{onClick:()=>n.toggle(),className:(0,o.A)(t,n.isEnabled&&ue),"aria-label":s,title:s,children:(0,p.jsx)(le,{className:de,"aria-hidden":"true"})})}const he="buttonGroup_M5ko";function fe(e){let t=e.className;return(0,p.jsx)(K.A,{children:()=>(0,p.jsxs)("div",{className:(0,o.A)(t,he),children:[(0,p.jsx)(me,{}),(0,p.jsx)(oe,{})]})})}const ge="codeBlockContent_QJqH",je="codeBlockTitle_OeMC";function pe(e){let t=e.className;const n=L().metadata;return(0,p.jsxs)(M,{as:"div",className:(0,o.A)(t,n.className),children:[n.title&&(0,p.jsx)("div",{className:je,children:(0,p.jsx)(P,{children:n.title})}),(0,p.jsxs)("div",{className:ge,children:[(0,p.jsx)(Y,{}),(0,p.jsx)(fe,{})]})]})}function be(e){const t=function(e){const t=(0,d.p)().prism;return O({code:e.children,className:e.className,metastring:e.metastring,magicComments:t.magicComments,defaultLanguage:t.defaultLanguage,language:e.language,title:e.title,showLineNumbers:e.showLineNumbers})}(e),n=function(){const e=(0,s.useState)(!1),t=e[0],n=e[1],a=(0,s.useState)(!1),c=a[0],r=a[1],i=(0,s.useRef)(null),o=(0,s.useCallback)(()=>{const e=i.current.querySelector("code");t?e.removeAttribute("style"):(e.style.whiteSpace="pre-wrap",e.style.overflowWrap="anywhere"),n(e=>!e)},[i,t]),l=(0,s.useCallback)(()=>{const e=i.current,t=e.scrollWidth>e.clientWidth||i.current.querySelector("code").hasAttribute("style");r(t)},[i]);return V(i,l),(0,s.useEffect)(()=>{l()},[t,l]),(0,s.useEffect)(()=>(window.addEventListener("resize",l,{passive:!0}),()=>{window.removeEventListener("resize",l)}),[l]),{codeBlockRef:i,isEnabled:t,isCodeScrollable:c,toggle:o}}();return(0,p.jsx)(_,{metadata:t,wordWrap:n,children:(0,p.jsx)(pe,{})})}const xe=["children"];function ve(e){let t=e.children,n=(0,r.A)(e,xe);const a=(0,i.A)(),c=function(e){return s.Children.toArray(e).some(e=>(0,s.isValidElement)(e))?e:Array.isArray(e)?e.join(""):e}(t),o="string"==typeof c?be:H;return(0,p.jsx)(o,Object.assign({},n,{children:c}),String(a))}function Ne(e){return(0,p.jsx)("code",Object.assign({},e))}var Ae=n(28774),ye=n(73535);var we=n(63427),Ce=n(41422);const ke="details_lb9f",Oe="isBrowser_bmU9",Be="collapsibleContent_i85q",_e=["summary","children"];function Le(e){return!!e&&("SUMMARY"===e.tagName||Le(e.parentElement))}function Te(e,t){return!!e&&(e===t||Te(e.parentElement,t))}function Ee(e){let t=e.summary,n=e.children,a=(0,r.A)(e,_e);(0,we.A)().collectAnchor(a.id);const c=(0,i.A)(),l=(0,s.useRef)(null),d=(0,Ce.u)({initialState:!a.open}),u=d.collapsed,m=d.setCollapsed,h=(0,s.useState)(a.open),f=h[0],g=h[1],j=s.isValidElement(t)?t:(0,p.jsx)("summary",{children:null!=t?t:"Details"});return(0,p.jsxs)("details",Object.assign({},a,{ref:l,open:f,"data-collapsed":u,className:(0,o.A)(ke,c&&Oe,a.className),onMouseDown:e=>{Le(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();const t=e.target;Le(t)&&Te(t,l.current)&&(e.preventDefault(),u?(m(!1),g(!0)):m(!0))},children:[j,(0,p.jsx)(Ce.N,{lazy:!1,collapsed:u,onCollapseTransitionEnd:e=>{m(e),g(!e)},children:(0,p.jsx)("div",{className:Be,children:n})})]}))}const Me="details_b_Ee";function Se(e){let t=Object.assign({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return(0,p.jsx)(Ee,Object.assign({},t,{className:(0,o.A)("alert alert--info",Me,t.className)}))}function ze(e){const t=s.Children.toArray(e.children),n=t.find(e=>s.isValidElement(e)&&"summary"===e.type),a=(0,p.jsx)(p.Fragment,{children:t.filter(e=>e!==n)});return(0,p.jsx)(Se,Object.assign({},e,{summary:n,children:a}))}var Ue=n(51107);function Ie(e){return(0,p.jsx)(Ue.A,Object.assign({},e))}const He="containsTaskList_mC6p";function Re(e){if(void 0!==e)return(0,o.A)(e,(null==e?void 0:e.includes("contains-task-list"))&&He)}const Ve="img_ev3q";var Pe=n(27293),We=n(67489),De=n(12181);let qe=null;async function Fe(){return qe||(qe=async function(){return(await Promise.all([n.e(8664),n.e(4108)]).then(n.bind(n,44108))).default}()),qe}function Ge(){const e=(0,l.G)().colorMode,t=(0,d.p)().mermaid,n=t.theme[e],a=t.options;return(0,s.useMemo)(()=>Object.assign({startOnLoad:!1},a,{theme:n}),[n,a])}function Je(e){let t=e.text,n=e.config;const a=(0,s.useState)(null),c=a[0],r=a[1],i=(0,s.useState)("mermaid-svg-"+Math.round(1e7*Math.random()))[0],o=Ge(),l=null!=n?n:o;return(0,s.useEffect)(()=>{(async function(e){let t=e.id,n=e.text,s=e.config;const a=await Fe();a.initialize(s);try{return await a.render(t,n)}catch(r){var c;throw null==(c=document.querySelector("#d"+t))||c.remove(),r}})({id:i,text:t,config:l}).then(r).catch(e=>{r(()=>{throw e})})},[i,t,l]),c}const Ze="container_lyt7";function $e(e){let t=e.renderResult;const n=(0,s.useRef)(null);return(0,s.useEffect)(()=>{const e=n.current;null==t.bindFunctions||t.bindFunctions(e)},[t]),(0,p.jsx)("div",{ref:n,className:"docusaurus-mermaid-container "+Ze,dangerouslySetInnerHTML:{__html:t.svg}})}function Xe(e){const t=Je({text:e.value});return null===t?null:(0,p.jsx)($e,{renderResult:t})}const Qe={Head:c.A,details:ze,Details:ze,code:function(e){return function(e){return void 0!==e.children&&s.Children.toArray(e.children).every(e=>"string"==typeof e&&!e.includes("\n"))}(e)?(0,p.jsx)(Ne,Object.assign({},e)):(0,p.jsx)(ve,Object.assign({},e))},a:function(e){const t=(0,ye.v)(e.id);return(0,p.jsx)(Ae.A,Object.assign({},e,{className:(0,o.A)(t,e.className)}))},pre:function(e){return(0,p.jsx)(p.Fragment,{children:e.children})},ul:function(e){return(0,p.jsx)("ul",Object.assign({},e,{className:Re(e.className)}))},li:function(e){(0,we.A)().collectAnchor(e.id);const t=(0,ye.v)(e.id);return(0,p.jsx)("li",Object.assign({className:(0,o.A)(t,e.className)},e))},img:function(e){return(0,p.jsx)("img",Object.assign({decoding:"async",loading:"lazy"},e,{className:(t=e.className,(0,o.A)(t,Ve))}));var t},h1:e=>(0,p.jsx)(Ie,Object.assign({as:"h1"},e)),h2:e=>(0,p.jsx)(Ie,Object.assign({as:"h2"},e)),h3:e=>(0,p.jsx)(Ie,Object.assign({as:"h3"},e)),h4:e=>(0,p.jsx)(Ie,Object.assign({as:"h4"},e)),h5:e=>(0,p.jsx)(Ie,Object.assign({as:"h5"},e)),h6:e=>(0,p.jsx)(Ie,Object.assign({as:"h6"},e)),admonition:Pe.A,mermaid:function(e){return(0,p.jsx)(We.A,{fallback:e=>(0,p.jsx)(De.MN,Object.assign({},e)),children:(0,p.jsx)(Xe,Object.assign({},e))})}};function Ye(e){let t=e.children;return(0,p.jsx)(a.x,{components:Qe,children:t})}},39022(e,t,n){"use strict";n.d(t,{A:()=>r});n(96540);var s=n(34164),a=n(28774),c=n(74848);function r(e){const t=e.permalink,n=e.title,r=e.subLabel,i=e.isNext;return(0,c.jsxs)(a.A,{className:(0,s.A)("pagination-nav__link",i?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t,children:[r&&(0,c.jsx)("div",{className:"pagination-nav__sublabel",children:r}),(0,c.jsx)("div",{className:"pagination-nav__label",children:n})]})}},58046(e,t,n){"use strict";n.d(t,{A:()=>h});n(96540);var s=n(34164),a=n(21312),c=n(28774);const r="tag_zVej",i="tagRegular_sFm0",o="tagWithCount_h2kH";var l=n(74848);function d(e){let t=e.permalink,n=e.label,a=e.count,d=e.description;return(0,l.jsxs)(c.A,{rel:"tag",href:t,title:d,className:(0,s.A)(r,a?o:i),children:[n,a&&(0,l.jsx)("span",{children:a})]})}const u="tags_jXut",m="tag_QGVx";function h(e){let t=e.tags;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("b",{children:(0,l.jsx)(a.A,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list",children:"Tags:"})}),(0,l.jsx)("ul",{className:(0,s.A)(u,"padding--none","margin-left--sm"),children:t.map(e=>(0,l.jsx)("li",{className:m,children:(0,l.jsx)(d,Object.assign({},e))},e.permalink))})]})}},36266(e,t,n){"use strict";n.d(t,{i:()=>a});var s=n(44586);function a(e){void 0===e&&(e={});const t=(0,s.A)().i18n.currentLocale,n=function(){const e=(0,s.A)().i18n,t=e.currentLocale;return e.localeConfigs[t].calendar}();return new Intl.DateTimeFormat(t,Object.assign({calendar:n},e))}},18426(e,t){function n(e){let t,n=[];for(let s of e.split(",").map(e=>e.trim()))if(/^-?\d+$/.test(s))n.push(parseInt(s,10));else if(t=s.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,s,a,c]=t;if(s&&c){s=parseInt(s),c=parseInt(c);const e=sr,x:()=>i});var s=n(96540);const a={},c=s.createContext(a);function r(e){const t=s.useContext(c);return s.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),s.createElement(c.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/32282be6.05701f13.js b/assets/js/32282be6.05701f13.js new file mode 100644 index 000000000..1c48919fe --- /dev/null +++ b/assets/js/32282be6.05701f13.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[7231],{77728(e,n,t){t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>d,default:()=>h,frontMatter:()=>r,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"develop/files","title":"Manage Files","description":"Upload, download, and manage files, directories, and collections on Swarm using the Bee API and bee-js.","source":"@site/docs/develop/files.md","sourceDirName":"develop","slug":"/develop/files","permalink":"/docs/develop/files","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/develop/files.md","tags":[],"version":"current","frontMatter":{"title":"Manage Files","id":"files","sidebar_label":"Manage Files","description":"Upload, download, and manage files, directories, and collections on Swarm using the Bee API and bee-js."},"sidebar":"develop","previous":{"title":"Host a Webpage","permalink":"/docs/develop/host-your-website"},"next":{"title":"Website Routing","permalink":"/docs/develop/routing"}}');var i=t(74848),a=t(28453);const r={title:"Manage Files",id:"files",sidebar_label:"Manage Files",description:"Upload, download, and manage files, directories, and collections on Swarm using the Bee API and bee-js."},d=void 0,c={},l=[{value:"Usage and Example Scripts",id:"usage-and-example-scripts",level:2},{value:"Prerequisites",id:"prerequisites",level:3},{value:"Script 1: Upload Folder and Inspect Manifest",id:"script-1-upload-folder-and-inspect-manifest",level:2},{value:"Code Explanation",id:"code-explanation",level:3},{value:"Script 2: Adding a File to an Existing Manifest",id:"script-2-adding-a-file-to-an-existing-manifest",level:2},{value:"Explanation",id:"explanation",level:3},{value:"Script 3: Moving a File by Updating the Manifest",id:"script-3-moving-a-file-by-updating-the-manifest",level:2},{value:"Explanation",id:"explanation-1",level:3},{value:"Key Takeaways",id:"key-takeaways",level:2}];function o(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",hr:"hr",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:["In the ",(0,i.jsx)(n.a,{href:"/docs/develop/host-your-website",children:"Host a Webpage"})," guide you uploaded a directory and got back a single Swarm reference that serves your site. That reference points to a ",(0,i.jsx)(n.strong,{children:"manifest"})," \u2014 a data structure that maps relative paths to content. This guide explores manifests directly: how to inspect them, add a file without re-uploading everything, and move a file by remapping a path."]}),"\n",(0,i.jsxs)(n.p,{children:["Swarm does not have a traditional filesystem \u2014 there are no mutable directories, in-place updates, or a built-in directory structure that preserves relationships between files. Instead, these capabilities are provided through the use of ",(0,i.jsx)(n.a,{href:"/docs/develop/tools-and-features/manifests",children:"manifests"}),", which map relative paths (such as ",(0,i.jsx)(n.code,{children:"/images/cat.jpg"}),") to immutable Swarm content references. When you upload a directory, Bee creates a manifest automatically and returns its reference. Files can then be accessed using paths that are relative to that manifest reference, based on the original directory structure. This provides filesystem-like behavior for your data, and the directory structure can later be changed by publishing a new version of the manifest with the desired updates."]}),"\n",(0,i.jsx)(n.h2,{id:"usage-and-example-scripts",children:"Usage and Example Scripts"}),"\n",(0,i.jsx)(n.p,{children:"This section demonstrates how manifests enable filesystem-like features on Swarm, including uploading directories and modifying file paths."}),"\n",(0,i.jsxs)(n.p,{children:["The full working scripts are available in the ",(0,i.jsx)(n.a,{href:"https://github.com/ethersphere/examples",children:"examples"})," repo:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/ethersphere/examples/blob/main/filesystem/script-01.js",children:(0,i.jsx)(n.code,{children:"script-01.js"})})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/ethersphere/examples/blob/main/filesystem/script-02.js",children:(0,i.jsx)(n.code,{children:"script-02.js"})})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/ethersphere/examples/blob/main/filesystem/script-03.js",children:(0,i.jsx)(n.code,{children:"script-03.js"})})}),"\n"]}),"\n",(0,i.jsx)(n.admonition,{title:"Website routing",type:"info",children:(0,i.jsxs)(n.p,{children:["Manifests are also used for website routing (index documents, clean URLs, error pages, redirects). If you are building a website, see the ",(0,i.jsx)(n.a,{href:"/docs/develop/routing",children:"Routing guide"}),"."]})}),"\n",(0,i.jsx)(n.h3,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Node.js (v20+ recommended)"}),"\n",(0,i.jsx)(n.li,{children:"npm"}),"\n",(0,i.jsx)(n.li,{children:"A running Bee node (local or remote)"}),"\n",(0,i.jsx)(n.li,{children:"A funded postage batch"}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["Clone the ",(0,i.jsx)(n.a,{href:"https://github.com/ethersphere/examples",children:"examples"})," repo and navigate to the manifests directory:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"git clone https://github.com/ethersphere/examples.git\ncd examples/filesystem\nnpm install\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Copy ",(0,i.jsx)(n.code,{children:".env.example"})," to ",(0,i.jsx)(n.code,{children:".env"})," and fill in your values:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"cp .env.example .env\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"BEE_URL=http://localhost:1633 # or http://127.0.0.1:1633 \nBATCH_ID=\nUPLOAD_DIR=./folder\nSCRIPT_02_MANIFEST=\nSCRIPT_03_MANIFEST=\n"})}),"\n",(0,i.jsx)(n.h2,{id:"script-1-upload-folder-and-inspect-manifest",children:"Script 1: Upload Folder and Inspect Manifest"}),"\n",(0,i.jsx)(n.p,{children:"In this example, we simply upload a folder and print its manifest in a human readable format."}),"\n",(0,i.jsx)(n.p,{children:"Full script:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/ethersphere/examples/blob/main/filesystem/script-01.js",children:(0,i.jsx)(n.code,{children:"script-01.js"})})}),"\n"]}),"\n",(0,i.jsxs)(n.admonition,{type:"info",children:[(0,i.jsx)(n.p,{children:"Uploading is handled by a utility script:"}),(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/ethersphere/examples/blob/main/utils/upload-directory.js",children:(0,i.jsx)(n.code,{children:"upload-directory.js"})})}),"\n"]}),(0,i.jsx)(n.p,{children:"The script:"}),(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Uploads a directory using ",(0,i.jsx)(n.code,{children:"bee.uploadFilesFromDirectory"})]}),"\n",(0,i.jsx)(n.li,{children:"Returns the manifest reference and prints it to the terminal"}),"\n"]}),(0,i.jsx)(n.p,{children:"The directory upload utility script itself looks like this:"}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",children:"const { reference } = await bee.uploadFilesFromDirectory(batchId, path, options);\n"})}),(0,i.jsxs)(n.p,{children:["The returned ",(0,i.jsx)(n.code,{children:"reference"})," is for the ",(0,i.jsx)(n.strong,{children:"manifest itself"}),", not a file reference. Files must always be accessed ",(0,i.jsx)(n.em,{children:"through"})," this manifest, not directly through file references shown in the manifest."]})]}),"\n",(0,i.jsx)(n.p,{children:"Run the script:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"node script-01.js\n"})}),"\n",(0,i.jsx)(n.p,{children:"Script terminal output:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'[dotenv@17.2.3] injecting env (3) from .env -- tip: \u2699\ufe0f override existing env vars with { override: true }\n\nUploaded directory: C:\\Users\\username\\Documents\\examples\\filesystem\\folder\n\nReference: http://127.0.0.1:1633/bzz/bf5fa30cf426fe9b646db8cb1dfcb8fd146096e6a86c1de2b266689346e703c8\n\nManifest reference: bf5fa30cf426fe9b646db8cb1dfcb8fd146096e6a86c1de2b266689346e703c8\nroot.txt: ROOT DIRECTORY\nsubfolder/nested.txt: NESTED DIRECTORY\n\n--- Manifest Tree ---\n{\n "path": "",\n "target": "0x0000000000000000000000000000000000000000000000000000000000000000",\n "metadata": null,\n "forks": {\n "/": {\n "path": "/",\n "target": "0x0000000000000000000000000000000000000000000000000000000000000000",\n "metadata": {\n "website-index-document": "disc.jpg"\n },\n "forks": {}\n },\n "disc.jpg": {\n "path": "disc.jpg",\n "target": "0xc4df63219e294cf412b4ad77169c8c6a30077af1b4160c3db6d536fdb7cc91df",\n "metadata": {\n "Content-Type": "image/jpeg",\n "Filename": "disc.jpg"\n },\n "forks": {}\n },\n "root.txt": {\n "path": "root.txt",\n "target": "0x45b3c65f9bcba9150247878baf9120836a51e62f61f7397270227a71ed94bfaf",\n "metadata": {\n "Content-Type": "text/plain; charset=utf-8",\n "Filename": "root.txt"\n },\n "forks": {}\n },\n "subfolder/nested.txt": {\n "path": "subfolder/nested.txt",\n "target": "0x7ca0eb93e9b5802fa5c62ca8e2ef84fffa73a0f589ef68fc457beccbb2b1f84f",\n "metadata": {\n "Content-Type": "text/plain; charset=utf-8",\n "Filename": "subfolder\\\\nested.txt"\n },\n "forks": {}\n }\n }\n}\n'})}),"\n",(0,i.jsx)(n.admonition,{type:"info",children:(0,i.jsxs)(n.p,{children:["Note that the manifest contains an entry for the file we specified as the index document in the upload options ",(0,i.jsx)(n.code,{children:'indexDocument: "disc.jpg"'}),"\nBoth ",(0,i.jsx)(n.code,{children:"indexDocument"})," and ",(0,i.jsx)(n.code,{children:"errorDocument"})," options will cause the manifest to be updated, but for more complex manifest manipulation we will need to do a bit more than setting some options. Keep reading to learn how."]})}),"\n",(0,i.jsx)(n.p,{children:"In the example output, you will find the following line (with your own unique manifest reference):"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"Manifest reference: bf5fa30cf426fe9b646db8cb1dfcb8fd146096e6a86c1de2b266689346e703c8\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Update ",(0,i.jsx)(n.code,{children:"SCRIPT_02_MANIFEST"})," in your ",(0,i.jsx)(n.code,{children:".env"})," file with the printed ",(0,i.jsx)(n.strong,{children:"manifest reference"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"SCRIPT_02_MANIFEST=bf5fa30cf426fe9b646db8cb1dfcb8fd146096e6a86c1de2b266689346e703c8\n"})}),"\n",(0,i.jsx)(n.p,{children:"You will also see a formatted URL in the output:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"URL: http://localhost:1633/bzz/bf5fa30cf426fe9b646db8cb1dfcb8fd146096e6a86c1de2b266689346e703c8/\n"})}),"\n",(0,i.jsx)(n.p,{children:"Copy it and open in your browser. Since we specified an index document in our code, that's what you will see:"}),"\n",(0,i.jsx)(n.p,{children:"Index document option:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",children:'indexDocument: "disc.jpg"\n'})}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.em,{children:"/img/disc.jpg:"}),"\n",(0,i.jsx)(n.img,{alt:"DISC diagram",src:t(58556).A+"",width:"3290",height:"1520"})]}),"\n",(0,i.jsxs)(n.p,{children:["Since we DID NOT specify the ",(0,i.jsx)(n.code,{children:"errorDocument"})," option, If you navigate to a non-existing document, you will just see your browser's default 404 error page:"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"http://localhost:1633/bzz/bf5fa30cf426fe9b646db8cb1dfcb8fd146096e6a86c1de2b266689346e703c8/non-existing-content",children:"http://localhost:1633/bzz/bf5fa30cf426fe9b646db8cb1dfcb8fd146096e6a86c1de2b266689346e703c8/non-existing-content"})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"browser default 404 page",src:t(67239).A+"",width:"1848",height:"1013"})}),"\n",(0,i.jsx)(n.p,{children:"We'll fix this later."}),"\n",(0,i.jsx)(n.h3,{id:"code-explanation",children:"Code Explanation"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Get path"}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["First we get the path to our upload directory as specified in the ",(0,i.jsx)(n.code,{children:".env"})," file by the ",(0,i.jsx)(n.code,{children:"UPLOAD_DIR"})," variable:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"const directoryPath = path.join(__dirname, process.env.UPLOAD_DIR);\n"})}),"\n",(0,i.jsxs)(n.ol,{start:"2",children:["\n",(0,i.jsx)(n.li,{children:"Upload"}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["Then we upload the directory using our imported ",(0,i.jsx)(n.code,{children:"uploadDirectory"}),' utility function and set the index document to the "disc.jpg" in the root of our folder. Upon successful upload, the manifest reference is saved in ',(0,i.jsx)(n.code,{children:"reference"})," and printed to the terminal:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'const reference = await uploadDirectory(directoryPath, { indexDocument: "disc.jpg" });\nconsole.log("Manifest reference:", reference.toHex());\n'})}),"\n",(0,i.jsxs)(n.ol,{start:"3",children:["\n",(0,i.jsx)(n.li,{children:"Print manifest"}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"After upload, the manifest is loaded and printed:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",children:"const node = await MantarayNode.unmarshal(bee, reference)\nawait node.loadRecursively(bee)\nprintManifestJson(node)\n"})}),"\n",(0,i.jsxs)(n.p,{children:["This produces a tree showing how paths map to Swarm references. To better understand the tree shown in the terminal output, refer to the ",(0,i.jsx)(n.a,{href:"/docs/develop/tools-and-features/manifests",children:"Manifests"})," page."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'"/": {\n "path": "/",\n "target": "0x0000000000000000000000000000000000000000000000000000000000000000",\n "metadata": {\n "website-index-document": "disc.jpg"\n },\n "forks": {}\n },\n'})}),"\n",(0,i.jsx)(n.p,{children:"This entry ensures that a file will be served at the root directory rather than a 404 error."}),"\n",(0,i.jsx)(n.p,{children:"In the next script, we see how to update the manifest tree."}),"\n",(0,i.jsx)(n.h2,{id:"script-2-adding-a-file-to-an-existing-manifest",children:"Script 2: Adding a File to an Existing Manifest"}),"\n",(0,i.jsx)(n.p,{children:"The second script demonstrates how to add a new file without re-uploading the entire directory."}),"\n",(0,i.jsx)(n.p,{children:"Full script:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/ethersphere/examples/blob/main/filesystem/script-02.js",children:(0,i.jsx)(n.code,{children:"script-02.js"})})}),"\n"]}),"\n",(0,i.jsx)(n.admonition,{type:"tip",children:(0,i.jsxs)(n.p,{children:["Before running the second script, make sure that you have updated your ",(0,i.jsx)(n.code,{children:".env"})," variable ",(0,i.jsx)(n.code,{children:"SCRIPT_02_MANIFEST"})," with the manifest reference returned by the first script."]})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"node script-02.js\n"})}),"\n",(0,i.jsx)(n.p,{children:"The terminal output will be similar to that from our first script except with several key differences:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Updated manifest reference"}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Since we've updated the manifest, we now have a new manifest reference:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"Updated manifest reference: aaec0f55d6e9216944246f5adce0834c69b55ac2164ea1f5777dadf545b8f3bc\n\nUpdated manifest URL: http://localhost:1633/bzz/aaec0f55d6e9216944246f5adce0834c69b55ac2164ea1f5777dadf545b8f3bc/\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Update ",(0,i.jsx)(n.code,{children:"SCRIPT_03_MANIFEST"})," in your ",(0,i.jsx)(n.code,{children:".env"})," file with the ",(0,i.jsx)(n.strong,{children:"Updated manifest reference"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"SCRIPT_03_MANIFEST=aaec0f55d6e9216944246f5adce0834c69b55ac2164ea1f5777dadf545b8f3bc\n"})}),"\n",(0,i.jsxs)(n.ol,{start:"2",children:["\n",(0,i.jsx)(n.li,{children:"Modified directory tree"}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'"new.txt": {\n "path": "new.txt",\n "target": "0x3515db2f5e3c075b7546d7dd7dea1680c3e0785c6584e66b7e4f56fc344a0a78",\n "metadata": {\n "Content-Type": "text/plain; charset=utf-8",\n "Filename": "new.txt"\n },\n "forks": {}\n }\n'})}),"\n",(0,i.jsxs)(n.p,{children:["Now if we navigate to ",(0,i.jsx)(n.a,{href:"http://localhost:1633/bzz/aaec0f55d6e9216944246f5adce0834c69b55ac2164ea1f5777dadf545b8f3bc/new.txt",children:"http://localhost:1633/bzz/aaec0f55d6e9216944246f5adce0834c69b55ac2164ea1f5777dadf545b8f3bc/new.txt"}),", we will see the contents of the new file added to our manifest:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"Hi, I'm new here.\n"})}),"\n",(0,i.jsx)(n.h3,{id:"explanation",children:"Explanation"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Load the existing manifest returned from the first script:"}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",children:"const node = await MantarayNode.unmarshal(bee, ROOT_MANIFEST)\nawait node.loadRecursively(bee)\n"})}),"\n",(0,i.jsxs)(n.ol,{start:"2",children:["\n",(0,i.jsx)(n.li,{children:"Upload a new file we intend to add to the manifest (not a directory):"}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",children:"const { reference } = await bee.uploadData(batchId, bytes)\n"})}),"\n",(0,i.jsxs)(n.ol,{start:"3",children:["\n",(0,i.jsx)(n.li,{children:"Insert the file into the manifest:"}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",children:"node.addFork(filename, reference, metadata)\n"})}),"\n",(0,i.jsxs)(n.ol,{start:"4",children:["\n",(0,i.jsx)(n.li,{children:"Save the updated manifest:"}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",children:"const updated = await node.saveRecursively(bee, batchId)\n"})}),"\n",(0,i.jsxs)(n.p,{children:["This produces a ",(0,i.jsx)(n.strong,{children:"new manifest reference"})," where the file is now accessible by path, for example:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"swarm-cli download aaec0f55d6e9216944246f5adce0834c69b55ac2164ea1f5777dadf545b8f3bc/new.txt ./\nnew.txt OK\n"})}),"\n",(0,i.jsx)(n.p,{children:"Print file contents to confirm:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"cat .\\new.txt\nHi, I'm new here.\n"})}),"\n",(0,i.jsx)(n.p,{children:"Our new file is now accessible through the same manifest reference along with all our other files."}),"\n",(0,i.jsx)(n.h2,{id:"script-3-moving-a-file-by-updating-the-manifest",children:"Script 3: Moving a File by Updating the Manifest"}),"\n",(0,i.jsx)(n.p,{children:"The third script shows how to move a file by modifying paths in the manifest."}),"\n",(0,i.jsx)(n.p,{children:"Full script:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/ethersphere/examples/blob/main/filesystem/script-03.js",children:(0,i.jsx)(n.code,{children:"script-03.js"})})}),"\n"]}),"\n",(0,i.jsx)(n.admonition,{type:"tip",children:(0,i.jsxs)(n.p,{children:["Before running the third script, make sure that you have updated your ",(0,i.jsx)(n.code,{children:".env"})," variable ",(0,i.jsx)(n.code,{children:"SCRIPT_03_MANIFEST"})," with the manifest reference returned by the second script (see terminal output from ",(0,i.jsx)(n.code,{children:"Updated manifest reference:"}),")."]})}),"\n",(0,i.jsx)(n.p,{children:"This is done by:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Locating the existing file entry"}),"\n",(0,i.jsx)(n.li,{children:"Removing it from its current path"}),"\n",(0,i.jsx)(n.li,{children:"Re-adding it under a new path"}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Run the script:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"node script-03.js\n"})}),"\n",(0,i.jsx)(n.p,{children:"The output should look familiar, but again with several key changes:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Updated manifest reference"}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Since we've made another change to the manifest, we have a new manifest reference:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"Updated manifest reference: 9a4a6305c811b2976498ef38270fffeb16966fc8719f745a4b18598d39e77ae0\n"})}),"\n",(0,i.jsxs)(n.ol,{start:"2",children:["\n",(0,i.jsx)(n.li,{children:"Modified directory tree"}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["We no longer see the entry for ",(0,i.jsx)(n.code,{children:"new.txt"})," at the root directory, and we now have a new entry for the same file but now at an updated path in a nested directory:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'"nested/deeper/new.txt": {\n "path": "nested/deeper/new.txt",\n "target": "0x3515db2f5e3c075b7546d7dd7dea1680c3e0785c6584e66b7e4f56fc344a0a78",\n "metadata": {\n "Content-Type": "text/plain; charset=utf-8",\n "Filename": "new.txt"\n },\n "forks": {}\n}\n'})}),"\n",(0,i.jsxs)(n.p,{children:["If we navigate to the ",(0,i.jsx)(n.code,{children:"new.txt"})," file in its old location:"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"http://localhost:1633/bzz/9a4a6305c811b2976498ef38270fffeb16966fc8719f745a4b18598d39e77ae0/new.txt",children:"http://localhost:1633/bzz/9a4a6305c811b2976498ef38270fffeb16966fc8719f745a4b18598d39e77ae0/new.txt"})}),"\n",(0,i.jsx)(n.p,{children:"We will get a 404 error since we removed that entry from the manifest."}),"\n",(0,i.jsxs)(n.p,{children:["But if we navigate to its new location at ",(0,i.jsx)(n.code,{children:"/nested/deeper/new.txt"})," we will now see it again:"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"http://localhost:1633/bzz/9a4a6305c811b2976498ef38270fffeb16966fc8719f745a4b18598d39e77ae0/nested/deeper/new.txt",children:"http://localhost:1633/bzz/9a4a6305c811b2976498ef38270fffeb16966fc8719f745a4b18598d39e77ae0/nested/deeper/new.txt"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"Hi, I'm new here.\n"})}),"\n",(0,i.jsx)(n.h3,{id:"explanation-1",children:"Explanation"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Remove entry"}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["Remove the entry for ",(0,i.jsx)(n.code,{children:"new.txt"})," which was added by the second script:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",children:'node.removeFork("new.txt")\n'})}),"\n",(0,i.jsxs)(n.ol,{start:"2",children:["\n",(0,i.jsx)(n.li,{children:"Add new entry"}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["Add a new entry for ",(0,i.jsx)(n.code,{children:"new.txt"})," in a new location in a nested directory:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",children:'node.addFork(\n "nested/deeper/new.txt",\n fileRef,\n metadata\n)\n'})}),"\n",(0,i.jsxs)(n.ol,{start:"3",children:["\n",(0,i.jsx)(n.li,{children:"Save and print"}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"const updated = await node.saveRecursively(bee, batchId);\nconst newManifestRef = updated.reference.toHex();\n"})}),"\n",(0,i.jsx)(n.p,{children:"After saving the manifest again, the file becomes accessible at:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"/nested/deeper/new.txt\n"})}),"\n",(0,i.jsxs)(n.p,{children:["No data is duplicated, the ",(0,i.jsx)(n.code,{children:"new.txt"})," file has not been modified, only the path mapping changes in the manifest."]}),"\n",(0,i.jsx)(n.h2,{id:"key-takeaways",children:"Key Takeaways"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Uploading a directory creates a manifest"}),"\n",(0,i.jsx)(n.li,{children:"Files are accessed via the manifest, not directly by their internal references"}),"\n",(0,i.jsx)(n.li,{children:"Manifests can be modified to add, move, or remove files"}),"\n",(0,i.jsx)(n.li,{children:"Updating a manifest produces a new reference, but underlying data remains immutable"}),"\n",(0,i.jsx)(n.li,{children:"This provides filesystem-like behavior without mutable storage"}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"With these tools, you can treat Swarm directories much like a filesystem \u2014 while still preserving immutability and content addressing."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Next:"})," ",(0,i.jsx)(n.a,{href:"/docs/develop/routing",children:"Website Routing"})," \u2014 put manifest path mapping to practical use by setting up clean URL routing for a Swarm-hosted site."]})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(o,{...e})}):o(e)}},67239(e,n,t){t.d(n,{A:()=>s});const s=t.p+"assets/images/default-404-4bcfc018158eeaf18ada8562b30f1c45.jpg"},58556(e,n,t){t.d(n,{A:()=>s});const s=t.p+"assets/images/disc-e885f00fdf9004bfcb502f11ae3d725c.jpg"},28453(e,n,t){t.d(n,{R:()=>r,x:()=>d});var s=t(96540);const i={},a=s.createContext(i);function r(e){const n=s.useContext(a);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3327.70d243dd.js b/assets/js/3327.70d243dd.js new file mode 100644 index 000000000..5fd0a842f --- /dev/null +++ b/assets/js/3327.70d243dd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[3327],{13327(e,c,s){s.d(c,{createPacketServices:()=>a.$});var a=s(73263);s(4954)}}]); \ No newline at end of file diff --git a/assets/js/3436.50f04f62.js b/assets/js/3436.50f04f62.js new file mode 100644 index 000000000..9517e6654 --- /dev/null +++ b/assets/js/3436.50f04f62.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[3436],{33436(e,t,n){function o(e,{target:t=document.body}={}){if("string"!=typeof e)throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof e}\`.`);const n=document.createElement("textarea"),o=document.activeElement;n.value=e,n.setAttribute("readonly",""),n.style.all="unset",n.style.contain="strict",n.style.position="absolute",n.style.left="-9999px",n.style.width="2em",n.style.height="2em",n.style.padding="0",n.style.border="none",n.style.outline="none",n.style.boxShadow="none",n.style.background="transparent",n.style.fontSize="12pt",n.style.whiteSpace="pre";const s=document.getSelection(),l=s.rangeCount>0&&s.getRangeAt(0);t.append(n),n.select(),n.selectionStart=0,n.selectionEnd=e.length;let a=!1;try{a=document.execCommand("copy")}catch{}return n.remove(),l&&(s.removeAllRanges(),s.addRange(l)),o&&o.focus(),a}n.d(t,{default:()=>o})}}]); \ No newline at end of file diff --git a/assets/js/3509.168db17a.js b/assets/js/3509.168db17a.js new file mode 100644 index 000000000..35d44421d --- /dev/null +++ b/assets/js/3509.168db17a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[3509],{77454(t,e,a){function r(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}a.d(e,{S:()=>r}),(0,a(86827).K)(r,"populateCommonDb")},83509(t,e,a){a.d(e,{diagram:()=>m});var r=a(77454),i=a(5637),s=a(16459),o=a(76385),n=a(31293),l=a(86827),c=a(78731),d=o.UI.packet,b=class{constructor(){this.packet=[],this.setAccTitle=o.SV,this.getAccTitle=o.iN,this.setDiagramTitle=o.ke,this.getDiagramTitle=o.ab,this.getAccDescription=o.m7,this.setAccDescription=o.EI}static{(0,l.K)(this,"PacketDB")}getConfig(){const t=(0,s.$t)({...d,...(0,o.zj)().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){(0,o.IU)(),this.packet=[]}},p=(0,l.K)((t,e)=>{(0,r.S)(t,e);let a=-1,i=[],s=1;const{bitsPerRow:o}=e.getConfig();for(let{start:r,end:l,bits:c,label:d}of t.blocks){if(void 0!==r&&void 0!==l&&l{if(void 0===t.start)throw new Error("start should have been set during first phase");if(void 0===t.end)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*a)return[t,void 0];const r=e*a-1,i=e*a;return[{start:t.start,end:r,label:t.label,bits:r-t.start},{start:i,end:t.end,label:t.label,bits:t.end-i}]},"getNextFittingBlock"),k={parser:{yy:void 0},parse:(0,l.K)(async t=>{const e=await(0,c.qg)("packet",t),a=k.parser?.yy;if(!(a instanceof b))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");n.R.debug(e),p(e,a)},"parse")},g=(0,l.K)((t,e,a,r)=>{const s=r.db,n=s.getConfig(),{rowHeight:l,paddingY:c,bitWidth:d,bitsPerRow:b}=n,p=s.getPacket(),h=s.getDiagramTitle(),k=l+c,g=k*(p.length+1)-(h?0:l),u=d*b+2,w=(0,i.D)(e);w.attr("viewBox",`0 0 ${u} ${g}`),(0,o.a$)(w,g,u,n.useMaxWidth);for(const[i,o]of p.entries())f(w,o,i,n);w.append("text").text(h).attr("x",u/2).attr("y",g-k/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),f=(0,l.K)((t,e,a,{rowHeight:r,paddingX:i,paddingY:s,bitWidth:o,bitsPerRow:n,showBits:l})=>{const c=t.append("g"),d=a*(r+s)+s;for(const b of e){const t=b.start%n*o+1,e=(b.end-b.start+1)*o-i;if(c.append("rect").attr("x",t).attr("y",d).attr("width",e).attr("height",r).attr("class","packetBlock"),c.append("text").attr("x",t+e/2).attr("y",d+r/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(b.label),!l)continue;const a=b.end===b.start,s=d-2;c.append("text").attr("x",t+(a?e/2:0)).attr("y",s).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",a?"middle":"start").text(b.start),a||c.append("text").attr("x",t+e).attr("y",s).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(b.end)}},"drawWord"),u={draw:g},w={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},$=(0,l.K)(({packet:t}={})=>{const e=(0,s.$t)(w,t);return`\n\t.packetByte {\n\t\tfont-size: ${e.byteFontSize};\n\t}\n\t.packetByte.start {\n\t\tfill: ${e.startByteColor};\n\t}\n\t.packetByte.end {\n\t\tfill: ${e.endByteColor};\n\t}\n\t.packetLabel {\n\t\tfill: ${e.labelColor};\n\t\tfont-size: ${e.labelFontSize};\n\t}\n\t.packetTitle {\n\t\tfill: ${e.titleColor};\n\t\tfont-size: ${e.titleFontSize};\n\t}\n\t.packetBlock {\n\t\tstroke: ${e.blockStrokeColor};\n\t\tstroke-width: ${e.blockStrokeWidth};\n\t\tfill: ${e.blockFillColor};\n\t}\n\t`},"styles"),m={parser:k,get db(){return new b},renderer:u,styles:$}}}]); \ No newline at end of file diff --git a/assets/js/3510.9ff55279.js b/assets/js/3510.9ff55279.js new file mode 100644 index 000000000..b1a0e864b --- /dev/null +++ b/assets/js/3510.9ff55279.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[3510],{77454(e,t,n){function i(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}n.d(t,{S:()=>i}),(0,n(86827).K)(i,"populateCommonDb")},93510(e,t,n){n.d(t,{diagram:()=>ie});var i=n(77454),a=n(16459),r=n(76385),o=n(31293),s=n(86827),l=n(78731),d=n(70451),m="position frame",c="frame positioned",x="position relation",u="relation positioned",f=(0,s.K)(function(e){o.R.debug("options str",e)},"setOptions"),g=(0,s.K)(function(){return{}},"getOptions"),h=(0,s.K)(function(){b(),(0,r.IU)()},"clear");function b(){v={}}(0,s.K)(b,"reset");var p=r.UI.eventmodeling,w=(0,s.K)(()=>(0,a.$t)({...p,...(0,r.zj)().eventmodeling}),"getConfig"),v={};function y(){let e=K;const{ast:t}=v,n=M();if(!t)throw new Error("No data for EventModel");return t.frames.forEach((i,a)=>{const r=E(i,t.dataEntities,n);let s;e=Z(e,{$kind:m,index:a,frame:i,textProps:r}),C(i)?(o.R.debug("source frame",i.sourceFrames),s=t.frames.filter(e=>i.sourceFrames.some(t=>t.$refText===e.name)),s.forEach(t=>{e=Z(e,{$kind:x,index:a,frame:i,sourceFrame:t})})):e=Z(e,{$kind:x,index:a,frame:i})}),e={...e,sortedSwimlanesArray:H(e.swimlanes)},e}function P(e){v.ast=e}(0,s.K)(y,"getState"),(0,s.K)(P,"setAst");var k={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function M(){return k}(0,s.K)(M,"getDiagramProps");var K={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function S(e){const t=e.split(".");if(2===t.length)return t[0]}function B(e){const t=e.split(".");return 2===t.length?t[1]:e}function F(e,t){if(t&&0!==t.length)return Object.values(e).find(e=>e.namespace===t)}function R(e,t,n){return Math.max(t,...Object.keys(e).filter(e=>{const i=Number.parseInt(e);return i>t&&iNumber.parseInt(e)))+1}function $(e,t){const n=S(e.entityIdentifier),i=F(t,n);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||k.labelUiAutomation}:n?{index:R(t,0,100),label:k.labelUiAutomationPrefix+n}:{index:0,label:k.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||k.labelCommandReadModel}:n?{index:R(t,100,200),label:k.labelCommandReadModelPrefix+n}:{index:100,label:k.labelCommandReadModel};default:return i?{index:i.index,label:i.namespace||k.labelEvents}:n?{index:R(t,200,300),label:k.labelEventsPrefix+n}:{index:200,label:k.labelEvents}}}function A(e){const{themeVariables:t}=(0,r.zj)();switch(e.modelEntityType){case"ui":return{fill:t.emUiFill??"white",stroke:t.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:t.emProcessorFill??"#edb3f6",stroke:t.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:t.emReadModelFill??"#d3f1a2",stroke:t.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:t.emCommandFill??"#bcd6fe",stroke:t.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:t.emEventFill??"#ffb778",stroke:t.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}function E(e,t,n){const i=(0,r.zj)(),s=(0,r.jZ)(B(e.entityIdentifier)??"",i);let l;const d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"
    "};let m=`${(0,a.bH)(s,n.textMaxWidth,d)}`;if(e.dataInlineValue&&(l=e.dataInlineValue,l=l.substring(l.indexOf("{")+1),l=l.substring(0,l.lastIndexOf("}")-1),l=(0,r.jZ)(l,i),l=(0,a.bH)(l,n.textMaxWidth,d),l=l.replaceAll(" "," ")),e.dataReference){const o=t.find(t=>t.name===e.dataReference?.$refText);o&&(l=o.dataBlockValue,l=l.substring(l.indexOf("{\n")+2),l=l.substring(0,l.lastIndexOf("}")-1),l=(0,r.jZ)(l,i),l=(0,a.bH)(l,n.textMaxWidth,d),l=l.replaceAll(" "," "),l+="
    ")}const c=void 0!==l;c&&(m+=`

    ${l}`);const x={fontSize:d.fontSize,fontWeight:d.fontWeight,fontFamily:d.fontFamily},u=(0,a.PX)(m,x),f={content:m,width:c?u.width/3:u.width,height:u.height};return o.R.debug(`[${e.name}] ${e.entityIdentifier} text`,f),f}function T(e,t){const n=t,i=A(n.frame),a={width:n.textProps.width+2*k.boxTextPadding,height:n.textProps.height+2*k.boxTextPadding};return[{$kind:c,frame:n.frame,index:n.index,visual:i,dimension:a,textProps:n.textProps}]}function D(e,t,n){return void 0===t?k.contentStartX:t.index===e.index&&e.r?e.r+k.boxPadding:void 0===n?k.contentStartX:n.r-k.boxOverlap+k.boxPadding}function W(e,t){const n=[...e.map(e=>e.r),t];return Math.max(...n)}function H(e){return Object.values(e).sort((e,t)=>e.index-t.index)}function I(e,t){const n=t,i=$(n.frame,e.swimlanes);let a;a=i.index in e.swimlanes?e.swimlanes[i.index]:{index:i.index,label:i.label,r:0,y:i.index*k.swimlaneMinHeight+k.swimlaneGap,height:k.swimlaneMinHeight,maxHeight:k.swimlaneMinHeight};const r=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,o=void 0!==e.previousSwimlaneNumber?e.swimlanes[e.previousSwimlaneNumber]:void 0,s={width:Math.max(k.boxMinWidth,Math.min(k.boxMaxWidth,n.dimension.width))+2*k.boxPadding,height:Math.max(k.boxMinHeight,Math.min(k.boxMaxHeight,n.dimension.height))+2*k.boxPadding},l=D(a,o,r),d=l+s.width+k.boxPadding,m=W(Object.values(e.swimlanes),d);a.r=l+s.width,a.maxHeight=Math.max(a.maxHeight,s.height),a.height=Math.max(k.swimlaneMinHeight,a.maxHeight)+2*k.swimlanePadding;const c={x:l,y:k.swimlanePadding+a.y,r:d,dimension:s,leftSibling:!1,swimlane:a,visual:n.visual,text:n.textProps.content,frame:n.frame,index:n.index},x={...e,boxes:[...e.boxes,c],swimlanes:{...e.swimlanes,[`${a.index}`]:a},previousSwimlaneNumber:i.index,previousFrame:n.frame,maxR:m},u=H(x.swimlanes);u.length>0&&(u[0].y=0);for(let f=1;f0}function j(e,t){if(null!=t)return e.find(e=>e.frame.name===t.name)}function U(e,t,n){if(!(n<0))for(let i=n;i>=0;i--){const n=e[i];if(n.swimlane.index!==t)return n}}function N(e,t){const n=t;if((0,l.F5)(n.frame)||O(n.index,n.frame))return[];const i=j(e.boxes,n.frame);if(void 0===i)throw new Error(`Target box not found for frame ${n.frame.name}`);let a;if(a=n.sourceFrame?j(e.boxes,n.sourceFrame):U(e.boxes,i.swimlane.index,n.index-1),void 0===a)return[];return[{$kind:u,frame:n.frame,index:n.index,sourceBox:a,targetBox:i}]}function V(e,t){const n=t,i={visual:{fill:"none",stroke:"#000"},source:{x:n.sourceBox.x,y:n.sourceBox.y},target:{x:n.targetBox.x,y:n.targetBox.y},sourceBox:n.sourceBox,targetBox:n.targetBox};return{...e,relations:[...e.relations,i]}}(0,s.K)(S,"extractNamespace"),(0,s.K)(B,"extractName"),(0,s.K)(F,"findSwimlaneByNamespace"),(0,s.K)(R,"findNextAvailableIndex"),(0,s.K)($,"calculateSwimlaneProps"),(0,s.K)(A,"calculateEntityVisualProps"),(0,s.K)(E,"calculateTextProps"),(0,s.K)(T,"decidePositionFrame"),(0,s.K)(D,"calculateX"),(0,s.K)(W,"calculateMaxRight"),(0,s.K)(H,"sortedSwimlanesArray"),(0,s.K)(I,"evolveFramePositioned"),(0,s.K)(O,"isFirstFrame"),(0,s.K)(C,"hasSourceFrame"),(0,s.K)(j,"findBoxByFrame"),(0,s.K)(U,"findBoxByLineIndex"),(0,s.K)(N,"decidePositionRelation"),(0,s.K)(V,"evolveRelationPositioned");var z={[m]:T,[x]:N},X={[c]:I,[u]:V};function G(e,t){const n=z[t.$kind];if(null==n)return[];const i=n(e,t);return o.R.debug("decided events",i),i}function L(e,t){const n=t.reduce((e,t)=>{const n=X[t.$kind];return null==n?e:n(e,t)},e);return o.R.debug("evolve events",{state:e,newState:n,events:t}),n}function Z(e,t){return L(e,G(e,t))}(0,s.K)(G,"decide"),(0,s.K)(L,"evolve"),(0,s.K)(Z,"dispatch");var Y={getConfig:w,setOptions:f,getOptions:g,clear:h,setAccTitle:r.SV,getAccTitle:r.iN,getAccDescription:r.m7,setAccDescription:r.EI,setDiagramTitle:r.ke,getDiagramTitle:r.ab,setAst:P,getDiagramProps:M,getState:y},_={parse:(0,s.K)(async e=>{const t=await(0,l.qg)("eventmodeling",e);o.R.debug(t),Y.setAst(t),(0,i.S)(t,Y)},"parse")};var q=(0,r.D7)(),J=q?.eventmodeling;function Q(e,t){return n=>{const i=n.swimlane.y+t.swimlanePadding,a=e.append("g").attr("class","em-box");a.append("rect").attr("x",n.x).attr("y",i).attr("rx","3").attr("width",n.dimension.width).attr("height",n.dimension.height).attr("stroke",n.visual.stroke).attr("fill",n.visual.fill);a.append("foreignObject").attr("x",n.x+t.boxPadding).attr("y",i+10).attr("width",n.dimension.width-2*t.boxPadding).attr("height",n.dimension.height-2*t.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(n.text)}}function ee(e,t){return e>t}function te(e,t,n,i){return a=>{const r=a.sourceBox.swimlane.y+t.swimlanePadding,s=a.targetBox.swimlane.y+t.swimlanePadding,l=ee(r,s),d=a.sourceBox.x+2*a.sourceBox.dimension.width/3,m=a.targetBox.x+a.targetBox.dimension.width/3;let c,x;o.R.debug(`rendering relation up=${l} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),l?(c=r,x=s+a.targetBox.dimension.height):(c=r+a.sourceBox.dimension.height,x=s);const u=i.emRelationStroke??a.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",a.visual.fill).attr("stroke",u).attr("stroke-width","1").attr("marker-end",`url(#${n})`).attr("d",`M${d} ${c} L${m} ${x}`)}}function ne(e,t,n,i){return a=>{const r=e.append("g").attr("class","em-swimlane"),o=i.emSwimlaneBackgroundOdd??"rgb(250,250,250)",s=i.emSwimlaneBackgroundStroke??"rgb(240,240,240)";r.append("rect").attr("x",0).attr("y",a.y).attr("rx","3").attr("width",t+n.swimlanePadding).attr("height",a.height).attr("fill",o).attr("stroke",s),r.append("text").attr("font-weight",n.swimlaneTextFontWeight).attr("x",30).attr("y",a.y+30).text(a.label)}}(0,s.K)(Q,"renderD3Box"),(0,s.K)(ee,"dirUpwards"),(0,s.K)(te,"renderD3Relation"),(0,s.K)(ne,"renderD3Swimlane");var ie={parser:_,db:Y,renderer:{draw:(0,s.K)(function(e,t,n,i){if(o.R.debug("in eventmodeling renderer",e+"\n","id:",t,n),!J)throw new Error("EventModeling config not found");const a=i.db,{themeVariables:s,eventmodeling:l}=(0,r.D7)(),m=(0,d.Ltv)(`[id="${t}"]`),c=a.getDiagramProps(),x=a.getState(),u=`em-arrowhead-${t}`,f=s.emArrowhead??"#000000";x.sortedSwimlanesArray.forEach(ne(m,x.maxR,c,s)),x.boxes.forEach(Q(m,c)),x.relations.forEach(te(m,c,u,s));m.append("defs").append("marker").attr("id",u).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",f),(0,r.mj)(void 0,m,l?.padding??30,l?.useMaxWidth)},"draw")},styles:(0,s.K)(e=>"","getStyles")}}}]); \ No newline at end of file diff --git a/assets/js/35bdca39.17048766.js b/assets/js/35bdca39.17048766.js new file mode 100644 index 000000000..fffc5f6d7 --- /dev/null +++ b/assets/js/35bdca39.17048766.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[7473],{26336(e,n,t){t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>a,default:()=>l,frontMatter:()=>r,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"references/tokens","title":"Tokens","description":"Information about xBZZ and xDAI tokens including where to obtain them.","source":"@site/docs/references/tokens.md","sourceDirName":"references","slug":"/references/tokens","permalink":"/docs/references/tokens","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/references/tokens.md","tags":[],"version":"current","frontMatter":{"title":"Tokens","id":"tokens","description":"Information about xBZZ and xDAI tokens including where to obtain them."},"sidebar":"References","previous":{"title":"Smart Contracts","permalink":"/docs/references/smart-contracts"},"next":{"title":"Glossary","permalink":"/docs/references/glossary"}}');var o=t(74848),i=t(28453);const r={title:"Tokens",id:"tokens",description:"Information about xBZZ and xDAI tokens including where to obtain them."},a=void 0,d={},c=[{value:"Swarm Ecosystem Tokens",id:"swarm-ecosystem-tokens",level:2},{value:"BZZ",id:"bzz",level:3},{value:"xBZZ",id:"xbzz",level:3},{value:"sBZZ",id:"sbzz",level:3},{value:"DAI",id:"dai",level:3},{value:"xDAI",id:"xdai",level:3},{value:"Getting BZZ / xBZZ",id:"getting-bzz--xbzz",level:3},{value:"Bridging BZZ to xBZZ or DAI to xDAI",id:"bridging-bzz-to-xbzz-or-dai-to-xdai",level:3}];function h(e){const n={a:"a",admonition:"admonition",h2:"h2",h3:"h3",p:"p",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"swarm-ecosystem-tokens",children:"Swarm Ecosystem Tokens"}),"\n",(0,o.jsx)(n.h3,{id:"bzz",children:"BZZ"}),"\n",(0,o.jsx)(n.admonition,{type:"info",children:(0,o.jsxs)(n.p,{children:["On May 4th of 2024, as a result of a ",(0,o.jsx)(n.a,{href:"https://blog.ethswarm.org/foundation/2024/announcing-the-outcome-of-swarms-bonding-curve-vote/",children:"community vote"}),", the bonding curve was ",(0,o.jsx)(n.a,{href:"https://blog.ethswarm.org/foundation/2024/bonding-curve-shutdown/",children:"shut down"})," and the BZZ supply is now fixed at ",(0,o.jsx)(n.a,{href:"https://etherscan.io/token/0x19062190b1925b5b6689d7073fdfc8c2976ef8cb",children:"63,149,437"}),"."]})}),"\n",(0,o.jsxs)(n.p,{children:["BZZ is the original token issued from the ",(0,o.jsx)(n.a,{href:"https://etherscan.io/address/0x4f32ab778e85c4ad0cead54f8f82f5ee74d46904",children:"Ethswarm Bonding Curve contract"})," on the Ethereum blockchain."]}),"\n",(0,o.jsxs)(n.p,{children:["BZZ Ethereum address: ",(0,o.jsx)(n.a,{href:"https://etherscan.io/address/0x19062190b1925b5b6689d7073fdfc8c2976ef8cb",children:"0x19062190b1925b5b6689d7073fdfc8c2976ef8cb"})]}),"\n",(0,o.jsx)(n.p,{children:"PLUR is the smallest denomination of BZZ. 1 PLUR is equal to 1e-16 BZZ."}),"\n",(0,o.jsx)(n.h3,{id:"xbzz",children:"xBZZ"}),"\n",(0,o.jsx)(n.p,{children:'"xBZZ" is the term used to indicate BZZ on Gnosis Chain. It is the bridged version of the original Ethereum BZZ token issued on Gnosis Chain. xBZZ is the token used for staking and to pay for storage fees on Swarm.'}),"\n",(0,o.jsxs)(n.p,{children:["xBZZ Gnosis Chain address: ",(0,o.jsx)(n.a,{href:"https://gnosisscan.io/address/0xdBF3Ea6F5beE45c02255B2c26a16F300502F68da",children:"0xdBF3Ea6F5beE45c02255B2c26a16F300502F68da"})]}),"\n",(0,o.jsx)(n.admonition,{type:"info",children:(0,o.jsx)(n.p,{children:"Note that the ticker symbol is the same BZZ for both Gnosis Chain and Ethereum versions of the token. xBZZ is term of convenience used to differentiate the tokens within the Swarm community."})}),"\n",(0,o.jsx)(n.p,{children:"As with BZZ, PLUR is the smallest denomination of xBZZ. 1 PLUR is equal to 1e-16 xBZZ."}),"\n",(0,o.jsx)(n.h3,{id:"sbzz",children:"sBZZ"}),"\n",(0,o.jsx)(n.p,{children:"sBZZ is the testnet version of BZZ on the Sepolia Ethereum testnet."}),"\n",(0,o.jsxs)(n.p,{children:["Sepolia testnet address: ",(0,o.jsx)(n.a,{href:"https://sepolia.etherscan.io/address/0x543dDb01Ba47acB11de34891cD86B675F04840db",children:"0x543dDb01Ba47acB11de34891cD86B675F04840db"})]}),"\n",(0,o.jsx)(n.h3,{id:"dai",children:"DAI"}),"\n",(0,o.jsxs)(n.p,{children:["DAI is the popular decentralized stablecoin from ",(0,o.jsx)(n.a,{href:"https://makerdao.com/en/",children:"MakerDAO"}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"xdai",children:"xDAI"}),"\n",(0,o.jsx)(n.p,{children:"xDAI is the bridged version of DAI on Gnosis Chain and also serves as the native gas token for Gnosis Chain and is used to pay transaction fees on Gnosis Chain in the same way ETH is used to pay for transactions on Ethereum. It is required by Bee nodes to pay for transaction fees when interacting with Swarm smart contracts on Gnosis Chain."}),"\n",(0,o.jsx)(n.h3,{id:"getting-bzz--xbzz",children:"Getting BZZ / xBZZ"}),"\n",(0,o.jsxs)(n.p,{children:["The Swarm official website has a page with ",(0,o.jsx)(n.a,{href:"https://www.ethswarm.org/get-bzz",children:"a list of resources for getting BZZ tokens"}),". Be careful to check whether it is BZZ on Ethereum or Gnosis Chain."]}),"\n",(0,o.jsx)(n.h3,{id:"bridging-bzz-to-xbzz-or-dai-to-xdai",children:"Bridging BZZ to xBZZ or DAI to xDAI"}),"\n",(0,o.jsxs)(n.p,{children:["If you already have DAI or BZZ on Ethereum then you can use the ",(0,o.jsx)(n.a,{href:"https://bridge.gnosischain.com/",children:"Gnosis Chain Bridge"})," for swapping between DAI and xDAI or BZZ and xBZZ."]})]})}function l(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},28453(e,n,t){t.d(n,{R:()=>r,x:()=>a});var s=t(96540);const o={},i=s.createContext(o);function r(e){const n=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3608.f3f3c7fe.js b/assets/js/3608.f3f3c7fe.js new file mode 100644 index 000000000..ceae977a1 --- /dev/null +++ b/assets/js/3608.f3f3c7fe.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[3608],{13608(e,r,t){t.d(r,{diagram:()=>y});var n=t(19279),a=t(77454),s=(t(5637),t(76385),t(31293)),l=t(86827),p=t(78731),i=(0,p.sB)().RailroadAbnf.parser.LangiumParser,o=(0,l.K)(e=>{const r=e.alternatives.map(m);return 1===r.length?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),m=(0,l.K)(e=>{const r=e.elements.map(c);return 1===r.length?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),u=(0,l.K)(e=>{if(e.includes("*")){const[r,t]=e.split("*");return{min:r?parseInt(r,10):0,max:t?parseInt(t,10):1/0}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),c=(0,l.K)(e=>{const r=d(e.primary);if(!e.repeat)return r;const{min:t,max:n}=u(e.repeat);return 0===t&&1===n?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:n}},"transformElement"),d=(0,l.K)(e=>{switch(e.$type){case"AbnfStringLiteral":case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return o(e.element);case"AbnfOptionalGroup":return{type:"optional",element:o(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),b=(0,l.K)(e=>({name:e.name,definition:o(e.definition)}),"transformRule"),f=(0,l.K)(e=>{(0,a.S)(e,n.db),e.title&&n.db.setTitle(e.title),e.rules.map(e=>n.db.addRule(b(e)))},"populateDb"),y={parser:{parse:(0,l.K)(e=>{n.db.clear(),s.R.debug("[ABNF Parser] Starting Langium parse");const r=i.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new p.zg(r);const t=r.value;s.R.debug("[ABNF Parser] Parsed rules:",t.rules.length),f(t),s.R.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:n.db}},db:n.db,renderer:n.U,styles:n.$}}}]); \ No newline at end of file diff --git a/assets/js/36994c47.82e867ba.js b/assets/js/36994c47.82e867ba.js new file mode 100644 index 000000000..7e24ec7e3 --- /dev/null +++ b/assets/js/36994c47.82e867ba.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[9858],{45516(e){e.exports=JSON.parse('{"name":"docusaurus-plugin-content-blog","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/3765.d2c5b3fa.js b/assets/js/3765.d2c5b3fa.js new file mode 100644 index 000000000..9c6426b4c --- /dev/null +++ b/assets/js/3765.d2c5b3fa.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[3765],{73765(e,n,r){r.d(n,{Zp:()=>Pt});var t=r(8058),o=r(28894),i=0;const u=function(e){var n=++i;return(0,o.A)(e)+n};var a=r(39142),c=r(13588);const f=function(e){return(null==e?0:e.length)?(0,c.A)(e,1):[]};var d=r(45572),s=r(49574),v=r(6240),h=r(38446);const l=function(e,n){var r=-1,t=(0,h.A)(e)?Array(e.length):[];return(0,v.A)(e,function(e,o,i){t[++r]=n(e,o,i)}),t};var g=r(92049);const p=function(e,n){return((0,g.A)(e)?d.A:l)(e,(0,s.A)(n,3))};var A=Math.ceil,b=Math.max;const w=function(e,n,r,t){for(var o=-1,i=b(A((n-e)/(r||1)),0),u=Array(i);i--;)u[t?i:++o]=e,e+=r;return u};var y=r(66984),m=r(25353),j=r(23149);const x=function(e,n,r){if(!(0,j.A)(r))return!1;var t=typeof n;return!!("number"==t?(0,h.A)(r)&&(0,m.A)(n,r.length):"string"==t&&n in r)&&(0,y.A)(r[n],e)};var O=/\s/;const k=function(e){for(var n=e.length;n--&&O.test(e.charAt(n)););return n};var E=/^\s+/;const N=function(e){return e?e.slice(0,k(e)+1).replace(E,""):e};var _=r(61882),I=/^[-+]0x[0-9a-f]+$/i,P=/^0b[01]+$/i,T=/^0o[0-7]+$/i,M=parseInt;const R=function(e){if("number"==typeof e)return e;if((0,_.A)(e))return NaN;if((0,j.A)(e)){var n="function"==typeof e.valueOf?e.valueOf():e;e=(0,j.A)(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=N(e);var r=P.test(e);return r||T.test(e)?M(e.slice(2),r?2:8):I.test(e)?NaN:+e};var L=1/0;const C=function(e){return e?(e=R(e))===L||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};const S=function(e){return function(n,r,t){return t&&"number"!=typeof t&&x(n,r,t)&&(r=t=void 0),n=C(n),void 0===r?(r=n,n=0):r=C(r),t=void 0===t?n0;--a)if(t=n[a].dequeue()){o=o.concat(D(e,n,r,t,!0));break}}return o}(r.graph,r.buckets,r.zeroIdx);return f(p(o,function(n){return e.outEdges(n.v,n.w)}))}function D(e,n,r,o,i){var u=i?[]:void 0;return t.A(e.inEdges(o.v),function(t){var o=e.edge(t),a=e.node(t.v);i&&u.push({v:t.v,w:t.w}),a.out-=o,Y(n,r,a)}),t.A(e.outEdges(o.v),function(t){var o=e.edge(t),i=t.w,u=e.node(i);u.in-=o,Y(n,r,u)}),e.removeNode(o.v),u}function Y(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function z(e){var n="greedy"===e.graph().acyclicer?q(e,function(e){return function(n){return e.edge(n).weight}}(e)):function(e){var n=[],r={},o={};function i(u){Object.prototype.hasOwnProperty.call(o,u)||(o[u]=!0,r[u]=!0,t.A(e.outEdges(u),function(e){Object.prototype.hasOwnProperty.call(r,e.w)?n.push(e):i(e.w)}),delete r[u])}return t.A(e.nodes(),i),n}(e);t.A(n,function(n){var r=e.edge(n);e.removeEdge(n),r.forwardName=n.name,r.reversed=!0,e.setEdge(n.w,n.v,r,u("rev"))})}var $=r(11754),J=r(84171);const W=function(e,n,r){"__proto__"==n&&J.A?(0,J.A)(e,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[n]=r};const Z=function(e,n,r){(void 0!==r&&!(0,y.A)(e[n],r)||void 0===r&&!(n in e))&&W(e,n,r)};var H=r(4574),K=r(41917),Q="object"==typeof exports&&exports&&!exports.nodeType&&exports,X=Q&&"object"==typeof module&&module&&!module.nodeType&&module,ee=X&&X.exports===Q?K.A.Buffer:void 0,ne=ee?ee.allocUnsafe:void 0;const re=function(e,n){if(n)return e.slice();var r=e.length,t=ne?ne(r):new e.constructor(r);return e.copy(t),t};var te=r(43988);const oe=function(e){var n=new e.constructor(e.byteLength);return new te.A(n).set(new te.A(e)),n};const ie=function(e,n){var r=n?oe(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)};const ue=function(e,n){var r=-1,t=e.length;for(n||(n=Array(t));++r1?r[o-1]:void 0,u=o>2?r[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,u&&x(r[0],r[1],u)&&(i=o<3?void 0:i,o=1),n=Object(n);++t2?n[2]:void 0;for(o&&x(n[0],n[1],o)&&(t=1);++rn};var en=r(29008);const nn=function(e){return e&&e.length?Qe(e,en.A,Xe):void 0};const rn=function(e){var n=null==e?0:e.length;return n?e[n-1]:void 0};var tn=r(79841);const on=function(e,n){var r={};return n=(0,s.A)(n,3),(0,tn.A)(e,function(e,t,o){W(r,t,n(e,t,o))}),r};var un=r(69592);const an=function(e,n){return eMath.abs(u)*f?(a<0&&(f=-f),r=f*u/a,t=f):(u<0&&(c=-c),r=c,t=c*a/u),{x:o+r,y:i+t}}function An(e){var n=p(S(wn(e)+1),function(){return[]});return t.A(e.nodes(),function(r){var t=e.node(r),o=t.rank;un.A(o)||(n[o][t.order]=r)}),n}function bn(e,n,r,t){var o={width:0,height:0};return arguments.length>=4&&(o.rank=r,o.order=t),ln(e,"border",o,n)}function wn(e){return nn(p(e.nodes(),function(n){var r=e.node(n).rank;if(!un.A(r))return r}))}function yn(e,n){var r=hn();try{return n()}finally{console.log(e+" time: "+(hn()-r)+"ms")}}function mn(e,n){return n()}function jn(e,n,r,t,o,i){var u={width:0,height:0,rank:i,borderType:n},a=o[n][i-1],c=ln(e,"border",u,r);o[n][i]=c,e.setParent(c,t),a&&e.setEdge(a,c,{weight:1})}function xn(e){var n=e.graph().rankdir.toLowerCase();"bt"!==n&&"rl"!==n||function(e){t.A(e.nodes(),function(n){En(e.node(n))}),t.A(e.edges(),function(n){var r=e.edge(n);t.A(r.points,En),Object.prototype.hasOwnProperty.call(r,"y")&&En(r)})}(e),"lr"!==n&&"rl"!==n||(!function(e){t.A(e.nodes(),function(n){Nn(e.node(n))}),t.A(e.edges(),function(n){var r=e.edge(n);t.A(r.points,Nn),Object.prototype.hasOwnProperty.call(r,"x")&&Nn(r)})}(e),On(e))}function On(e){t.A(e.nodes(),function(n){kn(e.node(n))}),t.A(e.edges(),function(n){kn(e.edge(n))})}function kn(e){var n=e.width;e.width=e.height,e.height=n}function En(e){e.y=-e.y}function Nn(e){var n=e.x;e.x=e.y,e.y=n}function _n(e){e.graph().dummyChains=[],t.A(e.edges(),function(n){!function(e,n){var r=n.v,t=e.node(r).rank,o=n.w,i=e.node(o).rank,u=n.name,a=e.edge(n),c=a.labelRank;if(i===t+1)return;e.removeEdge(n);var f,d,s=void 0;for(d=0,++t;t-1?o[i?n[u]:u]:void 0}};var Bn=r(25707);const Vn=function(e){var n=C(e),r=n%1;return n==n?r?n-r:n:0};var Gn=Math.max;const Un=Fn(function(e,n,r){var t=null==e?0:e.length;if(!t)return-1;var o=null==r?0:Vn(r);return o<0&&(o=Gn(t+o,0)),(0,Bn.A)(e,(0,s.A)(n,3),o)});var qn=r(11662);a.A(1);a.A(1);r(69471);var Dn=r(9779);(0,r(70805).A)("length");RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var Yn="\\ud800-\\udfff",zn="["+Yn+"]",$n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Jn="\\ud83c[\\udffb-\\udfff]",Wn="[^"+Yn+"]",Zn="(?:\\ud83c[\\udde6-\\uddff]){2}",Hn="[\\ud800-\\udbff][\\udc00-\\udfff]",Kn="(?:"+$n+"|"+Jn+")"+"?",Qn="[\\ufe0e\\ufe0f]?",Xn=Qn+Kn+("(?:\\u200d(?:"+[Wn,Zn,Hn].join("|")+")"+Qn+Kn+")*"),er="(?:"+[Wn+$n+"?",$n,Zn,Hn,zn].join("|")+")";RegExp(Jn+"(?="+Jn+")|"+er+Xn,"g");function nr(){}function rr(e,n,r){g.A(n)||(n=[n]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],u={};return t.A(n,function(n){if(!e.hasNode(n))throw new Error("Graph does not have node: "+n);tr(e,n,"post"===r,u,o,i)}),i}function tr(e,n,r,o,i,u){Object.prototype.hasOwnProperty.call(o,n)||(o[n]=!0,r||u.push(n),t.A(i(n),function(n){tr(e,n,r,o,i,u)}),r&&u.push(n))}nr.prototype=new Error;r(23126);function or(e){e=function(e){var n=(new F.T).setGraph(e.graph());return t.A(e.nodes(),function(r){n.setNode(r,e.node(r))}),t.A(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},o=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+o.weight,minlen:Math.max(t.minlen,o.minlen)})}),n}(e),Pn(e);var n,r=Mn(e);for(ar(r),ir(r,e);n=fr(r);)sr(r,e,n,dr(r,e,n))}function ir(e,n){var r=function(e,n){return rr(e,n,"post")}(e,e.nodes());r=r.slice(0,r.length-1),t.A(r,function(r){!function(e,n,r){var t=e.node(r),o=t.parent;e.edge(r,o).cutvalue=ur(e,n,r)}(e,n,r)})}function ur(e,n,r){var o=e.node(r).parent,i=!0,u=n.edge(r,o),a=0;return u||(i=!1,u=n.edge(o,r)),a=u.weight,t.A(n.nodeEdges(r),function(t){var u,c,f=t.v===r,d=f?t.w:t.v;if(d!==o){var s=f===i,v=n.edge(t).weight;if(a+=s?v:-v,u=r,c=d,e.hasEdge(u,c)){var h=e.edge(r,d).cutvalue;a+=s?-h:h}}}),a}function ar(e,n){arguments.length<2&&(n=e.nodes()[0]),cr(e,{},1,n)}function cr(e,n,r,o,i){var u=r,a=e.node(o);return n[o]=!0,t.A(e.neighbors(o),function(t){Object.prototype.hasOwnProperty.call(n,t)||(r=cr(e,n,r,t,o))}),a.low=u,a.lim=r++,i?a.parent=i:delete a.parent,r}function fr(e){return Un(e.edges(),function(n){return e.edge(n).cutvalue<0})}function dr(e,n,r){var t=r.v,o=r.w;n.hasEdge(t,o)||(t=r.w,o=r.v);var i=e.node(t),u=e.node(o),a=i,c=!1;i.lim>u.lim&&(a=u,c=!0);var f=qn.A(n.edges(),function(n){return c===vr(e,e.node(n.v),a)&&c!==vr(e,e.node(n.w),a)});return In(f,function(e){return Tn(n,e)})}function sr(e,n,r,o){var i=r.v,u=r.w;e.removeEdge(i,u),e.setEdge(o.v,o.w,{}),ar(e),ir(e,n),function(e,n){var r=Un(e.nodes(),function(e){return!n.node(e).parent}),o=function(e,n){return rr(e,n,"pre")}(e,r);o=o.slice(1),t.A(o,function(r){var t=e.node(r).parent,o=n.edge(r,t),i=!1;o||(o=n.edge(t,r),i=!0),n.node(r).rank=n.node(t).rank+(i?o.minlen:-o.minlen)})}(e,n)}function vr(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function hr(e){switch(e.graph().ranker){case"network-simplex":default:gr(e);break;case"tight-tree":!function(e){Pn(e),Mn(e)}(e);break;case"longest-path":lr(e)}}or.initLowLimValues=ar,or.initCutValues=ir,or.calcCutValue=ur,or.leaveEdge=fr,or.enterEdge=dr,or.exchangeEdges=sr;var lr=Pn;function gr(e){or(e)}var pr=r(38207),Ar=r(89463);function br(e){var n=ln(e,"root",{},"_root"),r=function(e){var n={};function r(o,i){var u=e.children(o);u&&u.length&&t.A(u,function(e){r(e,i+1)}),n[o]=i}return t.A(e.children(),function(e){r(e,1)}),n}(e),o=nn(pr.A(r))-1,i=2*o+1;e.graph().nestingRoot=n,t.A(e.edges(),function(n){e.edge(n).minlen*=i});var u=function(e){return Ar.A(e.edges(),function(n,r){return n+e.edge(r).weight},0)}(e)+1;t.A(e.children(),function(t){wr(e,n,i,u,o,r,t)}),e.graph().nodeRankFactor=i}function wr(e,n,r,o,i,u,a){var c=e.children(a);if(c.length){var f=bn(e,"_bt"),d=bn(e,"_bb"),s=e.node(a);e.setParent(f,a),s.borderTop=f,e.setParent(d,a),s.borderBottom=d,t.A(c,function(t){wr(e,n,r,o,i,u,t);var c=e.node(t),s=c.borderTop?c.borderTop:t,v=c.borderBottom?c.borderBottom:t,h=c.borderTop?o:2*o,l=s!==v?1:i-u[a]+1;e.setEdge(f,s,{weight:h,minlen:l,nestingEdge:!0}),e.setEdge(v,d,{weight:h,minlen:l,nestingEdge:!0})}),e.parent(a)||e.setEdge(n,f,{weight:0,minlen:i+u[a]})}else a!==n&&e.setEdge(n,a,{weight:0,minlen:r})}var yr=r(72641);const mr=function(e,n){return e&&_e(n,(0,Sn.A)(n),e)};const jr=function(e,n){return e&&_e(n,Re(n),e)};var xr=r(14792);const Or=function(e,n){return _e(e,(0,xr.A)(e),n)};var kr=r(76912),Er=r(13153);const Nr=Object.getOwnPropertySymbols?function(e){for(var n=[];e;)(0,kr.A)(n,(0,xr.A)(e)),e=fe(e);return n}:Er.A;const _r=function(e,n){return _e(e,Nr(e),n)};var Ir=r(19042),Pr=r(33831);const Tr=function(e){return(0,Pr.A)(e,Re,Nr)};var Mr=Object.prototype.hasOwnProperty;const Rr=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&Mr.call(e,"index")&&(r.index=e.index,r.input=e.input),r};const Lr=function(e,n){var r=n?oe(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)};var Cr=/\w*$/;const Sr=function(e){var n=new e.constructor(e.source,Cr.exec(e));return n.lastIndex=e.lastIndex,n};var Fr=r(241),Br=Fr.A?Fr.A.prototype:void 0,Vr=Br?Br.valueOf:void 0;const Gr=function(e){return Vr?Object(Vr.call(e)):{}};const Ur=function(e,n,r){var t=e.constructor;switch(n){case"[object ArrayBuffer]":return oe(e);case"[object Boolean]":case"[object Date]":return new t(+e);case"[object DataView]":return Lr(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return ie(e,r);case"[object Map]":case"[object Set]":return new t;case"[object Number]":case"[object String]":return new t(e);case"[object RegExp]":return Sr(e);case"[object Symbol]":return Gr(e)}};const qr=function(e){return(0,Ae.A)(e)&&"[object Map]"==(0,Dn.A)(e)};var Dr=r(52789),Yr=r(64841),zr=Yr.A&&Yr.A.isMap;const $r=zr?(0,Dr.A)(zr):qr;const Jr=function(e){return(0,Ae.A)(e)&&"[object Set]"==(0,Dn.A)(e)};var Wr=Yr.A&&Yr.A.isSet;const Zr=Wr?(0,Dr.A)(Wr):Jr;var Hr="[object Arguments]",Kr="[object Function]",Qr="[object Object]",Xr={};Xr[Hr]=Xr["[object Array]"]=Xr["[object ArrayBuffer]"]=Xr["[object DataView]"]=Xr["[object Boolean]"]=Xr["[object Date]"]=Xr["[object Float32Array]"]=Xr["[object Float64Array]"]=Xr["[object Int8Array]"]=Xr["[object Int16Array]"]=Xr["[object Int32Array]"]=Xr["[object Map]"]=Xr["[object Number]"]=Xr[Qr]=Xr["[object RegExp]"]=Xr["[object Set]"]=Xr["[object String]"]=Xr["[object Symbol]"]=Xr["[object Uint8Array]"]=Xr["[object Uint8ClampedArray]"]=Xr["[object Uint16Array]"]=Xr["[object Uint32Array]"]=!0,Xr["[object Error]"]=Xr[Kr]=Xr["[object WeakMap]"]=!1;const et=function e(n,r,t,o,i,u){var a,c=1&r,f=2&r,d=4&r;if(t&&(a=i?t(n,o,i,u):t(n)),void 0!==a)return a;if(!(0,j.A)(n))return n;var s=(0,g.A)(n);if(s){if(a=Rr(n),!c)return ue(n,a)}else{var v=(0,Dn.A)(n),h=v==Kr||"[object GeneratorFunction]"==v;if((0,le.A)(n))return re(n,c);if(v==Qr||v==Hr||h&&!i){if(a=f||h?{}:se(n),!c)return f?_r(n,jr(a,n)):Or(n,mr(a,n))}else{if(!Xr[v])return i?n:{};a=Ur(n,v,c)}}u||(u=new $.A);var l=u.get(n);if(l)return l;u.set(n,a),Zr(n)?n.forEach(function(o){a.add(e(o,r,t,o,n,u))}):$r(n)&&n.forEach(function(o,i){a.set(i,e(o,r,t,i,n,u))});var p=d?f?Tr:Ir.A:f?Re:Sn.A,A=s?void 0:p(n);return(0,yr.A)(A||n,function(o,i){A&&(o=n[i=o]),Ne(a,i,e(o,r,t,i,n,u))}),a};const nt=function(e){return et(e,5)};function rt(e,n,r){var o=function(e){var n;for(;e.hasNode(n=u("_root")););return n}(e),i=new F.T({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(n){return e.node(n)});return t.A(e.nodes(),function(u){var a=e.node(u),c=e.parent(u);(a.rank===n||a.minRank<=n&&n<=a.maxRank)&&(i.setNode(u),i.setParent(u,c||o),t.A(e[r](u),function(n){var r=n.v===u?n.w:n.v,t=i.edge(r,u),o=un.A(t)?0:t.weight;i.setEdge(r,u,{weight:e.edge(n).weight+o})}),Object.prototype.hasOwnProperty.call(a,"minRank")&&i.setNode(u,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]}))}),i}const tt=function(e,n,r){for(var t=-1,o=e.length,i=n.length,u={};++tn||i&&u&&c&&!a&&!f||t&&u&&c||!r&&c||!o)return 1;if(!t&&!i&&!f&&e=a?c:c*("desc"==r[t]?-1:1)}return e.index-n.index};const ct=function(e,n,r){n=n.length?(0,d.A)(n,function(e){return(0,g.A)(e)?function(n){return(0,Ve.A)(n,1===e.length?e[0]:e)}:e}):[en.A];var t=-1;n=(0,d.A)(n,(0,Dr.A)(s.A));var o=l(e,function(e,r,o){return{criteria:(0,d.A)(n,function(n){return n(e)}),index:++t,value:e}});return it(o,function(e,n){return at(e,n,r)})};const ft=(0,Fe.A)(function(e,n){if(null==e)return[];var r=n.length;return r>1&&x(e,n[0],n[1])?n=[]:r>2&&x(n[0],n[1],n[2])&&(n=[n[0]]),ct(e,(0,c.A)(n,1),[])});function dt(e,n){for(var r=0,t=1;t0;)n%2&&(r+=c[n+1]),c[n=n-1>>1]+=e.weight;d+=e.weight*r})),d}function vt(e,n){var r={};return t.A(e,function(e,n){var t=r[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:n};un.A(e.barycenter)||(t.barycenter=e.barycenter,t.weight=e.weight)}),t.A(n.edges(),function(e){var n=r[e.v],t=r[e.w];un.A(n)||un.A(t)||(t.indegree++,n.out.push(r[e.w]))}),function(e){var n=[];function r(e){return function(n){n.merged||(un.A(n.barycenter)||un.A(e.barycenter)||n.barycenter>=e.barycenter)&&function(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight);n.weight&&(r+=n.barycenter*n.weight,t+=n.weight);e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}(e,n)}}function o(n){return function(r){r.in.push(n),0===--r.indegree&&e.push(r)}}for(;e.length;){var i=e.pop();n.push(i),t.A(i.in.reverse(),r(i)),t.A(i.out,o(i))}return p(qn.A(n,function(e){return!e.merged}),function(e){return We(e,["vs","i","barycenter","weight"])})}(qn.A(r,function(e){return!e.indegree}))}function ht(e,n){var r,o=function(e,n){var r={lhs:[],rhs:[]};return t.A(e,function(e){n(e)?r.lhs.push(e):r.rhs.push(e)}),r}(e,function(e){return Object.prototype.hasOwnProperty.call(e,"barycenter")}),i=o.lhs,u=ft(o.rhs,function(e){return-e.i}),a=[],c=0,d=0,s=0;i.sort((r=!!n,function(e,n){return e.barycentern.barycenter?1:r?n.i-e.i:e.i-n.i})),s=lt(a,u,s),t.A(i,function(e){s+=e.vs.length,a.push(e.vs),c+=e.barycenter*e.weight,d+=e.weight,s=lt(a,u,s)});var v={vs:f(a)};return d&&(v.barycenter=c/d,v.weight=d),v}function lt(e,n,r){for(var t;n.length&&(t=rn(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function gt(e,n,r,o){var i=e.children(n),u=e.node(n),a=u?u.borderLeft:void 0,c=u?u.borderRight:void 0,d={};a&&(i=qn.A(i,function(e){return e!==a&&e!==c}));var s=function(e,n){return p(n,function(n){var r=e.inEdges(n);if(r.length){var t=Ar.A(r,function(n,r){var t=e.edge(r),o=e.node(r.v);return{sum:n.sum+t.weight*o.order,weight:n.weight+t.weight}},{sum:0,weight:0});return{v:n,barycenter:t.sum/t.weight,weight:t.weight}}return{v:n}})}(e,i);t.A(s,function(n){if(e.children(n.v).length){var t=gt(e,n.v,r,o);d[n.v]=t,Object.prototype.hasOwnProperty.call(t,"barycenter")&&(i=n,u=t,un.A(i.barycenter)?(i.barycenter=u.barycenter,i.weight=u.weight):(i.barycenter=(i.barycenter*i.weight+u.barycenter*u.weight)/(i.weight+u.weight),i.weight+=u.weight))}var i,u});var v=vt(s,r);!function(e,n){t.A(e,function(e){e.vs=f(e.vs.map(function(e){return n[e]?n[e].vs:e}))})}(v,d);var h=ht(v,o);if(a&&(h.vs=f([a,h.vs,c]),e.predecessors(a).length)){var l=e.node(e.predecessors(a)[0]),g=e.node(e.predecessors(c)[0]);Object.prototype.hasOwnProperty.call(h,"barycenter")||(h.barycenter=0,h.weight=0),h.barycenter=(h.barycenter*h.weight+l.order+g.order)/(h.weight+2),h.weight+=2}return h}function pt(e){var n=wn(e),r=At(e,S(1,n+1),"inEdges"),o=At(e,S(n-1,-1,-1),"outEdges"),i=function(e){var n={},r=qn.A(e.nodes(),function(n){return!e.children(n).length}),o=nn(p(r,function(n){return e.node(n).rank})),i=p(S(o+1),function(){return[]}),u=ft(r,function(n){return e.node(n).rank});return t.A(u,function r(o){if(!vn(n,o)){n[o]=!0;var u=e.node(o);i[u.rank].push(o),t.A(e.successors(o),r)}}),i}(e);wt(e,i);for(var u,a=Number.POSITIVE_INFINITY,c=0,f=0;f<4;++c,++f){bt(c%2?r:o,c%4>=2);var d=dt(e,i=An(e));dc||f>n[o].lim));i=o,o=t;for(;(o=e.parent(o))!==i;)a.push(o);return{path:u.concat(a.reverse()),lca:i}}(e,n,o.v,o.w),u=i.path,a=i.lca,c=0,f=u[c],d=!0;r!==o.w;){if(t=e.node(r),d){for(;(f=u[c])!==a&&e.node(f).maxRankr){var t=n;n=r,r=t}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var o=e[n];Object.defineProperty(o,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Et(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function Nt(e,n,r,o,i){var u={},a=function(e,n,r,o){var i=new F.T,u=e.graph(),a=function(e,n,r){return function(t,o,i){var u,a=t.node(o),c=t.node(i),f=0;if(f+=a.width/2,Object.prototype.hasOwnProperty.call(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":u=-a.width/2;break;case"r":u=a.width/2}if(u&&(f+=r?u:-u),u=0,f+=(a.dummy?n:e)/2,f+=(c.dummy?n:e)/2,f+=c.width/2,Object.prototype.hasOwnProperty.call(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":u=c.width/2;break;case"r":u=-c.width/2}return u&&(f+=r?u:-u),u=0,f}}(u.nodesep,u.edgesep,o);return t.A(n,function(n){var o;t.A(n,function(n){var t=r[n];if(i.setNode(t),o){var u=r[o],c=i.edge(u,t);i.setEdge(u,t,Math.max(a(e,n,o),c||0))}o=n})}),i}(e,n,r,i),c=i?"borderLeft":"borderRight";function f(e,n){for(var r=a.nodes(),t=r.pop(),o={};t;)o[t]?e(t):(o[t]=!0,r.push(t),r=r.concat(n(t))),t=r.pop()}return f(function(e){u[e]=a.inEdges(e).reduce(function(e,n){return Math.max(e,u[n.v]+a.edge(n))},0)},a.predecessors.bind(a)),f(function(n){var r=a.outEdges(n).reduce(function(e,n){return Math.min(e,u[n.w]-a.edge(n))},Number.POSITIVE_INFINITY),t=e.node(n);r!==Number.POSITIVE_INFINITY&&t.borderType!==c&&(u[n]=Math.max(u[n],r))},a.successors.bind(a)),t.A(o,function(e){u[e]=u[r[e]]}),u}function _t(e){var n,r=An(e),o=Be(Ot(e,r),function(e,n){var r={};function o(n,o,i,u,a){var c;t.A(S(o,i),function(o){c=n[o],e.node(c).dummy&&t.A(e.predecessors(c),function(n){var t=e.node(n);t.dummy&&(t.ordera)&&kt(r,n,c)})})}return Ar.A(n,function(n,r){var i,u=-1,a=0;return t.A(r,function(t,c){if("border"===e.node(t).dummy){var f=e.predecessors(t);f.length&&(i=e.node(f[0]).order,o(r,a,c,u,i),a=c,u=i)}o(r,a,r.length,i,n.length)}),r}),r}(e,r)),i={};t.A(["u","d"],function(u){n="u"===u?r:pr.A(r).reverse(),t.A(["l","r"],function(r){"r"===r&&(n=p(n,function(e){return pr.A(e).reverse()}));var a=("u"===u?e.predecessors:e.successors).bind(e),c=function(e,n,r,o){var i={},u={},a={};return t.A(n,function(e){t.A(e,function(e,n){i[e]=e,u[e]=e,a[e]=n})}),t.A(n,function(e){var n=-1;t.A(e,function(e){var t=o(e);if(t.length){t=ft(t,function(e){return a[e]});for(var c=(t.length-1)/2,f=Math.floor(c),d=Math.ceil(c);f<=d;++f){var s=t[f];u[e]===e&&n{var n=r(" buildLayoutGraph",()=>function(e){var n=new F.T({multigraph:!0,compound:!0}),r=Gt(e.graph());return n.setGraph(Be({},Mt,Vt(r,Tt),We(r,Rt))),t.A(e.nodes(),function(r){var t=Gt(e.node(r));n.setNode(r,Ke(Vt(t,Lt),Ct)),n.setParent(r,e.parent(r))}),t.A(e.edges(),function(r){var t=Gt(e.edge(r));n.setEdge(r,Be({},Ft,Vt(t,St),We(t,Bt)))}),n}(e));r(" runLayout",()=>function(e,n){n(" makeSpaceForEdgeLabels",()=>function(e){var n=e.graph();n.ranksep/=2,t.A(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,"c"!==t.labelpos.toLowerCase()&&("TB"===n.rankdir||"BT"===n.rankdir?t.width+=t.labeloffset:t.height+=t.labeloffset)})}(e)),n(" removeSelfEdges",()=>function(e){t.A(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}(e)),n(" acyclic",()=>z(e)),n(" nestingGraph.run",()=>br(e)),n(" rank",()=>hr(gn(e))),n(" injectEdgeLabelProxies",()=>function(e){t.A(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),o={rank:(e.node(n.w).rank-t.rank)/2+t.rank,e:n};ln(e,"edge-proxy",o,"_ep")}})}(e)),n(" removeEmptyRanks",()=>function(e){var n=cn(p(e.nodes(),function(n){return e.node(n).rank})),r=[];t.A(e.nodes(),function(t){var o=e.node(t).rank-n;r[o]||(r[o]=[]),r[o].push(t)});var o=0,i=e.graph().nodeRankFactor;t.A(r,function(n,r){un.A(n)&&r%i!==0?--o:o&&t.A(n,function(n){e.node(n).rank+=o})})}(e)),n(" nestingGraph.cleanup",()=>function(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,t.A(e.edges(),function(n){e.edge(n).nestingEdge&&e.removeEdge(n)})}(e)),n(" normalizeRanks",()=>function(e){var n=cn(p(e.nodes(),function(n){return e.node(n).rank}));t.A(e.nodes(),function(r){var t=e.node(r);vn(t,"rank")&&(t.rank-=n)})}(e)),n(" assignRankMinMax",()=>function(e){var n=0;t.A(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=nn(n,t.maxRank))}),e.graph().maxRank=n}(e)),n(" removeEdgeLabelProxies",()=>function(e){t.A(e.nodes(),function(n){var r=e.node(n);"edge-proxy"===r.dummy&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}(e)),n(" normalize.run",()=>_n(e)),n(" parentDummyChains",()=>yt(e)),n(" addBorderSegments",()=>function(e){t.A(e.children(),function n(r){var o=e.children(r),i=e.node(r);if(o.length&&t.A(o,n),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var u=i.minRank,a=i.maxRank+1;upt(e)),n(" insertSelfEdges",()=>function(e){var n=An(e);t.A(n,function(n){var r=0;t.A(n,function(n,o){var i=e.node(n);i.order=o+r,t.A(i.selfEdges,function(n){ln(e,"selfedge",{width:n.label.width,height:n.label.height,rank:i.rank,order:o+ ++r,e:n.e,label:n.label},"_se")}),delete i.selfEdges})})}(e)),n(" adjustCoordinateSystem",()=>function(e){var n=e.graph().rankdir.toLowerCase();"lr"!==n&&"rl"!==n||On(e)}(e)),n(" position",()=>It(e)),n(" positionSelfEdges",()=>function(e){t.A(e.nodes(),function(n){var r=e.node(n);if("selfedge"===r.dummy){var t=e.node(r.e.v),o=t.x+t.width/2,i=t.y,u=r.x-o,a=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:o+2*u/3,y:i-a},{x:o+5*u/6,y:i-a},{x:o+u,y:i},{x:o+5*u/6,y:i+a},{x:o+2*u/3,y:i+a}],r.label.x=r.x,r.label.y=r.y}})}(e)),n(" removeBorderNodes",()=>function(e){t.A(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),o=e.node(r.borderBottom),i=e.node(rn(r.borderLeft)),u=e.node(rn(r.borderRight));r.width=Math.abs(u.x-i.x),r.height=Math.abs(o.y-t.y),r.x=i.x+r.width/2,r.y=t.y+r.height/2}}),t.A(e.nodes(),function(n){"border"===e.node(n).dummy&&e.removeNode(n)})}(e)),n(" normalize.undo",()=>function(e){t.A(e.graph().dummyChains,function(n){var r,t=e.node(n),o=t.edgeLabel;for(e.setEdge(t.edgeObj,o);t.dummy;)r=e.successors(n)[0],e.removeNode(n),o.points.push({x:t.x,y:t.y}),"edge-label"===t.dummy&&(o.x=t.x,o.y=t.y,o.width=t.width,o.height=t.height),n=r,t=e.node(n)})}(e)),n(" fixupEdgeLabelCoords",()=>function(e){t.A(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch("l"!==r.labelpos&&"r"!==r.labelpos||(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}})}(e)),n(" undoCoordinateSystem",()=>xn(e)),n(" translateGraph",()=>function(e){var n=Number.POSITIVE_INFINITY,r=0,o=Number.POSITIVE_INFINITY,i=0,u=e.graph(),a=u.marginx||0,c=u.marginy||0;function f(e){var t=e.x,u=e.y,a=e.width,c=e.height;n=Math.min(n,t-a/2),r=Math.max(r,t+a/2),o=Math.min(o,u-c/2),i=Math.max(i,u+c/2)}t.A(e.nodes(),function(n){f(e.node(n))}),t.A(e.edges(),function(n){var r=e.edge(n);Object.prototype.hasOwnProperty.call(r,"x")&&f(r)}),n-=a,o-=c,t.A(e.nodes(),function(r){var t=e.node(r);t.x-=n,t.y-=o}),t.A(e.edges(),function(r){var i=e.edge(r);t.A(i.points,function(e){e.x-=n,e.y-=o}),Object.prototype.hasOwnProperty.call(i,"x")&&(i.x-=n),Object.prototype.hasOwnProperty.call(i,"y")&&(i.y-=o)}),u.width=r-n+a,u.height=i-o+c}(e)),n(" assignNodeIntersects",()=>function(e){t.A(e.edges(),function(n){var r,t,o=e.edge(n),i=e.node(n.v),u=e.node(n.w);o.points?(r=o.points[0],t=o.points[o.points.length-1]):(o.points=[],r=u,t=i),o.points.unshift(pn(i,r)),o.points.push(pn(u,t))})}(e)),n(" reversePoints",()=>function(e){t.A(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}(e)),n(" acyclic.undo",()=>function(e){t.A(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}(e))}(n,r)),r(" updateInputGraph",()=>function(e,n){t.A(e.nodes(),function(r){var t=e.node(r),o=n.node(r);t&&(t.x=o.x,t.y=o.y,n.children(r).length&&(t.width=o.width,t.height=o.height))}),t.A(e.edges(),function(r){var t=e.edge(r),o=n.edge(r);t.points=o.points,Object.prototype.hasOwnProperty.call(o,"x")&&(t.x=o.x,t.y=o.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}(e,n))})}var Tt=["nodesep","edgesep","ranksep","marginx","marginy"],Mt={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Rt=["acyclicer","ranker","rankdir","align"],Lt=["width","height"],Ct={width:0,height:0},St=["minlen","weight","width","height","labeloffset"],Ft={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Bt=["labelpos"];function Vt(e,n){return on(We(e,n),Number)}function Gt(e){var n={};return t.A(e,function(e,r){n[r.toLowerCase()]=e}),n}}}]); \ No newline at end of file diff --git a/assets/js/3aa86a4e.7c0ae2cd.js b/assets/js/3aa86a4e.7c0ae2cd.js new file mode 100644 index 000000000..191ddfa9e --- /dev/null +++ b/assets/js/3aa86a4e.7c0ae2cd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[9346],{69629(e,t,s){s.r(t),s.d(t,{assets:()=>o,contentTitle:()=>i,default:()=>x,frontMatter:()=>a,metadata:()=>r,toc:()=>h});const r=JSON.parse('{"id":"references/smart-contracts","title":"Smart Contracts","description":"Reference documentation for Swarm smart contracts including addresses and ABIs.","source":"@site/docs/references/smart-contracts.mdx","sourceDirName":"references","slug":"/references/smart-contracts","permalink":"/docs/references/smart-contracts","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/references/smart-contracts.mdx","tags":[],"version":"current","frontMatter":{"title":"Smart Contracts","id":"smart-contracts","description":"Reference documentation for Swarm smart contracts including addresses and ABIs."},"sidebar":"References","next":{"title":"Tokens","permalink":"/docs/references/tokens"}}');var n=s(74848),c=s(28453),d=s(47650);const a={title:"Smart Contracts",id:"smart-contracts",description:"Reference documentation for Swarm smart contracts including addresses and ABIs."},i=void 0,o={},h=[{value:"Token Contracts",id:"token-contracts",level:2},{value:"Storage Incentives Contracts",id:"storage-incentives-contracts",level:2}];function l(e){const t={a:"a",code:"code",h2:"h2",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,c.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h2,{id:"token-contracts",children:"Token Contracts"}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Contract"}),(0,n.jsx)(t.th,{children:"Blockchain"}),(0,n.jsx)(t.th,{children:"Address"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"BZZ token"}),(0,n.jsx)(t.td,{children:"Ethereum"}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.a,{href:"https://ethplorer.io/address/0x19062190b1925b5b6689d7073fdfc8c2976ef8cb",children:(0,n.jsx)(t.code,{children:"0x19062190b1925b5b6689d7073fdfc8c2976ef8cb"})})})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"xBZZ token"}),(0,n.jsx)(t.td,{children:"Gnosis Chain"}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.a,{href:"https://gnosisscan.io/token/0xdbf3ea6f5bee45c02255b2c26a16f300502f68da",children:(0,n.jsx)(t.code,{children:"0xdBF3Ea6F5beE45c02255B2c26a16F300502F68da"})})})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"sBZZ token"}),(0,n.jsx)(t.td,{children:"Sepolia (Ethereum testnet)"}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.a,{href:"https://sepolia.etherscan.io/address/0x543dDb01Ba47acB11de34891cD86B675F04840db",children:(0,n.jsx)(t.code,{children:"0x543dDb01Ba47acB11de34891cD86B675F04840db"})})})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"storage-incentives-contracts",children:"Storage Incentives Contracts"}),"\n",(0,n.jsxs)(t.p,{children:["You can find the Solidity source code for each contract in the ",(0,n.jsx)(t.a,{href:"https://github.com/ethersphere/storage-incentives",children:"storage incentives Github repo"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["For a list of the current smart contract addresses, see the ",(0,n.jsx)(t.a,{href:"https://github.com/ethersphere/go-storage-incentives-abi",children:"storage incentives ABI repo"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["For a history of smart contract addresses, see the ",(0,n.jsx)(t.a,{href:"https://github.com/ethersphere/go-storage-incentives-abi/commits/master/abi/abi_mainnet.go",children:"storage incentives ABI repo history"}),"."]}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Contract"}),(0,n.jsx)(t.th,{children:"Blockchain"}),(0,n.jsx)(t.th,{children:"Address"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Postage Stamp"}),(0,n.jsx)(t.td,{children:"Gnosis Chain"}),(0,n.jsx)(t.td,{children:(0,n.jsx)("a",{href:`https://gnosisscan.io/address/${d.v.postageStampContract}#code`,target:"_blank",children:d.v.postageStampContract})})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Staking"}),(0,n.jsx)(t.td,{children:"Gnosis Chain"}),(0,n.jsx)(t.td,{children:(0,n.jsx)("a",{href:`https://gnosisscan.io/address/${d.v.stakingContract}#code`,target:"_blank",children:d.v.stakingContract})})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Redistribution"}),(0,n.jsx)(t.td,{children:"Gnosis Chain"}),(0,n.jsx)(t.td,{children:(0,n.jsx)("a",{href:`https://gnosisscan.io/address/${d.v.redistributionContract}#code`,target:"_blank",children:d.v.redistributionContract})})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Price Oracle"}),(0,n.jsx)(t.td,{children:"Gnosis Chain"}),(0,n.jsx)(t.td,{children:(0,n.jsx)("a",{href:`https://gnosisscan.io/address/${d.v.priceOracleContract}#code`,target:"_blank",children:d.v.priceOracleContract})})]})]})]})]})}function x(e={}){const{wrapper:t}={...(0,c.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(l,{...e})}):l(e)}},47650(e,t,s){s.d(t,{v:()=>r});const r={postageStampContract:"0x45a1502382541Cd610CC9068e88727426b696293",stakingContract:"0xda2a16EE889E7F04980A8d597b48c8D51B9518F4",redistributionContract:"0x5069cdfB3D9E56d23B1cAeE83CE6109A7E4fd62d",priceOracleContract:"0x47EeF336e7fE5bED98499A4696bce8f28c1B0a8b"}},28453(e,t,s){s.d(t,{R:()=>d,x:()=>a});var r=s(96540);const n={},c=r.createContext(n);function d(e){const t=r.useContext(c);return r.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:d(e.components),r.createElement(c.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3c3a6abf.be63da9a.js b/assets/js/3c3a6abf.be63da9a.js new file mode 100644 index 000000000..1e81b722a --- /dev/null +++ b/assets/js/3c3a6abf.be63da9a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[8846],{51659(e,n,o){o.r(n),o.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>r,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"bee/installation/docker","title":"Docker Install","description":"Provides comprehensive steps for deploying Bee nodes using Docker containers with volume management and network configuration.","source":"@site/docs/bee/installation/docker.md","sourceDirName":"bee/installation","slug":"/bee/installation/docker","permalink":"/docs/bee/installation/docker","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/bee/installation/docker.md","tags":[],"version":"current","frontMatter":{"title":"Docker Install","id":"docker","description":"Provides comprehensive steps for deploying Bee nodes using Docker containers with volume management and network configuration."},"sidebar":"bee","previous":{"title":"Shell Script Install","permalink":"/docs/bee/installation/shell-script-install"},"next":{"title":"Package Manager Install","permalink":"/docs/bee/installation/package-manager-install"}}');var i=o(74848),t=o(28453);const r={title:"Docker Install",id:"docker",description:"Provides comprehensive steps for deploying Bee nodes using Docker containers with volume management and network configuration."},a=void 0,l={},d=[{value:"Node setup process",id:"node-setup-process",level:2},{value:"Start node",id:"start-node",level:3},{value:"Command explained:",id:"command-explained",level:4},{value:"Fund node",id:"fund-node",level:3},{value:"Initialize full node",id:"initialize-full-node",level:3},{value:"Stake node",id:"stake-node",level:3},{value:"Set Target Neighborhood",id:"set-target-neighborhood",level:3},{value:"Logs and monitoring",id:"logs-and-monitoring",level:3},{value:"Back Up Keys",id:"back-up-keys",level:2},{value:"Getting help",id:"getting-help",level:2},{value:"Next Steps to Consider",id:"next-steps-to-consider",level:2},{value:"Access the Swarm",id:"access-the-swarm",level:3},{value:"Explore the API",id:"explore-the-api",level:3},{value:"Run a hive!",id:"run-a-hive",level:3},{value:"Start building DApps on Swarm",id:"start-building-dapps-on-swarm",level:3}];function c(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:["The following is a guide for installing a Bee node using Docker. Docker images for Bee are hosted at ",(0,i.jsx)(n.a,{href:"https://hub.docker.com/r/ethersphere/bee",children:"Docker Hub"}),". Using Docker to operate your Bee node offers many benefits, such as ease of deployment and consistency across environments."]}),"\n",(0,i.jsx)(n.admonition,{type:"caution",children:(0,i.jsxs)(n.p,{children:["In the examples below we specify the exact image version as 2.8.1.\nIt's recommended to only use the exact version number tags.\nMake sure to check that you're on the latest version of Bee by reviewing the tags for Bee on ",(0,i.jsx)(n.a,{href:"https://hub.docker.com/r/ethersphere/bee/tags",children:"Docker Hub"}),", and replace 2.8.1 in the commands below if there is a newer full release."]})}),"\n",(0,i.jsx)(n.admonition,{type:"warning",children:(0,i.jsx)(n.p,{children:"Note that in all the examples below we map the Bee API to 127.0.0.1 (localhost), since we do not want to expose our Bee API endpoint to the public internet, as that would allow anyone to control our node. Make sure you do the same, and it's also recommended to use a firewall to protect access to your node(s)."})}),"\n",(0,i.jsx)(n.admonition,{type:"info",children:(0,i.jsxs)(n.p,{children:["This guide sets options using environment variables as part of the Docker startup commands such as ",(0,i.jsx)(n.code,{children:'-e BEE_API_ADDR=":1633"'}),", however there are ",(0,i.jsx)(n.a,{href:"/docs/bee/working-with-bee/configuration",children:"several other methods available for configuring options"}),"."]})}),"\n",(0,i.jsx)(n.h2,{id:"node-setup-process",children:"Node setup process"}),"\n",(0,i.jsx)(n.p,{children:"This section will guide you through setting up and running a single full Bee node using Docker. In the guide, we use a single line command for running our Bee node, with the Bee config options being set through environment variables, and a single volume hosted for our node's data."}),"\n",(0,i.jsx)(n.h3,{id:"start-node",children:"Start node"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'docker run -d --name bee-1 \\\n --restart always \\\n -p 127.0.0.1:1633:1633 \\\n -p 1634:1634 \\\n -e BEE_API_ADDR=":1633" \\\n -e BEE_FULL_NODE="true" \\\n -e BEE_SWAP_ENABLE="true" \\\n -e BEE_PASSWORD="flummoxedgranitecarrot" \\\n -e BEE_BLOCKCHAIN_RPC_ENDPOINT="https://xdai.fairdatasociety.org" \\\n -v bee-1:/home/bee/.bee \\\n ethersphere/bee:2.8.1 start\n'})}),"\n",(0,i.jsx)(n.p,{children:"Here is the same command in a single line in case you run into issues with the line breaks in the command above:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'docker run -d --name bee-1 --restart always -p 127.0.0.1:1633:1633 -p 1634:1634 -e BEE_API_ADDR=":1633" -e BEE_FULL_NODE="true" -e BEE_SWAP_ENABLE="true" -e BEE_PASSWORD="flummoxedgranitecarrot" -e BEE_BLOCKCHAIN_RPC_ENDPOINT="https://xdai.fairdatasociety.org" -v bee-1:/home/bee/.bee ethersphere/bee:2.8.1 start\n'})}),"\n",(0,i.jsx)(n.h4,{id:"command-explained",children:"Command explained:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"-d"})}),": Runs the container in the background."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"--restart always"})}),": Sets the ",(0,i.jsx)(n.a,{href:"https://docs.docker.com/engine/containers/start-containers-automatically/",children:"restart policy"})," for the container to ",(0,i.jsx)(n.code,{children:"always"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"--name bee-1"})}),": Names the container ",(0,i.jsx)(n.code,{children:"bee-1"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"-p 127.0.0.1:1633:1633"})}),": Exposes the API on port 1633, only accessible locally."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"-p 1634:1634"})}),": Exposes the P2P port 1634 to the public."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:'-e BEE_API_ADDR=":1633"'})}),": Sets the Bee API to use port 1633."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:'-e BEE_FULL_NODE="true"'})}),": Runs as a full node."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:'-e BEE_SWAP_ENABLE="true"'})}),": Enables the SWAP protocol for payments."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:'-e BEE_PASSWORD="flummoxedgranitecarrot"'})}),": Sets the keystore password, make sure to replace with your own."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:'-e BEE_BLOCKCHAIN_RPC_ENDPOINT="https://xdai.fairdatasociety.org"'})}),": Connects to the Gnosis Chain."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"-v bee-1:/home/bee/.bee"})}),": Persists node data in the ",(0,i.jsx)(n.code,{children:"bee-1"})," volume."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"ethersphere/bee:2.8.1 start"})}),": Runs Bee version 2.8.1 and starts the node."]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"This setup runs the Bee node in a container, with full node functionality, SWAP enabled, and connections to the Gnosis blockchain for chequebook and postage stamp management, while persisting its data using a volume."}),"\n",(0,i.jsx)(n.admonition,{type:"info",children:(0,i.jsxs)(n.p,{children:["We have included the password directly in the start command as an environment variable with ",(0,i.jsx)(n.code,{children:'-e BEE_PASSWORD="flummoxedgranitecarrot"'}),". You may wish to use a password file instead, which can be set with the ",(0,i.jsx)(n.code,{children:"BEE_PASSWORD_FILE"})," command. However this will likely require some modifications on your host machine, the details of which will vary from system to system."]})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"docker ps\n"})}),"\n",(0,i.jsx)(n.p,{children:"If everything is set up correctly, you should see your Bee node listed:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\n37f4ad8b4060 ethersphere/bee:2.8.1 "bee start" 6 seconds ago Up 5 seconds 127.0.0.1:1633->1633/tcp, 0.0.0.0:1634->1634/tcp, :::1634->1634/tcp bee-1\n'})}),"\n",(0,i.jsx)(n.p,{children:"And check the logs:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"docker logs -f bee-1\n"})}),"\n",(0,i.jsx)(n.p,{children:"The output should contain a line which prints a message notifying you of the minimum required xDAI for running a node as well as the address of your node. Copy the address and save it for use in the next section."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'"time"="2024-09-24 22:06:51.363708" "level"="warning" "logger"="node/chequebook" "msg"="cannot continue until there is at least min xDAI (for Gas) available on address" "min_amount"="0.0003576874793" "address"="0x91A7e3AC06020750D32CeffbEeFD55B4c5e42bd6"\n'})}),"\n",(0,i.jsxs)(n.p,{children:["You can use ",(0,i.jsx)(n.code,{children:"Ctrl + C"})," to exit the logs."]}),"\n",(0,i.jsx)(n.p,{children:"Before moving on to funding, stop your node:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"docker stop bee-1\n"})}),"\n",(0,i.jsx)(n.p,{children:"And let's confirm that it has stopped:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"docker ps\n"})}),"\n",(0,i.jsx)(n.p,{children:"We can confirm no Docker container processes are currently running."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\n"})}),"\n",(0,i.jsx)(n.h3,{id:"fund-node",children:"Fund node"}),"\n",(0,i.jsx)(n.p,{children:"Check the logs from the previous step. Look for the line which says:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'"time"="2024-09-24 18:15:34.520716" "level"="info" "logger"="node" "msg"="using ethereum address" "address"="0x1A801dd3ec955E905ca424a85C3423599bfb0E66"\n'})}),"\n",(0,i.jsx)(n.p,{children:"That address is your node's address on Gnosis Chain which needs to be funded with xDAI and xBZZ. Copy it and save it for the next step."}),"\n",(0,i.jsxs)(n.p,{children:["xDAI is widely available from many different centralized and decentralized exchanges, just make sure that you are getting xDAI on Gnosis Chain, and not DAI on some other chain. See ",(0,i.jsx)(n.a,{href:"https://www.ethswarm.org/get-bzz",children:"this page"})," for a list of resources for getting xBZZ (again, make certain that you are getting the Gnosis Chain version, and not BZZ on Ethereum)."]}),"\n",(0,i.jsx)(n.p,{children:"After acquiring some xDAI and some xBZZ, send them to the address you copied above."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.em,{children:(0,i.jsx)(n.strong,{children:"How Much to Send?"})})}),"\n",(0,i.jsx)(n.p,{children:"Only a very small amount of xDAI is needed to get started, 0.1 is more than enough."}),"\n",(0,i.jsx)(n.p,{children:"You can start with just 2 or 3 xBZZ for uploading small amounts of data, but you will need at least 10 xBZZ if you plan on staking."}),"\n",(0,i.jsx)(n.h3,{id:"initialize-full-node",children:"Initialize full node"}),"\n",(0,i.jsx)(n.p,{children:"After you have a small amount of xDAI in your node's Gnosis Chain address, you can now restart your node using the same command as before so that it can issue the required smart contract transactions and also sync data."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"docker start bee-1\n"})}),"\n",(0,i.jsx)(n.p,{children:"Let's check the logs to see what's happening:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"docker logs -f bee-1\n"})}),"\n",(0,i.jsx)(n.p,{children:"Your logs should look something like this:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'Welcome to Swarm.... Bzzz Bzzzz Bzzzz\n \\ /\n \\ o ^ o /\n \\ ( ) /\n ____________(%%%%%%%)____________\n ( / / )%%%%%%%( \\ \\ )\n (___/___/__/ \\__\\___\\___)\n ( / /(%%%%%%%)\\ \\ )\n (__/___/ (%%%%%%%) \\___\\__)\n /( )\\\n / (%%%%%) \\\n (%%%)\n !\n\nDISCLAIMER:\nThis software is provided to you "as is", use at your own risk and without warranties of any kind.\nIt is your responsibility to read and understand how Swarm works and the implications of running this software.\nThe usage of Bee involves various risks, including, but not limited to:\ndamage to hardware or loss of funds associated with the Ethereum account connected to your node.\nNo developers or entity involved will be liable for any claims and damages associated with your use,\ninability to use, or your interaction with other nodes or the software.\n\n"time"="2026-07-07 16:52:59.641444" "level"="info" "logger"="node" "msg"="bee version" "version"="2.8.1-7cf53193"\n"time"="2026-07-07 16:52:59.793257" "level"="info" "logger"="node" "msg"="swarm public key"\n"public_key"="02d8d7e1ca6b3b43653ae27e35a375dd74e3ce2f40587fd264bc7268ed918650ab"\n"time"="2026-07-07 16:53:00.087534" "level"="info" "logger"="node" "msg"="pss public key" "public_key"="02aaae4ede42f47f48aa5182df4b94039ca71254f44ebc5383d5a67f71fe7e6156"\n"time"="2024-09-24 22:21:04.686464" "level"="info" "logger"="node" "msg"="using ethereum address" "address"="0x8288F1c8e3dE7c3bf42Ae67fa840EC61481D085e"\n"time"="2024-09-24 22:21:04.700711" "level"="info" "logger"="node" "msg"="using overlay address" "address"="22dc155fe072e131449ec7ea2f77de16f4735f06257ebaa5daf2fdcf14267fd9"\n"time"="2024-09-24 22:21:04.700741" "level"="info" "logger"="node" "msg"="starting with an enabled chain backend"\n"time"="2024-09-24 22:21:05.298019" "level"="info" "logger"="node" "msg"="connected to blockchain backend" "version"="Nethermind/v1.28.0+9c4816c2/linux-x64/dotnet8.0.8"\n"time"="2024-09-24 22:21:05.485287" "level"="info" "logger"="node" "msg"="using chain with network network" "chain_id"=100 "network_id"=1\n"time"="2024-09-24 22:21:05.498845" "level"="info" "logger"="node" "msg"="starting debug & api server" "address"="[::]:1633"\n"time"="2024-09-24 22:21:05.871498" "level"="info" "logger"="node" "msg"="using default factory address" "chain_id"=100 "factory_address"="0xC2d5A532cf69AA9A1378737D8ccDEF884B6E7420"\n"time"="2024-09-24 22:21:06.059179" "level"="info" "logger"="node/chequebook" "msg"="no chequebook found, deploying new one."\n"time"="2024-09-24 22:21:07.386747" "level"="info" "logger"="node/chequebook" "msg"="deploying new chequebook" "tx"="0x375ca5a5e0510f8ab307e783cf316dc6bf698c15902a080ade3c1ea0c6059510"\n"time"="2024-09-24 22:21:19.101428" "level"="info" "logger"="node/transaction" "msg"="pending transaction confirmed" "sender_address"="0x8288F1c8e3dE7c3bf42Ae67fa840EC61481D085e" "tx"="0x375ca5a5e0510f8ab307e783cf316dc6bf698c15902a080ade3c1ea0c6059510"\n"time"="2024-09-24 22:21:19.101450" "level"="info" "logger"="node/chequebook" "msg"="chequebook deployed" "chequebook_address"="0x66127e4393956F11947e9f54599787f9E455173d"\n"time"="2024-09-24 22:21:19.506515" "level"="info" "logger"="node" "msg"="using datadir" "path"="/home/bee/.bee"\n"time"="2024-09-24 22:21:19.518258" "level"="info" "logger"="migration-RefCountSizeInc" "msg"="starting migration of replacing chunkstore items to increase refCnt capacity"\n"time"="2024-09-24 22:21:19.518283" "level"="info" "logger"="migration-RefCountSizeInc" "msg"="migration complete"\n"time"="2024-09-24 22:21:19.566160" "level"="info" "logger"="node" "msg"="starting reserve repair tool, do not interrupt or kill the process..."\n"time"="2024-09-24 22:21:19.566232" "level"="info" "logger"="node" "msg"="removed all bin index entries"\n"time"="2024-09-24 22:21:19.566239" "level"="info" "logger"="node" "msg"="removed all chunk bin items" "total_entries"=0\n"time"="2024-09-24 22:21:19.566243" "level"="info" "logger"="node" "msg"="counted all batch radius entries" "total_entries"=0\n"time"="2024-09-24 22:21:19.566247" "level"="info" "logger"="node" "msg"="parallel workers" "count"=20\n"time"="2024-09-24 22:21:19.566271" "level"="info" "logger"="node" "msg"="migrated all chunk entries" "new_size"=0 "missing_chunks"=0 "invalid_sharky_chunks"=0\n"time"="2024-09-24 22:21:19.566294" "level"="info" "logger"="migration-step-04" "msg"="starting sharky recovery"\n"time"="2024-09-24 22:21:19.664643" "level"="info" "logger"="migration-step-04" "msg"="finished sharky recovery"\n"time"="2024-09-24 22:21:19.664728" "level"="info" "logger"="migration-step-05" "msg"="start removing upload items"\n"time"="2024-09-24 22:21:19.664771" "level"="info" "logger"="migration-step-05" "msg"="finished removing upload items"\n"time"="2024-09-24 22:21:19.664786" "level"="info" "logger"="migration-step-06" "msg"="start adding stampHash to BatchRadiusItems, ChunkBinItems and StampIndexItems"\n"time"="2024-09-24 22:21:19.664837" "level"="info" "logger"="migration-step-06" "msg"="finished migrating items" "seen"=0 "migrated"=0\n"time"="2024-09-24 22:21:19.664897" "level"="info" "logger"="node" "msg"="waiting to sync postage contract data, this may take a while... more info available in Debug loglevel"\n'})}),"\n",(0,i.jsxs)(n.p,{children:["Your node will take some time to finish ",(0,i.jsx)(n.a,{href:"https://docs.ethswarm.org/docs/develop/tools-and-features/buy-a-stamp-batch/",children:"syncing postage contract data"})," as indicated by the final line:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'"msg"="waiting to sync postage contract data, this may take a while... more info available in Debug loglevel"\n'})}),"\n",(0,i.jsx)(n.p,{children:"You may need to wait 5 - 10 minutes for your node to finish syncing in this step."}),"\n",(0,i.jsx)(n.p,{children:"Eventually you will be able to see when your node finishes syncing, and the logs will indicate your node is starting in full node mode:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'"time"="2024-09-24 22:30:19.154067" "level"="info" "logger"="node" "msg"="starting in full mode"\n"time"="2024-09-24 22:30:19.155320" "level"="info" "logger"="node/multiresolver" "msg"="name resolver: no name resolution service provided"\n"time"="2024-09-24 22:30:19.341032" "level"="info" "logger"="node/storageincentives" "msg"="entered new phase" "phase"="reveal" "round"=237974 "block"=36172090\n"time"="2024-09-24 22:30:33.610825" "level"="info" "logger"="node/kademlia" "msg"="disconnected peer" "peer_address"="6ceb30c7afc11716f866d19b7eeda9836757031ed056b61961e949f6e705b49e"\n'})}),"\n",(0,i.jsxs)(n.p,{children:["Your node will now begin syncing chunks from the network, this process can take several hours. You check your node's progress with the ",(0,i.jsx)(n.code,{children:"/status"})," endpoint:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -s http://localhost:1633/status | jq\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'{\n "overlay": "22dc155fe072e131449ec7ea2f77de16f4735f06257ebaa5daf2fdcf14267fd9",\n "proximity": 256,\n "beeMode": "full",\n "reserveSize": 686217,\n "reserveSizeWithinRadius": 321888,\n "pullsyncRate": 497.8747754074074,\n "storageRadius": 11,\n "connectedPeers": 148,\n "neighborhoodSize": 4,\n "batchCommitment": 74510761984,\n "isReachable": false,\n "lastSyncedBlock": 36172390\n}\n'})}),"\n",(0,i.jsxs)(n.p,{children:["We can see that our node has not yet finished syncing chunks since the ",(0,i.jsx)(n.code,{children:"pullsyncRate"})," is around 497 chunks per second. Once the node is fully synced, this value will go to zero. It can take several hours for syncing to complete, but we do not need to wait until our node is fully synced before staking, so we can move directly to the next step."]}),"\n",(0,i.jsx)(n.h3,{id:"stake-node",children:"Stake node"}),"\n",(0,i.jsx)(n.p,{children:"You can use the following command to stake 10 xBZZ:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -XPOST localhost:1633/stake/100000000000000000\n"})}),"\n",(0,i.jsxs)(n.p,{children:["If the staking transaction is successful a ",(0,i.jsx)(n.code,{children:"txHash"})," will be returned:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'{"txHash":"0x258d64720fe7abade794f14ef3261534ff823ef3e2e0011c431c31aea75c2dd5"}\n'})}),"\n",(0,i.jsxs)(n.p,{children:["We can also confirm that our node has been staked with the ",(0,i.jsx)(n.code,{children:"/stake"})," endpoint:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl localhost:1633/stake\n"})}),"\n",(0,i.jsx)(n.p,{children:"The results will be displayed in PLUR units (1 PLUR is equal to 1e-16 xBZZ). If you have properly staked the minimum 10 xBZZ, you should see the output below:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'{"stakedAmount":"100000000000000000"}\n'})}),"\n",(0,i.jsx)(n.p,{children:"Congratulations! You have now installed your Bee node and successfully connected it to the network as a full staking node. Your node will now be in the process of syncing chunks from the network. Once it is fully synced, your node will finally be eligible for earning staking rewards."}),"\n",(0,i.jsx)(n.h3,{id:"set-target-neighborhood",children:"Set Target Neighborhood"}),"\n",(0,i.jsxs)(n.p,{children:["When installing your Bee node it will automatically be assigned a neighborhood. However, when running a full node with staking there are benefits to periodically updating your node's neighborhood. Learn more about why and how to set your node's target neighborhood ",(0,i.jsx)(n.a,{href:"/docs/bee/installation/set-target-neighborhood",children:"here"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"logs-and-monitoring",children:"Logs and monitoring"}),"\n",(0,i.jsxs)(n.p,{children:["Docker provides convenient built-in tools for logging and monitoring your node, which you've already encountered if you've read through earlier sections of this guide. For a more detailed guide, ",(0,i.jsx)(n.a,{href:"/docs/bee/working-with-bee/logs-and-files",children:"refer to the section on logging"}),"."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Viewing node logs:"})}),"\n",(0,i.jsx)(n.p,{children:"To monitor your node\u2019s logs in real-time, use the following command:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"docker logs -f bee-1\n"})}),"\n",(0,i.jsxs)(n.p,{children:["This command will continuously output the logs of your Bee node, helping you track its operations. The ",(0,i.jsx)(n.code,{children:"-f"})," flag ensures that you see new log entries as they are written. Press ",(0,i.jsx)(n.code,{children:"Ctrl + C"})," to stop following the logs."]}),"\n",(0,i.jsxs)(n.p,{children:["You can read more about how Docker manages container logs ",(0,i.jsx)(n.a,{href:"https://docs.docker.com/reference/cli/docker/container/logs/",children:"in their official docs"}),"."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Checking the Node's status with the Bee API"})}),"\n",(0,i.jsxs)(n.p,{children:["To check your node's status as a staking node, we can use the ",(0,i.jsx)(n.code,{children:"/redistributionstate"})," endpoint:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -s http://localhost:1633/redistributionstate | jq\n"})}),"\n",(0,i.jsx)(n.p,{children:"Below is the output for a node which has been running for several days:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'{\n "minimumGasFunds": "11080889201250000",\n "hasSufficientFunds": true,\n "isFrozen": false,\n "isFullySynced": true,\n "phase": "claim",\n "round": 212859,\n "lastWonRound": 207391,\n "lastPlayedRound": 210941,\n "lastFrozenRound": 210942,\n "lastSelectedRound": 212553,\n "lastSampleDuration": 491687776653,\n "block": 32354719,\n "reward": "1804537795127017472",\n "fees": "592679945236926714",\n "isHealthy": true\n}\n'})}),"\n",(0,i.jsxs)(n.p,{children:["For a complete breakdown of this output, check out ",(0,i.jsx)(n.a,{href:"https://docs.ethswarm.org/docs/bee/working-with-bee/bee-api#redistributionstate",children:"this section in the Bee docs"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["You can read more other important endpoints for monitoring your Bee node in the ",(0,i.jsx)(n.a,{href:"https://docs.ethswarm.org/docs/bee/working-with-bee/bee-api",children:"official Bee docs"}),", and you can find complete information about all available endpoints in ",(0,i.jsx)(n.a,{href:"https://docs.ethswarm.org/api/",children:"the API reference docs"}),"."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Stopping Your Node"})}),"\n",(0,i.jsx)(n.p,{children:"To gracefully stop your Bee node, use the following command:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"docker stop bee-1\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Replace ",(0,i.jsx)(n.code,{children:"bee-1"})," with the name of your node if you've given it a different name."]}),"\n",(0,i.jsx)(n.h2,{id:"back-up-keys",children:"Back Up Keys"}),"\n",(0,i.jsxs)(n.p,{children:["Once your node is up and running, make sure to ",(0,i.jsx)(n.a,{href:"/docs/bee/working-with-bee/backups",children:"back up your keys"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"getting-help",children:"Getting help"}),"\n",(0,i.jsxs)(n.p,{children:["The CLI has documentation built-in. Running ",(0,i.jsx)(n.code,{children:"bee"})," gives you an entry point to the documentation. Running ",(0,i.jsx)(n.code,{children:"bee start -h"})," from within your Docker container or ",(0,i.jsx)(n.code,{children:"bee start --help"})," will tell you how you can configure your Bee node via the command line arguments."]}),"\n",(0,i.jsxs)(n.p,{children:["You may also check out the ",(0,i.jsx)(n.a,{href:"/docs/bee/working-with-bee/configuration",children:"configuration guide"}),", or simply run your Bee terminal command with the ",(0,i.jsx)(n.code,{children:"--help"})," flag, eg. ",(0,i.jsx)(n.code,{children:"bee start --help"})," or ",(0,i.jsx)(n.code,{children:"bee --help"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"next-steps-to-consider",children:"Next Steps to Consider"}),"\n",(0,i.jsx)(n.h3,{id:"access-the-swarm",children:"Access the Swarm"}),"\n",(0,i.jsxs)(n.p,{children:["If you'd like to start uploading or downloading files to Swarm, ",(0,i.jsx)(n.a,{href:"/docs/develop/introduction",children:"start here"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"explore-the-api",children:"Explore the API"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.a,{href:"/docs/bee/working-with-bee/bee-api",children:"Bee API"})," is the primary method for interacting with Bee and getting information about Bee. After installing Bee and getting it up and running, it's a good idea to start getting familiar with the API."]}),"\n",(0,i.jsx)(n.h3,{id:"run-a-hive",children:"Run a hive!"}),"\n",(0,i.jsxs)(n.p,{children:["If you would like to run a hive of many Bees, check out the ",(0,i.jsx)(n.a,{href:"/docs/bee/installation/hive",children:"hive operators"})," section for information on how to operate and monitor many Bees at once."]}),"\n",(0,i.jsx)(n.h3,{id:"start-building-dapps-on-swarm",children:"Start building DApps on Swarm"}),"\n",(0,i.jsxs)(n.p,{children:["If you would like to start building decentralised applications on Swarm, check out our section for ",(0,i.jsx)(n.a,{href:"/docs/develop/introduction",children:"developing with Bee"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},28453(e,n,o){o.d(n,{R:()=>r,x:()=>a});var s=o(96540);const i={},t=s.createContext(i);function r(e){const n=s.useContext(t);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4061.82da8b87.js b/assets/js/4061.82da8b87.js new file mode 100644 index 000000000..5e32843ca --- /dev/null +++ b/assets/js/4061.82da8b87.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[4061],{34061(t,i,e){e.d(i,{diagram:()=>nt});var s=e(5637),a=e(72379),n=(e(58962),e(16459)),h=e(76385),o=e(31293),r=e(86827),l=e(70451),c=function(){var t=(0,r.K)(function(t,i,e,s){for(e=e||{},s=t.length;s--;e[t[s]]=i);return e},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],a=[1,5],n=[1,6],h=[1,7],o=[1,5,10,12,14,16,18,19,21,23,36,37,38],l=[1,25],c=[1,26],g=[1,28],u=[1,29],x=[1,30],d=[1,31],p=[1,32],f=[1,33],m=[1,34],y=[1,35],b=[1,36],w=[1,37],S=[1,43],A=[1,42],C=[1,47],k=[1,50],R=[1,10,12,14,16,18,19,21,23,36,37,38],_=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],T=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],D=[1,65],L=[26,28],P={trace:(0,r.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:(0,r.K)(function(t,i,e,s,a,n,h){var o=n.length-1;switch(a){case 5:s.setOrientation(n[o]);break;case 9:s.setDiagramTitle(n[o].text.trim());break;case 12:s.setLineData({text:"",type:"text"},n[o]);break;case 13:s.setLineData(n[o-1],n[o]);break;case 14:s.setBarData({text:"",type:"text"},n[o]);break;case 15:s.setBarData(n[o-1],n[o]);break;case 16:this.$=n[o].trim(),s.setAccTitle(this.$);break;case 17:case 18:this.$=n[o].trim(),s.setAccDescription(this.$);break;case 19:case 29:this.$=n[o-1];break;case 20:case 30:this.$=[n[o-2],...n[o]];break;case 21:case 31:this.$=[n[o]];break;case 22:this.$={value:Number(n[o-1]),label:n[o]};break;case 23:this.$={value:Number(n[o]),label:""};break;case 24:s.setXAxisTitle(n[o]);break;case 25:s.setXAxisTitle(n[o-1]);break;case 26:s.setXAxisTitle({type:"text",text:""});break;case 27:s.setXAxisBand(n[o]);break;case 28:s.setXAxisRangeData(Number(n[o-2]),Number(n[o]));break;case 32:s.setYAxisTitle(n[o]);break;case 33:s.setYAxisTitle(n[o-1]);break;case 34:s.setYAxisTitle({type:"text",text:""});break;case 35:s.setYAxisRangeData(Number(n[o-2]),Number(n[o]));break;case 39:case 40:this.$={text:n[o],type:"text"};break;case 41:this.$={text:n[o],type:"markdown"};break;case 42:this.$=n[o];break;case 43:this.$=n[o-1]+""+n[o]}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,36:a,37:n,38:h}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,36:a,37:n,38:h}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:a,37:n,38:h}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(o,[2,36]),t(o,[2,37]),t(o,[2,38]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,36:a,37:n,38:h}),{1:[2,3]},t(o,[2,5]),t(i,[2,7],{4:22,36:a,37:n,38:h}),{11:23,30:l,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w},{11:39,13:38,24:S,29:A,30:l,31:40,32:41,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w},{11:45,15:44,29:C,30:l,35:46,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w},{11:49,17:48,24:k,30:l,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w},{11:52,17:51,24:k,30:l,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w},{20:[1,53]},{22:[1,54]},t(R,[2,18]),{1:[2,2]},t(R,[2,8]),t(R,[2,9]),t(_,[2,39],{41:55,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w}),t(_,[2,40]),t(_,[2,41]),t(T,[2,42]),t(T,[2,44]),t(T,[2,45]),t(T,[2,46]),t(T,[2,47]),t(T,[2,48]),t(T,[2,49]),t(T,[2,50]),t(T,[2,51]),t(T,[2,52]),t(T,[2,53]),t(R,[2,10]),t(R,[2,24],{32:41,31:56,24:S,29:A}),t(R,[2,26]),t(R,[2,27]),{33:[1,57]},{11:59,30:l,34:58,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w},t(R,[2,11]),t(R,[2,32],{35:60,29:C}),t(R,[2,34]),{33:[1,61]},t(R,[2,12]),{17:62,24:k},{25:63,27:64,29:D},t(R,[2,14]),{17:66,24:k},t(R,[2,16]),t(R,[2,17]),t(T,[2,43]),t(R,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},t(R,[2,33]),{29:[1,70]},t(R,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},t(L,[2,23],{30:[1,73]}),t(R,[2,15]),t(R,[2,28]),t(R,[2,29]),{11:59,30:l,34:74,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w},t(R,[2,35]),t(R,[2,19]),{25:75,27:64,29:D},t(L,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:(0,r.K)(function(t,i){if(!i.recoverable){var e=new Error(t);throw e.hash=i,e}this.trace(t)},"parseError"),parse:(0,r.K)(function(t){var i=this,e=[0],s=[],a=[null],n=[],h=this.table,o="",l=0,c=0,g=0,u=n.slice.call(arguments,1),x=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);x.setInput(t,d.yy),d.yy.lexer=x,d.yy.parser=this,void 0===x.yylloc&&(x.yylloc={});var f=x.yylloc;n.push(f);var m=x.options&&x.options.ranges;function y(){var t;return"number"!=typeof(t=s.pop()||x.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,r.K)(function(t){e.length=e.length-2*t,a.length=a.length-t,n.length=n.length-t},"popStack"),(0,r.K)(y,"lex");for(var b,w,S,A,C,k,R,_,T,D={};;){if(S=e[e.length-1],this.defaultActions[S]?A=this.defaultActions[S]:(null==b&&(b=y()),A=h[S]&&h[S][b]),void 0===A||!A.length||!A[0]){var L="";for(k in T=[],h[S])this.terminals_[k]&&k>2&&T.push("'"+this.terminals_[k]+"'");L=x.showPosition?"Parse error on line "+(l+1)+":\n"+x.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(L,{text:x.match,token:this.terminals_[b]||b,line:x.yylineno,loc:f,expected:T})}if(A[0]instanceof Array&&A.length>1)throw new Error("Parse Error: multiple actions possible at state: "+S+", token: "+b);switch(A[0]){case 1:e.push(b),a.push(x.yytext),n.push(x.yylloc),e.push(A[1]),b=null,w?(b=w,w=null):(c=x.yyleng,o=x.yytext,l=x.yylineno,f=x.yylloc,g>0&&g--);break;case 2:if(R=this.productions_[A[1]][1],D.$=a[a.length-R],D._$={first_line:n[n.length-(R||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(R||1)].first_column,last_column:n[n.length-1].last_column},m&&(D._$.range=[n[n.length-(R||1)].range[0],n[n.length-1].range[1]]),void 0!==(C=this.performAction.apply(D,[o,c,l,d.yy,A[1],a,n].concat(u))))return C;R&&(e=e.slice(0,-1*R*2),a=a.slice(0,-1*R),n=n.slice(0,-1*R)),e.push(this.productions_[A[1]][0]),a.push(D.$),n.push(D._$),_=h[e[e.length-2]][e[e.length-1]],e.push(_);break;case 3:return!0}}return!0},"parse")},v=function(){return{EOF:1,parseError:(0,r.K)(function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)},"parseError"),setInput:(0,r.K)(function(t,i){return this.yy=i||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,r.K)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,r.K)(function(t){var i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var a=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===s.length?this.yylloc.first_column:0)+s[s.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:(0,r.K)(function(){return this._more=!0,this},"more"),reject:(0,r.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,r.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,r.K)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,r.K)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,r.K)(function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},"showPosition"),test_match:(0,r.K)(function(t,i){var e,s,a;if(this.options.backtrack_lexer&&(a={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(a.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var n in a)this[n]=a[n];return!1}return!1},"test_match"),next:(0,r.K)(function(){if(this.done)return this.EOF;var t,i,e,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),n=0;ni[0].length)){if(i=e,s=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,a[n])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,a[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,r.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,r.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,r.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,r.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,r.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,r.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,r.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,r.K)(function(t,i,e,s){switch(e){case 0:case 1:case 5:case 44:break;case 2:case 3:return this.popState(),36;case 4:return 36;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:case 26:case 28:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 33;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 29;case 25:return this.popState(),26;case 27:this.pushState("string");break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 44;case 33:return"COLON";case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 45:return 37;case 46:return 38}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}}}();function E(){this.yy={}}return P.lexer=v,(0,r.K)(E,"Parser"),E.prototype=P,P.Parser=E,new E}();c.parser=c;var g=c;function u(t){return"bar"===t.type}function x(t){return"band"===t.type}function d(t){return"linear"===t.type}(0,r.K)(u,"isBarPlot"),(0,r.K)(x,"isBandAxisData"),(0,r.K)(d,"isLinearAxisData");var p=class{constructor(t){this.parentGroup=t}static{(0,r.K)(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((t,i)=>Math.max(i.length,t),0)*i,height:i};const e={width:0,height:0},s=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const n of t){const t=(0,a.W6)(s,1,n),h=t?t.width:n.length*i,o=t?t.height:i;e.width=Math.max(e.width,h),e.height=Math.max(e.height,o)}return s.remove(),e}},f=class{constructor(t,i,e,s){this.axisConfig=t,this.title=i,this.textDimensionCalculator=e,this.axisThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}static{(0,r.K)(this,"BaseAxis")}setRange(t){this.range=t,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.width;this.outerPadding=Math.min(e.width/2,s);let a=e.height;"bottom"===this.axisPosition&&0!==this.normalizedLabelRotationInRad&&(a=Math.max(a,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*e.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*e.height))),a+=2*this.axisConfig.labelPadding,this.labelTextHeight=e.height,a<=i&&(i-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.height;this.outerPadding=Math.min(e.height/2,s);const a=e.width+2*this.axisConfig.labelPadding;a<=i&&(i-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateOffsetByRotation(t){const i=this.normalizedLabelRotationInRad;return 0===i?0:Math.sin(i)*this.getLabelDimension()[t]/2}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${i},${this.getScaleValue(t)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(t)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t)+this.calculateOffsetByRotation("height"),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation("width")),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:180*this.normalizedLabelRotationInRad/Math.PI,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${i} L ${this.getScaleValue(t)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(t)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}},m=class extends f{static{(0,r.K)(this,"BandAxis")}constructor(t,i,e,s,a){super(t,s,a,i),this.categories=e,this.scale=(0,l.WH)().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=(0,l.WH)().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),o.R.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},y=class extends f{static{(0,r.K)(this,"LinearAxis")}constructor(t,i,e,s,a){super(t,s,a,i),this.domain=e,this.scale=(0,l.m4Y)().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=(0,l.m4Y)().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function b(t,i,e,s){const a=new p(s);return x(t)?new m(i,e,t.categories,t.title,a):new y(i,e,[t.min,t.max],t.title,a)}(0,r.K)(b,"getAxis");var w=class{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{(0,r.K)(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(i.width,t.width),s=i.height+2*this.chartConfig.titlePadding;return i.width<=e&&i.height<=s&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=s,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}};function S(t,i,e,s){const a=new p(s);return new w(a,t,i,e)}(0,r.K)(S,"getChartTitleComponent");function A(t){return{fontSize:t,markerSize:.75*t,markerSpacing:.35*t,itemSpacing:.5*t}}(0,r.K)(A,"getLegendLayout");var C=class{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.visiblePlots=[]}static{(0,r.K)(this,"ChartLegend")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter(t=>t.title):[],0===this.visiblePlots.length)return this.boundingRect.width=0,this.boundingRect.height=0,{width:0,height:0};const{fontSize:i,markerSize:e,markerSpacing:s,itemSpacing:a}=A(this.chartConfig.legendFontSize),n=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map(t=>t.title),i),h=2*this.chartConfig.legendPadding+e+s+n.width,o=2*this.chartConfig.legendPadding+this.visiblePlots.length*i+(this.visiblePlots.length-1)*a;return h<=t.width&&o<=t.height?(this.boundingRect.width=h,this.boundingRect.height=o):(this.visiblePlots=[],this.boundingRect.width=0,this.boundingRect.height=0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(0===this.visiblePlots.length)return[];const{fontSize:t,markerSize:i,markerSpacing:e,itemSpacing:s}=A(this.chartConfig.legendFontSize),a=t+s,n=this.boundingRect.x+this.chartConfig.legendPadding,h=this.boundingRect.y+this.chartConfig.legendPadding,o=[],r=[];for(const[l,c]of this.visiblePlots.entries())if(u(c))o.push({x:n,y:h+l*a,width:i,height:i,fill:c.fill,strokeFill:c.fill,strokeWidth:0});else{const t=h+l*a+i/2;r.push({path:`M ${n},${t} L ${n+i},${t}`,strokeFill:c.strokeFill,strokeWidth:c.strokeWidth})}return[{groupTexts:["legend","markers"],type:"rect",data:o},{groupTexts:["legend","markers"],type:"path",data:r},{groupTexts:["legend","label"],type:"text",data:this.visiblePlots.map((s,o)=>({text:s.title,x:n+i+e,y:h+o*a+i/2,fill:this.chartThemeConfig.legendTextColor,fontSize:t,rotation:0,verticalPos:"middle",horizontalPos:"left"}))}]}};function k(t,i,e,s){const a=new p(s);return new C(a,t,i,e)}(0,r.K)(k,"getChartLegendComponent");var R=class{constructor(t,i,e,s,a){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=s,this.plotIndex=a}static{(0,r.K)(this,"LinePlot")}getDrawableElement(){const t=this.plotData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]);let i;if(i="horizontal"===this.orientation?(0,l.n8j)().y(t=>t[0]).x(t=>t[1])(t):(0,l.n8j)().x(t=>t[0]).y(t=>t[1])(t),!i)return[];const e=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){const i=10,s=12,a=[];for(const[e,[n,h]]of t.entries()){const t=this.plotData.pointLabels[e];t&&("horizontal"===this.orientation?a.push({x:h+i,y:n,text:t,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:s,rotation:0}):a.push({x:n,y:h-i,text:t,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:s,rotation:0}))}a.length>0&&e.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:a})}return e}},_=class{constructor(t,i,e,s,a,n){this.barData=t,this.boundingRect=i,this.xAxis=e,this.yAxis=s,this.orientation=a,this.plotIndex=n}static{(0,r.K)(this,"BarPlot")}getDrawableElement(){const t=this.barData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]),i=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),e=i/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(t=>({x:this.boundingRect.x,y:t[0]-e,height:i,width:t[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(t=>({x:t[0]-e,y:t[1],width:i,height:this.boundingRect.y+this.boundingRect.height-t[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},T=class{constructor(t,i,e){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=e,this.boundingRect={x:0,y:0,width:0,height:0}}static{(0,r.K)(this,"BasePlot")}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!this.xAxis||!this.yAxis)throw Error("Axes must be passed to render Plots");const t=[];for(const[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{const s=new R(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break;case"bar":{const s=new _(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}}return t}};function D(t,i,e){return new T(t,i,e)}(0,r.K)(D,"getPlotComponent");var L,P=class{constructor(t,i,e,s){this.chartConfig=t,this.chartData=i,this.componentStore={title:S(t,i,e,s),plot:D(t,i,e),legend:k(t,i,e,s),xAxis:b(i.xAxis,t.xAxis,{titleColor:e.xAxisTitleColor,labelColor:e.xAxisLabelColor,tickColor:e.xAxisTickColor,axisLineColor:e.xAxisLineColor},s),yAxis:b(i.yAxis,t.yAxis,{titleColor:e.yAxisTitleColor,labelColor:e.yAxisLabelColor,tickColor:e.yAxisTickColor,axisLineColor:e.yAxisLineColor},s)}}static{(0,r.K)(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,a={width:0,height:0},n=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),h=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:n,height:h});t-=o.width,i-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=o.height,i-=o.height,this.componentStore.xAxis.setAxisPosition("bottom"),o=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=o.height,this.componentStore.yAxis.setAxisPosition("left"),o=this.componentStore.yAxis.calculateSpace({width:t,height:i}),e=o.width,t-=o.width,a=this.componentStore.legend.calculateSpace({width:t,height:h}),t-=a.width,t>0&&(n+=t,t=0),i>0&&(h+=i,i=0),this.componentStore.plot.calculateSpace({width:n,height:h}),this.componentStore.plot.setBoundingBoxXY({x:e,y:s}),this.componentStore.legend.setBoundingBoxXY({x:e+n,y:s+Math.max((h-a.height)/2,0)}),this.componentStore.xAxis.setRange([e,e+n]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:s+h}),this.componentStore.yAxis.setRange([s,s+h]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:s}),this.chartData.plots.some(t=>u(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,a=0,n={width:0,height:0},h=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),r=this.componentStore.plot.calculateSpace({width:h,height:o});t-=r.width,i-=r.height,r=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),e=r.height,i-=r.height,this.componentStore.xAxis.setAxisPosition("left"),r=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=r.width,s=r.width,this.componentStore.yAxis.setAxisPosition("top"),r=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=r.height,a=e+r.height,n=this.componentStore.legend.calculateSpace({width:t,height:o}),t-=n.width,t>0&&(h+=t,t=0),i>0&&(o+=i,i=0),this.componentStore.plot.calculateSpace({width:h,height:o}),this.componentStore.plot.setBoundingBoxXY({x:s,y:a}),this.componentStore.legend.setBoundingBoxXY({x:s+h,y:a+Math.max((o-n.height)/2,0)}),this.componentStore.yAxis.setRange([s,s+h]),this.componentStore.yAxis.setBoundingBoxXY({x:s,y:e}),this.componentStore.xAxis.setRange([a,a+o]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(t=>u(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},v=class{static{(0,r.K)(this,"XYChartBuilder")}static build(t,i,e,s){return new P(t,i,e,s).getDrawableElement()}},E=0,K=F(),z=W(),I=O(),M=z.plotColorPalette.split(",").map(t=>t.trim()),$=!1,B=!1;function W(){const t=(0,h.P$)(),i=(0,h.zj)();return(0,n.$t)(t.xyChart,i.themeVariables.xyChart)}function F(){const t=(0,h.zj)();return(0,n.$t)(h.UI.xyChart,t.xyChart)}function O(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function X(t){const i=(0,h.zj)();return(0,h.jZ)(t.trim(),i)}function N(t){L=t}function Y(t){K.chartOrientation="horizontal"===t?"horizontal":"vertical"}function V(t){I.xAxis.title=X(t.text)}function H(t,i){I.xAxis={type:"linear",title:I.xAxis.title,min:t,max:i},$=!0}function U(t){I.xAxis={type:"band",title:I.xAxis.title,categories:t.map(t=>X(t.text))},$=!0}function j(t){I.yAxis.title=X(t.text)}function G(t,i){I.yAxis={type:"linear",title:I.yAxis.title,min:t,max:i},B=!0}function Q(t){const i=Math.min(...t),e=Math.max(...t),s=d(I.yAxis)?I.yAxis.min:1/0,a=d(I.yAxis)?I.yAxis.max:-1/0;I.yAxis={type:"linear",title:I.yAxis.title,min:Math.min(s,i),max:Math.max(a,e)}}function Z(t){let i=[];if(0===t.length)return i;if(!$){const i=d(I.xAxis)?I.xAxis.min:1/0,e=d(I.xAxis)?I.xAxis.max:-1/0;H(Math.min(i,1),Math.max(e,t.length))}if(x(I.xAxis)&&t.length>I.xAxis.categories.length&&(t=t.slice(0,I.xAxis.categories.length)),B||Q(t),x(I.xAxis)&&(i=I.xAxis.categories.map((i,e)=>[i,t[e]])),d(I.xAxis)){const e=I.xAxis.min,s=I.xAxis.max;if(1===t.length)i=[[`${e}`,t[0]]];else{const a=(s-e)/(t.length-1);i=t.map((t,i)=>[`${e+i*a}`,t])}}return i}function q(t){return M[0===t?0:t%M.length]}function J(t,i){const e=i.map(t=>t.value),s=i.map(t=>t.label?X(t.label):""),a=Z(e),n=s.some(t=>""!==t);I.plots.push({type:"line",title:X(t.text),strokeFill:q(E),strokeWidth:2,data:a,...n?{pointLabels:s}:{}}),E++}function tt(t,i){const e=Z(i.map(t=>t.value));I.plots.push({type:"bar",title:X(t.text),fill:q(E),data:e}),E++}function it(){if(0===I.plots.length)throw Error("No Plot to render, please provide a plot with some data");return I.title=(0,h.ab)(),v.build(K,I,z,L)}function et(){return z}function st(){return K}function at(){return I}(0,r.K)(W,"getChartDefaultThemeConfig"),(0,r.K)(F,"getChartDefaultConfig"),(0,r.K)(O,"getChartDefaultData"),(0,r.K)(X,"textSanitizer"),(0,r.K)(N,"setTmpSVGG"),(0,r.K)(Y,"setOrientation"),(0,r.K)(V,"setXAxisTitle"),(0,r.K)(H,"setXAxisRangeData"),(0,r.K)(U,"setXAxisBand"),(0,r.K)(j,"setYAxisTitle"),(0,r.K)(G,"setYAxisRangeData"),(0,r.K)(Q,"setYAxisRangeFromPlotData"),(0,r.K)(Z,"transformDataWithoutCategory"),(0,r.K)(q,"getPlotColorFromPalette"),(0,r.K)(J,"setLineData"),(0,r.K)(tt,"setBarData"),(0,r.K)(it,"getDrawableElem"),(0,r.K)(et,"getChartThemeConfig"),(0,r.K)(st,"getChartConfig"),(0,r.K)(at,"getXYChartData");var nt={parser:g,db:{getDrawableElem:it,clear:(0,r.K)(function(){(0,h.IU)(),E=0,K=F(),I={yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]},z=W(),M=z.plotColorPalette.split(",").map(t=>t.trim()),$=!1,B=!1},"clear"),setAccTitle:h.SV,getAccTitle:h.iN,setDiagramTitle:h.ke,getDiagramTitle:h.ab,getAccDescription:h.m7,setAccDescription:h.EI,setOrientation:Y,setXAxisTitle:V,setXAxisRangeData:H,setXAxisBand:U,setYAxisTitle:j,setYAxisRangeData:G,setLineData:J,setBarData:tt,setTmpSVGG:N,getChartThemeConfig:et,getChartConfig:st,getXYChartData:at},renderer:{draw:(0,r.K)((t,i,e,a)=>{const n=a.db,l=n.getChartThemeConfig(),c=n.getChartConfig(),g=n.getXYChartData().plots[0].data.map(t=>t[1]);function u(t){return"top"===t?"text-before-edge":"middle"}function x(t){return"left"===t?"start":"right"===t?"end":"middle"}function d(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}(0,r.K)(u,"getDominantBaseLine"),(0,r.K)(x,"getTextAnchor"),(0,r.K)(d,"getTextTransformation"),o.R.debug("Rendering xychart chart\n"+t);const p=(0,s.D)(i),f=p.append("g").attr("class","main"),m=f.append("rect").attr("width",c.width).attr("height",c.height).attr("class","background");(0,h.a$)(p,c.height,c.width,!0),p.attr("viewBox",`0 0 ${c.width} ${c.height}`),m.attr("fill",l.backgroundColor),n.setTmpSVGG(p.append("g").attr("class","mermaid-tmp-group"));const y=n.getDrawableElem(),b={};function w(t){let i=f,e="";for(const[s]of t.entries()){let a=f;s>0&&b[e]&&(a=b[e]),e+=t[s],i=b[e],i||(i=b[e]=a.append("g").attr("class",t[s]))}return i}(0,r.K)(w,"getGroup");for(const s of y){if(0===s.data.length)continue;const t=w(s.groupTexts);switch(s.type){case"rect":if(t.selectAll("rect").data(s.data).enter().append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth),c.showDataLabel){const i=c.showDataLabelOutsideBar;if("horizontal"===c.chartOrientation){let e=function(t,i){const{data:e,label:s}=t;return i*s.length*a<=e.width-n};(0,r.K)(e,"fitsHorizontally");const a=.7,n=10,h=s.data.map((t,i)=>({data:t,label:g[i].toString()})).filter(t=>t.data.width>0&&t.data.height>0),o=h.map(t=>{const{data:i}=t;let s=.7*i.height;for(;!e(t,s)&&s>0;)s-=1;return s}),c=Math.floor(Math.min(...o)),u=(0,r.K)(t=>i?t.data.x+t.data.width+n:t.data.x+t.data.width-n,"determineLabelXPosition");t.selectAll("text").data(h).enter().append("text").attr("x",u).attr("y",t=>t.data.y+t.data.height/2).attr("text-anchor",i?"start":"end").attr("dominant-baseline","middle").attr("fill",l.dataLabelColor).attr("font-size",`${c}px`).text(t=>t.label)}else{let e=function(t,i,e){const{data:s,label:a}=t,n=i*a.length*.7,h=s.x+s.width/2,o=h+n/2,r=h-n/2>=s.x&&o<=s.x+s.width,l=s.y+e+i<=s.y+s.height;return r&&l};(0,r.K)(e,"fitsInBar");const a=10,n=s.data.map((t,i)=>({data:t,label:g[i].toString()})).filter(t=>t.data.width>0&&t.data.height>0),h=n.map(t=>{const{data:i,label:s}=t;let n=i.width/(.7*s.length);for(;!e(t,n,a)&&n>0;)n-=1;return n}),o=Math.floor(Math.min(...h)),c=(0,r.K)(t=>i?t.data.y-a:t.data.y+a,"determineLabelYPosition");t.selectAll("text").data(n).enter().append("text").attr("x",t=>t.data.x+t.data.width/2).attr("y",c).attr("text-anchor","middle").attr("dominant-baseline",i?"auto":"hanging").attr("fill",l.dataLabelColor).attr("font-size",`${o}px`).text(t=>t.label)}}break;case"text":t.selectAll("text").data(s.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>u(t.verticalPos)).attr("text-anchor",t=>x(t.horizontalPos)).attr("transform",t=>d(t)).text(t=>t.text);break;case"path":t.selectAll("path").data(s.data).enter().append("path").attr("d",t=>t.path).attr("fill",t=>t.fill?t.fill:"none").attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth)}}},"draw")}}}}]); \ No newline at end of file diff --git a/assets/js/4107.e389ed4d.js b/assets/js/4107.e389ed4d.js new file mode 100644 index 000000000..acd41b60b --- /dev/null +++ b/assets/js/4107.e389ed4d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[1726,4107,6488],{16488(e,s,a){a.d(s,{diagram:()=>c.AC});var c=a(96506);a(64918),a(96755),a(1672),a(841),a(9417),a(338),a(78771),a(46853),a(717),a(79515),a(44505),a(72379),a(58962),a(16459),a(76385),a(31293),a(86827)}}]); \ No newline at end of file diff --git a/assets/js/4108.e8a70f71.js b/assets/js/4108.e8a70f71.js new file mode 100644 index 000000000..52f0a0110 --- /dev/null +++ b/assets/js/4108.e8a70f71.js @@ -0,0 +1,2 @@ +/*! For license information please see 4108.e8a70f71.js.LICENSE.txt */ +(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[4108],{69119(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|:)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[".","/"],e.BLANK_URL="about:blank"},16750(t,e,r){"use strict";e.J=function(t){if(!t)return i.BLANK_URL;var e,r=n(t.trim());do{e=(r=n(r=o(r).replace(i.htmlCtrlEntityRegex,"").replace(i.ctrlCharactersRegex,"").replace(i.whitespaceEscapeCharsRegex,"").trim())).match(i.ctrlCharactersRegex)||r.match(i.htmlEntitiesRegex)||r.match(i.htmlCtrlEntityRegex)||r.match(i.whitespaceEscapeCharsRegex)}while(e&&e.length>0);var a=r;if(!a)return i.BLANK_URL;if(function(t){return i.relativeFirstCharacters.indexOf(t[0])>-1}(a))return a;var s=a.trimStart(),l=s.match(i.urlSchemeRegex);if(!l)return a;var h=l[0].toLowerCase().trim();if(i.invalidProtocolRegex.test(h))return i.BLANK_URL;var c=s.replace(/\\/g,"/");if("mailto:"===h||h.includes("://"))return c;if("http:"===h||"https:"===h){if(!function(t){return URL.canParse(t)}(c))return i.BLANK_URL;var d=new URL(c);return d.protocol=d.protocol.toLowerCase(),d.hostname=d.hostname.toLowerCase(),d.toString()}return c};var i=r(69119);function o(t){return t.replace(i.ctrlCharactersRegex,"").replace(i.htmlEntitiesRegex,function(t,e){return String.fromCharCode(e)})}function n(t){try{return decodeURIComponent(t)}catch(e){return t}}},74353(t){t.exports=function(){"use strict";var t=1e3,e=6e4,r=36e5,i="millisecond",o="second",n="minute",a="hour",s="day",l="week",h="month",c="quarter",d="year",u="date",p="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},m=function(t,e,r){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(r)+t},x={s:m,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),i=Math.floor(r/60),o=r%60;return(e<=0?"+":"-")+m(i,2,"0")+":"+m(o,2,"0")},m:function t(e,r){if(e.date()1)return t(a[0])}else{var s=e.name;b[s]=e,o=s}return!i&&o&&(C=o),o||!i&&C},S=function(t,e){if(w(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new B(r)},v=x;v.l=T,v.i=w,v.w=function(t,e){return S(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var B=function(){function y(t){this.$L=T(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[k]=!0}var m=y.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(v.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(g);if(i){var o=i[2]-1||0,n=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)):new Date(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return v},m.isValid=function(){return!(this.$d.toString()===p)},m.isSame=function(t,e){var r=S(t);return this.startOf(e)<=r&&r<=this.endOf(e)},m.isAfter=function(t,e){return S(t)2&&i.push(t)}const n=[];e=Math.max(e,.1);const a=[];for(const o of i)for(let t=0;tt.ymine.ymin?1:t.xe.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),!a.length)return n;let s=[],l=a[0].ymin,h=0;for(;s.length||a.length;){if(a.length){let t=-1;for(let e=0;el);e++)t=e;a.splice(0,t+1).forEach(t=>{s.push({s:l,edge:t})})}if(s=s.filter(t=>!(t.edge.ymax<=l)),s.sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==r||h%e==0)&&s.length>1)for(let t=0;t=s.length)break;const r=s[t].edge,i=s[e].edge;n.push([[Math.round(r.x),l],[Math.round(i.x),l]])}l+=r,s.forEach(t=>{t.edge.x=t.edge.x+r*t.edge.islope}),h++}return n}(l,s,n);if(a){for(const t of l)i(t,h,-a);!function(t,e,r){const o=[];t.forEach(t=>o.push(...t)),i(o,e,r)}(c,h,-a)}return c}function a(t,e){var r;const i=e.hachureAngle+90;let o=e.hachureGap;o<0&&(o=4*e.strokeWidth),o=Math.round(Math.max(o,.1));let a=1;return e.roughness>=1&&((null===(r=e.randomizer)||void 0===r?void 0:r.next())||Math.random())>.7&&(a=o),n(t,o,i,a||1)}r.d(e,{A:()=>ot});class s{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const r=a(t,e);return{type:"fillSketch",ops:this.renderLines(r,e)}}renderLines(t,e){const r=[];for(const i of t)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],e));return r}}function l(t){const e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class h extends s{fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);const i=a(t,Object.assign({},e,{hachureGap:r})),o=Math.PI/180*e.hachureAngle,n=[],s=.5*r*Math.cos(o),h=.5*r*Math.sin(o);for(const[a,c]of i)l([a,c])&&n.push([[a[0]-s,a[1]+h],[...c]],[[a[0]+s,a[1]-h],[...c]]);return{type:"fillSketch",ops:this.renderLines(n,e)}}}class c extends s{fillPolygons(t,e){const r=this._fillPolygons(t,e),i=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),o=this._fillPolygons(t,i);return r.ops=r.ops.concat(o.ops),r}}class d{constructor(t){this.helper=t}fillPolygons(t,e){const r=a(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(r,e)}dotsOnLines(t,e){const r=[];let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,.1);let o=e.fillWeight;o<0&&(o=e.strokeWidth/2);const n=i/4;for(const a of t){const t=l(a),s=t/i,h=Math.ceil(s)-1,c=t-h*i,d=(a[0][0]+a[1][0])/2-i/4,u=Math.min(a[0][1],a[1][1]);for(let a=0;a{const n=l(t),a=Math.floor(n/(r+i)),s=(n+i-a*(r+i))/2;let h=t[0],c=t[1];h[0]>c[0]&&(h=t[1],c=t[0]);const d=Math.atan((c[1]-h[1])/(c[0]-h[0]));for(let l=0;l{const o=l(t),n=Math.round(o/(2*e));let a=t[0],s=t[1];a[0]>s[0]&&(a=t[1],s=t[0]);const h=Math.atan((s[1]-a[1])/(s[0]-a[0]));for(let l=0;li%2?t+r:t+e);n.push({key:"C",data:t}),e=t[4],r=t[5];break}case"Q":n.push({key:"Q",data:[...s]}),e=s[2],r=s[3];break;case"q":{const t=s.map((t,i)=>i%2?t+r:t+e);n.push({key:"Q",data:t}),e=t[2],r=t[3];break}case"A":n.push({key:"A",data:[...s]}),e=s[5],r=s[6];break;case"a":e+=s[5],r+=s[6],n.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],e,r]});break;case"H":n.push({key:"H",data:[...s]}),e=s[0];break;case"h":e+=s[0],n.push({key:"H",data:[e]});break;case"V":n.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],n.push({key:"V",data:[r]});break;case"S":n.push({key:"S",data:[...s]}),e=s[2],r=s[3];break;case"s":{const t=s.map((t,i)=>i%2?t+r:t+e);n.push({key:"S",data:t}),e=t[2],r=t[3];break}case"T":n.push({key:"T",data:[...s]}),e=s[0],r=s[1];break;case"t":e+=s[0],r+=s[1],n.push({key:"T",data:[e,r]});break;case"Z":case"z":n.push({key:"Z",data:[]}),e=i,r=o}return n}function b(t){const e=[];let r="",i=0,o=0,n=0,a=0,s=0,l=0;for(const{key:h,data:c}of t){switch(h){case"M":e.push({key:"M",data:[...c]}),[i,o]=c,[n,a]=c;break;case"C":e.push({key:"C",data:[...c]}),i=c[4],o=c[5],s=c[2],l=c[3];break;case"L":e.push({key:"L",data:[...c]}),[i,o]=c;break;case"H":i=c[0],e.push({key:"L",data:[i,o]});break;case"V":o=c[0],e.push({key:"L",data:[i,o]});break;case"S":{let t=0,n=0;"C"===r||"S"===r?(t=i+(i-s),n=o+(o-l)):(t=i,n=o),e.push({key:"C",data:[t,n,...c]}),s=c[0],l=c[1],i=c[2],o=c[3];break}case"T":{const[t,n]=c;let a=0,h=0;"Q"===r||"T"===r?(a=i+(i-s),h=o+(o-l)):(a=i,h=o);const d=i+2*(a-i)/3,u=o+2*(h-o)/3,p=t+2*(a-t)/3,g=n+2*(h-n)/3;e.push({key:"C",data:[d,u,p,g,t,n]}),s=a,l=h,i=t,o=n;break}case"Q":{const[t,r,n,a]=c,h=i+2*(t-i)/3,d=o+2*(r-o)/3,u=n+2*(t-n)/3,p=a+2*(r-a)/3;e.push({key:"C",data:[h,d,u,p,n,a]}),s=t,l=r,i=n,o=a;break}case"A":{const t=Math.abs(c[0]),r=Math.abs(c[1]),n=c[2],a=c[3],s=c[4],l=c[5],h=c[6];0===t||0===r?(e.push({key:"C",data:[i,o,l,h,l,h]}),i=l,o=h):i===l&&o===h||(w(i,o,l,h,t,r,n,a,s).forEach(function(t){e.push({key:"C",data:t})}),i=l,o=h);break}case"Z":e.push({key:"Z",data:[]}),i=n,o=a}r=h}return e}function k(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function w(t,e,r,i,o,n,a,s,l,h){const c=(d=a,Math.PI*d/180);var d;let u=[],p=0,g=0,f=0,y=0;if(h)[p,g,f,y]=h;else{[t,e]=k(t,e,-c),[r,i]=k(r,i,-c);const a=(t-r)/2,h=(e-i)/2;let d=a*a/(o*o)+h*h/(n*n);d>1&&(d=Math.sqrt(d),o*=d,n*=d);const u=o*o,m=n*n,x=u*m-u*h*h-m*a*a,C=u*h*h+m*a*a,b=(s===l?-1:1)*Math.sqrt(Math.abs(x/C));f=b*o*h/n+(t+r)/2,y=b*-n*a/o+(e+i)/2,p=Math.asin(parseFloat(((e-y)/n).toFixed(9))),g=Math.asin(parseFloat(((i-y)/n).toFixed(9))),tg&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let m=g-p;if(Math.abs(m)>120*Math.PI/180){const t=g,e=r,s=i;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,u=w(r=f+o*Math.cos(g),i=y+n*Math.sin(g),e,s,o,n,a,0,l,[g,t,f,y])}m=g-p;const x=Math.cos(p),C=Math.sin(p),b=Math.cos(g),T=Math.sin(g),S=Math.tan(m/4),v=4/3*o*S,B=4/3*n*S,_=[t,e],A=[t+v*C,e-B*x],L=[r+v*T,i-B*b],F=[r,i];if(A[0]=2*_[0]-A[0],A[1]=2*_[1]-A[1],h)return[A,L,F].concat(u);{u=[A,L,F].concat(u);const t=[];for(let e=0;e2){const o=[];for(let e=0;e2*Math.PI&&(p=0,g=2*Math.PI);const f=2*Math.PI/l.curveStepCount,y=Math.min(f/2,(g-p)/2),m=N(y,h,c,d,u,p,g,1,l);if(!l.disableMultiStroke){const t=N(y,h,c,d,u,p,g,1.5,l);m.push(...t)}return a&&(s?m.push(...K(h,c,h+d*Math.cos(p),c+u*Math.sin(p),l),...K(h,c,h+d*Math.cos(g),c+u*Math.sin(g),l)):m.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+d*Math.cos(p),c+u*Math.sin(p)]})),{type:"path",ops:m}}function F(t,e){const r=b(C(x(t))),i=[];let o=[0,0],n=[0,0];for(const{key:a,data:s}of r)switch(a){case"M":n=[s[0],s[1]],o=[s[0],s[1]];break;case"L":i.push(...K(n[0],n[1],s[0],s[1],e)),n=[s[0],s[1]];break;case"C":{const[t,r,o,a,l,h]=s;i.push(...j(t,r,o,a,l,h,n,e)),n=[l,h];break}case"Z":i.push(...K(n[0],n[1],o[0],o[1],e)),n=[o[0],o[1]]}return{type:"path",ops:i}}function M(t,e){const r=[];for(const i of t)if(i.length){const t=e.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+I(t,e),i[0][1]+I(t,e)]});for(let n=1;n500?.4:-.0016668*l+1.233334;let c=o.maxRandomnessOffset||0;c*c*100>s&&(c=l/10);const d=c/2,u=.2+.2*O(o);let p=o.bowing*o.maxRandomnessOffset*(i-e)/200,g=o.bowing*o.maxRandomnessOffset*(t-r)/200;p=I(p,o,h),g=I(g,o,h);const f=[],y=()=>I(d,o,h),m=()=>I(c,o,h),x=o.preserveVertices;return n&&(a?f.push({op:"move",data:[t+(x?0:y()),e+(x?0:y())]}):f.push({op:"move",data:[t+(x?0:I(c,o,h)),e+(x?0:I(c,o,h))]})),a?f.push({op:"bcurveTo",data:[p+t+(r-t)*u+y(),g+e+(i-e)*u+y(),p+t+2*(r-t)*u+y(),g+e+2*(i-e)*u+y(),r+(x?0:y()),i+(x?0:y())]}):f.push({op:"bcurveTo",data:[p+t+(r-t)*u+m(),g+e+(i-e)*u+m(),p+t+2*(r-t)*u+m(),g+e+2*(i-e)*u+m(),r+(x?0:m()),i+(x?0:m())]}),f}function R(t,e,r){if(!t.length)return[];const i=[];i.push([t[0][0]+I(e,r),t[0][1]+I(e,r)]),i.push([t[0][0]+I(e,r),t[0][1]+I(e,r)]);for(let o=1;o3){const n=[],a=1-r.curveTightness;o.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+21&&o.push(r)):o.push(r),o.push(t[e+3])}else{const i=.5,n=t[e+0],a=t[e+1],s=t[e+2],l=t[e+3],h=G(n,a,i),c=G(a,s,i),d=G(s,l,i),u=G(h,c,i),p=G(c,d,i),g=G(u,p,i);X([n,h,u,g],0,r,o),X([g,p,d,l],0,r,o)}var n,a;return o}function V(t,e){return Z(t,0,t.length,e)}function Z(t,e,r,i,o){const n=o||[],a=t[e],s=t[r-1];let l=0,h=1;for(let c=e+1;cl&&(l=e,h=c)}return Math.sqrt(l)>i?(Z(t,e,h+1,i,n),Z(t,h,r,i,n)):(n.length||n.push(a),n.push(s)),n}function Q(t,e=.15,r){const i=[],o=(t.length-1)/3;for(let n=0;n0?Z(i,0,i.length,r):i}const J="none";class tt{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,r){return{shape:t,sets:e||[],options:r||this.defaultOptions}}line(t,e,r,i,o){const n=this._o(o);return this._d("line",[S(t,e,r,i,n)],n)}rectangle(t,e,r,i,o){const n=this._o(o),a=[],s=function(t,e,r,i,o){return function(t,e){return v(t,!0,e)}([[t,e],[t+r,e],[t+r,e+i],[t,e+i]],o)}(t,e,r,i,n);if(n.fill){const o=[[t,e],[t+r,e],[t+r,e+i],[t,e+i]];"solid"===n.fillStyle?a.push(M([o],n)):a.push(E([o],n))}return n.stroke!==J&&a.push(s),this._d("rectangle",a,n)}ellipse(t,e,r,i,o){const n=this._o(o),a=[],s=_(r,i,n),l=A(t,e,n,s);if(n.fill)if("solid"===n.fillStyle){const r=A(t,e,n,s).opset;r.type="fillPath",a.push(r)}else a.push(E([l.estimatedPoints],n));return n.stroke!==J&&a.push(l.opset),this._d("ellipse",a,n)}circle(t,e,r,i){const o=this.ellipse(t,e,r,r,i);return o.shape="circle",o}linearPath(t,e){const r=this._o(e);return this._d("linearPath",[v(t,!1,r)],r)}arc(t,e,r,i,o,n,a=!1,s){const l=this._o(s),h=[],c=L(t,e,r,i,o,n,a,!0,l);if(a&&l.fill)if("solid"===l.fillStyle){const a=Object.assign({},l);a.disableMultiStroke=!0;const s=L(t,e,r,i,o,n,!0,!1,a);s.type="fillPath",h.push(s)}else h.push(function(t,e,r,i,o,n,a){const s=t,l=e;let h=Math.abs(r/2),c=Math.abs(i/2);h+=I(.01*h,a),c+=I(.01*c,a);let d=o,u=n;for(;d<0;)d+=2*Math.PI,u+=2*Math.PI;u-d>2*Math.PI&&(d=0,u=2*Math.PI);const p=(u-d)/a.curveStepCount,g=[];for(let f=d;f<=u;f+=p)g.push([s+h*Math.cos(f),l+c*Math.sin(f)]);return g.push([s+h*Math.cos(u),l+c*Math.sin(u)]),g.push([s,l]),E([g],a)}(t,e,r,i,o,n,l));return l.stroke!==J&&h.push(c),this._d("arc",h,l)}curve(t,e){const r=this._o(e),i=[],o=B(t,r);if(r.fill&&r.fill!==J)if("solid"===r.fillStyle){const e=B(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],o=t;if(o.length){const t="number"==typeof o[0][0]?[o]:o;for(const i of t)i.length<3?e.push(...i):3===i.length?e.push(...Q(H([i[0],i[0],i[1],i[2]]),10,(1+r.roughness)/2)):e.push(...Q(H(i),10,(1+r.roughness)/2))}e.length&&i.push(E([e],r))}return r.stroke!==J&&i.push(o),this._d("curve",i,r)}polygon(t,e){const r=this._o(e),i=[],o=v(t,!0,r);return r.fill&&("solid"===r.fillStyle?i.push(M([t],r)):i.push(E([t],r))),r.stroke!==J&&i.push(o),this._d("polygon",i,r)}path(t,e){const r=this._o(e),i=[];if(!t)return this._d("path",i,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=r.fill&&"transparent"!==r.fill&&r.fill!==J,n=r.stroke!==J,a=!!(r.simplification&&r.simplification<1),s=function(t,e,r){const i=b(C(x(t))),o=[];let n=[],a=[0,0],s=[];const l=()=>{s.length>=4&&n.push(...Q(s,1)),s=[]},h=()=>{l(),n.length&&(o.push(n),n=[])};for(const{key:d,data:u}of i)switch(d){case"M":h(),a=[u[0],u[1]],n.push(a);break;case"L":l(),n.push([u[0],u[1]]);break;case"C":if(!s.length){const t=n.length?n[n.length-1]:a;s.push([t[0],t[1]])}s.push([u[0],u[1]]),s.push([u[2],u[3]]),s.push([u[4],u[5]]);break;case"Z":l(),n.push([a[0],a[1]])}if(h(),!r)return o;const c=[];for(const d of o){const t=V(d,r);t.length&&c.push(t)}return c}(t,0,a?4-4*(r.simplification||1):(1+r.roughness)/2),l=F(t,r);if(o)if("solid"===r.fillStyle)if(1===s.length){const e=F(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else i.push(M(s,r));else i.push(E(s,r));return n&&(a?s.forEach(t=>{i.push(v(t,!1,r))}):i.push(l)),this._d("path",i,r)}opsToPath(t,e){let r="";for(const i of t.ops){const t="number"==typeof e&&e>=0?i.data.map(t=>+t.toFixed(e)):i.data;switch(i.op){case"move":r+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":r+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":r+=`L${t[0]} ${t[1]} `}}return r.trim()}toPaths(t){const e=t.sets||[],r=t.options||this.defaultOptions,i=[];for(const o of e){let t=null;switch(o.type){case"path":t={d:this.opsToPath(o),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:J};break;case"fillPath":t={d:this.opsToPath(o),stroke:J,strokeWidth:0,fill:r.fill||J};break;case"fillSketch":t=this.fillSketch(o,r)}t&&i.push(t)}return i}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||J,strokeWidth:r,fill:J}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}}class et{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new tt(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const n of e)switch(n.type){case"path":i.save(),i.strokeStyle="none"===r.stroke?"transparent":r.stroke,i.lineWidth=r.strokeWidth,r.strokeLineDash&&i.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(i.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(i,n,o),i.restore();break;case"fillPath":{i.save(),i.fillStyle=r.fill||"";const e="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(i,n,o,e),i.restore();break}case"fillSketch":this.fillSketch(i,n,r)}}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=i,this._drawToContext(t,e,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,r,i="nonzero"){t.beginPath();for(const o of e.ops){const e="number"==typeof r&&r>=0?o.data.map(t=>+t.toFixed(r)):o.data;switch(o.op){case"move":t.moveTo(e[0],e[1]);break;case"bcurveTo":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case"lineTo":t.lineTo(e[0],e[1])}}"fillPath"===e.type?t.fill(i):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,r,i,o){const n=this.gen.line(t,e,r,i,o);return this.draw(n),n}rectangle(t,e,r,i,o){const n=this.gen.rectangle(t,e,r,i,o);return this.draw(n),n}ellipse(t,e,r,i,o){const n=this.gen.ellipse(t,e,r,i,o);return this.draw(n),n}circle(t,e,r,i){const o=this.gen.circle(t,e,r,i);return this.draw(o),o}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r),r}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r),r}arc(t,e,r,i,o,n,a=!1,s){const l=this.gen.arc(t,e,r,i,o,n,a,s);return this.draw(l),l}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r),r}path(t,e){const r=this.gen.path(t,e);return this.draw(r),r}}const rt="http://www.w3.org/2000/svg";class it{constructor(t,e){this.svg=t,this.gen=new tt(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,o=i.createElementNS(rt,"g"),n=t.options.fixedDecimalPlaceDigits;for(const a of e){let e=null;switch(a.type){case"path":e=i.createElementNS(rt,"path"),e.setAttribute("d",this.opsToPath(a,n)),e.setAttribute("stroke",r.stroke),e.setAttribute("stroke-width",r.strokeWidth+""),e.setAttribute("fill","none"),r.strokeLineDash&&e.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":e=i.createElementNS(rt,"path"),e.setAttribute("d",this.opsToPath(a,n)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",r.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(i,a,r)}e&&o.appendChild(e)}return o}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);const o=t.createElementNS(rt,"path");return o.setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),o.setAttribute("stroke",r.fill||""),o.setAttribute("stroke-width",i+""),o.setAttribute("fill","none"),r.fillLineDash&&o.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,i,o){const n=this.gen.line(t,e,r,i,o);return this.draw(n)}rectangle(t,e,r,i,o){const n=this.gen.rectangle(t,e,r,i,o);return this.draw(n)}ellipse(t,e,r,i,o){const n=this.gen.ellipse(t,e,r,i,o);return this.draw(n)}circle(t,e,r,i){const o=this.gen.circle(t,e,r,i);return this.draw(o)}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r)}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r)}arc(t,e,r,i,o,n,a=!1,s){const l=this.gen.arc(t,e,r,i,o,n,a,s);return this.draw(l)}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r)}path(t,e){const r=this.gen.path(t,e);return this.draw(r)}}var ot={canvas:(t,e)=>new et(t,e),svg:(t,e)=>new it(t,e),generator:t=>new tt(t),newSeed:()=>tt.newSeed()}},60513(t,e,r){"use strict";function i(t){for(var e=[],r=1;ri})},70451(t,e,r){"use strict";function i(t,e){let r;if(void 0===e)for(const i of t)null!=i&&(r=i)&&(r=i);else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(r=o)&&(r=o)}return r}function o(t,e){let r;if(void 0===e)for(const i of t)null!=i&&(r>i||void 0===r&&i>=i)&&(r=i);else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(r>o||void 0===r&&o>=o)&&(r=o)}return r}function n(t){return t}r.d(e,{JLW:()=>ss,l78:()=>g,tlR:()=>p,qrM:()=>bs,Yu4:()=>ws,IA3:()=>Ss,Wi0:()=>Bs,PGM:()=>_s,OEq:()=>Ls,y8u:()=>Es,olC:()=>Os,IrU:()=>Is,oDi:()=>Rs,Q7f:()=>zs,cVp:()=>js,lUB:()=>cs,Lx9:()=>Hs,nVG:()=>Js,uxU:()=>tl,Xf2:()=>il,GZz:()=>nl,UPb:()=>sl,dyv:()=>al,GPZ:()=>jr,Sk5:()=>Xr,bEH:()=>Ai,n8j:()=>ps,T9B:()=>i,jkA:()=>o,rLf:()=>ys,WH:()=>Ki,m4Y:()=>fo,UMr:()=>Ii,w7C:()=>Ea,zt:()=>$a,Ltv:()=>Oa,UAC:()=>Eo,DCK:()=>dn,TUC:()=>zo,Agd:()=>Fo,t6C:()=>Bo,wXd:()=>Ao,ABi:()=>Ko,Ui6:()=>Zo,rGn:()=>No,ucG:()=>_o,YPH:()=>Io,Mol:()=>Po,PGu:()=>qo,GuW:()=>Ro,hkb:()=>li});var a=1e-6;function s(t){return"translate("+t+",0)"}function l(t){return"translate(0,"+t+")"}function h(t){return e=>+t(e)}function c(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function d(){return!this.__axis}function u(t,e){var r=[],i=null,o=null,u=6,p=6,g=3,f="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,y=1===t||4===t?-1:1,m=4===t||2===t?"x":"y",x=1===t||3===t?s:l;function C(s){var l=null==i?e.ticks?e.ticks.apply(e,r):e.domain():i,C=null==o?e.tickFormat?e.tickFormat.apply(e,r):n:o,b=Math.max(u,0)+g,k=e.range(),w=+k[0]+f,T=+k[k.length-1]+f,S=(e.bandwidth?c:h)(e.copy(),f),v=s.selection?s.selection():s,B=v.selectAll(".domain").data([null]),_=v.selectAll(".tick").data(l,e).order(),A=_.exit(),L=_.enter().append("g").attr("class","tick"),F=_.select("line"),M=_.select("text");B=B.merge(B.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),_=_.merge(L),F=F.merge(L.append("line").attr("stroke","currentColor").attr(m+"2",y*u)),M=M.merge(L.append("text").attr("fill","currentColor").attr(m,y*b).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),s!==v&&(B=B.transition(s),_=_.transition(s),F=F.transition(s),M=M.transition(s),A=A.transition(s).attr("opacity",a).attr("transform",function(t){return isFinite(t=S(t))?x(t+f):this.getAttribute("transform")}),L.attr("opacity",a).attr("transform",function(t){var e=this.parentNode.__axis;return x((e&&isFinite(e=e(t))?e:S(t))+f)})),A.remove(),B.attr("d",4===t||2===t?p?"M"+y*p+","+w+"H"+f+"V"+T+"H"+y*p:"M"+f+","+w+"V"+T:p?"M"+w+","+y*p+"V"+f+"H"+T+"V"+y*p:"M"+w+","+f+"H"+T),_.attr("opacity",1).attr("transform",function(t){return x(S(t)+f)}),F.attr(m+"2",y*u),M.attr(m,y*b).text(C),v.filter(d).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),v.each(function(){this.__axis=S})}return C.scale=function(t){return arguments.length?(e=t,C):e},C.ticks=function(){return r=Array.from(arguments),C},C.tickArguments=function(t){return arguments.length?(r=null==t?[]:Array.from(t),C):r.slice()},C.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),C):i&&i.slice()},C.tickFormat=function(t){return arguments.length?(o=t,C):o},C.tickSize=function(t){return arguments.length?(u=p=+t,C):u},C.tickSizeInner=function(t){return arguments.length?(u=+t,C):u},C.tickSizeOuter=function(t){return arguments.length?(p=+t,C):p},C.tickPadding=function(t){return arguments.length?(g=+t,C):g},C.offset=function(t){return arguments.length?(f=+t,C):f},C}function p(t){return u(1,t)}function g(t){return u(3,t)}function f(){}function y(t){return null==t?f:function(){return this.querySelector(t)}}function m(){return[]}function x(t){return null==t?m:function(){return this.querySelectorAll(t)}}function C(t){return function(){return null==(e=t.apply(this,arguments))?[]:Array.isArray(e)?e:Array.from(e);var e}}function b(t){return function(){return this.matches(t)}}function k(t){return function(e){return e.matches(t)}}var w=Array.prototype.find;function T(){return this.firstElementChild}var S=Array.prototype.filter;function v(){return Array.from(this.children)}function B(t){return new Array(t.length)}function _(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function A(t,e,r,i,o,n){for(var a,s=0,l=e.length,h=n.length;se?1:t>=e?0:NaN}_.prototype={constructor:_,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var $="http://www.w3.org/1999/xhtml";const O={svg:"http://www.w3.org/2000/svg",xhtml:$,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function D(t){var e=t+="",r=e.indexOf(":");return r>=0&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),O.hasOwnProperty(e)?{space:O[e],local:t}:t}function I(t){return function(){this.removeAttribute(t)}}function K(t){return function(){this.removeAttributeNS(t.space,t.local)}}function q(t,e){return function(){this.setAttribute(t,e)}}function R(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function P(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttribute(t):this.setAttribute(t,r)}}function z(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function N(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function j(t){return function(){this.style.removeProperty(t)}}function W(t,e,r){return function(){this.style.setProperty(t,e,r)}}function H(t,e,r){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}function U(t,e){return t.style.getPropertyValue(e)||N(t).getComputedStyle(t,null).getPropertyValue(e)}function Y(t){return function(){delete this[t]}}function G(t,e){return function(){this[t]=e}}function X(t,e){return function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}}function V(t){return t.trim().split(/^|\s+/)}function Z(t){return t.classList||new Q(t)}function Q(t){this._node=t,this._names=V(t.getAttribute("class")||"")}function J(t,e){for(var r=Z(t),i=-1,o=e.length;++i=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var St=[null];function vt(t,e){this._groups=t,this._parents=e}function Bt(){return new vt([[document.documentElement]],St)}vt.prototype=Bt.prototype={constructor:vt,select:function(t){"function"!=typeof t&&(t=y(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o=k&&(k=b+1);!(C=m[k])&&++k=0;)(i=o[n])&&(a&&4^i.compareDocumentPosition(a)&&a.parentNode.insertBefore(i,a),a=i);return this},sort:function(t){function e(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}t||(t=E);for(var r=this._groups,i=r.length,o=new Array(i),n=0;n1?this.each((null==e?j:"function"==typeof e?H:W)(t,e,null==r?"":r)):U(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Y:"function"==typeof e?X:G)(t,e)):this.node()[t]},classed:function(t,e){var r=V(t+"");if(arguments.length<2){for(var i=Z(this.node()),o=-1,n=r.length;++o=0&&(e=t.slice(r+1),t=t.slice(0,r)),{type:t,name:e}})}(t+""),a=n.length;if(!(arguments.length<2)){for(s=e?bt:Ct,i=0;i{}};function Lt(){for(var t,e=0,r=arguments.length,i={};e=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),a=-1,s=n.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a0)for(var r,i,o=new Array(r),n=0;n=0&&e._call.call(void 0,t),e=e._next;--It}()}finally{It=0,function(){var t,e,r=Ot,i=1/0;for(;r;)r._call?(i>r._time&&(i=r._time),t=r,r=r._next):(e=r._next,r._next=null,r=t?t._next=e:Ot=e);Dt=t,Vt(i)}(),Pt=0}}function Xt(){var t=Nt.now(),e=t-Rt;e>1e3&&(zt-=e,Rt=t)}function Vt(t){It||(Kt&&(Kt=clearTimeout(Kt)),t-Pt>24?(t<1/0&&(Kt=setTimeout(Gt,t-Nt.now()-zt)),qt&&(qt=clearInterval(qt))):(qt||(Rt=Nt.now(),qt=setInterval(Xt,1e3)),It=1,jt(Gt)))}function Zt(t,e,r){var i=new Ut;return e=null==e?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,r),i}Ut.prototype=Yt.prototype={constructor:Ut,restart:function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?Wt():+r)+(null==e?0:+e),this._next||Dt===this||(Dt?Dt._next=this:Ot=this,Dt=this),this._call=t,this._time=r,Vt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Vt())}};var Qt=$t("start","end","cancel","interrupt"),Jt=[];function te(t,e,r,i,o,n){var a=t.__transition;if(a){if(r in a)return}else t.__transition={};!function(t,e,r){var i,o=t.__transition;function n(t){r.state=1,r.timer.restart(a,r.delay,r.time),r.delay<=t&&a(t-r.delay)}function a(n){var h,c,d,u;if(1!==r.state)return l();for(h in o)if((u=o[h]).name===r.name){if(3===u.state)return Zt(a);4===u.state?(u.state=6,u.timer.stop(),u.on.call("interrupt",t,t.__data__,u.index,u.group),delete o[h]):+h0)throw new Error("too late; already scheduled");return r}function re(t,e){var r=ie(t,e);if(r.state>3)throw new Error("too late; already running");return r}function ie(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function oe(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var ne,ae=180/Math.PI,se={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function le(t,e,r,i,o,n){var a,s,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*r+e*i)&&(r-=t*l,i-=e*l),(s=Math.sqrt(r*r+i*i))&&(r/=s,i/=s,l/=s),t*i180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(o(r)+"rotate(",null,i)-2,x:oe(t,e)})):e&&r.push(o(r)+"rotate("+e+i)}(n.rotate,a.rotate,s,l),function(t,e,r,n){t!==e?n.push({i:r.push(o(r)+"skewX(",null,i)-2,x:oe(t,e)}):e&&r.push(o(r)+"skewX("+e+i)}(n.skewX,a.skewX,s,l),function(t,e,r,i,n,a){if(t!==r||e!==i){var s=n.push(o(n)+"scale(",null,",",null,")");a.push({i:s-4,x:oe(t,r)},{i:s-2,x:oe(e,i)})}else 1===r&&1===i||n.push(o(n)+"scale("+r+","+i+")")}(n.scaleX,n.scaleY,a.scaleX,a.scaleY,s,l),n=a=null,function(t){for(var e,r=-1,i=l.length;++r>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?De(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?De(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Se.exec(t))?new qe(e[1],e[2],e[3],1):(e=ve.exec(t))?new qe(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Be.exec(t))?De(e[1],e[2],e[3],e[4]):(e=_e.exec(t))?De(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ae.exec(t))?We(e[1],e[2]/100,e[3]/100,1):(e=Le.exec(t))?We(e[1],e[2]/100,e[3]/100,e[4]):Fe.hasOwnProperty(t)?Oe(Fe[t]):"transparent"===t?new qe(NaN,NaN,NaN,0):null}function Oe(t){return new qe(t>>16&255,t>>8&255,255&t,1)}function De(t,e,r,i){return i<=0&&(t=e=r=NaN),new qe(t,e,r,i)}function Ie(t){return t instanceof me||(t=$e(t)),t?new qe((t=t.rgb()).r,t.g,t.b,t.opacity):new qe}function Ke(t,e,r,i){return 1===arguments.length?Ie(t):new qe(t,e,r,null==i?1:i)}function qe(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}function Re(){return`#${je(this.r)}${je(this.g)}${je(this.b)}`}function Pe(){const t=ze(this.opacity);return`${1===t?"rgb(":"rgba("}${Ne(this.r)}, ${Ne(this.g)}, ${Ne(this.b)}${1===t?")":`, ${t})`}`}function ze(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ne(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function je(t){return((t=Ne(t))<16?"0":"")+t.toString(16)}function We(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Ue(t,e,r,i)}function He(t){if(t instanceof Ue)return new Ue(t.h,t.s,t.l,t.opacity);if(t instanceof me||(t=$e(t)),!t)return new Ue;if(t instanceof Ue)return t;var e=(t=t.rgb()).r/255,r=t.g/255,i=t.b/255,o=Math.min(e,r,i),n=Math.max(e,r,i),a=NaN,s=n-o,l=(n+o)/2;return s?(a=e===n?(r-i)/s+6*(r0&&l<1?0:a,new Ue(a,s,l,t.opacity)}function Ue(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}function Ye(t){return(t=(t||0)%360)<0?t+360:t}function Ge(t){return Math.max(0,Math.min(1,t||0))}function Xe(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}function Ve(t,e,r,i,o){var n=t*t,a=n*t;return((1-3*t+3*n-a)*e+(4-6*n+3*a)*r+(1+3*t+3*n-3*a)*i+a*o)/6}fe(me,$e,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Me,formatHex:Me,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return He(this).formatHsl()},formatRgb:Ee,toString:Ee}),fe(qe,Ke,ye(me,{brighter(t){return t=null==t?Ce:Math.pow(Ce,t),new qe(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?xe:Math.pow(xe,t),new qe(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new qe(Ne(this.r),Ne(this.g),Ne(this.b),ze(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Re,formatHex:Re,formatHex8:function(){return`#${je(this.r)}${je(this.g)}${je(this.b)}${je(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Pe,toString:Pe})),fe(Ue,function(t,e,r,i){return 1===arguments.length?He(t):new Ue(t,e,r,null==i?1:i)},ye(me,{brighter(t){return t=null==t?Ce:Math.pow(Ce,t),new Ue(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?xe:Math.pow(xe,t),new Ue(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*e,o=2*r-i;return new qe(Xe(t>=240?t-240:t+120,o,i),Xe(t,o,i),Xe(t<120?t+240:t-120,o,i),this.opacity)},clamp(){return new Ue(Ye(this.h),Ge(this.s),Ge(this.l),ze(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=ze(this.opacity);return`${1===t?"hsl(":"hsla("}${Ye(this.h)}, ${100*Ge(this.s)}%, ${100*Ge(this.l)}%${1===t?")":`, ${t})`}`}}));const Ze=t=>()=>t;function Qe(t,e){return function(r){return t+r*e}}function Je(t){return 1===(t=+t)?tr:function(e,r){return r-e?function(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(i){return Math.pow(t+i*e,r)}}(e,r,t):Ze(isNaN(e)?r:e)}}function tr(t,e){var r=e-t;return r?Qe(t,r):Ze(isNaN(t)?e:t)}const er=function t(e){var r=Je(e);function i(t,e){var i=r((t=Ke(t)).r,(e=Ke(e)).r),o=r(t.g,e.g),n=r(t.b,e.b),a=tr(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=o(e),t.b=n(e),t.opacity=a(e),t+""}}return i.gamma=t,i}(1);function rr(t){return function(e){var r,i,o=e.length,n=new Array(o),a=new Array(o),s=new Array(o);for(r=0;r=1?(r=1,e-1):Math.floor(r*e),o=t[i],n=t[i+1],a=i>0?t[i-1]:2*o-n,s=in&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:oe(r,i)})),n=or.lastIndex;return n=0&&(t=t.slice(0,e)),!t||"start"===t})}(e)?ee:re;return function(){var a=n(this,t),s=a.on;s!==i&&(o=(i=s).copy()).on(e,r),a.on=o}}(r,t,e))},attr:function(t,e){var r=D(t),i="transform"===r?de:ar;return this.attrTween(t,"function"==typeof e?(r.local?ur:dr)(r,i,ge(this,"attr."+t,e)):null==e?(r.local?lr:sr)(r):(r.local?cr:hr)(r,i,e))},attrTween:function(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;var i=D(t);return this.tween(r,(i.local?pr:gr)(i,e))},style:function(t,e,r){var i="transform"==(t+="")?ce:ar;return null==e?this.styleTween(t,function(t,e){var r,i,o;return function(){var n=U(this,t),a=(this.style.removeProperty(t),U(this,t));return n===a?null:n===r&&a===i?o:o=e(r=n,i=a)}}(t,i)).on("end.style."+t,br(t)):"function"==typeof e?this.styleTween(t,function(t,e,r){var i,o,n;return function(){var a=U(this,t),s=r(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=U(this,t)),a===l?null:a===i&&l===o?n:(o=l,n=e(i=a,s))}}(t,i,ge(this,"style."+t,e))).each(function(t,e){var r,i,o,n,a="style."+e,s="end."+a;return function(){var l=re(this,t),h=l.on,c=null==l.value[a]?n||(n=br(e)):void 0;h===r&&o===c||(i=(r=h).copy()).on(s,o=c),l.on=i}}(this._id,t)):this.styleTween(t,function(t,e,r){var i,o,n=r+"";return function(){var a=U(this,t);return a===n?null:a===i?o:o=e(i=a,r)}}(t,i,e),r).on("end.style."+t,null)},styleTween:function(t,e,r){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;return this.tween(i,function(t,e,r){var i,o;function n(){var n=e.apply(this,arguments);return n!==o&&(i=(o=n)&&function(t,e,r){return function(i){this.style.setProperty(t,e.call(this,i),r)}}(t,n,r)),i}return n._value=e,n}(t,e,null==r?"":r))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(ge(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,r;function i(){var i=t.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t){return function(e){this.textContent=t.call(this,e)}}(i)),e}return i._value=t,i}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var r=this._id;if(t+="",arguments.length<2){for(var i,o=ie(this.node(),r).tween,n=0,a=o.length;n2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[o]):a=!1;a&&delete t.__transition}}(this,t)})},_t.prototype.transition=function(t){var e,r;t instanceof wr?(e=t._id,t=t._name):(e=Tr(),(r=vr).time=Wt(),t=null==t?null:t+"");for(var i=this._groups,o=i.length,n=0;n1?i[0]+i.slice(2):i,+t.slice(r+1)]}function Or(t){return(t=$r(Math.abs(t)))?t[1]:NaN}var Dr,Ir=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Kr(t){if(!(e=Ir.exec(t)))throw new Error("invalid format: "+t);var e;return new qr({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function qr(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Rr(t,e){var r=$r(t,e);if(!r)return t+"";var i=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}Kr.prototype=qr.prototype,qr.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const Pr={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Rr(100*t,e),r:Rr,s:function(t,e){var r=$r(t,e);if(!r)return Dr=void 0,t.toPrecision(e);var i=r[0],o=r[1],n=o-(Dr=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=i.length;return n===a?i:n>a?i+new Array(n-a+1).join("0"):n>0?i.slice(0,n)+"."+i.slice(n):"0."+new Array(1-n).join("0")+$r(t,Math.max(0,e+n-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function zr(t){return t}var Nr,jr,Wr,Hr=Array.prototype.map,Ur=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function Yr(t){var e,r,i=void 0===t.grouping||void 0===t.thousands?zr:(e=Hr.call(t.grouping,Number),r=t.thousands+"",function(t,i){for(var o=t.length,n=[],a=0,s=e[0],l=0;o>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),n.push(t.substring(o-=s,o+s)),!((l+=s+1)>i));)s=e[a=(a+1)%e.length];return n.reverse().join(r)}),o=void 0===t.currency?"":t.currency[0]+"",n=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?zr:function(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}(Hr.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",h=void 0===t.minus?"\u2212":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function d(t,e){var r=(t=Kr(t)).fill,d=t.align,u=t.sign,p=t.symbol,g=t.zero,f=t.width,y=t.comma,m=t.precision,x=t.trim,C=t.type;"n"===C?(y=!0,C="g"):Pr[C]||(void 0===m&&(m=12),x=!0,C="g"),(g||"0"===r&&"="===d)&&(g=!0,r="0",d="=");var b=(e&&void 0!==e.prefix?e.prefix:"")+("$"===p?o:"#"===p&&/[boxX]/.test(C)?"0"+C.toLowerCase():""),k=("$"===p?n:/[%p]/.test(C)?l:"")+(e&&void 0!==e.suffix?e.suffix:""),w=Pr[C],T=/[defgprs%]/.test(C);function S(t){var e,o,n,l=b,p=k;if("c"===C)p=w(t)+p,t="";else{var S=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:w(Math.abs(t),m),x&&(t=function(t){t:for(var e,r=t.length,i=1,o=-1;i0&&(o=0)}return o>0?t.slice(0,o)+t.slice(e+1):t}(t)),S&&0===+t&&"+"!==u&&(S=!1),l=(S?"("===u?u:h:"-"===u||"("===u?"":u)+l,p=("s"!==C||isNaN(t)||void 0===Dr?"":Ur[8+Dr/3])+p+(S&&"("===u?")":""),T)for(e=-1,o=t.length;++e(n=t.charCodeAt(e))||n>57){p=(46===n?a+t.slice(e+1):t.slice(e))+p,t=t.slice(0,e);break}}y&&!g&&(t=i(t,1/0));var v=l.length+t.length+p.length,B=v>1)+l+t+p+B.slice(v);break;default:t=B+l+t+p}return s(t)}return m=void 0===m?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),S.toString=function(){return t+""},S}return{format:d,formatPrefix:function(t,e){var r=3*Math.max(-8,Math.min(8,Math.floor(Or(e)/3))),i=Math.pow(10,-r),o=d(((t=Kr(t)).type="f",t),{suffix:Ur[8+r/3]});return function(t){return o(i*t)}}}}function Gr(t){var e=0,r=t.children,i=r&&r.length;if(i)for(;--i>=0;)e+=r[i].value;else e=1;t.value=e}function Xr(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=Zr)):void 0===e&&(e=Vr);for(var r,i,o,n,a,s=new ti(t),l=[s];r=l.pop();)if((o=e(r.data))&&(a=(o=Array.from(o)).length))for(r.children=o,n=a-1;n>=0;--n)l.push(i=o[n]=new ti(o[n])),i.parent=r,i.depth=r.depth+1;return s.eachBefore(Jr)}function Vr(t){return t.children}function Zr(t){return Array.isArray(t)?t[1]:null}function Qr(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Jr(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function ti(t){this.data=t,this.depth=this.height=0,this.parent=null}function ei(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function ri(t,e,r,i,o){for(var n,a=t.children,s=-1,l=a.length,h=t.value&&(i-e)/t.value;++s=0;--i)n.push(r[i]);return this},find:function(t,e){let r=-1;for(const i of this)if(t.call(e,i,++r,this))return i},sum:function(t){return this.eachAfter(function(e){for(var r=+t(e.data)||0,i=e.children,o=i&&i.length;--o>=0;)r+=i[o].value;e.value=r})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,r=function(t,e){if(t===e)return t;var r=t.ancestors(),i=e.ancestors(),o=null;t=r.pop(),e=i.pop();for(;t===e;)o=t,t=r.pop(),e=i.pop();return o}(e,t),i=[e];e!==r;)e=e.parent,i.push(e);for(var o=i.length;t!==r;)i.splice(o,0,t),t=t.parent;return i},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(r){r!==t&&e.push({source:r.parent,target:r})}),e},copy:function(){return Xr(this).eachBefore(Qr)},[Symbol.iterator]:function*(){var t,e,r,i,o=this,n=[o];do{for(t=n.reverse(),n=[];o=t.pop();)if(yield o,e=o.children)for(r=0,i=e.length;ru&&(u=s),y=c*c*f,(p=Math.max(u/y,y/d))>g){c-=s;break}g=p}m.push(a={value:c,dice:l1?e:1)},r}((1+Math.sqrt(5))/2);function ni(t){if("function"!=typeof t)throw new Error;return t}function ai(){return 0}function si(t){return function(){return t}}function li(){var t=oi,e=!1,r=1,i=1,o=[0],n=ai,a=ai,s=ai,l=ai,h=ai;function c(t){return t.x0=t.y0=0,t.x1=r,t.y1=i,t.eachBefore(d),o=[0],e&&t.eachBefore(ei),t}function d(e){var r=o[e.depth],i=e.x0+r,c=e.y0+r,d=e.x1-r,u=e.y1-r;dyi?Math.pow(t,1/3):t/fi+pi}function bi(t){return t>gi?t*t*t:fi*(t-pi)}function ki(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function wi(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Ti(t){if(t instanceof vi)return new vi(t.h,t.c,t.l,t.opacity);if(t instanceof xi||(t=mi(t)),0===t.a&&0===t.b)return new vi(NaN,0180||r<-180?r-360*Math.round(r/360):r):Ze(isNaN(t)?e:t)});_i(tr);function Li(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}class Fi extends Map{constructor(t,e=Oi){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(Mi(this,t))}has(t){return super.has(Mi(this,t))}set(t,e){return super.set(Ei(this,t),e)}delete(t){return super.delete($i(this,t))}}Set;function Mi({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):r}function Ei({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):(t.set(i,r),r)}function $i({_intern:t,_key:e},r){const i=e(r);return t.has(i)&&(r=t.get(i),t.delete(i)),r}function Oi(t){return null!==t&&"object"==typeof t?t.valueOf():t}const Di=Symbol("implicit");function Ii(){var t=new Fi,e=[],r=[],i=Di;function o(o){let n=t.get(o);if(void 0===n){if(i!==Di)return i;t.set(o,n=e.push(o)-1)}return r[n%r.length]}return o.domain=function(r){if(!arguments.length)return e.slice();e=[],t=new Fi;for(const i of r)t.has(i)||t.set(i,e.push(i)-1);return o},o.range=function(t){return arguments.length?(r=Array.from(t),o):r.slice()},o.unknown=function(t){return arguments.length?(i=t,o):i},o.copy=function(){return Ii(e,r).unknown(i)},Li.apply(o,arguments),o}function Ki(){var t,e,r=Ii().unknown(void 0),i=r.domain,o=r.range,n=0,a=1,s=!1,l=0,h=0,c=.5;function d(){var r=i().length,d=a=qi?10:n>=Ri?5:n>=Pi?2:1;let s,l,h;return o<0?(h=Math.pow(10,-o)/a,s=Math.round(t*h),l=Math.round(e*h),s/he&&--l,h=-h):(h=Math.pow(10,o)*a,s=Math.round(t/h),l=Math.round(e/h),s*he&&--l),le?1:t>=e?0:NaN}function Hi(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function Ui(t){let e,r,i;function o(t,i,o=0,n=t.length){if(o>>1;r(t[e],i)<0?o=e+1:n=e}while(oWi(t(e),r),i=(e,r)=>t(e)-r):(e=t===Wi||t===Hi?t:Yi,r=t,i=t),{left:o,center:function(t,e,r=0,n=t.length){const a=o(t,e,r,n-1);return a>r&&i(t[a-1],e)>-i(t[a],e)?a-1:a},right:function(t,i,o=0,n=t.length){if(o>>1;r(t[e],i)<=0?o=e+1:n=e}while(oe&&(r=t,t=e,e=r),h=function(r){return Math.max(t,Math.min(e,r))}),i=l>2?lo:so,o=n=null,d}function d(e){return null==e||isNaN(e=+e)?r:(o||(o=i(a.map(t),s,l)))(t(h(e)))}return d.invert=function(r){return h(e((n||(n=i(s,a.map(t),oe)))(r)))},d.domain=function(t){return arguments.length?(a=Array.from(t,io),c()):a.slice()},d.range=function(t){return arguments.length?(s=Array.from(t),c()):s.slice()},d.rangeRound=function(t){return s=Array.from(t),l=ro,c()},d.clamp=function(t){return arguments.length?(h=!!t||no,c()):h!==no},d.interpolate=function(t){return arguments.length?(l=t,c()):l},d.unknown=function(t){return arguments.length?(r=t,d):r},function(r,i){return t=r,e=i,c()}}function uo(){return co()(no,no)}function po(t,e,r,i){var o,n=ji(t,e,r);switch((i=Kr(null==i?",f":i)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(e));return null!=i.precision||isNaN(o=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Or(e)/3)))-Or(Math.abs(t)))}(n,a))||(i.precision=o),Wr(i,a);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(o=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Or(e)-Or(t))+1}(n,Math.max(Math.abs(t),Math.abs(e))))||(i.precision=o-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(o=function(t){return Math.max(0,-Or(Math.abs(t)))}(n))||(i.precision=o-2*("%"===i.type))}return jr(i)}function go(t){var e=t.domain;return t.ticks=function(t){var r=e();return function(t,e,r){if(!((r=+r)>0))return[];if((t=+t)===(e=+e))return[t];const i=e=o))return[];const s=n-o+1,l=new Array(s);if(i)if(a<0)for(let h=0;h0;){if((o=Ni(l,h,r))===i)return n[a]=l,n[s]=h,e(n);if(o>0)l=Math.floor(l/o)*o,h=Math.ceil(h/o)*o;else{if(!(o<0))break;l=Math.ceil(l*o)/o,h=Math.floor(h*o)/o}i=o}return t},t}function fo(){var t=uo();return t.copy=function(){return ho(t,fo())},Li.apply(t,arguments),go(t)}const yo=1e3,mo=6e4,xo=36e5,Co=864e5,bo=6048e5,ko=2592e6,wo=31536e6,To=new Date,So=new Date;function vo(t,e,r,i){function o(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return o.floor=e=>(t(e=new Date(+e)),e),o.ceil=r=>(t(r=new Date(r-1)),e(r,1),t(r),r),o.round=t=>{const e=o(t),r=o.ceil(t);return t-e(e(t=new Date(+t),null==r?1:Math.floor(r)),t),o.range=(r,i,n)=>{const a=[];if(r=o.ceil(r),n=null==n?1:Math.floor(n),!(r0))return a;let s;do{a.push(s=new Date(+r)),e(r,n),t(r)}while(svo(e=>{if(e>=e)for(;t(e),!r(e);)e.setTime(e-1)},(t,i)=>{if(t>=t)if(i<0)for(;++i<=0;)for(;e(t,-1),!r(t););else for(;--i>=0;)for(;e(t,1),!r(t););}),r&&(o.count=(e,i)=>(To.setTime(+e),So.setTime(+i),t(To),t(So),Math.floor(r(To,So))),o.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?o.filter(i?e=>i(e)%t===0:e=>o.count(0,e)%t===0):o:null)),o}const Bo=vo(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Bo.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?vo(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):Bo:null);Bo.range;const _o=vo(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*yo)},(t,e)=>(e-t)/yo,t=>t.getUTCSeconds()),Ao=(_o.range,vo(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*yo)},(t,e)=>{t.setTime(+t+e*mo)},(t,e)=>(e-t)/mo,t=>t.getMinutes())),Lo=(Ao.range,vo(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*mo)},(t,e)=>(e-t)/mo,t=>t.getUTCMinutes())),Fo=(Lo.range,vo(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*yo-t.getMinutes()*mo)},(t,e)=>{t.setTime(+t+e*xo)},(t,e)=>(e-t)/xo,t=>t.getHours())),Mo=(Fo.range,vo(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*xo)},(t,e)=>(e-t)/xo,t=>t.getUTCHours())),Eo=(Mo.range,vo(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*mo)/Co,t=>t.getDate()-1)),$o=(Eo.range,vo(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Co,t=>t.getUTCDate()-1)),Oo=($o.range,vo(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Co,t=>Math.floor(t/Co)));Oo.range;function Do(t){return vo(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(t,e)=>{t.setDate(t.getDate()+7*e)},(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*mo)/bo)}const Io=Do(0),Ko=Do(1),qo=Do(2),Ro=Do(3),Po=Do(4),zo=Do(5),No=Do(6);Io.range,Ko.range,qo.range,Ro.range,Po.range,zo.range,No.range;function jo(t){return vo(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)},(t,e)=>(e-t)/bo)}const Wo=jo(0),Ho=jo(1),Uo=jo(2),Yo=jo(3),Go=jo(4),Xo=jo(5),Vo=jo(6),Zo=(Wo.range,Ho.range,Uo.range,Yo.range,Go.range,Xo.range,Vo.range,vo(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear()),t=>t.getMonth())),Qo=(Zo.range,vo(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear()),t=>t.getUTCMonth())),Jo=(Qo.range,vo(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear()));Jo.every=t=>isFinite(t=Math.floor(t))&&t>0?vo(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)}):null;Jo.range;const tn=vo(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());tn.every=t=>isFinite(t=Math.floor(t))&&t>0?vo(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)}):null;tn.range;function en(t,e,r,i,o,n){const a=[[_o,1,yo],[_o,5,5e3],[_o,15,15e3],[_o,30,3e4],[n,1,mo],[n,5,3e5],[n,15,9e5],[n,30,18e5],[o,1,xo],[o,3,108e5],[o,6,216e5],[o,12,432e5],[i,1,Co],[i,2,1728e5],[r,1,bo],[e,1,ko],[e,3,7776e6],[t,1,wo]];function s(e,r,i){const o=Math.abs(r-e)/i,n=Ui(([,,t])=>t).right(a,o);if(n===a.length)return t.every(ji(e/wo,r/wo,i));if(0===n)return Bo.every(Math.max(ji(e,r,i),1));const[s,l]=a[o/a[n-1][2][t.toLowerCase(),e]))}function bn(t,e,r){var i=pn.exec(e.slice(r,r+1));return i?(t.w=+i[0],r+i[0].length):-1}function kn(t,e,r){var i=pn.exec(e.slice(r,r+1));return i?(t.u=+i[0],r+i[0].length):-1}function wn(t,e,r){var i=pn.exec(e.slice(r,r+2));return i?(t.U=+i[0],r+i[0].length):-1}function Tn(t,e,r){var i=pn.exec(e.slice(r,r+2));return i?(t.V=+i[0],r+i[0].length):-1}function Sn(t,e,r){var i=pn.exec(e.slice(r,r+2));return i?(t.W=+i[0],r+i[0].length):-1}function vn(t,e,r){var i=pn.exec(e.slice(r,r+4));return i?(t.y=+i[0],r+i[0].length):-1}function Bn(t,e,r){var i=pn.exec(e.slice(r,r+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function _n(t,e,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function An(t,e,r){var i=pn.exec(e.slice(r,r+1));return i?(t.q=3*i[0]-3,r+i[0].length):-1}function Ln(t,e,r){var i=pn.exec(e.slice(r,r+2));return i?(t.m=i[0]-1,r+i[0].length):-1}function Fn(t,e,r){var i=pn.exec(e.slice(r,r+2));return i?(t.d=+i[0],r+i[0].length):-1}function Mn(t,e,r){var i=pn.exec(e.slice(r,r+3));return i?(t.m=0,t.d=+i[0],r+i[0].length):-1}function En(t,e,r){var i=pn.exec(e.slice(r,r+2));return i?(t.H=+i[0],r+i[0].length):-1}function $n(t,e,r){var i=pn.exec(e.slice(r,r+2));return i?(t.M=+i[0],r+i[0].length):-1}function On(t,e,r){var i=pn.exec(e.slice(r,r+2));return i?(t.S=+i[0],r+i[0].length):-1}function Dn(t,e,r){var i=pn.exec(e.slice(r,r+3));return i?(t.L=+i[0],r+i[0].length):-1}function In(t,e,r){var i=pn.exec(e.slice(r,r+6));return i?(t.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function Kn(t,e,r){var i=gn.exec(e.slice(r,r+1));return i?r+i[0].length:-1}function qn(t,e,r){var i=pn.exec(e.slice(r));return i?(t.Q=+i[0],r+i[0].length):-1}function Rn(t,e,r){var i=pn.exec(e.slice(r));return i?(t.s=+i[0],r+i[0].length):-1}function Pn(t,e){return yn(t.getDate(),e,2)}function zn(t,e){return yn(t.getHours(),e,2)}function Nn(t,e){return yn(t.getHours()%12||12,e,2)}function jn(t,e){return yn(1+Eo.count(Jo(t),t),e,3)}function Wn(t,e){return yn(t.getMilliseconds(),e,3)}function Hn(t,e){return Wn(t,e)+"000"}function Un(t,e){return yn(t.getMonth()+1,e,2)}function Yn(t,e){return yn(t.getMinutes(),e,2)}function Gn(t,e){return yn(t.getSeconds(),e,2)}function Xn(t){var e=t.getDay();return 0===e?7:e}function Vn(t,e){return yn(Io.count(Jo(t)-1,t),e,2)}function Zn(t){var e=t.getDay();return e>=4||0===e?Po(t):Po.ceil(t)}function Qn(t,e){return t=Zn(t),yn(Po.count(Jo(t),t)+(4===Jo(t).getDay()),e,2)}function Jn(t){return t.getDay()}function ta(t,e){return yn(Ko.count(Jo(t)-1,t),e,2)}function ea(t,e){return yn(t.getFullYear()%100,e,2)}function ra(t,e){return yn((t=Zn(t)).getFullYear()%100,e,2)}function ia(t,e){return yn(t.getFullYear()%1e4,e,4)}function oa(t,e){var r=t.getDay();return yn((t=r>=4||0===r?Po(t):Po.ceil(t)).getFullYear()%1e4,e,4)}function na(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+yn(e/60|0,"0",2)+yn(e%60,"0",2)}function aa(t,e){return yn(t.getUTCDate(),e,2)}function sa(t,e){return yn(t.getUTCHours(),e,2)}function la(t,e){return yn(t.getUTCHours()%12||12,e,2)}function ha(t,e){return yn(1+$o.count(tn(t),t),e,3)}function ca(t,e){return yn(t.getUTCMilliseconds(),e,3)}function da(t,e){return ca(t,e)+"000"}function ua(t,e){return yn(t.getUTCMonth()+1,e,2)}function pa(t,e){return yn(t.getUTCMinutes(),e,2)}function ga(t,e){return yn(t.getUTCSeconds(),e,2)}function fa(t){var e=t.getUTCDay();return 0===e?7:e}function ya(t,e){return yn(Wo.count(tn(t)-1,t),e,2)}function ma(t){var e=t.getUTCDay();return e>=4||0===e?Go(t):Go.ceil(t)}function xa(t,e){return t=ma(t),yn(Go.count(tn(t),t)+(4===tn(t).getUTCDay()),e,2)}function Ca(t){return t.getUTCDay()}function ba(t,e){return yn(Ho.count(tn(t)-1,t),e,2)}function ka(t,e){return yn(t.getUTCFullYear()%100,e,2)}function wa(t,e){return yn((t=ma(t)).getUTCFullYear()%100,e,2)}function Ta(t,e){return yn(t.getUTCFullYear()%1e4,e,4)}function Sa(t,e){var r=t.getUTCDay();return yn((t=r>=4||0===r?Go(t):Go.ceil(t)).getUTCFullYear()%1e4,e,4)}function va(){return"+0000"}function Ba(){return"%"}function _a(t){return+t}function Aa(t){return Math.floor(+t/1e3)}function La(t){return new Date(t)}function Fa(t){return t instanceof Date?+t:+new Date(+t)}function Ma(t,e,r,i,o,n,a,s,l,h){var c=uo(),d=c.invert,u=c.domain,p=h(".%L"),g=h(":%S"),f=h("%I:%M"),y=h("%I %p"),m=h("%a %d"),x=h("%b %d"),C=h("%B"),b=h("%Y");function k(t){return(l(t)=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:_a,s:Aa,S:Gn,u:Xn,U:Vn,V:Qn,w:Jn,W:ta,x:null,X:null,y:ea,Y:ia,Z:na,"%":Ba},b={a:function(t){return a[t.getUTCDay()]},A:function(t){return n[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:aa,e:aa,f:da,g:wa,G:Sa,H:sa,I:la,j:ha,L:ca,m:ua,M:pa,p:function(t){return o[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:_a,s:Aa,S:ga,u:fa,U:ya,V:xa,w:Ca,W:ba,x:null,X:null,y:ka,Y:Ta,Z:va,"%":Ba},k={a:function(t,e,r){var i=p.exec(e.slice(r));return i?(t.w=g.get(i[0].toLowerCase()),r+i[0].length):-1},A:function(t,e,r){var i=d.exec(e.slice(r));return i?(t.w=u.get(i[0].toLowerCase()),r+i[0].length):-1},b:function(t,e,r){var i=m.exec(e.slice(r));return i?(t.m=x.get(i[0].toLowerCase()),r+i[0].length):-1},B:function(t,e,r){var i=f.exec(e.slice(r));return i?(t.m=y.get(i[0].toLowerCase()),r+i[0].length):-1},c:function(t,r,i){return S(t,e,r,i)},d:Fn,e:Fn,f:In,g:Bn,G:vn,H:En,I:En,j:Mn,L:Dn,m:Ln,M:$n,p:function(t,e,r){var i=h.exec(e.slice(r));return i?(t.p=c.get(i[0].toLowerCase()),r+i[0].length):-1},q:An,Q:qn,s:Rn,S:On,u:kn,U:wn,V:Tn,w:bn,W:Sn,x:function(t,e,i){return S(t,r,e,i)},X:function(t,e,r){return S(t,i,e,r)},y:Bn,Y:vn,Z:_n,"%":Kn};function w(t,e){return function(r){var i,o,n,a=[],s=-1,l=0,h=t.length;for(r instanceof Date||(r=new Date(+r));++s53)return null;"w"in n||(n.w=1),"Z"in n?(o=(i=ln(hn(n.y,0,1))).getUTCDay(),i=o>4||0===o?Ho.ceil(i):Ho(i),i=$o.offset(i,7*(n.V-1)),n.y=i.getUTCFullYear(),n.m=i.getUTCMonth(),n.d=i.getUTCDate()+(n.w+6)%7):(o=(i=sn(hn(n.y,0,1))).getDay(),i=o>4||0===o?Ko.ceil(i):Ko(i),i=Eo.offset(i,7*(n.V-1)),n.y=i.getFullYear(),n.m=i.getMonth(),n.d=i.getDate()+(n.w+6)%7)}else("W"in n||"U"in n)&&("w"in n||(n.w="u"in n?n.u%7:"W"in n?1:0),o="Z"in n?ln(hn(n.y,0,1)).getUTCDay():sn(hn(n.y,0,1)).getDay(),n.m=0,n.d="W"in n?(n.w+6)%7+7*n.W-(o+5)%7:n.w+7*n.U-(o+6)%7);return"Z"in n?(n.H+=n.Z/100|0,n.M+=n.Z%100,ln(n)):sn(n)}}function S(t,e,r,i){for(var o,n,a=0,s=e.length,l=r.length;a=l)return-1;if(37===(o=e.charCodeAt(a++))){if(o=e.charAt(a++),!(n=k[o in un?e.charAt(a++):o])||(i=n(t,r,i))<0)return-1}else if(o!=r.charCodeAt(i++))return-1}return i}return C.x=w(r,C),C.X=w(i,C),C.c=w(e,C),b.x=w(r,b),b.X=w(i,b),b.c=w(e,b),{format:function(t){var e=w(t+="",C);return e.toString=function(){return t},e},parse:function(t){var e=T(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=T(t+="",!0);return e.toString=function(){return t},e}}}(t),dn=cn.format,cn.parse,cn.utcFormat,cn.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});const $a=function(t){for(var e=t.length/6|0,r=new Array(e),i=0;i=1?Ha:t<=-1?-Ha:Math.asin(t)}const Ga=Math.PI,Xa=2*Ga,Va=1e-6,Za=Xa-Va;function Qa(t){this._+=t[0];for(let e=1,r=t.length;e=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Qa;const r=10**e;return function(t){this._+=t[0];for(let e=1,i=t.length;eVa)if(Math.abs(c*s-l*h)>Va&&o){let u=r-n,p=i-a,g=s*s+l*l,f=u*u+p*p,y=Math.sqrt(g),m=Math.sqrt(d),x=o*Math.tan((Ga-Math.acos((g+d-f)/(2*y*m)))/2),C=x/m,b=x/y;Math.abs(C-1)>Va&&this._append`L${t+C*h},${e+C*c}`,this._append`A${o},${o},0,0,${+(c*u>h*p)},${this._x1=t+b*s},${this._y1=e+b*l}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,r,i,o,n){if(t=+t,e=+e,n=!!n,(r=+r)<0)throw new Error(`negative radius: ${r}`);let a=r*Math.cos(i),s=r*Math.sin(i),l=t+a,h=e+s,c=1^n,d=n?i-o:o-i;null===this._x1?this._append`M${l},${h}`:(Math.abs(this._x1-l)>Va||Math.abs(this._y1-h)>Va)&&this._append`L${l},${h}`,r&&(d<0&&(d=d%Xa+Xa),d>Za?this._append`A${r},${r},0,1,${c},${t-a},${e-s}A${r},${r},0,1,${c},${this._x1=l},${this._y1=h}`:d>Va&&this._append`A${r},${r},0,${+(d>=Ga)},${c},${this._x1=t+r*Math.cos(o)},${this._y1=e+r*Math.sin(o)}`)}rect(t,e,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function ts(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(null==r)e=null;else{const t=Math.floor(r);if(!(t>=0))throw new RangeError(`invalid digits: ${r}`);e=t}return t},()=>new Ja(e)}function es(t){return t.innerRadius}function rs(t){return t.outerRadius}function is(t){return t.startAngle}function os(t){return t.endAngle}function ns(t){return t&&t.padAngle}function as(t,e,r,i,o,n,a){var s=t-r,l=e-i,h=(a?n:-n)/Na(s*s+l*l),c=h*l,d=-h*s,u=t+c,p=e+d,g=r+c,f=i+d,y=(u+g)/2,m=(p+f)/2,x=g-u,C=f-p,b=x*x+C*C,k=o-n,w=u*f-g*p,T=(C<0?-1:1)*Na(Ra(0,k*k*b-w*w)),S=(w*C-x*T)/b,v=(-w*x-C*T)/b,B=(w*C+x*T)/b,_=(-w*x+C*T)/b,A=S-y,L=v-m,F=B-y,M=_-m;return A*A+L*L>F*F+M*M&&(S=B,v=_),{cx:S,cy:v,x01:-c,y01:-d,x11:S*(o/k-1),y11:v*(o/k-1)}}function ss(){var t=es,e=rs,r=Da(0),i=null,o=is,n=os,a=ns,s=null,l=ts(h);function h(){var h,c,d,u=+t.apply(this,arguments),p=+e.apply(this,arguments),g=o.apply(this,arguments)-Ha,f=n.apply(this,arguments)-Ha,y=Ia(f-g),m=f>g;if(s||(s=h=l()),pja)if(y>Ua-ja)s.moveTo(p*qa(g),p*za(g)),s.arc(0,0,p,g,f,!m),u>ja&&(s.moveTo(u*qa(f),u*za(f)),s.arc(0,0,u,f,g,m));else{var x,C,b=g,k=f,w=g,T=f,S=y,v=y,B=a.apply(this,arguments)/2,_=B>ja&&(i?+i.apply(this,arguments):Na(u*u+p*p)),A=Pa(Ia(p-u)/2,+r.apply(this,arguments)),L=A,F=A;if(_>ja){var M=Ya(_/u*za(B)),E=Ya(_/p*za(B));(S-=2*M)>ja?(w+=M*=m?1:-1,T-=M):(S=0,w=T=(g+f)/2),(v-=2*E)>ja?(b+=E*=m?1:-1,k-=E):(v=0,b=k=(g+f)/2)}var $=p*qa(b),O=p*za(b),D=u*qa(T),I=u*za(T);if(A>ja){var K,q=p*qa(k),R=p*za(k),P=u*qa(w),z=u*za(w);if(y1?0:d<-1?Wa:Math.acos(d))/2),Y=Na(K[0]*K[0]+K[1]*K[1]);L=Pa(A,(u-Y)/(U-1)),F=Pa(A,(p-Y)/(U+1))}else L=F=0}v>ja?F>ja?(x=as(P,z,$,O,p,F,m),C=as(q,R,D,I,p,F,m),s.moveTo(x.cx+x.x01,x.cy+x.y01),Fja&&S>ja?L>ja?(x=as(D,I,q,R,u,-L,m),C=as($,O,P,z,u,-L,m),s.lineTo(x.cx+x.x01,x.cy+x.y01),Lt?1:e>=t?0:NaN}function fs(t){return t}function ys(){var t=fs,e=gs,r=null,i=Da(0),o=Da(Ua),n=Da(0);function a(a){var s,l,h,c,d,u=(a=ls(a)).length,p=0,g=new Array(u),f=new Array(u),y=+i.apply(this,arguments),m=Math.min(Ua,Math.max(-Ua,o.apply(this,arguments)-y)),x=Math.min(Math.abs(m)/u,n.apply(this,arguments)),C=x*(m<0?-1:1);for(s=0;s0&&(p+=d);for(null!=e?g.sort(function(t,r){return e(f[t],f[r])}):null!=r&&g.sort(function(t,e){return r(a[t],a[e])}),s=0,h=p?(m-u*C)/p:0;s0?d*h:0)+C,f[l]={data:a[l],index:s,value:d,startAngle:y,endAngle:c,padAngle:x};return f}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:Da(+e),a):t},a.sortValues=function(t){return arguments.length?(e=t,r=null,a):e},a.sort=function(t){return arguments.length?(r=t,e=null,a):r},a.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Da(+t),a):i},a.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:Da(+t),a):o},a.padAngle=function(t){return arguments.length?(n="function"==typeof t?t:Da(+t),a):n},a}function ms(){}function xs(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function Cs(t){this._context=t}function bs(t){return new Cs(t)}function ks(t){this._context=t}function ws(t){return new ks(t)}function Ts(t){this._context=t}function Ss(t){return new Ts(t)}hs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},Cs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:xs(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:xs(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ks.prototype={areaStart:ms,areaEnd:ms,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:xs(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Ts.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:xs(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};class vs{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}function Bs(t){return new vs(t,!0)}function _s(t){return new vs(t,!1)}function As(t,e){this._basis=new Cs(t),this._beta=e}As.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var i,o=t[0],n=e[0],a=t[r]-o,s=e[r]-n,l=-1;++l<=r;)i=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(o+i*a),this._beta*e[l]+(1-this._beta)*(n+i*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const Ls=function t(e){function r(t){return 1===e?new Cs(t):new As(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function Fs(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function Ms(t,e){this._context=t,this._k=(1-e)/6}Ms.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Fs(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Fs(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Es=function t(e){function r(t){return new Ms(t,e)}return r.tension=function(e){return t(+e)},r}(0);function $s(t,e){this._context=t,this._k=(1-e)/6}$s.prototype={areaStart:ms,areaEnd:ms,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Fs(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Os=function t(e){function r(t){return new $s(t,e)}return r.tension=function(e){return t(+e)},r}(0);function Ds(t,e){this._context=t,this._k=(1-e)/6}Ds.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Fs(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Is=function t(e){function r(t){return new Ds(t,e)}return r.tension=function(e){return t(+e)},r}(0);function Ks(t,e,r){var i=t._x1,o=t._y1,n=t._x2,a=t._y2;if(t._l01_a>ja){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,o=(o*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>ja){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);n=(n*h+t._x1*t._l23_2a-e*t._l12_2a)/c,a=(a*h+t._y1*t._l23_2a-r*t._l12_2a)/c}t._context.bezierCurveTo(i,o,n,a,t._x2,t._y2)}function qs(t,e){this._context=t,this._alpha=e}qs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Ks(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Rs=function t(e){function r(t){return e?new qs(t,e):new Ms(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Ps(t,e){this._context=t,this._alpha=e}Ps.prototype={areaStart:ms,areaEnd:ms,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Ks(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const zs=function t(e){function r(t){return e?new Ps(t,e):new $s(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Ns(t,e){this._context=t,this._alpha=e}Ns.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ks(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const js=function t(e){function r(t){return e?new Ns(t,e):new Ds(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Ws(t){this._context=t}function Hs(t){return new Ws(t)}function Us(t){return t<0?-1:1}function Ys(t,e,r){var i=t._x1-t._x0,o=e-t._x1,n=(t._y1-t._y0)/(i||o<0&&-0),a=(r-t._y1)/(o||i<0&&-0),s=(n*o+a*i)/(i+o);return(Us(n)+Us(a))*Math.min(Math.abs(n),Math.abs(a),.5*Math.abs(s))||0}function Gs(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Xs(t,e,r){var i=t._x0,o=t._y0,n=t._x1,a=t._y1,s=(n-i)/3;t._context.bezierCurveTo(i+s,o+s*e,n-s,a-s*r,n,a)}function Vs(t){this._context=t}function Zs(t){this._context=new Qs(t)}function Qs(t){this._context=t}function Js(t){return new Vs(t)}function tl(t){return new Zs(t)}function el(t){this._context=t}function rl(t){var e,r,i=t.length-1,o=new Array(i),n=new Array(i),a=new Array(i);for(o[0]=0,n[0]=2,a[0]=t[0]+2*t[1],e=1;e=0;--e)o[e]=(a[e]-o[e+1])/n[e];for(n[i-1]=(t[i]+o[i-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}}this._x=t,this._y=e}},ll.prototype={constructor:ll,scale:function(t){return 1===t?this:new ll(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new ll(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};new ll(1,0,0);ll.prototype},23126(t,e,r){"use strict";r.d(e,{T:()=>P});var i=r(39142),o=r(89610),n=r(27422),a=r(11662),s=r(69471),l=r(9779),h=r(29893),c=r(92049),d=r(38446),u=r(99912),p=r(97271),g=r(33858),f=Object.prototype.hasOwnProperty;const y=function(t){if(null==t)return!0;if((0,d.A)(t)&&((0,c.A)(t)||"string"==typeof t||"function"==typeof t.splice||(0,u.A)(t)||(0,g.A)(t)||(0,h.A)(t)))return!t.length;var e=(0,l.A)(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if((0,p.A)(t))return!(0,s.A)(t).length;for(var r in t)if(f.call(t,r))return!1;return!0};var m=r(8058),x=r(69592),C=r(13588),b=r(24326),k=r(62062),w=r(25707);const T=function(t){return t!=t};const S=function(t,e,r){for(var i=r-1,o=t.length;++i-1};const _=function(t,e,r){for(var i=-1,o=null==t?0:t.length;++i=200){var h=e?null:$(t);if(h)return(0,M.A)(h);a=!1,o=A.A,l=new k.A}else l=e?[]:s;t:for(;++i1?i.setNode(t,e):i.setNode(t)}),this}setNode(t,e){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=R,this._children[t]={},this._children[R][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var e=t=>this.removeEdge(this._edgeObjs[t]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],m.A(this.children(t),t=>{this.setParent(t)}),delete this._children[t]),m.A(n.A(this._in[t]),e),delete this._in[t],delete this._preds[t],m.A(n.A(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(x.A(e))e=R;else{for(var r=e+="";!x.A(r);r=this.parent(r))if(r===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var e=this._parent[t];if(e!==R)return e}}children(t){if(x.A(t)&&(t=R),this._isCompound){var e=this._children[t];if(e)return n.A(e)}else{if(t===R)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var e=this._preds[t];if(e)return n.A(e)}successors(t){var e=this._sucs[t];if(e)return n.A(e)}neighbors(t){var e=this.predecessors(t);if(e)return I(e,this.successors(t))}isLeaf(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var r=this;m.A(this._nodes,function(r,i){t(i)&&e.setNode(i,r)}),m.A(this._edgeObjs,function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,r.edge(t))});var i={};function o(t){var n=r.parent(t);return void 0===n||e.hasNode(n)?(i[t]=n,n):n in i?i[n]:o(n)}return this._isCompound&&m.A(e.nodes(),function(t){e.setParent(t,o(t))}),e}setDefaultEdgeLabel(t){return o.A(t)||(t=i.A(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return K.A(this._edgeObjs)}setPath(t,e){var r=this,i=arguments;return q.A(t,function(t,o){return i.length>1?r.setEdge(t,o,e):r.setEdge(t,o),o}),this}setEdge(){var t,e,r,i,o=!1,n=arguments[0];"object"==typeof n&&null!==n&&"v"in n?(t=n.v,e=n.w,r=n.name,2===arguments.length&&(i=arguments[1],o=!0)):(t=n,e=arguments[1],r=arguments[3],arguments.length>2&&(i=arguments[2],o=!0)),t=""+t,e=""+e,x.A(r)||(r=""+r);var a=j(this._isDirected,t,e,r);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,a))return o&&(this._edgeLabels[a]=i),this;if(!x.A(r)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[a]=o?i:this._defaultEdgeLabelFn(t,e,r);var s=function(t,e,r,i){var o=""+e,n=""+r;if(!t&&o>n){var a=o;o=n,n=a}var s={v:o,w:n};i&&(s.name=i);return s}(this._isDirected,t,e,r);return t=s.v,e=s.w,Object.freeze(s),this._edgeObjs[a]=s,z(this._preds[e],t),z(this._sucs[t],e),this._in[e][a]=s,this._out[t][a]=s,this._edgeCount++,this}edge(t,e,r){var i=1===arguments.length?W(this._isDirected,arguments[0]):j(this._isDirected,t,e,r);return this._edgeLabels[i]}hasEdge(t,e,r){var i=1===arguments.length?W(this._isDirected,arguments[0]):j(this._isDirected,t,e,r);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(t,e,r){var i=1===arguments.length?W(this._isDirected,arguments[0]):j(this._isDirected,t,e,r),o=this._edgeObjs[i];return o&&(t=o.v,e=o.w,delete this._edgeLabels[i],delete this._edgeObjs[i],N(this._preds[e],t),N(this._sucs[t],e),delete this._in[e][i],delete this._out[t][i],this._edgeCount--),this}inEdges(t,e){var r=this._in[t];if(r){var i=K.A(r);return e?a.A(i,function(t){return t.v===e}):i}}outEdges(t,e){var r=this._out[t];if(r){var i=K.A(r);return e?a.A(i,function(t){return t.w===e}):i}}nodeEdges(t,e){var r=this.inEdges(t,e);if(r)return r.concat(this.outEdges(t,e))}}function z(t,e){t[e]?t[e]++:t[e]=1}function N(t,e){--t[e]||delete t[e]}function j(t,e,r,i){var o=""+e,n=""+r;if(!t&&o>n){var a=o;o=n,n=a}return o+"\x01"+n+"\x01"+(x.A(i)?"\0":i)}function W(t,e){return j(t,e.v,e.w,e.name)}P.prototype._nodeCount=0,P.prototype._edgeCount=0},697(t,e,r){"use strict";r.d(e,{T:()=>i.T});var i=r(23126)},99418(t,e,r){"use strict";function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);rvt});const n=Object.entries,a=Object.setPrototypeOf,s=Object.isFrozen,l=Object.getPrototypeOf,h=Object.getOwnPropertyDescriptor;let c=Object.freeze,d=Object.seal,u=Object.create,p="undefined"!=typeof Reflect&&Reflect,g=p.apply,f=p.construct;c||(c=function(t){return t}),d||(d=function(t){return t}),g||(g=function(t,e){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o1?e-1:0),i=1;i1?r-1:0),o=1;o2&&void 0!==arguments[2]?arguments[2]:w;if(a&&a(t,null),!k(e))return t;let i=e.length;for(;i--;){let o=e[i];if("string"==typeof o){const t=r(o);t!==o&&(s(e)||(e[i]=t),o=t)}t[o]=!0}return t}function R(t){for(let e=0;e/g),et=d(/\${[\w\W]*/g),rt=d(/^data-[\-\w.\u00B7-\uFFFF]+$/),it=d(/^aria-[\-\w]+$/),ot=d(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),nt=d(/^(?:\w+script|data):/i),at=d(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),st=d(/^html$/i),lt=d(/^[a-z][.\w]*(-[.\w]+)+$/i),ht=d(/<[/\w!]/g),ct=d(/<[/\w]/g),dt=d(/<\/no(script|embed|frames)/i),ut=d(/\/>/i),pt=1,gt=3,ft=7,yt=8,mt=9,xt=11,Ct=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],bt=c(q({},Ct)),kt=function(){const t={};return y(Ct,e=>{t[e]=d(new RegExp("])","i"))}),c(t)}(),wt=function(){return"undefined"==typeof window?null:window},Tt=function(t,e,r,i){return E(t,e)&&k(t[e])?q(i.base?P(i.base):{},t[e],i.transform):r},St=function(t,e,r){const i=E(t,e)?t[e]:void 0;return i&&"object"==typeof i?P(i):r()};var vt=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wt();const r=e=>t(e);if(r.version="3.4.14",r.removed=[],!e||!e.document||e.document.nodeType!==mt||!e.Element)return r.isSupported=!1,r;let i=e.document;const o=i,a=o.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,l=e.Node,h=e.Element,p=e.NodeFilter,g=e.NamedNodeMap;void 0===g&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const f=e.DOMParser,I=e.trustedTypes,K=h.prototype,R=z(K,"cloneNode"),Ct=z(K,"remove"),vt=z(K,"nextSibling"),Bt=z(K,"childNodes"),_t=z(K,"parentNode"),At=z(K,"shadowRoot"),Lt=z(K,"attributes"),Ft=l&&l.prototype?z(l.prototype,"nodeType"):null,Mt=l&&l.prototype?z(l.prototype,"nodeName"):null,Et=l&&l.prototype?z(l.prototype,"ownerDocument"):null,$t=function(t){return Ft?Ft(t):t.nodeType},Ot=function(t){return Mt?Mt(t):t.nodeName};if("function"==typeof s){const t=i.createElement("template");t.content&&t.content.ownerDocument&&(i=t.content.ownerDocument)}let Dt,It,Kt="",qt=!1,Rt=0;const Pt=function(){if(Rt>0)throw D('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},zt=function(t){Pt(),Rt++;try{return Dt.createHTML(t)}finally{Rt--}},Nt=function(){return qt||(It=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let r=null;const i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(r=e.getAttribute(i));const o="dompurify"+(r?"#"+r:"");try{return t.createPolicy(o,{createHTML:t=>t,createScriptURL:t=>t})}catch(n){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(I,a),qt=!0),It},jt=i,Wt=jt.implementation,Ht=jt.createNodeIterator,Ut=jt.createDocumentFragment,Yt=jt.getElementsByTagName,Gt=o.importNode;let Xt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported="function"==typeof n&&"function"==typeof _t&&Wt&&void 0!==Wt.createHTMLDocument;const Vt=J,Zt=tt,Qt=et,Jt=rt,te=it,ee=nt,re=at,ie=lt;let oe=ot,ne=null;const ae=q({},[...N,...j,...W,...U,...G]);let se=null;const le=q({},[...X,...V,...Z,...Q]);let he=Object.seal(u(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ce=null,de=null;const ue=Object.seal(u(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let pe=!0,ge=!0,fe=!1,ye=!0,me=!1,xe=!0,Ce=!1,be=!1,ke=null,we=null,Te=!1,Se=!1,ve=!1,Be=!1,_e=!0,Ae=!1;const Le="user-content-";let Fe=!0,Me=!1,Ee={},$e=null;const Oe=q({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let De=null;const Ie=q({},["audio","video","img","source","image","track"]);let Ke=null;const qe=q({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Re="http://www.w3.org/1998/Math/MathML",Pe="http://www.w3.org/2000/svg",ze="http://www.w3.org/1999/xhtml";let Ne=ze,je=!1,We=null;const He=q({},[Re,Pe,ze],T),Ue=c(["mi","mo","mn","ms","mtext"]);let Ye=q({},Ue);const Ge=c(["annotation-xml"]);let Xe=q({},Ge);const Ve=q({},["title","style","font","a","script"]);let Ze=null;const Qe=["application/xhtml+xml","text/html"];let Je=null,tr=null;const er=i.createElement("form"),rr=function(t){return t instanceof RegExp||t instanceof Function},ir=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(tr&&tr===t)return;t&&"object"==typeof t||(t={}),t=P(t),Ze=-1===Qe.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,Je="application/xhtml+xml"===Ze?T:w,ne=Tt(t,"ALLOWED_TAGS",ae,{transform:Je}),se=Tt(t,"ALLOWED_ATTR",le,{transform:Je}),We=Tt(t,"ALLOWED_NAMESPACES",He,{transform:T}),Ke=Tt(t,"ADD_URI_SAFE_ATTR",qe,{transform:Je,base:qe}),De=Tt(t,"ADD_DATA_URI_TAGS",Ie,{transform:Je,base:Ie}),$e=Tt(t,"FORBID_CONTENTS",Oe,{transform:Je}),ce=Tt(t,"FORBID_TAGS",P({}),{transform:Je}),de=Tt(t,"FORBID_ATTR",P({}),{transform:Je}),Ee=!!E(t,"USE_PROFILES")&&(t.USE_PROFILES&&"object"==typeof t.USE_PROFILES?P(t.USE_PROFILES):t.USE_PROFILES),pe=!1!==t.ALLOW_ARIA_ATTR,ge=!1!==t.ALLOW_DATA_ATTR,fe=t.ALLOW_UNKNOWN_PROTOCOLS||!1,ye=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,me=t.SAFE_FOR_TEMPLATES||!1,xe=!1!==t.SAFE_FOR_XML,Ce=t.WHOLE_DOCUMENT||!1,Se=t.RETURN_DOM||!1,ve=t.RETURN_DOM_FRAGMENT||!1,Be=t.RETURN_TRUSTED_TYPE||!1,Te=t.FORCE_BODY||!1,_e=!1!==t.SANITIZE_DOM,Ae=t.SANITIZE_NAMED_PROPS||!1,Fe=!1!==t.KEEP_CONTENT,Me=t.IN_PLACE||!1,oe=function(t){try{return O(t,""),!0}catch(e){return!1}}(t.ALLOWED_URI_REGEXP)?t.ALLOWED_URI_REGEXP:ot,Ne="string"==typeof t.NAMESPACE?t.NAMESPACE:ze,Ye=St(t,"MATHML_TEXT_INTEGRATION_POINTS",()=>q({},Ue)),Xe=St(t,"HTML_INTEGRATION_POINTS",()=>q({},Ge));const e=St(t,"CUSTOM_ELEMENT_HANDLING",()=>u(null));if(he=u(null),E(e,"tagNameCheck")&&rr(e.tagNameCheck)&&(he.tagNameCheck=e.tagNameCheck),E(e,"attributeNameCheck")&&rr(e.attributeNameCheck)&&(he.attributeNameCheck=e.attributeNameCheck),E(e,"allowCustomizedBuiltInElements")&&"boolean"==typeof e.allowCustomizedBuiltInElements&&(he.allowCustomizedBuiltInElements=e.allowCustomizedBuiltInElements),d(he),me&&(ge=!1),ve&&(Se=!0),Ee&&(ne=q({},G),se=u(null),!0===Ee.html&&(q(ne,N),q(se,X)),!0===Ee.svg&&(q(ne,j),q(se,V),q(se,Q)),!0===Ee.svgFilters&&(q(ne,W),q(se,V),q(se,Q)),!0===Ee.mathMl&&(q(ne,U),q(se,Z),q(se,Q))),ue.tagCheck=null,ue.attributeCheck=null,E(t,"ADD_TAGS")&&("function"==typeof t.ADD_TAGS?ue.tagCheck=t.ADD_TAGS:k(t.ADD_TAGS)&&(ne===ae&&(ne=P(ne)),q(ne,t.ADD_TAGS,Je))),E(t,"ADD_ATTR")&&("function"==typeof t.ADD_ATTR?ue.attributeCheck=t.ADD_ATTR:k(t.ADD_ATTR)&&(se===le&&(se=P(se)),q(se,t.ADD_ATTR,Je))),E(t,"ADD_FORBID_CONTENTS")&&k(t.ADD_FORBID_CONTENTS)&&($e===Oe&&($e=P($e)),q($e,t.ADD_FORBID_CONTENTS,Je)),Fe&&(ne["#text"]=!0),Ce&&q(ne,["html","head","body"]),ne.table&&(q(ne,["tbody"]),delete ce.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw D('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw D('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const e=Dt;Dt=t.TRUSTED_TYPES_POLICY;try{Kt=zt("")}catch(r){throw Dt=e,r}}else null===t.TRUSTED_TYPES_POLICY?(Dt=void 0,Kt=""):(void 0===Dt&&(Dt=Nt()),Dt&&"string"==typeof Kt&&(Kt=zt("")));c&&c(t),tr=t},or=q({},[...j,...W,...H]),nr=q({},[...U,...Y]),ar=function(t){let e=_t(t);e&&e.tagName||(e={namespaceURI:Ne,tagName:"template"});const r=w(t.tagName),i=w(e.tagName);return!!We[t.namespaceURI]&&(t.namespaceURI===Pe?function(t,e,r){return e.namespaceURI===ze?"svg"===t:e.namespaceURI===Re?"svg"===t&&("annotation-xml"===r||Ye[r]):Boolean(or[t])}(r,e,i):t.namespaceURI===Re?function(t,e,r){return e.namespaceURI===ze?"math"===t:e.namespaceURI===Pe?"math"===t&&Xe[r]:Boolean(nr[t])}(r,e,i):t.namespaceURI===ze?function(t,e,r){return!(e.namespaceURI===Pe&&!Xe[r])&&!(e.namespaceURI===Re&&!Ye[r])&&!nr[t]&&(Ve[t]||!or[t])}(r,e,i):!("application/xhtml+xml"!==Ze||!We[t.namespaceURI]))},sr=function(t){C(r.removed,{element:t});try{_t(t).removeChild(t)}catch(e){if(Ct(t),!_t(t))throw D("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},lr=function(t,e,r){try{t.removeAttributeNode(e)}catch(i){try{t.removeAttribute(r)}catch(i){}}},hr=function(t){ur(t);const e=Bt(t);if(e){const t=[];y(e,e=>{C(t,e)}),y(t,t=>{try{Ct(t)}catch(e){}})}const r=Lt(t);if(r)for(let i=r.length-1;i>=0;--i){const e=r[i],o=e&&e.name;"string"==typeof o&&lr(t,e,o)}},cr=function(t,e,i){if(!i)try{i=e.getAttributeNode(t)}catch(o){i=null}C(r.removed,{attribute:i||null,from:e});try{i?e.removeAttributeNode(i):e.removeAttribute(t)}catch(o){try{e.removeAttribute(t)}catch(o){}}if("is"===t)if(Se||ve)try{sr(e)}catch(o){}else try{e.setAttribute(t,"")}catch(o){}},dr=function(t){const e=Lt(t);if(e)for(let r=e.length-1;r>=0;--r){const i=e[r],o=i&&i.name;"string"!=typeof o||se[Je(o)]||lr(t,i,o)}},ur=function(t){const e=[t];for(;e.length>0;){const t=e.pop();$t(t)===pt&&dr(t);const r=Bt(t);if(r)for(let i=r.length-1;i>=0;--i)e.push(r[i])}},pr=function(t,e){return!!xe&&("patchsrc"===t||"for"===t&&"label"!==e&&"output"!==e)},gr=function(t){let e=null,r=null;if(Te)t=""+t;else{const e=S(t,/^[\r\n\t ]+/);r=e&&e[0]}"application/xhtml+xml"===Ze&&Ne===ze&&(t=''+t+"");const o=Dt?zt(t):t;if(Ne===ze)try{e=(new f).parseFromString(o,Ze)}catch(a){}if(!e||!e.documentElement){e=Wt.createDocument(Ne,"template",null);try{e.documentElement.innerHTML=je?Kt:o}catch(a){}}const n=e.body||e.documentElement;return t&&r&&n.insertBefore(i.createTextNode(r),n.childNodes[0]||null),Ne===ze?Yt.call(e,Ce?"html":"body")[0]:Ce?e.documentElement:n},fr=function(t){const e=Et?Et(t):t.ownerDocument;return Ht.call(e||t,t,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},yr=function(t){return t=v(t,Vt," "),t=v(t,Zt," "),t=v(t,Qt," ")},mr=function(t){var e;t.normalize();const r=Et?Et(t):t.ownerDocument,i=Ht.call(r||t,t,p.SHOW_TEXT|p.SHOW_COMMENT|p.SHOW_CDATA_SECTION|p.SHOW_PROCESSING_INSTRUCTION,null);let o=i.nextNode();for(;o;)o.data=yr(o.data),o=i.nextNode();const n=null===(e=t.querySelectorAll)||void 0===e?void 0:e.call(t,"template");n&&y(n,t=>{Cr(t.content)&&mr(t.content)})},xr=function(t){const e=Mt?Mt(t):null;return"string"==typeof e&&("form"===Je(e)&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||t.attributes!==Lt(t)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes||t.nodeType!==Ft(t)||t.childNodes!==Bt(t)))},Cr=function(t){if(!Ft||"object"!=typeof t||null===t)return!1;try{return Ft(t)===xt}catch(e){return!1}},br=function(t){if(!Ft||"object"!=typeof t||null===t)return!1;try{return"number"==typeof Ft(t)}catch(e){return!1}};function kr(t,e,i){0!==t.length&&y(t,t=>{t.call(r,e,i,tr)})}const wr=function(t,e){if(t instanceof RegExp)return O(t,e);if(t instanceof Function){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o=0;--o){const n=t===r?R(i[o],!0):i[o];e.insertBefore(n,vt(t))}}return sr(t),!0}(t,i,e);return!1===r&&kr(Xt.afterSanitizeElements,t,null),r}if($t(t)===pt&&!ar(t))return sr(t),!0;if(("noscript"===i||"noembed"===i||"noframes"===i)&&O(dt,t.innerHTML))return sr(t),!0;if(me&&t.nodeType===gt){const e=yr(t.textContent);t.textContent!==e&&(C(r.removed,{element:t.cloneNode()}),t.textContent=e)}return kr(Xt.afterSanitizeElements,t,null),!1},Br=function(t,e,r){if(de[e])return!1;if(pr(e,t))return!1;if(_e&&("id"===e||"name"===e)&&(r in i||r in er))return!1;const o=se[e]||ue.attributeCheck instanceof Function&&ue.attributeCheck(e,t);return!(!ge||!O(Jt,e))||(!(!pe||!O(te,e))||(o?!!Ke[e]||(!!O(oe,v(r,re,""))||(!("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==B(r,"data:")||!De[t])||(!(!fe||O(ee,v(r,re,"")))||!r))):Ar(t)&&wr(he.tagNameCheck,t)&&wr(he.attributeNameCheck,e,t)||"is"===e&&he.allowCustomizedBuiltInElements&&wr(he.tagNameCheck,r)))},_r=q({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ar=function(t){return!_r[w(t)]&&O(ie,t)},Lr=function(t,e,r,i){if(Dt&&"object"==typeof I&&"function"==typeof I.getAttributeType&&!r)switch(I.getAttributeType(t,e)){case"TrustedHTML":return zt(i);case"TrustedScriptURL":return function(t){Pt(),Rt++;try{return Dt.createScriptURL(t)}finally{Rt--}}(i)}return i},Fr=function(t,e,i,o){try{i?t.setAttributeNS(i,e,o):t.setAttribute(e,o),xr(t)?sr(t):x(r.removed)}catch(n){cr(e,t)}},Mr=function(t){kr(Xt.beforeSanitizeAttributes,t,null);const e=t.attributes;if(!e||xr(t))return;se=Tr(Xt.uponSanitizeAttribute,se,le,we);const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:se,forceKeepAttr:void 0};let i=e.length;const o=Je(t.nodeName);for(;i--;){const n=e[i],a=n.name,s=n.namespaceURI,l=n.value,h=Je(a),c=l;let d="value"===a?c:_(c);r.attrName=h,r.attrValue=d,r.keepAttr=!0,r.forceKeepAttr=void 0,kr(Xt.uponSanitizeAttribute,t,r),d=r.attrValue,!Ae||"id"!==h&&"name"!==h||0===B(d,Le)||(cr(a,t,n),d=Le+d),xe&&O(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)?cr(a,t,n):"attributename"===h&&S(d,"href")?cr(a,t,n):r.forceKeepAttr||(r.keepAttr&&(ye||!O(ut,d))?(me&&(d=yr(d)),Br(o,h,d)?(d=Lr(o,h,s,d),d!==c&&Fr(t,a,s,d)):cr(a,t,n)):cr(a,t,n))}kr(Xt.afterSanitizeAttributes,t,null)},Er=function(t){let e=null;const r=fr(t);for(kr(Xt.beforeSanitizeShadowDOM,t,null);e=r.nextNode();)if(kr(Xt.uponSanitizeShadowNode,e,null),vr(e,t),Mr(e),Cr(e.content)&&Er(e.content),$t(e)===pt){const t=At(e);Cr(t)&&($r(t),Er(t))}kr(Xt.afterSanitizeShadowDOM,t,null)},$r=function(t){const e=[{node:t,shadow:null}];for(;e.length>0;){const t=e.pop();if(t.shadow){Er(t.shadow);continue}const r=t.node,i=$t(r)===pt,o=Bt(r);if(o)for(let n=o.length-1;n>=0;--n)e.push({node:o[n],shadow:null});if(i){const t=Mt?Mt(r):null;if("string"==typeof t&&"template"===Je(t)){const t=r.content;Cr(t)&&e.push({node:t,shadow:null})}}if(i){const t=At(r);Cr(t)&&e.push({node:null,shadow:t},{node:t,shadow:null})}}};return r.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,n=null,a=null,s=null;if(je=!t,je&&(t="\x3c!--\x3e"),"string"!=typeof t&&!br(t)&&"string"!=typeof(t=function(t){switch(typeof t){case"string":return t;case"number":return A(t);case"boolean":return L(t);case"bigint":return F?F(t):"0";case"symbol":return M?M(t):"Symbol()";case"undefined":default:return $(t);case"function":case"object":{if(null===t)return $(t);const e=t,r=z(e,"toString");if("function"==typeof r){const t=r(e);return"string"==typeof t?t:$(t)}return $(t)}}}(t)))throw D("dirty is not a string, aborting");if(!r.isSupported)return t;be?(ne=ke,se=we):ir(e),(Xt.uponSanitizeElement.length>0||Xt.uponSanitizeAttribute.length>0)&&(ne=P(ne)),Xt.uponSanitizeAttribute.length>0&&(se=P(se)),r.removed=[];const l=Me&&"string"!=typeof t&&br(t);if(l){!function(t){if(!xe)return;const e=[t];for(;e.length>0;){const t=e.pop(),i=$t(t);if(i===ft||i===yt&&O(ct,t.data)){try{Ct(t)}catch(r){}continue}if(i===pt){const e=t,i=Je(Ot(t));try{e.hasAttribute&&e.hasAttribute("patchsrc")&&e.removeAttribute("patchsrc"),e.hasAttribute&&e.hasAttribute("for")&&pr("for",i)&&e.removeAttribute("for")}catch(r){}}const o=Bt(t);if(o)for(let r=o.length-1;r>=0;--r)e.push(o[r])}}(t);const e=Ot(t);if("string"==typeof e){const r=Je(e);if(!ne[r]||ce[r])throw hr(t),D("root node is forbidden and cannot be sanitized in-place")}if(xr(t))throw hr(t),D("root node is clobbered and cannot be sanitized in-place");try{$r(t)}catch(d){throw hr(t),d}}else if(br(t))i=gr("\x3c!----\x3e"),n=i.ownerDocument.importNode(t,!0),n.nodeType===pt&&"BODY"===n.nodeName||"HTML"===n.nodeName?i=n:i.appendChild(n),$r(n);else{if(!Se&&!me&&!Ce&&-1===t.indexOf("<"))return Dt&&Be?zt(t):t;if(i=gr(t),!i)return Se?null:Be?Kt:""}i&&Te&&sr(i.firstChild);const h=l?t:i;try{const t=fr(h);for(;a=t.nextNode();)vr(a,h),Mr(a),Cr(a.content)&&Er(a.content)}catch(d){throw l&&(hr(t),y(r.removed,t=>{t.element&&ur(t.element)})),d}if(l)return y(r.removed,t=>{t.element&&ur(t.element)}),me&&mr(t),t;if(Se){if(me&&mr(i),ve)for(s=Ut.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(se.shadowroot||se.shadowrootmode)&&(s=Gt.call(o,s,!0)),s}let c=Ce?i.outerHTML:i.innerHTML;return Ce&&ne["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&O(st,i.ownerDocument.doctype.name)&&(c="\n"+c),me&&(c=yr(c)),Dt&&Be?zt(c):c},r.setConfig=function(){ir(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),be=!0,ke=ne,we=se},r.clearConfig=function(){tr=null,be=!1,ke=null,we=null,Dt=It,Kt=""},r.isValidAttribute=function(t,e,r){tr||ir({});const i=Je(t),o=Je(e);return Br(i,o,r)},r.addHook=function(t,e){"function"==typeof e&&E(Xt,t)&&C(Xt[t],e)},r.removeHook=function(t,e){if(E(Xt,t)){if(void 0!==e){const r=m(Xt[t],e);return-1===r?void 0:b(Xt[t],r,1)[0]}return x(Xt[t])}},r.removeHooks=function(t){E(Xt,t)&&(Xt[t]=[])},r.removeAllHooks=function(){Xt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r}()},99125(t,e,r){"use strict";function i(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}r.d(e,{b:()=>i})},89826(t,e,r){"use strict";r.d(e,{$V:()=>a,Av:()=>i,GX:()=>g,ML:()=>S,NA:()=>d,OG:()=>o,Qb:()=>y,R_:()=>s,Uw:()=>u,VP:()=>l,XZ:()=>b,ZR:()=>C,_u:()=>w,cT:()=>p,i1:()=>k,iq:()=>f,kj:()=>n,pj:()=>c,q:()=>m,ri:()=>T,vC:()=>h,x6:()=>x});const i="[object RegExp]",o="[object String]",n="[object Number]",a="[object Boolean]",s="[object Arguments]",l="[object Symbol]",h="[object Date]",c="[object Map]",d="[object Set]",u="[object Array]",p="[object ArrayBuffer]",g="[object Object]",f="[object DataView]",y="[object Uint8Array]",m="[object Uint8ClampedArray]",x="[object Uint16Array]",C="[object Uint32Array]",b="[object Int8Array]",k="[object Int16Array]",w="[object Int32Array]",T="[object Float32Array]",S="[object Float64Array]"},14608(t,e,r){"use strict";r.d(e,{N:()=>o});var i=r(99125);function o(t){return null!==t&&"object"==typeof t&&"[object Arguments]"===(0,i.b)(t)}},23058(t,e,r){"use strict";function i(t){return null!=t&&"function"!=typeof t&&function(t){return Number.isSafeInteger(t)&&t>=0}(t.length)}r.d(e,{X:()=>i})},19663(t,e,r){"use strict";r.d(e,{i:()=>o});var i=r(42796);function o(t){return(0,i.i)(t)}},91461(t,e,r){"use strict";r.d(e,{P:()=>o});const i="object"==typeof globalThis&&globalThis||"object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof r.g&&r.g||function(){return this}();function o(t){return void 0!==i.Buffer&&i.Buffer.isBuffer(t)}},37110(t,e,r){"use strict";function i(t){return null==t||"object"!=typeof t&&"function"!=typeof t}r.d(e,{s:()=>i})},42796(t,e,r){"use strict";function i(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}r.d(e,{i:()=>i})},93539(t,e,r){"use strict";r.d(e,{A:()=>a});var i=r(72453),o=r(63122);const n=class{constructor(){this.type=o.Z.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=o.Z.ALL}is(t){return this.type===t}};const a=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new n}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=o.Z.ALL,this}_ensureHSL(){const t=this.data,{h:e,s:r,l:o}=t;void 0===e&&(t.h=i.A.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=i.A.channel.rgb2hsl(t,"s")),void 0===o&&(t.l=i.A.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:r,b:o}=t;void 0===e&&(t.r=i.A.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=i.A.channel.hsl2rgb(t,"g")),void 0===o&&(t.b=i.A.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(o.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(o.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(o.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(o.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(o.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(o.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(o.Z.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(o.Z.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(o.Z.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(o.Z.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(o.Z.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(o.Z.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent")},74886(t,e,r){"use strict";r.d(e,{A:()=>f});var i=r(93539),o=r(63122);const n={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(n.re);if(!e)return;const r=e[1],o=parseInt(r,16),a=r.length,s=a%4==0,l=a>4,h=l?1:17,c=l?8:4,d=s?0:-1,u=l?255:15;return i.A.set({r:(o>>c*(d+3)&u)*h,g:(o>>c*(d+2)&u)*h,b:(o>>c*(d+1)&u)*h,a:s?(o&u)*h/255:1},t)},stringify:t=>{const{r:e,g:r,b:i,a:n}=t;return n<1?`#${o.Y[Math.round(e)]}${o.Y[Math.round(r)]}${o.Y[Math.round(i)]}${o.Y[Math.round(255*n)]}`:`#${o.Y[Math.round(e)]}${o.Y[Math.round(r)]}${o.Y[Math.round(i)]}`}},a=n;var s=r(72453);const l={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(l.hueRe);if(e){const[,t,r]=e;switch(r){case"grad":return s.A.channel.clamp.h(.9*parseFloat(t));case"rad":return s.A.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return s.A.channel.clamp.h(360*parseFloat(t))}}return s.A.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const r=t.match(l.re);if(!r)return;const[,o,n,a,h,c]=r;return i.A.set({h:l._hue2deg(o),s:s.A.channel.clamp.s(parseFloat(n)),l:s.A.channel.clamp.l(parseFloat(a)),a:h?s.A.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},t)},stringify:t=>{const{h:e,s:r,l:i,a:o}=t;return o<1?`hsla(${s.A.lang.round(e)}, ${s.A.lang.round(r)}%, ${s.A.lang.round(i)}%, ${o})`:`hsl(${s.A.lang.round(e)}, ${s.A.lang.round(r)}%, ${s.A.lang.round(i)}%)`}},h=l,c={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=c.colors[t];if(e)return a.parse(e)},stringify:t=>{const e=a.stringify(t);for(const r in c.colors)if(c.colors[r]===e)return r}},d=c,u={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const r=t.match(u.re);if(!r)return;const[,o,n,a,l,h,c,d,p]=r;return i.A.set({r:s.A.channel.clamp.r(n?2.55*parseFloat(o):parseFloat(o)),g:s.A.channel.clamp.g(l?2.55*parseFloat(a):parseFloat(a)),b:s.A.channel.clamp.b(c?2.55*parseFloat(h):parseFloat(h)),a:d?s.A.channel.clamp.a(p?parseFloat(d)/100:parseFloat(d)):1},t)},stringify:t=>{const{r:e,g:r,b:i,a:o}=t;return o<1?`rgba(${s.A.lang.round(e)}, ${s.A.lang.round(r)}, ${s.A.lang.round(i)}, ${s.A.lang.round(o)})`:`rgb(${s.A.lang.round(e)}, ${s.A.lang.round(r)}, ${s.A.lang.round(i)})`}},p=u,g={format:{keyword:c,hex:a,rgb:u,rgba:u,hsl:l,hsla:l},parse:t=>{if("string"!=typeof t)return t;const e=a.parse(t)||p.parse(t)||h.parse(t)||d.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(o.Z.HSL)||void 0===t.data.r?h.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?p.stringify(t):a.stringify(t)},f=g},63122(t,e,r){"use strict";r.d(e,{Y:()=>o,Z:()=>n});var i=r(72453);const o={};for(let a=0;a<=255;a++)o[a]=i.A.unit.dec2hex(a);const n={ALL:0,RGB:1,HSL:2}},95635(t,e,r){"use strict";r.d(e,{A:()=>n});var i=r(72453),o=r(74886);const n=(t,e,r)=>{const n=o.A.parse(t),a=n[e],s=i.A.channel.clamp[e](a+r);return a!==s&&(n[e]=s),o.A.stringify(n)}},8232(t,e,r){"use strict";r.d(e,{A:()=>n});var i=r(72453),o=r(74886);const n=(t,e)=>{const r=o.A.parse(t);for(const o in e)r[o]=i.A.channel.clamp[o](e[o]);return o.A.stringify(r)}},75263(t,e,r){"use strict";r.d(e,{A:()=>o});var i=r(95635);const o=(t,e)=>(0,i.A)(t,"l",-e)},3219(t,e,r){"use strict";r.d(e,{A:()=>s});var i=r(72453),o=r(74886);const n=t=>{const{r:e,g:r,b:n}=o.A.parse(t),a=.2126*i.A.channel.toLinear(e)+.7152*i.A.channel.toLinear(r)+.0722*i.A.channel.toLinear(n);return i.A.lang.round(a)},a=t=>n(t)>=.5,s=t=>!a(t)},78041(t,e,r){"use strict";r.d(e,{A:()=>o});var i=r(95635);const o=(t,e)=>(0,i.A)(t,"l",e)},25582(t,e,r){"use strict";r.d(e,{A:()=>s});var i=r(72453),o=r(93539),n=r(74886),a=r(8232);const s=(t,e,r=0,s=1)=>{if("number"!=typeof t)return(0,a.A)(t,{a:e});const l=o.A.set({r:i.A.channel.clamp.r(t),g:i.A.channel.clamp.g(e),b:i.A.channel.clamp.b(r),a:i.A.channel.clamp.a(s)});return n.A.stringify(l)}},72453(t,e,r){"use strict";r.d(e,{A:()=>o});const i={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},o)=>{if(!e)return 2.55*r;t/=360,e/=100;const n=(r/=100)<.5?r*(1+e):r+e-r*e,a=2*r-n;switch(o){case"r":return 255*i.hue2rgb(a,n,t+1/3);case"g":return 255*i.hue2rgb(a,n,t);case"b":return 255*i.hue2rgb(a,n,t-1/3)}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;const o=Math.max(t,e,r),n=Math.min(t,e,r),a=(o+n)/2;if("l"===i)return 100*a;if(o===n)return 0;const s=o-n;if("s"===i)return 100*(a>.5?s/(2-o-n):s/(o+n));switch(o){case t:return 60*((e-r)/s+(ee>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}}},80127(t,e,r){"use strict";r.d(e,{A:()=>u});const i=function(){this.__data__=[],this.size=0};var o=r(66984);const n=function(t,e){for(var r=t.length;r--;)if((0,o.A)(t[r][0],e))return r;return-1};var a=Array.prototype.splice;const s=function(t){var e=this.__data__,r=n(e,t);return!(r<0)&&(r==e.length-1?e.pop():a.call(e,r,1),--this.size,!0)};const l=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]};const h=function(t){return n(this.__data__,t)>-1};const c=function(t,e){var r=this.__data__,i=n(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this};function d(t){var e=-1,r=null==t?0:t.length;for(this.clear();++en});var i=r(18744),o=r(41917);const n=(0,i.A)(o.A,"Map")},29471(t,e,r){"use strict";r.d(e,{A:()=>T});const i=(0,r(18744).A)(Object,"create");const o=function(){this.__data__=i?i(null):{},this.size=0};const n=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e};var a=Object.prototype.hasOwnProperty;const s=function(t){var e=this.__data__;if(i){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return a.call(e,t)?e[t]:void 0};var l=Object.prototype.hasOwnProperty;const h=function(t){var e=this.__data__;return i?void 0!==e[t]:l.call(e,t)};const c=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=i&&void 0===e?"__lodash_hash_undefined__":e,this};function d(t){var e=-1,r=null==t?0:t.length;for(this.clear();++en});var i=r(18744),o=r(41917);const n=(0,i.A)(o.A,"Set")},62062(t,e,r){"use strict";r.d(e,{A:()=>s});var i=r(29471);const o=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};const n=function(t){return this.__data__.has(t)};function a(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new i.A;++eu});var i=r(80127);const o=function(){this.__data__=new i.A,this.size=0};const n=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};const a=function(t){return this.__data__.get(t)};const s=function(t){return this.__data__.has(t)};var l=r(68335),h=r(29471);const c=function(t,e){var r=this.__data__;if(r instanceof i.A){var o=r.__data__;if(!l.A||o.length<199)return o.push([t,e]),this.size=++r.size,this;r=this.__data__=new h.A(o)}return r.set(t,e),this.size=r.size,this};function d(t){var e=this.__data__=new i.A(t);this.size=e.size}d.prototype.clear=o,d.prototype.delete=n,d.prototype.get=a,d.prototype.has=s,d.prototype.set=c;const u=d},241(t,e,r){"use strict";r.d(e,{A:()=>i});const i=r(41917).A.Symbol},43988(t,e,r){"use strict";r.d(e,{A:()=>i});const i=r(41917).A.Uint8Array},72641(t,e,r){"use strict";r.d(e,{A:()=>i});const i=function(t,e){for(var r=-1,i=null==t?0:t.length;++ri});const i=function(t,e){for(var r=-1,i=null==t?0:t.length,o=0,n=[];++rc});const i=function(t,e){for(var r=-1,i=Array(t);++ri});const i=function(t,e){for(var r=-1,i=null==t?0:t.length,o=Array(i);++ri});const i=function(t,e){for(var r=-1,i=e.length,o=t.length;++rn});var i=r(79841),o=r(38446);const n=function(t,e){return function(r,i){if(null==r)return r;if(!(0,o.A)(r))return t(r,i);for(var n=r.length,a=e?n:-1,s=Object(r);(e?a--:++ai});const i=function(t,e,r,i){for(var o=t.length,n=r+(i?1:-1);i?n--:++nh});var i=r(76912),o=r(241),n=r(29893),a=r(92049),s=o.A?o.A.isConcatSpreadable:void 0;const l=function(t){return(0,a.A)(t)||(0,n.A)(t)||!!(s&&t&&t[s])};const h=function t(e,r,o,n,a){var s=-1,h=e.length;for(o||(o=l),a||(a=[]);++s0&&o(c)?r>1?t(c,r-1,o,n,a):(0,i.A)(a,c):n||(a[a.length]=c)}return a}},4574(t,e,r){"use strict";r.d(e,{A:()=>i});const i=function(t){return function(e,r,i){for(var o=-1,n=Object(e),a=i(e),s=a.length;s--;){var l=a[t?s:++o];if(!1===r(n[l],l,n))break}return e}}()},79841(t,e,r){"use strict";r.d(e,{A:()=>n});var i=r(4574),o=r(27422);const n=function(t,e){return t&&(0,i.A)(t,e,o.A)}},66318(t,e,r){"use strict";r.d(e,{A:()=>n});var i=r(63442),o=r(30901);const n=function(t,e){for(var r=0,n=(e=(0,i.A)(e,t)).length;null!=t&&rn});var i=r(76912),o=r(92049);const n=function(t,e,r){var n=e(t);return(0,o.A)(t)?n:(0,i.A)(n,r(t))}},88496(t,e,r){"use strict";r.d(e,{A:()=>u});var i=r(241),o=Object.prototype,n=o.hasOwnProperty,a=o.toString,s=i.A?i.A.toStringTag:void 0;const l=function(t){var e=n.call(t,s),r=t[s];try{t[s]=void 0;var i=!0}catch(l){}var o=a.call(t);return i&&(e?t[s]=r:delete t[s]),o};var h=Object.prototype.toString;const c=function(t){return h.call(t)};var d=i.A?i.A.toStringTag:void 0;const u=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":d&&d in Object(t)?l(t):c(t)}},49574(t,e,r){"use strict";r.d(e,{A:()=>Y});var i=r(11754),o=r(62062);const n=function(t,e){for(var r=-1,i=null==t?0:t.length;++rc))return!1;var u=l.get(t),p=l.get(e);if(u&&p)return u==e&&p==t;var g=-1,f=!0,y=2&r?new o.A:void 0;for(l.set(t,e),l.set(e,t);++ga});var i=r(97271);const o=(0,r(40367).A)(Object.keys,Object);var n=Object.prototype.hasOwnProperty;const a=function(t){if(!(0,i.A)(t))return o(t);var e=[];for(var r in Object(t))n.call(t,r)&&"constructor"!=r&&e.push(r);return e}},70805(t,e,r){"use strict";r.d(e,{A:()=>i});const i=function(t){return function(e){return null==e?void 0:e[t]}}},24326(t,e,r){"use strict";r.d(e,{A:()=>a});var i=r(29008),o=r(76875),n=r(67525);const a=function(t,e){return(0,n.A)((0,o.A)(t,e,i.A),t+"")}},52789(t,e,r){"use strict";r.d(e,{A:()=>i});const i=function(t){return function(e){return t(e)}}},64099(t,e,r){"use strict";r.d(e,{A:()=>i});const i=function(t,e){return t.has(e)}},99922(t,e,r){"use strict";r.d(e,{A:()=>o});var i=r(29008);const o=function(t){return"function"==typeof t?t:i.A}},63442(t,e,r){"use strict";r.d(e,{A:()=>u});var i=r(92049),o=r(86586),n=r(29471);function a(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var i=arguments,o=e?e.apply(this,i):i[0],n=r.cache;if(n.has(o))return n.get(o);var a=t.apply(this,i);return r.cache=n.set(o,a)||n,a};return r.cache=new(a.Cache||n.A),r}a.Cache=n.A;const s=a;var l=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,h=/\\(\\)?/g;const c=function(t){var e=s(t,function(t){return 500===r.size&&r.clear(),t}),r=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(l,function(t,r,i,o){e.push(i?o.replace(h,"$1"):r||t)}),e});var d=r(28894);const u=function(t,e){return(0,i.A)(t)?t:(0,o.A)(t,e)?[t]:c((0,d.A)(t))}},84171(t,e,r){"use strict";r.d(e,{A:()=>o});var i=r(18744);const o=function(){try{var t=(0,i.A)(Object,"defineProperty");return t({},"",{}),t}catch(e){}}()},72136(t,e,r){"use strict";r.d(e,{A:()=>i});const i="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g},19042(t,e,r){"use strict";r.d(e,{A:()=>a});var i=r(33831),o=r(14792),n=r(27422);const a=function(t){return(0,i.A)(t,n.A,o.A)}},18744(t,e,r){"use strict";r.d(e,{A:()=>x});var i=r(89610);const o=r(41917).A["__core-js_shared__"];var n,a=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";const s=function(t){return!!a&&a in t};var l=r(23149),h=r(81121),c=/^\[object .+?Constructor\]$/,d=Function.prototype,u=Object.prototype,p=d.toString,g=u.hasOwnProperty,f=RegExp("^"+p.call(g).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const y=function(t){return!(!(0,l.A)(t)||s(t))&&((0,i.A)(t)?f:c).test((0,h.A)(t))};const m=function(t,e){return null==t?void 0:t[e]};const x=function(t,e){var r=m(t,e);return y(r)?r:void 0}},14792(t,e,r){"use strict";r.d(e,{A:()=>s});var i=r(2634),o=r(13153),n=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;const s=a?function(t){return null==t?[]:(t=Object(t),(0,i.A)(a(t),function(e){return n.call(t,e)}))}:o.A},9779(t,e,r){"use strict";r.d(e,{A:()=>T});var i=r(18744),o=r(41917);const n=(0,i.A)(o.A,"DataView");var a=r(68335);const s=(0,i.A)(o.A,"Promise");var l=r(39857);const h=(0,i.A)(o.A,"WeakMap");var c=r(88496),d=r(81121),u="[object Map]",p="[object Promise]",g="[object Set]",f="[object WeakMap]",y="[object DataView]",m=(0,d.A)(n),x=(0,d.A)(a.A),C=(0,d.A)(s),b=(0,d.A)(l.A),k=(0,d.A)(h),w=c.A;(n&&w(new n(new ArrayBuffer(1)))!=y||a.A&&w(new a.A)!=u||s&&w(s.resolve())!=p||l.A&&w(new l.A)!=g||h&&w(new h)!=f)&&(w=function(t){var e=(0,c.A)(t),r="[object Object]"==e?t.constructor:void 0,i=r?(0,d.A)(r):"";if(i)switch(i){case m:return y;case x:return u;case C:return p;case b:return g;case k:return f}return e});const T=w},85054(t,e,r){"use strict";r.d(e,{A:()=>h});var i=r(63442),o=r(29893),n=r(92049),a=r(25353),s=r(5254),l=r(30901);const h=function(t,e,r){for(var h=-1,c=(e=(0,i.A)(e,t)).length,d=!1;++ho});var i=/^(?:0|[1-9]\d*)$/;const o=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&i.test(t))&&t>-1&&t%1==0&&ts});var i=r(92049),o=r(61882),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;const s=function(t,e){if((0,i.A)(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!(0,o.A)(t))||(a.test(t)||!n.test(t)||null!=e&&t in Object(e))}},97271(t,e,r){"use strict";r.d(e,{A:()=>o});var i=Object.prototype;const o=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||i)}},64841(t,e,r){"use strict";r.d(e,{A:()=>s});var i=r(72136),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,n=o&&"object"==typeof module&&module&&!module.nodeType&&module,a=n&&n.exports===o&&i.A.process;const s=function(){try{var t=n&&n.require&&n.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(e){}}()},40367(t,e,r){"use strict";r.d(e,{A:()=>i});const i=function(t,e){return function(r){return t(e(r))}}},76875(t,e,r){"use strict";r.d(e,{A:()=>n});const i=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)};var o=Math.max;const n=function(t,e,r){return e=o(void 0===e?t.length-1:e,0),function(){for(var n=arguments,a=-1,s=o(n.length-e,0),l=Array(s);++an});var i=r(72136),o="object"==typeof self&&self&&self.Object===Object&&self;const n=i.A||o||Function("return this")()},29959(t,e,r){"use strict";r.d(e,{A:()=>i});const i=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}},67525(t,e,r){"use strict";r.d(e,{A:()=>h});var i=r(39142),o=r(84171),n=r(29008);const a=o.A?function(t,e){return(0,o.A)(t,"toString",{configurable:!0,enumerable:!1,value:(0,i.A)(e),writable:!0})}:n.A;var s=Date.now;const l=function(t){var e=0,r=0;return function(){var i=s(),o=16-(i-r);if(r=i,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}};const h=l(a)},30901(t,e,r){"use strict";r.d(e,{A:()=>o});var i=r(61882);const o=function(t){if("string"==typeof t||(0,i.A)(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},81121(t,e,r){"use strict";r.d(e,{A:()=>o});var i=Function.prototype.toString;const o=function(t){if(null!=t){try{return i.call(t)}catch(e){}try{return t+""}catch(e){}}return""}},39142(t,e,r){"use strict";r.d(e,{A:()=>i});const i=function(t){return function(){return t}}},66984(t,e,r){"use strict";r.d(e,{A:()=>i});const i=function(t,e){return t===e||t!=t&&e!=e}},11662(t,e,r){"use strict";r.d(e,{A:()=>l});var i=r(2634),o=r(6240);const n=function(t,e){var r=[];return(0,o.A)(t,function(t,i,o){e(t,i,o)&&r.push(t)}),r};var a=r(49574),s=r(92049);const l=function(t,e){return((0,s.A)(t)?i.A:n)(t,(0,a.A)(e,3))}},8058(t,e,r){"use strict";r.d(e,{A:()=>s});var i=r(72641),o=r(6240),n=r(99922),a=r(92049);const s=function(t,e){return((0,a.A)(t)?i.A:o.A)(t,(0,n.A)(e))}},39188(t,e,r){"use strict";r.d(e,{A:()=>n});const i=function(t,e){return null!=t&&e in Object(t)};var o=r(85054);const n=function(t,e){return null!=t&&(0,o.A)(t,e,i)}},29008(t,e,r){"use strict";r.d(e,{A:()=>i});const i=function(t){return t}},29893(t,e,r){"use strict";r.d(e,{A:()=>c});var i=r(88496),o=r(53098);const n=function(t){return(0,o.A)(t)&&"[object Arguments]"==(0,i.A)(t)};var a=Object.prototype,s=a.hasOwnProperty,l=a.propertyIsEnumerable,h=n(function(){return arguments}())?n:function(t){return(0,o.A)(t)&&s.call(t,"callee")&&!l.call(t,"callee")};const c=h},92049(t,e,r){"use strict";r.d(e,{A:()=>i});const i=Array.isArray},38446(t,e,r){"use strict";r.d(e,{A:()=>n});var i=r(89610),o=r(5254);const n=function(t){return null!=t&&(0,o.A)(t.length)&&!(0,i.A)(t)}},53533(t,e,r){"use strict";r.d(e,{A:()=>n});var i=r(38446),o=r(53098);const n=function(t){return(0,o.A)(t)&&(0,i.A)(t)}},99912(t,e,r){"use strict";r.d(e,{A:()=>l});var i=r(41917);const o=function(){return!1};var n="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=n&&"object"==typeof module&&module&&!module.nodeType&&module,s=a&&a.exports===n?i.A.Buffer:void 0;const l=(s?s.isBuffer:void 0)||o},89610(t,e,r){"use strict";r.d(e,{A:()=>n});var i=r(88496),o=r(23149);const n=function(t){if(!(0,o.A)(t))return!1;var e=(0,i.A)(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},5254(t,e,r){"use strict";r.d(e,{A:()=>i});const i=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},23149(t,e,r){"use strict";r.d(e,{A:()=>i});const i=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},53098(t,e,r){"use strict";r.d(e,{A:()=>i});const i=function(t){return null!=t&&"object"==typeof t}},61882(t,e,r){"use strict";r.d(e,{A:()=>n});var i=r(88496),o=r(53098);const n=function(t){return"symbol"==typeof t||(0,o.A)(t)&&"[object Symbol]"==(0,i.A)(t)}},33858(t,e,r){"use strict";r.d(e,{A:()=>d});var i=r(88496),o=r(5254),n=r(53098),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;const s=function(t){return(0,n.A)(t)&&(0,o.A)(t.length)&&!!a[(0,i.A)(t)]};var l=r(52789),h=r(64841),c=h.A&&h.A.isTypedArray;const d=c?(0,l.A)(c):s},69592(t,e,r){"use strict";r.d(e,{A:()=>i});const i=function(t){return void 0===t}},27422(t,e,r){"use strict";r.d(e,{A:()=>a});var i=r(83607),o=r(69471),n=r(38446);const a=function(t){return(0,n.A)(t)?(0,i.A)(t):(0,o.A)(t)}},89463(t,e,r){"use strict";r.d(e,{A:()=>l});const i=function(t,e,r,i){var o=-1,n=null==t?0:t.length;for(i&&n&&(r=t[++o]);++oi});const i=function(){return[]}},28894(t,e,r){"use strict";r.d(e,{A:()=>c});var i=r(241),o=r(45572),n=r(92049),a=r(61882),s=i.A?i.A.prototype:void 0,l=s?s.toString:void 0;const h=function t(e){if("string"==typeof e)return e;if((0,n.A)(e))return(0,o.A)(e,t)+"";if((0,a.A)(e))return l?l.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r};const c=function(t){return null==t?"":h(t)}},38207(t,e,r){"use strict";r.d(e,{A:()=>a});var i=r(45572);const o=function(t,e){return(0,i.A)(e,function(e){return t[e]})};var n=r(27422);const a=function(t){return null==t?[]:o(t,(0,n.A)(t))}},16459(t,e,r){"use strict";r.d(e,{pe:()=>L,PX:()=>ot,ru:()=>et,Un:()=>rt,$t:()=>ct,Sm:()=>pt,C4:()=>ut,$C:()=>G,rY:()=>gt,sM:()=>U,KL:()=>ft,Ib:()=>I,dq:()=>st,I5:()=>ht,yT:()=>V,vU:()=>O,_K:()=>dt,bH:()=>J});var i=r(76385),o=r(31293),n=r(86827),a=r(16750),s=r(70451);function l(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");const r=function(...i){const o=e?e.apply(this,i):i[0],n=r.cache;if(n.has(o))return n.get(o);const a=t.apply(this,i);return r.cache=n.set(o,a)||n,a};return r.cache=new(l.Cache||Map),r}function h(){}l.Cache=Map;var c=r(37110),d=r(42796);function u(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}var p=r(91461);function g(t){return"__proto__"===t}function f(t){if("object"!=typeof t)return!1;if(null==t)return!1;if(null===Object.getPrototypeOf(t))return!0;if("[object Object]"!==Object.prototype.toString.call(t)){const e=t[Symbol.toStringTag];return null!=e&&(!!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable&&t.toString()===`[object ${e}]`)}let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}var y=r(99125),m=r(89826);function x(t,e,r,i=new Map,o=void 0){const n=o?.(t,e,r,i);if(void 0!==n)return n;if((0,c.s)(t))return t;if(i.has(t))return i.get(t);if(Array.isArray(t)){const e=new Array(t.length);i.set(t,e);for(let n=0;n{const a=e?.(r,i,o,n);if(void 0!==a)return a;if("object"==typeof t){if("[object Object]"===(0,y.b)(t)&&"function"!=typeof t.constructor){const e={};return n.set(t,e),C(e,t,o,n),e}switch(Object.prototype.toString.call(t)){case m.kj:case m.OG:case m.$V:{const e=new t.constructor(t?.valueOf());return C(e,t),e}case m.R_:{const e={};return C(e,t),e.length=t.length,e[Symbol.iterator]=t[Symbol.iterator],e}default:return}}})}function k(t){return b(t)}var w=r(14608);function T(t){return"object"==typeof t&&null!==t}var S=r(23058);function v(t){return T(t)&&(0,S.X)(t)}var B=r(19663);function _(t,e,r,i){if((0,c.s)(t)&&(t=Object(t)),null==e||"object"!=typeof e)return t;if(i.has(e))return function(t){if((0,c.s)(t))return t;if(Array.isArray(t)||(0,d.i)(t)||t instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);const e=Object.getPrototypeOf(t);if(null==e)return Object.assign(Object.create(e),t);const r=e.constructor;if(t instanceof Date||t instanceof Map||t instanceof Set)return new r(t);if(t instanceof RegExp){const e=new r(t);return e.lastIndex=t.lastIndex,e}if(t instanceof DataView)return new r(t.buffer.slice(0));if(t instanceof Error){let e;return e=t instanceof AggregateError?new r(t.errors,t.message,{cause:t.cause}):new r(t.message,{cause:t.cause}),e.stack=t.stack,Object.assign(e,t),e}return"undefined"!=typeof File&&t instanceof File?new r([t],t.name,{type:t.type,lastModified:t.lastModified}):"object"==typeof t?Object.assign(Object.create(e),t):t}(i.get(e));if(i.set(e,t),Array.isArray(e)){e=e.slice();for(let t=0;tt.args);(0,i.$i)(t),o=(0,i.hH)(o,[...t])}else o=r.args;if(!o)return;let n=(0,i.Ch)(t,e);const a="config";return void 0!==o[a]&&("flowchart-v2"===n&&(n="flowchart"),o[n]=o[a],delete o[a]),o},"detectInit"),$=(0,n.K)(function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${M.source})(?=[}][%]{2}).*\n`,"ig");let n;t=t.trim().replace(r,"").replace(/'/gm,'"'),o.R.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const a=[];for(;null!==(n=i.DB.exec(t));)if(n.index===i.DB.lastIndex&&i.DB.lastIndex++,n&&!e||e&&n[1]?.match(e)||e&&n[2]?.match(e)){const t=n[1]?n[1]:n[2],e=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;a.push({type:t,args:e})}return 0===a.length?{type:t,args:null}:1===a.length?a[0]:a}catch(r){return o.R.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),O=(0,n.K)(function(t){return t.replace(i.DB,"")},"removeDirectives"),D=(0,n.K)(function(t,e){for(const[r,i]of e.entries())if(i.match(t))return r;return-1},"isSubstringInArray");function I(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return F[r]??e}function K(t,e){const r=t.trim();if(r)return"loose"!==e.securityLevel?(0,a.J)(r):r}(0,n.K)(I,"interpolateToCurve"),(0,n.K)(K,"formatUrl");var q=(0,n.K)((t,...e)=>{const r=t.split("."),i=r.length-1,n=r[i];let a=window;for(let s=0;s{r+=R(t,e),e=t});return j(t,r/2)}function z(t){return 1===t.length?t[0]:P(t)}(0,n.K)(R,"distance"),(0,n.K)(P,"traverseEdge"),(0,n.K)(z,"calcLabelPosition");var N=(0,n.K)((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),j=(0,n.K)((t,e)=>{let r,i=e;for(const o of t){if(r){const t=R(o,r);if(0===t)return r;if(t=1)return{x:o.x,y:o.y};if(e>0&&e<1)return{x:N((1-e)*r.x+e*o.x,5),y:N((1-e)*r.y+e*o.y,5)}}}r=o}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),W=(0,n.K)((t,e,r)=>{o.R.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const i=j(e,25),n=t?10:5,a=Math.atan2(e[0].y-i.y,e[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(a)*n+(e[0].x+i.x)/2,s.y=-Math.cos(a)*n+(e[0].y+i.y)/2,s},"calcCardinalityPosition");function H(t,e,r){const i=structuredClone(r);o.R.info("our points",i),"start_left"!==e&&"start_right"!==e&&i.reverse();const n=j(i,25+t),a=10+.5*t,s=Math.atan2(i[0].y-n.y,i[0].x-n.x),l={x:0,y:0};return"start_left"===e?(l.x=Math.sin(s+Math.PI)*a+(i[0].x+n.x)/2,l.y=-Math.cos(s+Math.PI)*a+(i[0].y+n.y)/2):"end_right"===e?(l.x=Math.sin(s-Math.PI)*a+(i[0].x+n.x)/2-5,l.y=-Math.cos(s-Math.PI)*a+(i[0].y+n.y)/2-5):"end_left"===e?(l.x=Math.sin(s)*a+(i[0].x+n.x)/2-5,l.y=-Math.cos(s)*a+(i[0].y+n.y)/2-5):(l.x=Math.sin(s)*a+(i[0].x+n.x)/2,l.y=-Math.cos(s)*a+(i[0].y+n.y)/2),l}function U(t){let e="",r="";for(const i of t)void 0!==i&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}(0,n.K)(H,"calcTerminalLabelPosition"),(0,n.K)(U,"getStylesFromArray");var Y=0,G=(0,n.K)(()=>(Y++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Y),"generateId");function X(t){let e="";const r="0123456789abcdef";for(let i=0;iX(t.length),"random"),Z=(0,n.K)(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),Q=(0,n.K)(function(t,e){const r=e.text.replace(i.Y2.lineBreakRegex," "),[,o]=ht(e.fontSize),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.style("text-anchor",e.anchor),n.style("font-family",e.fontFamily),n.style("font-size",o),n.style("font-weight",e.fontWeight),n.attr("fill",e.fill),void 0!==e.class&&n.attr("class",e.class);const a=n.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.attr("fill",e.fill),a.text(r),n},"drawSimpleText"),J=l((t,e,r)=>{if(!t)return t;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
    "},r),i.Y2.lineBreakRegex.test(t))return t;const o=t.split(" ").filter(Boolean),n=[];let a="";return o.forEach((t,i)=>{const s=rt(`${t} `,r),l=rt(a,r);if(s>e){const{hyphenatedStrings:i,remainingWord:o}=tt(t,e,"-",r);n.push(a,...i),a=o}else l+s>=e?(n.push(a),a=t):a=[a,t].filter(Boolean).join(" ");i+1===o.length&&n.push(a)}),n.filter(t=>""!==t).join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),tt=l((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const o=[...t],n=[];let a="";return o.forEach((t,s)=>{const l=`${a}${t}`;if(rt(l,i)>=e){const t=s+1,e=o.length===t,i=`${l}${r}`;n.push(e?l:i),a=""}else a=l}),{hyphenatedStrings:n,remainingWord:a}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function et(t,e){return ot(t,e).height}function rt(t,e){return ot(t,e).width}(0,n.K)(et,"calculateTextHeight"),(0,n.K)(rt,"calculateTextWidth");var it,ot=l((t,e)=>{const{fontSize:r=12,fontFamily:o="Arial",fontWeight:n=400}=e;if(!t)return{width:0,height:0};const[,a]=ht(r),l=["sans-serif",o],h=t.split(i.Y2.lineBreakRegex),c=[],d=(0,s.Ltv)("body");if(!d.remove)return{width:0,height:0,lineHeight:0};const u=d.append("svg");for(const i of l){let t=0;const e={width:0,height:0,lineHeight:0};for(const r of h){const o=Z();o.text=r||L;const s=Q(u,o).style("font-size",a).style("font-weight",n).style("font-family",i),l=(s._groups||s)[0][0].getBBox();if(0===l.width&&0===l.height)throw new Error("svg element not in render tree");e.width=Math.round(Math.max(e.width,l.width)),t=Math.round(l.height),e.height+=t,e.lineHeight=Math.round(Math.max(e.lineHeight,t))}c.push(e)}u.remove();return c[isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),nt=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{(0,n.K)(this,"InitIDGenerator")}},at=(0,n.K)(function(t){return it=it||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),it.innerHTML=t,unescape(it.textContent)},"entityDecode");function st(t){return"str"in t}(0,n.K)(st,"isDetailedError");var lt=(0,n.K)((t,e,r,i)=>{if(!i)return;const o=t.node()?.getBBox();o&&t.append("text").text(i).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-r).attr("class",e)},"insertTitle"),ht=(0,n.K)(t=>{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function ct(t,e){return A({},t,e)}(0,n.K)(ct,"cleanAndMerge");var dt={assignWithDepth:i.hH,wrapLabel:J,calculateTextHeight:et,calculateTextWidth:rt,calculateTextDimensions:ot,cleanAndMerge:ct,detectInit:E,detectDirective:$,isSubstringInArray:D,interpolateToCurve:I,calcLabelPosition:z,calcCardinalityPosition:W,calcTerminalLabelPosition:H,formatUrl:K,getStylesFromArray:U,generateId:G,random:V,runFunc:q,entityDecode:at,insertTitle:lt,isLabelCoordinateInPath:yt,parseFontSize:ht,InitIDGenerator:nt},ut=(0,n.K)(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/#\w+;/g,function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"\ufb02\xb0\xb0"+e+"\xb6\xdf":"\ufb02\xb0"+e+"\xb6\xdf"}),e},"encodeEntities"),pt=(0,n.K)(function(t){return t.replace(/\ufb02\xb0\xb0/g,"&#").replace(/\ufb02\xb0/g,"&").replace(/\xb6\xdf/g,";")},"decodeEntities"),gt=(0,n.K)((t,e,{counter:r=0,prefix:i,suffix:o},n)=>n||`${i?`${i}_`:""}${t}_${e}_${r}${o?`_${o}`:""}`,"getEdgeId");function ft(t){return t??null}function yt(t,e){const r=Math.round(t.x),i=Math.round(t.y),o=e.replace(/(\d+\.\d+)/g,t=>Math.round(parseFloat(t)).toString());return o.includes(r.toString())||o.includes(i.toString())}(0,n.K)(ft,"handleUndefinedAttr"),(0,n.K)(yt,"isLabelCoordinateInPath")},9417(t,e,r){"use strict";r.d(e,{XX:()=>g,q7:()=>f,sO:()=>p});var i=r(78771),o=r(46853),n=r(717),a=r(79515),s=r(16459),l=r(76385),h=r(31293),c=r(86827),d={common:l.Y2,getConfig:l.zj,insertCluster:i.U,insertEdge:o.Jo,insertEdgeLabel:o.jP,insertMarkers:o.g0,insertNode:n.on,interpolateToCurve:s.Ib,labelHelper:a.Zk,log:h.R,positionEdgeLabel:o.T_},u={},p=(0,c.K)(t=>{for(const e of t)u[e.name]=e},"registerLayoutLoaders");(0,c.K)(()=>{p([{name:"dagre",loader:(0,c.K)(async()=>await Promise.all([r.e(3765),r.e(727)]).then(r.bind(r,727)),"loader")},{name:"swimlane",loader:(0,c.K)(async()=>await r.e(4830).then(r.bind(r,24830)),"loader")},{name:"cose-bilkent",loader:(0,c.K)(async()=>await Promise.all([r.e(165),r.e(2180)]).then(r.bind(r,2180)),"loader")}])},"registerDefaultLayoutLoaders")();var g=(0,c.K)(async(t,e)=>{if(!(t.layoutAlgorithm in u))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);if(t.diagramId)for(const c of t.nodes){const e=c.domId||c.id;c.domId=`${t.diagramId}-${e}`}const r=u[t.layoutAlgorithm],i=await r.loader(),{theme:o,themeVariables:n}=t.config,{useGradient:a,gradientStart:s,gradientStop:l}=n,h=e.attr("id");if(e.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",""+(o?.includes("dark")?"#FFFFFF":"#000000")),e.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",""+(o?.includes("dark")?"#FFFFFF":"#000000")),a){const t=e.append("linearGradient").attr("id",e.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");t.append("svg:stop").attr("offset","0%").attr("stop-color",s).attr("stop-opacity",1),t.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(t,e,d,{algorithm:r.algorithm})},"render"),f=(0,c.K)((t="",{fallback:e="dagre"}={})=>{if(t in u)return t;if(e in u)return h.R.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm")},5637(t,e,r){"use strict";r.d(e,{D:()=>a});var i=r(76385),o=r(86827),n=r(70451),a=(0,o.K)(t=>{const{securityLevel:e}=(0,i.D7)();let r=(0,n.Ltv)("body");if("sandbox"===e){const e=(0,n.Ltv)(`#i${t}`),i=e.node()?.contentDocument??document;r=(0,n.Ltv)(i.body)}return r.select(`#${t}`)},"selectSvgElement")},35167(t,e,r){"use strict";r.d(e,{B:()=>u,OS:()=>_,QV:()=>D,dc:()=>v,ju:()=>y,n5:()=>O,nf:()=>I,sc:()=>F,sv:()=>g,xY:()=>$});var i=r(78771),o=r(46853),n=r(717),a=r(79515),s=r(16459),l=r(76385),h=r(31293),c=r(86827),d=r(697);function u(t,{edgePathsClass:e="edges edgePath"}={}){const r=t.insert("g").attr("class","root");return{clusters:r.insert("g").attr("class","clusters"),edgePaths:r.insert("g").attr("class",e),edgeLabels:r.insert("g").attr("class","edgeLabels"),nodes:r.insert("g").attr("class","nodes"),rootGroups:r}}async function p(t,e){if(e.label){const{shapeSvg:r,bbox:i}=await(0,a.Zk)(t,e);e.labelBBox={width:i.width,height:i.height},r.remove()}else e.labelBBox={width:0,height:0}}async function g(t,e,r){const i=await(0,n.on)(t,e,r),o=i.node()?.getBBox()??{width:0,height:0};return e.width=o.width,e.height=o.height,i}async function f(t,e){const i=new d.T({multigraph:!0,compound:!0}),n=[...e.edges],a=(0,l.D7)(),s=u(t),{edgeLabels:h,nodes:c}=s,f=new Map,y=null!=t.node();await Promise.all(e.nodes.map(async t=>{if(t.isGroup)y&&await p(c,t),i.setNode(t.id,{...t});else{if(y){const e=await g(c,t,{config:a,dir:t.dir});f.set(t.id,e)}i.setNode(t.id,{...t})}}));for(const r of n){y&&(0,o.a6)(r)&&await(0,o.jP)(h,r),i.setEdge(r.start,r.end,{...r},r.id);e.edges.some(t=>t.id===r.id)||e.edges.push(r)}if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:i}=await r.e(2857).then(r.bind(r,62857));i(t,e)}return{graph:i,groups:s,nodeElements:f}}(0,c.K)(u,"createLayoutElementGroups"),(0,c.K)(p,"measureGroupLabel"),(0,c.K)(g,"insertMeasuredNode"),(0,c.K)(f,"createGraphWithElements");var y=new Map,m=new Map,x=new Map,C=(0,c.K)(()=>{m.clear(),x.clear(),y.clear()},"clear"),b=(0,c.K)((t,e)=>{const r=m.get(e)||[];return h.R.trace("In isDescendant",e," ",t," = ",r.includes(t)),r.includes(t)},"isDescendant"),k=(0,c.K)((t,e)=>{const r=m.get(e)||[];return h.R.info("Descendants of ",e," is ",r),h.R.info("Edge is ",t),t.v!==e&&t.w!==e&&(r?r.includes(t.v)||b(t.v,e)||b(t.w,e)||r.includes(t.w):(h.R.debug("Tilt, ",e,",not in descendants"),!1))},"edgeInCluster"),w=(0,c.K)((t,e,r,i)=>{h.R.debug("Copying children of ",t,"root",i,"data",e.node(t),i);const o=e.children(t)||[];t!==i&&o.push(t),h.R.debug("Copying (nodes) clusterId",t,"nodes",o),o.forEach(o=>{if(e.children(o).length>0)w(o,e,r,i);else{const n=e.node(o);h.R.info("cp ",o," to ",i," with parent ",t),r.setNode(o,n),i!==e.parent(o)&&(h.R.debug("Setting parent",o,e.parent(o)),r.setParent(o,e.parent(o))),t!==i&&o!==t?(h.R.debug("Setting parent",o,t),r.setParent(o,t)):(h.R.info("In copy ",t,"root",i,"data",e.node(t),i),h.R.debug("Not Setting parent for node=",o,"cluster!==rootId",t!==i,"node!==clusterId",o!==t));const a=e.edges(o);h.R.debug("Copying Edges",a),a.forEach(o=>{h.R.info("Edge",o);const n=e.edge(o.v,o.w,o.name);h.R.info("Edge data",n,i);try{k(o,i)?(h.R.info("Copying as ",o.v,o.w,n,o.name),r.setEdge(o.v,o.w,n,o.name),h.R.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):h.R.info("Skipping copy of edge ",o.v,"--\x3e",o.w," rootId: ",i," clusterId:",t)}catch(a){h.R.error(a)}})}h.R.debug("Removing node",o),e.removeNode(o)})},"copy"),T=(0,c.K)((t,e)=>{const r=e.children(t);let i=[...r];for(const o of r)x.set(o,t),i=[...i,...T(o,e)];return i},"extractDescendants"),S=(0,c.K)((t,e,r)=>{const i=t.edges().filter(t=>t.v===e||t.w===e),o=t.edges().filter(t=>t.v===r||t.w===r),n=i.map(t=>({v:t.v===e?r:t.v,w:t.w===e?e:t.w})),a=o.map(t=>({v:t.v,w:t.w}));return n.filter(t=>a.some(e=>t.v===e.v&&t.w===e.w))},"findCommonEdges"),v=(0,c.K)((t,e,r)=>{const i=e.children(t);if(h.R.trace("Searching children of id ",t,i),i.length<1)return t;let o;for(const n of i){const t=v(n,e,r),i=S(e,r,t);if(t){if(!(i.length>0))return t;o=t}}return o},"findNonClusterChild"),B=(0,c.K)(t=>y.has(t)&&y.get(t).externalConnections&&y.has(t)?y.get(t).id:t,"getAnchorId"),_=(0,c.K)((t,e)=>{if(!t||e>10)h.R.debug("Opting out, no graph ");else{h.R.debug("Opting in, graph "),t.nodes().forEach(function(e){t.children(e).length>0&&(h.R.debug("Cluster identified",e," Replacement id in edges: ",v(e,t,e)),m.set(e,T(e,t)),y.set(e,{id:v(e,t,e),clusterData:t.node(e)}))}),t.nodes().forEach(function(e){const r=t.children(e),i=t.edges();r.length>0?(h.R.debug("Cluster identified",e,m),i.forEach(t=>{b(t.v,e)^b(t.w,e)&&(h.R.debug("Edge: ",t," leaves cluster ",e),h.R.debug("Descendants of XXX ",e,": ",m.get(e)),y.get(e).externalConnections=!0)})):h.R.debug("Not a cluster ",e,m)});for(let e of y.keys()){const r=y.get(e).id,i=t.parent(r);i!==e&&y.has(i)&&!y.get(i).externalConnections&&(y.get(e).id=i);const o=t.edges().some(t=>t.v===e);if(r&&y.get(e)?.externalConnections&&o&&M(t,r,e)){const i=E(t,e,t.parent(r));i&&(y.get(e).id=i)}}t.edges().forEach(function(e){const r=t.edge(e);h.R.debug("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),h.R.debug("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t.edge(e)));let i=e.v,o=e.w;if(h.R.debug("Fix XXX",y,"ids:",e.v,e.w,"Translating: ",y.get(e.v)," --- ",y.get(e.w)),y.get(e.v)||y.get(e.w)){if(h.R.debug("Fixing and trying - removing XXX",e.v,e.w,e.name),i=B(e.v),o=B(e.w),t.removeEdge(e.v,e.w,e.name),i!==e.v){const o=t.parent(i);y.get(o).externalConnections=!0,r.fromCluster=e.v}if(o!==e.w){const i=t.parent(o);y.get(i).externalConnections=!0,r.toCluster=e.w}h.R.debug("Fix Replacing with XXX",i,o,e.name),t.setEdge(i,o,r,e.name)}}),A(t,0),h.R.trace(y)}},"adjustClustersAndEdges"),A=(0,c.K)((t,e)=>{if(e>10)return void h.R.error("Bailing out");let r=t.nodes(),i=!1;for(const o of r){const e=t.children(o);i=i||e.length>0}if(i){h.R.debug("Nodes = ",r,e);for(const i of r)if(h.R.debug("Extracting node",i,y,y.has(i)&&!y.get(i).externalConnections,!t.parent(i),t.node(i),t.children("D")," Depth ",e),y.has(i))if(!y.get(i).externalConnections&&t.children(i)&&t.children(i).length>0){h.R.debug("Cluster without external connections, without a parent and with children",i,e);let r="TB"===t.graph().rankdir?"LR":"TB";y.get(i)?.clusterData?.dir&&(r=y.get(i).clusterData.dir,h.R.debug("Fixing dir",y.get(i).clusterData.dir,r));const o=new d.T({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});w(i,t,o,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:y.get(i).clusterData,label:y.get(i).label,graph:o})}else h.R.debug("Cluster ** ",i," **not meeting the criteria !externalConnections:",!y.get(i).externalConnections," no parent: ",!t.parent(i)," children ",t.children(i)&&t.children(i).length>0,t.children("D"),e),h.R.debug(y);else h.R.debug("Not a cluster",i,e);r=t.nodes(),h.R.debug("New list of nodes",r);for(const i of r){const r=t.node(i);h.R.debug(" Now next level",i,r),r?.clusterNode&&A(r.graph,e+1)}}else h.R.debug("Done, no node has children",t.nodes())},"extractor"),L=(0,c.K)((t,e)=>{if(0===e.length)return[];let r=Object.assign([],e);return e.forEach(e=>{const i=t.children(e),o=L(t,i);r=[...r,...o]}),r},"sorter"),F=(0,c.K)(t=>L(t,t.children()),"sortNodesByHierarchy"),M=(0,c.K)((t,e,r)=>{let i=t.parent(e);for(;i&&i!==r;){const e=y.get(i);if(e&&!e.externalConnections)return!0;i=t.parent(i)}return!1},"isNodeInExtractableCluster"),E=(0,c.K)((t,e,r)=>{const i=t.children(e)??[];for(const o of i){if(o===r||b(o,r))continue;const i=v(o,t,e);if(i&&!M(t,i,e))return i}return null},"findSafeAnchorNode");function $({prepareLayout:t,measureLayout:e,runLayoutCore:r,paintLayout:i,afterPaint:n,paintOptions:a}){const s=e??D;return(0,c.K)(async function(e,l,h,c){const d=l.select("g");(0,o.g0)(d,e.markers,e.type,e.diagramId),O();const u={element:d,helpers:h,options:c};u.preparedLayout=await(t?.(e,u));const p=await s(e,u),g=await r(e,u),f={...u,measure:p};i?await i(e,f,g):await I(e,f,a),await(n?.(e,f,g))},"render")}function O(){(0,n.IU)(),(0,o.IU)(),(0,i.I)(),C()}async function D(t,{element:e}){return await f(e,t)}async function I(t,e,r={}){const{measure:i}=e,{groups:o}=i;for(const a of r.getNodes?.(t,e)??t.nodes)r.skipNode?.(a,e)||await K(o,a,e,r);const n=R(t.nodes);for(const a of t.edges)P(a,r)||await z(o,a,n,t,r,e)}async function K(t,e,r,o){e.clusterNode?(0,n.U_)(e):q(e,r,o)?await(0,i.U)(t.clusters,e):(0,n.U_)(e)}function q(t,e,r){return!0===t.isGroup&&(r.isCluster?.(t,e)??!0)}function R(t){const e=new Map;for(const r of t)r?.id&&e.set(r.id,r);return e}function P(t,e){return t.isLayoutOnly||Boolean(e.skipEdge?.(t))}async function z(t,e,r,i,n,a){const s=(0,o.Jo)(t.edgePaths,{...e},n.clusterDb??new Map,i.type,N(e.start,e,r,a,n),N(e.end,e,r,a,n),i.diagramId,j(e,n));(0,o.a6)(e)&&(o.lP.has(e.id)||await(0,o.jP)(t.edgeLabels,e),W(e,s))}function N(t,e,r,i,o){return o.getEdgeNode?.(t,e,i)??(t?r.get(t)??{}:{})}function j(t,e){return"function"==typeof e.skipIntersect?e.skipIntersect(t):e.skipIntersect??!1}function W(t,e){const r=e?.updatedPath??e?.originalPath,i=(0,l.zj)(),{subGraphTitleTotalMargin:a}=(0,n.Oi)({flowchart:i.flowchart??{}});if(t.label){const i=o.lP.get(t.id);let n=t.x,l=t.y;if(r){const i=s._K.calcLabelPosition(r);h.R.debug("Moving label "+t.label+" from (",n,",",l,") to (",i.x,",",i.y,") abc88"),e?.updatedPath&&(n=i.x,l=i.y)}i.attr("transform",`translate(${n}, ${l+a/2})`)}if(t?.startLabelLeft){const e=o.UQ.get(t.id).startLeft;let i=t?.x,n=t?.y;if(r){const e=s._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}if(t.startLabelRight){const e=o.UQ.get(t.id).startRight;let i=t.x,n=t.y;if(r){const e=s._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}if(t.endLabelLeft){const e=o.UQ.get(t.id).endLeft;let i=t.x,n=t.y;if(r){const e=s._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}if(t.endLabelRight){const e=o.UQ.get(t.id).endRight;let i=t.x,n=t.y;if(r){const e=s._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}}(0,c.K)($,"createCommonLayoutRenderer"),(0,c.K)(O,"clearLayoutRenderState"),(0,c.K)(D,"defaultMeasureLayout"),(0,c.K)(I,"paintLayoutData"),(0,c.K)(K,"paintLayoutNode"),(0,c.K)(q,"shouldPaintAsCluster"),(0,c.K)(R,"buildNodeLookup"),(0,c.K)(P,"shouldSkipPaintEdge"),(0,c.K)(z,"paintLayoutEdge"),(0,c.K)(N,"getRenderedNode"),(0,c.K)(j,"shouldSkipIntersect"),(0,c.K)(W,"positionRenderedEdgeLabel")},76385(t,e,r){"use strict";r.d(e,{C0:()=>wt,xA:()=>dt,hH:()=>m,Dl:()=>Vt,IU:()=>ge,Wt:()=>he,Y2:()=>Jt,a$:()=>re,KG:()=>ne,sb:()=>Q,ME:()=>ve,UI:()=>Y,Ch:()=>St,mW:()=>Tt,DB:()=>bt,_3:()=>J,EJ:()=>Ct,m7:()=>xe,iN:()=>ye,zj:()=>ht,D7:()=>Te,Gs:()=>Me,J$:()=>_t,ab:()=>be,E:()=>xt,Q2:()=>st,P$:()=>B,ID:()=>Pt,TM:()=>mt,Wi:()=>Xt,H1:()=>At,QO:()=>jt,Js:()=>Fe,Xd:()=>vt,dj:()=>Qt,cL:()=>ut,Df:()=>Z,$i:()=>V,jZ:()=>Ot,oB:()=>Be,wZ:()=>nt,EI:()=>me,SV:()=>fe,Nk:()=>lt,XV:()=>Se,ke:()=>Ce,UU:()=>ot,ot:()=>ie,mj:()=>_e,tM:()=>le,H$:()=>N,B6:()=>at});var i=r(31293),o=r(86827),n=r(74886),a=r(8232);const s=(t,e)=>{const r=n.A.parse(t),i={};for(const o in e)e[o]&&(i[o]=r[o]+e[o]);return(0,a.A)(t,i)};var l=r(25582);const h=(t,e,r=50)=>{const{r:i,g:o,b:a,a:s}=n.A.parse(t),{r:h,g:c,b:d,a:u}=n.A.parse(e),p=r/100,g=2*p-1,f=s-u,y=((g*f===-1?g:(g+f)/(1+g*f))+1)/2,m=1-y,x=i*y+h*m,C=o*y+c*m,b=a*y+d*m,k=s*p+u*(1-p);return(0,l.A)(x,C,b,k)},c=(t,e=100)=>{const r=n.A.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,h(r,t,e)};var d,u=r(75263),p=r(78041),g=r(3219),f=r(99418),y=(0,o.K)((t,e,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(e)&&!Array.isArray(t))return e.forEach(e=>y(t,e,i)),t;if(Array.isArray(e)&&Array.isArray(t))return e.forEach(e=>{t.includes(e)||t.push(e)}),t;if(null==t||r<=0)return null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e;if(null!=e&&"object"==typeof t&&"object"==typeof e){const i=t;Object.entries(e).forEach(([e,o])=>{if("object"==typeof o){if(null===o)return;Object.hasOwn(t,e)||Object.defineProperty(t,e,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),void 0===i[e]&&(i[e]=Array.isArray(o)?[]:{}),"object"==typeof i[e]&&(i[e]=y(i[e],o,{depth:r-1}))}else"object"!=typeof i[e]&&(Object.hasOwn(t,e)?i[e]=o:Object.defineProperty(t,e,{value:o,writable:!0,enumerable:!0,configurable:!0}))})}return t},"assignWithDepth"),m=y,x="#ffffff",C="#f2f2f2",b=(0,o.K)((t,e)=>s(t,e?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder"),k=class{static{(0,o.K)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||s(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||s(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||b(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||b(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||b(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,p.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||(0,u.A)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,u.A)(this.mainBkg,10)):(this.rowOdd=this.rowOdd||(0,p.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||(0,p.A)(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},w=(0,o.K)(t=>{const e=new k;return e.calculate(t),e},"getThemeVariables"),T=class{static{(0,o.K)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,p.A)(this.primaryColor,16),this.tertiaryColor=s(this.primaryColor,{h:-160}),this.primaryBorderColor=c(this.background),this.secondaryBorderColor=b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=b(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,p.A)(c("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=(0,l.A)(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=(0,u.A)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=(0,u.A)(this.sectionBkgColor,10),this.taskBorderColor=(0,l.A)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=(0,l.A)(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||(0,p.A)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,u.A)(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=(0,p.A)(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=(0,p.A)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=(0,p.A)(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=c(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=s(this.primaryColor,{h:64}),this.fillType3=s(this.secondaryColor,{h:64}),this.fillType4=s(this.primaryColor,{h:-64}),this.fillType5=s(this.secondaryColor,{h:-64}),this.fillType6=s(this.primaryColor,{h:128}),this.fillType7=s(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330});for(let t=0;t{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},S=(0,o.K)(t=>{const e=new T;return e.calculate(t),e},"getThemeVariables"),v=class{static{(0,o.K)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=s(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=s(this.primaryColor,{h:-160}),this.primaryBorderColor=b(this.primaryColor,this.darkMode),this.secondaryBorderColor=b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=b(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=b(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=(0,l.A)(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,u.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,u.A)(this.tertiaryColor,40);for(let t=0;t{"calculated"===this[t]&&(this[t]=void 0)}),"object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},B=(0,o.K)(t=>{const e=new v;return e.calculate(t),e},"getThemeVariables"),_=class{static{(0,o.K)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=(0,p.A)("#cde498",10),this.primaryBorderColor=b(this.primaryColor,this.darkMode),this.secondaryBorderColor=b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=b(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.primaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=(0,u.A)(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,u.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,u.A)(this.tertiaryColor,40);for(let t=0;t{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},A=(0,o.K)(t=>{const e=new _;return e.calculate(t),e},"getThemeVariables"),L=class{static{(0,o.K)(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,p.A)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=s(this.primaryColor,{h:-160}),this.primaryBorderColor=b(this.primaryColor,this.darkMode),this.secondaryBorderColor=b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=b(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||(0,p.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=(0,p.A)(this.contrast,55),this.border2=this.contrast,this.actorBorder=(0,p.A)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},F=(0,o.K)(t=>{const e=new L;return e.calculate(t),e},"getThemeVariables"),M=class{static{(0,o.K)(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=b(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||s(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||s(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||b(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||b(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||b(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",e="#E9E9F1",r=s(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,p.A)(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||e,this.cScale2=this.cScale2||r,this.cScale3=this.cScale3||s(t,{h:30}),this.cScale4=this.cScale4||s(t,{h:60}),this.cScale5=this.cScale5||s(t,{h:90}),this.cScale6=this.cScale6||s(t,{h:120}),this.cScale7=this.cScale7||s(t,{h:150}),this.cScale8=this.cScale8||s(t,{h:210,l:150}),this.cScale9=this.cScale9||s(t,{h:270}),this.cScale10=this.cScale10||s(t,{h:300}),this.cScale11=this.cScale11||s(t,{h:330}),this.darkMode)for(let o=0;o{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},E=(0,o.K)(t=>{const e=new M;return e.calculate(t),e},"getThemeVariables"),$=class{static{(0,o.K)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,p.A)(this.primaryColor,16),this.tertiaryColor=s(this.primaryColor,{h:-160}),this.primaryBorderColor=c(this.background),this.secondaryBorderColor=b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=b(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,p.A)(c("#323D47"),10),this.border1="#ccc",this.border2=(0,l.A)(255,255,255,.25),this.arrowheadColor=c(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||s(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||s(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||b(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||b(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||b(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,p.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},O=(0,o.K)(t=>{const e=new $;return e.calculate(t),e},"getThemeVariables"),D=class{static{(0,o.K)(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=b("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||s(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||s(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||b(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||b(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||b(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",e="#E9E9F1",r=s(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,p.A)(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let o=0;o{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},I=(0,o.K)(t=>{const e=new D;return e.calculate(t),e},"getThemeVariables"),K=class{static{(0,o.K)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,p.A)(this.primaryColor,16),this.tertiaryColor=s(this.primaryColor,{h:-160}),this.primaryBorderColor=c(this.background),this.secondaryBorderColor=b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=b(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,p.A)(c("#323D47"),10),this.border1="#ccc",this.border2=(0,l.A)(255,255,255,.25),this.arrowheadColor=c(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||s(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||s(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||b(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||b(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||b(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,p.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},q=(0,o.K)(t=>{const e=new K;return e.calculate(t),e},"getThemeVariables"),R=class{static{(0,o.K)(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=b(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||s(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||s(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||b(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||b(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||b(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",e="#E9E9F1",r=s(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,p.A)(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let o=0;o{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},P=(0,o.K)(t=>{const e=new R;return e.calculate(t),e},"getThemeVariables"),z=class{static{(0,o.K)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,p.A)(this.primaryColor,16),this.tertiaryColor=s(this.primaryColor,{h:-160}),this.primaryBorderColor=c(this.background),this.secondaryBorderColor=b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=b(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,p.A)(c("#323D47"),10),this.border1="#ccc",this.border2=(0,l.A)(255,255,255,.25),this.arrowheadColor=c(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||s(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||s(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||b(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||b(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||b(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,p.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let e=0;e{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},N={base:{getThemeVariables:w},dark:{getThemeVariables:S},default:{getThemeVariables:B},forest:{getThemeVariables:A},neutral:{getThemeVariables:F},neo:{getThemeVariables:E},"neo-dark":{getThemeVariables:O},redux:{getThemeVariables:I},"redux-dark":{getThemeVariables:q},"redux-color":{getThemeVariables:P},"redux-dark-color":{getThemeVariables:(0,o.K)(t=>{const e=new z;return e.calculate(t),e},"getThemeVariables")}},j={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},W={...j,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",nodePlacementAlignment:"NONE",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:N.default.getThemeVariables(),sequence:{...j.sequence,messageFont:(0,o.K)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:(0,o.K)(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:(0,o.K)(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{defaultRenderer:"dagre-wrapper",hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...j.gantt,tickInterval:void 0,useWidth:void 0},c4:{...j.c4,useWidth:void 0,personFont:(0,o.K)(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...j.flowchart,inheritDir:!1},external_personFont:(0,o.K)(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:(0,o.K)(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:(0,o.K)(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:(0,o.K)(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:(0,o.K)(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:(0,o.K)(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:(0,o.K)(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:(0,o.K)(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:(0,o.K)(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:(0,o.K)(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:(0,o.K)(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:(0,o.K)(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:(0,o.K)(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:(0,o.K)(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:(0,o.K)(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:(0,o.K)(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:(0,o.K)(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:(0,o.K)(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:(0,o.K)(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:(0,o.K)(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:(0,o.K)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...j.pie,useWidth:984},xyChart:{...j.xyChart,useWidth:void 0},requirement:{...j.requirement,useWidth:void 0},packet:{...j.packet},eventmodeling:{...j.eventmodeling},treeView:{...j.treeView,useWidth:void 0},radar:{...j.radar},railroad:{...j.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...j.ishikawa},sankey:{...j.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...j.venn},cynefin:{...j.cynefin}},H=(0,o.K)((t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:"object"==typeof t[i]&&null!==t[i]?[...r,e+i,...H(t[i],"")]:[...r,e+i],[]),"keyify"),U=new Set(H(W,"")),Y=W,G={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},X=(0,o.K)((t,e)=>{for(const r of Object.keys(t)){const o=t[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||"string"!=typeof o||!e.test(o))&&(i.R.debug("sanitize deleting dictionary entry:",r,o),delete t[r])}},"sanitizeDictionaryConfig"),V=(0,o.K)(t=>{if(i.R.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach(t=>V(t));else{for(const e of Object.keys(t)){if(i.R.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!U.has(e)||null==t[e]){i.R.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){const r=G[e];r?X(t[e],r):(i.R.debug("sanitizing object",e),V(t[e]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const o of r)e.includes(o)&&(i.R.debug("sanitizing css option",e),t[e]=Z(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}i.R.debug("After sanitization",t)}},"sanitizeDirective"),Z=(0,o.K)(t=>{let e=0,r=0;for(const i of t){if(e!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase()),"evaluate"),tt=m({},Q),et=[],rt=m({},Q),it=(0,o.K)((t,e)=>{let r=m({},t),i={};for(const o of e)ct(o),i=m(i,o);if(r=m(r,i),i.theme&&i.theme in N){const t=m({},d),e=m(t.themeVariables||{},i.themeVariables);r.theme&&r.theme in N&&(r.themeVariables=N[r.theme].getThemeVariables(e))}return yt(rt=r),rt},"updateCurrentConfig"),ot=(0,o.K)(t=>(tt=m({},Q),tt=m(tt,t),t.theme&&N[t.theme]&&(tt.themeVariables=N[t.theme].getThemeVariables(t.themeVariables)),it(tt,et),tt),"setSiteConfig"),nt=(0,o.K)(t=>{d=m({},t)},"saveConfigFromInitialize"),at=(0,o.K)(t=>(tt=m(tt,t),it(tt,et),tt),"updateSiteConfig"),st=(0,o.K)(()=>m({},tt),"getSiteConfig"),lt=(0,o.K)(t=>(it(rt,[t]),ht()),"setConfig"),ht=(0,o.K)(()=>m({},rt),"getConfig"),ct=(0,o.K)(t=>{t&&(["secure",...tt.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(i.R.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&ct(t[e])}))},"sanitize"),dt=(0,o.K)(t=>{V(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),et.push(t),it(tt,et)},"addDirective"),ut=(0,o.K)((t=tt)=>{it(t,et=[])},"reset"),pt={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},gt={},ft=(0,o.K)(t=>{gt[t]||(i.R.warn(pt[t]),gt[t]=!0)},"issueWarning"),yt=(0,o.K)(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&ft("LAZY_LOAD_DEPRECATED")},"checkConfig"),mt=(0,o.K)(()=>{let t={};d&&(t=m(t,d));for(const e of et)t=m(t,e);return t},"getUserDefinedConfig"),xt=(0,o.K)(t=>(null!=t.flowchart?.htmlLabels&&ft("FLOWCHART_HTML_LABELS_DEPRECATED"),J(t.htmlLabels??t.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),Ct=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,bt=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,kt=/\s*%%.*\n/gm,wt=class extends Error{static{(0,o.K)(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},Tt={},St=(0,o.K)(function(t,e){t=t.replace(Ct,"").replace(bt,"").replace(kt,"\n");for(const[r,{detector:i}]of Object.entries(Tt)){if(i(t,e))return r}throw new wt(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),vt=(0,o.K)((...t)=>{for(const{id:e,detector:r,loader:i}of t)Bt(e,r,i)},"registerLazyLoadedDiagrams"),Bt=(0,o.K)((t,e,r)=>{Tt[t]&&i.R.warn(`Detector with key ${t} already exists. Overwriting.`),Tt[t]={detector:e,loader:r},i.R.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),_t=(0,o.K)(t=>Tt[t].loader,"getDiagramLoader"),At=//gi,Lt=(0,o.K)(t=>{if(!t)return[""];return Rt(t).replace(/\\n/g,"#br#").split("#br#")},"getRows"),Ft=(()=>{let t=!1;return()=>{t||(Mt(),t=!0)}})();function Mt(){const t="data-temp-href-target";f.A.addHook("beforeSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),f.A.addHook("afterSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))})}(0,o.K)(Mt,"setupDompurifyHooks");var Et=(0,o.K)(t=>{Ft();return f.A.sanitize(t)},"removeScript"),$t=(0,o.K)((t,e)=>{if(xt(e)){const r=e.securityLevel;"antiscript"===r||"strict"===r||"sandbox"===r?t=Et(t):"loose"!==r&&(t=(t=(t=Rt(t)).replace(//g,">")).replace(/=/g,"="),t=qt(t))}return t},"sanitizeMore"),Ot=(0,o.K)((t,e)=>t?t=e.dompurifyConfig?f.A.sanitize($t(t,e),e.dompurifyConfig).toString():f.A.sanitize($t(t,e),{FORBID_TAGS:["style"]}).toString():t,"sanitizeText"),Dt=(0,o.K)((t,e)=>"string"==typeof t?Ot(t,e):t.flat().map(t=>Ot(t,e)),"sanitizeTextOrArray"),It=(0,o.K)(t=>At.test(t),"hasBreaks"),Kt=(0,o.K)(t=>t.split(At),"splitBreaks"),qt=(0,o.K)(t=>t.replace(/#br#/g,"
    "),"placeholderToBreak"),Rt=(0,o.K)(t=>t.replace(At,"#br#"),"breakToPlaceholder"),Pt=(0,o.K)(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),zt=(0,o.K)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.max(...e)},"getMax"),Nt=(0,o.K)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.min(...e)},"getMin"),jt=(0,o.K)(function(t){const e=t.split(/(,)/),r=[];for(let i=0;i0&&i+1Math.max(0,t.split(e).length-1),"countOccurrence"),Ht=(0,o.K)((t,e)=>{const r=Wt(t,"~"),i=Wt(e,"~");return 1===r&&1===i},"shouldCombineSets"),Ut=(0,o.K)(t=>{const e=Wt(t,"~");let r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const i=[...t];let o=i.indexOf("~"),n=i.lastIndexOf("~");for(;-1!==o&&-1!==n&&o!==n;)i[o]="<",i[n]=">",o=i.indexOf("~"),n=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Yt=(0,o.K)(()=>void 0!==window.MathMLElement,"isMathMLSupported"),Gt=/\$\$(.*?)\$\$/g,Xt=(0,o.K)(t=>(t.match(Gt)?.length??0)>0,"hasKatex"),Vt=(0,o.K)(async(t,e)=>{const r=document.createElement("div");r.innerHTML=await Qt(t,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i?.insertAdjacentElement("beforeend",r);const o={width:r.clientWidth,height:r.clientHeight};return r.remove(),o},"calculateMathMLDimensions"),Zt=(0,o.K)(async(t,e)=>{if(!Xt(t))return t;if(!(Yt()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Gt,"MathML is unsupported in this environment.");{const{default:i}=await r.e(2130).then(r.bind(r,22130)),o=e.forceLegacyMathML||!Yt()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(At).map(t=>Xt(t)?`
    ${t}
    `:`
    ${t}
    `).join("").replace(Gt,(t,e)=>i.renderToString(e,{throwOnError:!0,displayMode:!0,output:o}).replace(/\n/g," ").replace(//g,""))}},"renderKatexUnsanitized"),Qt=(0,o.K)(async(t,e)=>Ot(await Zt(t,e),e),"renderKatexSanitized"),Jt={getRows:Lt,sanitizeText:Ot,sanitizeTextOrArray:Dt,hasBreaks:It,splitBreaks:Kt,lineBreakRegex:At,removeScript:Et,getUrl:Pt,evaluate:J,getMax:zt,getMin:Nt},te=(0,o.K)(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),ee=(0,o.K)(function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},"calculateSvgSizeAttrs"),re=(0,o.K)(function(t,e,r,i){const o=ee(e,r,i);te(t,o)},"configureSvgSize"),ie=(0,o.K)(function(t,e,r,o){const n=e.node().getBBox(),a=n.width,s=n.height;i.R.info(`SVG bounds: ${a}x${s}`,n);let l=0,h=0;i.R.info(`Graph bounds: ${l}x${h}`,t),l=a+2*r,h=s+2*r,i.R.info(`Calculated bounds: ${l}x${h}`),re(e,h,l,o);const c=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;e.attr("viewBox",c)},"setupGraphViewbox"),oe={};function ne(t){return[...t.cssRules].map(t=>t.cssText).join("\n")}(0,o.K)(ne,"cssStyleSheetToString");var ae=(0,o.K)((t,e,r,o)=>{let n="";return t in oe&&oe[t]?n=oe[t]({...r,svgId:o}):i.R.warn(`No theme found for ${t}`),`& {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n fill: ${r.textColor}\n }\n @keyframes edge-animation-frame {\n from {\n stroke-dashoffset: 0;\n }\n }\n @keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n }\n & .edge-animation-slow {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 50s linear infinite;\n stroke-linecap: round;\n }\n & .edge-animation-fast {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 20s linear infinite;\n stroke-linecap: round;\n }\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${r.errorBkgColor};\n }\n & .error-text {\n fill: ${r.errorTextColor};\n stroke: ${r.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: ${r.strokeWidth??1}px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n & .edge-thickness-invisible {\n stroke-width: 0;\n fill: none;\n }\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${r.lineColor};\n stroke: ${r.lineColor};\n }\n & .marker.cross {\n stroke: ${r.lineColor};\n }\n\n & svg {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${n}\n .node .neo-node {\n stroke: ${r.nodeBorder};\n }\n\n [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {\n stroke: ${r.useGradient?"url("+o+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${o}-drop-shadow)`):"none"};\n }\n [data-look="neo"].swimlane.cluster rect {\n filter: none;\n }\n\n\n [data-look="neo"].node path {\n stroke: ${r.useGradient?"url("+o+"-gradient)":r.nodeBorder};\n stroke-width: ${r.strokeWidth??1}px;\n }\n\n [data-look="neo"].node .outer-path {\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${o}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].node .neo-line path {\n stroke: ${r.nodeBorder};\n filter: none;\n }\n\n [data-look="neo"].node circle{\n stroke: ${r.useGradient?"url("+o+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${o}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].node circle .state-start{\n fill: #000000;\n }\n\n [data-look="neo"].icon-shape .icon {\n fill: ${r.useGradient?"url("+o+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${o}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].icon-shape .icon-neo path {\n stroke: ${r.useGradient?"url("+o+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${o}-drop-shadow)`):"none"};\n }\n\n ${e}\n`},"getStyles"),se=(0,o.K)((t,e)=>{void 0!==e&&(oe[t]=e)},"addStylesForDiagram"),le=ae,he={};(0,o.V)(he,{clear:()=>ge,getAccDescription:()=>xe,getAccTitle:()=>ye,getDiagramTitle:()=>be,setAccDescription:()=>me,setAccTitle:()=>fe,setDiagramTitle:()=>Ce});var ce="",de="",ue="",pe=(0,o.K)(t=>Ot(t,ht()),"sanitizeText"),ge=(0,o.K)(()=>{ce="",ue="",de=""},"clear"),fe=(0,o.K)(t=>{ce=pe(t).replace(/^\s+/g,"")},"setAccTitle"),ye=(0,o.K)(()=>ce,"getAccTitle"),me=(0,o.K)(t=>{ue=pe(t).replace(/\n\s+/g,"\n")},"setAccDescription"),xe=(0,o.K)(()=>ue,"getAccDescription"),Ce=(0,o.K)(t=>{de=pe(t)},"setDiagramTitle"),be=(0,o.K)(()=>de,"getDiagramTitle"),ke=i.R,we=i.H,Te=ht,Se=lt,ve=Q,Be=(0,o.K)(t=>Ot(t,Te()),"sanitizeText"),_e=ie,Ae=(0,o.K)(()=>he,"getCommonDb"),Le={},Fe=(0,o.K)((t,e,r)=>{Le[t]&&ke.warn(`Diagram with id ${t} already registered. Overwriting.`),Le[t]=e,r&&Bt(t,r),se(t,e.styles),e.injectUtils?.(ke,we,Te,Be,_e,Ae(),()=>{})},"registerDiagram"),Me=(0,o.K)(t=>{if(t in Le)return Le[t];throw new Ee(t)},"getDiagram"),Ee=class extends Error{static{(0,o.K)(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}},72379(t,e,r){"use strict";r.d(e,{W6:()=>Ht,GZ:()=>Vt,lT:()=>Ft});var i=r(58962),o=r(16459),n=r(76385),a=r(31293),s=r(86827),l=r(98551),h=r(50048),c=r(70451);function d(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var u={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function p(t){u=t}var g={exec:()=>null};function f(t,e=""){let r="string"==typeof t?t:t.source,i={replace:(t,e)=>{let o="string"==typeof e?e:e.source;return o=o.replace(m.caret,"$1"),r=r.replace(t,o),i},getRegex:()=>new RegExp(r,e)};return i}var y=(()=>{try{return!!new RegExp("(?<=1)(?/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},x=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,C=/(?:[*+-]|\d{1,9}[.)])/,b=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,k=f(b).replace(/bull/g,C).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),w=f(b).replace(/bull/g,C).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),T=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,S=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,v=f(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",S).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),B=f(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,C).getRegex(),_="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|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",A=/|$))/,L=f("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",A).replace("tag",_).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),F=f(T).replace("hr",x).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",_).getRegex(),M={blockquote:f(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",F).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:v,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:x,html:L,lheading:k,list:B,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:F,table:g,text:/^[^\n]+/},E=f("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",x).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",_).getRegex(),$={...M,lheading:w,table:E,paragraph:f(T).replace("hr",x).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",E).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",_).getRegex()},O={...M,html:f("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",A).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+|$)/,fences:g,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:f(T).replace("hr",x).replace("heading"," *#{1,6} *[^\n]").replace("lheading",k).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},D=/^( {2,}|\\)\n(?!\s*$)/,I=/[\p{P}\p{S}]/u,K=/[\s\p{P}\p{S}]/u,q=/[^\s\p{P}\p{S}]/u,R=f(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,K).getRegex(),P=/(?!~)[\p{P}\p{S}]/u,z=f(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",y?"(?`+)[^`]+\k(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),N=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,j=f(N,"u").replace(/punct/g,I).getRegex(),W=f(N,"u").replace(/punct/g,P).getRegex(),H="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",U=f(H,"gu").replace(/notPunctSpace/g,q).replace(/punctSpace/g,K).replace(/punct/g,I).getRegex(),Y=f(H,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,P).getRegex(),G=f("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,q).replace(/punctSpace/g,K).replace(/punct/g,I).getRegex(),X=f(/\\(punct)/,"gu").replace(/punct/g,I).getRegex(),V=f(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("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])?)+(?![-_])/).getRegex(),Z=f(A).replace("(?:--\x3e|$)","--\x3e").getRegex(),Q=f("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",Z).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),J=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,tt=f(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",J).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),et=f(/^!?\[(label)\]\[(ref)\]/).replace("label",J).replace("ref",S).getRegex(),rt=f(/^!?\[(ref)\](?:\[\])?/).replace("ref",S).getRegex(),it=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ot={_backpedal:g,anyPunctuation:X,autolink:V,blockSkip:z,br:D,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:g,emStrongLDelim:j,emStrongRDelimAst:U,emStrongRDelimUnd:G,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:tt,nolink:rt,punctuation:R,reflink:et,reflinkSearch:f("reflink|nolink(?!\\()","g").replace("reflink",et).replace("nolink",rt).getRegex(),tag:Q,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},dt=t=>ct[t];function ut(t,e){if(e){if(m.escapeTest.test(t))return t.replace(m.escapeReplace,dt)}else if(m.escapeTestNoEncode.test(t))return t.replace(m.escapeReplaceNoEncode,dt);return t}function pt(t){try{t=encodeURI(t).replace(m.percentDecode,"%")}catch{return null}return t}function gt(t,e){let r=t.replace(m.findPipe,(t,e,r)=>{let i=!1,o=e;for(;--o>=0&&"\\"===r[o];)i=!i;return i?"|":" |"}).split(m.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:ft(t,"\n")}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let t=e[0],r=function(t,e,r){let i=t.match(r.other.indentCodeCompensation);if(null===i)return e;let o=i[1];return e.split("\n").map(t=>{let e=t.match(r.other.beginningSpace);if(null===e)return t;let[i]=e;return i.length>=o.length?t.slice(o.length):t}).join("\n")}(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let e=ft(t,"#");(this.options.pedantic||!e||this.rules.other.endingSpaceChar.test(e))&&(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:ft(e[0],"\n")}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let t=ft(e[0],"\n").split("\n"),r="",i="",o=[];for(;t.length>0;){let e,n=!1,a=[];for(e=0;e1,o={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let n=this.rules.other.listItemRegex(r),a=!1;for(;t;){let r=!1,i="",s="";if(!(e=n.exec(t))||this.rules.block.hr.test(t))break;i=e[0],t=t.substring(i.length);let l=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,t=>" ".repeat(3*t.length)),h=t.split("\n",1)[0],c=!l.trim(),d=0;if(this.options.pedantic?(d=2,s=l.trimStart()):c?d=e[1].length+1:(d=e[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=l.slice(d),d+=e[1].length),c&&this.rules.other.blankLine.test(h)&&(i+=h+"\n",t=t.substring(h.length+1),r=!0),!r){let e=this.rules.other.nextBulletRegex(d),r=this.rules.other.hrRegex(d),o=this.rules.other.fencesBeginRegex(d),n=this.rules.other.headingBeginRegex(d),a=this.rules.other.htmlBeginRegex(d);for(;t;){let u,p=t.split("\n",1)[0];if(h=p,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),u=h):u=h.replace(this.rules.other.tabCharGlobal," "),o.test(h)||n.test(h)||a.test(h)||e.test(h)||r.test(h))break;if(u.search(this.rules.other.nonSpaceChar)>=d||!h.trim())s+="\n"+u.slice(d);else{if(c||l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||o.test(l)||n.test(l)||r.test(l))break;s+="\n"+h}!c&&!h.trim()&&(c=!0),i+=p+"\n",t=t.substring(p.length+1),l=u.slice(d)}}o.loose||(a?o.loose=!0:this.rules.other.doubleBlankLine.test(i)&&(a=!0));let u,p=null;this.options.gfm&&(p=this.rules.other.listIsTask.exec(s),p&&(u="[ ] "!==p[0],s=s.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:i,task:!!p,checked:u,loose:!1,text:s,tokens:[]}),o.raw+=i}let s=o.items.at(-1);if(!s)return;s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd(),o.raw=o.raw.trimEnd();for(let t=0;t"space"===t.type),r=e.length>0&&e.some(t=>this.rules.other.anyLine.test(t.raw));o.loose=r}if(o.loose)for(let t=0;t({text:t,tokens:this.lexer.inline(t),header:!1,align:n.align[e]})));return n}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let e=ft(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{let t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let r=0;for(let i=0;i0?-2:-1}(e[2],"()");if(-2===t)return;if(t>-1){let r=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){let t=this.rules.other.pedanticHrefTitle.exec(r);t&&(r=t[1],i=t[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r.slice(1):r.slice(1,-1)),yt(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let t=e[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!t){let t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return yt(r,t,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||i[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!i[1]&&!i[2]||!r||this.rules.inline.punctuation.exec(r))){let r,o,n=[...i[0]].length-1,a=n,s=0,l="*"===i[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+n);null!=(i=l.exec(e));){if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!r)continue;if(o=[...r].length,i[3]||i[4]){a+=o;continue}if((i[5]||i[6])&&n%3&&!((n+o)%3)){s+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a+s);let e=[...i[0]][0].length,l=t.slice(0,n+i.index+e+o);if(Math.min(n,o)%2){let t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}let h=l.slice(2,-2);return{type:"strong",raw:l,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&i&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let t,r;return"@"===e[2]?(t=e[1],r="mailto:"+t):(t=e[1],r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,r;if("@"===e[2])t=e[0],r="mailto:"+t;else{let i;do{i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(i!==e[0]);t=e[0],r="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},xt=class t{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||u,this.options.tokenizer=this.options.tokenizer||new mt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={other:m,block:lt.normal,inline:ht.normal};this.options.pedantic?(e.block=lt.pedantic,e.inline=ht.pedantic):this.options.gfm&&(e.block=lt.gfm,this.options.breaks?e.inline=ht.breaks:e.inline=ht.gfm),this.tokenizer.rules=e}static get rules(){return{block:lt,inline:ht}}static lex(e,r){return new t(r).lex(e)}static lexInline(e,r){return new t(r).inlineTokens(e)}lex(t){t=t.replace(m.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let e=0;e!!(i=r.call({lexer:this},t,e))&&(t=t.substring(i.raw.length),e.push(i),!0)))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let r=e.at(-1);1===i.raw.length&&void 0!==r?r.raw+="\n":e.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.text,this.inlineQueue.at(-1).src=r.text):e.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},e.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),e.push(i);continue}let o=t;if(this.options.extensions?.startBlock){let e,r=1/0,i=t.slice(1);this.options.extensions.startBlock.forEach(t=>{e=t.call({lexer:this},i),"number"==typeof e&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(o=t.substring(0,r+1))}if(this.state.top&&(i=this.tokenizer.paragraph(o))){let n=e.at(-1);r&&"paragraph"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+i.raw,n.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):e.push(i),r=o.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let r=e.at(-1);"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):e.push(i);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let r,i=t,o=null;if(this.tokens.links){let t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(i));)t.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(i));)i=i.slice(0,o.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(i));)r=o[2]?o[2].length:0,i=i.slice(0,o.index+r)+"["+"a".repeat(o[0].length-r-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let n=!1,a="";for(;t;){let r;if(n||(a=""),n=!1,this.options.extensions?.inline?.some(i=>!!(r=i.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0)))continue;if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length);let i=e.at(-1);"text"===r.type&&"text"===i?.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(r=this.tokenizer.emStrong(t,i,a)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),e.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),e.push(r);continue}let o=t;if(this.options.extensions?.startInline){let e,r=1/0,i=t.slice(1);this.options.extensions.startInline.forEach(t=>{e=t.call({lexer:this},i),"number"==typeof e&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(o=t.substring(0,r+1))}if(r=this.tokenizer.inlineText(o)){t=t.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(a=r.raw.slice(-1)),n=!0;let i=e.at(-1);"text"===i?.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return e}},Ct=class{options;parser;constructor(t){this.options=t||u}space(t){return""}code({text:t,lang:e,escaped:r}){let i=(e||"").match(m.notSpaceStart)?.[0],o=t.replace(m.endingNewline,"")+"\n";return i?'
    '+(r?o:ut(o,!0))+"
    \n":"
    "+(r?o:ut(o,!0))+"
    \n"}blockquote({tokens:t}){return`
    \n${this.parser.parse(t)}
    \n`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`${this.parser.parseInline(t)}\n`}hr(t){return"
    \n"}list(t){let e=t.ordered,r=t.start,i="";for(let n=0;n\n"+i+"\n"}listitem(t){let e="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?"paragraph"===t.tokens[0]?.type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+ut(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`
  • ${e}
  • \n`}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`

    ${this.parser.parseInline(t)}

    \n`}table(t){let e="",r="";for(let o=0;o${i}`),"\n\n"+e+"\n"+i+"
    \n"}tablerow({text:t}){return`\n${t}\n`}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`\n`}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${ut(t,!0)}`}br(t){return"
    "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:r}){let i=this.parser.parseInline(r),o=pt(t);if(null===o)return i;let n='
    ",n}image({href:t,title:e,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let o=pt(t);if(null===o)return ut(r);let n=`${r}{let o=t[i].flat(1/0);r=r.concat(this.walkTokens(o,e))}):t.tokens&&(r=r.concat(this.walkTokens(t.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(t=>{let r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){let r=e.renderers[t.name];e.renderers[t.name]=r?function(...e){let i=t.renderer.apply(this,e);return!1===i&&(i=r.apply(this,e)),i}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");let r=e[t.level];r?r.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)}),r.extensions=e),t.renderer){let e=this.defaults.renderer||new Ct(this.defaults);for(let r in t.renderer){if(!(r in e))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let i=r,o=t.renderer[i],n=e[i];e[i]=(...t)=>{let r=o.apply(e,t);return!1===r&&(r=n.apply(e,t)),r||""}}r.renderer=e}if(t.tokenizer){let e=this.defaults.tokenizer||new mt(this.defaults);for(let r in t.tokenizer){if(!(r in e))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let i=r,o=t.tokenizer[i],n=e[i];e[i]=(...t)=>{let r=o.apply(e,t);return!1===r&&(r=n.apply(e,t)),r}}r.tokenizer=e}if(t.hooks){let e=this.defaults.hooks||new wt;for(let r in t.hooks){if(!(r in e))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let i=r,o=t.hooks[i],n=e[i];wt.passThroughHooks.has(r)?e[i]=t=>{if(this.defaults.async&&wt.passThroughHooksRespectAsync.has(r))return(async()=>{let r=await o.call(e,t);return n.call(e,r)})();let i=o.call(e,t);return n.call(e,i)}:e[i]=(...t)=>{if(this.defaults.async)return(async()=>{let r=await o.apply(e,t);return!1===r&&(r=await n.apply(e,t)),r})();let r=o.apply(e,t);return!1===r&&(r=n.apply(e,t)),r}}r.hooks=e}if(t.walkTokens){let e=this.defaults.walkTokens,i=t.walkTokens;r.walkTokens=function(t){let r=[];return r.push(i.call(this,t)),e&&(r=r.concat(e.call(this,t))),r}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return xt.lex(t,e??this.defaults)}parser(t,e){return kt.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let i={...r},o={...this.defaults,...i},n=this.onError(!!o.silent,!!o.async);if(!0===this.defaults.async&&!1===i.async)return n(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||null===e)return n(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return n(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let r=o.hooks?await o.hooks.preprocess(e):e,i=await(o.hooks?await o.hooks.provideLexer():t?xt.lex:xt.lexInline)(r,o),n=o.hooks?await o.hooks.processAllTokens(i):i;o.walkTokens&&await Promise.all(this.walkTokens(n,o.walkTokens));let a=await(o.hooks?await o.hooks.provideParser():t?kt.parse:kt.parseInline)(n,o);return o.hooks?await o.hooks.postprocess(a):a})().catch(n);try{o.hooks&&(e=o.hooks.preprocess(e));let r=(o.hooks?o.hooks.provideLexer():t?xt.lex:xt.lexInline)(e,o);o.hooks&&(r=o.hooks.processAllTokens(r)),o.walkTokens&&this.walkTokens(r,o.walkTokens);let i=(o.hooks?o.hooks.provideParser():t?kt.parse:kt.parseInline)(r,o);return o.hooks&&(i=o.hooks.postprocess(i)),i}catch(a){return n(a)}}}onError(t,e){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t){let t="

    An error occurred:

    "+ut(r.message+"",!0)+"
    ";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}}};function St(t,e){return Tt.parse(t,e)}St.options=St.setOptions=function(t){return Tt.setOptions(t),St.defaults=Tt.defaults,p(St.defaults),St},St.getDefaults=d,St.defaults=u,St.use=function(...t){return Tt.use(...t),St.defaults=Tt.defaults,p(St.defaults),St},St.walkTokens=function(t,e){return Tt.walkTokens(t,e)},St.parseInline=Tt.parseInline,St.Parser=kt,St.parser=kt.parse,St.Renderer=Ct,St.TextRenderer=bt,St.Lexer=xt,St.lexer=xt.lex,St.Tokenizer=mt,St.Hooks=wt,St.parse=St;St.options,St.setOptions,St.use,St.walkTokens,St.parseInline,kt.parse,xt.lex;var vt=r(60513),Bt="undefined"!=typeof performance&&"function"==typeof performance.now,_t=(0,s.K)(()=>Bt?performance.now():0,"now"),At="\ud83e\udddc ",Lt={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"};(class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}static{(0,s.K)(this,"Profiler")}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(t){this.enabled&&(this.roots=[],this.stack=[],this.buckets={},this.begin(t))}tickSync(t,e){if(!this.enabled)return e();const r=_t();try{return e()}finally{this.buckets[t]=(this.buckets[t]??0)+(_t()-r)}}async tick(t,e){if(!this.enabled)return e();const r=_t();try{return await e()}finally{this.buckets[t]=(this.buckets[t]??0)+(_t()-r)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();const t=this.roots.at(-1),e=this.runLabel??t?.name;return t&&(this.records.push({label:e??t.name,tree:t,buckets:{...this.buckets}}),this.records.length>this.maxRecords&&this.records.splice(0,this.records.length-this.maxRecords),this.autoPrint&&this.printSummary(t,e)),this.runLabel=void 0,t}begin(t){if(!this.enabled)return;const e={name:t,start:_t(),duration:-1,children:[]},r=this.stack.at(-1);if(r?r.children.push(e):this.roots.push(e),this.stack.push(e),Bt&&"function"==typeof performance.mark)try{performance.mark(`${At}${t} \u25b6`)}catch{}}end(){if(!this.enabled)return;const t=this.stack.pop();if(!t)return;const e=_t();if(t.duration=e-t.start,Bt&&"function"==typeof performance.measure)try{performance.measure(`${At}${t.name}`,{start:t.start,end:e,detail:{devtools:{dataType:"track-entry",track:"Mermaid render",trackGroup:"Mermaid",color:Lt[t.name]??"primary",tooltipText:`${t.name} \u2014 ${t.duration.toFixed(1)} ms`}}})}catch{}}async span(t,e){if(!this.enabled)return e();this.begin(t);try{return await e()}finally{this.end()}}report(){return this.records.at(-1)?.tree??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(t=this.report(),e){if(!t)return;const r=t.duration,i=e&&e!==t.name?`${t.name} [${e}]`:t.name,o=["ms % phase"],n=(0,s.K)((t,e)=>{const i=" ".repeat(e),a=t.duration.toFixed(1).padStart(8),s=r>0?`${(t.duration/r*100).toFixed(0).padStart(3)}%`:" -";o.push(`${a} ${s} ${i}${t.name}`);for(const r of t.children)n(r,e+1);if(t.children.length>0){const e=t.children.reduce((t,e)=>t+e.duration,0),r=t.duration-e;if(r>.5){const t=r.toFixed(1).padStart(8);o.push(`${t} ${i} (self)`)}}},"walk");n(t,0);const a=Object.keys(this.buckets);if(a.length>0){o.push("\u2014\u2014 buckets (summed) \u2014\u2014");for(const t of a)o.push(`${this.buckets[t].toFixed(1).padStart(8)} ${t}`)}console.log(`${At}mermaid render profile \xb7 ${i}\n${o.join("\n")}`)}});globalThis.injected??={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"};var Ft=l.extend({raf(t){"function"==typeof queueMicrotask?queueMicrotask(t):setTimeout(t,0)}}).extend(h);function Mt(t,{markdownAutoWrap:e}){const r=t.replace(//g,"\n").replace(/\n{2,}/g,"\n");return(0,vt.T)(r)}function Et(t){return t.split(/\\n|\n|/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(t=>({content:t,type:"normal"}))??[])}function $t(t,e={}){const r=Mt(t,e),i=St.lexer(r),o=[[]];let n=0;function a(t,e="normal"){if("text"===t.type){t.text.split("\n").forEach((t,r)=>{0!==r&&(n++,o.push([])),t.split(" ").forEach(t=>{(t=t.replace(/'/g,"'"))&&o[n].push({content:t,type:e})})})}else"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{a(e,t.type)}):"html"===t.type&&o[n].push({content:t.text,type:"normal"})}return(0,s.K)(a,"processNode"),i.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{a(t)}):"html"===t.type?o[n].push({content:t.text,type:"normal"}):o[n].push({content:t.raw,type:"normal"})}),o}function Ot(t){return t?`

    ${t.replace(/\\n|\n/g,"
    ")}

    `:""}function Dt(t,{markdownAutoWrap:e}={}){const r=St.lexer(t);function i(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"
    ").replace(/ /g," "):t.text.replace(/\n */g,"
    "):"strong"===t.type?`${t.tokens?.map(i).join("")}`:"em"===t.type?`${t.tokens?.map(i).join("")}`:"paragraph"===t.type?`

    ${t.tokens?.map(i).join("")}

    `:"space"===t.type?"":"html"===t.type?`${t.text}`:"escape"===t.type?t.text:(a.R.warn(`Unsupported markdown: ${t.type}`),t.raw)}return(0,s.K)(i,"output"),r.map(i).join("")}function It(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function Kt(t,e){return qt(t,[],It(e.content),e.type)}function qt(t,e,r,i){if(0===r.length)return[{content:e.join(""),type:i},{content:"",type:i}];const[o,...n]=r,a=[...e,o];return t([{content:a.join(""),type:i}])?qt(t,a,n,i):(0===e.length&&o&&(e.push(o),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}])}function Rt(t,e){if(t.some(({content:t})=>t.includes("\n")))throw new Error("splitLineToFitWidth does not support newlines in the line");return Pt(t,e)}function Pt(t,e,r=[],i=[]){if(0===t.length)return i.length>0&&r.push(i),r.length>0?r:[];let o="";" "===t[0].content&&(o=" ",t.shift());const n=t.shift()??{content:" ",type:"normal"},a=[...i];if(""!==o&&a.push({content:o,type:"normal"}),a.push(n),e(a))return Pt(t,e,r,a);if(i.length>0)r.push(i),t.unshift(n);else if(n.content){const[i,o]=Kt(e,n);r.push([i]),o.content&&t.unshift(o)}return Pt(t,e,r)}function zt(t,e){e&&t.attr("style",e)}(0,s.K)(Mt,"preprocessMarkdown"),(0,s.K)(Et,"nonMarkdownToLines"),(0,s.K)($t,"markdownToLines"),(0,s.K)(Ot,"nonMarkdownToHTML"),(0,s.K)(Dt,"markdownToHTML"),(0,s.K)(It,"splitTextToChars"),(0,s.K)(Kt,"splitWordToFitWidth"),(0,s.K)(qt,"splitWordToFitWidthRecursion"),(0,s.K)(Rt,"splitLineToFitWidth"),(0,s.K)(Pt,"splitLineToFitWidthRecursion"),(0,s.K)(zt,"applyStyle");async function Nt(t,e,r,i,o=!1,a=(0,n.zj)()){const s=t.append("foreignObject");s.attr("width",`${Math.min(10*r,16384)}px`),s.attr("height",`${Math.min(10*r,16384)}px`);const l=s.append("xhtml:div"),h=(0,n.Wi)(e.label)?await(0,n.dj)(e.label.replace(n.Y2.lineBreakRegex,"\n"),a):(0,n.jZ)(e.label,a),c=e.isNode?"nodeLabel":"edgeLabel",d=l.append("span");d.html(h),zt(d,e.labelStyle),d.attr("class",`${c} ${i}`),zt(l,e.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(l.style("max-width",r+"px"),l.style("text-align","center")),l.attr("xmlns","http://www.w3.org/1999/xhtml"),o&&l.attr("class","labelBkg");return(await Ft.measure(()=>l.node().getBoundingClientRect())).width===r&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",r+"px")),s.node()}function jt(t,e,r,i=!1){const o=t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em");return i&&o.attr("text-anchor","middle"),o}function Wt(t,e,r){const i=t.append("text"),o=jt(i,1,e);Gt(o,r);const n=o.node().getComputedTextLength();return i.remove(),n}function Ht(t,e,r){const i=t.append("text"),o=jt(i,1,e);Gt(o,[{content:r,type:"normal"}]);const n=o.node()?.getBoundingClientRect();return n&&i.remove(),n}function Ut(t,e,r,i=!1,o=!1){const n=e.append("g"),a=n.insert("rect").attr("class","background").attr("style","stroke: none"),l=n.append("text").attr("y","-10.1");o&&l.attr("text-anchor","middle");let h=0;for(const c of r){const e=(0,s.K)(e=>Wt(n,1.1,e)<=t,"checkWidth"),r=e(c)?[c]:Rt(c,e);for(const t of r){Gt(jt(l,h,1.1,o),t),h++}}if(i){const t=l.node().getBBox(),e=2;return a.attr("x",t.x-e).attr("y",t.y-e).attr("width",t.width+2*e).attr("height",t.height+2*e),n.node()}return l.node()}function Yt(t){return t.replace(/&(amp|lt|gt);/g,(t,e)=>{switch(e){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return t}})}function Gt(t,e){t.text(""),e.forEach((e,r)=>{const i=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===r?i.text(Yt(e.content)):i.text(" "+Yt(e.content))})}async function Xt(t,e={}){const r=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,o,a)=>(r.push((async()=>{const r=`${o}:${a}`;return await(0,i.dn)(r)?await(0,i.WY)(r,void 0,{class:"label-icon"}):``})()),t));const o=await Promise.all(r);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>o.shift()??"")}(0,s.K)(Nt,"addHtmlSpan"),(0,s.K)(jt,"createTspan"),(0,s.K)(Wt,"computeWidthOfText"),(0,s.K)(Ht,"computeDimensionOfText"),(0,s.K)(Ut,"createFormattedText"),(0,s.K)(Yt,"decodeHTMLEntities"),(0,s.K)(Gt,"updateTextContentAndStyles"),(0,s.K)(Xt,"replaceIconSubstring");var Vt=(0,s.K)(async(t,e="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:l=!0,markdown:h=!0,isNode:d=!0,width:u=200,addSvgBackground:p=!1}={},g)=>{if(a.R.debug("XYZ createText",e,r,i,s,l,d,"addSvgBackground: ",p),l){const i=h?Dt(e,g):Ot(e),a=await Xt((0,o.Sm)(i),g),l=e.replace(/\\\\/g,"\\"),c={isNode:d,label:(0,n.Wi)(e)?l:a,labelStyle:r.replace("fill:","color:")};return await Nt(t,c,u,s,p,g)}{const n=(0,o.Sm)(e.replace(//g,"
    ")),a=Ut(u,t,h?$t(n.replace("
    ","
    "),g):Et(n),!!e&&p,!d);if(d){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,c.Ltv)(a).attr("style",t)}else{const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");(0,c.Ltv)(a).select("rect").attr("style",t.replace(/background:/g,"fill:"));const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,c.Ltv)(a).select("text").attr("style",e)}return i?(0,c.Ltv)(a).selectAll("tspan.text-outer-tspan").classed("title-row",!0):(0,c.Ltv)(a).selectAll("tspan.text-outer-tspan").classed("row",!0),a}},"createText")},78771(t,e,r){"use strict";r.d(e,{I:()=>b,U:()=>C});var i=r(717),o=r(79515),n=r(44505),a=r(72379),s=r(76385),l=r(31293),h=r(86827),c=r(70451),d=r(52274),u=(0,h.K)(async(t,e)=>{const r=(0,s.D7)(),{themeVariables:i,handDrawnSeed:h}=r,{clusterBkg:u,clusterBorder:p}=i,g=p,{labelStyles:f,nodeStyles:y,borderStyles:m,backgroundStyles:x}=(0,n.GX)(e),C=t.insert("g").attr("class","cluster swimlane "+(e.cssClasses||"")).attr("id",e.id).attr("data-id",e.id).attr("data-et","cluster").attr("data-look",e.look),b=(0,s._3)(r.flowchart.htmlLabels),k="LR"===e.direction,w=C.insert("g").attr("class","cluster-label swimlane-label"),T=await(0,a.GZ)(w,e.label,{style:e.labelStyle,useHtmlLabels:b,isNode:!0,width:e.width});let S=T.getBBox();if(b){const t=T.children[0],e=(0,c.Ltv)(T);S=t.getBoundingClientRect(),e.attr("width",S.width),e.attr("height",S.height)}const v=e.padding??0,B=e.width<=S.width+v?S.width+v:e.width;e.width<=S.width+v?e.diff=(B-e.width)/2-v:e.diff=-v;const _=e.height,A=e.y-_/2,L=e.y+_/2,F=e.x-B/2,M=void 0!==e.swimlaneContentTop?e.swimlaneContentTop:A+_/3,E=k?4:0,$=S.height+2*E;let O,D;if(k){const t=Math.max($,S.height+2*E),r=F+t,i=Math.max(0,B-t);if("handDrawn"===e.look){const o=d.A.svg(C),a=(0,n.Fr)(e,{roughness:.7,fill:u,stroke:g,fillWeight:3,seed:h}),s=(0,n.Fr)(e,{roughness:.7,fill:"none",stroke:g,seed:h}),l=o.rectangle(F,A,t,_,a);O=C.insert(()=>l,":first-child");const c=o.rectangle(r,A,i,_,s);D=C.insert(()=>c,":first-child"),O.select("path:nth-child(2)").attr("style",m.join(";")),O.select("path").attr("style",x.join(";").replace("fill","stroke"))}else O=C.insert("rect",":first-child"),D=C.insert("rect",":first-child"),O.attr("class","swimlane-title").attr("style",y).attr("x",F).attr("y",A).attr("width",t).attr("height",_).attr("fill",u).attr("stroke",g),D.attr("class","swimlane-body").attr("style",y).attr("x",r).attr("y",A).attr("width",i).attr("height",_).attr("fill","none").attr("stroke",g);const o=F+t/2,a=e.y;w.attr("transform",`translate(${o}, ${a}) rotate(-90) translate(${-S.width/2}, ${-S.height/2})`)}else{const t=Math.max(0,M-A),r=Math.min($,t),i=A+r,o=Math.max(0,L-i),a=e.x-B/2;if("handDrawn"===e.look){const t=d.A.svg(C),s=(0,n.Fr)(e,{roughness:.7,fill:u,stroke:g,fillWeight:3,seed:h}),l=(0,n.Fr)(e,{roughness:.7,fill:"none",stroke:g,seed:h}),c=t.rectangle(a,A,B,r,s);O=C.insert(()=>c,":first-child");const p=t.rectangle(a,i,B,o,l);D=C.insert(()=>p,":first-child"),O.select("path:nth-child(2)").attr("style",m.join(";")),O.select("path").attr("style",x.join(";").replace("fill","stroke"))}else O=C.insert("rect",":first-child"),D=C.insert("rect",":first-child"),O.attr("class","swimlane-title").attr("style",y).attr("x",a).attr("y",A).attr("width",B).attr("height",r).attr("fill",u).attr("stroke",g),D.attr("class","swimlane-body").attr("style",y).attr("x",a).attr("y",i).attr("width",B).attr("height",o).attr("fill","none").attr("stroke",g);const s=e.x-S.width/2,l=A+(r-S.height)/2;w.attr("transform",`translate(${s}, ${l})`)}if(l.R.trace("Swimlane data ",e,JSON.stringify(e)),f){const t=w.select("span");t&&t.attr("style",f)}return e.offsetX=0,e.width=B,e.height=_,e.offsetY=S.height-v/2,e.intersect=function(t){return(0,o.nM)(e,t)},{cluster:C,labelBBox:S}},"swimlane"),p=(0,h.K)(async(t,e)=>{l.R.info("Creating subgraph rect for ",e.id,e);const r=(0,s.D7)(),{themeVariables:h,handDrawnSeed:u}=r,{clusterBkg:p,clusterBorder:g}=h,{labelStyles:f,nodeStyles:y,borderStyles:m,backgroundStyles:x}=(0,n.GX)(e),C=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),b=(0,s.E)(r),k=C.insert("g").attr("class","cluster-label ");let w;w="markdown"===e.labelType?await(0,a.GZ)(k,e.label,{style:e.labelStyle,useHtmlLabels:b,isNode:!0,width:e.width}):await(0,o.DA)(k,e.label,e.labelStyle||"",!1,!0);let T=w.getBBox();if((0,s.E)(r)){const t=w.children[0],e=(0,c.Ltv)(w);T=t.getBoundingClientRect(),e.attr("width",T.width),e.attr("height",T.height)}const S=e.width<=T.width+e.padding?T.width+e.padding:e.width;e.width<=T.width+e.padding?e.diff=(S-e.width)/2-e.padding:e.diff=-e.padding;const v=e.height,B=e.x-S/2,_=e.y-v/2;let A;if(l.R.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=d.A.svg(C),r=(0,n.Fr)(e,{roughness:.7,fill:p,stroke:g,fillWeight:3,seed:u}),i=t.path((0,o.FA)(B,_,S,v,0),r);A=C.insert(()=>(l.R.debug("Rough node insert CXC",i),i),":first-child"),A.select("path:nth-child(2)").attr("style",m.join(";")),A.select("path").attr("style",x.join(";").replace("fill","stroke"))}else A=C.insert("rect",":first-child"),A.attr("style",y).attr("rx",e.rx).attr("ry",e.ry).attr("x",B).attr("y",_).attr("width",S).attr("height",v);const{subGraphTitleTopMargin:L}=(0,i.Oi)(r);if(k.attr("transform",`translate(${e.x-T.width/2}, ${e.y-e.height/2+L})`),f){const t=k.select("span");t&&t.attr("style",f)}const F=A.node().getBBox();return e.offsetX=0,e.width=F.width,e.height=F.height,e.offsetY=T.height-e.padding/2,e.intersect=function(t){return(0,o.nM)(e,t)},{cluster:C,labelBBox:T}},"rect"),g=(0,h.K)((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.domId),i=r.insert("rect",":first-child"),n=0*e.padding,a=n/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+n).attr("height",e.height+n).attr("fill","none");const s=i.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(t){return(0,o.nM)(e,t)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),f=(0,h.K)(async(t,e)=>{const r=(0,s.D7)(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:a,compositeBackground:l,compositeTitleBackground:h,nodeBorder:u}=i,p=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look),g=p.insert("g",":first-child"),f=p.insert("g").attr("class","cluster-label");let y=p.append("rect");const m=await(0,o.DA)(f,e.label,e.labelStyle,void 0,!0);let x=m.getBBox();if((0,s.E)(r)){const t=m.children[0],e=(0,c.Ltv)(m);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}const C=0*e.padding,b=C/2,k=(e.width<=x.width+e.padding?x.width+e.padding:e.width)+C;e.width<=x.width+e.padding?e.diff=(k-e.width)/2-e.padding:e.diff=-e.padding;const w=e.height+C,T=e.height+C-x.height-6,S=e.x-k/2,v=e.y-w/2;e.width=k;const B=e.y-e.height/2-b+x.height+2;let _;if("handDrawn"===e.look){const t=e.cssClasses.includes("statediagram-cluster-alt"),r=d.A.svg(p),i=e.rx||e.ry?r.path((0,o.FA)(S,v,k,w,10),{roughness:.7,fill:h,fillStyle:"solid",stroke:u,seed:n}):r.rectangle(S,v,k,w,{seed:n});_=p.insert(()=>i,":first-child");const s=r.rectangle(S,B,k,T,{fill:t?a:l,fillStyle:t?"hachure":"solid",stroke:u,seed:n});_=p.insert(()=>i,":first-child"),y=p.insert(()=>s)}else{_=g.insert("rect",":first-child");const t="outer";_.attr("class",t).attr("x",S).attr("y",v).attr("width",k).attr("height",w).attr("data-look",e.look),y.attr("class","inner").attr("x",S).attr("y",B).attr("width",k).attr("height",T)}f.attr("transform",`translate(${e.x-x.width/2}, ${v+1-((0,s.E)(r)?0:3)})`);const A=_.node().getBBox();return e.height=A.height,e.offsetX=0,e.offsetY=x.height-e.padding/2,e.labelBBox=x,e.intersect=function(t){return(0,o.nM)(e,t)},{cluster:p,labelBBox:x}},"roundedWithTitle"),y=(0,h.K)(async(t,e)=>{l.R.info("Creating subgraph rect for ",e.id,e);const r=(0,s.D7)(),{themeVariables:h,handDrawnSeed:u}=r,{clusterBkg:p,clusterBorder:g}=h,{labelStyles:f,nodeStyles:y,borderStyles:m,backgroundStyles:x}=(0,n.GX)(e),C=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),b=(0,s.E)(r),k=C.insert("g").attr("class","cluster-label "),w=await(0,a.GZ)(k,e.label,{style:e.labelStyle,useHtmlLabels:b,isNode:!0,width:e.width});let T=w.getBBox();if((0,s.E)(r)){const t=w.children[0],e=(0,c.Ltv)(w);T=t.getBoundingClientRect(),e.attr("width",T.width),e.attr("height",T.height)}const S=e.width<=T.width+e.padding?T.width+e.padding:e.width;e.width<=T.width+e.padding?e.diff=(S-e.width)/2-e.padding:e.diff=-e.padding;const v=e.height,B=e.x-S/2,_=e.y-v/2;let A;if(l.R.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=d.A.svg(C),r=(0,n.Fr)(e,{roughness:.7,fill:p,stroke:g,fillWeight:4,seed:u}),i=t.path((0,o.FA)(B,_,S,v,e.rx),r);A=C.insert(()=>(l.R.debug("Rough node insert CXC",i),i),":first-child"),A.select("path:nth-child(2)").attr("style",m.join(";")),A.select("path").attr("style",x.join(";").replace("fill","stroke"))}else A=C.insert("rect",":first-child"),A.attr("style",y).attr("rx",e.rx).attr("ry",e.ry).attr("x",B).attr("y",_).attr("width",S).attr("height",v);const{subGraphTitleTopMargin:L}=(0,i.Oi)(r);if(k.attr("transform",`translate(${e.x-T.width/2}, ${e.y-e.height/2+L})`),f){const t=k.select("span");t&&t.attr("style",f)}const F=A.node().getBBox();return e.offsetX=0,e.width=F.width,e.height=F.height,e.offsetY=T.height-e.padding/2,e.intersect=function(t){return(0,o.nM)(e,t)},{cluster:C,labelBBox:T}},"kanbanSection"),m={rect:p,squareRect:p,roundedWithTitle:f,noteGroup:g,divider:(0,h.K)((t,e)=>{const r=(0,s.D7)(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:a}=i,l=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look),h=l.insert("g",":first-child"),c=0*e.padding,u=e.width+c;e.diff=-e.padding;const p=e.height+c,g=e.x-u/2,f=e.y-p/2;let y;if(e.width=u,"handDrawn"===e.look){const t=d.A.svg(l).rectangle(g,f,u,p,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:n});y=l.insert(()=>t,":first-child")}else{y=h.insert("rect",":first-child");let t="outer";t=(e.look,"divider"),y.attr("class",t).attr("x",g).attr("y",f).attr("width",u).attr("height",p).attr("data-look",e.look)}const m=y.node().getBBox();return e.height=m.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return(0,o.nM)(e,t)},{cluster:l,labelBBox:{}}},"divider"),kanbanSection:y,swimlane:u},x=new Map,C=(0,h.K)(async(t,e)=>{const r=e.shape||"rect",i=await m[r](t,e);return x.set(e.id,i),i},"insertCluster"),b=(0,h.K)(()=>{x=new Map},"clear")},841(t,e,r){"use strict";r.d(e,{H:()=>$t,r:()=>Ft});var i=r(86827);function o(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}(0,i.K)(o,"getDefaultExportFromCjs");var n,a,s,l,h,c,d,u,p,g,f,y,m,x,C,b,k,w,T,S,v,B,_,A,L,F,M,E,$,O,D,I,K,q,R,P,z,N,j,W,H,U,Y,G,X={},V={},Z={};function Q(){if(n)return Z;function t(t){return null==t}function e(t){return"object"==typeof t&&null!==t}function r(e){return Array.isArray(e)?e:t(e)?[]:[e]}function o(t,e){if(e){const r=Object.keys(e);for(let i=0,o=r.length;is&&(n=" ... ",e=i-s+n.length),r-i>s&&(a=" ...",r=i+s-a.length),{str:n+t.slice(e,r).replace(/\t/g,"\u2192")+a,pos:i-e+n.length}}function r(e,r){return t.repeat(" ",r-e.length)+e}function o(i,o){if(o=Object.create(o||null),!i.buffer)return null;o.maxLength||(o.maxLength=79),"number"!=typeof o.indent&&(o.indent=1),"number"!=typeof o.linesBefore&&(o.linesBefore=3),"number"!=typeof o.linesAfter&&(o.linesAfter=2);const n=/\r?\n|\r|\0/g,a=[0],s=[];let l,h=-1;for(;l=n.exec(i.buffer);)s.push(l.index),a.push(l.index+l[0].length),i.position<=l.index&&h<0&&(h=a.length-2);h<0&&(h=a.length-1);let c="";const d=Math.min(i.line+o.linesAfter,s.length).toString().length,u=o.maxLength-(o.indent+d+3);for(let g=1;g<=o.linesBefore&&!(h-g<0);g++){const n=e(i.buffer,a[h-g],s[h-g],i.position-(a[h]-a[h-g]),u);c=t.repeat(" ",o.indent)+r((i.line-g+1).toString(),d)+" | "+n.str+"\n"+c}const p=e(i.buffer,a[h],s[h],i.position,u);c+=t.repeat(" ",o.indent)+r((i.line+1).toString(),d)+" | "+p.str+"\n",c+=t.repeat("-",o.indent+d+3+p.pos)+"^\n";for(let g=1;g<=o.linesAfter&&!(h+g>=s.length);g++){const n=e(i.buffer,a[h+g],s[h+g],i.position-(a[h]-a[h+g]),u);c+=t.repeat(" ",o.indent)+r((i.line+g+1).toString(),d)+" | "+n.str+"\n"}return c.replace(/\n$/,"")}return(0,i.K)(e,"getLine"),(0,i.K)(r,"padStart"),(0,i.K)(o,"makeSnippet"),l=o}function et(){if(d)return c;d=1;const t=J(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function o(t){const e={};return null!==t&&Object.keys(t).forEach(function(r){t[r].forEach(function(t){e[String(t)]=r})}),e}function n(i,n){if(n=n||{},Object.keys(n).forEach(function(r){if(-1===e.indexOf(r))throw new t('Unknown option "'+r+'" is met in definition of "'+i+'" YAML type.')}),this.options=n,this.tag=i,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(t){return t},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=o(n.styleAliases||null),-1===r.indexOf(this.kind))throw new t('Unknown kind "'+this.kind+'" is specified for "'+i+'" YAML type.')}return(0,i.K)(o,"compileStyleAliases"),(0,i.K)(n,"Type2"),c=n}function rt(){if(p)return u;p=1;const t=J(),e=et();function r(t,e){const r=[];return t[e].forEach(function(t){let e=r.length;r.forEach(function(r,i){r.tag===t.tag&&r.kind===t.kind&&r.multi===t.multi&&(e=i)}),r[e]=t}),r}function o(){const t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function e(e){e.multi?(t.multi[e.kind].push(e),t.multi.fallback.push(e)):t[e.kind][e.tag]=t.fallback[e.tag]=e}(0,i.K)(e,"collectType");for(let r=0,i=arguments.length;r=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function o(t){return t>=48&&t<=55}function n(t){return t>=48&&t<=57}function a(t){if(null===t)return!1;const e=t.length;let i=0,a=!1;if(!e)return!1;let l=t[i];if("-"!==l&&"+"!==l||(l=t[++i]),"0"===l){if(i+1===e)return!0;if(l=t[++i],"b"===l){for(i++;i=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:(0,i.K)(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:(0,i.K)(function(t){return t.toString(10)},"decimal"),hexadecimal:(0,i.K)(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})}function ct(){if(L)return A;L=1;const t=Q(),e=et(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),o=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function n(t){return null!==t&&(!!r.test(t)&&(!!isFinite(parseFloat(t,10))||o.test(t)))}function a(t){let e=t.toLowerCase();const r="-"===e[0]?-1:1;return"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:r*parseFloat(e,10)}(0,i.K)(n,"resolveYamlFloat"),(0,i.K)(a,"constructYamlFloat");const s=/^[-+]?[0-9]+e/;function l(e,r){if(isNaN(e))switch(r){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(r){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(r){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(t.isNegativeZero(e))return"-0.0";const i=e.toString(10);return s.test(i)?i.replace("e",".e"):i}function h(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||t.isNegativeZero(e))}return(0,i.K)(l,"representYamlFloat"),(0,i.K)(h,"isFloat"),A=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:n,construct:a,predicate:h,represent:l,defaultStyle:"lowercase"})}function dt(){return M?F:(M=1,F=at().extend({implicit:[st(),lt(),ht(),ct()]}))}function ut(){return $?E:($=1,E=dt())}function pt(){if(D)return O;D=1;const t=et(),e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=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]))?))?$");function o(t){return null!==t&&(null!==e.exec(t)||null!==r.exec(t))}function n(t){let i=0,o=null,n=e.exec(t);if(null===n&&(n=r.exec(t)),null===n)throw new Error("Date resolve error");const a=+n[1],s=+n[2]-1,l=+n[3];if(!n[4])return new Date(Date.UTC(a,s,l));const h=+n[4],c=+n[5],d=+n[6];if(n[7]){for(i=n[7].slice(0,3);i.length<3;)i+="0";i=+i}if(n[9]){o=6e4*(60*+n[10]+ +(n[11]||0)),"-"===n[9]&&(o=-o)}const u=new Date(Date.UTC(a,s,l,h,c,d,i));return o&&u.setTime(u.getTime()-o),u}function a(t){return t.toISOString()}return(0,i.K)(o,"resolveYamlTimestamp"),(0,i.K)(n,"constructYamlTimestamp"),(0,i.K)(a,"representYamlTimestamp"),O=new t("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:o,construct:n,instanceOf:Date,represent:a})}function gt(){if(K)return I;K=1;const t=et();function e(t){return"<<"===t||null===t}return(0,i.K)(e,"resolveYamlMerge"),I=new t("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e})}function ft(){if(R)return q;R=1;const t=et(),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function r(t){if(null===t)return!1;let r=0;const i=t.length,o=e;for(let e=0;e64)){if(i<0)return!1;r+=6}}return r%8==0}function o(t){const r=t.replace(/[\r\n=]/g,""),i=r.length,o=e;let n=0;const a=[];for(let e=0;e>16&255),a.push(n>>8&255),a.push(255&n)),n=n<<6|o.indexOf(r.charAt(e));const s=i%4*6;return 0===s?(a.push(n>>16&255),a.push(n>>8&255),a.push(255&n)):18===s?(a.push(n>>10&255),a.push(n>>2&255)):12===s&&a.push(n>>4&255),new Uint8Array(a)}function n(t){let r="",i=0;const o=t.length,n=e;for(let e=0;e>18&63],r+=n[i>>12&63],r+=n[i>>6&63],r+=n[63&i]),i=(i<<8)+t[e];const a=o%3;return 0===a?(r+=n[i>>18&63],r+=n[i>>12&63],r+=n[i>>6&63],r+=n[63&i]):2===a?(r+=n[i>>10&63],r+=n[i>>4&63],r+=n[i<<2&63],r+=n[64]):1===a&&(r+=n[i>>2&63],r+=n[i<<4&63],r+=n[64],r+=n[64]),r}function a(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}return(0,i.K)(r,"resolveYamlBinary"),(0,i.K)(o,"constructYamlBinary"),(0,i.K)(n,"representYamlBinary"),(0,i.K)(a,"isBinary"),q=new t("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:o,predicate:a,represent:n})}function yt(){if(z)return P;z=1;const t=et(),e=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function o(t){if(null===t)return!0;const i=[],o=t;for(let n=0,a=o.length;n=48&&t<=57)return t-48;const e=32|t;return e>=97&&e<=102?e-97+10:-1}function m(t){return 120===t?2:117===t?4:85===t?8:0}function x(t){return t>=48&&t<=57?t-48:-1}function C(t){switch(t){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:case 9:return"\t";case 110:return"\n";case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1b";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"\x85";case 95:return"\xa0";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function b(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}function k(t,e,r){"__proto__"===e?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}(0,i.K)(d,"_class"),(0,i.K)(u,"isEol"),(0,i.K)(p,"isWhiteSpace"),(0,i.K)(g,"isWsOrEol"),(0,i.K)(f,"isFlowIndicator"),(0,i.K)(y,"fromHexCode"),(0,i.K)(m,"escapedHexLen"),(0,i.K)(x,"fromDecimalCode"),(0,i.K)(C,"simpleEscapeSequence"),(0,i.K)(b,"charFromCodepoint"),(0,i.K)(k,"setProperty");const w=new Array(256),T=new Array(256);for(let i=0;i<256;i++)w[i]=C(i)?1:0,T[i]=C(i);function S(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||o,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.maxDepth="number"==typeof e.maxDepth?e.maxDepth:100,this.maxTotalMergeKeys="number"==typeof e.maxTotalMergeKeys?e.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function v(t,i){const o={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return o.snippet=r(o),new e(i,o)}function B(t,e){throw v(t,e)}function _(t,e){t.onWarning&&t.onWarning.call(null,v(t,e))}function A(t,e,r){const i=t.anchorMapTransactions;if(0!==i.length){const r=i[i.length-1];n.call(r,e)||(r[e]={existed:n.call(t.anchorMap,e),value:t.anchorMap[e]})}t.anchorMap[e]=r}function L(t){t.anchorMapTransactions.push(Object.create(null))}function F(t){const e=t.anchorMapTransactions.pop(),r=t.anchorMapTransactions;if(0===r.length)return;const i=r[r.length-1],o=Object.keys(e);for(let a=0,s=o.length;a=0;i-=1){const o=e[r[i]];o.existed?t.anchorMap[r[i]]=o.value:delete t.anchorMap[r[i]]}}function E(t){return{position:t.position,line:t.line,lineStart:t.lineStart,lineIndent:t.lineIndent,firstTabInLine:t.firstTabInLine,tag:t.tag,anchor:t.anchor,kind:t.kind,result:t.result}}function $(t,e){t.position=e.position,t.line=e.line,t.lineStart=e.lineStart,t.lineIndent=e.lineIndent,t.firstTabInLine=e.firstTabInLine,t.tag=e.tag,t.anchor=e.anchor,t.kind=e.kind,t.result=e.result}(0,i.K)(S,"State"),(0,i.K)(v,"generateError"),(0,i.K)(B,"throwError"),(0,i.K)(_,"throwWarning"),(0,i.K)(A,"storeAnchor"),(0,i.K)(L,"beginAnchorTransaction"),(0,i.K)(F,"commitAnchorTransaction"),(0,i.K)(M,"rollbackAnchorTransaction"),(0,i.K)(E,"snapshotState"),(0,i.K)($,"restoreState");const O={YAML:(0,i.K)(function(t,e,r){null!==t.version&&B(t,"duplication of %YAML directive"),1!==r.length&&B(t,"YAML directive accepts exactly one argument");const i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]);null===i&&B(t,"ill-formed argument of the YAML directive");const o=parseInt(i[1],10),n=parseInt(i[2],10);1!==o&&B(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=n<2,1!==n&&2!==n&&_(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:(0,i.K)(function(t,e,r){let i;2!==r.length&&B(t,"TAG directive accepts exactly two arguments");const o=r[0];i=r[1],h.test(o)||B(t,"ill-formed tag handle (first argument) of the TAG directive"),n.call(t.tagMap,o)&&B(t,'there is a previously declared suffix for "'+o+'" tag handle'),c.test(i)||B(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(a){B(t,"tag prefix is malformed: "+i)}t.tagMap[o]=i},"handleTagDirective")};function D(t,e,r,i){if(e=32&&r<=1114111||B(t,"expected valid JSON character")}else a.test(o)&&B(t,"the stream contains non-printable characters");t.result+=o}}function I(e,r,i,o){t.isObject(i)||B(e,"cannot merge mappings; the provided source object is unacceptable");const a=Object.keys(i);for(let t=0,s=a.length;te.maxTotalMergeKeys&&B(e,"merge keys exceeded maxTotalMergeKeys ("+e.maxTotalMergeKeys+")"),n.call(r,s)||(k(r,s,i[s]),o[s]=!0)}}function K(t,e,r,i,o,a,s,l,h){if(Array.isArray(o))for(let n=0,c=(o=Array.prototype.slice.call(o)).length;n1&&(e.result+=t.repeat("\n",r-1))}function N(t,e,r){let i,o,n,a,s,l;const h=t.kind,c=t.result;let d=t.input.charCodeAt(t.position);if(g(d)||f(d)||35===d||38===d||42===d||33===d||124===d||62===d||39===d||34===d||37===d||64===d||96===d)return!1;if(63===d||45===d){const e=t.input.charCodeAt(t.position+1);if(g(e)||r&&f(e))return!1}for(t.kind="scalar",t.result="",i=o=t.position,n=!1;0!==d;){if(58===d){const e=t.input.charCodeAt(t.position+1);if(g(e)||r&&f(e))break}else if(35===d){if(g(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&P(t)||r&&f(d))break;if(u(d)){if(a=t.line,s=t.lineStart,l=t.lineIndent,R(t,!1,-1),t.lineIndent>=e){n=!0,d=t.input.charCodeAt(t.position);continue}t.position=o,t.line=a,t.lineStart=s,t.lineIndent=l;break}}n&&(D(t,i,o,!1),z(t,t.line-a),i=o=t.position,n=!1),p(d)||(o=t.position+1),d=t.input.charCodeAt(++t.position)}return D(t,i,o,!1),!!t.result||(t.kind=h,t.result=c,!1)}function j(t,e){let r,i,o=t.input.charCodeAt(t.position);if(39!==o)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(o=t.input.charCodeAt(t.position));)if(39===o){if(D(t,r,t.position,!0),o=t.input.charCodeAt(++t.position),39!==o)return!0;r=t.position,t.position++,i=t.position}else u(o)?(D(t,r,i,!0),z(t,R(t,!1,e)),r=i=t.position):t.position===t.lineStart&&P(t)?B(t,"unexpected end of the document within a single quoted scalar"):(t.position++,p(o)||(i=t.position));B(t,"unexpected end of the stream within a single quoted scalar")}function W(t,e){let r,i,o,n=t.input.charCodeAt(t.position);if(34!==n)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(n=t.input.charCodeAt(t.position));){if(34===n)return D(t,r,t.position,!0),t.position++,!0;if(92===n){if(D(t,r,t.position,!0),n=t.input.charCodeAt(++t.position),u(n))R(t,!1,e);else if(n<256&&w[n])t.result+=T[n],t.position++;else if((o=m(n))>0){let e=o,r=0;for(;e>0;e--)n=t.input.charCodeAt(++t.position),(o=y(n))>=0?r=(r<<4)+o:B(t,"expected hexadecimal character");t.result+=b(r),t.position++}else B(t,"unknown escape sequence");r=i=t.position}else u(n)?(D(t,r,i,!0),z(t,R(t,!1,e)),r=i=t.position):t.position===t.lineStart&&P(t)?B(t,"unexpected end of the document within a double quoted scalar"):(t.position++,p(n)||(i=t.position))}B(t,"unexpected end of the stream within a double quoted scalar")}function H(t,e){let r,i,o,n=!0;const a=t.tag;let s;const l=t.anchor;let h,c,d,u;const p=Object.create(null);let f,y,m,x=t.input.charCodeAt(t.position);if(91===x)h=93,u=!1,s=[];else{if(123!==x)return!1;h=125,u=!0,s={}}for(null!==t.anchor&&A(t,t.anchor,s),x=t.input.charCodeAt(++t.position);0!==x;){if(R(t,!0,e),x=t.input.charCodeAt(t.position),x===h)return t.position++,t.tag=a,t.anchor=l,t.kind=u?"mapping":"sequence",t.result=s,!0;if(n?44===x&&B(t,"expected the node content, but found ','"):B(t,"missed comma between flow collection entries"),y=f=m=null,c=d=!1,63===x){g(t.input.charCodeAt(t.position+1))&&(c=d=!0,t.position++,R(t,!0,e))}r=t.line,i=t.lineStart,o=t.position,ot(t,e,1,!1,!0),y=t.tag,f=t.result,R(t,!0,e),x=t.input.charCodeAt(t.position),!d&&t.line!==r||58!==x||(c=!0,x=t.input.charCodeAt(++t.position),R(t,!0,e),ot(t,e,1,!1,!0),m=t.result),u?K(t,s,p,y,f,m,r,i,o):c?s.push(K(t,null,p,y,f,m,r,i,o)):s.push(f),R(t,!0,e),x=t.input.charCodeAt(t.position),44===x?(n=!0,x=t.input.charCodeAt(++t.position)):n=!1}B(t,"unexpected end of the stream within a flow collection")}function U(e,r){let i,o,n=1,a=!1,s=!1,l=r,h=0,c=!1,d=e.input.charCodeAt(e.position);if(124===d)i=!1;else{if(62!==d)return!1;i=!0}for(e.kind="scalar",e.result="";0!==d;)if(d=e.input.charCodeAt(++e.position),43===d||45===d)1===n?n=43===d?3:2:B(e,"repeat of a chomping mode identifier");else{if(!((o=x(d))>=0))break;0===o?B(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?B(e,"repeat of an indentation width identifier"):(l=r+o-1,s=!0)}if(p(d)){do{d=e.input.charCodeAt(++e.position)}while(p(d));if(35===d)do{d=e.input.charCodeAt(++e.position)}while(!u(d)&&0!==d)}for(;0!==d;){for(q(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!s||e.lineIndentl&&(l=e.lineIndent),u(d)){h++;continue}if(s||0!==l||B(e,"missing indentation for block scalar"),e.lineIndente)&&0!==a)B(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(y&&(o=t.line,n=t.lineStart,a=t.position),ot(t,e,4,!0,i)&&(y?u=t.result:f=t.result),y||(K(t,h,c,d,u,f,o,n,a),d=u=f=null),R(t,!0,-1),x=t.input.charCodeAt(t.position)),(t.line===b||t.lineIndent>e)&&0!==x)B(t,"bad indentation of a mapping entry");else if(t.lineIndent=t.maxDepth&&B(t,"nesting exceeded maxDepth ("+t.maxDepth+")"),t.depth+=1,null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null;const f=a=s=4===r||3===r;if(i&&R(t,!0,-1)&&(u=!0,t.lineIndent>e?d=1:t.lineIndent===e?d=0:t.lineIndente?d=1:t.lineIndent===e?d=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"');for(let e=0,r=t.implicitTypes.length;e"),null!==t.result&&l.kind!==t.kind&&B(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+l.kind+'", not "'+t.kind+'"'),l.resolve(t.result,t.tag)?(t.result=l.construct(t.result,t.tag),null!==t.anchor&&A(t,t.anchor,t.result)):B(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),t.depth-=1,null!==t.tag||null!==t.anchor||p}function nt(t){const e=t.position;let r,i=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(r=t.input.charCodeAt(t.position))&&(R(t,!0,-1),r=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==r));){i=!0,r=t.input.charCodeAt(++t.position);let e=t.position;for(;0!==r&&!g(r);)r=t.input.charCodeAt(++t.position);const o=t.input.slice(e,t.position),a=[];for(o.length<1&&B(t,"directive name must not be less than one character in length");0!==r;){for(;p(r);)r=t.input.charCodeAt(++t.position);if(35===r){do{r=t.input.charCodeAt(++t.position)}while(0!==r&&!u(r));break}if(u(r))break;for(e=t.position;0!==r&&!g(r);)r=t.input.charCodeAt(++t.position);a.push(t.input.slice(e,t.position))}0!==r&&q(t),n.call(O,o)?O[o](t,o,a):_(t,'unknown document directive "'+o+'"')}R(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,R(t,!0,-1)):i&&B(t,"directives end mark is expected"),ot(t,t.lineIndent-1,4,!1,!0),R(t,!0,-1),t.checkLineBreaks&&s.test(t.input.slice(e,t.position))&&_(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&P(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,R(t,!0,-1)):t.position=32&&t<=126||t>=161&&t<=55295&&8232!==t&&8233!==t||t>=57344&&t<=65533&&t!==a||t>=65536&&t<=1114111}function x(t){return m(t)&&t!==a&&13!==t&&10!==t}function C(t,e,r){const i=x(t),o=i&&!y(t);return(r?i:i&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t)&&35!==t&&!(58===e&&!o)||x(e)&&!y(e)&&35===t||58===e&&o}function b(t){return m(t)&&t!==a&&!y(t)&&45!==t&&63!==t&&58!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&35!==t&&38!==t&&42!==t&&33!==t&&124!==t&&61!==t&&62!==t&&39!==t&&34!==t&&37!==t&&64!==t&&96!==t}function k(t){return!y(t)&&58!==t}function w(t,e){const r=t.charCodeAt(e);let i;return r>=55296&&r<=56319&&e+1=56320&&i<=57343)?1024*(r-55296)+i-56320+65536:r}function T(t){return/^\n* /.test(t)}(0,i.K)(u,"State"),(0,i.K)(p,"indentString"),(0,i.K)(g,"generateNextLine"),(0,i.K)(f,"testImplicitResolving"),(0,i.K)(y,"isWhitespace"),(0,i.K)(m,"isPrintable"),(0,i.K)(x,"isNsCharOrWhitespace"),(0,i.K)(C,"isPlainSafe"),(0,i.K)(b,"isPlainSafeFirst"),(0,i.K)(k,"isPlainSafeLast"),(0,i.K)(w,"codePointAt"),(0,i.K)(T,"needIndentIndicator");function S(t,e,r,i,o,n,a,s){let l,h=0,c=null,d=!1,u=!1;const p=-1!==i;let g=-1,f=b(w(t,0))&&k(w(t,t.length-1));if(e||a)for(l=0;l=65536?l+=2:l++){if(h=w(t,l),!m(h))return 5;f=f&&C(h,c,s),c=h}else{for(l=0;l=65536?l+=2:l++){if(h=w(t,l),10===h)d=!0,p&&(u=u||l-g-1>i&&" "!==t[g+1],g=l);else if(!m(h))return 5;f=f&&C(h,c,s),c=h}u=u||p&&l-g-1>i&&" "!==t[g+1]}return d||u?r>9&&T(t)?5:a?2===n?5:2:u?4:3:!f||a||o(t)?2===n?5:2:1}function v(t,r,o,n,a){t.dump=function(){if(0===r.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==l.indexOf(r)||h.test(r)))return 2===t.quotingType?'"'+r+'"':"'"+r+"'";const s=t.indent*Math.max(1,o),c=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-s),d=n||t.flowLevel>-1&&o>=t.flowLevel;function u(e){return f(t,e)}switch((0,i.K)(u,"testAmbiguity"),S(r,d,t.indent,c,u,t.quotingType,t.forceQuotes&&!n,a)){case 1:return r;case 2:return"'"+r.replace(/'/g,"''")+"'";case 3:return"|"+B(r,t.indent)+_(p(r,s));case 4:return">"+B(r,t.indent)+_(p(A(r,c),s));case 5:return'"'+F(r)+'"';default:throw new e("impossible error: invalid scalar style")}}()}function B(t,e){const r=T(t)?String(e):"",i="\n"===t[t.length-1];return r+(i&&("\n"===t[t.length-2]||"\n"===t)?"+":i?"":"-")+"\n"}function _(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function A(t,e){const r=/(\n+)([^\n]*)/g;let i,o,n=function(){let i=t.indexOf("\n");return i=-1!==i?i:t.length,r.lastIndex=i,L(t.slice(0,i),e)}(),a="\n"===t[0]||" "===t[0];for(;o=r.exec(t);){const t=o[1],r=o[2];i=" "===r[0],n+=t+(a||i||""===r?"":"\n")+L(r,e),a=i}return n}function L(t,e){if(""===t||" "===t[0])return t;const r=/ [^ ]/g;let i,o,n=0,a=0,s=0,l="";for(;i=r.exec(t);)s=i.index,s-n>e&&(o=a>n?a:s,l+="\n"+t.slice(n,o),n=o+1),a=s;return l+="\n",t.length-n>e&&a>n?l+=t.slice(n,a)+"\n"+t.slice(a+1):l+=t.slice(n),l.slice(1)}function F(t){let e="",r=0;for(let i=0;i=65536?i+=2:i++){r=w(t,i);const o=s[r];!o&&m(r)?(e+=t[i],r>=65536&&(e+=t[i+1])):e+=o||d(r)}return e}function M(t,e,r){let i="";const o=t.tag;for(let n=0,a=r.length;n1024&&(o+="? "),o+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),I(t,e,l,!1,!1)&&(o+=t.dump,i+=o))}t.tag=o,t.dump="{"+i+"}"}function O(t,r,i,o){let n="";const a=t.tag,s=Object.keys(i);if(!0===t.sortKeys)s.sort();else if("function"==typeof t.sortKeys)s.sort(t.sortKeys);else if(t.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let e=0,l=s.length;e1024;c&&(t.dump&&10===t.dump.charCodeAt(0)?a+="?":a+="? "),a+=t.dump,c&&(a+=g(t,r)),I(t,r+1,h,!0,c)&&(t.dump&&10===t.dump.charCodeAt(0)?a+=":":a+=": ",a+=t.dump,n+=a)}t.tag=a,t.dump=n||"{}"}function D(t,r,i){const a=i?t.explicitTypes:t.implicitTypes;for(let s=0,l=a.length;s tag resolver accepts not "'+i+'" style');a=l.represent[i](r,i)}t.dump=a}return!0}}return!1}function I(t,r,i,n,a,s,l){t.tag=null,t.dump=i,D(t,i,!1)||D(t,i,!0);const h=o.call(t.dump),c=n;n&&(n=t.flowLevel<0||t.flowLevel>r);const d="[object Object]"===h||"[object Array]"===h;let u,p;if(d&&(u=t.duplicates.indexOf(i),p=-1!==u),(null!==t.tag&&"?"!==t.tag||p||2!==t.indent&&r>0)&&(a=!1),p&&t.usedDuplicates[u])t.dump="*ref_"+u;else{if(d&&p&&!t.usedDuplicates[u]&&(t.usedDuplicates[u]=!0),"[object Object]"===h)n&&0!==Object.keys(t.dump).length?(O(t,r,t.dump,a),p&&(t.dump="&ref_"+u+t.dump)):($(t,r,t.dump),p&&(t.dump="&ref_"+u+" "+t.dump));else if("[object Array]"===h)n&&0!==t.dump.length?(t.noArrayIndent&&!l&&r>0?E(t,r-1,t.dump,a):E(t,r,t.dump,a),p&&(t.dump="&ref_"+u+t.dump)):(M(t,r,t.dump),p&&(t.dump="&ref_"+u+" "+t.dump));else{if("[object String]"!==h){if("[object Undefined]"===h)return!1;if(t.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+h)}"?"!==t.tag&&v(t,t.dump,r,s,c)}if(null!==t.tag&&"?"!==t.tag){let e=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21");e="!"===t.tag[0]?"!"+e:"tag:yaml.org,2002:"===e.slice(0,18)?"!!"+e.slice(18):"!<"+e+">",t.dump=e+" "+t.dump}}return!0}function K(t,e){const r=[],i=[];q(t,r,i);const o=i.length;for(let n=0;nd,Oi:()=>s,U7:()=>c,U_:()=>u,on:()=>h});var i=r(79515),o=r(16459),n=r(31293),a=r(86827),s=(0,a.K)(({flowchart:t})=>{const e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:e+r}},"getSubGraphTitleMargins"),l=new Map;async function h(t,e,r){let n,a;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const s=e.shape?i.nq[e.shape]:void 0;if(!s)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let i;"sandbox"===r.config.securityLevel?i="_top":e.linkTarget&&(i=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",i??null),a=await s(n,e,r)}else a=await s(t,e,r),n=a;return n.attr("data-look",(0,o.KL)(e.look)),e.tooltip&&a.attr("title",e.tooltip),l.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}(0,a.K)(h,"insertNode");var c=(0,a.K)((t,e)=>{l.set(e.id,t)},"setNodeElem"),d=(0,a.K)(()=>{l.clear()},"clear"),u=(0,a.K)(t=>{const e=l.get(t.id);n.R.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode")},44505(t,e,r){"use strict";r.d(e,{Fr:()=>d,GX:()=>c,KX:()=>h,WW:()=>s,ue:()=>n});var i=r(76385),o=r(86827),n=(0,o.K)(t=>{const{handDrawnSeed:e}=(0,i.D7)();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),a=(0,o.K)(t=>Array.isArray(t)?t:t?t.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),s=(0,o.K)(t=>{const e=l([...t.cssCompiledStyles||[],...t.cssStyles||[],...a(t.labelStyle)]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),l=(0,o.K)(t=>{const e=new Map;return t.forEach(t=>{const[r,i]=t.split(":");e.set(r.trim(),i?.trim())}),e},"styles2Map"),h=(0,o.K)(t=>"color"===t||"font-size"===t||"font-family"===t||"font-weight"===t||"font-style"===t||"text-decoration"===t||"text-align"===t||"text-transform"===t||"line-height"===t||"letter-spacing"===t||"word-spacing"===t||"text-shadow"===t||"text-overflow"===t||"white-space"===t||"word-wrap"===t||"word-break"===t||"overflow-wrap"===t||"hyphens"===t,"isLabelStyle"),c=(0,o.K)(t=>{const{stylesArray:e}=s(t),r=[],i=[],o=[],n=[];return e.forEach(t=>{const e=t[0];h(e)?r.push(t.join(":")+" !important"):(i.push(t.join(":")+" !important"),e.includes("stroke")&&o.push(t.join(":")+" !important"),"fill"===e&&n.push(t.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:o,backgroundStyles:n}},"styles2String"),d=(0,o.K)((t,e)=>{const{themeVariables:r,handDrawnSeed:o}=(0,i.D7)(),{nodeBorder:n,mainBkg:a}=r,{stylesMap:l}=s(t);return Object.assign({roughness:.7,fill:l.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:l.get("stroke")||n,seed:o,strokeWidth:l.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:u(l.get("stroke-dasharray"))},e)},"userNodeOverrides"),u=(0,o.K)(t=>{if(!t)return[0,0];const e=t.trim().split(/\s+/).map(Number);if(1===e.length){const t=isNaN(e[0])?0:e[0];return[t,t]}return[isNaN(e[0])?0:e[0],isNaN(e[1])?0:e[1]]},"getStrokeDashArray")},58962(t,e,r){"use strict";r.d(e,{WY:()=>A,dn:()=>_,pC:()=>v,Gc:()=>w});var i=r(76385),o=r(31293),n=r(86827);const a=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),s=Object.freeze({left:0,top:0,width:16,height:16}),l=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),h=Object.freeze({...s,...l}),c=Object.freeze({...h,body:"",hidden:!1});function d(t,e){const r=function(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const i=((t.rotate||0)+(e.rotate||0))%4;return i&&(r.rotate=i),r}(t,e);for(const i in c)i in l?i in t&&!(i in r)&&(r[i]=l[i]):i in e?r[i]=e[i]:i in t&&(r[i]=t[i]);return r}function u(t,e,r){const i=t.icons,o=t.aliases||Object.create(null);let n={};function a(t){n=d(i[t]||o[t],n)}return a(e),r.forEach(a),d(t,n)}function p(t,e){if(t.icons[e])return u(t,e,[]);const r=function(t,e){const r=t.icons,i=t.aliases||Object.create(null),o=Object.create(null);return(e||Object.keys(r).concat(Object.keys(i))).forEach(function t(e){if(r[e])return o[e]=[];if(!(e in o)){o[e]=null;const r=i[e]&&i[e].parent,n=r&&t(r);n&&(o[e]=[r].concat(n))}return o[e]}),o}(t,[e])[e];return r?u(t,e,r):null}const g=Object.freeze({width:null,height:null}),f=Object.freeze({...g,...l}),y=/(-?[0-9.]*[0-9]+[0-9.]*)/g,m=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function x(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;const i=t.split(y);if(null===i||!i.length)return t;const o=[];let n=i.shift(),a=m.test(n);for(;;){if(a){const t=parseFloat(n);isNaN(t)?o.push(n):o.push(Math.ceil(t*e*r)/r)}else o.push(n);if(n=i.shift(),void 0===n)return o.join("");a=!a}}const C=/\sid="(\S+)"/g,b=new Map;function k(t){const e=[];let r;for(;r=C.exec(t);)e.push(r[1]);if(!e.length)return t;const i="suffix"+(16777216*Math.random()|Date.now()).toString(16);return e.forEach(e=>{const r=function(t){t=t.replace(/[0-9]+$/,"")||"a";const e=b.get(t)||0;return b.set(t,e+1),e?`${t}${e}`:t}(e),o=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+r+i+"$3")}),t=t.replace(new RegExp(i,"g"),"")}var w={body:'?',height:80,width:80},T=new Map,S=new Map,v=(0,n.K)(t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(o.R.debug("Registering icon pack:",e.name),"loader"in e)S.set(e.name,e.loader);else{if(!("icons"in e))throw o.R.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');T.set(e.name,e.icons)}}},"registerIconPacks"),B=(0,n.K)(async(t,e)=>{const r=((t,e,r,i="")=>{const o=t.split(":");if("@"===t.slice(0,1)){if(o.length<2||o.length>3)return null;i=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const t=o.pop(),r=o.pop(),n={provider:o.length>0?o[0]:i,prefix:r,name:t};return e&&!a(n)?null:n}const n=o[0],s=n.split("-");if(s.length>1){const t={provider:i,prefix:s.shift(),name:s.join("-")};return e&&!a(t)?null:t}if(r&&""===i){const t={provider:i,prefix:"",name:n};return e&&!a(t,r)?null:t}return null})(t,!0,void 0!==e);if(!r)throw new Error(`Invalid icon name: ${t}`);const i=r.prefix||e;if(!i)throw new Error(`Icon name must contain a prefix: ${t}`);let n=T.get(i);if(!n){const t=S.get(i);if(!t)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await t(),prefix:i},T.set(i,n)}catch(l){throw o.R.error(l),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=p(n,r.name);if(!s)throw new Error(`Icon not found: ${t}`);return s},"getRegisteredIconData"),_=(0,n.K)(async t=>{try{return await B(t),!0}catch{return!1}},"isIconAvailable"),A=(0,n.K)(async(t,e,r)=>{let n;try{n=await B(t,e?.fallbackPrefix)}catch(l){o.R.error(l),n=w}const a=function(t,e){const r={...h,...t},i={...f,...e},o={left:r.left,top:r.top,width:r.width,height:r.height};let n=r.body;[r,i].forEach(t=>{const e=[],r=t.hFlip,i=t.vFlip;let a,s=t.rotate;switch(r?i?s+=2:(e.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),e.push("scale(-1 1)"),o.top=o.left=0):i&&(e.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),e.push("scale(1 -1)"),o.top=o.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:a=o.height/2+o.top,e.unshift("rotate(90 "+a.toString()+" "+a.toString()+")");break;case 2:e.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:a=o.width/2+o.left,e.unshift("rotate(-90 "+a.toString()+" "+a.toString()+")")}s%2==1&&(o.left!==o.top&&(a=o.left,o.left=o.top,o.top=a),o.width!==o.height&&(a=o.width,o.width=o.height,o.height=a)),e.length&&(n=function(t,e,r){const i=function(t,e="defs"){let r="";const i=t.indexOf("<"+e);for(;i>=0;){const o=t.indexOf(">",i),n=t.indexOf("",n);if(-1===a)break;r+=t.slice(o+1,n).trim(),t=t.slice(0,i).trim()+t.slice(a+1)}return{defs:r,content:t}}(t);return o=i.defs,n=e+i.content+r,o?""+o+""+n:n;var o,n}(n,'',""))});const a=i.width,s=i.height,l=o.width,c=o.height;let d,u;null===a?(u=null===s?"1em":"auto"===s?c:s,d=x(u,l/c)):(d="auto"===a?l:a,u=null===s?x(d,c/l):"auto"===s?c:s);const p={},g=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(p[t]=e.toString())};g("width",d),g("height",u);const y=[o.left,o.top,l,c];return p.viewBox=y.join(" "),{attributes:p,viewBox:y,body:n}}(n,e),s=function(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in e)r+=" "+i+'="'+e[i]+'"';return'"+t+""}(k(a.body),{...a.attributes,...r});return(0,i.jZ)(s,(0,i.zj)())},"getIconSVG")},46853(t,e,r){"use strict";r.d(e,{IU:()=>B,Jo:()=>P,T_:()=>M,UQ:()=>v,a6:()=>_,g0:()=>ut,hq:()=>g,jP:()=>L,lP:()=>S});var i=r(717),o=r(79515),n=r(44505),a=r(72379),s=r(16459),l=r(76385),h=r(31293),c=r(86827),d=r(70451),u=r(52274),p=(0,c.K)((t,e)=>{if(e)return"translate("+-t.width/2+", "+-t.height/2+")";const r=t.x??0,i=t.y??0;return"translate("+-(r+t.width/2)+", "+-(i+t.height/2)+")"},"computeLabelTransform"),g={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},f={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function y(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=m(t),e=m(e);const[r,i]=[t.x,t.y],[o,n]=[e.x,e.y],a=o-r,s=n-i;return{angle:Math.atan(s/a),deltaX:a,deltaY:s}}(0,c.K)(y,"calculateDeltaAndAngle");var m=(0,c.K)(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),x=(0,c.K)(t=>({x:(0,c.K)(function(e,r,i){let o=0;const n=m(i[0]).x=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(g,t.arrowTypeEnd)){const{angle:e,deltaX:r}=y(i[i.length-1],i[i.length-2]);o=g[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}const a=Math.abs(m(e).x-m(i[i.length-1]).x),s=Math.abs(m(e).y-m(i[i.length-1]).y),l=Math.abs(m(e).x-m(i[0]).x),h=Math.abs(m(e).y-m(i[0]).y),c=g[t.arrowTypeStart],d=g[t.arrowTypeEnd];if(a0&&s0&&h=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(g,t.arrowTypeEnd)){const{angle:e,deltaY:r}=y(i[i.length-1],i[i.length-2]);o=g[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}const a=Math.abs(m(e).y-m(i[i.length-1]).y),s=Math.abs(m(e).x-m(i[i.length-1]).x),l=Math.abs(m(e).y-m(i[0]).y),h=Math.abs(m(e).x-m(i[0]).x),c=g[t.arrowTypeStart],d=g[t.arrowTypeEnd];if(a0&&s0&&h{e.arrowTypeStart&&w(t,"start",e.arrowTypeStart,r,i,o,n,a),e.arrowTypeEnd&&w(t,"end",e.arrowTypeEnd,r,i,o,n,a)},"addEdgeMarkers"),b={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},k=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],w=(0,c.K)((t,e,r,i,o,n,a=!1,s)=>{if(!r||"none"===r)return;const l=b[r],c=l&&k.includes(l.type);if(!l)return void h.R.warn(`Unknown arrow type: ${r}`);const d=`${o}_${n}-${l.type}${"start"===e?"Start":"End"}${a&&c?"-margin":""}`;if(s&&""!==s.trim()){const r=`${d}_${s.replace(/[^\dA-Za-z]/g,"_")}`;if(!document.getElementById(r)){const t=document.getElementById(d);if(t){const e=t.cloneNode(!0);e.id=r;e.querySelectorAll("path, circle, line").forEach(t=>{t.setAttribute("stroke",s),l.fill&&t.setAttribute("fill",s)}),t.parentNode?.appendChild(e)}}t.attr(`marker-${e}`,`url(${i}#${r})`)}else t.attr(`marker-${e}`,`url(${i}#${d})`)},"addEdgeMarker"),T=(0,c.K)(t=>"string"==typeof t?t:(0,l.D7)()?.flowchart?.curve,"resolveEdgeCurveType"),S=new Map,v=new Map,B=(0,c.K)(()=>{S.clear(),v.clear()},"clear"),_=(0,c.K)(t=>Boolean(t.label||t.startLabelLeft||t.startLabelRight||t.endLabelLeft||t.endLabelRight),"hasEdgeLabel"),A=(0,c.K)(t=>t?"string"==typeof t?t:t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),L=(0,c.K)(async(t,e)=>{const r=(0,l.D7)();let i=(0,l.E)(r);const{labelStyles:s}=(0,n.GX)(e);e.labelStyle=s;const c=t.insert("g").attr("class","edgeLabel"),u=c.insert("g").attr("class","label").attr("data-id",e.id),g="markdown"===e.labelType,f=await(0,a.GZ)(t,e.label,{style:A(e.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:g,width:void 0},r);let y,m,x;if(u.node().appendChild(f),h.R.info("abc82",e,e.labelType),i){const t=f.children[0],e=(0,d.Ltv)(f);y=await a.lT.measure(()=>t.getBoundingClientRect()),m=y,e.attr("width",y.width),e.attr("height",y.height)}else{const t=(0,d.Ltv)(f).select("text").node();await a.lT.measure(()=>{y=f.getBBox(),m=t&&"function"==typeof t.getBBox?t.getBBox():y})}if(u.attr("transform",p(m,i)),S.set(e.id,c),e.width=y.width,e.height=y.height,e.startLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),n=r.insert("g").attr("class","inner"),a=await(0,o.DA)(n,e.startLabelLeft,A(e.labelStyle)||"",!1,!1);x=a;let s=a.getBBox();if(i){const t=a.children[0],e=(0,d.Ltv)(a);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}n.attr("transform",p(s,i)),v.get(e.id)||v.set(e.id,{}),v.get(e.id).startLeft=r,F(x,e.startLabelLeft)}if(e.startLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),n=r.insert("g").attr("class","inner"),a=await(0,o.DA)(n,e.startLabelRight,A(e.labelStyle)||"",!1,!1);x=a;let s=a.getBBox();if(i){const t=a.children[0],e=(0,d.Ltv)(a);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}n.attr("transform",p(s,i)),v.get(e.id)||v.set(e.id,{}),v.get(e.id).startRight=r,F(x,e.startLabelRight)}if(e.endLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),n=r.insert("g").attr("class","inner"),a=await(0,o.DA)(r,e.endLabelLeft,A(e.labelStyle)||"",!1,!1);x=a;let s=a.getBBox();if(i){const t=a.children[0],e=(0,d.Ltv)(a);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}n.attr("transform",p(s,i)),v.get(e.id)||v.set(e.id,{}),v.get(e.id).endLeft=r,F(x,e.endLabelLeft)}if(e.endLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),n=r.insert("g").attr("class","inner"),a=await(0,o.DA)(r,e.endLabelRight,A(e.labelStyle)||"",!1,!1);x=a;let s=a.getBBox();if(i){const t=a.children[0],e=(0,d.Ltv)(a);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}n.attr("transform",p(s,i)),v.get(e.id)||v.set(e.id,{}),v.get(e.id).endRight=r,F(x,e.endLabelRight)}return f},"insertEdgeLabel");function F(t,e){(0,l.E)((0,l.D7)())&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,c.K)(F,"setTerminalWidth");var M=(0,c.K)((t,e)=>{h.R.debug("Moving label abc88 ",t.id,t.label,S.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const o=(0,l.D7)(),{subGraphTitleTotalMargin:n}=(0,i.Oi)(o);if(t.label){const i=S.get(t.id);let o=t.x,a=t.y;if(r){const i=s._K.calcLabelPosition(r);h.R.debug("Moving label "+t.label+" from (",o,",",a,") to (",i.x,",",i.y,") abc88"),e.updatedPath&&(o=i.x,a=i.y)}i.attr("transform",`translate(${o}, ${a+n/2})`)}if(t.startLabelLeft){const e=v.get(t.id).startLeft;let i=t.x,o=t.y;if(r){const e=s._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.startLabelRight){const e=v.get(t.id).startRight;let i=t.x,o=t.y;if(r){const e=s._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.endLabelLeft){const e=v.get(t.id).endLeft;let i=t.x,o=t.y;if(r){const e=s._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.endLabelRight){const e=v.get(t.id).endRight;let i=t.x,o=t.y;if(r){const e=s._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}},"positionEdgeLabel"),E=(0,c.K)((t,e)=>{if(!t?.isLabelEdge||!t?.id?.endsWith("-to-label")||!Array.isArray(e))return e;if(2!==e.length)return e;const[r,i]=e,o=Math.abs(i.x-r.x),n=Math.abs(i.y-r.y);return o<.001||n<.001?e:n>=o?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),$=(0,c.K)((t,e)=>{const r=t.x,i=t.y,o=Math.abs(e.x-r),n=Math.abs(e.y-i),a=t.width/2,s=t.height/2;return o>=a||n>=s},"outsideNode"),O=(0,c.K)((t,e,r)=>{h.R.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const i=t.x,o=t.y,n=Math.abs(i-r.x),a=t.width/2;let s=r.xMath.abs(i-e.x)*l){let t=r.y{h.R.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],o=!1;return t.forEach(t=>{if(h.R.info("abc88 checking point",t,e),$(e,t)||o)h.R.warn("abc88 outside",t,i),i=t,o||r.push(t);else{const n=O(e,i,t);h.R.debug("abc88 inside",t,i,n),h.R.debug("abc88 intersection",n,e);let a=!1;r.forEach(t=>{a=a||t.x===n.x&&t.y===n.y}),r.some(t=>t.x===n.x&&t.y===n.y)?h.R.warn("abc88 no intersect",n,r):r.push(n),o=!0}}),h.R.debug("returning points",r),r},"cutPathAtIntersect");function I(t){const e=[],r=[];for(let i=1;i5&&Math.abs(n.y-o.y)>5||o.y===n.y&&n.x===a.x&&Math.abs(n.x-o.x)>5&&Math.abs(n.y-a.y)>5)&&(e.push(n),r.push(i))}return{cornerPoints:e,cornerPointPositions:r}}(0,c.K)(I,"extractCornerPoints");var K=(0,c.K)(function(t,e,r){const i=e.x-t.x,o=e.y-t.y,n=r/Math.sqrt(i*i+o*o);return{x:e.x-n*i,y:e.y-n*o}},"findAdjacentPoint"),q=(0,c.K)(function(t){const{cornerPointPositions:e}=I(t),r=[];for(let i=0;i10&&Math.abs(o.y-e.y)>=10){h.R.debug("Corner point fixing",Math.abs(o.x-e.x),Math.abs(o.y-e.y));const t=5;u=n.x===a.x?{x:l<0?a.x-t+d:a.x+t-d,y:c<0?a.y-d:a.y+d}:{x:l<0?a.x-d:a.x+d,y:c<0?a.y-t+d:a.y+t-d}}else h.R.debug("Corner point skipping fixing",Math.abs(o.x-e.x),Math.abs(o.y-e.y));r.push(u,s)}else r.push(t[i]);return r},"fixCorners"),R=(0,c.K)((t,e,r)=>{const i=t-e-r,o=Math.floor(i/4),n=Number.isFinite(o)?Math.max(0,o):0;return`0 ${e} ${Array(n).fill("2 2").join(" ")} ${r}`},"generateDashArray"),P=(0,c.K)(function(t,e,r,i,o,a,c,p=!1){if(!c)throw new Error(`insertEdge: missing diagramId for edge "${e.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:g,layout:y}=(0,l.D7)();let m=e.points,b=!1;const k=o;var w=a;const S=[];for(const s in e.cssCompiledStyles)(0,n.KX)(s)||S.push(e.cssCompiledStyles[s]);if("swimlane"===y){if(w.intersect&&k.intersect&&Array.isArray(m)&&m.length>=2)if(2===m.length)m=[k.intersect(m[0]),w.intersect(m[1])];else{const t=m.slice(1,-1),e=t[0],r=t[t.length-1],i=.5,o=Math.abs(m[m.length-1].x-r.x)!Number.isNaN(t.y));const _=T(e.curve);"rounded"!==_&&(B=q(B));let A=d.lUB;switch(_){case"linear":case"rounded":A=d.lUB;break;case"basis":default:A=d.qrM;break;case"cardinal":A=d.y8u;break;case"bumpX":A=d.Wi0;break;case"bumpY":A=d.PGM;break;case"catmullRom":A=d.oDi;break;case"monotoneX":A=d.nVG;break;case"monotoneY":A=d.uxU;break;case"natural":A=d.Xf2;break;case"step":A=d.GZz;break;case"stepAfter":A=d.UPb;break;case"stepBefore":A=d.dyv}const{x:L,y:F}=x(e),M=(0,d.n8j)().x(L).y(F).curve(A);let $,O;switch(e.thickness){case"normal":default:$="edge-thickness-normal";break;case"thick":$="edge-thickness-thick";break;case"invisible":$="edge-thickness-invisible"}switch(e.pattern){case"solid":default:$+=" edge-pattern-solid";break;case"dotted":$+=" edge-pattern-dotted";break;case"dashed":$+=" edge-pattern-dashed"}let I="rounded"===_?z(j(B,e),5):M(B);const K=Array.isArray(e.style)?e.style:[e.style];let P=K.find(t=>t?.startsWith("stroke:")),N="";e.animate&&(N="edge-animation-fast"),e.animation&&(N="edge-animation-"+e.animation);let W=!1;if("handDrawn"===e.look){const r=u.A.svg(t);Object.assign([],B);const i=r.path(I,{roughness:.3,seed:g});$+=" transition",O=(0,d.Ltv)(i).select("path").attr("id",`${c}-${e.id}`).attr("class"," "+$+(e.classes?" "+e.classes:"")+(N?" "+N:"")).attr("style",K?K.reduce((t,e)=>t+";"+e,""):"");let o=O.attr("d");O.attr("d",o),t.node().appendChild(O.node())}else{const r=S.join(";"),i=K?K.reduce((t,e)=>t+e+";",""):"",o=(r?r+";"+i+";":i)+";"+(K?K.reduce((t,e)=>t+";"+e,""):"");O=t.append("path").attr("d",I).attr("id",`${c}-${e.id}`).attr("class"," "+$+(e.classes?" "+e.classes:"")+(N?" "+N:"")).attr("style",o),P=o.match(/stroke:([^;]+)/)?.[1],W=!0===e.animate||!!e.animation||r.includes("animation");const n=O.node(),a="function"==typeof n.getTotalLength?n.getTotalLength():0,s=f[e.arrowTypeStart]||0,l=f[e.arrowTypeEnd]||0;if("neo"===e.look&&!W){const t=`stroke-dasharray: ${"dotted"===e.pattern||"dashed"===e.pattern?R(a,s,l):`0 ${s} ${a-s-l} ${l}`}; stroke-dashoffset: 0;`;O.attr("style",t+O.attr("style"))}}O.attr("data-edge",!0),O.attr("data-et","edge"),O.attr("data-id",e.id),O.attr("data-points",v),O.attr("data-look",(0,s.KL)(e.look)),e.showPoints&&B.forEach(e=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",e.x).attr("cy",e.y)});let H="";((0,l.D7)().flowchart.arrowMarkerAbsolute||(0,l.D7)().state.arrowMarkerAbsolute)&&(H=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,H=H.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),h.R.info("arrowTypeStart",e.arrowTypeStart),h.R.info("arrowTypeEnd",e.arrowTypeEnd);C(O,e,H,c,i,!W&&"neo"===e?.look,P);const U=m[Math.floor(m.length/2)];s._K.isLabelCoordinateInPath(U,O.attr("d"))||(b=!0);let Y={};return b&&(Y.updatedPath=m),Y.originalPath=e.points,Y},"insertEdge");function z(t,e){if(t.length<2)return"";let r="";const i=t.length,o=1e-5;for(let n=0;n({...t}));if(t.length>=2&&g[e.arrowTypeStart]){const i=g[e.arrowTypeStart],o=t[0],n=t[1],{angle:a}=N(o,n),s=i*Math.cos(a),l=i*Math.sin(a);r[0].x=o.x+s,r[0].y=o.y+l}const i=t.length;if(i>=2&&g[e.arrowTypeEnd]){const o=g[e.arrowTypeEnd],n=t[i-1],a=t[i-2],{angle:s}=N(a,n),l=o*Math.cos(s),h=o*Math.sin(s);r[i-1].x=n.x-l,r[i-1].y=n.y-h}return r}(0,c.K)(z,"generateRoundedPath"),(0,c.K)(N,"calculateDeltaAndAngle"),(0,c.K)(j,"applyMarkerOffsetsToPoints");var W=(0,c.K)((t,e,r,i)=>{e.forEach(e=>{dt[e](t,r,i)})},"insertMarkers"),H=(0,c.K)((t,e,r)=>{h.R.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),t.append("marker").attr("id",r+"_"+e+"-extensionStart-margin").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd-margin").attr("class","marker extension "+e).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),U=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart-margin").attr("class","marker composition "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd-margin").attr("class","marker composition "+e).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Y=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart-margin").attr("class","marker aggregation "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd-margin").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),G=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart-margin").attr("class","marker dependency "+e).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd-margin").attr("class","marker dependency "+e).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),X=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart-margin").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd-margin").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),V=(0,c.K)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),Z=(0,c.K)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),Q=(0,c.K)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossEnd-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),t.append("marker").attr("id",r+"_"+e+"-crossStart-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),J=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),tt=(0,c.K)((t,e,r)=>{const i=(0,l.zj)(),{themeVariables:o}=i,{transitionColor:n}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${n}`)},"barbNeo"),et=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),rt=(0,c.K)((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const o=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),it=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),ot=(0,c.K)((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const o=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),nt=(0,c.K)((t,e,r)=>{const i=(0,l.zj)(),{themeVariables:o}=i,{strokeWidth:n}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${n}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${n}`)},"only_one_neo"),at=(0,c.K)((t,e,r)=>{const i=(0,l.zj)(),{themeVariables:o}=i,{strokeWidth:n,mainBkg:a}=o,s=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");s.append("circle").attr("fill",a??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${n}`).attr("r",6),s.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${n}`);const h=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");h.append("circle").attr("fill",a??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${n}`).attr("r",6),h.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${n}`)},"zero_or_one_neo"),st=(0,c.K)((t,e,r)=>{const i=(0,l.zj)(),{themeVariables:o}=i,{strokeWidth:n}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${n}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${n}`)},"one_or_more_neo"),lt=(0,c.K)((t,e,r)=>{const i=(0,l.zj)(),{themeVariables:o}=i,{strokeWidth:n,mainBkg:a}=o,s=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");s.append("circle").attr("fill",a??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${n}`),s.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${n}`);const h=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");h.append("circle").attr("fill",a??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${n}`),h.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${n}`)},"zero_or_more_neo"),ht=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20")},"requirement_arrow"),ct=(0,c.K)((t,e,r)=>{const i=(0,l.zj)(),{themeVariables:o}=i,{strokeWidth:n}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${n}`).attr("viewBox","0 0 25 20").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20").attr("stroke-linejoin","miter")},"requirement_arrow_neo"),dt={extension:H,composition:U,aggregation:Y,dependency:G,lollipop:X,point:V,circle:Z,cross:Q,barb:J,barbNeo:tt,only_one:et,zero_or_one:rt,one_or_more:it,zero_or_more:ot,only_one_neo:nt,zero_or_one_neo:at,one_or_more_neo:st,zero_or_more_neo:lt,requirement_arrow:ht,requirement_contains:(0,c.K)((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),requirement_arrow_neo:ct,requirement_contains_neo:(0,c.K)((t,e,r)=>{const i=(0,l.zj)(),{themeVariables:o}=i,{strokeWidth:n}=o,a=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${n}`)},"requirement_contains_neo")},ut=W},79515(t,e,r){"use strict";r.d(e,{DA:()=>v,FA:()=>S,Zk:()=>f,aP:()=>qe,lC:()=>m,nM:()=>T,nq:()=>Ke});var i=r(44505),o=r(72379),n=r(58962),a=r(16459),s=r(76385),l=r(31293),h=r(86827),c=r(70451),d=r(52274);async function u(t){const e=t.getElementsByTagName("img");if(!e||0===e.length)return;const r=!p(t);await Promise.all([...e].map(t=>new Promise(e=>{function i(){if(t.style.display="flex",t.style.flexDirection="column",r){const e=(0,s.D7)().fontSize?(0,s.D7)().fontSize:window.getComputedStyle(document.body).fontSize,r=5,[i=s.UI.fontSize]=(0,a.I5)(e),o=i*r+"px";t.style.minWidth=o,t.style.maxWidth=o}else t.style.width="100%";e(t)}(0,h.K)(i,"setupImage"),setTimeout(()=>{t.complete&&i()}),t.addEventListener("error",i),t.addEventListener("load",i)})))}function p(t){if(3===t.nodeType)return""!==t.textContent?.trim();if(1!==t.nodeType)return!1;return"img"!==t.tagName.toLowerCase()&&[...t.childNodes].some(p)}(0,h.K)(u,"configureLabelImages"),(0,h.K)(p,"hasTextBesidesImages");var g=(0,h.K)(async(t,e,r)=>{const i=(0,s.D7)(),n=t.insert("g").attr("class",r??"node default").attr("id",e.domId||e.id),l=n.insert("g").attr("class","label").attr("style",(0,a.KL)(e.labelStyle)),h=[{text:"string"==typeof e.label?e.label:e.label?.[0]??"",cssClass:"c4-name"},{text:e.stereotype,cssClass:"c4-type"},...(e.description??[]).map(t=>({text:t,cssClass:"c4-descr"}))].filter(t=>t.text),d=e.width?Math.max(e.width-2*(e.padding??0),32):(0,s.D7)().flowchart?.wrappingWidth??200,u=i.wrap?d:Number.POSITIVE_INFINITY,p=await Promise.all(h.map(async t=>{const r=l.append("g").attr("class",t.cssClass),n=await(0,o.GZ)(r,(0,s.jZ)((0,a.Sm)(t.text??""),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:u,style:e.labelStyle},i);return(0,c.Ltv)(n).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),(0,c.Ltv)(n).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:r,box:r.node().getBBox()}})),g=Math.max(...p.map(({box:t})=>t.width),0);let f=0;for(const{el:o,box:a}of p)o.attr("transform",`translate(${g/2-a.x-a.width/2}, ${f-a.y})`),f+=a.height+3;const y=p.length>0?f-3:0;l.insert("rect",":first-child"),l.attr("transform",`translate(${-g/2}, ${-y/2})`);return{shapeSvg:n,bbox:l.node().getBBox(),halfPadding:(e.padding??0)/2,label:l}},"c4LabelHelper"),f=(0,h.K)(async(t,e,r)=>{if(void 0!==e.stereotype)return g(t,e,r);let i;const n=e.useHtmlLabels||(0,s._3)((0,s.D7)()?.htmlLabels);i=r||"node default";const l=t.insert("g").attr("class",i).attr("id",e.domId||e.id),h=l.insert("g").attr("class","label").attr("style",(0,a.KL)(e.labelStyle));let d;d=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];const p=!!e.icon||!!e.img,f="markdown"===e.labelType,y=await(0,o.GZ)(h,(0,s.jZ)((0,a.Sm)(d),(0,s.D7)()),{useHtmlLabels:n,width:e.width||e.wrappingWidth||(0,s.D7)().flowchart?.wrappingWidth,classes:f?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:p,markdown:f},(0,s.D7)()),m=(e?.padding??0)/2;let x;if(n){const t=y.children[0],e=(0,c.Ltv)(y);await u(t),x=await o.lT.measure(()=>t.getBoundingClientRect()),e.attr("width",x.width),e.attr("height",x.height)}else x=await o.lT.measure(()=>y.getBBox());return n?h.attr("transform","translate("+-x.width/2+", "+-x.height/2+")"):h.attr("transform","translate(0, "+-x.height/2+")"),e.centerLabel&&h.attr("transform","translate("+-x.width/2+", "+-x.height/2+")"),h.insert("rect",":first-child"),{shapeSvg:l,bbox:x,halfPadding:m,label:h}},"labelHelper"),y=(0,h.K)(async(t,e,r)=>{const i=r.useHtmlLabels??(0,s.E)((0,s.D7)()),n=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),l=await(0,o.GZ)(n,(0,s.jZ)((0,a.Sm)(e),(0,s.D7)()),{useHtmlLabels:i,width:r.width||(0,s.D7)()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),h=r.padding/2;let d;if((0,s.E)((0,s.D7)())){const t=l.children[0],e=(0,c.Ltv)(l);d=await o.lT.measure(()=>t.getBoundingClientRect()),e.attr("width",d.width),e.attr("height",d.height)}else d=await o.lT.measure(()=>l.getBBox());return i?n.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):n.attr("transform","translate(0, "+-d.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:t,bbox:d,halfPadding:h,label:n}},"insertLabel"),m=(0,h.K)((t,e,r)=>{if(r)return t.width=r.width,void(t.height=r.height);const i=e.node().getBBox();t.width=i.width,t.height=i.height},"updateNodeBounds"),x=(0,h.K)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function C(t){const e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function b(t,e,r,i,o,n){const a=[],s=r-t,l=i-e,h=s/n,c=2*Math.PI/h,d=e+l/2;for(let u=0;u<=50;u++){const e=t+u/50*s,r=d+o*Math.sin(c*(e-t));a.push({x:e,y:r})}return a}function k(t,e,r,i,o,n){const a=[],s=o*Math.PI/180,l=(n*Math.PI/180-s)/(i-1);for(let h=0;h"path"===t.tagName),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=e.map(t=>t.getAttribute("d")).filter(t=>null!==t).join(" ");r.setAttribute("d",i);const o=e.find(t=>"none"!==t.getAttribute("fill")),n=e.find(t=>"none"!==t.getAttribute("stroke")),a=(0,h.K)((t,e)=>t?.getAttribute(e)??void 0,"getAttr");if(o){const t={fill:a(o,"fill"),"fill-opacity":a(o,"fill-opacity")??"1"};Object.entries(t).forEach(([t,e])=>{e&&r.setAttribute(t,e)})}if(n){const t={stroke:a(n,"stroke"),"stroke-width":a(n,"stroke-width")??"1","stroke-opacity":a(n,"stroke-opacity")??"1"};Object.entries(t).forEach(([t,e])=>{e&&r.setAttribute(t,e)})}const s=document.createElementNS("http://www.w3.org/2000/svg","g");return s.appendChild(r),s}(0,h.K)(C,"createPathFromPoints"),(0,h.K)(b,"generateFullSineWavePoints"),(0,h.K)(k,"generateCirclePoints"),(0,h.K)(w,"mergePaths");var T=(0,h.K)((t,e)=>{var r,i,o=t.x,n=t.y,a=e.x-o,s=e.y-n,l=t.width/2,h=t.height/2;return Math.abs(s)*l>Math.abs(a)*h?(s<0&&(h=-h),r=0===s?0:h*a/s,i=h):(a<0&&(l=-l),r=l,i=0===a?0:l*s/a),{x:o+r,y:n+i}},"intersectRect"),S=(0,h.K)((t,e,r,i,o)=>["M",t+o,e,"H",t+r-o,"A",o,o,0,0,1,t+r,e+o,"V",e+i-o,"A",o,o,0,0,1,t+r-o,e+i,"H",t+o,"A",o,o,0,0,1,t,e+i-o,"V",e+o,"A",o,o,0,0,1,t+o,e,"Z"].join(" "),"createRoundedRectPathD"),v=(0,h.K)(async(t,e,r,i=!1,n=!1)=>{let a=e||"";"object"==typeof a&&(a=a[0]);const l=(0,s.D7)(),h=(0,s.E)(l);return await(0,o.GZ)(t,a,{style:r,isTitle:i,useHtmlLabels:h,markdown:!1,isNode:n,width:Number.POSITIVE_INFINITY},l)},"createLabel");function B(t,e){return t.intersect(e)}(0,h.K)(B,"intersectNode");var _=B;function A(t,e,r,i){var o=t.x,n=t.y,a=o-i.x,s=n-i.y,l=Math.sqrt(e*e*s*s+r*r*a*a),h=Math.abs(e*r*a/l);i.x0}(0,h.K)(E,"intersectLine"),(0,h.K)($,"sameSign");var O=E;function D(t,e,r){let i=t.x,o=t.y,n=[],a=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){a=Math.min(a,t.x),s=Math.min(s,t.y)}):(a=Math.min(a,e.x),s=Math.min(s,e.y));let l=i-t.width/2-a,h=o-t.height/2-s;for(let c=0;c1&&n.sort(function(t,e){let i=t.x-r.x,o=t.y-r.y,n=Math.sqrt(i*i+o*o),a=e.x-r.x,s=e.y-r.y,l=Math.sqrt(a*a+s*s);return np,":first-child");return g.attr("class","anchor").attr("style",(0,a.KL)(h)),m(e,g),e.intersect=function(t){return l.R.info("Circle intersect",e,1,t),I.circle(e,1,t)},s}function q(t,e,r,i,o,n,a){const s=(t+r)/2,l=(e+i)/2,h=Math.atan2(i-e,r-t),c=(r-t)/2/o,d=(i-e)/2/n,u=Math.sqrt(c**2+d**2);if(u>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-u**2),g=s+p*n*Math.sin(h)*(a?-1:1),f=l-p*o*Math.cos(h)*(a?-1:1),y=Math.atan2((e-f)/n,(t-g)/o);let m=Math.atan2((i-f)/n,(r-g)/o)-y;a&&m<0&&(m+=2*Math.PI),!a&&m>0&&(m-=2*Math.PI);const x=[];for(let C=0;C<20;C++){const t=y+C/19*m,e=g+o*Math.cos(t),r=f+n*Math.sin(t);x.push({x:e,y:r})}return x}function R(t,e,r){const[i,o]=[e,r].sort((t,e)=>e-t);return o*(1-Math.sqrt(1-(t/i/2)**2))}async function P(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?16:n,s="neo"===e.look?12:n,l=(0,h.K)(t=>t+s,"calcTotalHeight"),c=(0,h.K)(t=>{const e=t/2;return[e/(2.5+t/50),e]},"calcEllipseRadius"),{shapeSvg:u,bbox:p}=await f(t,e,x(e)),g=l(e?.height?e?.height:p.height),[y,b]=c(g),k=R(g,y,b),w=(e?.width?e?.width:p.width)+2*a+k-k,T=g,{cssStyles:S}=e,v=[{x:w/2,y:-T/2},{x:-w/2,y:-T/2},...q(-w/2,-T/2,-w/2,T/2,y,b,!1),{x:w/2,y:T/2},...q(w/2,T/2,w/2,-T/2,y,b,!0)],B=d.A.svg(u),_=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const A=C(v),L=B.path(A,_),F=u.insert(()=>L,":first-child");return F.attr("class","basic label-container outer-path"),S&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",S),o&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",o),F.attr("transform",`translate(${y/2}, 0)`),m(e,F),e.intersect=function(t){return I.polygon(e,v,t)},u}async function z(t,e,{config:{themeVariables:r}}){const{labelStyles:o,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=o;const{shapeSvg:a,bbox:s,label:l}=await f(t,e,x(e)),c=r?.nodeBorder??r?.lineColor??"currentColor",u=e.padding??12,p=Math.max(s.width+2*u,e.width??0,80),g=Math.max(Math.min(.08*p,12),5),y=Math.max(s.height+2*u+g,e.height??0),C=-y/2+g,b=y/2,k=.72*p,w=[`M${-p/2},${C}`,`L${-k/2},${b}`,`A${k/2},${g} 0 0 0 ${k/2},${b}`,`L${p/2},${C}`,`A${p/2},${g} 0 0 0 ${-p/2},${C}`,"Z"].join(" "),{cssStyles:T}=e,S=a.insert("g",":first-child").attr("class","basic label-container");if("handDrawn"===e.look){const t=d.A.svg(a).path(w,(0,i.Fr)(e,{}));S.node()?.appendChild(t),T&&S.attr("style",T)}else S.append("path").attr("d",w).attr("style",n);S.append("ellipse").attr("cx",0).attr("cy",C).attr("rx",p/2).attr("ry",g).attr("style",`fill:none;stroke:${c};stroke-width:1px`),m(e,S);const v=C+(b-C)/2;l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${v-s.height/2-(s.y-(s.top??0))})`);const B=(0,h.K)((t,e,r)=>Array.from({length:13},(i,o)=>{const n=Math.PI-o*Math.PI/12;return{x:t*Math.cos(n),y:e+r*g*Math.sin(n)}}),"arc"),_=[...B(p/2,C,-1),...B(k/2,b,1).reverse()];return e.intersect=function(t){return I.polygon(e,_,t)},a}(0,h.K)(K,"anchor"),(0,h.K)(q,"generateArcPoints"),(0,h.K)(R,"calculateArcSagitta"),(0,h.K)(P,"bowTieRect"),(0,h.K)(z,"bucket");async function N(t,e){const{themeVariables:r}=(0,s.D7)(),o=r.clusterBkg,n=r.clusterBorder,{nodeStyles:l}=(0,i.GX)(e),{shapeSvg:h,bbox:c}=await f(t,e,x(e)),u=e.padding??8,p=c.height,g=Math.max(c.width+2*u,80,e?.width??0),y=Math.max(p+8+20+2*u,e?.height??0),C=-g/2,b=-y/2,k=h.select(".label");if(k){e.useHtmlLabels??(0,s.E)((0,s.D7)())?k.attr("transform",`translate(${-c.width/2}, ${-c.height/2-14})`):k.attr("transform",`translate(0, ${-c.height/2-14})`)}let w;if("handDrawn"===e.look){const t=d.A.svg(h),r=(0,i.Fr)(e,{fill:o,stroke:n,fillStyle:"solid"}),s=t.path(S(C,b,g,y,8),r);w=h.insert(()=>s,":first-child"),w.attr("class","basic label-container collapsed-group").attr("style",(0,a.KL)(e.cssStyles))}else w=h.insert("rect",":first-child"),w.attr("class","basic label-container collapsed-group").attr("style",l).attr("rx",8).attr("ry",8).attr("x",C).attr("y",b).attr("width",g).attr("height",y).attr("fill",o).attr("stroke",n);const T=b+u+p+8;h.append("line").attr("class","collapsed-separator").attr("x1",C+8).attr("y1",T).attr("x2",C+g-8).attr("y2",T).attr("stroke",n).attr("stroke-dasharray","3, 3");const v=T+10;for(let i=-1;i<=1;i++)h.append("circle").attr("class","collapsed-indicator").attr("cx",10*i).attr("cy",v).attr("r",2.5).attr("fill",n);return m(e,w),e.calcIntersect=function(t,e){return I.rect(t,e)},e.intersect=function(t){return I.rect(e,t)},h}function j(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}(0,h.K)(N,"collapsedGroup"),(0,h.K)(j,"insertPolygonShape");var W=["right","left","up","down"],H="point",U=(0,h.K)(t=>{const e=new Set;for(const r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r)}return e},"expandAndDeduplicateDirections"),Y=(0,h.K)(t=>W.filter(e=>t.has(e)).join("|")||H,"getDirectionKey"),G={"right|left|up|down":(0,h.K)(({height:t,midpoint:e,padding:r,width:i})=>[{x:0,y:0},{x:e,y:0},{x:i/2,y:2*r},{x:i-e,y:0},{x:i,y:0},{x:i,y:-t/3},{x:i+2*r,y:-t/2},{x:i,y:-2*t/3},{x:i,y:-t},{x:i-e,y:-t},{x:i/2,y:-t-2*r},{x:e,y:-t},{x:0,y:-t},{x:0,y:-2*t/3},{x:-2*r,y:-t/2},{x:0,y:-t/3}],"right|left|up|down"),"right|left|up":(0,h.K)(({height:t,midpoint:e,width:r})=>[{x:e,y:0},{x:r-e,y:0},{x:r,y:-t/2},{x:r-e,y:-t},{x:e,y:-t},{x:0,y:-t/2}],"right|left|up"),"right|left|down":(0,h.K)(({height:t,midpoint:e,width:r})=>[{x:0,y:0},{x:e,y:-t},{x:r-e,y:-t},{x:r,y:0}],"right|left|down"),"right|up|down":(0,h.K)(({height:t,midpoint:e,width:r})=>[{x:0,y:0},{x:r,y:-e},{x:r,y:-t+e},{x:0,y:-t}],"right|up|down"),"left|up|down":(0,h.K)(({height:t,midpoint:e,width:r})=>[{x:r,y:0},{x:0,y:-e},{x:0,y:-t+e},{x:r,y:-t}],"left|up|down"),"right|left":(0,h.K)(({height:t,midpoint:e,padding:r,width:i})=>[{x:e,y:0},{x:e,y:-r},{x:i-e,y:-r},{x:i-e,y:0},{x:i,y:-t/2},{x:i-e,y:-t},{x:i-e,y:-t+r},{x:e,y:-t+r},{x:e,y:-t},{x:0,y:-t/2}],"right|left"),"up|down":(0,h.K)(({height:t,midpoint:e,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:e,y:-r},{x:e,y:-t+r},{x:0,y:-t+r},{x:i/2,y:-t},{x:i,y:-t+r},{x:i-e,y:-t+r},{x:i-e,y:-r},{x:i,y:-r}],"up|down"),"right|up":(0,h.K)(({height:t,midpoint:e,width:r})=>[{x:0,y:0},{x:r,y:-e},{x:0,y:-t}],"right|up"),"right|down":(0,h.K)(({height:t,width:e})=>[{x:0,y:0},{x:e,y:0},{x:0,y:-t}],"right|down"),"left|up":(0,h.K)(({height:t,midpoint:e,width:r})=>[{x:r,y:0},{x:0,y:-e},{x:r,y:-t}],"left|up"),"left|down":(0,h.K)(({height:t,width:e})=>[{x:e,y:0},{x:0,y:0},{x:e,y:-t}],"left|down"),right:(0,h.K)(({height:t,midpoint:e,padding:r,width:i})=>[{x:e,y:-r},{x:e,y:-r},{x:i-e,y:-r},{x:i-e,y:0},{x:i,y:-t/2},{x:i-e,y:-t},{x:i-e,y:-t+r},{x:e,y:-t+r},{x:e,y:-t+r}],"right"),left:(0,h.K)(({height:t,midpoint:e,padding:r,width:i})=>[{x:e,y:0},{x:e,y:-r},{x:i-e,y:-r},{x:i-e,y:-t+r},{x:e,y:-t+r},{x:e,y:-t},{x:0,y:-t/2}],"left"),up:(0,h.K)(({height:t,midpoint:e,padding:r,width:i})=>[{x:e,y:-r},{x:e,y:-t+r},{x:0,y:-t+r},{x:i/2,y:-t},{x:i,y:-t+r},{x:i-e,y:-t+r},{x:i-e,y:-r}],"up"),down:(0,h.K)(({height:t,midpoint:e,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:e,y:-r},{x:e,y:-t+r},{x:i-e,y:-t+r},{x:i-e,y:-r},{x:i,y:-r}],"down"),[H]:()=>[{x:0,y:0}]},X=(0,h.K)((t,e,r,i)=>{const o=U(t),n=(r.padding??0)/2,a=e.height+4*n,s=a/2,l=i??e.width+2*s+2*n,h=Y(o);return(G[h]??G[H])({height:a,midpoint:s,padding:n,width:l})},"getArrowPoints");async function V(t,e){const r=e,{shapeSvg:i,bbox:o}=await f(t,r,x(r)),n=r.padding??0,a=o.height+2*n,s=a/2,l=o.width+2*s+n,h=r.width??0,c=r.positioned&&(r.widthInColumns??1)>1&&h>l?h:l,d=X(r.directions??[],o,r,c),u=j(i,c,a,d);return u.attr("style",r.style??null),m(r,u),r.intersect=function(t){return I.polygon(r,d,t)},i}async function Z(t,e,{config:{themeVariables:r}}){const{labelStyles:o,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=o;const{shapeSvg:a,bbox:s,label:l}=await f(t,e,x(e)),h=r?.nodeBorder??r?.lineColor??"currentColor",c=e.padding??12,u=18,p=Math.max(s.width+2*c,e.width??0,90),g=Math.max(s.height+2*c+u,e.height??0),y=-g/2,{cssStyles:C}=e,b=a.insert("g",":first-child").attr("class","basic label-container");if("handDrawn"===e.look){const t=d.A.svg(a).path(S(-p/2,y,p,g,12),(0,i.Fr)(e,{}));b.node()?.appendChild(t),C&&b.attr("style",C)}else b.append("rect").attr("x",-p/2).attr("y",y).attr("width",p).attr("height",g).attr("rx",12).attr("ry",12).attr("style",n);b.append("line").attr("x1",-p/2).attr("y1",y+u).attr("x2",p/2).attr("y2",y+u).attr("style",`stroke:${h};stroke-width:1px`);for(let i=0;i<3;i++)b.append("circle").attr("cx",-p/2+12+9*i).attr("cy",y+9).attr("r",2.5).attr("style",`fill:${h};stroke:none`);b.append("rect").attr("class","browser-address-bar").attr("x",-p/2+44).attr("y",y+4).attr("width",Math.max(p-56,10)).attr("height",10).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${h};stroke-width:1px;opacity:0.6`),m(e,b);const k=y+u+(g-u)/2;return l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${k-s.height/2-(s.y-(s.top??0))})`),e.intersect=function(t){return I.rect(e,t)},a}(0,h.K)(V,"block_arrow"),(0,h.K)(Z,"browser");async function Q(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?28:n,s="neo"===e.look?24:n,{shapeSvg:l,bbox:h}=await f(t,e,x(e)),c=(e?.width??h.width)+("neo"===e.look?2*a:a+12),u=(e?.height??h.height)+("neo"===e.look?2*s:s),p=-u,g=[{x:12,y:p},{x:c,y:p},{x:c,y:0},{x:0,y:0},{x:0,y:p+12},{x:12,y:p}];let y;const{cssStyles:b}=e;if("handDrawn"===e.look){const t=d.A.svg(l),r=(0,i.Fr)(e,{}),o=C(g),n=t.path(o,r);y=l.insert(()=>n,":first-child").attr("transform",`translate(${-c/2}, ${u/2})`),b&&y.attr("style",b)}else y=j(l,c,u,g);return o&&y.attr("style",o),m(e,y),e.intersect=function(t){return I.polygon(e,g,t)},l}function J(t,e){const{nodeStyles:r}=(0,i.GX)(e);e.label="";const o=t.insert("g").attr("class",x(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,a=Math.max(28,e.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],l=d.A.svg(o),h=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");const c=C(s),u=l.path(c,h),p=o.insert(()=>u,":first-child");return n&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",n),r&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return I.polygon(e,s,t)},o}async function tt(t,e,r){const{labelStyles:o,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=o;const{shapeSvg:s,bbox:h,halfPadding:c}=await f(t,e,x(e)),u=r?.padding??c,p="neo"===e.look?h.width/2+32:h.width/2+u;let g;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=d.A.svg(s),r=(0,i.Fr)(e,{}),o=t.circle(0,0,2*p,r);g=s.insert(()=>o,":first-child"),g.attr("class","basic label-container").attr("style",(0,a.KL)(y))}else g=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",p).attr("cx",0).attr("cy",0);return m(e,g),e.calcIntersect=function(t,e){const r=t.width/2;return I.circle(t,r,e)},e.intersect=function(t){return l.R.info("Circle intersect",e,p,t),I.circle(e,p,t)},s}async function et(t,e){const r=e,i=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:o,bbox:n,halfPadding:a}=await f(t,r,i),s=o.insert("rect",":first-child"),l=r.padding??0,h=r.positioned?r.width??0:n.width+l,c=r.positioned?r.height??0:n.height+l,d=r.positioned?-h/2:-n.width/2-a,u=r.positioned?-c/2:-n.height/2-a;return s.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",d).attr("y",u).attr("width",h).attr("height",c),m(r,s),r.intersect=function(t){return I.rect(r,t)},o}async function rt(t,e,{config:{themeVariables:r}}){const{labelStyles:o,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=o;const{shapeSvg:a,bbox:s,label:l}=await f(t,e,x(e)),h=r?.nodeBorder??r?.lineColor??"currentColor",c=e.padding??12,u=Math.max(s.width+2*c,e.width??0,90),p=Math.max(s.height+2*c+20,e.height??0),g=-p/2,{cssStyles:y}=e,C=a.insert("g",":first-child").attr("class","basic label-container");if("handDrawn"===e.look){const t=d.A.svg(a).path(S(-u/2,g,u,p,12),(0,i.Fr)(e,{}));C.node()?.appendChild(t),y&&C.attr("style",y)}else C.append("rect").attr("x",-u/2).attr("y",g).attr("width",u).attr("height",p).attr("rx",12).attr("ry",12).attr("style",n);C.append("text").attr("x",-u/2+12).attr("y",g+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${h}`).text(">_"),m(e,C);const b=g+20+(p-20)/2;return l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${b-s.height/2-(s.y-(s.top??0))})`),e.intersect=function(t){return I.rect(e,t)},a}function it(t){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=2*t;return`M ${-i/2*e},${i/2*r} L ${i/2*e},${-i/2*r}\n M ${i/2*e},${i/2*r} L ${-i/2*e},${-i/2*r}`}function ot(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r,e.label="";const n=t.insert("g").attr("class",x(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:s}=e,h=d.A.svg(n),c=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");const u=h.circle(0,0,2*a,c),p=it(a),g=h.path(p,c),f=n.insert(()=>u,":first-child");return f.insert(()=>g),f.attr("class","outer-path"),s&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",s),o&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",o),m(e,f),e.intersect=function(t){l.R.info("crossedCircle intersect",e,{radius:a,point:t});return I.circle(e,a,t)},n}function nt(t,e,r,i=100,o=0,n=180){const a=[],s=o*Math.PI/180,l=(n*Math.PI/180-s)/(i-1);for(let h=0;hB,":first-child").attr("stroke-opacity",0),_.insert(()=>S,":first-child"),_.attr("class","text"),g&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",g),o&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",o),_.attr("transform",`translate(${p}, 0)`),s.attr("transform",`translate(${-c/2+p-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),m(e,_),e.intersect=function(t){return I.polygon(e,b,t)},n}function st(t,e,r,i=100,o=0,n=180){const a=[],s=o*Math.PI/180,l=(n*Math.PI/180-s)/(i-1);for(let h=0;hB,":first-child").attr("stroke-opacity",0),_.insert(()=>S,":first-child"),_.attr("class","text"),g&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",g),o&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",o),_.attr("transform",`translate(${-p}, 0)`),s.attr("transform",`translate(${-c/2+(e.padding??0)/2-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),m(e,_),e.intersect=function(t){return I.polygon(e,b,t)},n}function ht(t,e,r,i=100,o=0,n=180){const a=[],s=o*Math.PI/180,l=(n*Math.PI/180-s)/(i-1);for(let h=0;hL,":first-child").attr("stroke-opacity",0),F.insert(()=>v,":first-child"),F.insert(()=>_,":first-child"),F.attr("class","text"),g&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",g),o&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",o),F.attr("transform",`translate(${p-p/4}, 0)`),s.attr("transform",`translate(${-c/2+(e.padding??0)/2-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),m(e,F),e.intersect=function(t){return I.polygon(e,k,t)},n}async function dt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?16:n,s="neo"===e.look?12:n,{shapeSvg:l,bbox:h}=await f(t,e,x(e)),c=Math.max(20,1.25*(h.width+2*a),e?.width??0),u=Math.max(5,h.height+2*s,e?.height??0),p=u/2,{cssStyles:g}=e,y=d.A.svg(l),b=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const w=c-p,T=u/4,S=[{x:w,y:0},{x:T,y:0},{x:0,y:u/2},{x:T,y:u},{x:w,y:u},...k(-w,-u/2,p,50,270,90)],v=C(S),B=y.path(v,b),_=l.insert(()=>B,":first-child");return _.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",g),o&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",o),_.attr("transform",`translate(${-c/2}, ${-u/2})`),m(e,_),e.intersect=function(t){return I.polygon(e,S,t)},l}async function ut(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await f(t,e,x(e)),l=e.padding??20,h=Math.max(a.width+2*l,e.width??0,100),c=Math.min(Math.max(.23*h,16),56),u=.27*c,p=Math.max(a.height+2*l,e.height?e.height-(2*c-u):0),g=Math.min(.177*h,.45*p),y=p+2*c-u,C=-y/2,b=C+2*c-u,w=n.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:T}=e;if("handDrawn"===e.look){const t=d.A.svg(n),r=(0,i.Fr)(e,{}),o=t.path(S(-h/2,b,h,p,g),r),a=t.circle(0,C+c,2*c,r);w.insert(()=>a,":first-child"),w.insert(()=>o,":first-child"),T&&w.attr("style",T)}else w.append("rect").attr("x",-h/2).attr("y",b).attr("width",h).attr("height",p).attr("rx",g).attr("ry",g).attr("style",o),w.append("circle").attr("cx",0).attr("cy",C+c).attr("r",c).attr("style",o);m(e,w);const v=b+p/2;s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${v-a.height/2-(a.y-(a.top??0))})`);const B=C+c,_=180*Math.asin(Math.min(1,(b-B)/c))/Math.PI,A=[...k(0,-B,c,24,180+_,-_),...k(-(-h/2+g),-(b+g),g,12,90,0),...k(-(-h/2+g),-(y/2-g),g,12,360,270),...k(-(h/2-g),-(y/2-g),g,12,270,180),...k(-(h/2-g),-(b+g),g,12,180,90)];return e.intersect=function(t){return I.polygon(e,A,t)},n}(0,h.K)(Q,"card"),(0,h.K)(J,"choice"),(0,h.K)(tt,"circle"),(0,h.K)(et,"composite"),(0,h.K)(rt,"consoleWindow"),(0,h.K)(it,"createLine"),(0,h.K)(ot,"crossedCircle"),(0,h.K)(nt,"generateCirclePoints"),(0,h.K)(at,"curlyBraceLeft"),(0,h.K)(st,"generateCirclePoints"),(0,h.K)(lt,"curlyBraceRight"),(0,h.K)(ht,"generateCirclePoints"),(0,h.K)(ct,"curlyBraces"),(0,h.K)(dt,"curvedTrapezoid"),(0,h.K)(ut,"person");var pt=(0,h.K)((t,e,r,i,o,n)=>[`M${t},${e+n}`,`a${o},${n} 0,0,0 ${r},0`,`a${o},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${n} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createCylinderPathD"),gt=(0,h.K)((t,e,r,i,o,n)=>[`M${t},${e+n}`,`M${t+r},${e+n}`,`a${o},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${n} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createOuterCylinderPathD"),ft=(0,h.K)((t,e,r,i,o,n)=>[`M${t-r/2},${-i/2}`,`a${o},${n} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function yt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,s="neo"===e.look?24:n,l="neo"===e.look?24:n,h=e.width??0;if(e.width&&(e.width=e.width-l,e.width<8&&(e.width=8)),e.height){const t=h/2/(2.5+h/50);e.height=e.height-s-3*t,e.height<8&&(e.height=8)}const{shapeSvg:c,bbox:u,label:p}=await f(t,e,x(e)),g=Math.max(e.width??0,u.width)+l,y=g/2,C=y/(2.5+g/50),b=Math.max(e.height??0,u.height)+s+C;let k;const{cssStyles:w}=e;if("handDrawn"===e.look){const t=d.A.svg(c),r=gt(0,0,g,b,y,C),o=ft(0,C,g,b,y,C),n=(0,i.Fr)(e,{}),a=t.path(r,n),s=t.path(o,(0,i.Fr)(e,{fill:"none"}));k=c.insert(()=>s,":first-child"),k=c.insert(()=>a,":first-child"),k.attr("class","basic label-container"),w&&k.attr("style",w)}else{const t=pt(0,0,g,b,y,C);k=c.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,a.KL)(w)).attr("style",o)}return k.attr("label-offset-y",C),k.attr("transform",`translate(${-g/2}, ${-(b/2+C)})`),m(e,k),p.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))}, ${-u.height/2+(e.padding??0)/1.5-(u.y-(u.top??0))})`),e.intersect=function(t){const r=I.rect(e,t),i=r.x-(e.x??0);if(0!=y&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-C)){let o=C*C*(1-i*i/(y*y));o>0&&(o=Math.sqrt(o)),o=C-o,t.y-(e.y??0)>0&&(o=-o),r.y+=o}return r},c}async function mt(t,e,r){const{labelStyles:o,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=o;const{shapeSvg:s,bbox:l}=await f(t,e,x(e)),h=Math.max(l.width+2*r.labelPaddingX,e?.width||0),c=Math.max(l.height+2*r.labelPaddingY,e?.height||0),u=-h/2,p=-c/2;let g,{rx:y,ry:C}=e;const{cssStyles:b}=e;if(r?.rx&&r.ry&&(y=r.rx,C=r.ry),"handDrawn"===e.look){const t=d.A.svg(s),r=(0,i.Fr)(e,{}),o=y||C?t.path(S(u,p,h,c,y||0),r):t.rectangle(u,p,h,c,r);g=s.insert(()=>o,":first-child"),g.attr("class","basic label-container").attr("style",(0,a.KL)(b))}else g=s.insert("rect",":first-child"),g.attr("class","basic label-container").attr("style",n).attr("rx",(0,a.KL)(y)).attr("ry",(0,a.KL)(C)).attr("x",u).attr("y",p).attr("width",h).attr("height",c);return m(e,g,"handDrawn"===e.look?void 0:{width:h,height:c}),e.calcIntersect=function(t,e){return I.rect(t,e)},e.intersect=function(t){return I.rect(e,t)},s}async function xt(t,e){const{cssClasses:r,labelPaddingX:o,labelPaddingY:n,padding:a,width:s,height:l}=e,h={rx:0,ry:0,classes:r??"",labelPaddingX:o??2*(a??0),labelPaddingY:n??a??0},c=await mt(t,e,h);if("handDrawn"===e.look){const t=d.A.svg(c),r=(0,i.Fr)(e,{}),o=c.select(".basic.label-container > path:nth-child(2)"),n=o.node();if(!n)return c;let a=null;return n instanceof SVGGraphicsElement?(a=n.getBBox(),c.insert(()=>t.line(a.x,a.y,a.x+a.width,a.y,r),".basic.label-container g.label"),c.insert(()=>t.line(a.x,a.y+a.height,a.x+a.width,a.y+a.height,r),".basic.label-container g.label"),o.remove(),c):c}const u=c.select(".basic.label-container"),p=(Number(u.attr("width"))||s)??0,g=(Number(u.attr("height"))||l)??0;return p>0&&g>0&&u.attr("stroke-dasharray",`${p} ${g}`),c}async function Ct(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n="neo"===e.look?16:e.padding??0,a="neo"===e.look?16:e.padding??0,{shapeSvg:s,bbox:l,label:h}=await f(t,e,x(e)),c=l.width+n,u=l.height+a,p=.2*u,g=-c/2,y=-u/2-p/2,{cssStyles:C}=e,b=d.A.svg(s),k=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=[{x:g,y:y+p},{x:-g,y:y+p},{x:-g,y:-y},{x:g,y:-y},{x:g,y:y},{x:-g,y:y},{x:-g,y:y+p}],T=b.polygon(w.map(t=>[t.x,t.y]),k),S=s.insert(()=>T,":first-child");return S.attr("class","basic label-container outer-path"),C&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",C),o&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",o),h.attr("transform",`translate(${g+(e.padding??0)/2-(l.x-(l.left??0))}, ${y+p+(e.padding??0)/2-(l.y-(l.top??0))})`),m(e,S),e.intersect=function(t){return I.rect(e,t)},s}async function bt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e),n="neo"===e.look?12:5;e.labelStyle=r;const s=e.padding??0,h="neo"===e.look?16:s,{shapeSvg:c,bbox:u}=await f(t,e,x(e)),p=(e?.width?e?.width/2:u.width/2)+(h??0),g=p-n;let y;const{cssStyles:C}=e;if("handDrawn"===e.look){const t=d.A.svg(c),r=(0,i.Fr)(e,{roughness:.2,strokeWidth:2.5}),o=(0,i.Fr)(e,{roughness:.2,strokeWidth:1.5}),n=t.circle(0,0,2*p,r),s=t.circle(0,0,2*g,o);y=c.insert("g",":first-child"),y.attr("class",(0,a.KL)(e.cssClasses)).attr("style",(0,a.KL)(C)),y.node()?.appendChild(n),y.node()?.appendChild(s)}else{y=c.insert("g",":first-child");const t=y.insert("circle",":first-child"),e=y.insert("circle");y.attr("class","basic label-container").attr("style",o),t.attr("class","outer-circle").attr("style",o).attr("r",p).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",o).attr("r",g).attr("cx",0).attr("cy",0)}return m(e,y),e.intersect=function(t){return l.R.info("DoubleCircle intersect",e,p,t),I.circle(e,p,t)},c}function kt(t,e,{config:{themeVariables:r}}){const{labelStyles:o,nodeStyles:n}=(0,i.GX)(e);e.label="",e.labelStyle=o;const a=t.insert("g").attr("class",x(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,h=d.A.svg(a),{nodeBorder:c}=r,u=(0,i.Fr)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(u.roughness=0);const p=h.circle(0,0,14,u),g=a.insert(()=>p,":first-child");return g.selectAll("path").attr("style",`fill: ${c} !important;`),s&&s.length>0&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",s),n&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",n),m(e,g),e.intersect=function(t){l.R.info("filledCircle intersect",e,{radius:7,point:t});return I.circle(e,7,t)},a}(0,h.K)(yt,"cylinder"),(0,h.K)(mt,"drawRect"),(0,h.K)(xt,"datastore"),(0,h.K)(Ct,"dividedRectangle"),(0,h.K)(bt,"doublecircle"),(0,h.K)(kt,"filledCircle");async function wt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?2*n:n;(e.width||e.height)&&(e.height=e?.height??0,e.height<10&&(e.height=10),e.width=(e?.width??0)-a-a/2,e.width<10&&(e.width=10));const{shapeSvg:s,bbox:h,label:c}=await f(t,e,x(e)),u=(e?.width?e?.width:h.width)+(a??0),p=e?.height?e?.height:u+h.height,g=[{x:0,y:-p},{x:p,y:-p},{x:p/2,y:0}],{cssStyles:y}=e,b=d.A.svg(s),k=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=C(g),T=b.path(w,k),S=s.insert(()=>T,":first-child").attr("transform",`translate(${-p/2}, ${p/2})`).attr("class","outer-path");return y&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",y),o&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",o),e.width=u,e.height=p,m(e,S),c.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-p/2+(e.padding??0)/2+(h.y-(h.top??0))})`),e.intersect=function(t){return l.R.info("Triangle intersect",e,g,t),I.polygon(e,g,t)},s}async function Tt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await f(t,e,x(e)),l=e.padding??12,h=Math.max(a.width+2*l,e.width??0,90),c=a.height+2*l,u=Math.max(Math.min(.16*c,14),8),p=Math.max(c+u,e.height??0),g=p-u,y=Math.max(.38*h,28),C=-p/2,b=[{x:-h/2,y:C},{x:-h/2+y,y:C},{x:-h/2+y,y:C+u},{x:h/2,y:C+u},{x:h/2,y:p/2},{x:-h/2,y:p/2}],k=[`M${b[0].x},${b[0].y}`,...b.slice(1).map(t=>`L${t.x},${t.y}`),"Z"].join(" "),{cssStyles:w}=e;let T;if("handDrawn"===e.look){const t=d.A.svg(n).path(k,(0,i.Fr)(e,{}));T=n.insert(()=>t,":first-child").attr("class","basic label-container"),w&&T.attr("style",w)}else T=n.insert("path",":first-child").attr("d",k).attr("class","basic label-container").attr("style",o);"handDrawn"===e.look?m(e,T):m(e,T,{width:h,height:p});const S=C+u+g/2;return s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${S-a.height/2-(a.y-(a.top??0))})`),e.intersect=function(t){return I.polygon(e,b,t)},n}function St(t,e,{dir:r,config:{state:o,themeVariables:n}}){const{nodeStyles:a}=(0,i.GX)(e);e.label="";const s=t.insert("g").attr("class",x(e)).attr("id",e.domId??e.id),{cssStyles:l}=e;let h=Math.max(70,e?.width??0),c=Math.max(10,e?.height??0);"LR"===r&&(h=Math.max(10,e?.width??0),c=Math.max(70,e?.height??0));const u=-1*h/2,p=-1*c/2,g=d.A.svg(s),f=(0,i.Fr)(e,{stroke:n.lineColor,fill:n.lineColor});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=g.rectangle(u,p,h,c,f),C=s.insert(()=>y,":first-child");l&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",l),a&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",a),m(e,C);const b=o?.padding??0;return e.width&&e.height&&(e.width+=b/2||0,e.height+=b/2||0),e.intersect=function(t){return I.rect(e,t)},s}async function vt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n="neo"===e.look?16:e.padding??0,a="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.height=(e?.height??0)-2*a,e.height<10&&(e.height=10),e.width=(e?.width??0)-2*n,e.width<15&&(e.width=15));const{shapeSvg:s,bbox:h}=await f(t,e,x(e)),c=(e?.width?e?.width:Math.max(15,h.width))+2*n,u=(e?.height?e?.height:Math.max(10,h.height))+2*a,p=u/2,{cssStyles:g}=e,y=d.A.svg(s),b=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const w=[{x:-c/2,y:-u/2},{x:c/2-p,y:-u/2},...k(-c/2+p,0,p,50,90,270),{x:c/2-p,y:u/2},{x:-c/2,y:u/2}],T=C(w),S=y.path(T,b),v=s.insert(()=>S,":first-child");return v.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",g),o&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",o),m(e,v),e.intersect=function(t){l.R.info("Pill intersect",e,{radius:p,point:t});return I.polygon(e,w,t)},s}(0,h.K)(wt,"flippedTriangle"),(0,h.K)(Tt,"folder"),(0,h.K)(St,"forkJoin"),(0,h.K)(vt,"halfRoundedRectangle");var Bt=(0,h.K)((t,e,r,i,o)=>[`M${t+o},${e}`,`L${t+r-o},${e}`,`L${t+r},${e-i/2}`,`L${t+r-o},${e-i}`,`L${t+o},${e-i}`,`L${t},${e-i/2}`,"Z"].join(" "),"createHexagonPathD");async function _t(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e),n="neo"===e.look?3.5:4;e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?70:a,l="neo"===e.look?32:a;if(e.width||e.height){const t=(e.height??0)/n;e.width=(e?.width??0)-2*t-l,e.height=(e.height??0)-s}const{shapeSvg:h,bbox:c}=await f(t,e,x(e)),u=(e?.height?e?.height:c.height)+s,p=u/n,g=(e?.width?e?.width:c.width)+2*p+l,y=[{x:p,y:0},{x:g-p,y:0},{x:g,y:-u/2},{x:g-p,y:-u},{x:p,y:-u},{x:0,y:-u/2}];let C;const{cssStyles:b}=e;if("handDrawn"===e.look){const t=d.A.svg(h),r=(0,i.Fr)(e,{}),o=Bt(0,0,g,u,p),n=t.path(o,r);C=h.insert(()=>n,":first-child").attr("transform",`translate(${-g/2}, ${u/2})`),b&&C.attr("style",b)}else C=j(h,g,u,y);return o&&C.attr("style",o),e.width=g,e.height=u,m(e,C),e.intersect=function(t){return I.polygon(e,y,t)},h}async function At(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.label="",e.labelStyle=r;const{shapeSvg:n}=await f(t,e,x(e)),a=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:h}=e,c=d.A.svg(n),u=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");const p=[{x:0,y:0},{x:a,y:0},{x:0,y:s},{x:a,y:s}],g=C(p),y=c.path(g,u),b=n.insert(()=>y,":first-child");return b.attr("class","basic label-container outer-path"),h&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",h),o&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",o),b.attr("transform",`translate(${-a/2}, ${-s/2})`),m(e,b),e.intersect=function(t){l.R.info("Pill intersect",e,{points:p});return I.polygon(e,p,t)},n}async function Lt(t,e,{config:{themeVariables:r,flowchart:o}}){const{labelStyles:a}=(0,i.GX)(e);e.labelStyle=a;const s=e.assetHeight??48,h=e.assetWidth??48,c=Math.max(s,h),u=o?.wrappingWidth;e.width=Math.max(c,u??0);const{shapeSvg:p,bbox:g,label:y}=await f(t,e,"icon-shape default"),x="t"===e.pos,C=c,b=c,{nodeBorder:k}=r,{stylesMap:w}=(0,i.WW)(e),T=-b/2,S=-C/2,v=e.label?8:0,B=d.A.svg(p),_=(0,i.Fr)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const A=B.rectangle(T,S,b,C,_),L=Math.max(b,g.width),F=C+g.height+v,M=B.rectangle(-L/2,-F/2,L,F,{..._,fill:"transparent",stroke:"none"}),E=p.insert(()=>A,":first-child"),$=p.insert(()=>M);if(e.icon){const t=p.append("g");t.html(`${await(0,n.WY)(e.icon,{height:c,width:c,fallbackPrefix:""})}`);const r=t.node().getBBox(),i=r.width,o=r.height,a=r.x,s=r.y;t.attr("transform",`translate(${-i/2-a},${x?g.height/2+v/2-o/2-s:-g.height/2-v/2-o/2-s})`),t.attr("style",`color: ${w.get("stroke")??k};`)}return y.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${x?-F/2:F/2-g.height})`),E.attr("transform",`translate(0,${x?g.height/2+v/2:-g.height/2-v/2})`),m(e,$),e.intersect=function(t){if(l.R.info("iconSquare intersect",e,t),!e.label)return I.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let n=[];n=x?[{x:r-g.width/2,y:i-o/2},{x:r+g.width/2,y:i-o/2},{x:r+g.width/2,y:i-o/2+g.height+v},{x:r+b/2,y:i-o/2+g.height+v},{x:r+b/2,y:i+o/2},{x:r-b/2,y:i+o/2},{x:r-b/2,y:i-o/2+g.height+v},{x:r-g.width/2,y:i-o/2+g.height+v}]:[{x:r-b/2,y:i-o/2},{x:r+b/2,y:i-o/2},{x:r+b/2,y:i-o/2+C},{x:r+g.width/2,y:i-o/2+C},{x:r+g.width/2/2,y:i+o/2},{x:r-g.width/2,y:i+o/2},{x:r-g.width/2,y:i-o/2+C},{x:r-b/2,y:i-o/2+C}];return I.polygon(e,n,t)},p}async function Ft(t,e,{config:{themeVariables:r,flowchart:o}}){const{labelStyles:a}=(0,i.GX)(e);e.labelStyle=a;const s=e.assetHeight??48,h=e.assetWidth??48,c=Math.max(s,h),u=o?.wrappingWidth;e.width=Math.max(c,u??0);const{shapeSvg:p,bbox:g,label:y}=await f(t,e,"icon-shape default"),x=e.label?8:0,C="t"===e.pos,{nodeBorder:b,mainBkg:k}=r,{stylesMap:w}=(0,i.WW)(e),T=d.A.svg(p),S=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const v=w.get("fill");S.stroke=v??k;const B=p.append("g");e.icon&&B.html(`${await(0,n.WY)(e.icon,{height:c,width:c,fallbackPrefix:""})}`);const _=B.node().getBBox(),A=_.width,L=_.height,F=_.x,M=_.y,E=Math.max(A,L)*Math.SQRT2+40,$=T.circle(0,0,E,S),O=Math.max(E,g.width),D=E+g.height+x,K=T.rectangle(-O/2,-D/2,O,D,{...S,fill:"transparent",stroke:"none"}),q=p.insert(()=>$,":first-child"),R=p.insert(()=>K);return B.attr("transform",`translate(${-A/2-F},${C?g.height/2+x/2-L/2-M:-g.height/2-x/2-L/2-M})`),B.attr("style",`color: ${w.get("stroke")??b};`),y.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${C?-D/2:D/2-g.height})`),q.attr("transform",`translate(0,${C?g.height/2+x/2:-g.height/2-x/2})`),m(e,R),e.intersect=function(t){l.R.info("iconSquare intersect",e,t);return I.rect(e,t)},p}async function Mt(t,e,{config:{themeVariables:r,flowchart:o}}){const{labelStyles:a}=(0,i.GX)(e);e.labelStyle=a;const s=e.assetHeight??48,h=e.assetWidth??48,c=Math.max(s,h),u=o?.wrappingWidth;e.width=Math.max(c,u??0);const{shapeSvg:p,bbox:g,halfPadding:y,label:x}=await f(t,e,"icon-shape default"),C="t"===e.pos,b=c+2*y,k=c+2*y,{nodeBorder:w,mainBkg:T}=r,{stylesMap:v}=(0,i.WW)(e),B=-k/2,_=-b/2,A=e.label?8:0,L=d.A.svg(p),F=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(F.roughness=0,F.fillStyle="solid");const M=v.get("fill");F.stroke=M??T;const E=L.path(S(B,_,k,b,5),F),$=Math.max(k,g.width),O=b+g.height+A,D=L.rectangle(-$/2,-O/2,$,O,{...F,fill:"transparent",stroke:"none"}),K=p.insert(()=>E,":first-child").attr("class","icon-shape2"),q=p.insert(()=>D);if(e.icon){const t=p.append("g");t.html(`${await(0,n.WY)(e.icon,{height:c,width:c,fallbackPrefix:""})}`);const r=t.node().getBBox(),i=r.width,o=r.height,a=r.x,s=r.y;t.attr("transform",`translate(${-i/2-a},${C?g.height/2+A/2-o/2-s:-g.height/2-A/2-o/2-s})`),t.attr("style",`color: ${v.get("stroke")??w};`)}return x.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${C?-O/2:O/2-g.height})`),K.attr("transform",`translate(0,${C?g.height/2+A/2:-g.height/2-A/2})`),m(e,q),e.intersect=function(t){if(l.R.info("iconSquare intersect",e,t),!e.label)return I.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let n=[];n=C?[{x:r-g.width/2,y:i-o/2},{x:r+g.width/2,y:i-o/2},{x:r+g.width/2,y:i-o/2+g.height+A},{x:r+k/2,y:i-o/2+g.height+A},{x:r+k/2,y:i+o/2},{x:r-k/2,y:i+o/2},{x:r-k/2,y:i-o/2+g.height+A},{x:r-g.width/2,y:i-o/2+g.height+A}]:[{x:r-k/2,y:i-o/2},{x:r+k/2,y:i-o/2},{x:r+k/2,y:i-o/2+b},{x:r+g.width/2,y:i-o/2+b},{x:r+g.width/2/2,y:i+o/2},{x:r-g.width/2,y:i+o/2},{x:r-g.width/2,y:i-o/2+b},{x:r-k/2,y:i-o/2+b}];return I.polygon(e,n,t)},p}async function Et(t,e,{config:{themeVariables:r,flowchart:o}}){const{labelStyles:a}=(0,i.GX)(e);e.labelStyle=a;const s=e.assetHeight??48,h=e.assetWidth??48,c=Math.max(s,h),u=o?.wrappingWidth;e.width=Math.max(c,u??0);const{shapeSvg:p,bbox:g,halfPadding:y,label:x}=await f(t,e,"icon-shape default"),C="t"===e.pos,b=c+2*y,k=c+2*y,{nodeBorder:w,mainBkg:T}=r,{stylesMap:v}=(0,i.WW)(e),B=-k/2,_=-b/2,A=e.label?8:0,L=d.A.svg(p),F=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(F.roughness=0,F.fillStyle="solid");const M=v.get("fill");F.stroke=M??T;const E=L.path(S(B,_,k,b,.1),F),$=Math.max(k,g.width),O=b+g.height+A,D=L.rectangle(-$/2,-O/2,$,O,{...F,fill:"transparent",stroke:"none"}),K=p.insert(()=>E,":first-child"),q=p.insert(()=>D);if(e.icon){const t=p.append("g");t.html(`${await(0,n.WY)(e.icon,{height:c,width:c,fallbackPrefix:""})}`);const r=t.node().getBBox(),i=r.width,o=r.height,a=r.x,s=r.y;t.attr("transform",`translate(${-i/2-a},${C?g.height/2+A/2-o/2-s:-g.height/2-A/2-o/2-s})`),t.attr("style",`color: ${v.get("stroke")??w};`)}return x.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${C?-O/2:O/2-g.height})`),K.attr("transform",`translate(0,${C?g.height/2+A/2:-g.height/2-A/2})`),m(e,q),e.intersect=function(t){if(l.R.info("iconSquare intersect",e,t),!e.label)return I.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let n=[];n=C?[{x:r-g.width/2,y:i-o/2},{x:r+g.width/2,y:i-o/2},{x:r+g.width/2,y:i-o/2+g.height+A},{x:r+k/2,y:i-o/2+g.height+A},{x:r+k/2,y:i+o/2},{x:r-k/2,y:i+o/2},{x:r-k/2,y:i-o/2+g.height+A},{x:r-g.width/2,y:i-o/2+g.height+A}]:[{x:r-k/2,y:i-o/2},{x:r+k/2,y:i-o/2},{x:r+k/2,y:i-o/2+b},{x:r+g.width/2,y:i-o/2+b},{x:r+g.width/2/2,y:i+o/2},{x:r-g.width/2,y:i+o/2},{x:r-g.width/2,y:i-o/2+b},{x:r-k/2,y:i-o/2+b}];return I.polygon(e,n,t)},p}async function $t(t,e,{config:{flowchart:r}}){const o=new Image;o.src=e?.img??"",await o.decode();const n=Number(o.naturalWidth.toString().replace("px","")),a=Number(o.naturalHeight.toString().replace("px",""));e.imageAspectRatio=n/a;const{labelStyles:s}=(0,i.GX)(e);e.labelStyle=s;const h=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;const c=Math.max(e.label?h??0:0,e?.assetWidth??n),u="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:c,p="on"===e.constraint?u/e.imageAspectRatio:e?.assetHeight??a;e.width=Math.max(u,h??0);const{shapeSvg:g,bbox:y,label:x}=await f(t,e,"image-shape default"),C="t"===e.pos,b=-u/2,k=-p/2,w=e.label?8:0,T=d.A.svg(g),S=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const v=T.rectangle(b,k,u,p,S),B=Math.max(u,y.width),_=p+y.height+w,A=T.rectangle(-B/2,-_/2,B,_,{...S,fill:"none",stroke:"none"}),L=g.insert(()=>v,":first-child"),F=g.insert(()=>A);if(e.img){const t=g.append("image");t.attr("href",e.img),t.attr("width",u),t.attr("height",p),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-u/2},${C?_/2-p:-_/2})`)}return x.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${C?-p/2-y.height/2-w/2:p/2-y.height/2+w/2})`),L.attr("transform",`translate(0,${C?y.height/2+w/2:-y.height/2-w/2})`),m(e,F),e.intersect=function(t){if(l.R.info("iconSquare intersect",e,t),!e.label)return I.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let n=[];n=C?[{x:r-y.width/2,y:i-o/2},{x:r+y.width/2,y:i-o/2},{x:r+y.width/2,y:i-o/2+y.height+w},{x:r+u/2,y:i-o/2+y.height+w},{x:r+u/2,y:i+o/2},{x:r-u/2,y:i+o/2},{x:r-u/2,y:i-o/2+y.height+w},{x:r-y.width/2,y:i-o/2+y.height+w}]:[{x:r-u/2,y:i-o/2},{x:r+u/2,y:i-o/2},{x:r+u/2,y:i-o/2+p},{x:r+y.width/2,y:i-o/2+p},{x:r+y.width/2/2,y:i+o/2},{x:r-y.width/2,y:i+o/2},{x:r-y.width/2,y:i-o/2+p},{x:r-u/2,y:i-o/2+p}];return I.polygon(e,n,t)},g}async function Ot(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a=n,s="neo"===e.look?2*n:n,{shapeSvg:l,bbox:h}=await f(t,e,x(e)),c=Math.max(h.height+2*a,e.height??0),u=Math.max(h.width+2*s,(e.width??0)-c),p=[{x:0,y:0},{x:u,y:0},{x:u+3*c/6,y:-c},{x:-3*c/6,y:-c}];let g;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=d.A.svg(l),r=(0,i.Fr)(e,{}),o=C(p),n=t.path(o,r);g=l.insert(()=>n,":first-child").attr("transform",`translate(${-u/2}, ${c/2})`),y&&g.attr("style",y)}else g=j(l,u,c,p);return o&&g.attr("style",o),e.width=u,e.height=c,m(e,g),e.intersect=function(t){return I.polygon(e,p,t)},l}async function Dt(t,e){const{shapeSvg:r,bbox:i,label:o}=await f(t,e,"label"),n=r.insert("rect",":first-child");return n.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),o.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-i.height/2-(i.y-(i.top??0))})`),m(e,n),e.intersect=function(t){return I.rect(e,t)},r}async function It(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a=n,s="neo"===e.look?2*n:n,{shapeSvg:l,bbox:h}=await f(t,e,x(e)),c=Math.max(h.height+a,e.height??0),u=Math.max(h.width+s,(e.width??0)-c),p=[{x:0,y:0},{x:u+3*c/6,y:0},{x:u,y:-c},{x:-3*c/6,y:-c}];let g;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=d.A.svg(l),r=(0,i.Fr)(e,{}),o=C(p),n=t.path(o,r);g=l.insert(()=>n,":first-child").attr("transform",`translate(${-u/2}, ${c/2})`),y&&g.attr("style",y)}else g=j(l,u,c,p);return o&&g.attr("style",o),e.width=u,e.height=c,m(e,g),e.intersect=function(t){return I.polygon(e,p,t)},l}async function Kt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a=n,s="neo"===e.look?2*n:n,{shapeSvg:l,bbox:h}=await f(t,e,x(e)),c=Math.max(h.height+a,e.height??0),u=Math.max(h.width+s,(e.width??0)-c),p=[{x:-3*c/6,y:0},{x:u,y:0},{x:u+3*c/6,y:-c},{x:0,y:-c}];let g;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=d.A.svg(l),r=(0,i.Fr)(e,{}),o=C(p),n=t.path(o,r);g=l.insert(()=>n,":first-child").attr("transform",`translate(${-u/2}, ${c/2})`),y&&g.attr("style",y)}else g=j(l,u,c,p);return o&&g.attr("style",o),e.width=u,e.height=c,m(e,g),e.intersect=function(t){return I.polygon(e,p,t)},l}function qt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.label="",e.labelStyle=r;const n=t.insert("g").attr("class",x(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,s=Math.max(35,e?.width??0),h=Math.max(35,e?.height??0),c=[{x:s,y:0},{x:0,y:h+3.5},{x:s-14,y:h+3.5},{x:0,y:2*h},{x:s,y:h-3.5},{x:14,y:h-3.5}],u=d.A.svg(n),p=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=C(c),f=u.path(g,p),y=n.insert(()=>f,":first-child");return y.attr("class","outer-path"),a&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",a),o&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",o),y.attr("transform",`translate(-${s/2},${-h})`),m(e,y),e.intersect=function(t){l.R.info("lightningBolt intersect",e,t);return I.polygon(e,c,t)},n}(0,h.K)(_t,"hexagon"),(0,h.K)(At,"hourglass"),(0,h.K)(Lt,"icon"),(0,h.K)(Ft,"iconCircle"),(0,h.K)(Mt,"iconRounded"),(0,h.K)(Et,"iconSquare"),(0,h.K)($t,"imageSquare"),(0,h.K)(Ot,"inv_trapezoid"),(0,h.K)(Dt,"labelRect"),(0,h.K)(It,"lean_left"),(0,h.K)(Kt,"lean_right"),(0,h.K)(qt,"lightningBolt");var Rt=(0,h.K)((t,e,r,i,o,n,a)=>[`M${t},${e+n}`,`a${o},${n} 0,0,0 ${r},0`,`a${o},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${n} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+n+a}`,`a${o},${n} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Pt=(0,h.K)((t,e,r,i,o,n,a)=>[`M${t},${e+n}`,`M${t+r},${e+n}`,`a${o},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${n} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+n+a}`,`a${o},${n} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),zt=(0,h.K)((t,e,r,i,o,n)=>[`M${t-r/2},${-i/2}`,`a${o},${n} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Nt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,s="neo"===e.look?16:n,l="neo"===e.look?24:n;if(e.width||e.height){const t=e.width??0;e.width=(e.width??0)-s,e.width<10&&(e.width=10);const r=t/2/(2.5+t/50);e.height=(e.height??0)-l-3*r,e.height<10&&(e.height=10)}const{shapeSvg:h,bbox:c,label:u}=await f(t,e,x(e)),p=(e?.width?e?.width:c.width)+2*s,g=p/2,y=g/(2.5+p/50),C=(e?.height?e?.height:c.height)+y+2*l,b=.1*C;let k;const{cssStyles:w}=e;if("handDrawn"===e.look){const t=d.A.svg(h),r=Pt(0,0,p,C,g,y,b),o=zt(0,y,p,C,g,y),n=(0,i.Fr)(e,{}),a=t.path(r,n),s=t.path(o,n);h.insert(()=>s,":first-child").attr("class","line"),k=h.insert(()=>a,":first-child"),k.attr("class","basic label-container"),w&&k.attr("style",w)}else{const t=Rt(0,0,p,C,g,y,b);k=h.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,a.KL)(w)).attr("style",o)}return k.attr("label-offset-y",y),k.attr("transform",`translate(${-p/2}, ${-(C/2+y)})`),m(e,k),u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))}, ${-c.height/2+y-(c.y-(c.top??0))})`),e.intersect=function(t){const r=I.rect(e,t),i=r.x-(e.x??0);if(0!=g&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-y)){let o=y*y*(1-i*i/(g*g));o>0&&(o=Math.sqrt(o)),o=y-o,t.y-(e.y??0)>0&&(o=-o),r.y+=o}return r},h}async function jt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?16:n,s="neo"===e.look?12:n;if(e.width||e.height){const t=e.width;e.width=10*(t??0)/11-2*a,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10)}const{shapeSvg:l,bbox:h,label:c}=await f(t,e,x(e)),u=(e?.width?e?.width:h.width)+2*(a??0),p=(e?.height?e?.height:h.height)+2*(s??0),g="neo"===e.look?p/4:p/8,y=p+g,{cssStyles:C}=e,k=d.A.svg(l),w=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const T=[{x:-u/2-u/2*.1,y:-y/2},{x:-u/2-u/2*.1,y:y/2},...b(-u/2-u/2*.1,y/2,u/2+u/2*.1,y/2,g,.8),{x:u/2+u/2*.1,y:-y/2},{x:-u/2-u/2*.1,y:-y/2},{x:-u/2,y:-y/2},{x:-u/2,y:y/2*1.1},{x:-u/2,y:-y/2}],S=k.polygon(T.map(t=>[t.x,t.y]),w),v=l.insert(()=>S,":first-child");return v.attr("class","basic label-container outer-path"),C&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",C),o&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",o),v.attr("transform",`translate(0,${-g/2})`),c.attr("transform",`translate(${-u/2+(e.padding??0)+u/2*.1/2-(h.x-(h.left??0))},${-p/2+(e.padding??0)-g/2-(h.y-(h.top??0))})`),m(e,v),e.intersect=function(t){return I.polygon(e,T,t)},l}async function Wt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?16:n,s="neo"===e.look?12:n,l="neo"===e.look?10:5;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*a-2*l,10),e.height=Math.max((e?.height??0)-2*s-2*l,10));const{shapeSvg:h,bbox:c,label:u}=await f(t,e,x(e)),p=(e?.width?e?.width:c.width)+2*a+2*l-2*l,g=(e?.height?e?.height:c.height)+2*s+2*l-2*l,y=-p/2,b=-g/2,{cssStyles:k}=e,T=d.A.svg(h),S=(0,i.Fr)(e,{}),v=[{x:y-l,y:b+l},{x:y-l,y:b+g+l},{x:y+p-l,y:b+g+l},{x:y+p-l,y:b+g},{x:y+p,y:b+g},{x:y+p,y:b+g-l},{x:y+p+l,y:b+g-l},{x:y+p+l,y:b-l},{x:y+l,y:b-l},{x:y+l,y:b},{x:y,y:b},{x:y,y:b+l}],B=[{x:y,y:b+l},{x:y+p-l,y:b+l},{x:y+p-l,y:b+g},{x:y+p,y:b+g},{x:y+p,y:b},{x:y,y:b}];"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const _=C(v);let A=T.path(_,S);const L=C(B);let F=T.path(L,S);"handDrawn"!==e.look&&(A=w(A),F=w(F));const M=h.insert("g",":first-child");return M.insert(()=>A),M.insert(()=>F),M.attr("class","basic label-container outer-path"),k&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",k),o&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",o),u.attr("transform",`translate(${-c.width/2-l-(c.x-(c.left??0))}, ${-c.height/2+l-(c.y-(c.top??0))})`),m(e,M),e.intersect=function(t){return I.polygon(e,v,t)},h}async function Ht(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await f(t,e,x(e)),l=e.padding??0,h="neo"===e.look?16:l,c="neo"===e.look?12:l;let u=!0;(e.width||e.height)&&(u=!1,e.width=(e?.width??0)-2*h,e.height=(e?.height??0)-3*c);const p=Math.max(a.width,e?.width??0)+2*h,g=Math.max(a.height,e?.height??0)+3*c,y="neo"===e.look?g/4:g/8,k=g+(u?y/2:-y/2),w=-p/2,T=-k/2,S=10,{cssStyles:v}=e,B=b(w-S,T+k+S,w+p-S,T+k+S,y,.8),_=B?.[B.length-1],A=[{x:w-S,y:T+S},{x:w-S,y:T+k+S},...B,{x:w+p-S,y:_.y-S},{x:w+p,y:_.y-S},{x:w+p,y:_.y-20},{x:w+p+S,y:_.y-20},{x:w+p+S,y:T-S},{x:w+S,y:T-S},{x:w+S,y:T},{x:w,y:T},{x:w,y:T+S}],L=[{x:w,y:T+S},{x:w+p-S,y:T+S},{x:w+p-S,y:_.y-S},{x:w+p,y:_.y-S},{x:w+p,y:T},{x:w,y:T}],F=d.A.svg(n),M=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");const E=C(A),$=F.path(E,M),O=C(L),D=F.path(O,M),K=n.insert(()=>$,":first-child");return K.insert(()=>D),K.attr("class","basic label-container outer-path"),v&&"handDrawn"!==e.look&&K.selectAll("path").attr("style",v),o&&"handDrawn"!==e.look&&K.selectAll("path").attr("style",o),K.attr("transform",`translate(0,${-y/2})`),s.attr("transform",`translate(${-a.width/2-S-(a.x-(a.left??0))}, ${-a.height/2+S-y/2-(a.y-(a.top??0))})`),m(e,K),e.intersect=function(t){return I.polygon(e,A,t)},n}async function Ut(t,e,{config:{themeVariables:r}}){const{labelStyles:o,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=o;e.useHtmlLabels||(0,s.E)((0,s.zj)())||(e.centerLabel=!0);const{shapeSvg:a,bbox:l,label:h}=await f(t,e,x(e)),c=Math.max(l.width+2*(e.padding??0),e?.width??0),u=Math.max(l.height+2*(e.padding??0),e?.height??0),p=-c/2,g=-u/2,{cssStyles:y}=e,C=d.A.svg(a),b=(0,i.Fr)(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=C.rectangle(p,g,c,u,b),w=a.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path"),h.attr("class","label noteLabel"),y&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",y),n&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",n),h.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-l.height/2-(l.y-(l.top??0))})`),m(e,w),e.intersect=function(t){return I.rect(e,t)},a}(0,h.K)(Nt,"linedCylinder"),(0,h.K)(jt,"linedWaveEdgedRect"),(0,h.K)(Wt,"multiRect"),(0,h.K)(Ht,"multiWaveEdgedRectangle"),(0,h.K)(Ut,"note");var Yt=(0,h.K)((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Gt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await f(t,e,x(e)),s=a.width+(e.padding??0)+(a.height+(e.padding??0)),l=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];let h;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=d.A.svg(n),r=(0,i.Fr)(e,{}),o=Yt(0,0,s),a=t.path(o,r);h=n.insert(()=>a,":first-child").attr("transform",`translate(${-s/2+.5}, ${s/2})`),c&&h.attr("style",c)}else h=j(n,s,s,l),h.attr("transform",`translate(${-s/2+.5}, ${s/2})`);return o&&h.attr("style",o),m(e,h),e.calcIntersect=function(t,e){const r=t.width,i=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],o=I.polygon(t,i,e);return{x:o.x-.5,y:o.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},n}async function Xt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?21:n??0,s="neo"===e.look?12:n??0,{shapeSvg:l,bbox:h,label:c}=await f(t,e,x(e)),u=h.width+("neo"===e.look?2*a:a),p=Math.max(h.height+("neo"===e.look?2*s:s),e.height??0),g=p/4,y=-Math.max(u,(e.width??0)-g)/2,b=-p/2,k=b/2,w=[{x:y+k,y:b},{x:y,y:0},{x:y+k,y:-b},{x:-y,y:-b},{x:-y,y:b}],{cssStyles:T}=e,S=d.A.svg(l),v=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");const B=C(w),_=S.path(B,v),A=l.insert(()=>_,":first-child");return A.attr("class","basic label-container outer-path"),T&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",T),o&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",o),A.attr("transform",`translate(${-k/2},0)`),c.attr("transform",`translate(${-k/2-h.width/2-(h.x-(h.left??0))}, ${-h.height/2-(h.y-(h.top??0))})`),m(e,A),e.intersect=function(t){return I.polygon(e,w,t)},l}async function Vt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);let n;e.labelStyle=r,n=e.cssClasses?"node "+e.cssClasses:"node default";const a=t.insert("g").attr("class",n).attr("id",e.domId||e.id),h=a.insert("g"),u=a.insert("g").attr("class","label").attr("style",o),p=e.description,g=e.label,f=await v(u,g,e.labelStyle,!0,!0);let y={width:0,height:0};if((0,s.E)((0,s.D7)())){const t=f.children[0],e=(0,c.Ltv)(f);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}l.R.info("Text 2",p);const x=p||[],C=f.getBBox(),b=await v(u,Array.isArray(x)?x.join("
    "):x,e.labelStyle,!0,!0),k=b.children[0],w=(0,c.Ltv)(b);y=k.getBoundingClientRect(),w.attr("width",y.width),w.attr("height",y.height);const T=(e.padding||0)/2;(0,c.Ltv)(b).attr("transform","translate( "+(y.width>C.width?0:(C.width-y.width)/2)+", "+(C.height+T+5)+")"),(0,c.Ltv)(f).attr("transform","translate( "+(y.width(l.R.debug("Rough node insert CXC",o),n),":first-child"),F=a.insert(()=>(l.R.debug("Rough node insert CXC",o),o),":first-child")}else F=h.insert("rect",":first-child"),M=h.insert("line"),F.attr("class","outer title-state").attr("style",o).attr("x",-y.width/2-T).attr("y",-y.height/2-T).attr("width",y.width+(e.padding||0)).attr("height",y.height+(e.padding||0)),M.attr("class","divider").attr("x1",-y.width/2-T).attr("x2",y.width/2+T).attr("y1",-y.height/2-T+C.height+T).attr("y2",-y.height/2-T+C.height+T);return m(e,F),e.intersect=function(t){return I.rect(e,t)},a}async function Zt(t,e,{config:{themeVariables:r}}){const i=r?.radius??5;return mt(t,e,{rx:i,ry:i,classes:"",labelPaddingX:1*(e?.padding??0),labelPaddingY:1*(e?.padding??0)})}(0,h.K)(Gt,"question"),(0,h.K)(Xt,"rect_left_inv_arrow"),(0,h.K)(Vt,"rectWithTitle"),(0,h.K)(Zt,"roundedRect");async function Qt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n="neo"===e.look?16:e.padding??0,s="neo"===e.look?12:e.padding??0,{shapeSvg:l,bbox:h,label:c}=await f(t,e,x(e)),u=(e?.width??h.width)+2*n+("neo"===e.look?8:16),p=(e?.height??h.height)+2*s,g=u-8,y=p,C=8-u/2,b=-p/2,{cssStyles:k}=e,w=d.A.svg(l),T=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const S=[{x:C,y:b},{x:C+g,y:b},{x:C+g,y:b+y},{x:C-8,y:b+y},{x:C-8,y:b},{x:C,y:b},{x:C,y:b+y}],v=w.polygon(S.map(t=>[t.x,t.y]),T),B=l.insert(()=>v,":first-child");return B.attr("class","basic label-container outer-path").attr("style",(0,a.KL)(k)),o&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",o),k&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",o),c.attr("transform",`translate(${4-h.width/2-(h.x-(h.left??0))}, ${-h.height/2-(h.y-(h.top??0))})`),m(e,B),e.intersect=function(t){return I.rect(e,t)},l}async function Jt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?16:n,s="neo"===e.look?12:n;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*a,10),e.height=Math.max((e?.height??0)/1.5-2*s,10));const{shapeSvg:l,bbox:h,label:c}=await f(t,e,x(e)),u=(e?.width?e?.width:h.width)+2*a,p=1.5*((e?.height?e?.height:h.height)+2*s)/1.5,g=-u/2,y=-p/2,{cssStyles:b}=e,k=d.A.svg(l),w=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const T=[{x:g,y:y},{x:g,y:y+p},{x:g+u,y:y+p},{x:g+u,y:y-p/2}],S=C(T),v=k.path(S,w),B=l.insert(()=>v,":first-child");return B.attr("class","basic label-container outer-path"),b&&"handDrawn"!==e.look&&B.selectChildren("path").attr("style",b),o&&"handDrawn"!==e.look&&B.selectChildren("path").attr("style",o),B.attr("transform",`translate(0, ${p/4})`),c.attr("transform",`translate(${-u/2+(e.padding??0)-(h.x-(h.left??0))}, ${-p/4+(e.padding??0)-(h.y-(h.top??0))})`),m(e,B),e.intersect=function(t){return I.polygon(e,T,t)},l}async function te(t,e){const r=e.padding??0,i="neo"===e.look?16:2*r,o="neo"===e.look?12:r;return mt(t,e,{rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??i,labelPaddingY:o})}async function ee(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?20:n,s="neo"===e.look?12:n,{shapeSvg:l,bbox:h}=await f(t,e,x(e)),c=h.height+("neo"===e.look?2*s:s),u=h.width+c/4+("neo"===e.look?2*a:a),p=c/2,{cssStyles:g}=e,y=d.A.svg(l),b=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const w=[{x:-u/2+p,y:-c/2},{x:u/2-p,y:-c/2},...k(-u/2+p,0,p,50,90,270),{x:u/2-p,y:c/2},...k(u/2-p,0,p,50,270,450)],T=C(w),S=y.path(T,b),v=l.insert(()=>S,":first-child");return v.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",g),o&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",o),m(e,v),e.intersect=function(t){return I.polygon(e,w,t)},l}async function re(t,e){return mt(t,e,{rx:"neo"===e.look?3:5,ry:"neo"===e.look?3:5,classes:"flowchart-node"})}function ie(t,e,{config:{themeVariables:r}}){const{labelStyles:o,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=o;const{cssStyles:a}=e,{lineColor:s,stateBorder:l,nodeBorder:h,nodeShadow:c}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const u=t.insert("g").attr("class","node default").attr("id",e.domId??e.id),p=d.A.svg(u),g=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=p.circle(0,0,e.width,{...g,stroke:s,strokeWidth:2}),y=l??h,x=5*(e.width??0)/14,C=p.circle(0,0,x,{...g,fill:y,stroke:y,strokeWidth:2,fillStyle:"solid"}),b=u.insert(()=>f,":first-child");if(b.insert(()=>C),"handDrawn"!==e.look&&b.attr("class","outer-path"),a&&b.selectAll("path").attr("style",a),n&&b.selectAll("path").attr("style",n),e.width<25&&c&&"handDrawn"!==e.look){const e=t.node()?.ownerSVGElement?.id??"",r=e?`${e}-drop-shadow-small`:"drop-shadow-small";b.attr("style",`filter:url(#${r})`)}return m(e,b),e.intersect=function(t){return I.circle(e,(e.width??0)/2,t)},u}function oe(t,e,{config:{themeVariables:r}}){const{lineColor:o,nodeShadow:n}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let s;if("handDrawn"===e.look){const t=d.A.svg(a).circle(0,0,e.width,(0,i.ue)(o));s=a.insert(()=>t),s.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else s=a.insert("circle",":first-child"),s.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&n&&"handDrawn"!==e.look){const e=t.node()?.ownerSVGElement?.id??"",r=e?`${e}-drop-shadow-small`:"drop-shadow-small";s.attr("style",`filter:url(#${r})`)}return m(e,s),e.intersect=function(t){return I.circle(e,(e.width??7)/2,t)},a}(0,h.K)(Qt,"shadedProcess"),(0,h.K)(Jt,"slopedRect"),(0,h.K)(te,"squareRect"),(0,h.K)(ee,"stadium"),(0,h.K)(re,"state"),(0,h.K)(ie,"stateEnd"),(0,h.K)(oe,"stateStart");async function ne(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e?.padding??8,s="neo"===e.look?28:n,l="neo"===e.look?12:n,{shapeSvg:h,bbox:c}=await f(t,e,x(e)),u=Math.max(c.width+16+s,e.width??0),p=Math.max(c.height+l,e.height??0),g=u-16,y=p,C=-u/2,b=-p/2,k=[{x:0,y:0},{x:g,y:0},{x:g,y:-y},{x:0,y:-y},{x:0,y:0},{x:-8,y:0},{x:g+8,y:0},{x:g+8,y:-y},{x:-8,y:-y},{x:-8,y:0}];if("handDrawn"===e.look){const t=d.A.svg(h),r=(0,i.Fr)(e,{}),o=t.rectangle(C,b,g+16,y,r),n=t.line(C+8,b,C+8,b+y,r),s=t.line(C+8+g,b,C+8+g,b+y,r);h.insert(()=>n,":first-child"),h.insert(()=>s,":first-child");const l=h.insert(()=>o,":first-child"),{cssStyles:c}=e;l.attr("class","basic label-container").attr("style",(0,a.KL)(c)),m(e,l)}else{const t=j(h,g,y,k);o&&t.attr("style",o),m(e,t)}return e.intersect=function(t){return I.polygon(e,k,t)},h}(0,h.K)(ne,"subroutine");async function ae(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?16:n,s="neo"===e.look?12:n;(e.width||e.height)&&(e.height=Math.max((e?.height??0)-2*s,10),e.width=Math.max((e?.width??0)-2*a-.2*(e.height+2*s),10));const{shapeSvg:l,bbox:h}=await f(t,e,x(e)),c=(e?.height?e?.height:h.height)+2*s,u=.2*c,p=.2*c,g=(e?.width?e?.width:h.width)+2*a+u-u,y=c,b=-g/2,k=-y/2,{cssStyles:w}=e,T=d.A.svg(l),S=(0,i.Fr)(e,{}),v=[{x:b-u/2,y:k},{x:b+g+u/2,y:k},{x:b+g+u/2,y:k+y},{x:b-u/2,y:k+y}],B=[{x:b+g-u/2,y:k+y},{x:b+g+u/2,y:k+y},{x:b+g+u/2,y:k+y-p}];"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const _=C(v),A=T.path(_,S),L=C(B),F=T.path(L,{...S,fillStyle:"solid"}),M=l.insert(()=>F,":first-child");return M.insert(()=>A,":first-child"),M.attr("class","basic label-container outer-path"),w&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",w),o&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",o),m(e,M),e.intersect=function(t){return I.polygon(e,v,t)},l}async function se(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await f(t,e,x(e)),l=Math.max(a.width+2*(e.padding??0),e?.width??0),h=Math.max(a.height+2*(e.padding??0),e?.height??0),c=h/8,u=.2*l,p=.2*h,g=h+c,{cssStyles:y}=e,k=d.A.svg(n),w=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const T=[{x:-l/2-l/2*.1,y:g/2},...b(-l/2-l/2*.1,g/2,l/2+l/2*.1,g/2,c,.8),{x:l/2+l/2*.1,y:-g/2},{x:-l/2-l/2*.1,y:-g/2}],S=-l/2+l/2*.1,v=-g/2-.4*p,B=[{x:S+l-u,y:1.3*(v+h)},{x:S+l,y:v+h-p},{x:S+l,y:.9*(v+h)},...b(S+l,1.25*(v+h),S+l-u,1.3*(v+h),.02*-h,.5)],_=C(T),A=k.path(_,w),L=C(B),F=k.path(L,{...w,fillStyle:"solid"}),M=n.insert(()=>F,":first-child");return M.insert(()=>A,":first-child"),M.attr("class","basic label-container outer-path"),y&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",y),o&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",o),M.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-l/2+(e.padding??0)-(a.x-(a.left??0))},${-h/2+(e.padding??0)-c/2-(a.y-(a.top??0))})`),m(e,M),e.intersect=function(t){return I.polygon(e,T,t)},n}async function le(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:a}=await f(t,e,x(e)),s=Math.max(a.width+(e.padding??0),e?.width||0),l=Math.max(a.height+(e.padding??0),e?.height||0),h=-s/2,c=-l/2,d=n.insert("rect",":first-child");return d.attr("class","text").attr("style",o).attr("rx",0).attr("ry",0).attr("x",h).attr("y",c).attr("width",s).attr("height",l),m(e,d),e.intersect=function(t){return I.rect(e,t)},n}(0,h.K)(ae,"taggedRect"),(0,h.K)(se,"taggedWaveEdgedRectangle"),(0,h.K)(le,"text");var he=(0,h.K)((t,e,r,i,o,n)=>`M${t},${e}\n a${o},${n} 0,0,1 0,${-i}\n l${r},0\n a${o},${n} 0,0,1 0,${i}\n M${r},${-i}\n a${o},${n} 0,0,0 0,${i}\n l${-r},0`,"createCylinderPathD"),ce=(0,h.K)((t,e,r,i,o,n)=>[`M${t},${e}`,`M${t+r},${e}`,`a${o},${n} 0,0,0 0,${-i}`,`l${-r},0`,`a${o},${n} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),de=(0,h.K)((t,e,r,i,o,n)=>[`M${t+r/2},${-i/2}`,`a${o},${n} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function ue(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,s="neo"===e.look?12:n/2,l=e.height??0;if(e.height&&(e.height=e.height-s,e.height<5&&(e.height=5)),e.width){const t=l/2/(2.5+l/50);e.width=e.width-s-3*t,e.width<10&&(e.width=10)}const{shapeSvg:h,bbox:c,label:u}=await f(t,e,x(e)),p=Math.max(e.height??0,c.height)+s,g=p/2,y=g/(2.5+p/50),C=Math.max(e.width??0,c.width)+y+s,{cssStyles:b}=e;let k;if("handDrawn"===e.look){const t=d.A.svg(h),r=ce(0,0,C,p,y,g),o=de(0,0,C,p,y,g),n=t.path(r,(0,i.Fr)(e,{})),a=t.path(o,(0,i.Fr)(e,{fill:"none"}));k=h.insert(()=>a,":first-child"),k=h.insert(()=>n,":first-child"),k.attr("class","basic label-container"),b&&k.attr("style",b)}else{const t=he(0,0,C,p,y,g);k=h.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,a.KL)(b)).attr("style",o),k.attr("class","basic label-container outer-path"),b&&k.selectAll("path").attr("style",b),o&&k.selectAll("path").attr("style",o)}return k.attr("label-offset-x",y),k.attr("transform",`translate(${-C/2}, ${p/2} )`),u.attr("transform",`translate(${-c.width/2-y-(c.x-(c.left??0))}, ${-c.height/2-(c.y-(c.top??0))})`),m(e,k),e.intersect=function(t){const r=I.rect(e,t),i=r.y-(e.y??0);if(0!=g&&(Math.abs(i)<(e.height??0)/2||Math.abs(i)==(e.height??0)/2&&Math.abs(r.x-(e.x??0))>(e.width??0)/2-y)){let o=y*y*(1-i*i/(g*g));0!=o&&(o=Math.sqrt(Math.abs(o))),o=y-o,t.x-(e.x??0)>0&&(o=-o),r.x+=o}return r},h}async function pe(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a=(e.look,n),s="neo"===e.look?2*n:n,{shapeSvg:l,bbox:h}=await f(t,e,x(e)),c=Math.max(h.height+a,e.height??0),u=Math.max(h.width+s,(e.width??0)-c),p=[{x:-3*c/6,y:0},{x:u+3*c/6,y:0},{x:u,y:-c},{x:0,y:-c}];let g;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=d.A.svg(l),r=(0,i.Fr)(e,{}),o=C(p),n=t.path(o,r);g=l.insert(()=>n,":first-child").attr("transform",`translate(${-u/2}, ${c/2})`),y&&g.attr("style",y)}else g=j(l,u,c,p);return o&&g.attr("style",o),e.width=u,e.height=c,m(e,g),e.intersect=function(t){return I.polygon(e,p,t)},l}async function ge(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?16:n,s="neo"===e.look?12:n;(e.width||e.height)&&(e.height=(e.height??0)-2*s,e.height<5&&(e.height=5),e.width=(e.width??0)-2*a,e.width<15&&(e.width=15));const{shapeSvg:l,bbox:h}=await f(t,e,x(e)),c=(e?.width?e?.width:h.width)+2*a,u=(e?.height?e?.height:h.height)+2*s,{cssStyles:p}=e,g=d.A.svg(l),y=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const b=[{x:-c/2*.8,y:-u/2},{x:c/2*.8,y:-u/2},{x:c/2,y:-u/2*.6},{x:c/2,y:u/2},{x:-c/2,y:u/2},{x:-c/2,y:-u/2*.6}],k=C(b),w=g.path(k,y),T=l.insert(()=>w,":first-child");return T.attr("class","basic label-container outer-path"),p&&"handDrawn"!==e.look&&T.selectChildren("path").attr("style",p),o&&"handDrawn"!==e.look&&T.selectChildren("path").attr("style",o),m(e,T),e.intersect=function(t){return I.polygon(e,b,t)},l}(0,h.K)(ue,"tiltedCylinder"),(0,h.K)(pe,"trapezoid"),(0,h.K)(ge,"trapezoidalPentagon");async function fe(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?2*n:n;(e.width||e.height)&&(e.width=((e?.width??0)-a)/2,e.width<10&&(e.width=10),e.height=e?.height??0,e.height<10&&(e.height=10));const{shapeSvg:h,bbox:c,label:u}=await f(t,e,x(e)),p=(0,s._3)((0,s.D7)().flowchart?.htmlLabels),g=(e?.width?e?.width:c.width)+a,y=e?.height?e?.height:g+c.height,b=[{x:0,y:0},{x:y,y:0},{x:y/2,y:-y}],{cssStyles:k}=e,w=d.A.svg(h),T=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const S=C(b),v=w.path(S,T),B=h.insert(()=>v,":first-child").attr("transform",`translate(${-y/2}, ${y/2})`).attr("class","outer-path");return k&&"handDrawn"!==e.look&&B.selectChildren("path").attr("style",k),o&&"handDrawn"!==e.look&&B.selectChildren("path").attr("style",o),e.width=g,e.height=y,m(e,B),u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))}, ${y/2-(c.height+(e.padding??0)/(p?2:1)-(c.y-(c.top??0)))})`),e.intersect=function(t){return l.R.info("Triangle intersect",e,b,t),I.polygon(e,b,t)},h}async function ye(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?16:n,s="neo"===e.look?12:n;let l=!0;(e.width||e.height)&&(l=!1,e.width=(e?.width??0)-2*a,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10));const{shapeSvg:h,bbox:c,label:u}=await f(t,e,x(e)),p=(e?.width?e?.width:c.width)+2*(a??0),g=(e?.height?e?.height:c.height)+2*(s??0),y="neo"===e.look?g/4:g/8,k=g+(l?y:-y),{cssStyles:w}=e,T=14-p,S=T>0?T/2:0,v=d.A.svg(h),B=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");const _=[{x:-p/2-S,y:k/2},...b(-p/2-S,k/2,p/2+S,k/2,y,.8),{x:p/2+S,y:-k/2},{x:-p/2-S,y:-k/2}],A=C(_),L=v.path(A,B),F=h.insert(()=>L,":first-child");return F.attr("class","basic label-container outer-path"),w&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",w),o&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",o),F.attr("transform",`translate(0,${-y/2})`),u.attr("transform",`translate(${-p/2+(e.padding??0)-(c.x-(c.left??0))},${-g/2+(e.padding??0)-y-(c.y-(c.top??0))})`),m(e,F),e.intersect=function(t){return I.polygon(e,_,t)},h}async function me(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?16:n,s="neo"===e.look?20:n;if(e.width||e.height){e.width=e?.width??0,e.width<20&&(e.width=20),e.height=e?.height??0,e.height<10&&(e.height=10);const t=Math.min(.2*e.height,e.height/4);e.height=Math.ceil(e.height-s-t*(20/9)),e.width=e.width-2*a}const{shapeSvg:l,bbox:h}=await f(t,e,x(e)),c=(e?.width?e?.width:h.width)+2*a,u=(e?.height?e?.height:h.height)+s,p=u/8,g=u+2*p,{cssStyles:y}=e,k=d.A.svg(l),w=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const T=[{x:-c/2,y:g/2},...b(-c/2,g/2,c/2,g/2,p,1),{x:c/2,y:-g/2},...b(c/2,-g/2,-c/2,-g/2,p,-1)],S=C(T),v=k.path(S,w),B=l.insert(()=>v,":first-child");return B.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",y),o&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",o),m(e,B),e.intersect=function(t){return I.polygon(e,T,t)},l}(0,h.K)(fe,"triangle"),(0,h.K)(ye,"waveEdgedRectangle"),(0,h.K)(me,"waveRectangle");var xe=10;async function Ce(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n="neo"===e.look?16:e.padding??0,a="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*n-xe,10),e.height=Math.max((e?.height??0)-2*a-xe,10));const{shapeSvg:s,bbox:l,label:h}=await f(t,e,x(e)),c=(e?.width?e?.width:l.width)+2*n+xe,u=(e?.height?e?.height:l.height)+2*a+xe,p=c-xe,g=u-xe,y=-p/2,C=-g/2,{cssStyles:b}=e,k=d.A.svg(s),w=(0,i.Fr)(e,{}),T=[{x:y-xe,y:C-xe},{x:y-xe,y:C+g},{x:y+p,y:C+g},{x:y+p,y:C-xe}],S=`M${y-xe},${C-xe} L${y+p},${C-xe} L${y+p},${C+g} L${y-xe},${C+g} L${y-xe},${C-xe}\n M${y-xe},${C} L${y+p},${C}\n M${y},${C-xe} L${y},${C+g}`;"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const v=k.path(S,w),B=s.insert(()=>v,":first-child");return B.attr("transform","translate(5, 5)"),B.attr("class","basic label-container outer-path"),b&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",b),o&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",o),h.attr("transform",`translate(${-l.width/2+5-(l.x-(l.left??0))}, ${-l.height/2+5-(l.y-(l.top??0))})`),m(e,B),e.intersect=function(t){return I.polygon(e,T,t)},s}(0,h.K)(Ce,"windowPane");var be=new Set(["redux-color","redux-dark-color"]),ke=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function we(t,e){const r=e;r.alias&&(e.label=r.alias);const{theme:o,themeVariables:n}=(0,s.zj)(),{rowEven:l,rowOdd:h,nodeBorder:u,borderColorArray:p}=n;if("handDrawn"===e.look){const{themeVariables:r}=(0,s.zj)(),{background:i}=r,o={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${i}`]};await we(t,o)}const g=(0,s.zj)();e.useHtmlLabels=g.htmlLabels;let f=g.er?.diagramPadding??10,y=g.er?.entityPadding??6;const{cssStyles:C}=e,{labelStyles:b,nodeStyles:k}=(0,i.GX)(e);if(0===r.attributes.length&&e.label){const i={rx:0,ry:0,labelPaddingX:f,labelPaddingY:1.5*f,classes:""};(0,a.Un)(e.label,g)+2*i.labelPaddingX0){const t=S.width+2*f-(A+L+F+M);A+=t/O,L+=t/O,F>0&&(F+=t/O),M>0&&(M+=t/O)}const K=A+L+F+M,q=d.A.svg(T),R=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(R.roughness=0,R.fillStyle="solid");let P=0;_.length>0&&(P=_.reduce((t,e)=>t+(e?.rowHeight??0),0));const z=Math.max(D.width+2*f,e?.width||0,K),N=Math.max((P??0)+S.height,e?.height||0),j=-z/2,W=-N/2;if(T.selectAll("g:not(:first-child)").each((t,e,r)=>{const i=(0,c.Ltv)(r[e]),o=i.attr("transform");let n=0,a=0;if(o){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);t&&(n=parseFloat(t[1]),a=parseFloat(t[2]),i.attr("class").includes("attribute-name")?n+=A:i.attr("class").includes("attribute-keys")?n+=A+L:i.attr("class").includes("attribute-comment")&&(n+=A+L+F))}i.attr("transform",`translate(${j+f/2+n}, ${a+W+S.height+y/2})`)}),T.select(".name").attr("transform","translate("+-S.width/2+", "+(W+y/2)+")"),null!=o&&be.has(o)){const t=r.colorIndex??0;T.attr("data-color-id","color-"+t%p.length)}const H=q.rectangle(j,W,z,N,R),U=T.insert(()=>H,":first-child").attr("class","outer-path").attr("style",C.join(""));B.push(0);for(const[i,a]of _.entries()){const t=(i+1)%2==0&&0!==a.yOffset,e=q.rectangle(j,S.height+W+a?.yOffset,z,a?.rowHeight,{...R,fill:t?l:h,stroke:u});T.insert(()=>e,"g.label").attr("style",C.join("")).attr("class","row-rect-"+(t?"even":"odd"))}const Y=1e-4;let G=Se(j,S.height+W,z+j,S.height+W,Y),X=q.polygon(G.map(t=>[t.x,t.y]),R);if(T.insert(()=>X).attr("class","divider"),G=Se(A+j,S.height+W,A+j,N+W,Y),X=q.polygon(G.map(t=>[t.x,t.y]),R),T.insert(()=>X).attr("class","divider"),E){const t=A+L+j;G=Se(t,S.height+W,t,N+W,Y),X=q.polygon(G.map(t=>[t.x,t.y]),R),T.insert(()=>X).attr("class","divider")}if($){const t=A+L+F+j;G=Se(t,S.height+W,t,N+W,Y),X=q.polygon(G.map(t=>[t.x,t.y]),R),T.insert(()=>X).attr("class","divider")}for(const i of B){const t=S.height+W+i;G=Se(j,t,z+j,t,Y),X=q.polygon(G.map(t=>[t.x,t.y]),R),T.insert(()=>X).attr("class","divider")}if(m(e,U),k&&"handDrawn"!==e.look)if(null!=o&&ke.has(o))T.selectAll("path").attr("style",k);else{const t=k.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");T.selectAll("path").attr("style",e??""),T.selectAll(".row-rect-even path").attr("style",k)}return e.intersect=function(t){return I.rect(e,t)},T}async function Te(t,e,r,i=0,n=0,l=[],h=""){const d=t.insert("g").attr("class",`label ${l.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",h);e!==(0,s.QO)(e)&&(e=(e=(0,s.QO)(e)).replaceAll("<","<").replaceAll(">",">"));const u=d.node().appendChild(await(0,o.GZ)(d,e,{width:(0,a.Un)(e,r)+100,style:h,useHtmlLabels:r.htmlLabels},r));if(e.includes("<")||e.includes(">")){let t=u.children[0];for(t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">");t.childNodes[0];)t=t.childNodes[0],t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">")}let p=u.getBBox();if((0,s._3)(r.htmlLabels)){const t=u.children[0];t.style.textAlign="start";const e=(0,c.Ltv)(u);p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}return p}function Se(t,e,r,i,o){return t===r?[{x:t-o/2,y:e},{x:t+o/2,y:e},{x:r+o/2,y:i},{x:r-o/2,y:i}]:[{x:t,y:e-o/2},{x:t,y:e+o/2},{x:r,y:i+o/2},{x:r,y:i-o/2}]}async function ve(t,e,r,i,o=r.class.padding??12){const n=i?0:3,a=t.insert("g").attr("class",x(e)).attr("id",e.domId||e.id);let s=null,l=null,h=null,c=null,d=0,u=0,p=0;if(s=a.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const t=e.annotations[0];await Be(s,{text:`\xab${t}\xbb`},0);d=s.node().getBBox().height}l=a.insert("g").attr("class","label-group text"),await Be(l,e,0,["font-weight: bolder"]);const g=l.node().getBBox();u=g.height,h=a.insert("g").attr("class","members-group text");let f=0;for(const x of e.members){f+=await Be(h,x,f,[x.parseClassifier()])+n}p=h.node().getBBox().height,p<=0&&(p=o/2),c=a.insert("g").attr("class","methods-group text");let y=0;for(const x of e.methods){y+=await Be(c,x,y,[x.parseClassifier()])+n}let m=a.node().getBBox();if(null!==s){const t=s.node().getBBox();s.attr("transform",`translate(${-t.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${d})`),m=a.node().getBBox(),h.attr("transform",`translate(0, ${d+u+2*o})`),m=a.node().getBBox(),c.attr("transform",`translate(0, ${d+u+(p?p+4*o:2*o)})`),m=a.node().getBBox(),{shapeSvg:a,bbox:m}}async function Be(t,e,r,i=[]){const n=t.insert("g").attr("class","label").attr("style",i.join("; ")),l=(0,s.zj)();let h="useHtmlLabels"in e?e.useHtmlLabels:(0,s._3)(l.htmlLabels)??!0,d="";d="text"in e?e.text:e.label,!h&&d.startsWith("\\")&&(d=d.substring(1)),(0,s.Wi)(d)&&(h=!0);const p=await(0,o.GZ)(n,(0,s.oB)((0,a.Sm)(d)),{width:(0,a.Un)(d,l)+50,classes:"markdown-node-label",useHtmlLabels:h},l);let g,f=1;if(h){const t=p.children[0],e=(0,c.Ltv)(p);f=t.innerHTML.split("
    ").length,t.innerHTML.includes("")&&(f+=t.innerHTML.split("").length-1),await u(t),g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}else{i.includes("font-weight: bolder")&&(0,c.Ltv)(p).selectAll("tspan").attr("font-weight",""),f=p.children.length;const t=p.children[0];if(""===p.textContent||p.textContent.includes(">")){t.textContent=d[0]+d.substring(1).replaceAll(">",">").replaceAll("<","<").trim();" "===d[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))}"undefined"===t.textContent&&(t.textContent=""),g=p.getBBox()}return n.attr("transform","translate(0,"+(-g.height/(2*f)+r)+")"),g.height}async function _e(t,e){const r=(0,s.D7)(),{themeVariables:o}=r,{useGradient:n}=o,a=r.class.padding??12,l=a,h=e.useHtmlLabels??(0,s._3)(r.htmlLabels)??!0,u=e;u.annotations=u.annotations??[],u.members=u.members??[],u.methods=u.methods??[];const{shapeSvg:p,bbox:g}=await ve(t,e,r,h,l),{labelStyles:f,nodeStyles:y}=(0,i.GX)(e);e.labelStyle=f,e.cssStyles=u.styles||"";const x=u.styles?.join(";")||y||"";e.cssStyles||(e.cssStyles=x.replaceAll("!important","").split(";"));const C=0===u.members.length&&0===u.methods.length&&!r.class?.hideEmptyMembersBox,b=d.A.svg(p),k=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=Math.max(e.width??0,g.width);let T=Math.max(e.height??0,g.height);const S=(e.height??0)>g.height;0===u.members.length&&0===u.methods.length?T+=l:u.members.length>0&&0===u.methods.length&&(T+=2*l);const v=-w/2,B=-T/2;let _=C?2*a:0===u.members.length&&0===u.methods.length?-a:0;S&&(_=2*a);const A=b.rectangle(v-a,B-a-(C?a:0===u.members.length&&0===u.methods.length?-a/2:0),w+2*a,T+2*a+_,k),L=p.insert(()=>A,":first-child");L.attr("class","basic label-container outer-path");const F=L.node().getBBox(),M=p.select(".annotation-group").node().getBBox().height-(C?a/2:0)||0,E=p.select(".label-group").node().getBBox().height-(C?a/2:0)||0,$=p.select(".members-group").node().getBBox().height-(C?a/2:0)||0,O=(M+E+B+a-(B-a-(C?a:0===u.members.length&&0===u.methods.length?-a/2:0)))/2;if(p.selectAll(".text").each((t,e,i)=>{const o=(0,c.Ltv)(i[e]),n=o.attr("transform");let s=0;if(n){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n);t&&(s=parseFloat(t[2]))}let d=s+B+a-(C?a:0===u.members.length&&0===u.methods.length?-a/2:0);if(o.attr("class").includes("methods-group")){const t=Math.max($,l/2);d=S?Math.max(O,M+E+t+B+2*l+a)+2*l:M+E+t+B+4*l+a}0===u.members.length&&0===u.methods.length&&r.class?.hideEmptyMembersBox&&(d=u.annotations.length>0?s-l:s),h||(d-=4);let g=v;(o.attr("class").includes("label-group")||o.attr("class").includes("annotation-group"))&&(g=-o.node()?.getBBox().width/2||0,p.selectAll("text").each(function(t,e,r){"middle"===window.getComputedStyle(r[e]).textAnchor&&(g=0)})),o.attr("transform",`translate(${g}, ${d})`)}),u.members.length>0||u.methods.length>0||C){const t=M+E+B+a,r=b.line(F.x,t,F.x+F.width,t+.001,k);p.insert(()=>r).attr("class","divider"+("neo"!==e.look||n?"":" neo-line")).attr("style",x)}if(C||u.members.length>0||u.methods.length>0){const t=M+E+$+B+2*l+a,r=b.line(F.x,S?Math.max(O,t):t,F.x+F.width,(S?Math.max(O,t):t)+.001,k);p.insert(()=>r).attr("class","divider"+("neo"!==e.look||n?"":" neo-line")).attr("style",x)}if("handDrawn"!==u.look&&p.selectAll("path").attr("style",x),L.select(":nth-child(2)").attr("style",x),p.selectAll(".divider").select("path").attr("style",x),e.labelStyle?p.selectAll("span").attr("style",e.labelStyle):p.selectAll("span").attr("style",x),!h){const t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(x);if(e){const t=e[0].replace("color","fill");p.selectAll("tspan").attr("style",t)}else if(f){const e=t.exec(f);if(e){const t=e[0].replace("color","fill");p.selectAll("tspan").attr("style",t)}}}return m(e,L),e.intersect=function(t){return I.rect(e,t)},p}async function Ae(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e,a=e,l="verifyMethod"in e,h=x(e),u=(0,s.D7)(),{themeVariables:p}=u,{borderColorArray:g,requirementEdgeLabelBackground:f}=p,y="elk"===u.layout?"start":"center",C=t.insert("g").attr("class",h).attr("id",e.domId??e.id);let b;b=l?await Le(C,`<<${n.type}>>`,0,e.labelStyle):await Le(C,"<<Element>>",0,e.labelStyle);let k=b;const w=await Le(C,n.name,k,e.labelStyle+"; font-weight: bold;");if(k+=w+20,l){k+=await Le(C,""+(n.requirementId?`ID: ${n.requirementId}`:""),k,e.labelStyle,y);k+=await Le(C,""+(n.text?`Text: ${n.text}`:""),k,e.labelStyle,y);k+=await Le(C,""+(n.risk?`Risk: ${n.risk}`:""),k,e.labelStyle,y),await Le(C,""+(n.verifyMethod?`Verification: ${n.verifyMethod}`:""),k,e.labelStyle,y)}else{k+=await Le(C,""+(a.type?`Type: ${a.type}`:""),k,e.labelStyle,y),await Le(C,""+(a.docRef?`Doc Ref: ${a.docRef}`:""),k,e.labelStyle,y)}const T=(C.node()?.getBBox().width??200)+20,S=(C.node()?.getBBox().height??200)+20,v=-T/2,B=-S/2,_=d.A.svg(C),A=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");const L=_.rectangle(v,B,T,S,A),F=C.insert(()=>L,":first-child");if(F.attr("class","basic label-container outer-path").attr("style",o),g?.length){const t=e.colorIndex??0;C.attr("data-color-id","color-"+t%g.length)}if(C.selectAll(".label").each((t,e,r)=>{const i=(0,c.Ltv)(r[e]),o=i.attr("transform");let n=0,a=0;if(o){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);t&&(n=parseFloat(t[1]),a=parseFloat(t[2]))}const s=a-S/2;let l=v+10;0!==e&&1!==e||(l=n),i.attr("transform",`translate(${l}, ${s+20})`)}),k>b+w+20){const t=B+b+w+20;let r;if("neo"===e.look){const e=.001,i=[[v,t],[v+T,t],[v+T,t+e],[v,t+e]];r=_.polygon(i,A)}else r=_.line(v,t,v+T,t,A);C.insert(()=>r).attr("class","divider")}return m(e,F),e.intersect=function(t){return I.rect(e,t)},o&&"handDrawn"!==e.look&&(f||g?.length)&&C.selectAll("path").attr("style",o),C}async function Le(t,e,r,i="",n="center"){if(""===e)return 0;const l=t.insert("g").attr("class","label").attr("style",i),h=(0,s.D7)(),d=h.htmlLabels??!0,u=await(0,o.GZ)(l,(0,s.oB)((0,a.Sm)(e)),{width:(0,a.Un)(e,h)+50,classes:"markdown-node-label",useHtmlLabels:d,style:i},h);let p;if(d){const t=u.children[0],e=(0,c.Ltv)(u);"start"===n&&(0,c.Ltv)(t).style("text-align","left"),p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}else{const t=u.children[0];for(const e of t.children)i&&e.setAttribute("style",i);if("start"===n){t.setAttribute("text-anchor","start");for(const e of t.children)e.setAttribute("text-anchor","start")}p=u.getBBox(),p.height+=6}return l.attr("transform",`translate(${-p.width/2},${-p.height/2+r})`),p.height}(0,h.K)(we,"erBox"),(0,h.K)(Te,"addText"),(0,h.K)(Se,"lineToPolygon"),(0,h.K)(ve,"textHelper"),(0,h.K)(Be,"addText"),(0,h.K)(_e,"classBox"),(0,h.K)(Ae,"requirementBox"),(0,h.K)(Le,"addText");var Fe=(0,h.K)(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function Me(t,e,{config:r}){const{labelStyles:o,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=o||"";const a=e.width;e.width=(e.width??200)-10;const{shapeSvg:s,bbox:l,label:h}=await f(t,e,x(e)),c=e.padding||10;let u,p="";"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(p=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),u=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",p).attr("target","_blank"));const g={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let C,b;({label:C,bbox:b}=u?await y(u,"ticket"in e&&e.ticket||"",g):await y(s,"ticket"in e&&e.ticket||"",g));const{label:k,bbox:w}=await y(s,"assigned"in e&&e.assigned||"",g);e.width=a;const T=e?.width||0,v=Math.max(b.height,w.height)/2,B=Math.max(l.height+20,e?.height||0)+v,_=-T/2,A=-B/2;let L;h.attr("transform","translate("+(c-T/2)+", "+(-v-l.height/2)+")"),C.attr("transform","translate("+(c-T/2)+", "+(-v+l.height/2)+")"),k.attr("transform","translate("+(c+T/2-w.width-20)+", "+(-v+l.height/2)+")");const{rx:F,ry:M}=e,{cssStyles:E}=e;if("handDrawn"===e.look){const t=d.A.svg(s),r=(0,i.Fr)(e,{}),o=F||M?t.path(S(_,A,T,B,F||0),r):t.rectangle(_,A,T,B,r);L=s.insert(()=>o,":first-child"),L.attr("class","basic label-container").attr("style",E||null)}else{L=s.insert("rect",":first-child"),L.attr("class","basic label-container __APA__").attr("style",n).attr("rx",F??5).attr("ry",M??5).attr("x",_).attr("y",A).attr("width",T).attr("height",B);const t="priority"in e&&e.priority;if(t){const e=s.append("line"),r=_+2,i=A+Math.floor((F??0)/2),o=A+B-Math.floor((F??0)/2);e.attr("x1",r).attr("y1",i).attr("x2",r).attr("y2",o).attr("stroke-width","4").attr("stroke",Fe(t))}}return m(e,L),e.height=B,e.intersect=function(t){return I.rect(e,t)},s}async function Ee(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:s,halfPadding:h,label:c}=await f(t,e,x(e)),u=s.width+10*h,p=s.height+8*h,g=.15*u,{cssStyles:y}=e,C=s.width+20,b=s.height+20,k=Math.max(u,C),w=Math.max(p,b);let T;c.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);const S=`M0 0 \n a${g},${g} 1 0,0 ${.25*k},${-1*w*.1}\n a${g},${g} 1 0,0 ${.25*k},0\n a${g},${g} 1 0,0 ${.25*k},0\n a${g},${g} 1 0,0 ${.25*k},${.1*w}\n\n a${g},${g} 1 0,0 ${.15*k},${.33*w}\n a${.8*g},${.8*g} 1 0,0 0,${.34*w}\n a${g},${g} 1 0,0 ${-1*k*.15},${.33*w}\n\n a${g},${g} 1 0,0 ${-1*k*.25},${.15*w}\n a${g},${g} 1 0,0 ${-1*k*.25},0\n a${g},${g} 1 0,0 ${-1*k*.25},0\n a${g},${g} 1 0,0 ${-1*k*.25},${-1*w*.15}\n\n a${g},${g} 1 0,0 ${-1*k*.1},${-1*w*.33}\n a${.8*g},${.8*g} 1 0,0 0,${-1*w*.34}\n a${g},${g} 1 0,0 ${.1*k},${-1*w*.33}\n H0 V0 Z`;if("handDrawn"===e.look){const t=d.A.svg(n),r=(0,i.Fr)(e,{}),o=t.path(S,r);T=n.insert(()=>o,":first-child"),T.attr("class","basic label-container").attr("style",(0,a.KL)(y))}else T=n.insert("path",":first-child").attr("class","basic label-container").attr("style",o).attr("d",S);return T.attr("transform",`translate(${-k/2}, ${-w/2})`),m(e,T),e.calcIntersect=function(t,e){return I.rect(t,e)},e.intersect=function(t){return l.R.info("Bang intersect",e,t),I.rect(e,t)},n}async function $e(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:s,halfPadding:h,label:c}=await f(t,e,x(e)),u=s.width+2*h,p=s.height+2*h,g=.15*u,y=.25*u,C=.35*u,b=.2*u,{cssStyles:k}=e;let w;const T=`M0 0 \n a${g},${g} 0 0,1 ${.25*u},${-1*u*.1}\n a${C},${C} 1 0,1 ${.4*u},${-1*u*.1}\n a${y},${y} 1 0,1 ${.35*u},${.2*u}\n\n a${g},${g} 1 0,1 ${.15*u},${.35*p}\n a${b},${b} 1 0,1 ${-1*u*.15},${.65*p}\n\n a${y},${g} 1 0,1 ${-1*u*.25},${.15*u}\n a${C},${C} 1 0,1 ${-1*u*.5},0\n a${g},${g} 1 0,1 ${-1*u*.25},${-1*u*.15}\n\n a${g},${g} 1 0,1 ${-1*u*.1},${-1*p*.35}\n a${b},${b} 1 0,1 ${.1*u},${-1*p*.65}\n H0 V0 Z`;if("handDrawn"===e.look){const t=d.A.svg(n),r=(0,i.Fr)(e,{}),o=t.path(T,r);w=n.insert(()=>o,":first-child"),w.attr("class","basic label-container").attr("style",(0,a.KL)(k))}else w=n.insert("path",":first-child").attr("class","basic label-container").attr("style",o).attr("d",T);return c.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),w.attr("transform",`translate(${-u/2}, ${-p/2})`),m(e,w),e.calcIntersect=function(t,e){return I.rect(t,e)},e.intersect=function(t){return l.R.info("Cloud intersect",e,t),I.rect(e,t)},n}async function Oe(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s,label:l}=await f(t,e,x(e)),h=a.width+8*s,c=a.height+2*s,d="neo"===e.look?`\n M${-h/2} ${c/2-5}\n v${10-c}\n q0,-5 5,-5\n h${h-10}\n q5,0 5,5\n v${c-5}\n H${-h/2}\n Z\n `:`\n M${-h/2} ${c/2-5}\n v${10-c}\n q0,-5 5,-5\n h${h-10}\n q5,0 5,5\n v${c-10}\n q0,5 -5,5\n h${-(h-10)}\n q-5,0 -5,-5\n Z\n `;if(!e.domId)throw new Error(`defaultMindmapNode: node "${e.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);const u=n.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",o).attr("d",d);return n.append("line").attr("class","node-line-").attr("x1",-h/2).attr("y1",c/2).attr("x2",h/2).attr("y2",c/2),l.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),n.append(()=>l.node()),m(e,u),e.calcIntersect=function(t,e){return I.rect(t,e)},e.intersect=function(t){return I.rect(e,t)},n}async function De(t,e){return tt(t,e,{padding:e.padding??0})}(0,h.K)(Me,"kanbanItem"),(0,h.K)(Ee,"bang"),(0,h.K)($e,"cloud"),(0,h.K)(Oe,"defaultMindmapNode"),(0,h.K)(De,"mindmapCircle");var Ie=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:te},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Zt},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:ee},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:ne},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:yt},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:xt},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:Tt},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:z},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:rt},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:Z},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:ut},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:tt},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Ee},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:$e},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Gt},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:_t},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Kt},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:It},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:pe},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:Ot},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:bt},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:le},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Q},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Qt},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:oe},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:ie},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:St},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:At},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:at},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:lt},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:ct},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:qt},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ye},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:vt},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:ue},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Nt},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:dt},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Ct},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:fe},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Ce},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:kt},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:ge},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:wt},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Jt},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Ht},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Wt},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:P},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:ot},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:se},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:ae},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:me},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Xt},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:jt}],Ke=(0,h.K)(()=>{const t={state:re,choice:J,note:Ut,composite:et,rectWithTitle:Vt,labelRect:Dt,block_arrow:V,collapsedGroup:N,iconSquare:Et,iconCircle:Ft,icon:Lt,iconRounded:Mt,imageSquare:$t,anchor:K,kanbanItem:Me,mindmapCircle:De,defaultMindmapNode:Oe,classBox:_e,erBox:we,requirementBox:Ae},e=[...Object.entries(t),...Ie.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))];return Object.fromEntries(e)},"generateShapeMap")();function qe(t){return t in Ke}(0,h.K)(qe,"isValidShape")},31293(t,e,r){"use strict";r.d(e,{H:()=>s,R:()=>a});var i=r(86827),o=r(74353),n={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},a={trace:(0,i.K)((...t)=>{},"trace"),debug:(0,i.K)((...t)=>{},"debug"),info:(0,i.K)((...t)=>{},"info"),warn:(0,i.K)((...t)=>{},"warn"),error:(0,i.K)((...t)=>{},"error"),fatal:(0,i.K)((...t)=>{},"fatal")},s=(0,i.K)(function(t="fatal"){let e=n.fatal;"string"==typeof t?t.toLowerCase()in n&&(e=n[t]):"number"==typeof t&&(e=t),a.trace=()=>{},a.debug=()=>{},a.info=()=>{},a.warn=()=>{},a.error=()=>{},a.fatal=()=>{},e<=n.fatal&&(a.fatal=console.error?console.error.bind(console,l("FATAL"),"color: orange"):console.log.bind(console,"\x1b[35m",l("FATAL"))),e<=n.error&&(a.error=console.error?console.error.bind(console,l("ERROR"),"color: orange"):console.log.bind(console,"\x1b[31m",l("ERROR"))),e<=n.warn&&(a.warn=console.warn?console.warn.bind(console,l("WARN"),"color: orange"):console.log.bind(console,"\x1b[33m",l("WARN"))),e<=n.info&&(a.info=console.info?console.info.bind(console,l("INFO"),"color: lightblue"):console.log.bind(console,"\x1b[34m",l("INFO"))),e<=n.debug&&(a.debug=console.debug?console.debug.bind(console,l("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",l("DEBUG"))),e<=n.trace&&(a.trace=console.debug?console.debug.bind(console,l("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",l("TRACE")))},"setLogLevel"),l=(0,i.K)(t=>`%c${o().format("ss.SSS")} : ${t} : `,"format")},86827(t,e,r){"use strict";r.d(e,{K:()=>o,V:()=>n});var i=Object.defineProperty,o=(t,e)=>i(t,"name",{value:e,configurable:!0}),n=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})}},44108(t,e,r){"use strict";r.r(e),r.d(e,{clearLayoutRenderState:()=>o.n5,createCommonLayoutRenderer:()=>o.xY,default:()=>Pe,defaultMeasureLayout:()=>o.QV,paintLayoutData:()=>o.nf});var i=r(5637),o=r(35167),n=r(841),a=r(9417),s=(r(78771),r(46853),r(717),r(79515),r(44505),r(72379),r(58962)),l=r(16459),h=r(76385),c=r(31293),d=r(86827),u=r(60513),p=r(70451),g=r(50483),f=r(73716),y=r(72373),m=r(24534),x=r(99418),C=r(91461),b=r(23058),k=r(14608);var w=r(19663);function T(t){if(null==t)return!0;if((0,b.X)(t))return!!("function"==typeof t.splice||"string"==typeof t||(0,C.P)(t)||(0,w.i)(t)||(0,k.N)(t))&&0===t.length;if("object"==typeof t||"function"==typeof t){if(t instanceof Map||t instanceof Set)return 0===t.size;const e=Object.keys(t);return function(t){const e=t?.constructor;return t===("function"==typeof e?e.prototype:Object.prototype)}(t)?0===e.filter(t=>"constructor"!==t).length:0===e.length}return!0}var S={id:"c4",detector:(0,d.K)(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(1070).then(r.bind(r,1070));return{id:"c4",diagram:t}},"loader")},v="flowchart",B={id:v,detector:(0,d.K)((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(6506),r.e(6488)]).then(r.bind(r,16488));return{id:v,diagram:t}},"loader")},_="flowchart-v2",A={id:_,detector:(0,d.K)((t,e)=>"dagre-d3"!==e?.flowchart?.defaultRenderer&&("elk"===e?.flowchart?.defaultRenderer&&(e.layout="elk"),!(!/^\s*graph/.test(t)||"dagre-wrapper"!==e?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(t)),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(6506),r.e(4107)]).then(r.bind(r,16488));return{id:_,diagram:t}},"loader")},L="swimlane",F={id:L,detector:(0,d.K)(t=>/^\s*swimlane-beta\b/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(6506),r.e(6459)]).then(r.bind(r,66459));return{id:L,diagram:t}},"loader")},M={id:"er",detector:(0,d.K)(t=>/^\s*erDiagram/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(4253).then(r.bind(r,34253));return{id:"er",diagram:t}},"loader")},E="gitGraph",$={id:E,detector:(0,d.K)(t=>/^\s*gitGraph/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(8731),r.e(6789)]).then(r.bind(r,46789));return{id:E,diagram:t}},"loader")},O="gantt",D={id:O,detector:(0,d.K)(t=>/^\s*gantt/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(2822).then(r.bind(r,92822));return{id:O,diagram:t}},"loader")},I="info",K={id:I,detector:(0,d.K)(t=>/^\s*info/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(8731),r.e(2637)]).then(r.bind(r,82637));return{id:I,diagram:t}},"loader")},q={id:"pie",detector:(0,d.K)(t=>/^\s*pie/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(8731),r.e(6806)]).then(r.bind(r,76806));return{id:"pie",diagram:t}},"loader")},R="quadrantChart",P={id:R,detector:(0,d.K)(t=>/^\s*quadrantChart/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(7486).then(r.bind(r,87486));return{id:R,diagram:t}},"loader")},z="xychart",N={id:z,detector:(0,d.K)(t=>/^\s*xychart(-beta)?/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(4061).then(r.bind(r,34061));return{id:z,diagram:t}},"loader")},j="requirement",W={id:j,detector:(0,d.K)(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(6535).then(r.bind(r,56535));return{id:j,diagram:t}},"loader")},H="sequence",U={id:H,detector:(0,d.K)(t=>/^\s*sequenceDiagram/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(4985).then(r.bind(r,24985));return{id:H,diagram:t}},"loader")},Y="class",G={id:Y,detector:(0,d.K)((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(2824),r.e(821)]).then(r.bind(r,40821));return{id:Y,diagram:t}},"loader")},X="classDiagram",V={id:X,detector:(0,d.K)((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(2824),r.e(4306)]).then(r.bind(r,84306));return{id:X,diagram:t}},"loader")},Z="state",Q={id:Z,detector:(0,d.K)((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(3765),r.e(4806),r.e(1327)]).then(r.bind(r,41327));return{id:Z,diagram:t}},"loader")},J="stateDiagram",tt={id:J,detector:(0,d.K)((t,e)=>!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==e?.state?.defaultRenderer),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4806),r.e(5332)]).then(r.bind(r,75332));return{id:J,diagram:t}},"loader")},et="journey",rt={id:et,detector:(0,d.K)(t=>/^\s*journey/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(4325).then(r.bind(r,4325));return{id:et,diagram:t}},"loader")},it={draw:(0,d.K)((t,e,r)=>{c.R.debug("rendering svg for syntax error\n");const o=(0,i.D)(e),n=o.append("g");o.attr("viewBox","0 0 2412 512"),(0,h.a$)(o,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw")},ot=it,nt={db:{},renderer:it,parser:{parse:(0,d.K)(()=>{},"parse")}},at="flowchart-elk",st={id:at,detector:(0,d.K)((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(6506),r.e(1726)]).then(r.bind(r,16488));return{id:at,diagram:t}},"loader")},lt="timeline",ht={id:lt,detector:(0,d.K)(t=>/^\s*timeline/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(1045).then(r.bind(r,91045));return{id:lt,diagram:t}},"loader")},ct="mindmap",dt={id:ct,detector:(0,d.K)(t=>/^\s*mindmap/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(5672).then(r.bind(r,25672));return{id:ct,diagram:t}},"loader")},ut="kanban",pt={id:ut,detector:(0,d.K)(t=>/^\s*kanban/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(5315).then(r.bind(r,35315));return{id:ut,diagram:t}},"loader")},gt="sankey",ft={id:gt,detector:(0,d.K)(t=>/^\s*sankey(-beta)?/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(8952).then(r.bind(r,88952));return{id:gt,diagram:t}},"loader")},yt="packet",mt={id:yt,detector:(0,d.K)(t=>/^\s*packet(-beta)?/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(8731),r.e(3509)]).then(r.bind(r,83509));return{id:yt,diagram:t}},"loader")},xt="radar",Ct={id:xt,detector:(0,d.K)(t=>/^\s*radar-beta/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(8731),r.e(6571)]).then(r.bind(r,76571));return{id:xt,diagram:t}},"loader")},bt="block",kt={id:bt,detector:(0,d.K)(t=>/^\s*block(-beta)?/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(6210).then(r.bind(r,83829));return{id:bt,diagram:t}},"loader")},wt="treeView",Tt={id:wt,detector:(0,d.K)(t=>/^\s*treeView-beta/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(8731),r.e(583)]).then(r.bind(r,30583));return{id:wt,diagram:t}},"loader")},St="architecture",vt={id:St,detector:(0,d.K)(t=>/^\s*architecture/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(8731),r.e(165),r.e(6344)]).then(r.bind(r,6344));return{id:St,diagram:t}},"loader")},Bt="eventmodeling",_t={id:Bt,detector:(0,d.K)(t=>/^\s*eventmodeling/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(8731),r.e(3510)]).then(r.bind(r,93510));return{id:Bt,diagram:t}},"loader")},At="ishikawa",Lt={id:At,detector:(0,d.K)(t=>/^\s*ishikawa(-beta)?\b/i.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(6803).then(r.bind(r,66803));return{id:At,diagram:t}},"loader")},Ft="venn",Mt={id:Ft,detector:(0,d.K)(t=>/^\s*venn-beta/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(4246).then(r.bind(r,24246));return{id:Ft,diagram:t}},"loader")},Et="treemap",$t={id:Et,detector:(0,d.K)(t=>/^\s*treemap/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(8731),r.e(8677)]).then(r.bind(r,88677));return{id:Et,diagram:t}},"loader")},Ot="wardley",Dt={id:Ot,detector:(0,d.K)(t=>/^\s*wardley-beta/i.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(8731),r.e(7483)]).then(r.bind(r,27483));return{id:Ot,diagram:t}},"loader")},It="cynefin",Kt={id:It,detector:(0,d.K)(t=>/^\s*cynefin-beta(?:[\s:]|$)/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(8731),r.e(629)]).then(r.bind(r,30629));return{id:It,diagram:t}},"loader")},qt="railroad",Rt={id:qt,detector:(0,d.K)(t=>/^\s*railroad-beta/i.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(8731),r.e(6164),r.e(200)]).then(r.bind(r,60200));return{id:qt,diagram:t}},"loader")},Pt="railroadEbnf",zt={id:Pt,detector:(0,d.K)(t=>/^\s*railroad-ebnf-beta/i.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(8731),r.e(6164),r.e(1738)]).then(r.bind(r,51738));return{id:Pt,diagram:t}},"loader")},Nt="railroadAbnf",jt={id:Nt,detector:(0,d.K)(t=>/^\s*railroad-abnf-beta/i.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(8731),r.e(6164),r.e(3608)]).then(r.bind(r,13608));return{id:Nt,diagram:t}},"loader")},Wt="railroadPeg",Ht={id:Wt,detector:(0,d.K)(t=>/^\s*railroad-peg-beta/i.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(8731),r.e(6164),r.e(2122)]).then(r.bind(r,2122));return{id:Wt,diagram:t}},"loader")},Ut=!1,Yt=(0,d.K)(()=>{Ut||(Ut=!0,(0,h.Js)("error",nt,t=>"error"===t.toLowerCase().trim()),(0,h.Js)("---",{db:{clear:(0,d.K)(()=>{},"clear")},styles:{},renderer:{draw:(0,d.K)(()=>{},"draw")},parser:{parse:(0,d.K)(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:(0,d.K)(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),(0,h.Xd)(st,dt,vt),(0,h.Xd)(S,pt,V,G,M,D,K,q,W,U,F,A,B,ht,$,tt,Q,rt,P,ft,mt,N,kt,_t,Tt,Ct,Lt,$t,Rt,zt,jt,Ht,Mt,Dt,Kt))},"addDiagrams"),Gt=(0,d.K)(async()=>{c.R.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(h.mW).map(async([t,{detector:e,loader:r}])=>{if(r)try{(0,h.Gs)(t)}catch{try{const{diagram:t,id:i}=await r();(0,h.Js)(i,t,e)}catch(i){throw c.R.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete h.mW[t],i}}}))).filter(t=>"rejected"===t.status);if(t.length>0){c.R.error(`Failed to load ${t.length} external diagrams`);for(const e of t)c.R.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams");function Xt(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function Vt(t,e,r,i){if(void 0!==t.insert){if(r){const e=`chart-desc-${i}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(r)}if(e){const r=`chart-title-${i}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}(0,d.K)(Xt,"setA11yDiagramInfo"),(0,d.K)(Vt,"addSVGa11yTitleDescription");var Zt=class t{constructor(t,e,r,i,o){this.type=t,this.text=e,this.db=r,this.parser=i,this.renderer=o}static{(0,d.K)(this,"Diagram")}static async fromText(e,r={}){const i=(0,h.zj)(),o=(0,h.Ch)(e,i);e=(0,l.C4)(e)+"\n";try{(0,h.Gs)(o)}catch{const t=(0,h.J$)(o);if(!t)throw new h.C0(`Diagram ${o} not found.`);const{id:e,diagram:r}=await t();(0,h.Js)(e,r)}const{db:n,parser:a,renderer:s,init:c}=(0,h.Gs)(o);return a.parser&&(a.parser.yy=n),n.clear?.(),c?.(i),r.title&&n.setDiagramTitle?.(r.title),await a.parse(e),new t(o,e,n,a,s)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},Qt=[],Jt=(0,d.K)(()=>{Qt.forEach(t=>{t()}),Qt=[]},"attachFunctions"),te=(0,d.K)(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function ee(t){const e=t.match(h.EJ);if(!e)return{text:t,metadata:{}};const r=e[1],i=r?e[2].split("\n").map(t=>t.startsWith(r)?t.slice(r.length):t).join("\n"):e[2];let o=(0,n.H)(i,{schema:n.r})??{};o="object"!=typeof o||Array.isArray(o)?{}:o;const a={};return o.displayMode&&(a.displayMode=o.displayMode.toString()),o.title&&(a.title=o.title.toString()),o.config&&(a.config=o.config),{text:t.slice(e[0].length),metadata:a}}(0,d.K)(ee,"extractFrontMatter");var re=(0,d.K)(t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),ie=(0,d.K)(t=>{const{text:e,metadata:r}=ee(t),{displayMode:i,title:o,config:n={}}=r;return i&&(n.gantt||(n.gantt={}),n.gantt.displayMode=i),{title:o,config:n,text:e}},"processFrontmatter"),oe=(0,d.K)(t=>{const e=l._K.detectInit(t)??{},r=l._K.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:t})=>"wrap"===t):"wrap"===r?.type&&(e.wrap=!0),{text:(0,l.vU)(t),directive:e}},"processDirectives");function ne(t){const e=re(t),r=ie(e),i=oe(r.text),o=(0,l.$t)(r.config,i.directive);return{code:t=te(i.text),title:r.title,config:o}}function ae(t){const e=(new TextEncoder).encode(t),r=Array.from(e,t=>String.fromCodePoint(t)).join("");return btoa(r)}(0,d.K)(ne,"preprocessDiagram"),(0,d.K)(ae,"toBase64");var se=["foreignobject"],le=["dominant-baseline"];function he(t){const e=ne(t);return(0,h.cL)(),(0,h.xA)(e.config??{}),e}async function ce(t,e){Yt();try{const{code:e,config:r}=he(t);return{diagramType:(await we(e)).type,config:r}}catch(r){if(e?.suppressErrors)return!1;throw r}}(0,d.K)(he,"processAndSetConfigs"),(0,d.K)(ce,"parse");var de=(0,d.K)((t,e,r=[])=>`.${t} ${e} ${(0,h.Df)(`{ ${r.join(" !important; ")} !important; }`)}`,"cssImportantStyles"),ue=(0,d.K)((t,e=new Map)=>{const r=new CSSStyleSheet;if(void 0!==t.fontFamily&&r.insertRule(`:root { --mermaid-font-family: ${t.fontFamily}}`,r.cssRules.length),void 0!==t.altFontFamily&&r.insertRule(`:root { --mermaid-alt-font-family: ${t.altFontFamily}}`,r.cssRules.length),e instanceof Map){const i=(0,h.E)(t)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(t=>{T(t.styles)||i.forEach(e=>{r.insertRule(de(t.id,e,t.styles),r.cssRules.length)}),T(t.textStyles)||r.insertRule(de(t.id,"tspan",(t?.textStyles||[]).map(t=>t.replace("color","fill"))),r.cssRules.length)})}let i="";if(void 0!==t.themeCSS)if("function"==typeof r.replaceSync){const e=new CSSStyleSheet;e.replaceSync(t.themeCSS),i=(0,h.KG)(e)+"\n"}else i+=`${t.themeCSS}\n`;return i+(0,h.KG)(r)},"createCssStyles"),pe=(0,d.K)((t,e)=>(0,g.l)((0,f.wE)(`${t}{${e}}`),(0,y.r1)([(0,d.K)(function(e,r,i,o){if("rule"===e.type&&Array.isArray(e.props)){if(e.parent&&e.parent.type===m.Sv)return;e.props=e.props.map(r=>{if(r===t&&Array.isArray(e.children)&&e.children.every(t=>{if("decl"!==t.type)return!1;return new Set(["font-family","font-size","fill"]).has(t.props)}))return r;return(r.startsWith(`${t} `)||r.startsWith(`${t}>`))&&!r.startsWith(`${t} ||`)?r:`${t} ${r}`})}else if(e.type.startsWith("@")){[...[m.Rn,m.$1,m.IO,m.hx,"@container","@starting-style"],m.Sv].includes(e.type)||(c.R.warn(`Removing unsupported at-rule ${e.type} from CSS`),e.type=m.YK)}},"addNamespace"),g.A])),"compileCSS"),ge=(0,d.K)((t,e,r,i)=>{const o=ue(t,r),n=(0,h.tM)(e,o,{...t.themeVariables,theme:t.theme,look:t.look},i);return pe(i,n)},"createUserStyles"),fe=(0,d.K)((t="",e,r)=>{let i=t;return r||e||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=(0,l.Sm)(i),i=i.replace(/
    /g,"
    "),i},"cleanUpSvgCode"),ye=(0,d.K)((t="",e)=>``,"putIntoIFrame"),me=(0,d.K)((t,e,r,i,o)=>{const n=t.append("div");n.attr("id",r),i&&n.attr("style",i);const a=n.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return o&&a.attr("xmlns:xlink",o),a.append("g"),t},"appendDivSvgG");function xe(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}(0,d.K)(xe,"sandboxedIframe");var Ce=(0,d.K)((t,e,r,i)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(i)?.remove()},"removeExistingElements"),be=(0,d.K)(async function(t,e,r){Yt();const i=he(e);e=i.code;const o=(0,h.zj)();c.R.debug(o),e.length>(o?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const n=`#${t}`,a="i"+t,s="#"+a,l="d"+t,u="#"+l,g=(0,d.K)(()=>{const t=y?s:u,e=(0,p.Ltv)(t).node();e&&"remove"in e&&e.remove()},"removeTempElements");let f=(0,p.Ltv)(document.body);const y="sandbox"===o.securityLevel,m="loose"===o.securityLevel,C=o.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),y){const t=xe((0,p.Ltv)(r),a);f=(0,p.Ltv)(t.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=(0,p.Ltv)(r);me(f,t,l,`font-family: ${C}`,"http://www.w3.org/1999/xlink")}else{if(Ce(document,t,l,a),y){const t=xe((0,p.Ltv)(document.body),a);f=(0,p.Ltv)(t.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=(0,p.Ltv)("body");me(f,t,l)}let b,k;try{b=await Zt.fromText(e,{title:i.title})}catch($){if(o.suppressErrorRendering)throw g(),$;b=await Zt.fromText("error"),k=$}const w=f.select(u).node(),T=b.type,S=w.firstChild,v=S.firstChild,B=b.renderer.getClasses?.(e,b),_=ge(o,T,B,n),A=document.createElement("style");A.innerHTML=_,S.insertBefore(A,v);try{await b.renderer.draw(e,t,"11.17.0",b)}catch(O){throw o.suppressErrorRendering?g():ot.draw(e,t,"11.17.0"),O}const L=f.select(`${u} svg`),F=b.db.getAccTitle?.(),M=b.db.getAccDescription?.();Te(T,L,F,M);const E=(0,d.K)(()=>{f.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let e=f.select(u).node().innerHTML;if(c.R.debug("config.arrowMarkerAbsolute",o.arrowMarkerAbsolute),e=fe(e,y,(0,h._3)(o.arrowMarkerAbsolute)),y){const t=f.select(u+" svg").node();e=ye(e,t)}else m||(e=x.A.sanitize(e,{ADD_TAGS:se,ADD_ATTR:le,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return Jt(),e},"serializeSvg")();if(k)throw k;return g(),{diagramType:T,svg:E,bindFunctions:b.db.bindFunctions}},"render");function ke(t={}){const e=(0,h.hH)({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),(0,h.wZ)(e),e?.theme&&e.theme in h.H$?e.themeVariables=h.H$[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=h.H$.default.getThemeVariables(e.themeVariables));const r="object"==typeof e?(0,h.UU)(e):(0,h.Q2)();(0,c.H)(r.logLevel),Yt()}(0,d.K)(ke,"initialize");var we=(0,d.K)((t,e={})=>{const{code:r}=ne(t);return Zt.fromText(r,e)},"getDiagramFromText");function Te(t,e,r,i){Xt(e,t),Vt(e,r,i,e.attr("id"))}(0,d.K)(Te,"addA11yInfo");var Se=Object.freeze({render:be,parse:ce,getDiagramFromText:we,initialize:ke,getConfig:h.zj,setConfig:h.Nk,getSiteConfig:h.Q2,updateSiteConfig:h.B6,reset:(0,d.K)(()=>{(0,h.cL)()},"reset"),globalReset:(0,d.K)(()=>{(0,h.cL)(h.sb)},"globalReset"),defaultConfig:h.sb});(0,c.H)((0,h.zj)().logLevel),(0,h.cL)((0,h.zj)());var ve=(0,d.K)((t,e,r)=>{c.R.warn(t),(0,l.dq)(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),Be=(0,d.K)(async function(t={querySelector:".mermaid"}){try{await _e(t)}catch(e){if((0,l.dq)(e)&&c.R.error(e.str),Re.parseError&&Re.parseError(e),!t.suppressErrors)throw c.R.error("Use the suppressErrors option to suppress these errors"),e}},"run"),_e=(0,d.K)(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const i=Se.getConfig();let o;if(c.R.debug((t?"":"No ")+"Callback function found"),r)o=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");o=document.querySelectorAll(e)}c.R.debug(`Found ${o.length} diagrams`),void 0!==i?.startOnLoad&&(c.R.debug("Start On Load: "+i?.startOnLoad),Se.updateSiteConfig({startOnLoad:i?.startOnLoad}));const n=new l._K.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const s=[];for(const d of Array.from(o)){if(c.R.info("Rendering diagram: "+d.id),d.getAttribute("data-processed"))continue;d.setAttribute("data-processed","true");const e=`mermaid-${n.next()}`;a=d.innerHTML,a=(0,u.T)(l._K.entityDecode(a)).trim().replace(//gi,"
    ");const r=l._K.detectInit(a);r&&c.R.debug("Detected early reinit: ",r);try{const{svg:r,bindFunctions:i}=await Ke(e,a,d);d.innerHTML=r,t&&await t(e),i&&i(d)}catch(h){ve(h,s,Re.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),Ae=(0,d.K)(function(t){Se.initialize(t)},"initialize"),Le=(0,d.K)(async function(t,e,r){c.R.warn("mermaid.init is deprecated. Please use run instead."),t&&Ae(t);const i={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof e?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await Be(i)},"init"),Fe=(0,d.K)(async(t,{lazyLoad:e=!0}={})=>{Yt(),(0,h.Xd)(...t),!1===e&&await Gt()},"registerExternalDiagrams"),Me=(0,d.K)(function(){if(Re.startOnLoad){const{startOnLoad:t}=Se.getConfig();t&&Re.run().catch(t=>c.R.error("Mermaid failed to initialize",t))}},"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",Me,!1);var Ee=(0,d.K)(function(t){Re.parseError=t},"setParseErrorHandler"),$e=[],Oe=!1,De=(0,d.K)(async()=>{if(!Oe){for(Oe=!0;$e.length>0;){const e=$e.shift();if(e)try{await e()}catch(t){c.R.error("Error executing queue",t)}}Oe=!1}},"executeQueue"),Ie=(0,d.K)(async(t,e)=>new Promise((r,i)=>{const o=(0,d.K)(()=>new Promise((o,n)=>{Se.parse(t,e).then(t=>{o(t),r(t)},t=>{c.R.error("Error parsing",t),Re.parseError?.(t),n(t),i(t)})}),"performCall");$e.push(o),De().catch(i)}),"parse"),Ke=(0,d.K)((t,e,r)=>new Promise((i,o)=>{const n=(0,d.K)(()=>new Promise((n,a)=>{Se.render(t,e,r).then(t=>{n(t),i(t)},t=>{c.R.error("Error parsing",t),Re.parseError?.(t),a(t),o(t)})}),"performCall");$e.push(n),De().catch(o)}),"render"),qe=(0,d.K)(()=>Object.keys(h.mW).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),Re={startOnLoad:!0,mermaidAPI:Se,parse:Ie,render:Ke,init:Le,run:Be,registerExternalDiagrams:Fe,registerLayoutLoaders:a.sO,initialize:Ae,parseError:void 0,contentLoaded:Me,setParseErrorHandler:Ee,detectType:h.Ch,registerIconPacks:s.pC,getRegisteredDiagramsMetadata:qe},Pe=Re}}]); \ No newline at end of file diff --git a/assets/js/4108.e8a70f71.js.LICENSE.txt b/assets/js/4108.e8a70f71.js.LICENSE.txt new file mode 100644 index 000000000..9341dc8e0 --- /dev/null +++ b/assets/js/4108.e8a70f71.js.LICENSE.txt @@ -0,0 +1 @@ +/*! @license DOMPurify 3.4.14 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.14/LICENSE */ diff --git a/assets/js/4142.5eb0723c.js b/assets/js/4142.5eb0723c.js new file mode 100644 index 000000000..ec0025d3d --- /dev/null +++ b/assets/js/4142.5eb0723c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[4142],{74142(e,s,c){c.d(s,{createTreeViewServices:()=>r.I});var r=c(30145);c(4954)}}]); \ No newline at end of file diff --git a/assets/js/416.7239925b.js b/assets/js/416.7239925b.js new file mode 100644 index 000000000..0ae79e730 --- /dev/null +++ b/assets/js/416.7239925b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[416],{90416(e,s,c){c.r(s)}}]); \ No newline at end of file diff --git a/assets/js/4246.ac39b8ad.js b/assets/js/4246.ac39b8ad.js new file mode 100644 index 000000000..2732d9fb1 --- /dev/null +++ b/assets/js/4246.ac39b8ad.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[4246],{24246(t,e,n){n.d(e,{diagram:()=>Et});var s=n(5637),i=n(16459),r=n(76385),o=(n(31293),n(86827)),a=n(70451),l=n(3219),c=n(95635);const h=(t,e)=>(0,c.A)(t,"a",-e);var u=n(78041),f=n(75263);const d=1e-10;function y(t,e){const n=function(t){const e=[];for(let n=0;nfunction(t,e){return e.every(e=>x(t,e)1){const e=b(s);for(let t=0;te.angle-t.angle);let n=s[s.length-1];for(let a=0;a2*i.radius&&(u=2*i.radius),(null==c||c.width>u)&&(c={circle:i,width:u,p1:e,p2:n,large:u>i.radius,sweep:!0})}null!=c&&(o.push(c),i+=g(c.circle.radius,c.width),n=e)}}else{let e=t[0];for(let s=1;sMath.abs(e.radius-t[s].radius)){n=!0;break}n?i=r=0:(i=e.radius*e.radius*Math.PI,o.push({circle:e,p1:{x:e.x,y:e.y+e.radius},p2:{x:e.x-d,y:e.y+e.radius},width:2*e.radius,large:!0,sweep:!0}))}return r/=2,e&&(e.area=i+r,e.arcArea=i,e.polygonArea=r,e.arcs=o,e.innerPoints=s,e.intersectionPoints=n),i+r}function g(t,e){return t*t*Math.acos(1-e/t)-(t-e)*Math.sqrt(e*(2*t-e))}function x(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}function p(t,e,n){if(n>=t+e)return 0;if(n<=Math.abs(t-e))return Math.PI*Math.min(t,e)*Math.min(t,e);const s=e-(n*n-t*t+e*e)/(2*n);return g(t,t-(n*n-e*e+t*t)/(2*n))+g(e,s)}function m(t,e){const n=x(t,e),s=t.radius,i=e.radius;if(n>=s+i||n<=Math.abs(s-i))return[];const r=(s*s-i*i+n*n)/(2*n),o=Math.sqrt(s*s-r*r),a=t.x+r*(e.x-t.x)/n,l=t.y+r*(e.y-t.y)/n,c=-(e.y-t.y)*(o/n),h=-(e.x-t.x)*(o/n);return[{x:a+c,y:l-h},{x:a-c,y:l+h}]}function b(t){const e={x:0,y:0};for(const n of t)e.x+=n.x,e.y+=n.y;return e.x/=t.length,e.y/=t.length,e}function v(t){const e=new Array(t);for(let n=0;nv(e))}function M(t,e){let n=0;for(let s=0;st.fx-e.fx,p=e.slice(),m=e.slice(),b=e.slice(),v=e.slice();for(let I=0;I{const e=t.slice();return e.fx=t.fx,e.id=t.id,e});t.sort((t,e)=>t.id-e.id),n.history.push({x:y[0].slice(),fx:y[0].fx,simplex:t})}f=0;for(let t=0;t=y[d-1].fx){let n=!1;if(m.fx>e.fx?(_(b,1+h,p,-h,e),b.fx=t(b),b.fx=1)break;for(let e=1;ea+r*i*l||c>=d)f=i;else{if(Math.abs(u)<=-o*l)return i;u*(f-h)>=0&&(f=h),h=i,d=c}return 0}i=i||1,r=r||1e-6,o=o||.1;for(let y=0;y<10;++y){if(_(s.x,1,n.x,i,e),c=s.fx=t(s.x,s.fxprime),u=M(s.fxprime,e),c>a+r*i*l||y&&c>=h)return d(f,i,h);if(Math.abs(u)<=-o*l)return i;if(u>=0)return d(i,f,c);h=c,f=i,i*=2}return i}function T(t,e,n){let s={x:e.slice(),fx:0,fxprime:e.slice()},i={x:e.slice(),fx:0,fxprime:e.slice()};const r=e.slice();let o,a,l,c=1;l=(n=n||{}).maxIterations||20*e.length,s.fx=t(s.x,s.fxprime),o=s.fxprime.slice(),w(o,s.fxprime,-1);for(let h=0;hObject.assign({},t));function i(t){return t.join(";")}if(n){const t=new Map;for(const e of s)for(let n=0;nt===e?0:t{const e={};for(let n=0;n0)throw"Initial bisect points must have opposite signs";if(0===o)return e;if(0===a)return n;for(let c=0;c=0&&(e=n),Math.abs(l)p(t,e,s)-n,0,t+e)}function K(t,e={}){let n=function(t,e){const n=e&&e.lossFunction?e.lossFunction:N,s={},i={};for(const u of t)if(1===u.sets.length){const t=u.sets[0];s[t]={x:1e10,y:1e10,rowid:s.length,size:u.size,radius:Math.sqrt(u.size/Math.PI)},i[t]=[]}t=t.filter(t=>2===t.sets.length);for(const u of t){let t=null!=u.weight?u.weight:1;const e=u.sets[0],n=u.sets[1];u.size+A>=Math.min(s[e].size,s[n].size)&&(t=0),i[e].push({set:n,size:u.size,weight:t}),i[n].push({set:e,size:u.size,weight:t})}const r=[];function o(t,e){return e.size-t.size}Object.keys(i).forEach(t=>{let e=0;for(let n=0;n=8){const i=function(t,e={}){const n=e.restarts||10,s=[],i={};for(const f of t)1===f.sets.length&&(i[f.sets[0]]=s.length,s.push(f));let{distances:r,constraints:o}=function(t,e,n){const s=I(e.length,e.length),i=I(e.length,e.length);return t.filter(t=>2===t.sets.length).forEach(t=>{const r=n[t.sets[0]],o=n[t.sets[1]],a=R(Math.sqrt(e[r].size/Math.PI),Math.sqrt(e[o].size/Math.PI),t.size);s[r][o]=s[o][r]=a;let l=0;t.size+1e-10>=Math.min(e[r].size,e[o].size)?l=1:t.size<=1e-10&&(l=-1),i[r][o]=i[o][r]=l}),{distances:s,constraints:i}}(t,s,i);const a=k(r.map(k))/r.length;r=r.map(t=>t.map(t=>t/a));const l=(t,e)=>function(t,e,n,s){for(let r=0;r0&&y<=u||f<0&&y>=u||(i+=2*g*g,e[2*r]+=4*g*(o-c),e[2*r+1]+=4*g*(a-h),e[2*l]+=4*g*(c-o),e[2*l+1]+=4*g*(h-a))}}return i}(t,e,r,o);let c=null;for(let f=0;ft[e]));n+=(null!=s.weight?s.weight:1)*(e-s.size)*(e-s.size)}return n}function D(t,e){let n=0;for(const s of e){if(1===s.sets.length)continue;let e;if(2===s.sets.length){const n=t[s.sets[0]],i=t[s.sets[1]];e=p(n.radius,i.radius,x(n,i))}else e=y(s.sets.map(e=>t[e]));const i=null!=s.weight?s.weight:1,r=Math.log((e+1)/(s.size+1));n+=i*r*r}return n}function O(t,e,n){if(null==n?t.sort((t,e)=>e.radius-t.radius):t.sort(n),t.length>0){const e=t[0].x,n=t[0].y;for(const s of t)s.x-=e,s.y-=n}if(2===t.length){x(t[0],t[1])1){const n=Math.atan2(t[1].x,t[1].y)-e,s=Math.cos(n),i=Math.sin(n);for(const e of t){const t=e.x,n=e.y;e.x=s*t-i*n,e.y=i*t+s*n}}if(t.length>2){let n=Math.atan2(t[2].x,t[2].y)-e;for(;n<0;)n+=2*Math.PI;for(;n>2*Math.PI;)n-=2*Math.PI;if(n>Math.PI){const e=t[1].y/(1e-10+t[1].x);for(const n of t){var s=(n.x+e*n.y)/(1+e*e);n.x=2*s-n.x,n.y=2*s*e-n.y}}}}function C(t){const e=e=>({max:t.reduce((t,n)=>Math.max(t,n[e]+n.radius),Number.NEGATIVE_INFINITY),min:t.reduce((t,n)=>Math.min(t,n[e]-n.radius),Number.POSITIVE_INFINITY)});return{xRange:e("x"),yRange:e("y")}}function F(t,e,n){null==e&&(e=Math.PI/2);let s=L(t).map(t=>Object.assign({},t));const i=function(t){function e(t){return t.parent!==t&&(t.parent=e(t.parent)),t.parent}function n(t,n){const s=e(t),i=e(n);s.parent=i}t.forEach(t=>{t.parent=t});for(let i=0;i{delete t.parent}),Array.from(s.values())}(s);for(const c of i){O(c,e,n);const t=C(c);c.size=(t.xRange.max-t.xRange.min)*(t.yRange.max-t.yRange.min),c.bounds=t}i.sort((t,e)=>e.size-t.size),s=i[0];let r=s.bounds;const o=(r.xRange.max-r.xRange.min)/50;function a(t,e,n){if(!t)return;const i=t.bounds;let a,l;if(e)a=r.xRange.max-i.xRange.min+o;else{a=r.xRange.max-i.xRange.max;const t=(i.xRange.max-i.xRange.min)/2-(r.xRange.max-r.xRange.min)/2;t<0&&(a+=t)}if(n)l=r.yRange.max-i.yRange.min+o;else{l=r.yRange.max-i.yRange.max;const t=(i.yRange.max-i.yRange.min)/2-(r.yRange.max-r.yRange.min)/2;t<0&&(l+=t)}for(const r of t)r.x+=a,r.y+=l,s.push(r)}let l=1;for(;l({radius:h*t.radius,x:s+u+(t.x-o.min)*h,y:s+f+(t.y-a.min)*h,setid:t.setid})))}function j(t){const e={};for(const n of t)e[n.setid]=n;return e}function L(t){return Object.keys(t).map(e=>Object.assign(t[e],{setid:e}))}function P(t={}){let e=!1,n=600,s=350,i=15,r=1e3,o=Math.PI/2,a=!0,l=null,c=!0,h=!0,u=null,f=null,d=!1,y=null,g=!(!t||!t.symmetricalTextCentre)&&t.symmetricalTextCentre,x={},p=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],m=0,b=function(t){if(t in x)return x[t];var e=x[t]=p[m];return m+=1,m>=p.length&&(m=0),e},v=z,I=N;function M(x){let p=x.datum();const m=new Set;p.forEach(t=>{0==t.size&&1==t.sets.length&&m.add(t.sets[0])}),p=p.filter(t=>!t.sets.some(t=>m.has(t)));let M={},k={};if(p.length>0){let t=v(p,{lossFunction:I,distinct:d});a&&(t=F(t,o,f)),M=$(t,n,s,i,l),k=V(M,p,g)}const w={};function _(t){return t.sets in w?w[t.sets]:1==t.sets.length?""+t.sets[0]:void 0}p.forEach(t=>{t.label&&(w[t.sets]=t.label)}),x.selectAll("svg").data([M]).enter().append("svg");const S=x.select("svg");e?S.attr("viewBox",`0 0 ${n} ${s}`):S.attr("width",n).attr("height",s);const E={};let T=!1;function z(t){return e=>Y(t.sets.map(t=>{let i=E[t],r=M[t];return i||(i={x:n/2,y:s/2,radius:1}),r||(r={x:n/2,y:s/2,radius:1}),{x:i.x*(1-e)+r.x*e,y:i.y*(1-e)+r.y*e,radius:i.radius*(1-e)+r.radius*e}}),y)}S.selectAll(".venn-area path").each(function(t){const e=this.getAttribute("d");1==t.sets.length&&e&&!d&&(T=!0,E[t.sets[0]]=function(t){const e=t.split(" ");return{x:Number.parseFloat(e[1]),y:Number.parseFloat(e[2]),radius:-Number.parseFloat(e[4])}}(e))});const A=S.selectAll(".venn-area").data(p,t=>t.sets),R=A.enter().append("g").attr("class",t=>`venn-area venn-${1==t.sets.length?"circle":"intersection"}${t.colour||t.color?" venn-coloured":""}`).attr("data-venn-sets",t=>t.sets.join("_")),K=R.append("path"),N=R.append("text").attr("class","label").text(t=>_(t)).attr("text-anchor","middle").attr("dy",".35em").attr("x",n/2).attr("y",s/2);function D(t){return"function"==typeof t.transition?t.transition("venn").duration(r):t}h&&(K.style("fill-opacity","0").filter(t=>1==t.sets.length).style("fill",t=>t.colour?t.colour:t.color?t.color:b(t.sets)).style("fill-opacity",".25"),N.style("fill",e=>e.colour||e.color?"#FFF":t.textFill?t.textFill:1==e.sets.length?b(e.sets):"#444"));let O=x;T&&"function"==typeof O.transition?(O=D(x),O.selectAll("path").attrTween("d",z)):O.selectAll("path").attr("d",t=>Y(t.sets.map(t=>M[t])),y);const C=O.selectAll("text").filter(t=>t.sets in k).text(t=>_(t)).attr("x",t=>Math.floor(k[t.sets].x)).attr("y",t=>Math.floor(k[t.sets].y));c&&(T?"on"in C?C.on("end",U(M,_)):C.each("end",U(M,_)):C.each(U(M,_)));const j=D(A.exit()).remove();"function"==typeof A.transition&&j.selectAll("path").attrTween("d",z);const L=j.selectAll("text").attr("x",n/2).attr("y",s/2);return null!==u&&(N.style("font-size","0px"),C.style("font-size",u),L.style("font-size","0px")),{circles:M,textCentres:k,nodes:A,enter:R,update:O,exit:j}}return M.wrap=function(t){return arguments.length?(c=t,M):c},M.useViewBox=function(){return e=!0,M},M.width=function(t){return arguments.length?(n=t,M):n},M.height=function(t){return arguments.length?(s=t,M):s},M.padding=function(t){return arguments.length?(i=t,M):i},M.distinct=function(t){return arguments.length?(d=t,M):d},M.colours=function(t){return arguments.length?(b=t,M):b},M.colors=function(t){return arguments.length?(b=t,M):b},M.fontSize=function(t){return arguments.length?(u=t,M):u},M.round=function(t){return arguments.length?(y=t,M):y},M.duration=function(t){return arguments.length?(r=t,M):r},M.layoutFunction=function(t){return arguments.length?(v=t,M):v},M.normalize=function(t){return arguments.length?(a=t,M):a},M.scaleToFit=function(t){return arguments.length?(l=t,M):l},M.styled=function(t){return arguments.length?(h=t,M):h},M.orientation=function(t){return arguments.length?(o=t,M):o},M.orientationOrder=function(t){return arguments.length?(f=t,M):f},M.lossFunction=function(t){return arguments.length?(I="default"===t?N:"logRatio"===t?D:t,M):I},M}function U(t,e){return function(n){const s=this,i=t[n.sets[0]].radius||50,r=e(n)||"",o=r.split(/\s+/).reverse(),a=(r.length+o.length)/3;let l=o.pop(),c=[l],h=0;s.textContent=null;const u=[];function f(t){const e=s.ownerDocument.createElementNS(s.namespaceURI,"tspan");return e.textContent=t,u.push(e),s.append(e),e}let d=f(l);for(;l=o.pop(),l;){c.push(l);const t=c.join(" ");d.textContent=t,t.length>a&&d.getComputedTextLength()>i&&(c.pop(),d.textContent=c.join(" "),c=[l],d=f(l),h++)}const y=.35-1.1*h/2,g=s.getAttribute("x"),x=s.getAttribute("y");u.forEach((t,e)=>{t.setAttribute("x",g),t.setAttribute("y",x),t.setAttribute("dy",`${y+1.1*e}em`)})}}function q(t,e,n){let s=e[0].radius-x(e[0],t);for(let i=1;i=r&&(i=s[h],r=n)}const o=S(n=>-1*q({x:n[0],y:n[1]},t,e),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,a={x:n?0:o[0],y:o[1]};let l=!0;for(const h of t)if(x(a,h)>h.radius){l=!1;break}for(const h of e)if(x(a,h)t.p1))}function G(t){const e={},n=Object.keys(t);for(const s of n)e[s]=[];for(let s=0;s0&&console.log("WARNING: area "+o+" not represented on screen")}return s}function W(t){if(0===t.length)return[];const e={};return y(t,e),e.arcs}function X(t,e){if(0===t.length)return"M 0 0";const n=Math.pow(10,e||0),s=null!=e?t=>Math.round(t*n)/n:t=>t;if(1==t.length){const e=t[0].circle;return function(t,e,n){const s=[];return s.push("\nM",t,e),s.push("\nm",-n,0),s.push("\na",n,n,0,1,0,2*n,0),s.push("\na",n,n,0,1,0,2*-n,0),s.join(" ")}(s(e.x),s(e.y),s(e.radius))}const i=["\nM",s(t[0].p2.x),s(t[0].p2.y)];for(const r of t){const t=s(r.circle.radius);i.push("\nA",t,t,0,r.large?1:0,r.sweep?1:0,s(r.p1.x),s(r.p1.y))}return i.join(" ")}function Y(t,e){return X(W(t),e)}var Z=n(52274),H=function(){var t=(0,o.K)(function(t,e,n,s){for(n=n||{},s=t.length;s--;n[t[s]]=e);return n},"o"),e=[5,8],n=[7,8,11,12,17,19,22,24],s=[1,17],i=[1,18],r=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],a=[1,31],l=[1,39],c=[7,8,11,12,17,19,22,24,27],h=[1,57],u=[1,56],f=[1,58],d=[1,59],y=[1,60],g=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],x={trace:(0,o.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,optNewlines:4,VENN:5,document:6,EOF:7,NEWLINE:8,line:9,statement:10,TITLE:11,SET:12,identifier:13,BRACKET_LABEL:14,COLON:15,NUMERIC:16,UNION:17,identifierList:18,TEXT:19,IDENTIFIER:20,STRING:21,INDENT_TEXT:22,indentedTextTail:23,STYLE:24,stylesOpt:25,styleField:26,COMMA:27,styleValue:28,valueTokens:29,valueToken:30,HEXCOLOR:31,RGBCOLOR:32,RGBACOLOR:33,$accept:0,$end:1},terminals_:{2:"error",5:"VENN",7:"EOF",8:"NEWLINE",11:"TITLE",12:"SET",14:"BRACKET_LABEL",15:"COLON",16:"NUMERIC",17:"UNION",19:"TEXT",20:"IDENTIFIER",21:"STRING",22:"INDENT_TEXT",24:"STYLE",27:"COMMA",31:"HEXCOLOR",32:"RGBCOLOR",33:"RGBACOLOR"},productions_:[0,[3,4],[4,0],[4,2],[6,0],[6,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,5],[10,2],[10,3],[10,4],[10,5],[10,3],[10,3],[10,3],[10,4],[10,4],[10,2],[10,3],[23,1],[23,1],[23,1],[23,2],[23,2],[25,1],[25,3],[26,3],[28,1],[28,1],[29,1],[29,2],[30,1],[30,1],[30,1],[30,1],[30,1],[18,1],[18,3],[13,1],[13,1]],performAction:(0,o.K)(function(t,e,n,s,i,r,o){var a=r.length-1;switch(i){case 1:return r[a-1];case 2:case 3:case 4:case 6:this.$=[];break;case 5:case 35:r[a-1].push(r[a]),this.$=r[a-1];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:case 43:case 44:this.$=r[a];break;case 8:s.setDiagramTitle(r[a].substr(6)),this.$=r[a].substr(6);break;case 9:s.addSubsetData([r[a]],void 0,void 0),s.setIndentMode&&s.setIndentMode(!0);break;case 10:s.addSubsetData([r[a-1]],r[a],void 0),s.setIndentMode&&s.setIndentMode(!0);break;case 11:s.addSubsetData([r[a-2]],void 0,parseFloat(r[a])),s.setIndentMode&&s.setIndentMode(!0);break;case 12:s.addSubsetData([r[a-3]],r[a-2],parseFloat(r[a])),s.setIndentMode&&s.setIndentMode(!0);break;case 13:if(r[a].length<2)throw new Error("union requires multiple identifiers");s.validateUnionIdentifiers&&s.validateUnionIdentifiers(r[a]),s.addSubsetData(r[a],void 0,void 0),s.setIndentMode&&s.setIndentMode(!0);break;case 14:if(r[a-1].length<2)throw new Error("union requires multiple identifiers");s.validateUnionIdentifiers&&s.validateUnionIdentifiers(r[a-1]),s.addSubsetData(r[a-1],r[a],void 0),s.setIndentMode&&s.setIndentMode(!0);break;case 15:if(r[a-2].length<2)throw new Error("union requires multiple identifiers");s.validateUnionIdentifiers&&s.validateUnionIdentifiers(r[a-2]),s.addSubsetData(r[a-2],void 0,parseFloat(r[a])),s.setIndentMode&&s.setIndentMode(!0);break;case 16:if(r[a-3].length<2)throw new Error("union requires multiple identifiers");s.validateUnionIdentifiers&&s.validateUnionIdentifiers(r[a-3]),s.addSubsetData(r[a-3],r[a-2],parseFloat(r[a])),s.setIndentMode&&s.setIndentMode(!0);break;case 17:case 18:case 19:s.addTextData(r[a-1],r[a],void 0);break;case 20:case 21:s.addTextData(r[a-2],r[a-1],r[a]);break;case 23:s.addStyleData(r[a-1],r[a]);break;case 24:case 25:case 26:if(!(l=s.getCurrentSets()))throw new Error("text requires set");s.addTextData(l,r[a],void 0);break;case 27:case 28:var l;if(!(l=s.getCurrentSets()))throw new Error("text requires set");s.addTextData(l,r[a-1],r[a]);break;case 29:case 41:case 34:this.$=[r[a]];break;case 30:case 42:this.$=[...r[a-2],r[a]];break;case 31:this.$=[r[a-2],r[a]];break;case 33:this.$=r[a].join(" ")}},"anonymous"),table:[t(e,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},t(n,[2,4],{6:5}),t(e,[2,3]),{7:[1,6],8:[1,8],9:7,10:9,11:[1,10],12:[1,11],17:[1,12],19:[1,13],22:[1,14],24:[1,15]},{1:[2,1]},t(n,[2,5]),t(n,[2,6]),t(n,[2,7]),t(n,[2,8]),{13:16,20:s,21:i},{13:20,18:19,20:s,21:i},{13:20,18:21,20:s,21:i},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:s,21:i},t(n,[2,9],{14:[1,27],15:[1,28]}),t(r,[2,43]),t(r,[2,44]),t(n,[2,13],{14:[1,29],15:[1,30],27:a}),t(r,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:a},t(n,[2,22]),t(n,[2,24],{14:[1,35]}),t(n,[2,25],{14:[1,36]}),t(n,[2,26]),{20:l,25:37,26:38,27:a},t(n,[2,10],{15:[1,40]}),{16:[1,41]},t(n,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:s,21:i},t(n,[2,17],{14:[1,45]}),t(n,[2,18],{14:[1,46]}),t(n,[2,19]),t(n,[2,27]),t(n,[2,28]),t(n,[2,23],{27:[1,47]}),t(c,[2,29]),{15:[1,48]},{16:[1,49]},t(n,[2,11]),{16:[1,50]},t(n,[2,15]),t(r,[2,42]),t(n,[2,20]),t(n,[2,21]),{20:l,26:51},{16:h,20:u,21:[1,53],28:52,29:54,30:55,31:f,32:d,33:y},t(n,[2,12]),t(n,[2,16]),t(c,[2,30]),t(c,[2,31]),t(c,[2,32]),t(c,[2,33],{30:61,16:h,20:u,31:f,32:d,33:y}),t(g,[2,34]),t(g,[2,36]),t(g,[2,37]),t(g,[2,38]),t(g,[2,39]),t(g,[2,40]),t(g,[2,35])],defaultActions:{6:[2,1]},parseError:(0,o.K)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,o.K)(function(t){var e=this,n=[0],s=[],i=[null],r=[],a=this.table,l="",c=0,h=0,u=0,f=r.slice.call(arguments,1),d=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);d.setInput(t,y.yy),y.yy.lexer=d,y.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var x=d.yylloc;r.push(x);var p=d.options&&d.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||d.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.K)(function(t){n.length=n.length-2*t,i.length=i.length-t,r.length=r.length-t},"popStack"),(0,o.K)(m,"lex");for(var b,v,I,M,k,w,_,S,E,T={};;){if(I=n[n.length-1],this.defaultActions[I]?M=this.defaultActions[I]:(null==b&&(b=m()),M=a[I]&&a[I][b]),void 0===M||!M.length||!M[0]){var z="";for(w in E=[],a[I])this.terminals_[w]&&w>2&&E.push("'"+this.terminals_[w]+"'");z=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(z,{text:d.match,token:this.terminals_[b]||b,line:d.yylineno,loc:x,expected:E})}if(M[0]instanceof Array&&M.length>1)throw new Error("Parse Error: multiple actions possible at state: "+I+", token: "+b);switch(M[0]){case 1:n.push(b),i.push(d.yytext),r.push(d.yylloc),n.push(M[1]),b=null,v?(b=v,v=null):(h=d.yyleng,l=d.yytext,c=d.yylineno,x=d.yylloc,u>0&&u--);break;case 2:if(_=this.productions_[M[1]][1],T.$=i[i.length-_],T._$={first_line:r[r.length-(_||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(_||1)].first_column,last_column:r[r.length-1].last_column},p&&(T._$.range=[r[r.length-(_||1)].range[0],r[r.length-1].range[1]]),void 0!==(k=this.performAction.apply(T,[l,h,c,y.yy,M[1],i,r].concat(f))))return k;_&&(n=n.slice(0,-1*_*2),i=i.slice(0,-1*_),r=r.slice(0,-1*_)),n.push(this.productions_[M[1]][0]),i.push(T.$),r.push(T._$),S=a[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0},"parse")},p=function(){return{EOF:1,parseError:(0,o.K)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,o.K)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,o.K)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,o.K)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===s.length?this.yylloc.first_column:0)+s[s.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,o.K)(function(){return this._more=!0,this},"more"),reject:(0,o.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,o.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,o.K)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,o.K)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,o.K)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,o.K)(function(t,e){var n,s,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in i)this[r]=i[r];return!1}return!1},"test_match"),next:(0,o.K)(function(){if(this.done)return this.EOF;var t,e,n,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),r=0;re[0].length)){if(e=n,s=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,o.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,o.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,o.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,o.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,o.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,o.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,o.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,o.K)(function(t,e,n,s){switch(n){case 0:case 1:case 2:case 4:case 7:case 8:break;case 3:if(t.getIndentMode&&t.getIndentMode())return t.consumeIndentText=!0,this.begin("INITIAL"),22;break;case 5:t.setIndentMode&&t.setIndentMode(!1),this.begin("INITIAL"),this.unput(e.yytext);break;case 6:return this.begin("bol"),8;case 9:return 7;case 10:return 11;case 11:return 5;case 12:return 12;case 13:return 17;case 14:if(!t.consumeIndentText)return 19;t.consumeIndentText=!1;break;case 15:return 24;case 16:return e.yytext=e.yytext.slice(2,-2),14;case 17:return e.yytext=e.yytext.slice(1,-1).trim(),14;case 18:return 16;case 19:return 31;case 20:return 33;case 21:return 32;case 22:return 20;case 23:return 21;case 24:return 27;case 25:return 15}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[ \t]+(?=[\n\r]))/i,/^(?:[ \t]+(?=text\b))/i,/^(?:[ \t]+)/i,/^(?:[^ \t\n\r])/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[ \t]+)/i,/^(?:$)/i,/^(?:title\s[^#\n;]+)/i,/^(?:venn-beta\b)/i,/^(?:set\b)/i,/^(?:union\b)/i,/^(?:text\b)/i,/^(?:style\b)/i,/^(?:\["[^\"]*"\])/i,/^(?:\[[^\]\"]+\])/i,/^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,/^(?:#[0-9a-fA-F]{3,8})/i,/^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:"[^\"]*")/i,/^(?:,)/i,/^(?::)/i],conditions:{bol:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0},INITIAL:{rules:[0,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}}}();function m(){this.yy={}}return x.lexer=p,(0,o.K)(m,"Parser"),m.prototype=x,x.Parser=m,new m}();H.parser=H;var J,Q=H,tt=[],et=[],nt=[],st=new Set,it=!1,rt=(0,o.K)((t,e,n)=>{const s=ft(t).sort(),i=n??10/Math.pow(t.length,2);J=s,1===s.length&&st.add(s[0]),tt.push({sets:s,size:i,label:e?at(e):void 0})},"addSubsetData"),ot=(0,o.K)(()=>tt,"getSubsetData"),at=(0,o.K)(t=>{const e=t.trim();return e.length>=2&&e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e},"normalizeText"),lt=(0,o.K)(t=>t?at(t):t,"normalizeStyleValue"),ct=(0,o.K)((t,e,n)=>{const s=at(e);et.push({sets:ft(t).sort(),id:s,label:n?at(n):void 0})},"addTextData"),ht=(0,o.K)((t,e)=>{const n=ft(t).sort(),s={};for(const[i,r]of e)s[i]=lt(r)??r;nt.push({targets:n,styles:s})},"addStyleData"),ut=(0,o.K)(()=>nt,"getStyleData"),ft=(0,o.K)(t=>t.map(t=>at(t)),"normalizeIdentifierList"),dt=(0,o.K)(t=>{const e=ft(t).filter(t=>!st.has(t));if(e.length>0)throw new Error(`unknown set identifier: ${e.join(", ")}`)},"validateUnionIdentifiers"),yt=(0,o.K)(()=>et,"getTextData"),gt=(0,o.K)(()=>J,"getCurrentSets"),xt=(0,o.K)(()=>it,"getIndentMode"),pt=(0,o.K)(t=>{it=t},"setIndentMode"),mt=r.UI.venn;function bt(){return(0,i.$t)(mt,(0,r.zj)().venn)}(0,o.K)(bt,"getConfig");var vt={getConfig:bt,clear:(0,o.K)(()=>{(0,r.IU)(),tt.length=0,et.length=0,nt.length=0,st.clear(),J=void 0,it=!1},"customClear"),setAccTitle:r.SV,getAccTitle:r.iN,setDiagramTitle:r.ke,getDiagramTitle:r.ab,getAccDescription:r.m7,setAccDescription:r.EI,addSubsetData:rt,getSubsetData:ot,addTextData:ct,addStyleData:ht,validateUnionIdentifiers:dt,getTextData:yt,getStyleData:ut,getCurrentSets:gt,getIndentMode:xt,setIndentMode:pt},It=(0,o.K)(t=>`\n .venn-title {\n font-size: 32px;\n fill: ${t.vennTitleTextColor};\n font-family: ${t.fontFamily};\n }\n\n .venn-circle text {\n font-size: 48px;\n font-family: ${t.fontFamily};\n }\n\n .venn-intersection text {\n font-size: 48px;\n fill: ${t.vennSetTextColor};\n font-family: ${t.fontFamily};\n }\n\n .venn-text-node {\n font-family: ${t.fontFamily};\n color: ${t.vennSetTextColor};\n }\n`,"getStyles");function Mt(t){const e=new Map;for(const n of t){const t=n.targets.join("|"),s=e.get(t);s?Object.assign(s,n.styles):e.set(t,{...n.styles})}return e}(0,o.K)(Mt,"buildStyleByKey");var kt=(0,o.K)((t,e,n,i)=>{const o=i.db,c=o.getConfig?.(),{themeVariables:d,look:y,handDrawnSeed:g}=(0,r.zj)(),x="handDrawn"===y,p=[d.venn1,d.venn2,d.venn3,d.venn4,d.venn5,d.venn6,d.venn7,d.venn8].filter(Boolean),m=o.getDiagramTitle?.(),b=o.getSubsetData(),v=o.getTextData(),I=Mt(o.getStyleData()),M=St(b),k=c?.width??800,w=c?.height??450,_=k/1600,S=m?48*_:0,E=d.primaryTextColor??d.textColor,T=(0,s.D)(e);T.attr("viewBox",`0 0 ${k} ${w}`),m&&T.append("text").text(m).attr("class","venn-title").attr("font-size",32*_+"px").attr("text-anchor","middle").attr("dominant-baseline","middle").attr("x","50%").attr("y",32*_).style("fill",d.vennTitleTextColor||d.titleColor);const A=(0,a.Ltv)(document.createElement("div")),R=P().width(k).height(w-S);A.datum(M).call(R);const K=x?Z.A.svg(A.select("svg").node()):void 0,O=function(t,e={}){const{lossFunction:n,layoutFunction:s=z,normalize:i=!0,orientation:r=Math.PI/2,orientationOrder:o,width:a=600,height:l=350,padding:c=15,scaleToFit:h=!1,symmetricalTextCentre:u=!1,distinct:f,round:d=2}=e;let y=s(t,{lossFunction:"default"!==n&&n?"logRatio"===n?D:n:N,distinct:f});i&&(y=F(y,r,o));const g=$(y,a,l,c,h),x=V(g,t,u),p=new Map(Object.keys(g).map(t=>[t,{set:t,x:g[t].x,y:g[t].y,radius:g[t].radius}])),m=t.map(t=>{const e=t.sets.map(t=>p.get(t)),n=W(e);return{circles:e,arcs:n,path:X(n,d),area:t,has:new Set(t.sets)}});function b(t){let e="";for(const n of m)n.has.size>t.length&&t.every(t=>n.has.has(t))&&(e+=" "+n.path);return e}return m.map(({circles:t,arcs:e,path:n,area:s})=>({data:s,text:x[s.sets],circles:t,arcs:e,path:n,distinctPath:n+b(s.sets)}))}(M,{width:k,height:w-S,padding:c?.padding??15}),C=new Map;for(const s of O){const t=wt([...s.data.sets].sort());C.set(t,s)}v.length>0&&_t(c,C,A,v,_,I);const j=(0,l.A)(d.background||"#f4f4f4");A.selectAll(".venn-circle").each(function(t,e){const n=(0,a.Ltv)(this),s=wt([...t.sets].sort()),i=I.get(s),r=i?.fill||p[e%p.length]||d.primaryColor;n.classed("venn-set-"+e%8,!0);const o=i?.["fill-opacity"]??.1,l=i?.stroke||r,c=i?.["stroke-width"]||""+5*_;if(x&&K){const t=C.get(s);if(t&&t.circles.length>0){const s=t.circles[0],i=K.circle(s.x,s.y,2*s.radius,{roughness:.7,seed:g,fill:h(r,.7),fillStyle:"hachure",fillWeight:2,hachureGap:8,hachureAngle:60*e-41,stroke:l,strokeWidth:parseFloat(String(c))});n.select("path").remove(),n.node()?.insertBefore(i,n.select("text").node())}}else n.select("path").style("fill",r).style("fill-opacity",o).style("stroke",l).style("stroke-width",c).style("stroke-opacity",.95);const y=i?.color||(j?(0,u.A)(r,30):(0,f.A)(r,30));n.select("text").style("font-size",48*_+"px").style("fill",y)}),x&&K?A.selectAll(".venn-intersection").each(function(t){const e=(0,a.Ltv)(this),n=wt([...t.sets].sort()),s=I.get(n),i=s?.fill;if(i){const t=e.select("path"),n=t.attr("d");if(n){const e=K.path(n,{roughness:.7,seed:g,fill:h(i,.3),fillStyle:"cross-hatch",fillWeight:2,hachureGap:6,hachureAngle:60,stroke:"none"}),s=t.node();s?.parentNode?.insertBefore(e,s),t.remove()}}else e.select("path").style("fill-opacity",0);e.select("text").style("font-size",48*_+"px").style("fill",s?.color??d.vennSetTextColor??E)}):(A.selectAll(".venn-intersection text").style("font-size",48*_+"px").style("fill",t=>{const e=wt([...t.sets].sort());return I.get(e)?.color??d.vennSetTextColor??E}),A.selectAll(".venn-intersection path").style("fill-opacity",t=>{const e=wt([...t.sets].sort());return I.get(e)?.fill?1:0}).style("fill",t=>{const e=wt([...t.sets].sort());return I.get(e)?.fill??"transparent"}));const L=T.append("g").attr("transform",`translate(0, ${S})`),U=A.select("svg").node();if(U&&"childNodes"in U)for(const s of[...U.childNodes])L.node()?.appendChild(s);(0,r.a$)(T,w,k,c?.useMaxWidth??!0)},"draw");function wt(t){return t.join("|")}function _t(t,e,n,s,i,r){const o=t?.useDebugLayout??!1,a=n.select("svg").append("g").attr("class","venn-text-nodes"),l=new Map;for(const c of s){const t=wt(c.sets),e=l.get(t);e?e.push(c):l.set(t,[c])}for(const[c,h]of l.entries()){const t=e.get(c);if(!t?.text)continue;const n=t.text.x,s=t.text.y,l=Math.min(...t.circles.map(t=>t.radius)),u=Math.min(...t.circles.map(t=>t.radius-Math.hypot(n-t.x,s-t.y)));let f=Number.isFinite(u)?Math.max(0,u):0;0===f&&Number.isFinite(l)&&(f=.6*l);const d=a.append("g").attr("class","venn-text-area").attr("font-size",40*i+"px");o&&d.append("circle").attr("class","venn-text-debug-circle").attr("cx",n).attr("cy",s).attr("r",f).attr("fill","none").attr("stroke","purple").attr("stroke-width",1.5*i).attr("stroke-dasharray",`${6*i} ${4*i}`);const y=Math.max(80*i,2*f*.95),g=Math.max(60*i,2*f*.95),x=(t.data.label&&t.data.label.length>0?Math.min(32*i,.25*f):0)+(h.length<=2?30*i:0),p=n-y/2,m=s-g/2+x,b=Math.max(1,Math.ceil(Math.sqrt(h.length))),v=y/b,I=g/Math.max(1,Math.ceil(h.length/b));for(const[e,a]of h.entries()){const t=e%b,n=Math.floor(e/b),s=p+v*(t+.5),l=m+I*(n+.5);o&&d.append("rect").attr("class","venn-text-debug-cell").attr("x",p+v*t).attr("y",m+I*n).attr("width",v).attr("height",I).attr("fill","none").attr("stroke","teal").attr("stroke-width",1*i).attr("stroke-dasharray",`${4*i} ${3*i}`);const c=.9*v,h=.9*I,u=d.append("foreignObject").attr("class","venn-text-node-fo").attr("width",c).attr("height",h).attr("x",s-c/2).attr("y",l-h/2).attr("overflow","visible"),f=r.get(a.id)?.color,y=u.append("xhtml:span").attr("class","venn-text-node").style("display","flex").style("width","100%").style("height","100%").style("white-space","normal").style("align-items","center").style("justify-content","center").style("text-align","center").style("overflow-wrap","normal").style("word-break","normal").text(a.label??a.id);f&&y.style("color",f)}}}function St(t){const e=new Set(t.map(t=>[...t.sets].sort().join("|"))),n=new Map(t.filter(t=>1===t.sets.length&&void 0!==t.size).map(t=>[t.sets[0],t.size])),s=[];for(const i of t){if(i.sets.length<3)continue;const t=[...i.sets].sort();for(let i=0;i0?[...t,...s]:t}(0,o.K)(wt,"stableSetsKey"),(0,o.K)(_t,"renderTextNodes"),(0,o.K)(St,"ensurePairwiseSubsets");var Et={parser:Q,db:vt,renderer:{draw:kt},styles:It}}}]); \ No newline at end of file diff --git a/assets/js/4253.7eaefdea.js b/assets/js/4253.7eaefdea.js new file mode 100644 index 000000000..02d6039b9 --- /dev/null +++ b/assets/js/4253.7eaefdea.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[4253],{75937(t,e,s){s.d(e,{A:()=>r});var i=s(72453),n=s(74886);const r=(t,e)=>i.A.lang.round(n.A.parse(t)[e])},1672(t,e,s){s.d(e,{P:()=>a});var i=s(76385),n=s(31293),r=s(86827),a=(0,r.K)((t,e,s,r)=>{t.attr("class",s);const{width:a,height:l,x:h,y:u}=o(t,e);(0,i.a$)(t,l,a,r);const d=c(h,u,a,l,e);t.attr("viewBox",d),n.R.debug(`viewBox configured: ${d} with padding: ${e}`)},"setupViewPortForSVG"),o=(0,r.K)((t,e)=>{const s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}},"calculateDimensionsWithPadding"),c=(0,r.K)((t,e,s,i,n)=>`${t-n} ${e-n} ${s} ${i}`,"createViewBox")},96755(t,e,s){s.d(e,{A:()=>r});var i=s(86827),n=s(70451),r=(0,i.K)((t,e)=>{let s;"sandbox"===e&&(s=(0,n.Ltv)("#i"+t));return("sandbox"===e?(0,n.Ltv)(s.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement")},34253(t,e,s){s.d(e,{diagram:()=>S});var i=s(96755),n=s(1672),r=s(9417),a=(s(78771),s(46853),s(717),s(79515),s(44505),s(72379),s(58962),s(16459)),o=s(76385),c=s(31293),l=s(86827),h=s(70451),u=s(25582),d=s(75937),y=function(){var t=(0,l.K)(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],s=[2,2],i=[1,7],n=[1,9],r=[1,10],a=[1,11],o=[1,12],c=[1,30],h=[1,23],u=[1,24],d=[1,25],y=[1,26],p=[1,27],b=[1,19],g=[1,28],_=[1,29],f=[1,20],m=[1,18],k=[1,21],E=[1,22],S=[2,6],$=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],T=[1,36],O=[1,37],x=[1,38],N=[1,39],C=[1,40],A=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],R=[1,46],I=[1,47],D=[1,57],w=[43,51,53,54,55,74,75],v=[1,70],L=[1,68],K=[1,65],M=[1,69],B=[1,71],G=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],F=[1,78],Y=[1,77],P=[1,76],z=[69,70,71,72,73],U=[1,91],Z=[6,9,45,50],j=[6,9,12,44,45,50,51,52],W=[1,101],q=[1,100],X=[1,99],V=[18,61],H=[1,110],Q=[1,109],J=[20,43,51,53,54,55],tt=[18,61,64,66],et={trace:(0,l.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:(0,l.K)(function(t,e,s,i,n,r,a){var o=r.length-1;switch(n){case 1:break;case 2:case 5:case 6:this.$=[];break;case 3:this.$=r[o-1].concat(r[o]);break;case 4:case 34:case 59:case 60:case 61:case 62:case 86:case 69:case 71:case 74:this.$=r[o];break;case 7:i.addEntity(r[o-4]),i.addEntity(r[o-2]),i.addRelationship(r[o-4],r[o],r[o-2],r[o-3]),this.$=[r[o-4],r[o-2]];break;case 8:i.addEntity(r[o-8]),i.addEntity(r[o-4]),i.addRelationship(r[o-8],r[o],r[o-4],r[o-5]),i.setClass([r[o-8]],r[o-6]),i.setClass([r[o-4]],r[o-2]),this.$=[r[o-8],r[o-4]];break;case 9:i.addEntity(r[o-6]),i.addEntity(r[o-2]),i.addRelationship(r[o-6],r[o],r[o-2],r[o-3]),i.setClass([r[o-6]],r[o-4]),this.$=[r[o-6],r[o-2]];break;case 10:i.addEntity(r[o-6]),i.addEntity(r[o-4]),i.addRelationship(r[o-6],r[o],r[o-4],r[o-5]),i.setClass([r[o-4]],r[o-2]),this.$=[r[o-6],r[o-4]];break;case 11:i.addEntity(r[o-3]),i.addAttributes(r[o-3],r[o-1]),this.$=[r[o-3]];break;case 12:i.addEntity(r[o-5]),i.addAttributes(r[o-5],r[o-1]),i.setClass([r[o-5]],r[o-3]),this.$=[r[o-5]];break;case 13:i.addEntity(r[o-2]),this.$=[r[o-2]];break;case 14:i.addEntity(r[o-4]),i.setClass([r[o-4]],r[o-2]),this.$=[r[o-4]];break;case 15:i.addEntity(r[o]),this.$=[r[o]];break;case 16:i.addEntity(r[o-2]),i.setClass([r[o-2]],r[o]),this.$=[r[o-2]];break;case 17:i.addEntity(r[o-6],r[o-4]),i.addAttributes(r[o-6],r[o-1]),this.$=[r[o-6]];break;case 18:i.addEntity(r[o-8],r[o-6]),i.addAttributes(r[o-8],r[o-1]),i.setClass([r[o-8]],r[o-3]),this.$=[r[o-8]];break;case 19:i.addEntity(r[o-5],r[o-3]),this.$=[r[o-5]];break;case 20:i.addEntity(r[o-7],r[o-5]),i.setClass([r[o-7]],r[o-2]),this.$=[r[o-7]];break;case 21:i.addEntity(r[o-3],r[o-1]);break;case 22:i.addEntity(r[o-5],r[o-3]),i.setClass([r[o-5]],r[o]);break;case 23:case 24:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 25:case 26:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 27:i.subgraphDepth?this.$=r[o]:(i.setDirection(r[o].value),this.$=[]);break;case 31:i.subgraphDepth=(i.subgraphDepth||1)-1,this.$=i.addSubGraph({text:r[o-2].id},r[o-1],{text:r[o-2].text});break;case 32:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:r[o-1],text:r[o-1]};break;case 33:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:r[o-4],text:r[o-2]};break;case 35:this.$=r[o-1]+" "+r[o];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=r[o-3],i.addClass(r[o-2],r[o-1]);break;case 41:case 42:case 63:case 72:case 47:this.$=[r[o]];break;case 43:case 44:this.$=r[o-2].concat([r[o]]);break;case 45:this.$=r[o-2],i.setClass(r[o-1],r[o]);break;case 46:this.$=r[o-3],i.addCssStyles(r[o-2],r[o-1]);break;case 48:case 73:r[o-2].push(r[o]),this.$=r[o-2];break;case 50:case 70:this.$=r[o-1]+r[o];break;case 58:case 84:case 85:case 75:this.$=r[o].replace(/"/g,"");break;case 64:r[o].push(r[o-1]),this.$=r[o];break;case 65:this.$={type:r[o-1],name:r[o]};break;case 66:this.$={type:r[o-2],name:r[o-1],keys:r[o]};break;case 67:this.$={type:r[o-2],name:r[o-1],comment:r[o]};break;case 68:this.$={type:r[o-3],name:r[o-2],keys:r[o-1],comment:r[o]};break;case 76:this.$={cardA:r[o],relType:r[o-1],cardB:r[o-2]};break;case 77:this.$=i.Cardinality.ZERO_OR_ONE;break;case 78:this.$=i.Cardinality.ZERO_OR_MORE;break;case 79:this.$=i.Cardinality.ONE_OR_MORE;break;case 80:this.$=i.Cardinality.ONLY_ONE;break;case 81:this.$=i.Cardinality.MD_PARENT;break;case 82:this.$=i.Identification.NON_IDENTIFYING;break;case 83:this.$=i.Identification.IDENTIFYING}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,s,{5:3}),{6:[1,4],7:5,8:6,9:i,10:8,21:n,23:r,25:a,27:o,28:13,29:14,30:15,31:16,32:17,34:c,37:h,38:u,39:d,40:y,41:p,43:b,46:g,47:_,51:f,53:m,54:k,55:E},t(e,S,{1:[2,1]}),t($,[2,3]),t($,[2,4]),t($,[2,5]),t($,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:T,70:O,71:x,72:N,73:C}),{22:[1,41]},{24:[1,42]},{26:[1,43]},t($,[2,26]),t($,[2,27]),t($,[2,28]),t($,[2,29]),t($,[2,30]),t($,s,{5:44}),t(A,[2,58]),t(A,[2,59]),t(A,[2,60]),t(A,[2,61]),t(A,[2,62]),t($,[2,36]),t($,[2,37]),t($,[2,38]),t($,[2,39]),{15:45,43:R,44:I},{15:48,43:R,44:I},{15:49,43:R,44:I},{10:50,43:b,51:f,53:m,54:k,55:E},{10:51,43:b,51:f,53:m,54:k,55:E},{15:52,43:R,44:I},{17:53,18:[1,54],56:55,57:56,61:D},{10:58,43:b,51:f,53:m,54:k,55:E},{68:59,74:[1,60],75:[1,61]},t(w,[2,77]),t(w,[2,78]),t(w,[2,79]),t(w,[2,80]),t(w,[2,81]),t($,[2,23]),t($,[2,24]),t($,[2,25]),{6:[1,63],7:5,8:6,9:i,10:8,21:n,23:r,25:a,27:o,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:c,37:h,38:u,39:d,40:y,41:p,43:b,46:g,47:_,51:f,53:m,54:k,55:E},{12:v,42:64,44:L,45:K,48:66,49:67,51:M,52:B},t(G,[2,41]),t(G,[2,42]),{15:72,43:R,44:I,45:K},{12:v,42:73,44:L,45:K,48:66,49:67,51:M,52:B},{6:F,9:Y,19:[1,75],35:74,50:P},{12:[1,79],14:[1,80]},t($,[2,16],{67:35,11:81,16:[1,82],45:K,69:T,70:O,71:x,72:N,73:C}),{18:[1,83]},t($,[2,13]),{17:84,18:[2,63],56:55,57:56,61:D},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:T,70:O,71:x,72:N,73:C},t(z,[2,82]),t(z,[2,83]),t($,[2,31]),t($,S),{6:F,9:Y,35:90,45:U,50:P},{43:[1,92],44:[1,93]},t(Z,[2,47],{49:94,12:v,44:L,51:M,52:B}),t(j,[2,49]),t(j,[2,54]),t(j,[2,55]),t(j,[2,56]),t(j,[2,57]),t($,[2,45],{45:K}),{6:F,9:Y,35:95,45:U,50:P},t($,[2,32]),{10:97,36:96,43:b,51:f,53:m,54:k,55:E},t($,[2,51]),t($,[2,52]),t($,[2,53]),{13:98,43:W,53:q,76:X},{15:102,43:R,44:I},{10:103,43:b,51:f,53:m,54:k,55:E},{17:104,18:[1,105],56:55,57:56,61:D},t($,[2,11]),{18:[2,64]},t(V,[2,65],{59:106,60:107,63:108,65:H,66:Q}),t([18,61,65,66],[2,71]),{61:[2,70]},t($,[2,21],{14:[1,112],16:[1,111]}),t([43,51,53,54,55],[2,76]),t($,[2,40]),{12:v,44:L,48:113,49:67,51:M,52:B},t(G,[2,43]),t(G,[2,44]),t(j,[2,50]),t($,[2,46]),{10:115,20:[1,114],43:b,51:f,53:m,54:k,55:E},t(J,[2,34]),t($,[2,7]),t($,[2,84]),t($,[2,85]),t($,[2,86]),{12:[1,116],45:K},{12:[1,118],14:[1,117]},{18:[1,119]},t($,[2,14]),t(V,[2,66],{60:120,64:[1,121],66:Q}),t(V,[2,67]),t(tt,[2,72]),t(V,[2,75]),t(tt,[2,74]),{17:122,18:[1,123],56:55,57:56,61:D},{15:124,43:R,44:I},t(Z,[2,48],{49:94,12:v,44:L,51:M,52:B}),{6:F,9:Y,35:125,50:P},t(J,[2,35]),{13:126,43:W,53:q,76:X},{15:127,43:R,44:I},{13:128,43:W,53:q,76:X},t($,[2,12]),t(V,[2,68]),{63:129,65:H},{18:[1,130]},t($,[2,19]),t($,[2,22],{16:[1,131],45:K}),t($,[2,33]),t($,[2,10]),{12:[1,132],45:K},t($,[2,9]),t(tt,[2,73]),t($,[2,17]),{17:133,18:[1,134],56:55,57:56,61:D},{13:135,43:W,53:q,76:X},{18:[1,136]},t($,[2,20]),t($,[2,8]),t($,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:(0,l.K)(function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},"parseError"),parse:(0,l.K)(function(t){var e=this,s=[0],i=[],n=[null],r=[],a=this.table,o="",c=0,h=0,u=0,d=r.slice.call(arguments,1),y=Object.create(this.lexer),p={yy:{}};for(var b in this.yy)Object.prototype.hasOwnProperty.call(this.yy,b)&&(p.yy[b]=this.yy[b]);y.setInput(t,p.yy),p.yy.lexer=y,p.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var g=y.yylloc;r.push(g);var _=y.options&&y.options.ranges;function f(){var t;return"number"!=typeof(t=i.pop()||y.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.K)(function(t){s.length=s.length-2*t,n.length=n.length-t,r.length=r.length-t},"popStack"),(0,l.K)(f,"lex");for(var m,k,E,S,$,T,O,x,N,C={};;){if(E=s[s.length-1],this.defaultActions[E]?S=this.defaultActions[E]:(null==m&&(m=f()),S=a[E]&&a[E][m]),void 0===S||!S.length||!S[0]){var A="";for(T in N=[],a[E])this.terminals_[T]&&T>2&&N.push("'"+this.terminals_[T]+"'");A=y.showPosition?"Parse error on line "+(c+1)+":\n"+y.showPosition()+"\nExpecting "+N.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(A,{text:y.match,token:this.terminals_[m]||m,line:y.yylineno,loc:g,expected:N})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+m);switch(S[0]){case 1:s.push(m),n.push(y.yytext),r.push(y.yylloc),s.push(S[1]),m=null,k?(m=k,k=null):(h=y.yyleng,o=y.yytext,c=y.yylineno,g=y.yylloc,u>0&&u--);break;case 2:if(O=this.productions_[S[1]][1],C.$=n[n.length-O],C._$={first_line:r[r.length-(O||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(O||1)].first_column,last_column:r[r.length-1].last_column},_&&(C._$.range=[r[r.length-(O||1)].range[0],r[r.length-1].range[1]]),void 0!==($=this.performAction.apply(C,[o,h,c,p.yy,S[1],n,r].concat(d))))return $;O&&(s=s.slice(0,-1*O*2),n=n.slice(0,-1*O),r=r.slice(0,-1*O)),s.push(this.productions_[S[1]][0]),n.push(C.$),r.push(C._$),x=a[s[s.length-2]][s[s.length-1]],s.push(x);break;case 3:return!0}}return!0},"parse")},st=function(){return{EOF:1,parseError:(0,l.K)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,l.K)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,l.K)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,l.K)(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.K)(function(){return this._more=!0,this},"more"),reject:(0,l.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,l.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,l.K)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,l.K)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,l.K)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,l.K)(function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},"test_match"),next:(0,l.K)(function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;re[0].length)){if(e=s,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,l.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,l.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,l.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,l.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,l.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,l.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,l.K)(function(t,e,s,i){switch(s){case 0:return this.begin("acc_title"),23;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),25;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:case 28:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 37;case 8:return 38;case 9:return 39;case 10:return 40;case 11:case 22:case 30:case 37:break;case 12:return 9;case 13:return 53;case 14:return 76;case 15:return 4;case 16:return this.begin("block"),16;case 17:case 18:case 40:return 52;case 19:case 39:return 45;case 20:return 14;case 21:case 38:return 12;case 23:return 65;case 24:case 25:case 27:return 61;case 26:this.begin("block_bq");break;case 29:return 66;case 31:return this.popState(),18;case 32:case 81:return e.yytext[0];case 33:return 19;case 34:return 20;case 35:return this.begin("style"),47;case 36:return this.popState(),9;case 41:return this.begin("style"),41;case 42:return 46;case 43:return 34;case 44:return 33;case 45:case 49:case 50:case 68:return 69;case 46:case 47:case 48:case 56:case 58:case 70:return 71;case 51:case 52:case 53:case 54:case 55:case 57:case 69:return 70;case 59:case 60:case 62:case 63:case 64:case 67:return 72;case 61:return 54;case 65:return 55;case 66:return 51;case 71:return 73;case 72:case 75:case 76:case 77:return 74;case 73:case 74:return 75;case 78:return 44;case 79:return 50;case 80:return 43;case 82:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[ \t\r]+)/i,/^(?:[\n]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\.,\u00C0-\uFFFF\*]*))/i,/^(?:[`])/i,/^(?:[^`]+)/i,/^(?:[`])/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:subgraph\b)/i,/^(?:end\b\s*)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[36,37,38,39,40,78,79],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block_bq:{rules:[27,28],inclusive:!1},block:{rules:[22,23,24,25,26,29,30,31,32],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,33,34,35,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,80,81,82],inclusive:!0}}}}();function it(){this.yy={}}return et.lexer=st,(0,l.K)(it,"Parser"),it.prototype=et,et.Parser=it,new it}();y.parser=y;var p=y,b=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.subgraphDepth=0,this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=o.SV,this.getAccTitle=o.iN,this.setAccDescription=o.EI,this.getAccDescription=o.m7,this.setDiagramTitle=o.ke,this.getDiagramTitle=o.ab,this.getConfig=(0,l.K)(()=>(0,o.D7)().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this),this.addSubGraph=this.addSubGraph.bind(this)}static{(0,l.K)(this,"ErDB")}addEntity(t,e=""){return this.entities.has(t)?!this.entities.get(t)?.alias&&e&&(this.entities.get(t).alias=e,c.R.info(`Add alias '${e}' to entity '${t}'`)):(this.entities.set(t,{id:`entity-${t}-${this.entities.size}`,label:t,attributes:[],alias:e,shape:"erBox",look:(0,o.D7)().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),c.R.info("Added new entity :",t)),this.entities.get(t)}getEntity(t){return this.entities.get(t)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(t,e){const s=this.addEntity(t);let i;for(i=e.length-1;i>=0;i--)e[i].keys||(e[i].keys=[]),e[i].comment||(e[i].comment=""),s.attributes.push(e[i]),c.R.debug("Added attribute ",e[i].name)}addRelationship(t,e,s,i){let n,r;if(this.subGraphLookup.has(t))n=t;else{const e=this.addEntity(t);if(!e)return;n=e.id}if(this.subGraphLookup.has(s))r=s;else{const t=this.addEntity(s);if(!t)return;r=t.id}const a={entityA:n,roleA:e,entityB:r,relSpec:i};this.relationships.push(a),c.R.debug("Added new relationship :",a)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(t){this.direction=t}getCompiledStyles(t){let e=[];for(const s of t){const t=this.classes.get(s);t?.styles&&(e=[...e,...t.styles??[]].map(t=>t.trim())),t?.textStyles&&(e=[...e,...t.textStyles??[]].map(t=>t.trim()))}return e}addCssStyles(t,e){for(const s of t){const t=this.entities.get(s),i=this.subGraphLookup.get(s);if(e){if(t)for(const s of e)t.cssStyles.push(s);if(i){i.cssStyles||(i.cssStyles=[]);for(const t of e)i.cssStyles.push(t)}}}}addClass(t,e){t.forEach(t=>{let s=this.classes.get(t);void 0===s&&(s={id:t,styles:[],textStyles:[]},this.classes.set(t,s)),e&&e.forEach(function(t){if(/color/.exec(t)){const e=t.replace("fill","bgFill");s.textStyles.push(e)}s.styles.push(t)})})}addSubGraph(t,e,s){let i=t.text.trim(),n=s.text;const r=(0,l.K)(t=>{const e=new Set;let s;return{nodeList:t.filter(t=>{if(t?.stmt)return"dir"===t.stmt&&(s=t.value),!1;if("string"!=typeof t)return!1;const i=t.trim();return!!i&&(!e.has(i)&&(e.add(i),!0))}),dir:s}},"uniq")(e.flat()),a=r.nodeList,o=r.dir;i=i??"subGraph"+this.subCount,n=n||"",n=this.sanitizeText(n),this.subCount=this.subCount+1;const h={id:i,nodes:a,title:n.trim(),classes:[],cssStyles:[],dir:o,labelType:this.sanitizeNodeLabelType(s?.type)};return c.R.info("Adding",h.id,h.nodes,h.dir),h.nodes=this.makeUniq(h,this.subGraphs).nodes,this.subGraphs.push(h),this.subGraphLookup.set(i,h),i}getSubGraphs(){return this.subGraphs}setClass(t,e){for(const s of t){const t=this.entities.get(s);if(t)for(const s of e)t.cssClasses+=" "+s;const i=this.subGraphLookup.get(s);if(i)for(const s of e)i.classes.push(s)}}subgraphNodeCache(t){const e=new Set;for(const s of t)for(const t of s.nodes)e.add(t);return e}makeUniq(t,e){const s=this.subgraphNodeCache(e),i=[];return t.nodes.forEach((e,n)=>{s.has(e)?c.R.warn(`Entity '${e}' already belongs to another subgraph and will be ignored`):i.push(t.nodes[n])}),{nodes:i}}sanitizeText(t){return o.Y2.sanitizeText(t,(0,o.D7)())}sanitizeNodeLabelType(t){switch(t){case"markdown":case"string":case"text":return t;default:return"markdown"}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.subgraphDepth=0,(0,o.IU)()}getData(){const t=[],e=[],s=(0,o.D7)(),i=this.getSubGraphs(),n=new Map,r=new Map;for(let a=i.length-1;a>=0;a--){const t=i[a];t.nodes.length>0&&r.set(t.id,!0);for(const e of t.nodes)n.set(e,t.id)}for(let a=i.length-1;a>=0;a--){const e=i[a];t.push({id:e.id,label:e.title,labelStyle:"",labelType:e.labelType,parentId:n.get(e.id),padding:8,cssCompiledStyles:this.getCompiledStyles(e.classes),cssStyles:e.cssStyles,cssClasses:e.classes.join(" "),shape:"rect",dir:e.dir,isGroup:!0,look:s.look})}const c=new Set(i.map(t=>t.id));let l=0;for(const a of this.entities.keys()){if(c.has(a))continue;const e=this.entities.get(a);e&&(e.cssCompiledStyles=this.getCompiledStyles(e.cssClasses.split(" ")),e.colorIndex=l++,t.push({...e,parentId:n.get(a),isGroup:!1}))}let h=0;for(const o of this.relationships){const t={id:(0,a.rY)(o.entityA,o.entityB,{prefix:"id",counter:h++}),type:"normal",curve:"basis",start:o.entityA,end:o.entityB,label:o.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:o.relSpec.cardB.toLowerCase(),arrowTypeEnd:o.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==o.relSpec.relType?"solid":"dashed",look:s.look,labelType:"markdown"};e.push(t)}return{nodes:t,edges:e,other:{},config:s,direction:this.direction}}},g={};(0,l.V)(g,{draw:()=>_});var _=(0,l.K)(async function(t,e,s,l){c.R.info("REF0:"),c.R.info("Drawing er diagram (unified)",e);const{securityLevel:u,er:d,layout:y}=(0,o.D7)(),p=l.db.getData(),b=(0,i.A)(e,u);p.type=l.type,p.layoutAlgorithm=(0,r.q7)(y),p.config.flowchart.nodeSpacing=d?.nodeSpacing||140,p.config.flowchart.rankSpacing=d?.rankSpacing||80,p.direction=l.db.getDirection();const{config:g}=p,{look:_}=g;p.markers="neo"===_?["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"]:["only_one","zero_or_one","one_or_more","zero_or_more"],p.diagramId=e,await(0,r.XX)(p,b),"elk"===p.layoutAlgorithm&&b.select(".edges").lower();const f=b.selectAll('[id*="-background"]');Array.from(f).length>0&&f.each(function(){const t=(0,h.Ltv)(this),e=t.attr("id").replace("-background",""),s=b.select(`#${CSS.escape(e)}`);if(!s.empty()){const e=s.attr("transform");t.attr("transform",e)}});a._K.insertTitle(b,"erDiagramTitleText",d?.titleTopMargin??25,l.db.getDiagramTitle()),(0,n.P)(b,8,"erDiagram",d?.useMaxWidth??!0)},"draw"),f=(0,l.K)((t,e)=>{const s=d.A,i=s(t,"r"),n=s(t,"g"),r=s(t,"b");return u.A(i,n,r,e)},"fade"),m=new Set(["redux-color","redux-dark-color"]),k=(0,l.K)(t=>{const{theme:e,look:s,bkgColorArray:i,borderColorArray:n}=t;if(!m.has(e))return"";const r=i?.length>0;let a="";for(let o=0;o{const{look:e,theme:s,erEdgeLabelBackground:i,strokeWidth:n}=t;return`\n ${k(t)}\n .entityBox {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${t.tertiaryColor};\n opacity: 0.7;\n background-color: ${t.tertiaryColor};\n rect {\n opacity: 0.5;\n }\n }\n\n .labelBkg {\n background-color: ${m.has(s)&&i?i:f(t.tertiaryColor,.5)};\n }\n\n .edgeLabel {\n background-color: ${m.has(s)&&i?i:t.edgeLabelBackground};\n }\n .edgeLabel .label rect {\n fill: ${m.has(s)&&i?i:t.edgeLabelBackground};\n }\n .edgeLabel .label text {\n fill: ${t.textColor};\n }\n\n .edgeLabel .label {\n fill: ${t.nodeBorder};\n font-size: 14px;\n }\n\n .label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .edge-pattern-dashed {\n stroke-dasharray: 8,8;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon\n {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: ${"neo"===e?n:"1px"};\n }\n\n .relationshipLine {\n stroke: ${t.lineColor};\n stroke-width: ${"neo"===e?n:"1px"};\n fill: none;\n }\n\n .marker {\n fill: none !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n [data-look=neo].labelBkg {\n background-color: ${f(t.tertiaryColor,.5)};\n }\n\n .cluster rect {\n fill: ${t.clusterBkg??t.mainBkg};\n stroke: ${t.clusterBorder??t.nodeBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor??t.textColor};\n }\n\n .cluster-label text {\n fill: ${t.titleColor??t.textColor};\n }\n`},"getStyles"),S={parser:p,get db(){return new b},renderer:g,styles:E}}}]); \ No newline at end of file diff --git a/assets/js/4306.3752735f.js b/assets/js/4306.3752735f.js new file mode 100644 index 000000000..32c453b80 --- /dev/null +++ b/assets/js/4306.3752735f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[4306],{84306(e,r,s){s.d(r,{diagram:()=>c});var a=s(2824),t=(s(64918),s(96755),s(1672),s(9417),s(338),s(78771),s(46853),s(717),s(79515),s(44505),s(72379),s(58962),s(16459),s(76385),s(31293),s(86827)),c={parser:a._$,get db(){return new a.NM},renderer:a.Lh,styles:a.tM,init:(0,t.K)(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}}]); \ No newline at end of file diff --git a/assets/js/4307.ad6a53d8.js b/assets/js/4307.ad6a53d8.js new file mode 100644 index 000000000..7898b462d --- /dev/null +++ b/assets/js/4307.ad6a53d8.js @@ -0,0 +1,1837 @@ +/*! For license information please see 4307.ad6a53d8.js.LICENSE.txt */ +(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[4307],{74206(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv2020=void 0;const n=r(12785),i=r(97582),o=r(21498),s=r(72791),a="https://json-schema.org/draft/2020-12/schema";class l extends n.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),i.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:e,meta:t}=this.opts;t&&(s.default.call(this,e),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.Ajv2020=l,e.exports=t=l,e.exports.Ajv2020=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var c=r(18597);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var u=r(29288);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var p=r(84273);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var d=r(92830);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return d.default}})},5659(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class r{}t._CodeOrName=r,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends r{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=n;class i extends r{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce((e,t)=>`${e}${t}`,"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e),{})}}function o(e,...t){const r=[e[0]];let n=0;for(;n"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class l extends a{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const r=e?i.varKinds.var:this.varKind,n=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=C(this.rhs,e,t)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class c extends a{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof n.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=C(this.rhs,e,t),this}get names(){return $(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class u extends c{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class p extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class d extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class f extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class h extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=C(this.code,e,t),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class m extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let n=r.length;for(;n--;){const i=r[n];i.optimizeNames(e,t)||(T(e,i.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>P(e,t.names),{})}}class y extends m{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class g extends m{}class b extends y{}b.kind="else";class v extends y{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new b(e):e}return t?!1===e?t instanceof v?t:t.nodes:this.nodes.length?this:new v(I(e),t instanceof v?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=C(this.condition,e,t),this}get names(){const e=super.names;return $(e,this.condition),this.else&&P(e,this.else.names),e}}v.kind="if";class x extends y{}x.kind="for";class w extends x{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=C(this.iteration,e,t),this}get names(){return P(super.names,this.iteration.names)}}class S extends x{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?i.varKinds.var:this.varKind,{name:r,from:n,to:o}=this;return`for(${t} ${r}=${n}; ${r}<${o}; ${r}++)`+super.render(e)}get names(){const e=$(super.names,this.from);return $(e,this.to)}}class k extends x{constructor(e,t,r,n){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=C(this.iterable,e,t),this}get names(){return P(super.names,this.iterable.names)}}class O extends y{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}O.kind="func";class _ extends m{render(e){return"return "+super.render(e)}}_.kind="return";class E extends y{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&P(e,this.catch.names),this.finally&&P(e,this.finally.names),e}}class A extends y{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}A.kind="catch";class j extends y{render(e){return"finally"+super.render(e)}}j.kind="finally";function P(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function $(e,t){return t instanceof n._CodeOrName?P(e,t.names):e}function C(e,t,r){return e instanceof n.Name?o(e):(i=e)instanceof n._Code&&i._items.some(e=>e instanceof n.Name&&1===t[e.str]&&void 0!==r[e.str])?new n._Code(e._items.reduce((e,t)=>(t instanceof n.Name&&(t=o(t)),t instanceof n._Code?e.push(...t._items):e.push(t),e),[])):e;var i;function o(e){const n=r[e.str];return void 0===n||1!==t[e.str]?e:(delete t[e.str],n)}}function T(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function I(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${D(e)}`}t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new i.Scope({parent:e}),this._nodes=[new g]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){const i=this._scope.toName(t);return void 0!==r&&n&&(this._constants[i.str]=r),this._leafNode(new l(e,i,r)),i}const(e,t,r){return this._def(i.varKinds.const,e,t,r)}let(e,t,r){return this._def(i.varKinds.let,e,t,r)}var(e,t,r){return this._def(i.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new c(e,t,r))}add(e,r){return this._leafNode(new u(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==n.nil&&this._leafNode(new h(e)),this}object(...e){const t=["{"];for(const[r,i]of e)t.length>1&&t.push(","),t.push(r),(r!==i||this.opts.es5)&&(t.push(":"),(0,n.addCodeArg)(t,i));return t.push("}"),new n._Code(t)}if(e,t,r){if(this._blockNode(new v(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new v(e))}else(){return this._elseNode(new b)}endIf(){return this._endBlockNode(v,b)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new w(e),t)}forRange(e,t,r,n,o=(this.opts.es5?i.varKinds.var:i.varKinds.let)){const s=this._scope.toName(e);return this._for(new S(o,s,t,r),()=>n(s))}forOf(e,t,r,o=i.varKinds.const){const s=this._scope.toName(e);if(this.opts.es5){const e=t instanceof n.Name?t:this.var("_arr",t);return this.forRange("_i",0,n._`${e}.length`,t=>{this.var(s,n._`${e}[${t}]`),r(s)})}return this._for(new k("of",o,s,t),()=>r(s))}forIn(e,t,r,o=(this.opts.es5?i.varKinds.var:i.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n._`Object.keys(${t})`,r);const s=this._scope.toName(e);return this._for(new k("in",o,s,t),()=>r(s))}endFor(){return this._endBlockNode(x)}label(e){return this._leafNode(new p(e))}break(e){return this._leafNode(new d(e))}return(e){const t=new _;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(_)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new E;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new A(e),t(e)}return r&&(this._currNode=n.finally=new j,this.code(r)),this._endBlockNode(A,j)}throw(e){return this._leafNode(new f(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=n.nil,r,i){return this._blockNode(new O(e,t,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(O)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof v))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=I;const N=L(t.operators.AND);t.and=function(...e){return e.reduce(N)};const R=L(t.operators.OR);function L(e){return(t,r)=>t===n.nil?r:r===n.nil?t:n._`${D(t)} ${e} ${D(r)}`}function D(e){return e instanceof n.Name?e:n._`(${e})`}t.or=function(...e){return e.reduce(R)}},352(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const n=r(5659);class i extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var o;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(o||(t.UsedValueState=o={})),t.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class s{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof n.Name?e:this.name(e)}name(e){return new n.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=s;class a extends n.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=n._`.${new n.Name(t)}[${r}]`}}t.ValueScopeName=a;const l=n._`\n`;t.ValueScope=class extends s{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?l:n.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:i}=n,o=null!==(r=t.key)&&void 0!==r?r:t.ref;let s=this._values[i];if(s){const e=s.get(o);if(e)return e}else s=this._values[i]=new Map;s.set(o,n);const a=this._scope[i]||(this._scope[i]=[]),l=a.length;return a[l]=t.ref,n.setValue(t,{property:i,itemIndex:l}),n}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return n._`${e}${t.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,r)}_reduceValues(e,r,s={},a){let l=n.nil;for(const c in e){const u=e[c];if(!u)continue;const p=s[c]=s[c]||new Map;u.forEach(e=>{if(p.has(e))return;p.set(e,o.Started);let s=r(e);if(s){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;l=n._`${l}${r} ${e} = ${s};${this.opts._n}`}else{if(!(s=null==a?void 0:a(e)))throw new i(e);l=n._`${l}${s}${this.opts._n}`}p.set(e,o.Completed)})}return l}}},60695(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const n=r(29288),i=r(62124),o=r(86202);function s(e,t){const r=e.const("err",t);e.if(n._`${o.default.vErrors} === null`,()=>e.assign(o.default.vErrors,n._`[${r}]`),n._`${o.default.vErrors}.push(${r})`),e.code(n._`${o.default.errors}++`)}function a(e,t){const{gen:r,validateName:i,schemaEnv:o}=e;o.$async?r.throw(n._`new ${e.ValidationError}(${t})`):(r.assign(n._`${i}.errors`,t),r.return(!1))}t.keywordError={message:({keyword:e})=>n.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?n.str`"${e}" keyword must be ${t} ($data)`:n.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,r=t.keywordError,i,o){const{it:l}=e,{gen:u,compositeRule:p,allErrors:d}=l,f=c(e,r,i);(null!=o?o:p||d)?s(u,f):a(l,n._`[${f}]`)},t.reportExtraError=function(e,r=t.keywordError,n){const{it:i}=e,{gen:l,compositeRule:u,allErrors:p}=i;s(l,c(e,r,n)),u||p||a(i,o.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(o.default.errors,t),e.if(n._`${o.default.vErrors} !== null`,()=>e.if(t,()=>e.assign(n._`${o.default.vErrors}.length`,t),()=>e.assign(o.default.vErrors,null)))},t.extendErrors=function({gen:e,keyword:t,schemaValue:r,data:i,errsCount:s,it:a}){if(void 0===s)throw new Error("ajv implementation error");const l=e.name("err");e.forRange("i",s,o.default.errors,s=>{e.const(l,n._`${o.default.vErrors}[${s}]`),e.if(n._`${l}.instancePath === undefined`,()=>e.assign(n._`${l}.instancePath`,(0,n.strConcat)(o.default.instancePath,a.errorPath))),e.assign(n._`${l}.schemaPath`,n.str`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign(n._`${l}.schema`,r),e.assign(n._`${l}.data`,i))})};const l={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function c(e,t,r){const{createErrors:i}=e.it;return!1===i?n._`{}`:function(e,t,r={}){const{gen:i,it:s}=e,a=[u(s,r),p(e,r)];return function(e,{params:t,message:r},i){const{keyword:s,data:a,schemaValue:c,it:u}=e,{opts:p,propertyName:d,topSchemaRef:f,schemaPath:h}=u;i.push([l.keyword,s],[l.params,"function"==typeof t?t(e):t||n._`{}`]),p.messages&&i.push([l.message,"function"==typeof r?r(e):r]);p.verbose&&i.push([l.schema,c],[l.parentSchema,n._`${f}${h}`],[o.default.data,a]);d&&i.push([l.propertyName,d])}(e,t,a),i.object(...a)}(e,t,r)}function u({errorPath:e},{instancePath:t}){const r=t?n.str`${e}${(0,i.getErrorPath)(t,i.Type.Str)}`:e;return[o.default.instancePath,(0,n.strConcat)(o.default.instancePath,r)]}function p({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:o}){let s=o?t:n.str`${t}/${e}`;return r&&(s=n.str`${s}${(0,i.getErrorPath)(r,i.Type.Str)}`),[l.schemaPath,s]}},96066(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const n=r(29288),i=r(84273),o=r(86202),s=r(39630),a=r(62124),l=r(18597);class c{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,s.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function u(e){const t=d.call(this,e);if(t)return t;const r=(0,s.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:c}=this.opts.code,{ownProperties:u}=this.opts,p=new n.CodeGen(this.scope,{es5:a,lines:c,ownProperties:u});let f;e.$async&&(f=p.scopeValue("Error",{ref:i.default,code:n._`require("ajv/dist/runtime/validation_error").default`}));const h=p.scopeName("validate");e.validateName=h;const m={gen:p,allErrors:this.opts.allErrors,data:o.default.data,parentData:o.default.parentData,parentDataProperty:o.default.parentDataProperty,dataNames:[o.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:p.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,n.stringify)(e.schema)}:{ref:e.schema}),validateName:h,ValidationError:f,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:n.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:n._`""`,opts:this.opts,self:this};let y;try{this._compilations.add(e),(0,l.validateFunctionCode)(m),p.optimize(this.opts.code.optimize);const t=p.toString();y=`const visitedNodesForRef = new WeakMap(); ${p.scopeRefs(o.default.scope)}return ${t}`,this.opts.code.process&&(y=this.opts.code.process(y,e));const r=new Function(`${o.default.self}`,`${o.default.scope}`,y)(this,this.scope.get());if(this.scope.value(h,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:h,validateCode:t,scopeValues:p._values}),this.opts.unevaluated){const{props:e,items:t}=m;r.evaluated={props:e instanceof n.Name?void 0:e,items:t instanceof n.Name?void 0:t,dynamicProps:e instanceof n.Name,dynamicItems:t instanceof n.Name},r.source&&(r.source.evaluated=(0,n.stringify)(r.evaluated))}return e.validate=r,e}catch(g){throw delete e.validate,delete e.validateName,y&&this.logger.error("Error compiling schema, function code:",y),g}finally{this._compilations.delete(e)}}function p(e){return(0,s.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:u.call(this,e)}function d(e){for(const t of this._compilations)if(f(t,e))return t}function f(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function h(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||m.call(this,e,t)}function m(e,t){const r=this.opts.uriResolver.parse(t),n=(0,s._getFullPath)(this.opts.uriResolver,r);let i=(0,s.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return g.call(this,r,e);const o=(0,s.normalizeId)(n),a=this.refs[o]||this.schemas[o];if("string"==typeof a){const t=m.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return g.call(this,r,t)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||u.call(this,a),o===(0,s.normalizeId)(t)){const{schema:t}=a,{schemaId:r}=this.opts,n=t[r];return n&&(i=(0,s.resolveUrl)(this.opts.uriResolver,i,n)),new c({schema:t,schemaId:r,root:e,baseId:i})}return g.call(this,r,a)}}t.SchemaEnv=c,t.compileSchema=u,t.resolveRef=function(e,t,r){var n;const i=(0,s.resolveUrl)(this.opts.uriResolver,t,r),o=e.refs[i];if(o)return o;let a=h.call(this,e,i);if(void 0===a){const r=null===(n=e.localRefs)||void 0===n?void 0:n[i],{schemaId:o}=this.opts;r&&(a=new c({schema:r,schemaId:o,root:e,baseId:t}))}if(void 0===a&&this.opts.loadSchemaSync){const n=this.opts.loadSchemaSync(t,r,i);!n||this.refs[i]||this.schemas[i]||(this.addSchema(n,i,void 0),a=h.call(this,e,i))}return void 0!==a?e.refs[i]=p.call(this,a):void 0},t.getCompilingSchema=d,t.resolveSchema=m;const y=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function g(e,{baseId:t,schema:r,root:n}){var i;if("/"!==(null===(i=e.fragment)||void 0===i?void 0:i[0]))return;for(const c of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,a.unescapeFragment)(c)];if(void 0===e)return;const n="object"==typeof(r=e)&&r[this.opts.schemaId];!y.has(c)&&n&&(t=(0,s.resolveUrl)(this.opts.uriResolver,t,n))}let o;if("boolean"!=typeof r&&r.$ref&&!(0,a.schemaHasRulesButRef)(r,this.RULES)){const e=(0,s.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=m.call(this,n,e)}const{schemaId:l}=this.opts;return o=o||new c({schema:r,schemaId:l,root:n,baseId:t}),o.schema!==o.root.schema?o:void 0}},86202(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(29288),i={data:new n.Name("data"),valCxt:new n.Name("valCxt"),instancePath:new n.Name("instancePath"),parentData:new n.Name("parentData"),parentDataProperty:new n.Name("parentDataProperty"),rootData:new n.Name("rootData"),dynamicAnchors:new n.Name("dynamicAnchors"),isAllOfVariant:new n.Name("isAllOfVariant"),vErrors:new n.Name("vErrors"),errors:new n.Name("errors"),this:new n.Name("this"),self:new n.Name("self"),scope:new n.Name("scope"),json:new n.Name("json"),jsonPos:new n.Name("jsonPos"),jsonLen:new n.Name("jsonLen"),jsonPart:new n.Name("jsonPart")};t.default=i},92830(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(39630);class i extends Error{constructor(e,t,r,i){super(i||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,n.resolveUrl)(e,t,r),this.missingSchema=(0,n.normalizeId)((0,n.getFullPath)(e,this.missingRef))}}t.default=i},39630(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const n=r(62124),i=r(32017),o=r(7106),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!l(e):!!t&&c(e)<=t)};const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function l(e){for(const t in e){if(a.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(l))return!0;if("object"==typeof r&&l(r))return!0}return!1}function c(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!s.has(r)&&("object"==typeof e[r]&&(0,n.eachItem)(e[r],e=>t+=c(e)),t===1/0))return 1/0}return t}function u(e,t="",r){!1!==r&&(t=f(t));const n=e.parse(t);return p(e,n)}function p(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=u,t._getFullPath=p;const d=/#\/?$/;function f(e){return e?e.replace(d,""):""}t.normalizeId=f,t.resolveUrl=function(e,t,r){return r=f(r),e.resolve(t,r)};const h=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:n}=this.opts,s=f(e[r]||t),a={"":s},l=u(n,s,!1),c={},p=new Set;return o(e,{allKeys:!0},(e,t,n,i)=>{if(void 0===i)return;const o=l+t;let s=a[i];function u(t){const r=this.opts.uriResolver.resolve;if(t=f(s?r(s,t):t),p.has(t))throw m(t);p.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?d(e,n.schema,t):t!==f(o)&&("#"===t[0]?(d(e,c[t],t),c[t]=e):this.refs[t]=o),t}function y(e){if("string"==typeof e){if(!h.test(e))throw new Error(`invalid anchor "${e}"`);u.call(this,`#${e}`)}}"string"==typeof e[r]&&(s=u.call(this,e[r])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),a[t]=s}),c;function d(e,t,r){if(void 0!==t&&!i(e,t))throw m(r)}function m(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},19485(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const r=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&r.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},62124(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const n=r(29288),i=r(5659);function o(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const i=n.RULES.keywords;for(const o in t)i[o]||h(e,`unknown keyword: "${o}"`)}function s(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function a(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function l(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function c({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:i}){return(o,s,a,l)=>{const c=void 0===a?s:a instanceof n.Name?(s instanceof n.Name?e(o,s,a):t(o,s,a),a):s instanceof n.Name?(t(o,a,s),s):r(s,a);return l!==n.Name||c instanceof n.Name?c:i(o,c)}}function u(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",n._`{}`);return void 0!==t&&p(e,r,t),r}function p(e,t,r){Object.keys(r).forEach(r=>e.assign(n._`${t}${(0,n.getProperty)(r)}`,!0))}t.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(o(e,t),!s(t,e.self.RULES.all))},t.checkUnknownRules=o,t.schemaHasRules=s,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,i,o){if(!o){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return n._`${r}`}return n._`${e}${t}${(0,n.getProperty)(i)}`},t.unescapeFragment=function(e){return l(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(a(e))},t.escapeJsonPointer=a,t.unescapeJsonPointer=l,t.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},t.mergeEvaluated={props:c({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,()=>{e.if(n._`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,n._`${r} || {}`).code(n._`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,()=>{!0===t?e.assign(r,!0):(e.assign(r,n._`${r} || {}`),p(e,r,t))}),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:u}),items:c({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,()=>e.assign(r,n._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,()=>e.assign(r,!0===t||n._`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=u,t.setEvaluated=p;const d={};var f;function h(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:d[t.code]||(d[t.code]=new i._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(f||(t.Type=f={})),t.getErrorPath=function(e,t,r){if(e instanceof n.Name){const i=t===f.Num;return r?i?n._`"[" + ${e} + "]"`:n._`"['" + ${e} + "']"`:i?n._`"/" + ${e}`:n._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,n.getProperty)(e).toString():"/"+a(e)},t.checkStrictMode=h},59160(e,t){"use strict";function r(e,t){return t.rules.some(t=>n(e,t))}function n(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some(t=>void 0!==e[t]))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},n){const i=t.RULES.types[n];return i&&!0!==i&&r(e,i)},t.shouldUseGroup=r,t.shouldUseRule=n},8886(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const n=r(60695),i=r(29288),o=r(86202),s={message:"boolean schema is false"};function a(e,t){const{gen:r,data:i}=e,o={gen:r,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,n.reportError)(o,s,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:r,validateName:n}=e;!1===r?a(e,!1):"object"==typeof r&&!0===r.$async?t.return(o.default.data):(t.assign(i._`${n}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),a(e)):r.var(t,!0)}},66649(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const n=r(19485),i=r(59160),o=r(60695),s=r(29288),a=r(62124);var l;function c(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(n.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(l||(t.DataType=l={})),t.getSchemaTypes=function(e){const t=c(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=c,t.coerceAndCheckDataType=function(e,t){const{gen:r,data:n,opts:o}=e,a=function(e,t){return t?e.filter(e=>u.has(e)||"array"===t&&"array"===e):[]}(t,o.coerceTypes),c=t.length>0&&!(0===a.length&&1===t.length&&(0,i.schemaHasRulesForType)(e,t[0]));if(c){const i=d(t,n,o.strictNumbers,l.Wrong);r.if(i,()=>{a.length?function(e,t,r){const{gen:n,data:i,opts:o}=e,a=n.let("dataType",s._`typeof ${i}`),l=n.let("coerced",s._`undefined`);"array"===o.coerceTypes&&n.if(s._`${a} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,s._`${i}[0]`).assign(a,s._`typeof ${i}`).if(d(t,i,o.strictNumbers),()=>n.assign(l,i)));n.if(s._`${l} !== undefined`);for(const s of r)(u.has(s)||"array"===s&&"array"===o.coerceTypes)&&c(s);function c(e){switch(e){case"string":return void n.elseIf(s._`${a} == "number" || ${a} == "boolean"`).assign(l,s._`"" + ${i}`).elseIf(s._`${i} === null`).assign(l,s._`""`);case"number":return void n.elseIf(s._`${a} == "boolean" || ${i} === null + || (${a} == "string" && ${i} && ${i} == +${i})`).assign(l,s._`+${i}`);case"integer":return void n.elseIf(s._`${a} === "boolean" || ${i} === null + || (${a} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(l,s._`+${i}`);case"boolean":return void n.elseIf(s._`${i} === "false" || ${i} === 0 || ${i} === null`).assign(l,!1).elseIf(s._`${i} === "true" || ${i} === 1`).assign(l,!0);case"null":return n.elseIf(s._`${i} === "" || ${i} === 0 || ${i} === false`),void n.assign(l,null);case"array":n.elseIf(s._`${a} === "string" || ${a} === "number" + || ${a} === "boolean" || ${i} === null`).assign(l,s._`[${i}]`)}}n.else(),h(e),n.endIf(),n.if(s._`${l} !== undefined`,()=>{n.assign(i,l),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(s._`${t} !== undefined`,()=>e.assign(s._`${t}[${r}]`,n))}(e,l)})}(e,t,a):h(e)})}return c};const u=new Set(["string","number","integer","boolean","null"]);function p(e,t,r,n=l.Correct){const i=n===l.Correct?s.operators.EQ:s.operators.NEQ;let o;switch(e){case"null":return s._`${t} ${i} null`;case"array":o=s._`Array.isArray(${t})`;break;case"object":o=s._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=a(s._`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=a();break;default:return s._`typeof ${t} ${i} ${e}`}return n===l.Correct?o:(0,s.not)(o);function a(e=s.nil){return(0,s.and)(s._`typeof ${t} == "number"`,e,r?s._`isFinite(${t})`:s.nil)}}function d(e,t,r,n){if(1===e.length)return p(e[0],t,r,n);let i;const o=(0,a.toHash)(e);if(o.array&&o.object){const e=s._`typeof ${t} != "object"`;i=o.null?e:s._`!${t} || ${e}`,delete o.null,delete o.array,delete o.object}else i=s.nil;o.number&&delete o.integer;for(const a in o)i=(0,s.and)(i,p(a,t,r,n));return i}t.checkDataType=p,t.checkDataTypes=d;const f={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?s._`{type: ${e}}`:s._`{type: ${t}}`};function h(e){const t=function(e){const{gen:t,data:r,schema:n}=e,i=(0,a.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}(e);(0,o.reportError)(t,f)}t.reportTypeError=h},70511(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const n=r(29288),i=r(62124);function o(e,t,r){const{gen:o,compositeRule:s,data:a,opts:l}=e;if(void 0===r)return;const c=n._`${a}${(0,n.getProperty)(t)}`;if(s)return void(0,i.checkStrictMode)(e,`default is ignored for: ${c}`);let u=n._`${c} === undefined`;"empty"===l.useDefaults&&(u=n._`${u} || ${c} === null || ${c} === ""`),o.if(u,n._`${c} = ${(0,n.stringify)(r)}`)}t.assignDefaults=function(e,t){const{properties:r,items:n}=e.schema;if("object"===t&&r)for(const i in r)o(e,i,r[i].default);else"array"===t&&Array.isArray(n)&&n.forEach((t,r)=>o(e,r,t.default))}},18597(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=r(8886),i=r(66649),o=r(59160),s=r(66649),a=r(70511),l=r(886),c=r(70820),u=r(29288),p=r(86202),d=r(39630),f=r(62124),h=r(60695);function m({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},o){i.code.es5?e.func(t,u._`${p.default.data}, ${p.default.valCxt}`,n.$async,()=>{e.code(u._`"use strict"; ${y(r,i)}`),function(e,t){e.if(p.default.valCxt,()=>{e.var(p.default.instancePath,u._`${p.default.valCxt}.${p.default.instancePath}`),e.var(p.default.parentData,u._`${p.default.valCxt}.${p.default.parentData}`),e.var(p.default.parentDataProperty,u._`${p.default.valCxt}.${p.default.parentDataProperty}`),e.var(p.default.rootData,u._`${p.default.valCxt}.${p.default.rootData}`),e.var(p.default.isAllOfVariant,u._`${p.default.valCxt}.${p.default.isAllOfVariant}`),t.dynamicRef&&e.var(p.default.dynamicAnchors,u._`${p.default.valCxt}.${p.default.dynamicAnchors}`)},()=>{e.var(p.default.instancePath,u._`""`),e.var(p.default.parentData,u._`undefined`),e.var(p.default.parentDataProperty,u._`undefined`),e.var(p.default.rootData,p.default.data),e.var(p.default.isAllOfVariant,u._`0`),t.dynamicRef&&e.var(p.default.dynamicAnchors,u._`{}`)})}(e,i),e.code(o)}):e.func(t,u._`${p.default.data}, ${function(e){return u._`{${p.default.instancePath}="", ${p.default.parentData}, ${p.default.parentDataProperty}, ${p.default.rootData}=${p.default.data}${e.dynamicRef?u._`, ${p.default.dynamicAnchors}={}`:u.nil}, ${p.default.isAllOfVariant} = 0}={}`}(i)}`,n.$async,()=>e.code(y(r,i)).code(o))}function y(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?u._`/*# sourceURL=${r} */`:u.nil}function g(e,t){v(e)&&(x(e),b(e))?function(e,t){const{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&S(e);(function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,d.resolveUrl)(e.opts.uriResolver,e.baseId,t))})(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const o=n.const("_errs",p.default.errors);w(e,o),n.var(t,u._`${o} === ${p.default.errors}`)}(e,t):(0,n.boolOrEmptySchema)(e,t)}function b({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function v(e){return"boolean"!=typeof e.schema}function x(e){(0,f.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function w(e,t){if(e.opts.jtd)return k(e,[],!1,t);const r=(0,i.getSchemaTypes)(e.schema);k(e,r,!(0,i.coerceAndCheckDataType)(e,r),t)}function S({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){const o=r.$comment;if(!0===i.$comment)e.code(u._`${p.default.self}.logger.log(${o})`);else if("function"==typeof i.$comment){const r=u.str`${n}/$comment`,i=e.scopeValue("root",{ref:t.root});e.code(u._`${p.default.self}.opts.$comment(${o}, ${r}, ${i}.schema)`)}}function k(e,t,r,n){const{gen:i,schema:a,data:l,allErrors:c,opts:d,self:h}=e,{RULES:m}=h;function y(f){(0,o.shouldUseGroup)(a,f)&&(f.type?(i.if((0,s.checkDataType)(f.type,l,d.strictNumbers)),O(e,f),1===t.length&&t[0]===f.type&&r&&(i.else(),(0,s.reportTypeError)(e)),i.endIf()):O(e,f),c||i.if(u._`${p.default.errors} === ${n||0}`))}!a.$ref||!d.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(a,m)?(d.jtd||function(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;(function(e,t){if(!t.length)return;if(!e.dataTypes.length)return void(e.dataTypes=t);t.forEach(t=>{E(e.dataTypes,t)||A(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)}),function(e,t){const r=[];for(const n of e.dataTypes)E(t,n)?r.push(n):t.includes("integer")&&"number"===n&&r.push("integer");e.dataTypes=r}(e,t)})(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&A(e,"use allowUnionTypes to allow union type keyword")}(e,t);!function(e,t){const r=e.self.RULES.all;for(const n in r){const i=r[n];if("object"==typeof i&&(0,o.shouldUseRule)(e.schema,i)){const{type:r}=i.definition;r.length&&!r.some(e=>_(t,e))&&A(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes)}(e,t),i.block(()=>{for(const e of m.rules)y(e);y(m.post)})):i.block(()=>P(e,"$ref",m.all.$ref.definition))}function O(e,t){const{gen:r,schema:n,opts:{useDefaults:i}}=e;function s(t,r){return!("unevaluatedProperties"!==r.keyword||!t.properties&&!t.patternProperties||e.isAllOfVariant||!1!==e.opts.defaultUnevaluatedProperties)}i&&(0,a.assignDefaults)(e,t.type),r.block(()=>{for(const r of t.rules)((0,o.shouldUseRule)(n,r)||s(n,r))&&P(e,r.keyword,r.definition,t.type)})}function _(e,t){return e.includes(t)||"number"===t&&e.includes("integer")}function E(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function A(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,f.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){v(e)&&(x(e),b(e))?function(e){const{schema:t,opts:r,gen:n}=e;m(e,()=>{r.$comment&&t.$comment&&S(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,f.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(p.default.vErrors,null),n.let(p.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",u._`${r}.evaluated`),t.if(u._`${e.evaluated}.dynamicProps`,()=>t.assign(u._`${e.evaluated}.props`,u._`undefined`)),t.if(u._`${e.evaluated}.dynamicItems`,()=>t.assign(u._`${e.evaluated}.items`,u._`undefined`))}(e),w(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=e;r.$async?t.if(u._`${p.default.errors} === 0`,()=>t.return(p.default.data),()=>t.throw(u._`new ${i}(${p.default.vErrors})`)):(t.assign(u._`${n}.errors`,p.default.vErrors),o.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof u.Name&&e.assign(u._`${t}.props`,r);n instanceof u.Name&&e.assign(u._`${t}.items`,n)}(e),t.return(u._`${p.default.errors} === 0`))}(e)})}(e):m(e,()=>(0,n.topBoolOrEmptySchema)(e))};class j{constructor(e,t,r){if((0,l.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,f.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",T(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,l.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",p.default.errors))}result(e,t,r){this.failResult((0,u.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,u.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(u._`${t} !== undefined && (${(0,u.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?h.reportExtraError:h.reportError)(this,this.def.error,t)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=u.nil){this.gen.block(()=>{this.check$data(e,r),t()})}check$data(e=u.nil,t=u.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:i,def:o}=this;r.if((0,u.or)(u._`${n} === undefined`,t)),e!==u.nil&&r.assign(e,!0),(i.length||o.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==u.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:n,it:i}=this;return(0,u.or)(function(){if(r.length){if(!(t instanceof u.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return u._`${(0,s.checkDataTypes)(e,t,i.opts.strictNumbers,s.DataType.Wrong)}`}return u.nil}(),function(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.validateSchema});return u._`!${r}(${t})`}return u.nil}())}subschema(e,t,r){const n=(0,c.getSubschema)(this.it,e);(0,c.extendSubschemaData)(n,this.it,e),(0,c.extendSubschemaMode)(n,e);const i={...this.it,...n,items:void 0,props:void 0,isAllOfVariant:r};return g(i,t),i}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=f.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=f.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,()=>this.mergeEvaluated(e,u.Name)),!0}}function P(e,t,r,n){const i=new j(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,l.funcKeywordCode)(i,r):"macro"in r?(0,l.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,l.funcKeywordCode)(i,r)}t.KeywordCxt=j;const $=/^\/(?:[^~]|~0|~1)*$/,C=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function T(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,o;if(""===e)return p.default.rootData;if("/"===e[0]){if(!$.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,o=p.default.rootData}else{const s=C.exec(e);if(!s)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+s[1];if(i=s[2],"#"===i){if(a>=t)throw new Error(l("property/index",a));return n[t-a]}if(a>t)throw new Error(l("data",a));if(o=r[t-a],!i)return o}let s=o;const a=i.split("/");for(const c of a)c&&(o=u._`${o}${(0,u.getProperty)((0,f.unescapeJsonPointer)(c))}`,s=u._`${s} && ${o}`);return s;function l(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=T},886(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const n=r(29288),i=r(86202),o=r(24608),s=r(60695);function a(e){const{gen:t,data:r,it:i}=e;t.if(i.parentData,()=>t.assign(r,n._`${i.parentData}[${i.parentDataProperty}]`))}function l(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,n.stringify)(r)})}t.macroKeywordCode=function(e,t){const{gen:r,keyword:i,schema:o,parentSchema:s,it:a}=e,c=t.macro.call(a.self,o,s,a),u=l(r,i,c);!1!==a.opts.validateSchema&&a.self.validateSchema(c,!0);const p=r.name("valid");e.subschema({schema:c,schemaPath:n.nil,errSchemaPath:`${a.errSchemaPath}/${i}`,topSchemaRef:u,compositeRule:!0},p),e.pass(p,()=>e.error(!0))},t.funcKeywordCode=function(e,t){var r;const{gen:c,keyword:u,schema:p,parentSchema:d,$data:f,it:h}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(h,t);const m=!f&&t.compile?t.compile.call(h.self,p,d,h):t.validate,y=l(c,u,m),g=c.let("valid");function b(r=(t.async?n._`await `:n.nil)){const s=h.opts.passContext?i.default.this:i.default.self,a=!("compile"in t&&!f||!1===t.schema);c.assign(g,n._`${r}${(0,o.callValidateCode)(e,y,s,a)}`,t.modifying)}function v(e){var r;c.if((0,n.not)(null!==(r=t.valid)&&void 0!==r?r:g),e)}e.block$data(g,function(){if(!1===t.errors)b(),t.modifying&&a(e),v(()=>e.error());else{const r=t.async?function(){const e=c.let("ruleErrs",null);return c.try(()=>b(n._`await `),t=>c.assign(g,!1).if(n._`${t} instanceof ${h.ValidationError}`,()=>c.assign(e,n._`${t}.errors`),()=>c.throw(t))),e}():function(){const e=n._`${y}.errors`;return c.assign(e,null),b(n.nil),e}();t.modifying&&a(e),v(()=>function(e,t){const{gen:r}=e;r.if(n._`Array.isArray(${t})`,()=>{r.assign(i.default.vErrors,n._`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`).assign(i.default.errors,n._`${i.default.vErrors}.length`),(0,s.extendErrors)(e)},()=>e.error())}(e,r))}}),e.ok(null!==(r=t.valid)&&void 0!==r?r:g)},t.validSchemaType=function(e,t,r=!1){return!t.length||t.some(t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e)},t.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");const s=i.dependencies;if(null==s?void 0:s.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw new Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(i.validateSchema){if(!i.validateSchema(e[o])){const e=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}}},70820(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=r(29288),i=r(62124);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:o,schemaPath:s,errSchemaPath:a,topSchemaRef:l}){if(void 0!==t&&void 0!==o)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const o=e.schema[t];return void 0===r?{schema:o,schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:o[r],schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}${(0,n.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,i.escapeFragment)(r)}`}}if(void 0!==o){if(void 0===s||void 0===a||void 0===l)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:s,topSchemaRef:l,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:o,data:s,dataTypes:a,propertyName:l}){if(void 0!==s&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:c}=t;if(void 0!==r){const{errorPath:s,dataPathArr:a,opts:l}=t;u(c.let("data",n._`${t.data}${(0,n.getProperty)(r)}`,!0)),e.errorPath=n.str`${s}${(0,i.getErrorPath)(r,o,l.jsPropertySyntax)}`,e.parentDataProperty=n._`${r}`,e.dataPathArr=[...a,e.parentDataProperty]}if(void 0!==s){u(s instanceof n.Name?s:c.let("data",s,!0)),void 0!==l&&(e.propertyName=l)}function u(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}a&&(e.dataTypes=a)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){void 0!==n&&(e.compositeRule=n),void 0!==i&&(e.createErrors=i),void 0!==o&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r}},12785(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=r(18597);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var i=r(29288);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return i.CodeGen}});const o=r(84273),s=r(92830),a=r(19485),l=r(96066),c=r(29288),u=r(39630),p=r(66649),d=r(62124),f=r(68884),h=r(35689),m=(e,t)=>new RegExp(e,t);m.code="new RegExp";const y=["removeAdditional","useDefaults","coerceTypes","defaultUnevaluatedProperties","defaultAdditionalProperties"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),b={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function x(e){var t,r,n,i,o,s,a,l,c,u,p,d,f,y,g,b,v,x,w,S,k,O,_,E,A;const j=e.strict,P=null===(t=e.code)||void 0===t?void 0:t.optimize,$=!0===P||void 0===P?1:P||0,C=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:m,T=null!==(i=e.uriResolver)&&void 0!==i?i:h.default;return{strictSchema:null===(s=null!==(o=e.strictSchema)&&void 0!==o?o:j)||void 0===s||s,strictNumbers:null===(l=null!==(a=e.strictNumbers)&&void 0!==a?a:j)||void 0===l||l,strictTypes:null!==(u=null!==(c=e.strictTypes)&&void 0!==c?c:j)&&void 0!==u?u:"log",strictTuples:null!==(d=null!==(p=e.strictTuples)&&void 0!==p?p:j)&&void 0!==d?d:"log",strictRequired:null!==(y=null!==(f=e.strictRequired)&&void 0!==f?f:j)&&void 0!==y&&y,code:e.code?{...e.code,optimize:$,regExp:C}:{optimize:$,regExp:C},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:200,loopEnum:null!==(b=e.loopEnum)&&void 0!==b?b:200,meta:null===(v=e.meta)||void 0===v||v,messages:null===(x=e.messages)||void 0===x||x,inlineRefs:null===(w=e.inlineRefs)||void 0===w||w,schemaId:null!==(S=e.schemaId)&&void 0!==S?S:"$id",addUsedSchema:null===(k=e.addUsedSchema)||void 0===k||k,validateSchema:null===(O=e.validateSchema)||void 0===O||O,validateFormats:null===(_=e.validateFormats)||void 0===_||_,unicodeRegExp:null===(E=e.unicodeRegExp)||void 0===E||E,int32range:null===(A=e.int32range)||void 0===A||A,uriResolver:T}}class w{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...x(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:g,es5:t,lines:r}),this.logger=function(e){if(!1===e)return j;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),S.call(this,b,e,"NOT SUPPORTED"),S.call(this,v,e,"DEPRECATED","warn"),this._metaOpts=A.call(this),e.formats&&_.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&E.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),O.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=f;"id"===r&&(n={...f},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}setDefaultUnevaluatedProperties(e){this.opts.defaultUnevaluatedProperties=e}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await i.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||o.call(this,r)}async function i(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof s.default))throw t;return a.call(this,t),await l.call(this,t.missingSchema),o.call(this,e)}}function a({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function l(e){const r=await c.call(this,e);this.refs[e]||await i.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function c(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let i;if("object"==typeof e){const{schemaId:t}=this.opts;if(i=e[t],void 0!==i&&"string"!=typeof i)throw new Error(`schema ${t} must be string`)}return t=(0,u.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=k.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new l.SchemaEnv({schema:{},schemaId:r});if(t=l.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=k.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,u.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if($.call(this,r,t),!t)return(0,d.eachItem)(r,e=>C.call(this,e)),this;I.call(this,t);const n={...t,type:(0,p.getJSONTypes)(t.type),schemaType:(0,p.getJSONTypes)(t.schemaType)};return(0,d.eachItem)(r,0===n.type.length?e=>C.call(this,e,n):e=>n.type.forEach(t=>C.call(this,e,n,t))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex(t=>t.keyword===e);t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map(e=>`${r}${e.instancePath} ${e.message}`).reduce((e,r)=>e+t+r):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let i=e;for(const e of t)i=i[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,o=i[e];n&&o&&(i[e]=R(o))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,i=this.opts.addUsedSchema){let o;const{schemaId:s}=this.opts;if("object"==typeof e)o=e[s];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let a=this._cache.get(e);if(void 0!==a)return a;r=(0,u.normalizeId)(o||r);const c=u.getSchemaRefs.call(this,e,r);return a=new l.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:r,localRefs:c}),this._cache.set(a.schema,a),i&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=a),n&&this.validateSchema(e,!0),a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):l.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{l.compileSchema.call(this,e)}finally{this.opts=t}}}function S(e,t,r,n="error"){for(const i in e){const o=i;o in t&&this.logger[n](`${r}: option ${i}. ${e[o]}`)}}function k(e){return e=(0,u.normalizeId)(e),this.schemas[e]||this.refs[e]}function O(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function _(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function E(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function A(){const e={...this.opts};for(const t of y)delete e[t];return e}w.ValidationError=o.default,w.MissingRefError=s.default,t.default=w;const j={log(){},warn(){},error(){}};const P=/^[a-z_$][a-z0-9_$:-]*$/i;function $(e,t){const{RULES:r}=this;if((0,d.eachItem)(e,e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!P.test(e))throw new Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function C(e,t,r){var n;const i=null==t?void 0:t.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:o}=this;let s=i?o.post:o.rules.find(({type:e})=>e===r);if(s||(s={type:r,rules:[]},o.rules.push(s)),o.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,p.getJSONTypes)(t.type),schemaType:(0,p.getJSONTypes)(t.schemaType)}};t.before?T.call(this,s,a,t.before):s.rules.push(a),o.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach(e=>this.addKeyword(e))}function T(e,t,r){const n=e.rules.findIndex(e=>e.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function I(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=R(t)),e.validateSchema=this.compile(t,!0))}const N={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function R(e){return{anyOf:[e,N]}}},72791(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(47207),i=r(73243),o=r(98818),s=r(36211),a=r(13953),l=r(36573),c=r(65386),u=r(9509),p=["/properties"];t.default=function(e){return[n,i,o,s,a,t(this,l),c,t(this,u)].forEach(e=>this.addMetaSchema(e,void 0,!1)),this;function t(t,r){return e?t.$dataMetaSchema(r,p):r}}},98947(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(32017);n.code='require("ajv/dist/runtime/equal").default',t.default=n},59794(e,t){"use strict";function r(e){const t=e.length;let r,n=0,i=0;for(;i=55296&&r<=56319&&in.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;Array.isArray(n)?s(e,n):(0,i.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function s(e,t){const{gen:r,schema:o,data:s,keyword:a,it:l}=e;l.items=!0;const c=r.const("len",n._`${s}.length`);if(!1===o)e.setParams({len:t.length}),e.pass(n._`${c} <= ${t.length}`);else if("object"==typeof o&&!(0,i.alwaysValidSchema)(l,o)){const o=r.var("valid",n._`${c} <= ${t.length}`);r.if((0,n.not)(o),()=>function(o){r.forRange("i",t.length,c,t=>{e.subschema({keyword:a,dataProp:t,dataPropType:i.Type.Num},o),l.allErrors||r.if((0,n.not)(o),()=>r.break())})}(o)),e.ok(o)}}t.validateAdditionalItems=s,t.default=o},43003(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(24608),i=r(29288),o=r(86202),s=r(62124),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>i._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,parentSchema:r,data:a,errsCount:l,it:c}=e,{schema:u=c.opts.defaultAdditionalProperties}=e;if(!l)throw new Error("ajv implementation error");const{allErrors:p,opts:d}=c;if(c.props=!0,"all"!==d.removeAdditional&&(0,s.alwaysValidSchema)(c,u))return;const f=(0,n.allSchemaProperties)(r.properties),h=(0,n.allSchemaProperties)(r.patternProperties);function m(e){t.code(i._`delete ${a}[${e}]`)}function y(r){if("all"===d.removeAdditional||d.removeAdditional&&!1===u)m(r);else{if(!1===u)return e.setParams({additionalProperty:r}),e.error(),void(p||t.break());if("object"==typeof u&&!(0,s.alwaysValidSchema)(c,u)){const n=t.name("valid");"failing"===d.removeAdditional?(g(r,n,!1),t.if((0,i.not)(n),()=>{e.reset(),m(r)})):(g(r,n),p||t.if((0,i.not)(n),()=>t.break()))}}}function g(t,r,n){const i={keyword:"additionalProperties",dataProp:t,dataPropType:s.Type.Str};!1===n&&Object.assign(i,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(i,r)}t.forIn("key",a,o=>{f.length||h.length?t.if(function(o){let a;if(f.length>8){const e=(0,s.schemaRefOrVal)(c,r.properties,"properties");a=(0,n.isOwnProperty)(t,e,o)}else a=f.length?(0,i.or)(...f.map(e=>i._`${o} === ${e}`)):i.nil;return h.length&&(a=(0,i.or)(a,...h.map(t=>i._`${(0,n.usePattern)(e,t)}.test(${o})`))),(0,i.not)(a)}(o),()=>y(o)):y(o)}),e.ok(i._`${l} === ${o.default.errors}`)}};t.default=a},15049(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(62124),i={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const o=t.name("valid");r.forEach((t,r)=>{if((0,n.alwaysValidSchema)(i,t))return;const s=e.subschema({keyword:"allOf",schemaProp:r},o,!0);e.ok(o),e.mergeEvaluated(s)})}};t.default=i},7856(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(24608).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=n},3842(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(29288),i=r(62124),o={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?n.str`must contain at least ${e} valid item(s)`:n.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?n._`{minContains: ${e}}`:n._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:o,data:s,it:a}=e;let l,c;const{minContains:u,maxContains:p}=o;a.opts.next?(l=void 0===u?1:u,c=p):l=1;const d=t.const("len",n._`${s}.length`);if(e.setParams({min:l,max:c}),void 0===c&&0===l)return void(0,i.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==c&&l>c)return(0,i.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,i.alwaysValidSchema)(a,r)){let t=n._`${d} >= ${l}`;return void 0!==c&&(t=n._`${t} && ${d} <= ${c}`),void e.pass(t)}a.items=!0;const f=t.name("valid");function h(){const e=t.name("_valid"),r=t.let("count",0);m(e,()=>t.if(e,()=>function(e){t.code(n._`${e}++`),void 0===c?t.if(n._`${e} >= ${l}`,()=>t.assign(f,!0).break()):(t.if(n._`${e} > ${c}`,()=>t.assign(f,!1).break()),1===l?t.assign(f,!0):t.if(n._`${e} >= ${l}`,()=>t.assign(f,!0)))}(r)))}function m(r,n){t.forRange("i",0,d,t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:i.Type.Num,compositeRule:!0},r),n()})}void 0===c&&1===l?m(f,()=>t.if(f,()=>t.break())):0===l?(t.let(f,!0),void 0!==c&&t.if(n._`${s}.length > 0`,h)):(t.let(f,!1),h()),e.result(f,()=>e.reset())}};t.default=o},17630(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=r(29288),i=r(62124),o=r(24608);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const i=1===t?"property":"properties";return n.str`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:i}})=>n._`{property: ${e}, + missingProperty: ${i}, + depsCount: ${t}, + deps: ${r}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e){if("__proto__"===n)continue;(Array.isArray(e[n])?t:r)[n]=e[n]}return[t,r]}(e);a(e,t),l(e,r)}};function a(e,t=e.schema){const{gen:r,data:i,it:s}=e;if(0===Object.keys(t).length)return;const a=r.let("missing");for(const l in t){const c=t[l];if(0===c.length)continue;const u=(0,o.propertyInData)(r,i,l,s.opts.ownProperties);e.setParams({property:l,depsCount:c.length,deps:c.join(", ")}),s.allErrors?r.if(u,()=>{for(const t of c)(0,o.checkReportMissingProp)(e,t)}):(r.if(n._`${u} && (${(0,o.checkMissingProp)(e,c,a)})`),(0,o.reportMissingProp)(e,a),r.else())}}function l(e,t=e.schema){const{gen:r,data:n,keyword:s,it:a}=e,l=r.name("valid");for(const c in t)(0,i.alwaysValidSchema)(a,t[c])||(r.if((0,o.propertyInData)(r,n,c,a.opts.ownProperties),()=>{const t=e.subschema({keyword:s,schemaProp:c},l);e.mergeValidEvaluated(t,l)},()=>r.var(l,!0)),e.ok(l))}t.validatePropertyDeps=a,t.validateSchemaDeps=l,t.default=s},97894(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(17630),i={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,n.validateSchemaDeps)(e)};t.default=i},16908(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(29288),i=r(62124),o={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>n.str`must match "${e.ifClause}" schema`,params:({params:e})=>n._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:o}=e;void 0===r.then&&void 0===r.else&&(0,i.checkStrictMode)(o,'"if" without "then" and "else" is ignored');const a=s(o,"then"),l=s(o,"else");if(!a&&!l)return;const c=t.let("valid",!0),u=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}(),e.reset(),a&&l){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(u,p("then",r),p("else",r))}else a?t.if(u,p("then")):t.if((0,n.not)(u),p("else"));function p(r,i){return()=>{const o=e.subschema({keyword:r},u);t.assign(c,u),e.mergeValidEvaluated(o,c),i?t.assign(i,n._`${r}`):e.setParams({ifClause:r})}}e.pass(c,()=>e.error(!0))}};function s(e,t){const r=e.schema[t];return void 0!==r&&!(0,i.alwaysValidSchema)(e,r)}t.default=o},68499(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(92276),i=r(63183),o=r(51931),s=r(80203),a=r(3842),l=r(17630),c=r(97968),u=r(43003),p=r(55494),d=r(67932),f=r(62346),h=r(7856),m=r(19814),y=r(15049),g=r(16908),b=r(32009);t.default=function(e=!1){const t=[f.default,h.default,m.default,y.default,g.default,b.default,c.default,u.default,l.default,p.default,d.default];return e?t.push(i.default,s.default):t.push(n.default,o.default),t.push(a.default),t}},51931(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=r(29288),i=r(62124),o=r(24608),s={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return a(e,"additionalItems",t);r.items=!0,(0,i.alwaysValidSchema)(r,t)||e.ok((0,o.validateArray)(e))}};function a(e,t,r=e.schema){const{gen:o,parentSchema:s,data:a,keyword:l,it:c}=e;!function(e){const{opts:n,errSchemaPath:o}=c,s=r.length,a=s===e.minItems&&(s===e.maxItems||!1===e[t]);if(n.strictTuples&&!a){const e=`"${l}" is ${s}-tuple, but minItems or maxItems/${t} are not specified or different at path "${o}"`;(0,i.checkStrictMode)(c,e,n.strictTuples)}}(s),c.opts.unevaluated&&r.length&&!0!==c.items&&(c.items=i.mergeEvaluated.items(o,r.length,c.items));const u=o.name("valid"),p=o.const("len",n._`${a}.length`);r.forEach((t,r)=>{(0,i.alwaysValidSchema)(c,t)||(o.if(n._`${p} > ${r}`,()=>e.subschema({keyword:l,schemaProp:r,dataProp:r},u)),e.ok(u))})}t.validateTuple=a,t.default=s},80203(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(29288),i=r(62124),o=r(24608),s=r(92276),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:a}=r;n.items=!0,(0,i.alwaysValidSchema)(n,t)||(a?(0,s.validateAdditionalItems)(e,a):e.ok((0,o.validateArray)(e)))}};t.default=a},62346(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(62124),i={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:i}=e;if((0,n.alwaysValidSchema)(i,r))return void e.fail();const o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};t.default=i},19814(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(29288),i=r(62124),o={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>n._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:o,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(s.opts.discriminator&&o.discriminator)return;const a=r,l=t.let("valid",!1),c=t.let("passing",null),u=t.name("_valid");e.setParams({passing:c}),t.block(function(){a.forEach((r,o)=>{let a;(0,i.alwaysValidSchema)(s,r)?t.var(u,!0):a=e.subschema({keyword:"oneOf",schemaProp:o,compositeRule:!0},u),o>0&&t.if(n._`${u} && ${l}`).assign(l,!1).assign(c,n._`[${c}, ${o}]`).else(),t.if(u,()=>{t.assign(l,!0),t.assign(c,o),a&&e.mergeEvaluated(a,n.Name)})})}),e.result(l,()=>e.reset(),()=>e.error(!0))}};t.default=o},67932(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(24608),i=r(29288),o=r(62124),s=r(62124),a={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:a,parentSchema:l,it:c}=e,{opts:u}=c,p=(0,n.allSchemaProperties)(r),d=p.filter(e=>(0,o.alwaysValidSchema)(c,r[e]));if(0===p.length||d.length===p.length&&(!c.opts.unevaluated||!0===c.props))return;const f=u.strictSchema&&!u.allowMatchingProperties&&l.properties,h=t.name("valid");!0===c.props||c.props instanceof i.Name||(c.props=(0,s.evaluatedPropsToName)(t,c.props));const{props:m}=c;function y(e){for(const t in f)new RegExp(e).test(t)&&(0,o.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function g(r){t.forIn("key",a,o=>{t.if(i._`${(0,n.usePattern)(e,r)}.test(${o})`,()=>{const n=d.includes(r);n||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:o,dataPropType:s.Type.Str},h),c.opts.unevaluated&&!0!==m?t.assign(i._`${m}[${o}]`,!0):n||c.allErrors||t.if((0,i.not)(h),()=>t.break())})})}!function(){for(const e of p)f&&y(e),c.allErrors?g(e):(t.var(h,!0),g(e),t.if(h))}()}};t.default=a},63183(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(51931),i={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=i},55494(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(18597),i=r(24608),o=r(62124),s=r(43003),a={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:a,data:l,it:c}=e;("all"===c.opts.removeAdditional&&void 0===a.additionalProperties||!1===c.opts.defaultAdditionalProperties)&&s.default.code(new n.KeywordCxt(c,s.default,"additionalProperties"));const u=(0,i.allSchemaProperties)(r);for(const n of u)c.definedProperties.add(n);c.opts.unevaluated&&u.length&&!0!==c.props&&(c.props=o.mergeEvaluated.props(t,(0,o.toHash)(u),c.props));const p=u.filter(e=>!(0,o.alwaysValidSchema)(c,r[e]));if(0===p.length)return;const d=t.name("valid");for(const n of p)f(n)?h(n):(t.if((0,i.propertyInData)(t,l,n,c.opts.ownProperties)),h(n),c.allErrors||t.else().var(d,!0),t.endIf()),e.it.definedProperties.add(n),e.ok(d);function f(e){return c.opts.useDefaults&&!c.compositeRule&&void 0!==r[e].default}function h(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},d)}}};t.default=a},97968(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(29288),i=r(62124),o={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>n._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:o,it:s}=e;if((0,i.alwaysValidSchema)(s,r))return;const a=t.name("valid");t.forIn("key",o,r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},a),t.if((0,n.not)(a),()=>{e.error(!0),s.allErrors||t.break()})}),e.ok(a)}};t.default=o},32009(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(62124),i={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,n.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t.default=i},24608(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const n=r(29288),i=r(62124),o=r(86202),s=r(62124),a=r(37585);function l(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:n._`Object.prototype.hasOwnProperty`})}function c(e,t,r){return n._`${l(e)}.call(${t}, ${r})`}function u(e,t,r,i){const o=n._`${t}${(0,n.getProperty)(r)} === undefined`;return i?(0,n.or)(o,(0,n.not)(c(e,t,r))):o}function p(e){return e?Object.keys(e).filter(e=>"__proto__"!==e):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:i,it:o}=e;r.if(u(r,i,t,o.opts.ownProperties),()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()})},t.checkMissingProp=function({gen:e,data:t,it:{opts:r},parentSchema:i},o,s){return(0,n.or)(...o.map(o=>{var l;return(0,n.and)((0,n.not)(null!==(l=(0,a.getSkipCondition)(i,o))&&void 0!==l?l:n._`false`),u(e,t,o,r.ownProperties),n._`${s} = ${o}`)}))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=l,t.isOwnProperty=c,t.propertyInData=function(e,t,r,i){const o=n._`${t}${(0,n.getProperty)(r)} !== undefined`;return i?n._`${o} && ${c(e,t,r)}`:o},t.noPropertyInData=u,t.allSchemaProperties=p,t.schemaProperties=function(e,t){return p(t).filter(r=>!(0,i.alwaysValidSchema)(e,t[r]))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:i,schemaPath:s,errorPath:a},it:l},c,u,p){const d=p?n._`${e}, ${t}, ${i}${s}`:t,f=[[o.default.instancePath,(0,n.strConcat)(o.default.instancePath,a)],[o.default.parentData,l.parentData],[o.default.parentDataProperty,l.parentDataProperty],[o.default.rootData,o.default.rootData],[o.default.isAllOfVariant,l.isAllOfVariant?1:0]];l.opts.dynamicRef&&f.push([o.default.dynamicAnchors,o.default.dynamicAnchors]);const h=n._`${d}, ${r.object(...f)}`;return u!==n.nil?n._`${c}.call(${u}, ${h})`:n._`${c}(${h})`};const d=n._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){const i=t.unicodeRegExp?"u":"",{regExp:o}=t.code,a=o(r,i);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:n._`${"new RegExp"===o.code?d:(0,s.useFunc)(e,o)}(${r}, ${i})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:o,it:s}=e,a=t.name("valid");if(s.allErrors){const e=t.let("valid",!0);return l(()=>t.assign(e,!1)),e}return t.var(a,!0),l(()=>t.break()),a;function l(s){const l=t.const("len",n._`${r}.length`);t.forRange("i",0,l,r=>{e.subschema({keyword:o,dataProp:r,dataPropType:i.Type.Num},a),t.if((0,n.not)(a),s)})}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:o,parentSchema:s,it:a}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(a.opts.discriminator&&s.discriminator)return;if(r.some(e=>(0,i.alwaysValidSchema)(a,e))&&!a.opts.unevaluated)return;const l=t.let("valid",!1),c=t.name("_valid");t.block(()=>r.forEach((r,i)=>{const s=e.subschema({keyword:o,schemaProp:i,compositeRule:!0},c);t.assign(l,n._`${l} || ${c}`);e.mergeValidEvaluated(s,c)||t.if((0,n.not)(l))})),e.result(l,()=>e.reset(),()=>e.error(!0))}},27820(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=r},72777(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(27820),i=r(24768),o=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,i.default];t.default=o},24768(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=r(92830),i=r(24608),o=r(29288),s=r(86202),a=r(96066),l=r(62124),c={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:i}=e,{baseId:s,schemaEnv:l,validateName:c,opts:d,self:f}=i,{root:h}=l;if(("#"===r||"#/"===r)&&s===h.baseId)return function(){if(l===h)return p(e,c,l,l.$async);const r=t.scopeValue("root",{ref:h});return p(e,o._`${r}.validate`,h,h.$async)}();const m=a.resolveRef.call(f,h,s,r);if(void 0===m)throw new n.default(i.opts.uriResolver,s,r);return m instanceof a.SchemaEnv?function(t){const r=u(e,t);p(e,r,t,t.$async)}(m):function(n){const s=t.scopeValue("schema",!0===d.code.source?{ref:n,code:(0,o.stringify)(n)}:{ref:n}),a=t.name("valid"),l=e.subschema({schema:n,dataTypes:[],schemaPath:o.nil,topSchemaRef:s,errSchemaPath:r},a,i.isAllOfVariant);e.mergeEvaluated(l),e.ok(a)}(m)}};function u(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):o._`${r.scopeValue("wrapper",{ref:t})}.validate`}function p(e,t,r,n){const{gen:a,it:c}=e,{allErrors:u,schemaEnv:p,opts:d}=c,f=d.passContext?s.default.this:o.nil;function h(e){const t=o._`${e}.errors`;a.assign(s.default.vErrors,o._`${s.default.vErrors} === null ? ${t} : ${s.default.vErrors}.concat(${t})`),a.assign(s.default.errors,o._`${s.default.vErrors}.length`)}function m(e){var t;if(!c.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==c.props)if(n&&!n.dynamicProps)void 0!==n.props&&(c.props=l.mergeEvaluated.props(a,n.props,c.props));else{const t=a.var("props",o._`${e}.evaluated.props`);c.props=l.mergeEvaluated.props(a,t,c.props,o.Name)}if(!0!==c.items)if(n&&!n.dynamicItems)void 0!==n.items&&(c.items=l.mergeEvaluated.items(a,n.items,c.items));else{const t=a.var("items",o._`${e}.evaluated.items`);c.items=l.mergeEvaluated.items(a,t,c.items,o.Name)}}n?function(){if(!p.$async)throw new Error("async schema referenced by sync schema");const r=a.let("valid");a.try(()=>{a.code(o._`await ${(0,i.callValidateCode)(e,t,f)}`),m(t),u||a.assign(r,!0)},e=>{a.if(o._`!(${e} instanceof ${c.ValidationError})`,()=>a.throw(e)),h(e),u||a.assign(r,!1)}),e.ok(r)}():function(){const r=a.name("visitedNodes");a.code(o._`const ${r} = (typeof visitedNodesForRef !== 'undefined') && visitedNodesForRef.get(${t}) || new Set()`),a.if(o._`!${r}.has(${e.data})`,()=>{a.code(o._`if (typeof visitedNodesForRef !== 'undefined') visitedNodesForRef.set(${t}, ${r})`),a.code(o._`const dataNode = ${e.data}`),a.code(o._`if (typeof dataNode === "object" && dataNode !== null) ${r}.add(dataNode)`);const n=e.result((0,i.callValidateCode)(e,t,f),()=>m(t),()=>h(t));return a.code(o._`${r}.delete(dataNode)`),n})}()}t.getValidate=u,t.callRef=p,t.default=c},21498(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(29288),i=r(56375),o=r(96066),s=r(92830),a=r(62124);function l(e,t){var r;if(e.allOf&&Array.isArray(e.allOf))for(const n of e.allOf)if(null===(r=null==n?void 0:n.properties)||void 0===r?void 0:r[t])return n.properties[t]}const c={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===i.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf or anyOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>n._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:c,parentSchema:u,it:p}=e,d=u.oneOf?"oneOf":u.anyOf?"anyOf":void 0;if(!p.opts.discriminator)throw new Error("discriminator: requires discriminator option");const f=c.propertyName;if("string"!=typeof f)throw new Error("discriminator: requires propertyName");if(!d)throw new Error("discriminator: requires oneOf or anyOf composite keyword");const h=u[d],m=t.let("valid",!1),y=t.const("tag",n._`${r}${(0,n.getProperty)(f)}`);function g(r){const i=t.name("valid"),o=e.subschema({keyword:d,schemaProp:r},i);return e.mergeEvaluated(o,n.Name),i}t.if(n._`typeof ${y} == "string"`,()=>function(){const r=function(){var e;const t={},r=i(u);let n=!0;for(let u=0;ue[r]===t.$ref);if(r.length){for(const e of r)y(e,u);continue}}if(g&&!(0,a.schemaHasRulesButRef)(t,p.self.RULES)&&(t=o.resolveRef.call(p.self,p.schemaEnv.root,p.baseId,g),t instanceof o.SchemaEnv&&(t=t.schema),void 0===t))throw new s.default(p.opts.uriResolver,p.baseId,g);let b=null===(e=null==t?void 0:t.properties)||void 0===e?void 0:e[f];if(!b&&(null==t?void 0:t.allOf)&&(b=l(t,f)),"object"!=typeof b)throw new Error(`discriminator: ${d} subschemas (or referenced schemas) must have "properties/${f}" or match mapping`);n=n&&(r||i(t)),m(b,u)}if(!n)throw new Error(`discriminator: "${f}" must be required`);return t;function i(e){if(Array.isArray(e.required)&&e.required.includes(f))return!0;if(e.allOf&&Array.isArray(e.allOf))for(const t of e.allOf){const e=t;if(Array.isArray(e.required)&&e.required.includes(f))return!0}return!1}function m(e,t){if(e.const)y(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${f}" must have "const" or "enum"`);for(const r of e.enum)y(r,t)}}function y(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${f}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf(n._`${y} === ${e}`),t.assign(m,g(r[e]));t.else(),e.error(!1,{discrError:i.DiscrError.Mapping,tag:y,tagName:f}),t.endIf()}(),()=>e.error(!1,{discrError:i.DiscrError.Tag,tag:y,tagName:f})),e.ok(m)}};t.default=c},56375(e,t){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(r||(t.DiscrError=r={}))},97582(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(72777),i=r(51309),o=r(68499),s=r(52135),a=r(58720),l=r(11774),c=r(3949),u=r(10344),p=[s.default,n.default,i.default,(0,o.default)(!0),c.default,u.metadataVocabulary,u.contentVocabulary,a.default,l.default];t.default=p},62883(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dynamicAnchor=void 0;const n=r(29288),i=r(86202),o=r(96066),s=r(24768),a={keyword:"$dynamicAnchor",schemaType:"string",code:e=>l(e,e.schema)};function l(e,t){const{gen:r,it:a}=e;a.schemaEnv.root.dynamicAnchors[t]=!0;const l=n._`${i.default.dynamicAnchors}${(0,n.getProperty)(t)}`,c="#"===a.errSchemaPath?a.validateName:function(e){const{schemaEnv:t,schema:r,self:n}=e.it,{root:i,baseId:a,localRefs:l,meta:c}=t.root,{schemaId:u}=n.opts,p=new o.SchemaEnv({schema:r,schemaId:u,root:i,baseId:a,localRefs:l,meta:c});return o.compileSchema.call(n,p),(0,s.getValidate)(e,p)}(e);r.if(n._`!${l}`,()=>r.assign(l,c))}t.dynamicAnchor=l,t.default=a},9909(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dynamicRef=void 0;const n=r(29288),i=r(86202),o=r(24768),s={keyword:"$dynamicRef",schemaType:"string",code:e=>a(e,e.schema)};function a(e,t){const{gen:r,keyword:s,it:a}=e;if("#"!==t[0])throw new Error(`"${s}" only supports hash fragment reference`);const l=t.slice(1);if(a.allErrors)c();else{const t=r.let("valid",!1);c(t),e.ok(t)}function c(e){if(a.schemaEnv.root.dynamicAnchors[l]){const t=r.let("_v",n._`${i.default.dynamicAnchors}${(0,n.getProperty)(l)}`);r.if(t,u(t,e),u(a.validateName,e))}else u(a.validateName,e)()}function u(t,n){return n?()=>r.block(()=>{(0,o.callRef)(e,t),r.let(n,!0)}):()=>(0,o.callRef)(e,t)}}t.dynamicRef=a,t.default=s},52135(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(62883),i=r(9909),o=r(47370),s=r(58582),a=[n.default,i.default,o.default,s.default];t.default=a},47370(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(62883),i=r(62124),o={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,n.dynamicAnchor)(e,""):(0,i.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}};t.default=o},58582(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9909),i={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,n.dynamicRef)(e,e.schema)};t.default=i},75302(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(29288),i={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match format "${e}"`,params:({schemaCode:e})=>n._`{format: ${e}}`},code(e,t){const{gen:r,data:i,$data:o,schema:s,schemaCode:a,it:l}=e,{opts:c,errSchemaPath:u,schemaEnv:p,self:d}=l;c.validateFormats&&(o?function(){const o=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),s=r.const("fDef",n._`${o}[${a}]`),l=r.let("fType"),u=r.let("format");r.if(n._`typeof ${s} == "object" && !(${s} instanceof RegExp)`,()=>r.assign(l,n._`${s}.type || "string"`).assign(u,n._`${s}.validate`),()=>r.assign(l,n._`"string"`).assign(u,s)),e.fail$data((0,n.or)(!1===c.strictSchema?n.nil:n._`${a} && !${u}`,function(){const e=p.$async?n._`(${s}.async ? await ${u}(${i}) : ${u}(${i}))`:n._`${u}(${i})`,r=n._`(typeof ${u} == "function" ? ${e} : ${u}.test(${i}))`;return n._`${u} && ${u} !== true && ${l} === ${t} && !${r}`}()))}():function(){const o=d.formats[s];if(!o)return void function(){if(!1===c.strictSchema)return void d.logger.warn(e());throw new Error(e());function e(){return`unknown format "${s}" ignored in schema at path "${u}"`}}();if(!0===o)return;const[a,l,f]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):c.code.formats?n._`${c.code.formats}${(0,n.getProperty)(s)}`:void 0,i=r.scopeValue("formats",{key:s,ref:e,code:t});if("object"==typeof e&&!(e instanceof RegExp))return[e.type||"string",e.validate,n._`${i}.validate`];return["string",e,i]}(o);a===t&&e.pass(function(){if("object"==typeof o&&!(o instanceof RegExp)&&o.async){if(!p.$async)throw new Error("async format in sync schema");return n._`await ${f}(${i})`}return"function"==typeof l?n._`${f}(${i})`:n._`${f}.test(${i})`}())}())}};t.default=i},3949(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=[r(75302).default];t.default=n},10344(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},58720(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(97759),i=r(97894),o=r(84391),s=[n.default,i.default,o.default];t.default=s},37585(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSkipCondition=void 0;const n=r(29288),i=r(86202);t.getSkipCondition=function(e,t){var r;const o=null===(r=e.properties)||void 0===r?void 0:r[t];if(!o)return;const s=!0===o.readOnly,a=!0===o.writeOnly;if(!s&&!a)return;const l=[],c=n._`typeof ${i.default.this} == "object" && ${i.default.this} && ${i.default.this}.apiContext`;return s&&l.push(n._`${c} === "request"`),a&&l.push(n._`${c} === "response"`),(0,n.or)(...l)}},11774(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(35899),i=r(45396),o=[n.default,i.default];t.default=o},45396(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(29288),i=r(62124),o={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{gen:t,schema:r,data:o,it:s}=e,a=s.items||0;if(!0===a)return;const l=t.const("len",n._`${o}.length`);if(!1===r)e.setParams({len:a}),e.fail(n._`${l} > ${a}`);else if("object"==typeof r&&!(0,i.alwaysValidSchema)(s,r)){const r=t.var("valid",n._`${l} <= ${a}`);t.if((0,n.not)(r),()=>function(r,o){t.forRange("i",o,l,o=>{e.subschema({keyword:"unevaluatedItems",dataProp:o,dataPropType:i.Type.Num},r),s.allErrors||t.if((0,n.not)(r),()=>t.break())})}(r,a)),e.ok(r)}s.items=!0}};t.default=o},35899(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(29288),i=r(62124),o=r(86202),s={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:e})=>n._`{unevaluatedProperty: ${e.unevaluatedProperty}}`},code(e){const{gen:t,schema:r=e.it.opts.defaultUnevaluatedProperties,data:s,errsCount:a,it:l}=e,c=void 0===e.schema&&!1===e.it.opts.defaultUnevaluatedProperties;if(!a)throw new Error("ajv implementation error");const{allErrors:u,props:p}=l;if(p instanceof n.Name)t.if(n._`${p} !== true`,()=>t.forIn("key",s,e=>t.if(function(e,t){return n._`!${e} || !${e}[${t}]`}(p,e),()=>d(e))));else if(!0!==p){const r=()=>t.forIn("key",s,e=>void 0===p?d(e):t.if(function(e,t){const r=[];for(const i in e)!0===e[i]&&r.push(n._`${t} !== ${i}`);return(0,n.and)(...r)}(p,e),()=>d(e)));c&&l.errorPath.emptyStr()&&!l.compositeRule?t.if(n._`${o.default.isAllOfVariant} === 0`,r):l.compositeRule&&void 0===e.schema||r()}function d(o){if(!1===r)return e.setParams({unevaluatedProperty:o}),e.error(),void(u||t.break());if(!(0,i.alwaysValidSchema)(l,r)){const r=t.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:o,dataPropType:i.Type.Str},r),u||t.if((0,n.not)(r),()=>t.break())}}c||(l.props=!0),e.ok(n._`${a} === ${o.default.errors}`)}};t.default=s},97422(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(29288),i=r(62124),o=r(98947),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>n._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:s,schemaCode:a,schema:l}=e;s||l&&"object"==typeof l?e.fail$data(n._`!${(0,i.useFunc)(t,o.default)}(${r}, ${a})`):e.fail(n._`${l} !== ${r}`)}};t.default=s},97759(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(17630),i={keyword:"dependentRequired",type:"object",schemaType:"object",error:n.error,code:e=>(0,n.validatePropertyDeps)(e)};t.default=i},92468(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(29288),i=r(62124),o=r(98947),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>n._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:s,schema:a,schemaCode:l,it:c}=e;if(!s&&0===a.length)throw new Error("enum must have non-empty array");const u=a.length>=c.opts.loopEnum;let p;const d=()=>null!=p?p:p=(0,i.useFunc)(t,o.default);let f;if(u||s)f=t.let("valid"),e.block$data(f,function(){t.assign(f,!1),t.forOf("v",l,e=>t.if(n._`${d()}(${r}, ${e})`,()=>t.assign(f,!0).break()))});else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",l);f=(0,n.or)(...a.map((t,i)=>function(e,t){const i=a[t];return"object"==typeof i&&null!==i?n._`${d()}(${r}, ${e}[${t}])`:n._`${r} === ${i}`}(e,i)))}e.pass(f)}};t.default=s},51309(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(20799),i=r(70744),o=r(77214),s=r(85411),a=r(14211),l=r(8412),c=r(92671),u=r(39528),p=r(49612),d=r(8176),f=r(97422),h=r(92468),m=[n.default,i.default,o.default,s.default,a.default,l.default,c.default,u.default,p.default,d.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,h.default];t.default=m},84391(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(62124),i={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:t,it:r}){void 0===t.contains&&(0,n.checkStrictMode)(r,`"${e}" without "contains" is ignored`)}};t.default=i},49612(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(29288),i={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:i}=e,o="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${r}.length ${o} ${i}`)}};t.default=i},77214(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(29288),i=r(62124),o=r(59794),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:s,it:a}=e,l="maxLength"===t?n.operators.GT:n.operators.LT,c=!1===a.opts.unicode?n._`${r}.length`:n._`${(0,i.useFunc)(e.gen,o.default)}(${r})`;e.fail$data(n._`${c} ${l} ${s}`)}};t.default=s},20799(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(29288),i=n.operators,o={maximum:{okStr:"<=",ok:i.LTE,fail:i.GT},minimum:{okStr:">=",ok:i.GTE,fail:i.LT},exclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},exclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},s={message:({keyword:e,schemaCode:t})=>n.str`must be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${o[e].okStr}, limit: ${t}}`},a={keyword:Object.keys(o),type:"number",schemaType:"number",$data:!0,error:s,code(e){const{keyword:t,data:r,schemaCode:i}=e;e.fail$data(n._`${r} ${o[t].fail} ${i} || isNaN(${r})`)}};t.default=a},14211(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(29288),i={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:i}=e,o="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${r}).length ${o} ${i}`)}};t.default=i},70744(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(29288),i={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>n.str`must be multiple of ${e}`,params:({schemaCode:e})=>n._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:i,it:o}=e,s=o.opts.multipleOfPrecision,a=t.let("res"),l=s?n._`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:n._`${a} !== parseInt(${a})`;e.fail$data(n._`(${i} === 0 || (${a} = ${r}/${i}, ${l}))`)}};t.default=i},85411(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(24608),i=r(62124),o=r(29288),s={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>o.str`must match pattern "${e}"`,params:({schemaCode:e})=>o._`{pattern: ${e}}`},code(e){const{gen:t,data:r,$data:s,schema:a,schemaCode:l,it:c}=e,u=c.opts.unicodeRegExp?"u":"";if(s){const{regExp:n}=c.opts.code,s="new RegExp"===n.code?o._`new RegExp`:(0,i.useFunc)(t,n),a=t.let("valid");t.try(()=>t.assign(a,o._`${s}(${l}, ${u}).test(${r})`),()=>t.assign(a,!1)),e.fail$data(o._`!${a}`)}else{const t=(0,n.usePattern)(e,a);e.fail$data(o._`!${t}.test(${r})`)}}};t.default=s},92671(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(29288),i=r(86202),o={keyword:"readOnly",schemaType:"boolean",error:{message:()=>n.str`must NOT be present in request context`},code(e){if(!0!==e.schema)return;const t=n._`(${i.default.this} && ${i.default.this}.apiContext)`;e.fail(n._`${t} === "request"`)}};t.default=o},8412(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(24608),i=r(37585),o=r(29288),s=r(62124),a={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>o.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>o._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:a,data:l,$data:c,it:u}=e,{opts:p}=u;if(!c&&0===r.length)return;const d=r.length>=p.loopRequired;if(u.allErrors?function(){var s;if(d||c)e.block$data(o.nil,f);else for(const a of r){const r=null!==(s=(0,i.getSkipCondition)(e.parentSchema,a))&&void 0!==s?s:o._`false`;t.if((0,o.not)(r),()=>(0,n.checkReportMissingProp)(e,a))}}():function(){const i=t.let("missing");if(d||c){const r=t.let("valid",!0);e.block$data(r,()=>function(r,i){e.setParams({missingProperty:r}),t.forOf(r,a,()=>{t.assign(i,(0,n.propertyInData)(t,l,r,p.ownProperties)),t.if((0,o.not)(i),()=>{e.error(),t.break()})},o.nil)}(i,r)),e.ok(r)}else t.if((0,n.checkMissingProp)(e,r,i)),(0,n.reportMissingProp)(e,i),t.else()}(),p.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${u.schemaEnv.baseId+u.errSchemaPath}" (strictRequired)`;(0,s.checkStrictMode)(u,t,u.opts.strictRequired)}}function f(){t.forOf("prop",a,r=>{e.setParams({missingProperty:r}),t.if((0,n.noPropertyInData)(t,l,r,p.ownProperties),()=>e.error())})}}};t.default=a},8176(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(66649),i=r(29288),o=r(62124),s=r(98947),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>i.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>i._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:a,schema:l,parentSchema:c,schemaCode:u,it:p}=e;if(!a&&!l)return;const d=t.let("valid"),f=c.items?(0,n.getSchemaTypes)(c.items):[];function h(o,s){const a=t.name("item"),l=(0,n.checkDataTypes)(f,a,p.opts.strictNumbers,n.DataType.Wrong),c=t.const("indices",i._`{}`);t.for(i._`;${o}--;`,()=>{t.let(a,i._`${r}[${o}]`),t.if(l,i._`continue`),f.length>1&&t.if(i._`typeof ${a} == "string"`,i._`${a} += "_"`),t.if(i._`typeof ${c}[${a}] == "number"`,()=>{t.assign(s,i._`${c}[${a}]`),e.error(),t.assign(d,!1).break()}).code(i._`${c}[${a}] = ${o}`)})}function m(n,a){const l=(0,o.useFunc)(t,s.default),c=t.name("outer");t.label(c).for(i._`;${n}--;`,()=>t.for(i._`${a} = ${n}; ${a}--;`,()=>t.if(i._`${l}(${r}[${n}], ${r}[${a}])`,()=>{e.error(),t.assign(d,!1).break(c)})))}e.block$data(d,function(){const n=t.let("i",i._`${r}.length`),o=t.let("j");e.setParams({i:n,j:o}),t.assign(d,!0),t.if(i._`${n} > 1`,()=>(f.length>0&&!f.some(e=>"object"===e||"array"===e)?h:m)(n,o))},i._`${u} === false`),e.ok(d)}};t.default=a},39528(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(29288),i=r(86202),o={keyword:"writeOnly",schemaType:"boolean",error:{message:()=>n.str`must NOT be present in response context`},code(e){if(!0!==e.schema)return;const t=n._`(${i.default.this} && ${i.default.this}.apiContext)`;e.fail(n._`${t} === "response"`)}};t.default=o},70884(e,t,r){"use strict";r.r(t),r.d(t,{ApigeeDevOnboardingIntegrationAuthType:()=>o,AuthProviderType:()=>i,DEFAULT_TEAM_CLAIM_NAME:()=>n,LayoutVariant:()=>l,REDOCLY_ROUTE_RBAC:()=>a,REDOCLY_TEAMS_RBAC:()=>s,productConfigOverrideSchema:()=>J,productThemeOverrideSchema:()=>X,rbacConfigSchema:()=>ie,rootRedoclyConfigSchema:()=>ce});const n="https://redocly.com/sso/teams";var i,o;!function(e){e.OIDC="OIDC",e.SAML2="SAML2",e.BASIC="BASIC"}(i||(i={})),function(e){e.SERVICE_ACCOUNT="SERVICE_ACCOUNT",e.OAUTH2="OAUTH2"}(o||(o={}));const s="redocly::teams-rbac",a="redocly::route-rbac";var l;!function(e){e.STACKED="stacked",e.THREE_PANEL="three-panel"}(l||(l={}));const c={type:"object",properties:{hide:{type:"boolean",default:!1},type:{type:"string",enum:["rating","sentiment","comment","reasons","mood","scale"],default:"sentiment"},settings:{type:"object",properties:{label:{type:"string"},submitText:{type:"string"},buttonText:{type:"string"},component:{type:"string",enum:["radio","checkbox"],default:"checkbox"},items:{type:"array",items:{type:"string"},minItems:1},leftScaleLabel:{type:"string"},rightScaleLabel:{type:"string"},reasons:{type:"object",properties:{hide:{type:"boolean",default:!1},component:{type:"string",enum:["radio","checkbox"],default:"checkbox"},label:{type:"string"},items:{type:"array",items:{type:"string"}}},additionalProperties:!1},comment:{type:"object",properties:{hide:{type:"boolean",default:!1},label:{type:"string"},likeLabel:{type:"string"},dislikeLabel:{type:"string"},satisfiedLabel:{type:"string"},neutralLabel:{type:"string"},dissatisfiedLabel:{type:"string"}},additionalProperties:!1}},additionalProperties:!1}},additionalProperties:!1,default:null,nullable:!0},u={type:"object",properties:{label:{type:"string"},link:{type:"string"},target:{type:"string"}},required:["label","link"]},p={type:"object",properties:{beforeInfo:{type:"array",items:u},end:{type:"array",items:u}}},d={type:"object",properties:{main:{type:"string"},light:{type:"string"},dark:{type:"string"},contrastText:{type:"string"}}},f={type:"object",properties:{backgroundColor:{type:"string"},borderColor:{type:"string"},color:{type:"string"},tabTextColor:{type:"string"}}},h={type:"object",properties:{accent:d,border:{type:"object",properties:L(d.properties,["light","dark"])},error:d,http:{type:"object",properties:{basic:{type:"string"},delete:{type:"string"},get:{type:"string"},head:{type:"string"},link:{type:"string"},options:{type:"string"},patch:{type:"string"},post:{type:"string"},put:{type:"string"}}},primary:d,responses:{type:"object",properties:{error:f,info:f,redirect:f,success:f}},secondary:{type:"object",properties:D(d.properties,["dark"])},success:d,text:{type:"object",properties:{primary:{type:"string"},secondary:{type:"string"},light:{type:"string"}}},tonalOffset:{type:"number"},warning:d}},m={type:"object",properties:{fontSize:{type:"string"},padding:{type:"string"},minWidth:{type:"string"}}},y={type:"object",properties:{small:m,medium:m,large:m,xlarge:m}},g={type:"object",properties:{fontFamily:{type:"string"},fontSize:{type:"string"},fontWeight:{type:"string"},lineHeight:{type:"string"}}},b={type:"object",properties:Object.assign(Object.assign({},D(g.properties,["fontSize","lineHeight"])),{borderRadius:{type:"string"},hoverStyle:{type:"string"},boxShadow:{type:"string"},hoverBoxShadow:{type:"string"},sizes:y})},v={type:"object",properties:L(g.properties,["fontSize","lineHeight"])},x={type:"object",properties:{medium:v,small:v}},w={type:"object",properties:{fullWidth:{type:"boolean"}}},S={type:"object",properties:{buttons:b,httpBadges:{type:"object",properties:Object.assign(Object.assign({},D(g.properties,["fontSize","lineHeight"])),{borderRadius:{type:"string"},color:{type:"string"},sizes:x})},layoutControls:{type:"object",properties:{top:{type:"string"},width:{type:"string"},height:{type:"string"}}},panels:{type:"object",properties:{borderRadius:{type:"string"},backgroundColor:{type:"string"}}},tryItButton:w,tryItSendButton:w}},k={type:"object",properties:{small:{type:"string"},medium:{type:"string"},large:{type:"string"}}},O={type:"object",properties:{showDarkRightPanel:{type:"boolean"},stacked:{type:"object",properties:{maxWidth:k}},"three-panel":{type:"object",properties:{maxWidth:k,middlePanelMaxWidth:k}}}},_={type:"object",properties:{backgroundColor:{type:"string"},border:{type:"string"}}},E={type:"object",properties:{breakFieldNames:{type:"boolean"},caretColor:{type:"string"},caretSize:{type:"string"},constraints:_,defaultDetailsWidth:{type:"string"},examples:_,labelsTextSize:{type:"string"},linesColor:{type:"string"},nestedBackground:{type:"string"},nestingSpacing:{type:"string"},requireLabelColor:{type:"string"},typeNameColor:{type:"string"},typeTitleColor:{type:"string"}}},A={type:"object",properties:{subItemsColor:{type:"string"},textTransform:{type:"string"},fontWeight:{type:"string"}}},j={type:"object",properties:L(A.properties,["textTransform"])},P={type:"object",properties:Object.assign(Object.assign({},D(g.properties,["fontWeight","lineHeight"])),{activeBgColor:{type:"string"},activeTextColor:{type:"string"},backgroundColor:{type:"string"},borderRadius:{type:"string"},breakPath:{type:"boolean"},caretColor:{type:"string"},caretSize:{type:"string"},groupItems:A,level1items:j,rightLineColor:{type:"string"},separatorLabelColor:{type:"string"},showAtBreakpoint:{type:"string"},spacing:{type:"object",properties:{unit:{type:"number"},paddingHorizontal:{type:"string"},paddingVertical:{type:"string"},offsetTop:{type:"string"},offsetLeft:{type:"string"},offsetNesting:{type:"string"}}},textColor:{type:"string"},width:{type:"string"}})},$={type:"object",properties:Object.assign(Object.assign({},g.properties),{color:{type:"string"},transform:{type:"string"}})},C={type:"object",properties:Object.assign(Object.assign({},g.properties),{backgroundColor:{type:"string"},color:{type:"string"},wordBreak:{type:"string",enum:["break-all","break-word","keep-all","normal","revert","unset","inherit","initial"]},wrap:{type:"boolean"}})},T={type:"object",properties:D(g.properties,["fontSize"])},I={type:"object",properties:Object.assign(Object.assign({code:C,fieldName:g},L(g.properties,["fontSize","fontFamily"])),{fontWeightBold:{type:"string"},fontWeightLight:{type:"string"},fontWeightRegular:{type:"string"},heading1:$,heading2:$,heading3:$,headings:T,lineHeight:{type:"string"},links:{type:"object",properties:{color:{type:"string"},hover:{type:"string"},textDecoration:{type:"string"},hoverTextDecoration:{type:"string"},visited:{type:"string"}}},optimizeSpeed:{type:"boolean"},rightPanelHeading:$,smoothing:{type:"string",enum:["auto","none","antialiased","subpixel-antialiased","grayscale"]}})},N={type:"object",properties:{custom:{type:"string"}}},R={type:"object",properties:{theme:{type:"object",properties:{breakpoints:k,codeBlock:{type:"object",properties:{backgroundColor:{type:"string"},borderRadius:{type:"string"},tokens:{type:"object",properties:Object.assign({color:{type:"string"}},D(g.properties,["fontWeight"]))}}},colors:h,components:S,layout:O,logo:{type:"object",properties:{gutter:{type:"string"},maxHeight:{type:"string"},maxWidth:{type:"string"}}},fab:{type:"object",properties:{backgroundColor:{type:"string"},color:{type:"string"}}},overrides:{type:"object",properties:{DownloadButton:N,NextSectionButton:N}},rightPanel:{type:"object",properties:{backgroundColor:{type:"string"},panelBackgroundColor:{type:"string"},panelControlsBackgroundColor:{type:"string"},showAtBreakpoint:{type:"string"},textColor:{type:"string"},width:{type:"string"}}},schema:E,shape:{type:"object",properties:{borderRadius:{type:"string"}}},sidebar:P,spacing:{type:"object",properties:{sectionHorizontal:{type:"number"},sectionVertical:{type:"number"},unit:{type:"number"}}},typography:I,links:{properties:{color:{type:"string"}}},codeSample:{properties:{backgroundColor:{type:"string"}}}}},ctrlFHijack:{type:"boolean"},defaultSampleLanguage:{type:"string"},disableDeepLinks:{type:"boolean"},disableSearch:{type:"boolean"},disableSidebar:{type:"boolean"},downloadDefinitionUrl:{type:"string"},expandDefaultServerVariables:{type:"boolean"},enumSkipQuotes:{type:"boolean"},expandDefaultRequest:{type:"boolean"},expandDefaultResponse:{type:"boolean"},expandResponses:{type:"string"},expandSingleSchemaField:{type:"boolean"},generateCodeSamples:{type:"object",properties:{skipOptionalParameters:{type:"boolean"},languages:{type:"array",items:{type:"object",properties:{label:{type:"string"},lang:{enum:["curl","C#","Go","Java","Java8+Apache","JavaScript","Node.js","PHP","Python","R","Ruby"]}},required:["lang"]}}},required:["languages"]},generatedPayloadSamplesMaxDepth:{type:"number"},hideDownloadButton:{type:"boolean"},hideHostname:{type:"boolean"},hideInfoSection:{type:"boolean"},hideLogo:{type:"boolean"},hideRequestPayloadSample:{type:"boolean"},hideRightPanel:{type:"boolean"},hideSchemaPattern:{type:"boolean"},hideSingleRequestSampleTab:{type:"boolean"},hideSecuritySection:{type:"boolean"},hideTryItPanel:{type:"boolean"},hideFab:{type:"boolean"},hideOneOfDescription:{type:"boolean"},htmlTemplate:{type:"string"},jsonSampleExpandLevel:{oneOf:[{type:"number",minimum:1},{type:"string"}]},labels:{type:"object",properties:{enum:{type:"string"},enumSingleValue:{type:"string"},enumArray:{type:"string"},default:{type:"string"},deprecated:{type:"string"},example:{type:"string"},examples:{type:"string"},nullable:{type:"string"},recursive:{type:"string"},arrayOf:{type:"string"},webhook:{type:"string"},authorizations:{type:"string"},tryItAuthBasicUsername:{type:"string"},tryItAuthBasicPassword:{type:"string"}}},menuToggle:{type:"boolean"},nativeScrollbars:{type:"boolean"},noAutoAuth:{type:"boolean"},onDeepLinkClick:{type:"object"},pagination:{enum:["none","section","item"]},pathInMiddlePanel:{type:"boolean"},payloadSampleIdx:{type:"number",minimum:0},requestInterceptor:{type:"object"},requiredPropsFirst:{type:"boolean"},routingStrategy:{type:"string"},samplesTabsMaxCount:{type:"number"},schemaExpansionLevel:{oneOf:[{type:"number",minimum:0},{type:"string"}]},minCharacterLengthToInitSearch:{type:"number",minimum:1},maxResponseHeadersToShowInTryIt:{type:"number",minimum:0},scrollYOffset:{oneOf:[{type:"number"},{type:"string"}]},searchAutoExpand:{type:"boolean"},searchFieldLevelBoost:{type:"number",minimum:0},searchMaxDepth:{type:"number",minimum:1},searchMode:{type:"string",enum:["default","path-only"]},searchOperationTitleBoost:{type:"number"},searchTagTitleBoost:{type:"number"},sendXUserAgentInTryIt:{type:"boolean"},showChangeLayoutButton:{type:"boolean"},showConsole:{type:"boolean"},showNextButton:{type:"boolean"},showRightPanelToggle:{type:"boolean"},showSecuritySchemeType:{type:"boolean"},showWebhookVerb:{type:"boolean"},showObjectSchemaExamples:{type:"boolean"},disableTryItRequestUrlEncoding:{type:"boolean"},sidebarLinks:p,sideNavStyle:{type:"string",enum:["summary-only","path-first","id-only"]},simpleOneOfTypeLabel:{type:"boolean"},sortEnumValuesAlphabetically:{type:"boolean"},sortOperationsAlphabetically:{type:"boolean"},sortPropsAlphabetically:{type:"boolean"},sortTagsAlphabetically:{type:"boolean"},suppressWarnings:{type:"boolean"},unstable_externalDescription:{type:"boolean"},unstable_ignoreMimeParameters:{type:"boolean"},untrustedDefinition:{type:"boolean"},showAccessMode:{type:"boolean"},preserveOriginalExtensionsName:{type:"boolean"},markdownHeadingsAnchorLevel:{type:"number"}},additionalProperties:!1};function L(e,t){return Object.fromEntries(t.filter(t=>t in e).map(t=>[t,e[t]]))}function D(e,t){return Object.fromEntries(Object.entries(e).filter(([e])=>!t.includes(e)))}const M={type:"object",properties:Object.assign(Object.assign({},R.properties),{licenseKey:{type:"string"},hideLoading:{type:"boolean"},disableRouter:{type:"boolean"},hideSidebar:{type:"boolean"},feedback:c,hideReplay:{type:"boolean"},oAuth2RedirectURI:{type:"string",nullable:!0},corsProxyUrl:{type:"string"},sortRequiredPropsFirst:{type:"boolean"},sanitize:{type:"boolean"},hideDownloadButtons:{type:"boolean"},downloadUrls:{type:"array",items:{type:"object",properties:{title:{type:"string"},url:{type:"string"}},required:["url"],additionalProperties:!1}},onlyRequiredInSamples:{type:"boolean"},generatedSamplesMaxDepth:{oneOf:[{type:"number"},{type:"string"}]},showExtensions:{oneOf:[{type:"boolean"},{type:"string"},{type:"array",items:{type:"string"}}]},hideSchemaTitles:{type:"boolean"},jsonSamplesExpandLevel:{oneOf:[{type:"number"},{type:"string"}]},schemasExpansionLevel:{oneOf:[{type:"number"},{type:"string"}]},mockServer:{type:"object",properties:{url:{type:"string"},position:{type:"string",enum:["first","last","replace","off"]},description:{type:"string"}}},maxDisplayedEnumValues:{type:"number"},schemaDefinitionsTagName:{type:"string"},layout:{type:"string",enum:["stacked","three-panel"]},hideInfoMetadata:{type:"boolean"},events:{type:"object"},skipBundle:{type:"boolean"},routingBasePath:{type:"string"},codeSamples:{type:"object",properties:{languages:{type:"array",items:{type:"object",properties:{lang:{type:"string",enum:["curl","JavaScript","Node.js","Python","Java8+Apache","Java","C#","C#+Newtonsoft","PHP","Go","Ruby","R","Payload"]},label:{type:"string"},options:{type:"object",properties:{indent:{type:"string"},withImports:{type:"boolean"},withComments:{type:"boolean"},binary:{type:"boolean"},credentials:{type:"string",enum:["omit","same-origin","include"]}},additionalProperties:!1}},required:["lang"],additionalProperties:!1}},skipOptionalParameters:{type:"boolean"},withOAuth2Call:{type:"boolean"}},required:["languages"],additionalProperties:!1},ignoreNamedSchemas:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"}]},hidePropertiesPrefix:{type:"boolean"},excludeFromSearch:{type:"boolean"}}),additionalProperties:!1},z={type:"object",properties:{includeByName:{type:"array",items:{type:"string"}},excludeByName:{type:"array",items:{type:"string"}}},additionalProperties:!1},B={type:"object",properties:{requireExactGroups:{type:"boolean"},groups:{type:"array",items:{type:"object",properties:{name:{type:"string"},items:z,queries:z,mutations:z,subscriptions:z,types:z,directives:z},required:["name"],additionalProperties:!1}},otherItemsGroupName:{type:"string"}},required:["requireExactGroups","groups","otherItemsGroupName"],additionalProperties:!1},F={type:"object",properties:{pagination:{type:"string",enum:["none","section","item"]},navigation:{type:"object",properties:{contentPrefix:{type:"string"},menuPrefix:{type:"string"}}},hidePaginationButtons:{type:"boolean"},menu:{type:"object",properties:Object.assign({initialLoadState:{type:"string",enum:["all-expanded","default"]}},B.properties),additionalProperties:!1},sidebar:{type:"object",properties:{hide:{type:"boolean"}}},apiLogo:{type:"object",properties:{imageUrl:{type:"string"},href:{type:"string"},altText:{type:"string"},backgroundColor:{type:"string"}}},jsonSamplesExpandLevel:{type:"number"},sampleMaxInlineArgs:{type:"number"},licenseKey:{type:"string"},fieldExpandLevel:{type:"number"},baseUrlPath:{type:"string"},feedback:c},additionalProperties:!1},q={type:"object",properties:{hide:{type:"boolean"}},additionalProperties:!1},U={type:"object",properties:{src:{type:"string"},async:{type:"boolean"},crossorigin:{type:"string"},defer:{type:"boolean"},fetchpriority:{type:"string"},integrity:{type:"string"},module:{type:"boolean"},nomodule:{type:"boolean"},nonce:{type:"string"},referrerpolicy:{type:"string"},type:{type:"string"}},required:["src"],additionalProperties:!0},V={type:"object",properties:{frontMatterKeysToResolve:{type:"array",items:{type:"string"},default:["image","links"]},partialsFolders:{type:"array",items:{type:"string"},default:["_partials"]},lastUpdatedBlock:{type:"object",properties:Object.assign({format:{type:"string",enum:["timeago","iso","long","short"],default:"timeago"},locale:{type:"string"}},q.properties),additionalProperties:!1,default:{}},toc:{type:"object",properties:Object.assign({header:{type:"string",default:"On this page"},depth:{type:"integer",default:3,minimum:1}},q.properties),additionalProperties:!1,default:{}},editPage:{type:"object",properties:Object.assign({baseUrl:{type:"string"}},q.properties),additionalProperties:!1,default:{}}},additionalProperties:!1,default:{}},W={type:"object",properties:{includeInDevelopment:{type:"boolean"},trackingId:{type:"string"},conversionId:{type:"string"},floodlightId:{type:"string"},optimizeId:{type:"string"},exclude:{type:"array",items:{type:"string"}}},additionalProperties:!1,required:["trackingId"]},H={type:"object",properties:{includeInDevelopment:{type:"boolean"},trackingId:{type:"string"},conversionId:{type:"string"},floodlightId:{type:"string"},head:{type:"boolean"},respectDNT:{type:"boolean"},exclude:{type:"array",items:{type:"string"}},optimizeId:{type:"string"},anonymizeIp:{type:"boolean"},cookieExpires:{type:"number"},trackers:{type:"object",additionalProperties:W}},additionalProperties:!1,required:["trackingId"]},K={type:"object",properties:{page:{type:"string"},directory:{type:"string"},disconnect:{type:"boolean",default:!1},group:{type:"string"},label:{type:"string"},href:{type:"string"},external:{type:"boolean"},labelTranslationKey:{type:"string"},groupTranslationKey:{type:"string"},icon:{oneOf:[{type:"string"},{type:"object",properties:{srcSet:{type:"string"}},required:["srcSet"]}]},separator:{type:"string"},separatorLine:{type:"boolean"},linePosition:{type:"string",enum:["top","bottom"],default:"top"},version:{type:"string"},menuStyle:{type:"string",enum:["drilldown"]},expanded:{type:"string",const:"always"},selectFirstItemOnExpand:{type:"boolean"},flatten:{type:"boolean"},linkedSidebars:{type:"array",items:{type:"string"}},items:{type:"array",items:{type:"object",additionalProperties:!0}}}},Q={type:"array",items:Object.assign(Object.assign({},K),{properties:Object.assign(Object.assign({},K.properties),{items:{type:"array",items:K}})})},G={type:"object",patternProperties:{".*":{type:"object",additionalProperties:!0,required:["slug","items"],properties:{slug:{type:"string"},filters:{type:"array",items:{type:"object",additionalProperties:!1,required:["title","property"],properties:{type:{type:"string",enum:["select","checkboxes","date-range"],default:"checkboxes"},title:{type:"string"},titleTranslationKey:{type:"string"},property:{type:"string"},parentFilter:{type:"string"},valuesMapping:{type:"object",additionalProperties:{type:"string"}},missingCategoryName:{type:"string"},missingCategoryNameTranslationKey:{type:"string"},options:{type:"array",items:{type:"string"}}}}},groupByFirstFilter:{type:"boolean"},filterValuesCasing:{type:"string",enum:["sentence","original","lowercase","uppercase"]},items:Q,requiredPermission:{type:"string"},separateVersions:{type:"boolean"},title:{type:"string"},titleTranslationKey:{type:"string"},description:{type:"string"},descriptionTranslationKey:{type:"string"}}}}},Y={type:"object",properties:{imports:{type:"array",items:{type:"string"},default:[]},logo:{type:"object",properties:{image:{type:"string"},srcSet:{type:"string"},altText:{type:"string"},link:{type:"string"},favicon:{type:"string"}},additionalProperties:!1},navbar:{type:"object",properties:Object.assign({items:Q},q.properties),additionalProperties:!1},products:{type:"object",additionalProperties:{type:"object",properties:{name:{type:"string"},icon:{type:"string"},folder:{type:"string"}},additionalProperties:!1,required:["name","folder"]}},footer:{type:"object",properties:Object.assign({items:Q,copyrightText:{type:"string"},logo:q},q.properties),additionalProperties:!1},sidebar:{type:"object",properties:Object.assign({separatorLine:{type:"boolean"},linePosition:{type:"string",enum:["top","bottom"],default:"bottom"}},q.properties),additionalProperties:!1},scripts:{type:"object",properties:{head:{type:"array",items:U},body:{type:"array",items:U}},additionalProperties:!1},links:{type:"array",items:{type:"object",properties:{href:{type:"string"},as:{type:"string"},crossorigin:{type:"string"},fetchpriority:{type:"string"},hreflang:{type:"string"},imagesizes:{type:"string"},imagesrcset:{type:"string"},integrity:{type:"string"},media:{type:"string"},prefetch:{type:"string"},referrerpolicy:{type:"string"},rel:{type:"string"},sizes:{type:"string"},title:{type:"string"},type:{type:"string"}},required:["href"],additionalProperties:!0}},feedback:{type:"object",properties:{hide:{type:"boolean",default:!1},type:{type:"string",enum:["rating","sentiment","comment","reasons","mood","scale"],default:"sentiment"},settings:Object.assign({type:"object",properties:{label:{type:"string"},submitText:{type:"string"},buttonText:{type:"string"},component:{type:"string",enum:["radio","checkbox"],default:"checkbox"},items:{type:"array",items:{type:"string"},minItems:1},leftScaleLabel:{type:"string"},rightScaleLabel:{type:"string"},reasons:{type:"object",properties:{hide:{type:"boolean",default:!1},component:{type:"string",enum:["radio","checkbox"],default:"checkbox"},label:{type:"string"},items:{type:"array",items:{type:"string"}}},additionalProperties:!1},comment:{type:"object",properties:{hide:{type:"boolean",default:!1},label:{type:"string"},likeLabel:{type:"string"},dislikeLabel:{type:"string"},satisfiedLabel:{type:"string"},neutralLabel:{type:"string"},dissatisfiedLabel:{type:"string"}},additionalProperties:!1}},additionalProperties:!1},q.properties)},additionalProperties:!1,default:{}},search:{type:"object",properties:Object.assign({placement:{type:"string",default:"navbar"},shortcuts:{type:"array",items:{type:"string"},default:["/"]},suggestedPages:{type:"array",items:{type:"object",properties:{page:{type:"string"},label:{type:"string"},labelTranslationKey:{type:"string"}},required:["page"]}},fuzzy:{type:"boolean",default:!1}},q.properties),additionalProperties:!1,default:{}},colorMode:{type:"object",properties:Object.assign({ignoreDetection:{type:"boolean"},modes:{type:"array",items:{type:"string"},default:["light","dark"]}},q.properties),additionalProperties:!1,default:{}},navigation:{type:"object",properties:{nextButton:{type:"object",properties:Object.assign({text:{type:"string",default:"Next page"}},q.properties),additionalProperties:!1,default:{}},previousButton:{type:"object",properties:Object.assign({text:{type:"string",default:"Previous page"}},q.properties),additionalProperties:!1,default:{}}},additionalProperties:!1,default:{}},codeSnippet:{type:"object",properties:{elementFormat:{type:"string",default:"icon"},copy:{type:"object",properties:Object.assign({},q.properties),additionalProperties:!1,default:{hide:!1}},report:{type:"object",properties:Object.assign({tooltipText:{type:"string"},buttonText:{type:"string"},label:{type:"string"}},q.properties),additionalProperties:!1,default:{hide:!1}},expand:{type:"object",properties:Object.assign({},q.properties),additionalProperties:!1,default:{hide:!1}},collapse:{type:"object",properties:Object.assign({},q.properties),additionalProperties:!1,default:{hide:!1}}},additionalProperties:!1,default:{}},markdown:V,openapi:M,graphql:F,analytics:{type:"object",properties:{adobe:{type:"object",properties:{includeInDevelopment:{type:"boolean"},scriptUrl:{type:"string"},pageViewEventName:{type:"string"}},additionalProperties:!1,required:["scriptUrl"]},amplitude:{type:"object",properties:{includeInDevelopment:{type:"boolean"},apiKey:{type:"string"},head:{type:"boolean"},respectDNT:{type:"boolean"},exclude:{type:"array",items:{type:"string"}},outboundClickEventName:{type:"string"},pageViewEventName:{type:"string"},amplitudeConfig:{type:"object",additionalProperties:!0}},additionalProperties:!1,required:["apiKey"]},fullstory:{type:"object",properties:{includeInDevelopment:{type:"boolean"},orgId:{type:"string"}},additionalProperties:!1,required:["orgId"]},heap:{type:"object",properties:{includeInDevelopment:{type:"boolean"},appId:{type:"string"}},additionalProperties:!1,required:["appId"]},rudderstack:{type:"object",properties:{includeInDevelopment:{type:"boolean"},writeKey:{type:"string",minLength:10},trackPage:{type:"boolean"},dataPlaneUrl:{type:"string"},controlPlaneUrl:{type:"string"},sdkUrl:{type:"string"},loadOptions:{type:"object",additionalProperties:!0}},additionalProperties:!1,required:["writeKey"]},segment:{type:"object",properties:{includeInDevelopment:{type:"boolean"},writeKey:{type:"string",minLength:10},trackPage:{type:"boolean"},includeTitleInPageCall:{type:"boolean"},host:{type:"string"}},additionalProperties:!1,required:["writeKey"]},gtm:{type:"object",properties:{includeInDevelopment:{type:"boolean"},trackingId:{type:"string"},gtmAuth:{type:"string"},gtmPreview:{type:"string"},defaultDataLayer:{},dataLayerName:{type:"string"},enableWebVitalsTracking:{type:"boolean"},selfHostedOrigin:{type:"string"},pageViewEventName:{type:"string"}},additionalProperties:!1,required:["trackingId"]},ga:H}},userMenu:{type:"object",properties:Object.assign({items:{type:"array",items:{type:"object",properties:{label:{type:"string"},external:{type:"boolean"},link:{type:"string"},separatorLine:{type:"boolean"}},additionalProperties:!0},default:[]},hideLoginButton:{type:"boolean"}},q.properties),additionalProperties:!1,default:{}},versionPicker:{type:"object",properties:{hide:{type:"boolean"},showForUnversioned:{type:"boolean"}}},breadcrumbs:{type:"object",properties:{hide:{type:"boolean"},prefixItems:{type:"array",items:{type:"object",properties:{label:{type:"string"},labelTranslationKey:{type:"string"},page:{type:"string"}},additionalProperties:!1,default:{}}}},additionalProperties:!1,default:{}},catalog:G,scorecard:{type:"object",additionalProperties:!0,required:[],properties:{ignoreNonCompliant:{type:"boolean",default:!1},teamMetadataProperty:{type:"object",properties:{property:{type:"string"},label:{type:"string"},default:{type:"string"}}},levels:{type:"array",items:{type:"object",required:["name"],properties:{name:{type:"string"},color:{type:"string"},extends:{type:"array",items:{type:"string"}},rules:{type:"object",additionalProperties:{oneOf:[{type:"string"},{type:"object"}]}}},additionalProperties:!1}},targets:{type:"array",items:{type:"object",required:["where"],properties:{minimumLevel:{type:"string"},where:{type:"object",required:["metadata"],properties:{metadata:{type:"object",additionalProperties:{type:"string"}}},additionalProperties:!1}},additionalProperties:!1}}}}},additionalProperties:!0,default:{}},X=(Object.assign(Object.assign({},Y),{additionalProperties:!1}),{type:"object",properties:{logo:Y.properties.logo,navbar:Y.properties.navbar,footer:Y.properties.footer,sidebar:Y.properties.sidebar,search:Y.properties.search,codeSnippet:Y.properties.codeSnippet,breadcrumbs:Y.properties.breadcrumbs,feedback:Y.properties.feedback,analytics:{type:"object",properties:{ga:W}}},additionalProperties:!0,default:{}}),J={type:"object",properties:{theme:X},additionalProperties:!1};const Z={type:"object",additionalProperties:{oneOf:[{type:"object",properties:{type:{type:"string",const:i.OIDC},title:{type:"string"},pkce:{type:"boolean",default:!1},configurationUrl:{type:"string",minLength:1},configuration:{type:"object",properties:{end_session_endpoint:{type:"string"},token_endpoint:{type:"string"},authorization_endpoint:{type:"string"},jwks_uri:{type:"string"}},required:["token_endpoint","authorization_endpoint"],additionalProperties:!0},clientId:{type:"string",minLength:1},clientSecret:{type:"string",minLength:0},teamsClaimName:{type:"string"},teamsClaimMap:{type:"object",additionalProperties:{type:"string"}},defaultTeams:{type:"array",items:{type:"string"}},scopes:{type:"array",items:{type:"string"}},tokenExpirationTime:{type:"number"},authorizationRequestCustomParams:{type:"object",additionalProperties:{type:"string"}},tokenRequestCustomParams:{type:"object",additionalProperties:{type:"string"}},audience:{type:"array",items:{type:"string"}}},required:["type","clientId"],oneOf:[{required:["configurationUrl"]},{required:["configuration"]}],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:i.SAML2},title:{type:"string"},issuerId:{type:"string"},entityId:{type:"string"},ssoUrl:{type:"string"},x509PublicCert:{type:"string"},teamsAttributeName:{type:"string",default:n},teamsAttributeMap:{type:"object",additionalProperties:{type:"string"}},defaultTeams:{type:"array",items:{type:"string"}}},additionalProperties:!1,required:["type","issuerId","ssoUrl","x509PublicCert"]},{type:"object",properties:{type:{type:"string",const:i.BASIC},title:{type:"string"},credentials:{type:"array",items:{type:"object",properties:{username:{type:"string"},password:{type:"string"},passwordHash:{type:"string"},teams:{type:"array",items:{type:"string"}}},required:["username"],additionalProperties:!1}}},required:["type","credentials"],additionalProperties:!1}],discriminator:{propertyName:"type"}}},ee={type:"object",additionalProperties:{type:"object",properties:{to:{type:"string"},type:{type:"number",default:301}},additionalProperties:!1},default:{}},te={type:"object",additionalProperties:{oneOf:[{type:"string"},{type:"object"}]}},re={type:"object",properties:{root:{type:"string"},output:{type:"string",pattern:"(.ya?ml|.json)$"},rbac:{type:"object",additionalProperties:!0},theme:{type:"object",properties:{openapi:Y.properties.openapi,graphql:Y.properties.graphql},additionalProperties:!1},title:{type:"string"},metadata:{type:"object",additionalProperties:!0},rules:te,decorators:{type:"object",additionalProperties:!0},preprocessors:{type:"object",additionalProperties:!0}},required:["root"]},ne={type:"object",additionalProperties:{type:"string"}},ie={type:"object",properties:{teamNamePatterns:{type:"array",items:{type:"string"}},teamFolders:{type:"array",items:{type:"string"}},teamFoldersBaseRoles:ne,cms:ne,reunite:ne,content:{type:"object",properties:{"**":ne},additionalProperties:ne}},additionalProperties:ne},oe={type:"object",properties:{type:{type:"string",const:"APIGEE_X"},apiUrl:{type:"string"},stage:{type:"string",default:"non-production"},organizationName:{type:"string"},ignoreApiProducts:{type:"array",items:{type:"string"}},allowApiProductsOutsideCatalog:{type:"boolean",default:!1},auth:{type:"object",oneOf:[{type:"object",properties:{type:{type:"string",const:o.OAUTH2},tokenEndpoint:{type:"string"},clientId:{type:"string"},clientSecret:{type:"string"}},additionalProperties:!1,required:["type","tokenEndpoint","clientId","clientSecret"]},{type:"object",properties:{type:{type:"string",const:o.SERVICE_ACCOUNT},serviceAccountEmail:{type:"string"},serviceAccountPrivateKey:{type:"string"}},additionalProperties:!1,required:["type","serviceAccountEmail","serviceAccountPrivateKey"]}],discriminator:{propertyName:"type"}}},additionalProperties:!1,required:["type","organizationName","auth"]},se=Object.assign(Object.assign({},oe),{properties:Object.assign(Object.assign({},oe.properties),{type:{type:"string",const:"APIGEE_EDGE"}})}),ae={type:"object",properties:{licenseKey:{type:"string"},redirects:ee,seo:{type:"object",properties:{title:{type:"string"},description:{type:"string"},siteUrl:{type:"string"},image:{type:"string"},keywords:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"}]},lang:{type:"string"},jsonLd:{type:"object"},meta:{type:"array",items:{type:"object",properties:{name:{type:"string"},content:{type:"string"}},required:["name","content"],additionalProperties:!1}}},additionalProperties:!1},rbac:ie,requiresLogin:{type:"boolean"},responseHeaders:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},value:{type:"string"}},additionalProperties:!1,required:["name","value"]}}},mockServer:{type:"object",properties:{off:{type:"boolean",default:!1},position:{type:"string",enum:["first","last","replace","off"],default:"first"},strictExamples:{type:"boolean",default:!1},errorIfForcedExampleNotFound:{type:"boolean",default:!1},description:{type:"string"}}},apis:{type:"object",additionalProperties:re},rules:te,decorators:{type:"object",additionalProperties:!0},preprocessors:{type:"object",additionalProperties:!0},ssoOnPrem:Z,sso:{oneOf:[{type:"array",items:{type:"string",enum:["REDOCLY","CORPORATE","GUEST"]},uniqueItems:!0},{type:"string",enum:["REDOCLY","CORPORATE","GUEST"]}]},residency:{type:"string"},developerOnboarding:{type:"object",required:["adapters"],additionalProperties:!1,properties:{adapters:{type:"array",items:{type:"object",oneOf:[oe,se,{type:"object",properties:{type:{type:"string",const:"GRAVITEE"},apiBaseUrl:{type:"string"},env:{type:"string"},allowApiProductsOutsideCatalog:{type:"boolean",default:!1},stage:{type:"string",default:"non-production"},auth:{type:"object",properties:{static:{type:"string"}}}},additionalProperties:!1,required:["type","apiBaseUrl"]}],discriminator:{propertyName:"type"}}}}},removeAttribution:{type:"boolean"},i18n:{type:"object",properties:{defaultLocale:{type:"string"},locales:{type:"array",items:{type:"object",properties:{code:{type:"string"},name:{type:"string"}},required:["code"]}}},additionalProperties:!1,required:["defaultLocale"]},metadata:{type:"object",additionalProperties:!0},ignore:{type:"array",items:{type:"string"}},theme:Y,reunite:{type:"object",properties:{ignoreLinkChecker:{type:"boolean"}},additionalProperties:!1}},default:{redirects:{}},additionalProperties:!0},le=Object.assign(Object.assign({},function e(t,r){return Object.fromEntries(Object.entries(t).map(([t,n])=>{if(t!==r)return"object"==typeof n&&n?Array.isArray(n)?[t,n.map(t=>"object"==typeof t?e(t,r):t)]:[t,e(n,r)]:[t,n]}).filter(Boolean))}(ae,"default")),{additionalProperties:!1}),ce=Object.assign(Object.assign({},ae),{properties:Object.assign(Object.assign({plugins:{type:"array",items:{type:"string"}}},ae.properties),{env:{type:"object",additionalProperties:le}}),default:{},additionalProperties:!1})},10854(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.mapTypeToComponent=t.bundleDocument=t.bundleFromString=t.bundle=t.bundleConfig=t.OasVersion=void 0;const i=r(8142),o=r(62928),s=r(32161),a=r(71990),l=r(5735),c=r(43101),u=r(13873),p=r(72900),d=r(13416),f=r(88209),h=r(2440),m=r(86729),y=r(12020),g=r(30750);var b;function v(e){return n(this,void 0,void 0,function*(){const{document:t,config:r,customTypes:n,externalRefResolver:i,dereference:u=!1,skipRedoclyRegistryRefs:d=!1,removeUnusedComponents:f=!1,keepUrlRefs:h=!1}=e,g=(0,c.detectSpec)(t.parsed),b=(0,c.getMajorSpecVersion)(g),v=r.getRulesForOasVersion(b),x=(0,a.normalizeTypes)(r.extendTypes(null!=n?n:(0,c.getTypes)(g),g),r),w=(0,p.initRules)(v,r,"preprocessors",g),k=(0,p.initRules)(v,r,"decorators",g),O={problems:[],oasVersion:g,refTypes:new Map,visitorsData:{}};f&&k.push({severity:"error",ruleId:"remove-unused-components",visitor:b===c.SpecMajorVersion.OAS2?(0,m.RemoveUnusedComponents)({}):(0,y.RemoveUnusedComponents)({})});let _=yield(0,o.resolveDocument)({rootDocument:t,rootType:x.Root,externalRefResolver:i});w.length>0&&((0,l.walkDocument)({document:t,rootType:x.Root,normalizedVisitors:(0,s.normalizeVisitors)(w,x),resolvedRefMap:_,ctx:O}),_=yield(0,o.resolveDocument)({rootDocument:t,rootType:x.Root,externalRefResolver:i}));const E=(0,s.normalizeVisitors)([{severity:"error",ruleId:"bundler",visitor:S(b,u,d,t,_,h)},...k],x);return(0,l.walkDocument)({document:t,rootType:x.Root,normalizedVisitors:E,resolvedRefMap:_,ctx:O}),{bundle:t,problems:O.problems.map(e=>r.addProblemToIgnore(e)),fileDependencies:i.getFiles(),rootType:x.Root,refTypes:O.refTypes,visitorsData:O.visitorsData}})}function x(e,t){switch(t){case c.SpecMajorVersion.OAS3:switch(e){case"Schema":return"schemas";case"Parameter":return"parameters";case"Response":return"responses";case"Example":return"examples";case"RequestBody":return"requestBodies";case"Header":return"headers";case"SecuritySchema":return"securitySchemes";case"Link":return"links";case"Callback":return"callbacks";default:return null}case c.SpecMajorVersion.OAS2:switch(e){case"Schema":return"definitions";case"Parameter":return"parameters";case"Response":return"responses";default:return null}case c.SpecMajorVersion.Async2:switch(e){case"Schema":return"schemas";case"Parameter":return"parameters";default:return null}}}function w(e,t,r){if((0,f.isPlainObject)(t.node)){delete e.$ref;const r=Object.assign({},t.node,e);Object.assign(e,r)}else r.parent[r.key]=t.node}function S(e,t,r,n,s,a){let l,p;const m={ref:{leave(i,l,c){if(!c.location||void 0===c.node)return void(0,d.reportUnresolvedRef)(c,l.report,l.location);if(c.location.source===n.source&&c.location.source===l.location.source&&"scalar"!==l.type.name&&!t)return;if(r&&(0,h.isRedoclyRegistryURL)(i.$ref))return;if(a&&(0,u.isAbsoluteUrl)(i.$ref))return;const p=x(l.type.name,e);p?t?(y(p,c,l),w(i,c,l)):(i.$ref=y(p,c,l),function(e,t,r){const i=(0,o.makeRefId)(r.location.source.absoluteRef,e.$ref);s.set(i,{document:n,isRemote:!1,node:t.node,nodePointer:e.$ref,resolved:!0})}(i,c,l)):w(i,c,l)}},Root:{enter(t,r){p=r.location,e===c.SpecMajorVersion.OAS3?l=t.components=t.components||{}:e===c.SpecMajorVersion.OAS2&&(l=t)}}};function y(t,r,n){l[t]=l[t]||{};const i=function(e,t,r){const[n,i]=[e.location.source.absoluteRef,e.location.pointer],o=l[t];let s="";const a=i.slice(2).split("/").filter(f.isTruthy);for(;a.length>0;)if(s=a.pop()+(s?`-${s}`:""),!o||!o[s]||g(o[s],e,r))return s;if(s=(0,u.refBaseName)(n)+(s?`_${s}`:""),!o[s]||g(o[s],e,r))return s;const c=s;let p=2;for(;o[s]&&!g(o[s],e,r);)s=`${c}-${p}`,p++;o[s]||r.report({message:`Two schemas are referenced with the same name but different content. Renamed ${c} to ${s}.`,location:r.location,forceSeverity:"warn"});return s}(r,t,n);return l[t][i]=r.node,e===c.SpecMajorVersion.OAS3?`#/components/${t}/${i}`:`#/${t}/${i}`}function g(e,t,r){var n;return!(!(0,u.isRef)(e)||(null===(n=r.resolve(e,p.absolutePointer).location)||void 0===n?void 0:n.absolutePointer)!==t.location.absolutePointer)||i(e,t.node)}return e===c.SpecMajorVersion.OAS3&&(m.DiscriminatorMapping={leave(r,n){for(const i of Object.keys(r)){const o=r[i],s=n.resolve({$ref:o});if(!s.location||void 0===s.node)return void(0,d.reportUnresolvedRef)(s,n.report,n.location.child(i));const a=x("Schema",e);t?y(a,s,n):r[i]=y(a,s,n)}}}),m}!function(e){e.Version2="oas2",e.Version3_0="oas3_0",e.Version3_1="oas3_1"}(b||(t.OasVersion=b={})),t.bundleConfig=function(e,t){var r;return n(this,void 0,void 0,function*(){const n=(0,a.normalizeTypes)(g.ConfigTypes),i={problems:[],oasVersion:c.SpecVersion.OAS3_0,refTypes:new Map,visitorsData:{}},o=(0,s.normalizeVisitors)([{severity:"error",ruleId:"configBundler",visitor:{ref:{leave(e,t,r){w(e,r,t)}}}}],n);return(0,l.walkDocument)({document:e,rootType:n.ConfigRoot,normalizedVisitors:o,resolvedRefMap:t,ctx:i}),null!==(r=e.parsed)&&void 0!==r?r:{}})},t.bundle=function(e){return n(this,void 0,void 0,function*(){const{ref:t,doc:r,externalRefResolver:n=new o.BaseResolver(e.config.resolve),base:i=null}=e;if(!t&&!r)throw new Error("Document or reference is required.\n");const s=void 0===r?yield n.resolveDocument(i,t,!0):r;if(s instanceof Error)throw s;return v(Object.assign(Object.assign({document:s},e),{config:e.config.styleguide,externalRefResolver:n}))})},t.bundleFromString=function(e){return n(this,void 0,void 0,function*(){const{source:t,absoluteRef:r,externalRefResolver:n=new o.BaseResolver(e.config.resolve)}=e,i=(0,o.makeDocumentFromString)(t,r||"/");return v(Object.assign(Object.assign({document:i},e),{externalRefResolver:n,config:e.config.styleguide}))})},t.bundleDocument=v,t.mapTypeToComponent=x},88921(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Config=t.StyleguideConfig=t.IGNORE_FILE=void 0;const n=r(67992),i=r(57975),o=r(50970),s=r(88209),a=r(43101),l=r(31827),c=r(40462),u=r(13873);t.IGNORE_FILE=".redocly.lint-ignore.yaml";class p{constructor(e,r){this.rawConfig=e,this.configFile=r,this.ignore={},this._usedRules=new Set,this._usedVersions=new Set,this.plugins=e.plugins||[],this.doNotResolveExamples=!!e.doNotResolveExamples,this.recommendedFallback=e.recommendedFallback||!1,this.rules={[a.SpecVersion.OAS2]:Object.assign(Object.assign({},e.rules),e.oas2Rules),[a.SpecVersion.OAS3_0]:Object.assign(Object.assign({},e.rules),e.oas3_0Rules),[a.SpecVersion.OAS3_1]:Object.assign(Object.assign({},e.rules),e.oas3_1Rules),[a.SpecVersion.Async2]:Object.assign(Object.assign({},e.rules),e.async2Rules)},this.preprocessors={[a.SpecVersion.OAS2]:Object.assign(Object.assign({},e.preprocessors),e.oas2Preprocessors),[a.SpecVersion.OAS3_0]:Object.assign(Object.assign({},e.preprocessors),e.oas3_0Preprocessors),[a.SpecVersion.OAS3_1]:Object.assign(Object.assign({},e.preprocessors),e.oas3_1Preprocessors),[a.SpecVersion.Async2]:Object.assign(Object.assign({},e.preprocessors),e.async2Preprocessors)},this.decorators={[a.SpecVersion.OAS2]:Object.assign(Object.assign({},e.decorators),e.oas2Decorators),[a.SpecVersion.OAS3_0]:Object.assign(Object.assign({},e.decorators),e.oas3_0Decorators),[a.SpecVersion.OAS3_1]:Object.assign(Object.assign({},e.decorators),e.oas3_1Decorators),[a.SpecVersion.Async2]:Object.assign(Object.assign({},e.decorators),e.async2Decorators)},this.extendPaths=e.extendPaths||[],this.pluginPaths=e.pluginPaths||[],this.resolveIgnore(function(e){return e?(0,s.doesYamlFileExist)(e)?i.join(i.dirname(e),t.IGNORE_FILE):i.join(e,t.IGNORE_FILE):l.isBrowser?void 0:i.join(process.cwd(),t.IGNORE_FILE)}(r))}resolveIgnore(e){if(e&&(0,s.doesYamlFileExist)(e)){this.ignore=(0,o.parseYaml)(n.readFileSync(e,"utf-8"))||{};for(const t of Object.keys(this.ignore)){this.ignore[(0,u.isAbsoluteUrl)(t)?t:i.resolve(i.dirname(e),t)]=this.ignore[t];for(const e of Object.keys(this.ignore[t]))this.ignore[t][e]=new Set(this.ignore[t][e]);(0,u.isAbsoluteUrl)(t)||delete this.ignore[t]}}}saveIgnore(){const e=this.configFile?i.dirname(this.configFile):process.cwd(),r=i.join(e,t.IGNORE_FILE),a={};for(const t of Object.keys(this.ignore)){const r=a[(0,u.isAbsoluteUrl)(t)?t:(0,s.slash)(i.relative(e,t))]=this.ignore[t];for(const e of Object.keys(r))r[e]=Array.from(r[e])}n.writeFileSync(r,"# This file instructs Redocly's linter to ignore the rules contained for specific parts of your API.\n# See https://redoc.ly/docs/cli/ for more information.\n"+(0,o.stringifyYaml)(a))}addIgnore(e){const t=this.ignore,r=e.location[0];if(void 0===r.pointer)return;const n=t[r.source.absoluteRef]=t[r.source.absoluteRef]||{};(n[e.ruleId]=n[e.ruleId]||new Set).add(r.pointer)}addProblemToIgnore(e){const t=e.location[0];if(void 0===t.pointer)return e;const r=(this.ignore[t.source.absoluteRef]||{})[e.ruleId],n=r&&r.has(t.pointer);return n?Object.assign(Object.assign({},e),{ignored:n}):e}extendTypes(e,t){let r=e;for(const n of this.plugins)if(void 0!==n.typeExtension)switch(t){case a.SpecVersion.OAS3_0:case a.SpecVersion.OAS3_1:if(!n.typeExtension.oas3)continue;r=n.typeExtension.oas3(r,t);break;case a.SpecVersion.OAS2:if(!n.typeExtension.oas2)continue;r=n.typeExtension.oas2(r,t);break;case a.SpecVersion.Async2:if(!n.typeExtension.async2)continue;r=n.typeExtension.async2(r,t);break;default:throw new Error("Not implemented")}return r}getRuleSettings(e,t){this._usedRules.add(e),this._usedVersions.add(t);const r=this.rules[t][e]||"off";return"string"==typeof r?{severity:r}:Object.assign({severity:"error"},r)}getPreprocessorSettings(e,t){this._usedRules.add(e),this._usedVersions.add(t);const r=this.preprocessors[t][e]||"off";return"string"==typeof r?{severity:"on"===r?"error":r}:Object.assign({severity:"error"},r)}getDecoratorSettings(e,t){this._usedRules.add(e),this._usedVersions.add(t);const r=this.decorators[t][e]||"off";return"string"==typeof r?{severity:"on"===r?"error":r}:Object.assign({severity:"error"},r)}getUnusedRules(){const e=[],t=[],r=[];for(const n of Array.from(this._usedVersions))e.push(...Object.keys(this.rules[n]).filter(e=>!this._usedRules.has(e))),t.push(...Object.keys(this.decorators[n]).filter(e=>!this._usedRules.has(e))),r.push(...Object.keys(this.preprocessors[n]).filter(e=>!this._usedRules.has(e)));return{rules:e,preprocessors:r,decorators:t}}getRulesForOasVersion(e){switch(e){case a.SpecMajorVersion.OAS3:const e=[];return this.plugins.forEach(t=>{var r;return(null===(r=t.preprocessors)||void 0===r?void 0:r.oas3)&&e.push(t.preprocessors.oas3)}),this.plugins.forEach(t=>{var r;return(null===(r=t.rules)||void 0===r?void 0:r.oas3)&&e.push(t.rules.oas3)}),this.plugins.forEach(t=>{var r;return(null===(r=t.decorators)||void 0===r?void 0:r.oas3)&&e.push(t.decorators.oas3)}),e;case a.SpecMajorVersion.OAS2:const t=[];return this.plugins.forEach(e=>{var r;return(null===(r=e.preprocessors)||void 0===r?void 0:r.oas2)&&t.push(e.preprocessors.oas2)}),this.plugins.forEach(e=>{var r;return(null===(r=e.rules)||void 0===r?void 0:r.oas2)&&t.push(e.rules.oas2)}),this.plugins.forEach(e=>{var r;return(null===(r=e.decorators)||void 0===r?void 0:r.oas2)&&t.push(e.decorators.oas2)}),t;case a.SpecMajorVersion.Async2:const r=[];return this.plugins.forEach(e=>{var t;return(null===(t=e.preprocessors)||void 0===t?void 0:t.async2)&&r.push(e.preprocessors.async2)}),this.plugins.forEach(e=>{var t;return(null===(t=e.rules)||void 0===t?void 0:t.async2)&&r.push(e.rules.async2)}),this.plugins.forEach(e=>{var t;return(null===(t=e.decorators)||void 0===t?void 0:t.async2)&&r.push(e.decorators.async2)}),r}}skipRules(e){for(const t of e||[])for(const e of Object.values(a.SpecVersion))this.rules[e][t]&&(this.rules[e][t]="off")}skipPreprocessors(e){for(const t of e||[])for(const e of Object.values(a.SpecVersion))this.preprocessors[e][t]&&(this.preprocessors[e][t]="off")}skipDecorators(e){for(const t of e||[])for(const e of Object.values(a.SpecVersion))this.decorators[e][t]&&(this.decorators[e][t]="off")}}t.StyleguideConfig=p;t.Config=class{constructor(e,t){this.rawConfig=e,this.configFile=t,this.apis=e.apis||{},this.styleguide=new p(e.styleguide||{},t),this.theme=e.theme||{},this.resolve=(0,c.getResolveConfig)(null==e?void 0:e.resolve),this.region=e.region,this.organization=e.organization,this.files=e.files||[],this.telemetry=e.telemetry}}},72900(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initRules=void 0;const n=r(88209);t.initRules=function(e,t,r,i){return e.flatMap(e=>Object.keys(e).map(n=>{const o=e[n],s="rules"===r?t.getRuleSettings(n,i):"preprocessors"===r?t.getPreprocessorSettings(n,i):t.getDecoratorSettings(n,i);if("off"===s.severity)return;const a=s.severity,l=o(s);return Array.isArray(l)?l.map(e=>({severity:a,ruleId:n,visitor:e})):{severity:a,ruleId:n,visitor:l}})).flatMap(e=>e).filter(n.isDefined)}},40462(e,t,r){"use strict";var n=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);it[e]);r[e]&&null===t&&(0,i.showWarningForDeprecatedField)(e),r[e]&&t&&r[t]&&(0,i.showErrorForDeprecatedField)(e,t),r[e]&&n&&r[n]&&(0,i.showErrorForDeprecatedField)(e,t,n),(r[e]||o)&&(0,i.showWarningForDeprecatedField)(e,t,n)}t.parsePresetName=function(e){if(e.indexOf("/")>-1){const[t,r]=e.split("/");return{pluginId:t,configName:r}}return{pluginId:"",configName:e}},t.transformApiDefinitionsToApis=a,t.prefixRules=function(e,t){if(!t)return e;const r={};for(const n of Object.keys(e))r[`${t}/${n}`]=e[n];return r},t.mergeExtends=function(e){const t={rules:{},oas2Rules:{},oas3_0Rules:{},oas3_1Rules:{},async2Rules:{},preprocessors:{},oas2Preprocessors:{},oas3_0Preprocessors:{},oas3_1Preprocessors:{},async2Preprocessors:{},decorators:{},oas2Decorators:{},oas3_0Decorators:{},oas3_1Decorators:{},async2Decorators:{},plugins:[],pluginPaths:[],extendPaths:[]};for(const r of e){if(r.extends)throw new Error(`'extends' is not supported in shared configs yet:\n${JSON.stringify(r,null,2)}`);Object.assign(t.rules,r.rules),Object.assign(t.oas2Rules,r.oas2Rules),(0,i.assignExisting)(t.oas2Rules,r.rules||{}),Object.assign(t.oas3_0Rules,r.oas3_0Rules),(0,i.assignExisting)(t.oas3_0Rules,r.rules||{}),Object.assign(t.oas3_1Rules,r.oas3_1Rules),(0,i.assignExisting)(t.oas3_1Rules,r.rules||{}),Object.assign(t.async2Rules,r.async2Rules),(0,i.assignExisting)(t.async2Rules,r.rules||{}),Object.assign(t.preprocessors,r.preprocessors),Object.assign(t.oas2Preprocessors,r.oas2Preprocessors),(0,i.assignExisting)(t.oas2Preprocessors,r.preprocessors||{}),Object.assign(t.oas3_0Preprocessors,r.oas3_0Preprocessors),(0,i.assignExisting)(t.oas3_0Preprocessors,r.preprocessors||{}),Object.assign(t.oas3_1Preprocessors,r.oas3_1Preprocessors),(0,i.assignExisting)(t.oas3_1Preprocessors,r.preprocessors||{}),Object.assign(t.async2Preprocessors,r.async2Preprocessors),(0,i.assignExisting)(t.async2Preprocessors,r.preprocessors||{}),Object.assign(t.decorators,r.decorators),Object.assign(t.oas2Decorators,r.oas2Decorators),(0,i.assignExisting)(t.oas2Decorators,r.decorators||{}),Object.assign(t.oas3_0Decorators,r.oas3_0Decorators),(0,i.assignExisting)(t.oas3_0Decorators,r.decorators||{}),Object.assign(t.oas3_1Decorators,r.oas3_1Decorators),(0,i.assignExisting)(t.oas3_1Decorators,r.decorators||{}),Object.assign(t.async2Decorators,r.async2Decorators),(0,i.assignExisting)(t.async2Decorators,r.decorators||{}),t.plugins.push(...r.plugins||[]),t.pluginPaths.push(...r.pluginPaths||[]),t.extendPaths.push(...new Set(r.extendPaths))}return t},t.getMergedConfig=function(e,t){var r,n,s,a,l,c,u,p;const d=[...Object.values(e.apis).map(e=>{var t;return null===(t=null==e?void 0:e.styleguide)||void 0===t?void 0:t.extendPaths}),null===(n=null===(r=e.rawConfig)||void 0===r?void 0:r.styleguide)||void 0===n?void 0:n.extendPaths].flat().filter(i.isTruthy),f=[...Object.values(e.apis).map(e=>{var t;return null===(t=null==e?void 0:e.styleguide)||void 0===t?void 0:t.pluginPaths}),null===(a=null===(s=e.rawConfig)||void 0===s?void 0:s.styleguide)||void 0===a?void 0:a.pluginPaths].flat().filter(i.isTruthy);return t?new o.Config(Object.assign(Object.assign({},e.rawConfig),{styleguide:Object.assign(Object.assign({},e.apis[t]?e.apis[t].styleguide:e.rawConfig.styleguide),{extendPaths:d,pluginPaths:f}),theme:Object.assign(Object.assign({},e.rawConfig.theme),null===(l=e.apis[t])||void 0===l?void 0:l.theme),files:[...e.files,...null!==(p=null===(u=null===(c=e.apis)||void 0===c?void 0:c[t])||void 0===u?void 0:u.files)&&void 0!==p?p:[]]}),e.configFile):e},t.checkForDeprecatedFields=u,t.transformConfig=function(e){var t,r;const i=[["apiDefinitions","apis",void 0],["referenceDocs","openapi","theme"],["lint",void 0,void 0],["styleguide",void 0,void 0],["features.openapi","openapi","theme"]];for(const[n,s,a]of i)u(n,s,e,a);const{apis:o,apiDefinitions:p,referenceDocs:d,lint:f}=e,h=n(e,["apis","apiDefinitions","referenceDocs","lint"]),{styleguideConfig:m,rawConfigRest:y}=l(h),g=Object.assign({theme:{openapi:Object.assign(Object.assign(Object.assign({},d),e["features.openapi"]),null===(t=e.theme)||void 0===t?void 0:t.openapi),mockServer:Object.assign(Object.assign({},e["features.mockServer"]),null===(r=e.theme)||void 0===r?void 0:r.mockServer)},apis:c(o)||a(p),styleguide:m||f},y);return function(e){var t,r;let n=Object.assign({},null===(t=e.styleguide)||void 0===t?void 0:t.rules);for(const i of Object.values(e.apis||{}))n=Object.assign(Object.assign({},n),null===(r=null==i?void 0:i.styleguide)||void 0===r?void 0:r.rules);for(const i of Object.keys(n))i.startsWith("assert/")&&s.logger.warn(`\nThe 'assert/' syntax in ${i} is deprecated. Update your configuration to use 'rule/' instead. Examples and more information: https://redocly.com/docs/cli/rules/configurable-rules/\n`)}(g),g},t.getResolveConfig=function(e){var t,r;return{http:{headers:null!==(r=null===(t=null==e?void 0:e.http)||void 0===t?void 0:t.headers)&&void 0!==r?r:[],customFetch:void 0}}},t.getUniquePlugins=function(e){const t=new Set,r=[];for(const n of e)t.has(n.id)?n.id&&s.logger.warn(`Duplicate plugin id "${s.colorize.red(n.id)}".\n`):(r.push(n),t.add(n.id));return r};class p extends Error{}t.ConfigValidationError=p},86729(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemoveUnusedComponents=void 0;const n=r(88209);t.RemoveUnusedComponents=()=>{const e=new Map;function t(t,r,n){var i,o;e.set(t.absolutePointer,{usedIn:null!==(o=null===(i=e.get(t.absolutePointer))||void 0===i?void 0:i.usedIn)&&void 0!==o?o:[],componentType:r,name:n})}function r(t,i){const o=i.length;for(const[r,{usedIn:s,name:a,componentType:l}]of e){!s.some(e=>!i.some(t=>e.absolutePointer.startsWith(t)&&(e.absolutePointer.length===t.length||"/"===e.absolutePointer[t.length])))&&l&&(i.push(r),delete t[l][a],e.delete(r),(0,n.isEmptyObject)(t[l])&&delete t[l])}return i.length>o?r(t,i):i.length}return{ref:{leave(t,{location:r,type:n,resolve:i,key:o}){if(["Schema","Parameter","Response","SecurityScheme"].includes(n.name)){const n=i(t);if(!n.location)return;const[s,a]=n.location.absolutePointer.split("#",2),l=`${s}#${a.split("/").slice(0,3).join("/")}`,c=e.get(l);c?c.usedIn.push(r):e.set(l,{usedIn:[r],name:o.toString()})}}},Root:{leave(e,t){t.getVisitorData().removedCount=r(e,[])}},NamedSchemas:{Schema(e,{location:r,key:n}){e.allOf||t(r,"definitions",n.toString())}},NamedParameters:{Parameter(e,{location:r,key:n}){t(r,"parameters",n.toString())}},NamedResponses:{Response(e,{location:r,key:n}){t(r,"responses",n.toString())}},NamedSecuritySchemes:{SecurityScheme(e,{location:r,key:n}){t(r,"securityDefinitions",n.toString())}}}}},12020(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemoveUnusedComponents=void 0;const n=r(88209);t.RemoveUnusedComponents=()=>{const e=new Map;function t(t,r,n){var i,o;e.set(t.absolutePointer,{usedIn:null!==(o=null===(i=e.get(t.absolutePointer))||void 0===i?void 0:i.usedIn)&&void 0!==o?o:[],componentType:r,name:n})}function r(t,i){const o=i.length;for(const[r,{usedIn:s,name:a,componentType:l}]of e){if(!s.some(e=>!i.some(t=>e.absolutePointer.startsWith(t)&&(e.absolutePointer.length===t.length||"/"===e.absolutePointer[t.length])))&&l&&t.components){i.push(r);const o=t.components[l];delete o[a],e.delete(r),(0,n.isEmptyObject)(o)&&delete t.components[l]}}return i.length>o?r(t,i):i.length}return{ref:{leave(t,{location:r,type:n,resolve:i,key:o}){if(["Schema","Header","Parameter","Response","Example","RequestBody"].includes(n.name)){const n=i(t);if(!n.location)return;const[s,a]=n.location.absolutePointer.split("#",2),l=`${s}#${a.split("/").slice(0,4).join("/")}`,c=e.get(l);c?c.usedIn.push(r):e.set(l,{usedIn:[r],name:o.toString()})}}},Root:{leave(e,t){t.getVisitorData().removedCount=r(e,[]),(0,n.isEmptyObject)(e.components)&&delete e.components}},NamedSchemas:{Schema(e,{location:r,key:n}){e.allOf||t(r,"schemas",n.toString())}},NamedParameters:{Parameter(e,{location:r,key:n}){t(r,"parameters",n.toString())}},NamedResponses:{Response(e,{location:r,key:n}){t(r,"responses",n.toString())}},NamedExamples:{Example(e,{location:r,key:n}){t(r,"examples",n.toString())}},NamedRequestBodies:{RequestBody(e,{location:r,key:n}){t(r,"requestBodies",n.toString())}},NamedHeaders:{Header(e,{location:r,key:n}){t(r,"headers",n.toString())}}}}},31827(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.env=t.isBrowser=void 0,t.isBrowser="undefined"!=typeof window||"undefined"==typeof process||"browser"===(null===process||void 0===process?void 0:""),t.env=t.isBrowser?{}:{}||{}},50970(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringifyYaml=t.parseYaml=void 0;const n=r(57210),i=n.JSON_SCHEMA.extend({implicit:[n.types.merge],explicit:[n.types.binary,n.types.omap,n.types.pairs,n.types.set]});t.parseYaml=(e,t)=>(0,n.load)(e,Object.assign({schema:i},t));t.stringifyYaml=(e,t)=>(0,n.dump)(e,t)},92678(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logger=t.colorize=t.colorOptions=void 0;const n=r(28825);var i=r(28825);Object.defineProperty(t,"colorOptions",{enumerable:!0,get:function(){return i.options}});const o=r(31827),s=r(88209);t.colorize=new Proxy(n,{get:(e,t)=>o.isBrowser?s.identity:e[t]});t.logger=new class{stderr(e){return process.stderr.write(e)}info(e){return o.isBrowser?console.log(e):this.stderr(e)}warn(e){return o.isBrowser?console.warn(e):this.stderr(t.colorize.yellow(e))}error(e){return o.isBrowser?console.error(e):this.stderr(t.colorize.red(e))}}},43101(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTypes=t.getMajorSpecVersion=t.detectSpec=t.SpecMajorVersion=t.SpecVersion=void 0;const n=r(4409),i=r(34154),o=r(62082),s=r(30264);var a,l;!function(e){e.OAS2="oas2",e.OAS3_0="oas3_0",e.OAS3_1="oas3_1",e.Async2="async2"}(a||(t.SpecVersion=a={})),function(e){e.OAS2="oas2",e.OAS3="oas3",e.Async2="async2"}(l||(t.SpecMajorVersion=l={}));const c={[a.OAS2]:n.Oas2Types,[a.OAS3_0]:i.Oas3Types,[a.OAS3_1]:o.Oas3_1Types,[a.Async2]:s.AsyncApi2Types};t.detectSpec=function(e){if("object"!=typeof e)throw new Error("Document must be JSON object, got "+typeof e);if(e.openapi&&"string"!=typeof e.openapi)throw new Error(`Invalid OpenAPI version: should be a string but got "${typeof e.openapi}"`);if(e.openapi&&e.openapi.startsWith("3.0"))return a.OAS3_0;if(e.openapi&&e.openapi.startsWith("3.1"))return a.OAS3_1;if(e.swagger&&"2.0"===e.swagger)return a.OAS2;if(e.openapi||e.swagger)throw new Error(`Unsupported OpenAPI version: ${e.openapi||e.swagger}`);if(e.asyncapi&&e.asyncapi.startsWith("2."))return a.Async2;if(e.asyncapi)throw new Error(`Unsupported AsyncAPI version: ${e.asyncapi}`);throw new Error("Unsupported specification")},t.getMajorSpecVersion=function(e){return e===a.OAS2?l.OAS2:e===a.Async2?l.Async2:l.OAS3},t.getTypes=function(e){return c[e]}},2440(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isRedoclyRegistryURL=t.getRedoclyDomain=t.setRedoclyDomain=t.getDomains=t.AVAILABLE_REGIONS=t.DOMAINS=t.DEFAULT_REGION=void 0;let r="redocly.com";function n(){const e={us:"redocly.com",eu:"eu.redocly.com"},t=r;return(null==t?void 0:t.endsWith(".redocly.host"))&&(e[t.split(".")[0]]=t),"redoc.online"===t&&(e[t]=t),e}function i(){return r}t.DEFAULT_REGION="us",t.DOMAINS=n(),t.AVAILABLE_REGIONS=Object.keys(t.DOMAINS),t.getDomains=n,t.setRedoclyDomain=function(e){r=e},t.getRedoclyDomain=i,t.isRedoclyRegistryURL=function(e){const r=i()||t.DOMAINS[t.DEFAULT_REGION],n="redocly.com"===r?"redoc.ly":r;return!(!e.startsWith(`https://api.${r}/registry/`)&&!e.startsWith(`https://api.${n}/registry/`))}},13873(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAnchor=t.isMappingRef=t.isAbsoluteUrl=t.refBaseName=t.pointerBaseName=t.parsePointer=t.parseRef=t.escapePointer=t.unescapePointer=t.Location=t.isRef=t.joinPointer=void 0;const n=r(88209);function i(e,t){return""===e&&(e="#/"),"/"===e[e.length-1]?e+t:e+"/"+t}t.joinPointer=i,t.isRef=function(e){return e&&"string"==typeof e.$ref};class o{constructor(e,t){this.source=e,this.pointer=t}child(e){return new o(this.source,i(this.pointer,(Array.isArray(e)?e:[e]).map(a).join("/")))}key(){return Object.assign(Object.assign({},this),{reportOnKey:!0})}get absolutePointer(){return this.source.absoluteRef+("#/"===this.pointer?"":this.pointer)}}function s(e){return decodeURIComponent(e.replace(/~1/g,"/").replace(/~0/g,"~"))}function a(e){return"number"==typeof e?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function l(e){return e.split("/").map(s).filter(n.isTruthy)}t.Location=o,t.unescapePointer=s,t.escapePointer=a,t.parseRef=function(e){const[t,r=""]=e.split("#/");return{uri:(t.endsWith("#")?t.slice(0,-1):t)||null,pointer:l(r)}},t.parsePointer=l,t.pointerBaseName=function(e){const t=e.split("/");return t[t.length-1]},t.refBaseName=function(e){const t=e.split(/[\/\\]/);return t[t.length-1].replace(/\.[^.]+$/,"")},t.isAbsoluteUrl=function(e){return e.startsWith("http://")||e.startsWith("https://")},t.isMappingRef=function(e){return e.startsWith("#")||e.startsWith("https://")||e.startsWith("http://")||e.startsWith("./")||e.startsWith("../")||e.indexOf("/")>-1},t.isAnchor=function(e){return/^#[A-Za-z][A-Za-z0-9\-_:.]*$/.test(e)}},62928(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.resolveDocument=t.BaseResolver=t.makeDocumentFromString=t.makeRefId=t.YamlParseError=t.ResolveError=t.Source=void 0;const i=r(7411),o=r(57975),s=r(13873),a=r(71990),l=r(88209);class c{constructor(e,t,r){this.absoluteRef=e,this.body=t,this.mimeType=r}getAst(e){var t;return void 0===this._ast&&(this._ast=null!==(t=e(this.body,{filename:this.absoluteRef}))&&void 0!==t?t:void 0,this._ast&&0===this._ast.kind&&""===this._ast.value&&1!==this._ast.startPosition&&(this._ast.startPosition=1,this._ast.endPosition=1)),this._ast}getLines(){return void 0===this._lines&&(this._lines=this.body.split(/\r\n|[\n\r]/g)),this._lines}}t.Source=c;class u extends Error{constructor(e){super(e.message),this.originalError=e,Object.setPrototypeOf(this,u.prototype)}}t.ResolveError=u;const p=/\((\d+):(\d+)\)$/;class d extends Error{constructor(e,t){super(e.message.split("\n")[0]),this.originalError=e,this.source=t,Object.setPrototypeOf(this,d.prototype);const[,r,n]=this.message.match(p)||[];this.line=parseInt(r,10),this.col=parseInt(n,10)}}function f(e,t){return e+"::"+t}t.YamlParseError=d,t.makeRefId=f,t.makeDocumentFromString=function(e,t){const r=new c(t,e);try{return{source:r,parsed:(0,l.parseYaml)(e,{filename:t})}}catch(n){throw new d(n,r)}};function h(e,t){return{prev:e,node:t}}t.BaseResolver=class{constructor(e={http:{headers:[]}}){this.config=e,this.cache=new Map}getFiles(){return new Set(Array.from(this.cache.keys()))}resolveExternalRef(e,t){return(0,s.isAbsoluteUrl)(t)?t:e&&(0,s.isAbsoluteUrl)(e)?new URL(t,e).href:o.resolve(e?o.dirname(e):process.cwd(),t)}loadExternalRef(e){return n(this,void 0,void 0,function*(){try{if((0,s.isAbsoluteUrl)(e)){const{body:t,mimeType:r}=yield(0,l.readFileFromUrl)(e,this.config.http);return new c(e,t,r)}{if(i.lstatSync(e).isDirectory())throw new Error(`Expected a file but received a folder at ${e}`);const t=yield i.promises.readFile(e,"utf-8");return new c(e,t.replace(/\r\n/g,"\n"))}}catch(t){throw t.message=t.message.replace(", lstat",""),new u(t)}})}parseDocument(e,t=!1){var r;const n=e.absoluteRef.substr(e.absoluteRef.lastIndexOf("."));if(![".json",".json",".yml",".yaml"].includes(n)&&!(null===(r=e.mimeType)||void 0===r?void 0:r.match(/(json|yaml|openapi)/))&&!t)return{source:e,parsed:e.body};try{return{source:e,parsed:(0,l.parseYaml)(e.body,{filename:e.absoluteRef})}}catch(i){throw new d(i,e)}}resolveDocument(e,t,r=!1){return n(this,void 0,void 0,function*(){const n=this.resolveExternalRef(e,t),i=this.cache.get(n);if(i)return i;const o=this.loadExternalRef(n).then(e=>this.parseDocument(e,r));return this.cache.set(n,o),o})}};const m={name:"unknown",properties:{}},y={name:"scalar",properties:{}};t.resolveDocument=function(e){return n(this,void 0,void 0,function*(){const{rootDocument:t,externalRefResolver:r,rootType:i}=e,o=new Map,c=new Set,u=[];let p;!function e(t,i,p,d){const g=i.source.absoluteRef,b=new Map;function v(t,r,n){if("object"!=typeof t||null===t)return;const o=`${r.name}::${n}`;if(c.has(o))return;c.add(o);const[l,p]=Object.entries(t).find(([e])=>"$anchor"===e)||[];if(p&&b.set(`#${p}`,t),Array.isArray(t)){const e=r.items;if(void 0===e&&r!==m&&r!==a.SpecExtension)return;const i="function"==typeof e;for(let o=0;o{t.resolved&&e(t.node,t.document,t.nodePointer,r)});u.push(n)}}function x(e,t,i){return n(this,void 0,void 0,function*(){if(function(e,t){for(;e;){if(e.node===t)return!0;e=e.prev}return!1}(i.prev,t))throw new Error("Self-referencing circular pointer");if((0,s.isAnchor)(t.$ref)){yield(0,l.nextTick)();const r={resolved:!0,isRemote:!1,node:b.get(t.$ref),document:e,nodePointer:t.$ref},n=f(e.source.absoluteRef,t.$ref);return o.set(n,r),r}const{uri:n,pointer:a}=(0,s.parseRef)(t.$ref),c=null!==n;let u;try{u=c?yield r.resolveDocument(e.source.absoluteRef,n):e}catch(g){const r={resolved:!1,isRemote:c,document:void 0,error:g},n=f(e.source.absoluteRef,t.$ref);return o.set(n,r),r}let p={resolved:!0,document:u,isRemote:c,node:e.parsed,nodePointer:"#/"},d=u.parsed;const m=a;for(const e of m){if("object"!=typeof d){d=void 0;break}if(void 0!==d[e])d=d[e],p.nodePointer=(0,s.joinPointer)(p.nodePointer,(0,s.escapePointer)(e));else{if(!(0,s.isRef)(d)){d=void 0;break}if(p=yield x(u,d,h(i,d)),u=p.document||u,"object"!=typeof p.node){d=void 0;break}d=p.node[e],p.nodePointer=(0,s.joinPointer)(p.nodePointer,(0,s.escapePointer)(e))}}p.node=d,p.document=u;const y=f(e.source.absoluteRef,t.$ref);return p.document&&(0,s.isRef)(d)&&(p=yield x(p.document,d,h(i,d))),o.set(y,p),Object.assign({},p)})}v(t,d,g+p)}(t.parsed,t,"#/",i);do{p=yield Promise.all(u)}while(u.length!==p.length);return o})}},13416(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportUnresolvedRef=t.NoUnresolvedRefs=void 0;const n=r(62928);function i(e,t,r){var i;const o=e.error;o instanceof n.YamlParseError&&t({message:"Failed to parse: "+o.message,location:{source:o.source,pointer:void 0,start:{col:o.col,line:o.line}}});const s=null===(i=e.error)||void 0===i?void 0:i.message;t({location:r,message:"Can't resolve $ref"+(s?": "+s:"")})}t.NoUnresolvedRefs=()=>({ref:{leave(e,{report:t,location:r},n){void 0===n.node&&i(n,t,r)}},DiscriminatorMapping(e,{report:t,resolve:r,location:n}){for(const o of Object.keys(e)){const s=r({$ref:e[o]});if(void 0!==s.node)return;i(s,t,n.child(o))}}}),t.reportUnresolvedRef=i},30264(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncApi2Types=void 0;const n=r(71990),i=r(13873),o={properties:{},allowed:()=>["http","ws","kafka","anypointmq","amqp","amqp1","mqtt","mqtt5","nats","jms","sns","solace","sqs","stomp","redis","mercure","ibmmq","googlepubsub","pulsar"],additionalProperties:{type:"object"}},s={properties:{},allowed:()=>["http","ws","kafka","anypointmq","amqp","amqp1","mqtt","mqtt5","nats","jms","sns","solace","sqs","stomp","redis","mercure","ibmmq","googlepubsub","pulsar"],additionalProperties:{type:"object"}},a={properties:{},additionalProperties:(e,t)=>t.match(/^[A-Za-z0-9_\-]+$/)?"Server":void 0},l={properties:{},allowed:()=>["http","ws","kafka","anypointmq","amqp","amqp1","mqtt","mqtt5","nats","jms","sns","solace","sqs","stomp","redis","mercure","ibmmq","googlepubsub","pulsar"],additionalProperties:{type:"object"}},c={properties:{},allowed:()=>["http","ws","kafka","anypointmq","amqp","amqp1","mqtt","mqtt5","nats","jms","sns","solace","sqs","stomp","redis","mercure","ibmmq","googlepubsub","pulsar"],additionalProperties:{type:"object"}},u={properties:{$id:{type:"string"},id:{type:"string"},$schema:{type:"string"},definitions:"NamedSchemas",$defs:"NamedSchemas",$vocabulary:{type:"string"},externalDocs:"ExternalDocs",discriminator:"Discriminator",myArbitraryKeyword:{type:"boolean"},title:{type:"string"},multipleOf:{type:"number",minimum:0},maximum:{type:"number"},minimum:{type:"number"},exclusiveMaximum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{type:"integer",minimum:0},minLength:{type:"integer",minimum:0},pattern:{type:"string"},maxItems:{type:"integer",minimum:0},minItems:{type:"integer",minimum:0},uniqueItems:{type:"boolean"},maxProperties:{type:"integer",minimum:0},minProperties:{type:"integer",minimum:0},required:{type:"array",items:{type:"string"}},enum:{type:"array"},type:e=>Array.isArray(e)?{type:"array",items:{enum:["object","array","string","number","integer","boolean","null"]}}:{enum:["object","array","string","number","integer","boolean","null"]},allOf:(0,n.listOf)("Schema"),anyOf:(0,n.listOf)("Schema"),oneOf:(0,n.listOf)("Schema"),not:"Schema",if:"Schema",then:"Schema",else:"Schema",dependentSchemas:(0,n.listOf)("Schema"),prefixItems:(0,n.listOf)("Schema"),contains:"Schema",minContains:{type:"integer",minimum:0},maxContains:{type:"integer",minimum:0},patternProperties:{type:"object"},propertyNames:"Schema",unevaluatedItems:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",unevaluatedProperties:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",summary:{type:"string"},properties:"SchemaProperties",items:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",additionalProperties:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",description:{type:"string"},format:{type:"string"},contentEncoding:{type:"string"},contentMediaType:{type:"string"},default:null,readOnly:{type:"boolean"},writeOnly:{type:"boolean"},examples:{type:"array"},example:{isExample:!0},deprecated:{type:"boolean"},const:null,$comment:{type:"string"},dependencies:{type:"object"}}},p={properties:{},additionalProperties:e=>(0,i.isMappingRef)(e)?{type:"string",directResolveAs:"Schema"}:{type:"string"}},d={properties:{type:{enum:["userPassword","apiKey","X509","symmetricEncryption","asymmetricEncryption","httpApiKey","http","oauth2","openIdConnect","plain","scramSha256","scramSha512","gssapi"]},description:{type:"string"},name:{type:"string"},in:{type:"string",enum:["query","header","cookie","user","password"]},scheme:{type:"string"},bearerFormat:{type:"string"},flows:"SecuritySchemeFlows",openIdConnectUrl:{type:"string"}},required(e){switch(null==e?void 0:e.type){case"apiKey":return["type","in"];case"httpApiKey":return["type","name","in"];case"http":return["type","scheme"];case"oauth2":return["type","flows"];case"openIdConnect":return["type","openIdConnectUrl"];default:return["type"]}},allowed(e){switch(null==e?void 0:e.type){case"apiKey":return["type","in","description"];case"httpApiKey":return["type","name","in","description"];case"http":return["type","scheme","bearerFormat","description"];case"oauth2":return["type","flows","description"];case"openIdConnect":return["type","openIdConnectUrl","description"];default:return["type","description"]}},extensionsPrefix:"x-"},f={properties:{}};o.properties.http=f;const h={properties:{}};s.properties.http=h;const m={properties:{headers:"Schema",bindingVersion:{type:"string"}}};l.properties.http=m;const y={properties:{type:{type:"string"},method:{type:"string",enum:["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS","CONNECT","TRACE"]},headers:"Schema",bindingVersion:{type:"string"}}};c.properties.http=y;const g={properties:{method:{type:"string"},query:"Schema",headers:"Schema",bindingVersion:{type:"string"}}};o.properties.ws=g;const b={properties:{}};s.properties.ws=b;const v={properties:{}};l.properties.ws=v;const x={properties:{}};c.properties.ws=x;const w={properties:{topic:{type:"string"},partitions:{type:"integer"},replicas:{type:"integer"},topicConfiguration:"KafkaTopicConfiguration",bindingVersion:{type:"string"}}};o.properties.kafka=w;const S={properties:{}};s.properties.kafka=S;const k={properties:{key:"Schema",schemaIdLocation:{type:"string"},schemaIdPayloadEncoding:{type:"string"},schemaLookupStrategy:{type:"string"},bindingVersion:{type:"string"}}};l.properties.kafka=k;const O={properties:{groupId:"Schema",clientId:"Schema",bindingVersion:{type:"string"}}};c.properties.kafka=O;const _={properties:{destination:{type:"string"},destinationType:{type:"string"},bindingVersion:{type:"string"}}};o.properties.anypointmq=_;const E={properties:{}};s.properties.anypointmq=E;const A={properties:{headers:"Schema",bindingVersion:{type:"string"}}};l.properties.anypointmq=A;const j={properties:{}};c.properties.anypointmq=j;const P={properties:{}};o.properties.amqp=P;const $={properties:{}};s.properties.amqp=$;const C={properties:{contentEncoding:{type:"string"},messageType:{type:"string"},bindingVersion:{type:"string"}}};l.properties.amqp=C;const T={properties:{expiration:{type:"integer"},userId:{type:"string"},cc:{type:"array",items:{type:"string"}},priority:{type:"integer"},deliveryMode:{type:"integer"},mandatory:{type:"boolean"},bcc:{type:"array",items:{type:"string"}},replyTo:{type:"string"},timestamp:{type:"boolean"},ack:{type:"boolean"},bindingVersion:{type:"string"}}};c.properties.amqp=T;const I={properties:{}};o.properties.amqp1=I;const N={properties:{}};s.properties.amqp1=N;const R={properties:{}};l.properties.amqp1=R;const L={properties:{}};c.properties.amqp1=L;const D={properties:{qos:{type:"integer"},retain:{type:"boolean"},bindingVersion:{type:"string"}}};o.properties.mqtt=D;const M={properties:{clientId:{type:"string"},cleanSession:{type:"boolean"},lastWill:"MqttServerBindingLastWill",keepAlive:{type:"integer"},bindingVersion:{type:"string"}}};s.properties.mqtt=M;const z={properties:{bindingVersion:{type:"string"}}};l.properties.mqtt=z;const B={properties:{qos:{type:"integer"},retain:{type:"boolean"},bindingVersion:{type:"string"}}};c.properties.mqtt=B;const F={properties:{}};o.properties.mqtt5=F;const q={properties:{}};s.properties.mqtt5=q;const U={properties:{}};l.properties.mqtt5=U;const V={properties:{}};c.properties.mqtt5=V;const W={properties:{}};o.properties.nats=W;const H={properties:{}};s.properties.nats=H;const K={properties:{}};l.properties.nats=K;const Q={properties:{queue:{type:"string"},bindingVersion:{type:"string"}}};c.properties.nats=Q;const G={properties:{destination:{type:"string"},destinationType:{type:"string"},bindingVersion:{type:"string"}}};o.properties.jms=G;const Y={properties:{}};s.properties.jms=Y;const X={properties:{headers:"Schema",bindingVersion:{type:"string"}}};l.properties.jms=X;const J={properties:{headers:"Schema",bindingVersion:{type:"string"}}};c.properties.jms=J;const Z={properties:{}};o.properties.solace=Z;const ee={properties:{bindingVersion:{type:"string"},msgVpn:{type:"string"}}};s.properties.solace=ee;const te={properties:{}};l.properties.solace=te;const re={properties:{bindingVersion:{type:"string"},destinations:(0,n.listOf)("SolaceDestination")}};c.properties.solace=re;const ne={properties:{}};o.properties.stomp=ne;const ie={properties:{}};s.properties.stomp=ie;const oe={properties:{}};l.properties.stomp=oe;const se={properties:{}};c.properties.stomp=se;const ae={properties:{}};o.properties.redis=ae;const le={properties:{}};s.properties.redis=le;const ce={properties:{}};l.properties.redis=ce;const ue={properties:{}};c.properties.redis=ue;const pe={properties:{}};o.properties.mercure=pe;const de={properties:{}};s.properties.mercure=de;const fe={properties:{}};l.properties.mercure=fe;const he={properties:{}};c.properties.mercure=he,t.AsyncApi2Types={Root:{properties:{asyncapi:null,info:"Info",id:{type:"string"},servers:"ServerMap",channels:"ChannelMap",components:"Components",tags:"TagList",externalDocs:"ExternalDocs",defaultContentType:{type:"string"}},required:["asyncapi","channels","info"]},Tag:{properties:{name:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs"},required:["name"]},TagList:(0,n.listOf)("Tag"),ServerMap:a,ExternalDocs:{properties:{description:{type:"string"},url:{type:"string"}},required:["url"]},Server:{properties:{url:{type:"string"},protocol:{type:"string"},protocolVersion:{type:"string"},description:{type:"string"},variables:"ServerVariablesMap",security:"SecurityRequirementList",bindings:"ServerBindings",tags:"TagList"},required:["url","protocol"]},ServerVariable:{properties:{enum:{type:"array",items:{type:"string"}},default:{type:"string"},description:{type:"string"},examples:{type:"array",items:{type:"string"}}},required:[]},ServerVariablesMap:(0,n.mapOf)("ServerVariable"),SecurityRequirement:{properties:{},additionalProperties:{type:"array",items:{type:"string"}}},SecurityRequirementList:(0,n.listOf)("SecurityRequirement"),Info:{properties:{title:{type:"string"},version:{type:"string"},description:{type:"string"},termsOfService:{type:"string"},contact:"Contact",license:"License"},required:["title","version"]},Contact:{properties:{name:{type:"string"},url:{type:"string"},email:{type:"string"}}},License:{properties:{name:{type:"string"},url:{type:"string"}},required:["name"]},HttpServerBinding:h,HttpChannelBinding:f,HttpMessageBinding:m,HttpOperationBinding:y,WsServerBinding:b,WsChannelBinding:g,WsMessageBinding:v,WsOperationBinding:x,KafkaServerBinding:S,KafkaTopicConfiguration:{properties:{"cleanup.policy":{type:"array",items:{enum:["delete","compact"]}},"retention.ms":{type:"integer"},"retention.bytes":{type:"integer"},"delete.retention.ms":{type:"integer"},"max.message.bytes":{type:"integer"}}},KafkaChannelBinding:w,KafkaMessageBinding:k,KafkaOperationBinding:O,AnypointmqServerBinding:E,AnypointmqChannelBinding:_,AnypointmqMessageBinding:A,AnypointmqOperationBinding:j,AmqpServerBinding:$,AmqpChannelBinding:P,AmqpMessageBinding:C,AmqpOperationBinding:T,Amqp1ServerBinding:N,Amqp1ChannelBinding:I,Amqp1MessageBinding:R,Amqp1OperationBinding:L,MqttServerBindingLastWill:{properties:{topic:{type:"string"},qos:{type:"integer"},message:{type:"string"},retain:{type:"boolean"}}},MqttServerBinding:M,MqttChannelBinding:D,MqttMessageBinding:z,MqttOperationBinding:B,Mqtt5ServerBinding:q,Mqtt5ChannelBinding:F,Mqtt5MessageBinding:U,Mqtt5OperationBinding:V,NatsServerBinding:H,NatsChannelBinding:W,NatsMessageBinding:K,NatsOperationBinding:Q,JmsServerBinding:Y,JmsChannelBinding:G,JmsMessageBinding:X,JmsOperationBinding:J,SolaceServerBinding:ee,SolaceChannelBinding:Z,SolaceMessageBinding:te,SolaceDestination:{properties:{destinationType:{type:"string",enum:["queue","topic"]},deliveryMode:{type:"string",enum:["direct","persistent"]},"queue.name":{type:"string"},"queue.topicSubscriptions":{type:"array",items:{type:"string"}},"queue.accessType":{type:"string",enum:["exclusive","nonexclusive"]},"queue.maxMsgSpoolSize":{type:"string"},"queue.maxTtl":{type:"string"},"topic.topicSubscriptions":{type:"array",items:{type:"string"}}}},SolaceOperationBinding:re,StompServerBinding:ie,StompChannelBinding:ne,StompMessageBinding:oe,StompOperationBinding:se,RedisServerBinding:le,RedisChannelBinding:ae,RedisMessageBinding:ce,RedisOperationBinding:ue,MercureServerBinding:de,MercureChannelBinding:pe,MercureMessageBinding:fe,MercureOperationBinding:he,ServerBindings:s,ChannelBindings:o,ChannelMap:{properties:{},additionalProperties:"Channel"},Channel:{properties:{description:{type:"string"},subscribe:"Operation",publish:"Operation",parameters:"ParametersMap",bindings:"ChannelBindings",servers:{type:"array",items:{type:"string"}}}},Parameter:{properties:{description:{type:"string"},schema:"Schema",location:{type:"string"}}},ParametersMap:(0,n.mapOf)("Parameter"),Operation:{properties:{tags:"TagList",summary:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs",operationId:{type:"string"},security:"SecurityRequirementList",bindings:"OperationBindings",traits:"OperationTraitList",message:"Message"},required:[]},Schema:u,MessageExample:{properties:{payload:{isExample:!0},summary:{type:"string"},name:{type:"string"},headers:{type:"object"}}},SchemaProperties:{properties:{},additionalProperties:e=>"boolean"==typeof e?{type:"boolean"}:"Schema"},DiscriminatorMapping:p,Discriminator:{properties:{propertyName:{type:"string"},mapping:"DiscriminatorMapping"},required:["propertyName"]},Components:{properties:{messages:"NamedMessages",parameters:"NamedParameters",schemas:"NamedSchemas",correlationIds:"NamedCorrelationIds",messageTraits:"NamedMessageTraits",operationTraits:"NamedOperationTraits",streamHeaders:"NamedStreamHeaders",securitySchemes:"NamedSecuritySchemes",servers:"ServerMap",serverVariables:"ServerVariablesMap",channels:"ChannelMap",serverBindings:"ServerBindings",channelBindings:"ChannelBindings",operationBindings:"OperationBindings",messageBindings:"MessageBindings"}},NamedSchemas:(0,n.mapOf)("Schema"),NamedMessages:(0,n.mapOf)("Message"),NamedMessageTraits:(0,n.mapOf)("MessageTrait"),NamedOperationTraits:(0,n.mapOf)("OperationTrait"),NamedParameters:(0,n.mapOf)("Parameter"),NamedSecuritySchemes:(0,n.mapOf)("SecurityScheme"),NamedCorrelationIds:(0,n.mapOf)("CorrelationId"),NamedStreamHeaders:(0,n.mapOf)("StreamHeader"),ImplicitFlow:{properties:{refreshUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},authorizationUrl:{type:"string"}},required:["authorizationUrl","scopes"]},PasswordFlow:{properties:{refreshUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},tokenUrl:{type:"string"}},required:["tokenUrl","scopes"]},ClientCredentials:{properties:{refreshUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},tokenUrl:{type:"string"}},required:["tokenUrl","scopes"]},AuthorizationCode:{properties:{refreshUrl:{type:"string"},authorizationUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},tokenUrl:{type:"string"}},required:["authorizationUrl","tokenUrl","scopes"]},SecuritySchemeFlows:{properties:{implicit:"ImplicitFlow",password:"PasswordFlow",clientCredentials:"ClientCredentials",authorizationCode:"AuthorizationCode"}},SecurityScheme:d,Message:{properties:{messageId:{type:"string"},headers:"Schema",payload:"Schema",correlationId:"CorrelationId",schemaFormat:{type:"string"},contentType:{type:"string"},name:{type:"string"},title:{type:"string"},summary:{type:"string"},description:{type:"string"},tags:"TagList",externalDocs:"ExternalDocs",bindings:"MessageBindings",traits:"MessageTraitList"},additionalProperties:{}},MessageBindings:l,OperationBindings:c,OperationTrait:{properties:{tags:"TagList",summary:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs",operationId:{type:"string"},security:"SecurityRequirementList",bindings:"OperationBindings"},required:[]},OperationTraitList:(0,n.listOf)("OperationTrait"),MessageTrait:{properties:{messageId:{type:"string"},headers:"Schema",correlationId:"CorrelationId",schemaFormat:{type:"string"},contentType:{type:"string"},name:{type:"string"},title:{type:"string"},summary:{type:"string"},description:{type:"string"},tags:"TagList",externalDocs:"ExternalDocs",bindings:"MessageBindings"},additionalProperties:{}},MessageTraitList:(0,n.listOf)("MessageTrait"),CorrelationId:{properties:{description:{type:"string"},location:{type:"string"}},required:["location"]}}},71990(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNamedType=t.normalizeTypes=t.SpecExtension=t.mapOf=t.listOf=void 0,t.listOf=function(e){return{name:`${e}List`,properties:{},items:e}},t.mapOf=function(e){return{name:`${e}Map`,properties:{},additionalProperties:()=>e}},t.SpecExtension={name:"SpecExtension",properties:{},additionalProperties:{resolvable:!0}},t.normalizeTypes=function(e,r={}){const n={};for(const t of Object.keys(e))n[t]=Object.assign(Object.assign({},e[t]),{name:t});for(const t of Object.values(n))i(t);return n.SpecExtension=t.SpecExtension,n;function i(e){if(e.additionalProperties&&(e.additionalProperties=o(e.additionalProperties)),e.items&&(e.items=o(e.items)),e.properties){const t={};for(const[n,i]of Object.entries(e.properties))t[n]=o(i),r.doNotResolveExamples&&i&&i.isExample&&(t[n]=Object.assign(Object.assign({},i),{resolvable:!1}));e.properties=t}}function o(e){if("string"==typeof e){if(!n[e])throw new Error(`Unknown type name found: ${e}`);return n[e]}return"function"==typeof e?(t,r)=>o(e(t,r)):e&&e.name?(i(e=Object.assign({},e)),e):e&&e.directResolveAs?Object.assign(Object.assign({},e),{directResolveAs:o(e.directResolveAs)}):e}},t.isNamedType=function(e){return"string"==typeof(null==e?void 0:e.name)}},10058(e,t,r){"use strict";var n=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i"function"==typeof e))throw new Error("Unexpected oneOf inside oneOf.");return r=>{let n=e.findIndex(e=>s.validate(e,r));return-1===n&&(n=0),t[n]}}function l(e,t,r){var i;if(!t||"boolean"==typeof t)throw new Error(`Unexpected schema in ${e}.`);if(t instanceof Array)throw new Error(`Unexpected array schema in ${e}. Try using oneOf instead.`);if("null"===t.type)throw new Error(`Unexpected null schema type in ${e} schema.`);if(t.type instanceof Array)throw new Error(`Unexpected array schema type in ${e} schema. Try using oneOf instead.`);if("string"===t.type||"number"===t.type||"integer"===t.type||"boolean"===t.type){const{default:e,format:r}=t;return n(t,["default","format"])}if("object"===t.type&&!t.properties&&!t.oneOf){if(void 0===t.additionalProperties||!0===t.additionalProperties)return{type:"object"};if(!1===t.additionalProperties)return{type:"object",properties:{}}}if(t.allOf)throw new Error(`Unexpected allOf in ${e}.`);if(t.anyOf)throw new Error(`Unexpected anyOf in ${e}.`);if((0,o.isPlainObject)(t.properties)||(0,o.isPlainObject)(t.additionalProperties)||(0,o.isPlainObject)(t.items)&&((0,o.isPlainObject)(t.items.properties)||(0,o.isPlainObject)(t.items.additionalProperties)||t.items.oneOf))return function(e,t,r){if(!t||"boolean"==typeof t)throw new Error(`Unexpected schema in ${e}.`);if(t instanceof Array)throw new Error(`Unexpected array schema in ${e}. Try using oneOf instead.`);if("null"===t.type)throw new Error(`Unexpected null schema type in ${e} schema.`);if(t.type instanceof Array)throw new Error(`Unexpected array schema type in ${e} schema. Try using oneOf instead.`);const n={};for(const[o,c]of Object.entries(t.properties||{}))n[o]=l(e+"."+o,c,r);let i,s;(0,o.isPlainObject)(t.additionalProperties)&&(i=l(e+"_additionalProperties",t.additionalProperties,r));!0===t.additionalProperties&&(i={});(0,o.isPlainObject)(t.items)&&((0,o.isPlainObject)(t.items.properties)||(0,o.isPlainObject)(t.items.additionalProperties)||t.items.oneOf)&&(s=l(e+"_items",t.items,r));let a=t.required;t.oneOf&&t.oneOf.every(e=>!!e.required)&&(a=e=>{const r=t.oneOf.map(e=>[...t.required||[],...e.required]);let n=r.findIndex(t=>t.every(t=>void 0!==e[t]));return-1===n&&(n=0),r[n]});return r[e]={properties:n,additionalProperties:i,items:s,required:a},e}(e,t,r);if(t.oneOf){if(t.discriminator){const n=null===(i=t.discriminator)||void 0===i?void 0:i.propertyName;if(!n)throw new Error(`Unexpected discriminator without a propertyName in ${e}.`);const s=t.oneOf.map((t,i)=>{var o;if("boolean"==typeof t)throw new Error(`Unexpected boolean schema in ${e} at position ${i} in oneOf.`);const s=null===(o=null==t?void 0:t.properties)||void 0===o?void 0:o[n];if(!s||"boolean"==typeof s)throw new Error(`Unexpected property '${s}' schema in ${e} at position ${i} in oneOf.`);return l(s.const,t,r)});return(e,i)=>{if((0,o.isPlainObject)(e)){const t=e[n];if("string"==typeof t&&r[t])return t}return a(t.oneOf,s)(e,i)}}{const n=t.oneOf.map((t,n)=>l(e+"_"+n,t,r));return a(t.oneOf,n)}}return t}t.getNodeTypesFromJSONSchema=function(e,t){const r={};return l(e,t,r),r}},4409(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Oas2Types=void 0;const n=r(71990),i=/^[0-9][0-9Xx]{2}$/,o={properties:{},additionalProperties:(e,t)=>t.startsWith("/")?"PathItem":void 0},s={properties:{name:{type:"string"},in:{type:"string",enum:["query","header","path","formData","body"]},description:{type:"string"},required:{type:"boolean"},schema:"Schema",type:{type:"string",enum:["string","number","integer","boolean","array","file"]},format:{type:"string"},allowEmptyValue:{type:"boolean"},items:"ParameterItems",collectionFormat:{type:"string",enum:["csv","ssv","tsv","pipes","multi"]},default:null,maximum:{type:"integer"},exclusiveMaximum:{type:"boolean"},minimum:{type:"integer"},exclusiveMinimum:{type:"boolean"},maxLength:{type:"integer"},minLength:{type:"integer"},pattern:{type:"string"},maxItems:{type:"integer"},minItems:{type:"integer"},uniqueItems:{type:"boolean"},enum:{type:"array"},multipleOf:{type:"number"},"x-example":"Example","x-examples":"ExamplesMap"},required:e=>e&&e.in?"body"===e.in?["name","in","schema"]:"array"===e.type?["name","in","type","items"]:["name","in","type"]:["name","in"],extensionsPrefix:"x-"},a={properties:{type:{type:"string",enum:["string","number","integer","boolean","array"]},format:{type:"string"},items:"ParameterItems",collectionFormat:{type:"string",enum:["csv","ssv","tsv","pipes","multi"]},default:null,maximum:{type:"integer"},exclusiveMaximum:{type:"boolean"},minimum:{type:"integer"},exclusiveMinimum:{type:"boolean"},maxLength:{type:"integer"},minLength:{type:"integer"},pattern:{type:"string"},maxItems:{type:"integer"},minItems:{type:"integer"},uniqueItems:{type:"boolean"},enum:{type:"array"},multipleOf:{type:"number"}},required:e=>e&&"array"===e.type?["type","items"]:["type"],extensionsPrefix:"x-"},l={properties:{default:"Response"},additionalProperties:(e,t)=>i.test(t)?"Response":void 0},c={properties:{description:{type:"string"},schema:"Schema",headers:(0,n.mapOf)("Header"),examples:"Examples","x-summary":{type:"string"}},required:["description"],extensionsPrefix:"x-"},u={properties:{description:{type:"string"},type:{type:"string",enum:["string","number","integer","boolean","array"]},format:{type:"string"},items:"ParameterItems",collectionFormat:{type:"string",enum:["csv","ssv","tsv","pipes","multi"]},default:null,maximum:{type:"integer"},exclusiveMaximum:{type:"boolean"},minimum:{type:"integer"},exclusiveMinimum:{type:"boolean"},maxLength:{type:"integer"},minLength:{type:"integer"},pattern:{type:"string"},maxItems:{type:"integer"},minItems:{type:"integer"},uniqueItems:{type:"boolean"},enum:{type:"array"},multipleOf:{type:"number"}},required:e=>e&&"array"===e.type?["type","items"]:["type"],extensionsPrefix:"x-"},p={properties:{format:{type:"string"},title:{type:"string"},description:{type:"string"},default:null,multipleOf:{type:"number"},maximum:{type:"number"},minimum:{type:"number"},exclusiveMaximum:{type:"boolean"},exclusiveMinimum:{type:"boolean"},maxLength:{type:"number"},minLength:{type:"number"},pattern:{type:"string"},maxItems:{type:"number"},minItems:{type:"number"},uniqueItems:{type:"boolean"},maxProperties:{type:"number"},minProperties:{type:"number"},required:{type:"array",items:{type:"string"}},enum:{type:"array"},type:{type:"string",enum:["object","array","string","number","integer","boolean","null"]},items:e=>Array.isArray(e)?(0,n.listOf)("Schema"):"Schema",allOf:(0,n.listOf)("Schema"),properties:"SchemaProperties",additionalProperties:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",discriminator:{type:"string"},readOnly:{type:"boolean"},xml:"Xml",externalDocs:"ExternalDocs",example:{isExample:!0},"x-tags":{type:"array",items:{type:"string"}},"x-nullable":{type:"boolean"},"x-extendedDiscriminator":{type:"string"},"x-additionalPropertiesName":{type:"string"},"x-explicitMappingOnly":{type:"boolean"},"x-enumDescriptions":"EnumDescriptions"},extensionsPrefix:"x-"},d={properties:{type:{enum:["basic","apiKey","oauth2"]},description:{type:"string"},name:{type:"string"},in:{type:"string",enum:["query","header"]},flow:{enum:["implicit","password","application","accessCode"]},authorizationUrl:{type:"string"},tokenUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},"x-defaultClientId":{type:"string"}},required(e){switch(null==e?void 0:e.type){case"apiKey":return["type","name","in"];case"oauth2":switch(null==e?void 0:e.flow){case"implicit":return["type","flow","authorizationUrl","scopes"];case"accessCode":return["type","flow","authorizationUrl","tokenUrl","scopes"];case"application":case"password":return["type","flow","tokenUrl","scopes"];default:return["type","flow","scopes"]}default:return["type"]}},allowed(e){switch(null==e?void 0:e.type){case"basic":return["type","description"];case"apiKey":return["type","name","in","description"];case"oauth2":switch(null==e?void 0:e.flow){case"implicit":return["type","flow","authorizationUrl","description","scopes"];case"accessCode":return["type","flow","authorizationUrl","tokenUrl","description","scopes"];case"application":case"password":return["type","flow","tokenUrl","description","scopes"];default:return["type","flow","tokenUrl","authorizationUrl","description","scopes"]}default:return["type","description"]}},extensionsPrefix:"x-"};t.Oas2Types={Root:{properties:{swagger:{type:"string"},info:"Info",host:{type:"string"},basePath:{type:"string"},schemes:{type:"array",items:{type:"string"}},consumes:{type:"array",items:{type:"string"}},produces:{type:"array",items:{type:"string"}},paths:"Paths",definitions:"NamedSchemas",parameters:"NamedParameters",responses:"NamedResponses",securityDefinitions:"NamedSecuritySchemes",security:"SecurityRequirementList",tags:"TagList",externalDocs:"ExternalDocs","x-servers":"XServerList","x-tagGroups":"TagGroups","x-ignoredHeaderParameters":{type:"array",items:{type:"string"}}},required:["swagger","paths","info"],extensionsPrefix:"x-"},Tag:{properties:{name:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs","x-traitTag":{type:"boolean"},"x-displayName":{type:"string"}},required:["name"],extensionsPrefix:"x-"},TagList:(0,n.listOf)("Tag"),TagGroups:(0,n.listOf)("TagGroup"),TagGroup:{properties:{name:{type:"string"},tags:{type:"array",items:{type:"string"}}}},ExternalDocs:{properties:{description:{type:"string"},url:{type:"string"}},required:["url"],extensionsPrefix:"x-"},Example:{properties:{value:{isExample:!0},summary:{type:"string"},description:{type:"string"},externalValue:{type:"string"}},extensionsPrefix:"x-"},ExamplesMap:(0,n.mapOf)("Example"),EnumDescriptions:{properties:{},additionalProperties:{type:"string"}},SecurityRequirement:{properties:{},additionalProperties:{type:"array",items:{type:"string"}}},SecurityRequirementList:(0,n.listOf)("SecurityRequirement"),Info:{properties:{title:{type:"string"},description:{type:"string"},termsOfService:{type:"string"},contact:"Contact",license:"License",version:{type:"string"},"x-logo":"Logo"},required:["title","version"],extensionsPrefix:"x-"},Contact:{properties:{name:{type:"string"},url:{type:"string"},email:{type:"string"}},extensionsPrefix:"x-"},License:{properties:{name:{type:"string"},url:{type:"string"}},required:["name"],extensionsPrefix:"x-"},Logo:{properties:{url:{type:"string"},altText:{type:"string"},backgroundColor:{type:"string"},href:{type:"string"}},extensionsPrefix:"x-"},Paths:o,PathItem:{properties:{$ref:{type:"string"},parameters:"ParameterList",get:"Operation",put:"Operation",post:"Operation",delete:"Operation",options:"Operation",head:"Operation",patch:"Operation"},extensionsPrefix:"x-"},Parameter:s,ParameterItems:a,ParameterList:(0,n.listOf)("Parameter"),Operation:{properties:{tags:{type:"array",items:{type:"string"}},summary:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs",operationId:{type:"string"},consumes:{type:"array",items:{type:"string"}},produces:{type:"array",items:{type:"string"}},parameters:"ParameterList",responses:"Responses",schemes:{type:"array",items:{type:"string"}},deprecated:{type:"boolean"},security:"SecurityRequirementList","x-codeSamples":"XCodeSampleList","x-code-samples":"XCodeSampleList","x-hideTryItPanel":{type:"boolean"}},required:["responses"],extensionsPrefix:"x-"},Examples:{properties:{},additionalProperties:{isExample:!0}},Header:u,Responses:l,Response:c,Schema:p,Xml:{properties:{name:{type:"string"},namespace:{type:"string"},prefix:{type:"string"},attribute:{type:"boolean"},wrapped:{type:"boolean"}},extensionsPrefix:"x-"},SchemaProperties:{properties:{},additionalProperties:"Schema"},NamedSchemas:(0,n.mapOf)("Schema"),NamedResponses:(0,n.mapOf)("Response"),NamedParameters:(0,n.mapOf)("Parameter"),NamedSecuritySchemes:(0,n.mapOf)("SecurityScheme"),SecurityScheme:d,XCodeSample:{properties:{lang:{type:"string"},label:{type:"string"},source:{type:"string"}}},XCodeSampleList:(0,n.listOf)("XCodeSample"),XServerList:(0,n.listOf)("XServer"),XServer:{properties:{url:{type:"string"},description:{type:"string"}},required:["url"]}}},34154(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Oas3Types=void 0;const n=r(71990),i=r(13873),o=/^[0-9][0-9Xx]{2}$/,s={properties:{},additionalProperties:(e,t)=>t.startsWith("/")?"PathItem":void 0},a={properties:{default:"Response"},additionalProperties:(e,t)=>o.test(t)?"Response":void 0},l={properties:{externalDocs:"ExternalDocs",discriminator:"Discriminator",title:{type:"string"},multipleOf:{type:"number",minimum:0},maximum:{type:"number"},minimum:{type:"number"},exclusiveMaximum:{type:"boolean"},exclusiveMinimum:{type:"boolean"},maxLength:{type:"integer",minimum:0},minLength:{type:"integer",minimum:0},pattern:{type:"string"},maxItems:{type:"integer",minimum:0},minItems:{type:"integer",minimum:0},uniqueItems:{type:"boolean"},maxProperties:{type:"integer",minimum:0},minProperties:{type:"integer",minimum:0},required:{type:"array",items:{type:"string"}},enum:{type:"array"},type:{enum:["object","array","string","number","integer","boolean","null"]},allOf:(0,n.listOf)("Schema"),anyOf:(0,n.listOf)("Schema"),oneOf:(0,n.listOf)("Schema"),not:"Schema",properties:"SchemaProperties",items:e=>Array.isArray(e)?(0,n.listOf)("Schema"):"Schema",additionalItems:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",additionalProperties:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",description:{type:"string"},format:{type:"string"},default:null,nullable:{type:"boolean"},readOnly:{type:"boolean"},writeOnly:{type:"boolean"},xml:"Xml",example:{isExample:!0},deprecated:{type:"boolean"},"x-tags":{type:"array",items:{type:"string"}},"x-additionalPropertiesName":{type:"string"},"x-explicitMappingOnly":{type:"boolean"}},extensionsPrefix:"x-"},c={properties:{},additionalProperties:e=>(0,i.isMappingRef)(e)?{type:"string",directResolveAs:"Schema"}:{type:"string"}},u={properties:{type:{enum:["apiKey","http","oauth2","openIdConnect"]},description:{type:"string"},name:{type:"string"},in:{type:"string",enum:["query","header","cookie"]},scheme:{type:"string"},bearerFormat:{type:"string"},flows:"OAuth2Flows",openIdConnectUrl:{type:"string"},"x-defaultClientId":{type:"string"}},required(e){switch(null==e?void 0:e.type){case"apiKey":return["type","name","in"];case"http":return["type","scheme"];case"oauth2":return["type","flows"];case"openIdConnect":return["type","openIdConnectUrl"];default:return["type"]}},allowed(e){switch(null==e?void 0:e.type){case"apiKey":return["type","name","in","description"];case"http":return["type","scheme","bearerFormat","description"];case"oauth2":return["type","flows","description"];case"openIdConnect":return["type","openIdConnectUrl","description"];default:return["type","description"]}},extensionsPrefix:"x-"};t.Oas3Types={Root:{properties:{openapi:null,info:"Info",servers:"ServerList",security:"SecurityRequirementList",tags:"TagList",externalDocs:"ExternalDocs",paths:"Paths",components:"Components","x-webhooks":"WebhooksMap","x-tagGroups":"TagGroups","x-ignoredHeaderParameters":{type:"array",items:{type:"string"}}},required:["openapi","paths","info"],extensionsPrefix:"x-"},Tag:{properties:{name:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs","x-traitTag":{type:"boolean"},"x-displayName":{type:"string"}},required:["name"],extensionsPrefix:"x-"},TagList:(0,n.listOf)("Tag"),TagGroups:(0,n.listOf)("TagGroup"),TagGroup:{properties:{name:{type:"string"},tags:{type:"array",items:{type:"string"}}},extensionsPrefix:"x-"},ExternalDocs:{properties:{description:{type:"string"},url:{type:"string"}},required:["url"],extensionsPrefix:"x-"},Server:{properties:{url:{type:"string"},description:{type:"string"},variables:"ServerVariablesMap"},required:["url"],extensionsPrefix:"x-"},ServerList:(0,n.listOf)("Server"),ServerVariable:{properties:{enum:{type:"array",items:{type:"string"}},default:{type:"string"},description:{type:"string"}},required:["default"],extensionsPrefix:"x-"},ServerVariablesMap:(0,n.mapOf)("ServerVariable"),SecurityRequirement:{properties:{},additionalProperties:{type:"array",items:{type:"string"}}},SecurityRequirementList:(0,n.listOf)("SecurityRequirement"),Info:{properties:{title:{type:"string"},version:{type:"string"},description:{type:"string"},termsOfService:{type:"string"},contact:"Contact",license:"License","x-logo":"Logo"},required:["title","version"],extensionsPrefix:"x-"},Contact:{properties:{name:{type:"string"},url:{type:"string"},email:{type:"string"}},extensionsPrefix:"x-"},License:{properties:{name:{type:"string"},url:{type:"string"}},required:["name"],extensionsPrefix:"x-"},Paths:s,PathItem:{properties:{$ref:{type:"string"},servers:"ServerList",parameters:"ParameterList",summary:{type:"string"},description:{type:"string"},get:"Operation",put:"Operation",post:"Operation",delete:"Operation",options:"Operation",head:"Operation",patch:"Operation",trace:"Operation"},extensionsPrefix:"x-"},Parameter:{properties:{name:{type:"string"},in:{enum:["query","header","path","cookie"]},description:{type:"string"},required:{type:"boolean"},deprecated:{type:"boolean"},allowEmptyValue:{type:"boolean"},style:{enum:["form","simple","label","matrix","spaceDelimited","pipeDelimited","deepObject"]},explode:{type:"boolean"},allowReserved:{type:"boolean"},schema:"Schema",example:{isExample:!0},examples:"ExamplesMap",content:"MediaTypesMap"},required:["name","in"],requiredOneOf:["schema","content"],extensionsPrefix:"x-"},ParameterList:(0,n.listOf)("Parameter"),Operation:{properties:{tags:{type:"array",items:{type:"string"}},summary:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs",operationId:{type:"string"},parameters:"ParameterList",security:"SecurityRequirementList",servers:"ServerList",requestBody:"RequestBody",responses:"Responses",deprecated:{type:"boolean"},callbacks:"CallbacksMap","x-codeSamples":"XCodeSampleList","x-code-samples":"XCodeSampleList","x-hideTryItPanel":{type:"boolean"}},required:["responses"],extensionsPrefix:"x-"},Callback:(0,n.mapOf)("PathItem"),CallbacksMap:(0,n.mapOf)("Callback"),RequestBody:{properties:{description:{type:"string"},required:{type:"boolean"},content:"MediaTypesMap"},required:["content"],extensionsPrefix:"x-"},MediaTypesMap:{properties:{},additionalProperties:"MediaType"},MediaType:{properties:{schema:"Schema",example:{isExample:!0},examples:"ExamplesMap",encoding:"EncodingMap"},extensionsPrefix:"x-"},Example:{properties:{value:{isExample:!0},summary:{type:"string"},description:{type:"string"},externalValue:{type:"string"}},extensionsPrefix:"x-"},ExamplesMap:(0,n.mapOf)("Example"),Encoding:{properties:{contentType:{type:"string"},headers:"HeadersMap",style:{enum:["form","simple","label","matrix","spaceDelimited","pipeDelimited","deepObject"]},explode:{type:"boolean"},allowReserved:{type:"boolean"}},extensionsPrefix:"x-"},EncodingMap:(0,n.mapOf)("Encoding"),EnumDescriptions:{properties:{},additionalProperties:{type:"string"}},Header:{properties:{description:{type:"string"},required:{type:"boolean"},deprecated:{type:"boolean"},allowEmptyValue:{type:"boolean"},style:{enum:["form","simple","label","matrix","spaceDelimited","pipeDelimited","deepObject"]},explode:{type:"boolean"},allowReserved:{type:"boolean"},schema:"Schema",example:{isExample:!0},examples:"ExamplesMap",content:"MediaTypesMap"},requiredOneOf:["schema","content"],extensionsPrefix:"x-"},HeadersMap:(0,n.mapOf)("Header"),Responses:a,Response:{properties:{description:{type:"string"},headers:"HeadersMap",content:"MediaTypesMap",links:"LinksMap","x-summary":{type:"string"}},required:["description"],extensionsPrefix:"x-"},Link:{properties:{operationRef:{type:"string"},operationId:{type:"string"},parameters:null,requestBody:null,description:{type:"string"},server:"Server"},extensionsPrefix:"x-"},Logo:{properties:{url:{type:"string"},altText:{type:"string"},backgroundColor:{type:"string"},href:{type:"string"}}},Schema:l,Xml:{properties:{name:{type:"string"},namespace:{type:"string"},prefix:{type:"string"},attribute:{type:"boolean"},wrapped:{type:"boolean"}},extensionsPrefix:"x-"},SchemaProperties:{properties:{},additionalProperties:"Schema"},DiscriminatorMapping:c,Discriminator:{properties:{propertyName:{type:"string"},mapping:"DiscriminatorMapping"},required:["propertyName"],extensionsPrefix:"x-"},Components:{properties:{parameters:"NamedParameters",schemas:"NamedSchemas",responses:"NamedResponses",examples:"NamedExamples",requestBodies:"NamedRequestBodies",headers:"NamedHeaders",securitySchemes:"NamedSecuritySchemes",links:"NamedLinks",callbacks:"NamedCallbacks"},extensionsPrefix:"x-"},LinksMap:(0,n.mapOf)("Link"),NamedSchemas:(0,n.mapOf)("Schema"),NamedResponses:(0,n.mapOf)("Response"),NamedParameters:(0,n.mapOf)("Parameter"),NamedExamples:(0,n.mapOf)("Example"),NamedRequestBodies:(0,n.mapOf)("RequestBody"),NamedHeaders:(0,n.mapOf)("Header"),NamedSecuritySchemes:(0,n.mapOf)("SecurityScheme"),NamedLinks:(0,n.mapOf)("Link"),NamedCallbacks:(0,n.mapOf)("Callback"),ImplicitFlow:{properties:{refreshUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},authorizationUrl:{type:"string"}},required:["authorizationUrl","scopes"],extensionsPrefix:"x-"},PasswordFlow:{properties:{refreshUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},tokenUrl:{type:"string"}},required:["tokenUrl","scopes"],extensionsPrefix:"x-"},ClientCredentials:{properties:{refreshUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},tokenUrl:{type:"string"}},required:["tokenUrl","scopes"],extensionsPrefix:"x-"},AuthorizationCode:{properties:{refreshUrl:{type:"string"},authorizationUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},tokenUrl:{type:"string"},"x-usePkce":e=>"boolean"==typeof e?{type:"boolean"}:"XUsePkce"},required:["authorizationUrl","tokenUrl","scopes"],extensionsPrefix:"x-"},OAuth2Flows:{properties:{implicit:"ImplicitFlow",password:"PasswordFlow",clientCredentials:"ClientCredentials",authorizationCode:"AuthorizationCode"},extensionsPrefix:"x-"},SecurityScheme:u,XCodeSample:{properties:{lang:{type:"string"},label:{type:"string"},source:{type:"string"}}},XCodeSampleList:(0,n.listOf)("XCodeSample"),XUsePkce:{properties:{disableManualConfiguration:{type:"boolean"},hideClientSecretInput:{type:"boolean"}}},WebhooksMap:{properties:{},additionalProperties:()=>"PathItem"}}},62082(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Oas3_1Types=void 0;const n=r(71990),i=r(34154),o={properties:{$id:{type:"string"},$anchor:{type:"string"},id:{type:"string"},$schema:{type:"string"},definitions:"NamedSchemas",$defs:"NamedSchemas",$vocabulary:{type:"string"},externalDocs:"ExternalDocs",discriminator:"Discriminator",title:{type:"string"},multipleOf:{type:"number",minimum:0},maximum:{type:"number"},minimum:{type:"number"},exclusiveMaximum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{type:"integer",minimum:0},minLength:{type:"integer",minimum:0},pattern:{type:"string"},maxItems:{type:"integer",minimum:0},minItems:{type:"integer",minimum:0},uniqueItems:{type:"boolean"},maxProperties:{type:"integer",minimum:0},minProperties:{type:"integer",minimum:0},required:{type:"array",items:{type:"string"}},enum:{type:"array"},type:e=>Array.isArray(e)?{type:"array",items:{enum:["object","array","string","number","integer","boolean","null"]}}:{enum:["object","array","string","number","integer","boolean","null"]},allOf:(0,n.listOf)("Schema"),anyOf:(0,n.listOf)("Schema"),oneOf:(0,n.listOf)("Schema"),not:"Schema",if:"Schema",then:"Schema",else:"Schema",dependentSchemas:(0,n.listOf)("Schema"),prefixItems:(0,n.listOf)("Schema"),contains:"Schema",minContains:{type:"integer",minimum:0},maxContains:{type:"integer",minimum:0},patternProperties:{type:"object"},propertyNames:"Schema",unevaluatedItems:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",unevaluatedProperties:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",summary:{type:"string"},properties:"SchemaProperties",items:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",additionalProperties:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",description:{type:"string"},format:{type:"string"},contentEncoding:{type:"string"},contentMediaType:{type:"string"},default:null,readOnly:{type:"boolean"},writeOnly:{type:"boolean"},xml:"Xml",examples:{type:"array"},example:{isExample:!0},deprecated:{type:"boolean"},const:null,$comment:{type:"string"},"x-tags":{type:"array",items:{type:"string"}}},extensionsPrefix:"x-"},s={properties:{type:{enum:["apiKey","http","oauth2","openIdConnect","mutualTLS"]},description:{type:"string"},name:{type:"string"},in:{type:"string",enum:["query","header","cookie"]},scheme:{type:"string"},bearerFormat:{type:"string"},flows:"OAuth2Flows",openIdConnectUrl:{type:"string"}},required(e){switch(null==e?void 0:e.type){case"apiKey":return["type","name","in"];case"http":return["type","scheme"];case"oauth2":return["type","flows"];case"openIdConnect":return["type","openIdConnectUrl"];default:return["type"]}},allowed(e){switch(null==e?void 0:e.type){case"apiKey":return["type","name","in","description"];case"http":return["type","scheme","bearerFormat","description"];case"oauth2":switch(null==e?void 0:e.flows){case"implicit":return["type","flows","authorizationUrl","refreshUrl","description","scopes"];case"password":case"clientCredentials":return["type","flows","tokenUrl","refreshUrl","description","scopes"];default:return["type","flows","authorizationUrl","refreshUrl","tokenUrl","description","scopes"]}case"openIdConnect":return["type","openIdConnectUrl","description"];default:return["type","description"]}},extensionsPrefix:"x-"};t.Oas3_1Types=Object.assign(Object.assign({},i.Oas3Types),{Info:{properties:{title:{type:"string"},version:{type:"string"},description:{type:"string"},termsOfService:{type:"string"},summary:{type:"string"},contact:"Contact",license:"License","x-logo":"Logo"},required:["title","version"],extensionsPrefix:"x-"},Root:{properties:{openapi:null,info:"Info",servers:"ServerList",security:"SecurityRequirementList",tags:"TagList",externalDocs:"ExternalDocs",paths:"Paths",webhooks:"WebhooksMap",components:"Components",jsonSchemaDialect:{type:"string"}},required:["openapi","info"],requiredOneOf:["paths","components","webhooks"],extensionsPrefix:"x-"},Schema:o,SchemaProperties:{properties:{},additionalProperties:e=>"boolean"==typeof e?{type:"boolean"}:"Schema"},License:{properties:{name:{type:"string"},url:{type:"string"},identifier:{type:"string"}},required:["name"],extensionsPrefix:"x-"},Components:{properties:{parameters:"NamedParameters",schemas:"NamedSchemas",responses:"NamedResponses",examples:"NamedExamples",requestBodies:"NamedRequestBodies",headers:"NamedHeaders",securitySchemes:"NamedSecuritySchemes",links:"NamedLinks",callbacks:"NamedCallbacks",pathItems:"NamedPathItems"},extensionsPrefix:"x-"},NamedPathItems:(0,n.mapOf)("PathItem"),SecurityScheme:s,Operation:{properties:{tags:{type:"array",items:{type:"string"}},summary:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs",operationId:{type:"string"},parameters:"ParameterList",security:"SecurityRequirementList",servers:"ServerList",requestBody:"RequestBody",responses:"Responses",deprecated:{type:"boolean"},callbacks:"CallbacksMap","x-codeSamples":"XCodeSampleList","x-code-samples":"XCodeSampleList","x-hideTryItPanel":{type:"boolean"}},extensionsPrefix:"x-"}})},30750(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigTypes=t.createConfigTypes=void 0;const n=r(70884),i=r(71990),o=r(88209),s=r(10058),a=["spec","info-contact","operation-operationId","tag-description","tags-alphabetical","info-license-url","info-license","no-ambiguous-paths","no-enum-type-mismatch","no-http-verbs-in-paths","no-identical-paths","no-invalid-parameter-examples","no-invalid-schema-examples","no-path-trailing-slash","operation-2xx-response","operation-4xx-response","operation-description","operation-operationId-unique","operation-operationId-url-safe","operation-parameters-unique","operation-singular-tag","operation-summary","operation-tag-defined","parameter-description","path-declaration-must-exist","path-excludes-patterns","path-http-verbs-order","path-not-include-query","path-params-defined","path-parameters-defined","path-segment-plural","paths-kebab-case","required-string-property-missing-min-length","response-contains-header","scalar-property-missing-example","security-defined","spec-strict-refs","no-unresolved-refs","no-required-schema-properties-undefined","boolean-parameter-prefixes","request-mime-type","response-contains-property","response-mime-type","boolean-parameter-prefixes","component-name-unique","no-empty-servers","no-example-value-and-externalValue","no-invalid-media-type-examples","no-server-example.com","no-server-trailing-slash","no-server-variables-empty-enum","no-undefined-server-variable","no-unused-components","operation-4xx-problem-details-rfc7807","request-mime-type","response-contains-property","response-mime-type","spec-components-invalid-map-name","array-parameter-serialization","channels-kebab-case","no-channel-trailing-slash"],l={properties:{extends:{type:"array",items:{type:"string"}},rules:"Rules",oas2Rules:"Rules",oas3_0Rules:"Rules",oas3_1Rules:"Rules",async2Rules:"Rules",preprocessors:{type:"object"},oas2Preprocessors:{type:"object"},oas3_0Preprocessors:{type:"object"},oas3_1Preprocessors:{type:"object"},async2Preprocessors:{type:"object"},decorators:{type:"object"},oas2Decorators:{type:"object"},oas3_0Decorators:{type:"object"},oas3_1Decorators:{type:"object"},async2Decorators:{type:"object"}}},c=e=>Object.assign(Object.assign({},e.rootRedoclyConfigSchema),{properties:Object.assign(Object.assign(Object.assign({},e.rootRedoclyConfigSchema.properties),l.properties),{apis:"ConfigApis","features.openapi":"ConfigReferenceDocs","features.mockServer":"ConfigMockServer",organization:{type:"string"},region:{enum:["us","eu"]},telemetry:{enum:["on","off"]},resolve:{properties:{http:"ConfigHTTP",doNotResolveExamples:{type:"boolean"}}},files:{type:"array",items:{type:"string"}}})}),u=e=>{var t;return Object.assign(Object.assign({},e["rootRedoclyConfigSchema.apis_additionalProperties"]),{properties:Object.assign(Object.assign(Object.assign(Object.assign({},null===(t=e["rootRedoclyConfigSchema.apis_additionalProperties"])||void 0===t?void 0:t.properties),{labels:{type:"array",items:{type:"string"}}}),l.properties),{"features.openapi":"ConfigReferenceDocs","features.mockServer":"ConfigMockServer",files:{type:"array",items:{type:"string"}}})})},p={properties:{},additionalProperties:(e,t)=>t.startsWith("rule/")||t.startsWith("assert/")?"Assert":a.includes(t)||(0,o.isCustomRuleId)(t)?"string"==typeof e?{enum:["error","warn","off"]}:"ObjectRule":"metadata-schema"===t||"custom-fields-schema"===t?"Schema":void 0},d={properties:{type:{enum:[...new Set(["any","Root","Tag","TagList","ExternalDocs","SecurityRequirement","SecurityRequirementList","Info","Contact","License","Paths","PathItem","Parameter","ParameterList","ParameterItems","Operation","Example","ExamplesMap","Examples","Header","Responses","Response","Schema","Xml","SchemaProperties","NamedSchemas","NamedResponses","NamedParameters","NamedSecuritySchemes","SecurityScheme","TagGroup","TagGroups","EnumDescriptions","Logo","XCodeSample","XCodeSampleList","XServer","XServerList","Root","Tag","TagList","ExternalDocs","Server","ServerList","ServerVariable","ServerVariablesMap","SecurityRequirement","SecurityRequirementList","Info","Contact","License","Paths","PathItem","Parameter","ParameterList","Operation","Callback","CallbacksMap","RequestBody","MediaTypesMap","MediaType","Example","ExamplesMap","Encoding","EncodingMap","Header","HeadersMap","Responses","Response","Link","LinksMap","Schema","Xml","SchemaProperties","DiscriminatorMapping","Discriminator","Components","NamedSchemas","NamedResponses","NamedParameters","NamedExamples","NamedRequestBodies","NamedHeaders","NamedSecuritySchemes","NamedLinks","NamedCallbacks","ImplicitFlow","PasswordFlow","ClientCredentials","AuthorizationCode","OAuth2Flows","SecurityScheme","TagGroup","TagGroups","EnumDescriptions","Logo","XCodeSample","XCodeSampleList","XUsePkce","WebhooksMap","Root","Schema","SchemaProperties","Info","License","Components","NamedPathItems","SecurityScheme","Operation","Message","SpecExtension"])]},property:e=>Array.isArray(e)?{type:"array",items:{type:"string"}}:null===e?null:{type:"string"},filterInParentKeys:{type:"array",items:{type:"string"}},filterOutParentKeys:{type:"array",items:{type:"string"}},matchParentKeys:{type:"string"}},required:["type"]},f={properties:{subject:"AssertionDefinitionSubject",assertions:"AssertionDefinitionAssertions",where:(0,i.listOf)("AssertDefinition"),message:{type:"string"},suggest:{type:"array",items:{type:"string"}},severity:{enum:["error","warn","off"]}},required:["subject","assertions"]},h={properties:{beforeInfo:(0,i.listOf)("CommonConfigSidebarLinks"),end:(0,i.listOf)("CommonConfigSidebarLinks")}},m={properties:{main:{type:"string"},light:{type:"string"},dark:{type:"string"},contrastText:{type:"string"}}},y={properties:(0,o.pickObjectProps)(m.properties,["light","dark"])},g={properties:(0,o.omitObjectProps)(m.properties,["dark"])},b={properties:{fontFamily:{type:"string"},fontSize:{type:"string"},fontWeight:{type:"string"},lineHeight:{type:"string"}}},v={properties:Object.assign(Object.assign({},(0,o.omitObjectProps)(b.properties,["fontSize","lineHeight"])),{borderRadius:{type:"string"},hoverStyle:{type:"string"},boxShadow:{type:"string"},hoverBoxShadow:{type:"string"},sizes:"Sizes"})},x={properties:(0,o.pickObjectProps)(b.properties,["fontSize","lineHeight"])},w={properties:Object.assign(Object.assign({},(0,o.omitObjectProps)(b.properties,["fontSize","lineHeight"])),{borderRadius:{type:"string"},color:{type:"string"},sizes:"BadgeSizes"})},S={properties:{subItemsColor:{type:"string"},textTransform:{type:"string"},fontWeight:{type:"string"}}},k={properties:(0,o.pickObjectProps)(S.properties,["textTransform"])},O={properties:Object.assign(Object.assign({},(0,o.omitObjectProps)(b.properties,["fontWeight","lineHeight"])),{activeBgColor:{type:"string"},activeTextColor:{type:"string"},backgroundColor:{type:"string"},borderRadius:{type:"string"},breakPath:{type:"boolean"},caretColor:{type:"string"},caretSize:{type:"string"},groupItems:"GroupItemsConfig",level1items:"Level1Items",rightLineColor:{type:"string"},separatorLabelColor:{type:"string"},showAtBreakpoint:{type:"string"},spacing:"SpacingConfig",textColor:{type:"string"},width:{type:"string"}})},_={properties:Object.assign(Object.assign({},b.properties),{color:{type:"string"},transform:{type:"string"}})},E={properties:Object.assign(Object.assign({},b.properties),{backgroundColor:{type:"string"},color:{type:"string"},wordBreak:{enum:["break-all","break-word","keep-all","normal","revert","unset","inherit","initial"]},wrap:{type:"boolean"}})},A={properties:(0,o.omitObjectProps)(b.properties,["fontSize"])},j={properties:Object.assign(Object.assign({code:"CodeConfig",fieldName:"FontConfig"},(0,o.pickObjectProps)(b.properties,["fontSize","fontFamily"])),{fontWeightBold:{type:"string"},fontWeightLight:{type:"string"},fontWeightRegular:{type:"string"},heading1:"Heading",heading2:"Heading",heading3:"Heading",headings:"HeadingsConfig",lineHeight:{type:"string"},links:"LinksConfig",optimizeSpeed:{type:"boolean"},rightPanelHeading:"Heading",smoothing:{enum:["auto","none","antialiased","subpixel-antialiased","grayscale"]}})},P={properties:Object.assign({color:{type:"string"}},(0,o.omitObjectProps)(b.properties,["fontWeight"]))},$={properties:{skipOptionalParameters:{type:"boolean"},languages:(0,i.listOf)("ConfigLanguage")},required:["languages"]};t.createConfigTypes=e=>{const t=(0,s.getNodeTypesFromJSONSchema)("rootRedoclyConfigSchema",e);return Object.assign(Object.assign(Object.assign({},C),{ConfigRoot:c(t),ConfigApisProperties:u(t)}),t)};const C={Assert:f,ConfigApis:{properties:{},additionalProperties:"ConfigApisProperties"},ConfigStyleguide:l,ConfigReferenceDocs:{properties:{theme:"ConfigTheme",corsProxyUrl:{type:"string"},ctrlFHijack:{type:"boolean"},defaultSampleLanguage:{type:"string"},disableDeepLinks:{type:"boolean"},disableSearch:{type:"boolean"},disableSidebar:{type:"boolean"},downloadDefinitionUrl:{type:"string"},expandDefaultServerVariables:{type:"boolean"},enumSkipQuotes:{type:"boolean"},expandDefaultRequest:{type:"boolean"},expandDefaultResponse:{type:"boolean"},expandResponses:{type:"string"},expandSingleSchemaField:{type:"boolean"},generateCodeSamples:"GenerateCodeSamples",generatedPayloadSamplesMaxDepth:{type:"number"},hideDownloadButton:{type:"boolean"},hideHostname:{type:"boolean"},hideInfoSection:{type:"boolean"},hideLoading:{type:"boolean"},hideLogo:{type:"boolean"},hideRequestPayloadSample:{type:"boolean"},hideRightPanel:{type:"boolean"},hideSchemaPattern:{type:"boolean"},hideSchemaTitles:{type:"boolean"},hideSingleRequestSampleTab:{type:"boolean"},hideSecuritySection:{type:"boolean"},hideTryItPanel:{type:"boolean"},hideFab:{type:"boolean"},hideOneOfDescription:{type:"boolean"},htmlTemplate:{type:"string"},jsonSampleExpandLevel:e=>"number"==typeof e?{type:"number",minimum:1}:{type:"string"},labels:"ConfigLabels",layout:{enum:["stacked","three-panel"]},maxDisplayedEnumValues:{type:"number"},menuToggle:{type:"boolean"},nativeScrollbars:{type:"boolean"},noAutoAuth:{type:"boolean"},oAuth2RedirectURI:{type:"string"},onDeepLinkClick:{type:"object"},onlyRequiredInSamples:{type:"boolean"},pagination:{enum:["none","section","item"]},pathInMiddlePanel:{type:"boolean"},payloadSampleIdx:{type:"number",minimum:0},requestInterceptor:{type:"object"},requiredPropsFirst:{type:"boolean"},routingBasePath:{type:"string"},routingStrategy:{type:"string"},samplesTabsMaxCount:{type:"number"},schemaExpansionLevel:e=>"number"==typeof e?{type:"number",minimum:0}:{type:"string"},schemaDefinitionsTagName:{type:"string"},minCharacterLengthToInitSearch:{type:"number",minimum:1},maxResponseHeadersToShowInTryIt:{type:"number",minimum:0},scrollYOffset:e=>"number"==typeof e?{type:"number"}:{type:"string"},searchAutoExpand:{type:"boolean"},searchFieldLevelBoost:{type:"number",minimum:0},searchMaxDepth:{type:"number",minimum:1},searchMode:{enum:["default","path-only"]},searchOperationTitleBoost:{type:"number"},searchTagTitleBoost:{type:"number"},sendXUserAgentInTryIt:{type:"boolean"},showChangeLayoutButton:{type:"boolean"},showConsole:{type:"boolean"},showExtensions:e=>"boolean"==typeof e?{type:"boolean"}:{type:"array",items:{type:"string"}},showNextButton:{type:"boolean"},showRightPanelToggle:{type:"boolean"},showSecuritySchemeType:{type:"boolean"},showWebhookVerb:{type:"boolean"},showObjectSchemaExamples:{type:"boolean"},disableTryItRequestUrlEncoding:{type:"boolean"},sidebarLinks:"ConfigSidebarLinks",sideNavStyle:{enum:["summary-only","path-first","id-only"]},simpleOneOfTypeLabel:{type:"boolean"},sortEnumValuesAlphabetically:{type:"boolean"},sortOperationsAlphabetically:{type:"boolean"},sortPropsAlphabetically:{type:"boolean"},sortTagsAlphabetically:{type:"boolean"},suppressWarnings:{type:"boolean"},unstable_externalDescription:{type:"boolean"},unstable_ignoreMimeParameters:{type:"boolean"},untrustedDefinition:{type:"boolean"},mockServer:{properties:{url:{type:"string"},position:{enum:["first","last","replace","off"]},description:{type:"string"}}},showAccessMode:{type:"boolean"},preserveOriginalExtensionsName:{type:"boolean"},markdownHeadingsAnchorLevel:{type:"number"}},additionalProperties:{}},ConfigMockServer:{properties:{strictExamples:{type:"boolean"},errorIfForcedExampleNotFound:{type:"boolean"}}},ConfigHTTP:{properties:{headers:{type:"array",items:{type:"string"}}}},ConfigLanguage:{properties:{label:{type:"string"},lang:{enum:["curl","C#","Go","Java","Java8+Apache","JavaScript","Node.js","PHP","Python","R","Ruby"]}},required:["lang"]},ConfigLabels:{properties:{enum:{type:"string"},enumSingleValue:{type:"string"},enumArray:{type:"string"},default:{type:"string"},deprecated:{type:"string"},example:{type:"string"},examples:{type:"string"},nullable:{type:"string"},recursive:{type:"string"},arrayOf:{type:"string"},webhook:{type:"string"},authorizations:{type:"string"},tryItAuthBasicUsername:{type:"string"},tryItAuthBasicPassword:{type:"string"}}},ConfigSidebarLinks:h,CommonConfigSidebarLinks:{properties:{label:{type:"string"},link:{type:"string"},target:{type:"string"}},required:["label","link"]},ConfigTheme:{properties:{breakpoints:"Breakpoints",codeBlock:"CodeBlock",colors:"ThemeColors",components:"ConfigThemeComponents",layout:"Layout",logo:"ConfigThemeLogo",fab:"Fab",overrides:"Overrides",rightPanel:"RightPanel",schema:"ConfigThemeSchema",shape:"Shape",sidebar:"Sidebar",spacing:"ThemeSpacing",typography:"Typography",links:{properties:{color:{type:"string"}}},codeSample:{properties:{backgroundColor:{type:"string"}}}}},AssertDefinition:{properties:{subject:"AssertionDefinitionSubject",assertions:"AssertionDefinitionAssertions"},required:["subject","assertions"]},ThemeColors:{properties:{accent:"CommonThemeColors",border:"BorderThemeColors",error:"CommonThemeColors",http:"HttpColors",primary:"CommonThemeColors",responses:"ResponseColors",secondary:"SecondaryColors",success:"CommonThemeColors",text:"TextThemeColors",tonalOffset:{type:"number"},warning:"CommonThemeColors"}},CommonThemeColors:m,BorderThemeColors:y,HttpColors:{properties:{basic:{type:"string"},delete:{type:"string"},get:{type:"string"},head:{type:"string"},link:{type:"string"},options:{type:"string"},patch:{type:"string"},post:{type:"string"},put:{type:"string"}}},ResponseColors:{properties:{error:"CommonColorProps",info:"CommonColorProps",redirect:"CommonColorProps",success:"CommonColorProps"}},SecondaryColors:g,TextThemeColors:{properties:{primary:{type:"string"},secondary:{type:"string"},light:{type:"string"}}},Sizes:{properties:{small:"SizeProps",medium:"SizeProps",large:"SizeProps",xlarge:"SizeProps"}},ButtonsConfig:v,CommonColorProps:{properties:{backgroundColor:{type:"string"},borderColor:{type:"string"},color:{type:"string"},tabTextColor:{type:"string"}}},BadgeFontConfig:x,BadgeSizes:{properties:{medium:"BadgeFontConfig",small:"BadgeFontConfig"}},HttpBadgesConfig:w,LabelControls:{properties:{top:{type:"string"},width:{type:"string"},height:{type:"string"}}},Panels:{properties:{borderRadius:{type:"string"},backgroundColor:{type:"string"}}},TryItButton:{properties:{fullWidth:{type:"boolean"}}},Breakpoints:{properties:{small:{type:"string"},medium:{type:"string"},large:{type:"string"}}},StackedConfig:{properties:{maxWidth:"Breakpoints"}},ThreePanelConfig:{properties:{maxWidth:"Breakpoints",middlePanelMaxWidth:"Breakpoints"}},SchemaColorsConfig:{properties:{backgroundColor:{type:"string"},border:{type:"string"}}},SizeProps:{properties:{fontSize:{type:"string"},padding:{type:"string"},minWidth:{type:"string"}}},Level1Items:k,SpacingConfig:{properties:{unit:{type:"number"},paddingHorizontal:{type:"string"},paddingVertical:{type:"string"},offsetTop:{type:"string"},offsetLeft:{type:"string"},offsetNesting:{type:"string"}}},FontConfig:b,CodeConfig:E,HeadingsConfig:A,LinksConfig:{properties:{color:{type:"string"},hover:{type:"string"},textDecoration:{type:"string"},hoverTextDecoration:{type:"string"},visited:{type:"string"}}},TokenProps:P,CodeBlock:{properties:{backgroundColor:{type:"string"},borderRadius:{type:"string"},tokens:"TokenProps"}},ConfigThemeLogo:{properties:{gutter:{type:"string"},maxHeight:{type:"string"},maxWidth:{type:"string"}}},Fab:{properties:{backgroundColor:{type:"string"},color:{type:"string"}}},ButtonOverrides:{properties:{custom:{type:"string"}}},Overrides:{properties:{DownloadButton:"ButtonOverrides",NextSectionButton:"ButtonOverrides"}},ObjectRule:{properties:{severity:{enum:["error","warn","off"]}},additionalProperties:{},required:["severity"]},Schema:{properties:{},additionalProperties:{}},RightPanel:{properties:{backgroundColor:{type:"string"},panelBackgroundColor:{type:"string"},panelControlsBackgroundColor:{type:"string"},showAtBreakpoint:{type:"string"},textColor:{type:"string"},width:{type:"string"}}},Rules:p,Shape:{properties:{borderRadius:{type:"string"}}},ThemeSpacing:{properties:{sectionHorizontal:{type:"number"},sectionVertical:{type:"number"},unit:{type:"number"}}},GenerateCodeSamples:$,GroupItemsConfig:S,ConfigThemeComponents:{properties:{buttons:"ButtonsConfig",httpBadges:"HttpBadgesConfig",layoutControls:"LabelControls",panels:"Panels",tryItButton:"TryItButton",tryItSendButton:"TryItButton"}},Layout:{properties:{showDarkRightPanel:{type:"boolean"},stacked:"StackedConfig","three-panel":"ThreePanelConfig"}},ConfigThemeSchema:{properties:{breakFieldNames:{type:"boolean"},caretColor:{type:"string"},caretSize:{type:"string"},constraints:"SchemaColorsConfig",defaultDetailsWidth:{type:"string"},examples:"SchemaColorsConfig",labelsTextSize:{type:"string"},linesColor:{type:"string"},nestedBackground:{type:"string"},nestingSpacing:{type:"string"},requireLabelColor:{type:"string"},typeNameColor:{type:"string"},typeTitleColor:{type:"string"}}},Sidebar:O,Heading:_,Typography:j,AssertionDefinitionAssertions:{properties:{enum:{type:"array",items:{type:"string"}},pattern:{type:"string"},notPattern:{type:"string"},casing:{enum:["camelCase","kebab-case","snake_case","PascalCase","MACRO_CASE","COBOL-CASE","flatcase"]},mutuallyExclusive:{type:"array",items:{type:"string"}},mutuallyRequired:{type:"array",items:{type:"string"}},required:{type:"array",items:{type:"string"}},requireAny:{type:"array",items:{type:"string"}},disallowed:{type:"array",items:{type:"string"}},defined:{type:"boolean"},nonEmpty:{type:"boolean"},minLength:{type:"integer"},maxLength:{type:"integer"},ref:e=>"string"==typeof e?{type:"string"}:{type:"boolean"},const:e=>"string"==typeof e?{type:"string"}:"number"==typeof e?{type:"number"}:"boolean"==typeof e?{type:"boolean"}:void 0},additionalProperties:(e,t)=>{if(/^\w+\/\w+$/.test(t))return{type:"object"}}},AssertionDefinitionSubject:d};t.ConfigTypes=(0,t.createConfigTypes)(n.rootRedoclyConfigSchema)},88209(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.getProxyAgent=t.pause=t.nextTick=t.pickDefined=t.keysOf=t.identity=t.isTruthy=t.showErrorForDeprecatedField=t.showWarningForDeprecatedField=t.doesYamlFileExist=t.isCustomRuleId=t.getMatchingStatusCodeRange=t.assignExisting=t.isNotString=t.isString=t.isNotEmptyObject=t.slash=t.isPathParameter=t.yamlAndJsonSyncReader=t.readFileAsStringSync=t.isSingular=t.validateMimeTypeOAS3=t.validateMimeType=t.splitCamelCaseIntoWords=t.omitObjectProps=t.pickObjectProps=t.readFileFromUrl=t.isEmptyArray=t.isEmptyObject=t.isPlainObject=t.isDefined=t.loadYaml=t.popStack=t.pushStack=t.stringifyYaml=t.parseYaml=void 0;const i=r(7411),o=r(57975),s=r(84536),a=r(92441),l=r(55127),c=r(50970),u=r(31827),p=r(92678),d=r(93290);var f=r(50970);function h(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function m(e,t){return t.match(/^https?:\/\//)||(e=e.replace(/^https?:\/\//,"")),s(e,t)}function y(e){return"string"==typeof e}function g(e){return!!e}function b(e,t){return`${void 0!==t?`${t}.`:""}${e}`}Object.defineProperty(t,"parseYaml",{enumerable:!0,get:function(){return f.parseYaml}}),Object.defineProperty(t,"stringifyYaml",{enumerable:!0,get:function(){return f.stringifyYaml}}),t.pushStack=function(e,t){return{prev:e,value:t}},t.popStack=function(e){var t;return null!==(t=null==e?void 0:e.prev)&&void 0!==t?t:null},t.loadYaml=function(e){return n(this,void 0,void 0,function*(){const t=yield i.promises.readFile(e,"utf-8");return(0,c.parseYaml)(t)})},t.isDefined=function(e){return void 0!==e},t.isPlainObject=h,t.isEmptyObject=function(e){return h(e)&&0===Object.keys(e).length},t.isEmptyArray=function(e){return Array.isArray(e)&&0===e.length},t.readFileFromUrl=function(e,t){return n(this,void 0,void 0,function*(){const r={};for(const i of t.headers)m(e,i.matches)&&(r[i.name]=void 0!==i.envVariable?u.env[i.envVariable]||"":i.value);const n=yield(t.customFetch||a.default)(e,{headers:r});if(!n.ok)throw new Error(`Failed to load ${e}: ${n.status} ${n.statusText}`);return{body:yield n.text(),mimeType:n.headers.get("content-type")}})},t.pickObjectProps=function(e,t){return Object.fromEntries(t.filter(t=>t in e).map(t=>[t,e[t]]))},t.omitObjectProps=function(e,t){return Object.fromEntries(Object.entries(e).filter(([e])=>!t.includes(e)))},t.splitCamelCaseIntoWords=function(e){const t=e.split(/(?:[-._])|([A-Z][a-z]+)/).filter(g).map(e=>e.toLocaleLowerCase()),r=e.split(/([A-Z]{2,})/).filter(e=>e&&e===e.toUpperCase()).map(e=>e.toLocaleLowerCase());return new Set([...t,...r])},t.validateMimeType=function({type:e,value:t},{report:r,location:n},i){if(!i)throw new Error(`Parameter "allowedValues" is not provided for "${"consumes"===e?"request":"response"}-mime-type" rule`);if(t[e])for(const o of t[e])i.includes(o)||r({message:`Mime type "${o}" is not allowed`,location:n.child(t[e].indexOf(o)).key()})},t.validateMimeTypeOAS3=function({type:e,value:t},{report:r,location:n},i){if(!i)throw new Error(`Parameter "allowedValues" is not provided for "${"consumes"===e?"request":"response"}-mime-type" rule`);if(t.content)for(const o of Object.keys(t.content))i.includes(o)||r({message:`Mime type "${o}" is not allowed`,location:n.child("content").child(o).key()})},t.isSingular=function(e){return l.isSingular(e)},t.readFileAsStringSync=function(e){return i.readFileSync(e,"utf-8")},t.yamlAndJsonSyncReader=function(e){const t=i.readFileSync(e,"utf-8");return(0,c.parseYaml)(t)},t.isPathParameter=function(e){return e.startsWith("{")&&e.endsWith("}")},t.slash=function(e){return/^\\\\\?\\/.test(e)?e:e.replace(/\\/g,"/")},t.isNotEmptyObject=function(e){return!!e&&Object.keys(e).length>0},t.isString=y,t.isNotString=function(e){return!y(e)},t.assignExisting=function(e,t){for(const r of Object.keys(t))e.hasOwnProperty(r)&&(e[r]=t[r])},t.getMatchingStatusCodeRange=function(e){return`${e}`.replace(/^(\d)\d\d$/,(e,t)=>`${t}XX`)},t.isCustomRuleId=function(e){return e.includes("/")},t.doesYamlFileExist=function(e){var t;return(".yaml"===(0,o.extname)(e)||".yml"===(0,o.extname)(e))&&(null===(t=null==i?void 0:i.hasOwnProperty)||void 0===t?void 0:t.call(i,"existsSync"))&&i.existsSync(e)},t.showWarningForDeprecatedField=function(e,t,r){p.logger.warn(`The '${p.colorize.red(e)}' field is deprecated. ${t?`Use ${p.colorize.green(b(t,r))} instead. `:""}Read more about this change: https://redocly.com/docs/api-registry/guides/migration-guide-config-file/#changed-properties\n`)},t.showErrorForDeprecatedField=function(e,t,r){throw new Error(`Do not use '${e}' field. ${t?`Use '${b(t,r)}' instead. `:""}\n`)},t.isTruthy=g,t.identity=function(e){return e},t.keysOf=function(e){return e?Object.keys(e):[]},t.pickDefined=function(e){if(!e)return;const t={};for(const r in e)void 0!==e[r]&&(t[r]=e[r]);return t},t.nextTick=function(){new Promise(e=>{setTimeout(e)})},t.pause=function(e){return n(this,void 0,void 0,function*(){return new Promise(t=>setTimeout(t,e))})},t.getProxyAgent=function(){const e={}.HTTPS_PROXY||{}.HTTP_PROXY;return e?new d.HttpsProxyAgent(e):void 0}},32161(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeVisitors=void 0;const n=r(71990),i={Root:"DefinitionRoot",ServerVariablesMap:"ServerVariableMap",Paths:["PathMap","PathsMap"],CallbacksMap:"CallbackMap",MediaTypesMap:"MediaTypeMap",ExamplesMap:"ExampleMap",EncodingMap:"EncodingsMap",HeadersMap:"HeaderMap",LinksMap:"LinkMap",OAuth2Flows:"SecuritySchemeFlows",Responses:"ResponsesMap"};t.normalizeVisitors=function(e,t){const r={any:{enter:[],leave:[]}};for(const n of Object.keys(t))r[n]={enter:[],leave:[]};r.ref={enter:[],leave:[]};for(const{ruleId:n,severity:i,visitor:l}of e)a({ruleId:n,severity:i},l,null);for(const n of Object.keys(r))r[n].enter.sort((e,t)=>t.depth-e.depth),r[n].leave.sort((e,t)=>e.depth-t.depth);return r;function o(e,t,i,s,a=[]){if(a.includes(t))return;a=[...a,t];const l=new Set;for(const r of Object.values(t.properties))r!==i?"object"==typeof r&&null!==r&&r.name&&l.add(r):c(e,a);t.additionalProperties&&"function"!=typeof t.additionalProperties&&(t.additionalProperties===i?c(e,a):void 0!==t.additionalProperties.name&&l.add(t.additionalProperties)),t.items&&"function"!=typeof t.items&&(t.items===i?c(e,a):void 0!==t.items.name&&l.add(t.items)),t.extensionsPrefix&&l.add(n.SpecExtension);for(const r of Array.from(l.values()))o(e,r,i,s,a);function c(e,t){for(const n of t.slice(1))r[n.name]=r[n.name]||{enter:[],leave:[]},r[n.name].enter.push(Object.assign(Object.assign({},e),{visit:()=>{},depth:0,context:{isSkippedLevel:!0,seen:new Set,parent:s}}))}}function s(e,t){if(Array.isArray(t)){const r=t.find(t=>e[t])||void 0;return r&&e[r]}return e[t]}function a(e,n,l,c=0){const u=Object.keys(t);if(0===c)u.push("any"),u.push("ref");else{if(n.any)throw new Error("any() is allowed only on top level");if(n.ref)throw new Error("ref() is allowed only on top level")}for(const p of u){const u=n[p]||s(n,i[p]),d=r[p];if(!u)continue;let f,h,m;const y="object"==typeof u;if("ref"===p&&y&&u.skip)throw new Error("ref() visitor does not support skip");"function"==typeof u?f=u:y&&(f=u.enter,h=u.leave,m=u.skip);const g={activatedOn:null,type:t[p],parent:l,isSkippedLevel:!1};if("object"==typeof u&&a(e,u,g,c+1),l&&o(e,l.type,t[p],l),f||y){if(f&&"function"!=typeof f)throw new Error("DEV: should be function");d.enter.push(Object.assign(Object.assign({},e),{visit:f||(()=>{}),skip:m,depth:c,context:g}))}if(h){if("function"!=typeof h)throw new Error("DEV: should be function");d.leave.push(Object.assign(Object.assign({},e),{visit:h,depth:c,context:g}))}}}}},5735(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.walkDocument=void 0;const n=r(13873),i=r(88209),o=r(62928),s=r(71990);function a(e){var t,r;const n={};for(;e.parent;)(null===(t=e.parent.activatedOn)||void 0===t?void 0:t.value.location)&&(n[e.parent.type.name]=null===(r=e.parent.activatedOn)||void 0===r?void 0:r.value.location),e=e.parent;return n}t.walkDocument=function(e){const{document:t,rootType:r,normalizedVisitors:l,resolvedRefMap:c,ctx:u}=e,p={},d=new Set;!function e(t,r,f,h,m){var y,g,b,v,x,w,S,k,O,_,E;const A=(e,t=P.source.absoluteRef)=>{if(!(0,n.isRef)(e))return{location:f,node:e};const r=(0,o.makeRefId)(t,e.$ref),i=c.get(r);if(!i)return{location:void 0,node:void 0};const{resolved:s,node:a,document:l,nodePointer:u,error:p}=i;return{location:s?new n.Location(l.source,u):p instanceof o.YamlParseError?new n.Location(p.source,""):void 0,node:a,error:p}},j=f;let P=f;const{node:$,location:C,error:T}=A(t),I=new Set;if((0,n.isRef)(t)){const e=l.ref.enter;for(const{visit:n,ruleId:i,severity:o,context:s}of e){I.add(s);n(t,{report:R.bind(void 0,i,o),resolve:A,rawNode:t,rawLocation:j,location:f,type:r,parent:h,key:m,parentLocations:{},oasVersion:u.oasVersion,getVisitorData:L.bind(void 0,i)},{node:$,location:C,error:T}),(null==C?void 0:C.source.absoluteRef)&&u.refTypes&&u.refTypes.set(null==C?void 0:C.source.absoluteRef,r)}}if(void 0!==$&&C&&"scalar"!==r.name){P=C;const o=null===(g=null===(y=p[r.name])||void 0===y?void 0:y.has)||void 0===g?void 0:g.call(y,$);let a=!1;const c=l.any.enter.concat((null===(b=l[r.name])||void 0===b?void 0:b.enter)||[]),u=[];for(const{context:e,visit:n,skip:s,ruleId:l,severity:p}of c){if(d.has(`${P.absolutePointer}${P.pointer}`))break;if(e.isSkippedLevel)!e.parent.activatedOn||e.parent.activatedOn.value.nextLevelTypeActivated||e.seen.has(t)||(e.seen.add(t),a=!0,u.push(e));else if(e.parent&&e.parent.activatedOn&&(null===(v=e.activatedOn)||void 0===v?void 0:v.value.withParentNode)!==e.parent.activatedOn.value.node&&(null===(x=e.parent.activatedOn.value.nextLevelTypeActivated)||void 0===x?void 0:x.value)!==r||!e.parent&&!o){u.push(e);const o={node:$,location:C,nextLevelTypeActivated:null,withParentNode:null===(S=null===(w=e.parent)||void 0===w?void 0:w.activatedOn)||void 0===S?void 0:S.value.node,skipped:null!==(_=(null===(O=null===(k=e.parent)||void 0===k?void 0:k.activatedOn)||void 0===O?void 0:O.value.skipped)||(null==s?void 0:s($,m,{location:f,rawLocation:j,resolve:A,rawNode:t})))&&void 0!==_&&_};e.activatedOn=(0,i.pushStack)(e.activatedOn,o);let c=e.parent;for(;c;)c.activatedOn.value.nextLevelTypeActivated=(0,i.pushStack)(c.activatedOn.value.nextLevelTypeActivated,r),c=c.parent;o.skipped||(a=!0,I.add(e),N(n,$,t,e,l,p))}}if(a||!o)if(p[r.name]=p[r.name]||new Set,p[r.name].add($),Array.isArray($)){const t=r.items;if(void 0!==t){const r="function"==typeof t;for(let n=0;n<$.length;n++){const i=r?t($[n],C.child([n]).absolutePointer):t;(0,s.isNamedType)(i)&&e($[n],i,C.child([n]),$,n)}}}else if("object"==typeof $&&null!==$){const i=Object.keys(r.properties);r.additionalProperties?i.push(...Object.keys($).filter(e=>!i.includes(e))):r.extensionsPrefix&&i.push(...Object.keys($).filter(e=>e.startsWith(r.extensionsPrefix))),(0,n.isRef)(t)&&i.push(...Object.keys(t).filter(e=>"$ref"!==e&&!i.includes(e)));for(const o of i){let i=$[o],a=C;void 0===i&&(i=t[o],a=f);let l=r.properties[o];void 0===l&&(l=r.additionalProperties),"function"==typeof l&&(l=l(i,o)),void 0===l&&r.extensionsPrefix&&o.startsWith(r.extensionsPrefix)&&(l=s.SpecExtension),!(0,s.isNamedType)(l)&&(null==l?void 0:l.directResolveAs)&&(l=l.directResolveAs,i={$ref:i}),l&&void 0===l.name&&!1!==l.resolvable&&(l={name:"scalar",properties:{}}),(0,s.isNamedType)(l)&&("scalar"!==l.name||(0,n.isRef)(i))&&e(i,l,a.child([o]),$,o)}}const h=l.any.leave,T=((null===(E=l[r.name])||void 0===E?void 0:E.leave)||[]).concat(h);for(const e of u.reverse())if(e.isSkippedLevel)e.seen.delete($);else if(e.activatedOn=(0,i.popStack)(e.activatedOn),e.parent){let t=e.parent;for(;t;)t.activatedOn.value.nextLevelTypeActivated=(0,i.popStack)(t.activatedOn.value.nextLevelTypeActivated),t=t.parent}for(const{context:e,visit:r,ruleId:n,severity:i}of T)!e.isSkippedLevel&&I.has(e)&&N(r,$,t,e,n,i)}if(P=f,(0,n.isRef)(t)){const e=l.ref.leave;for(const{visit:n,ruleId:i,severity:o,context:s}of e)if(I.has(s)){n(t,{report:R.bind(void 0,i,o),resolve:A,rawNode:t,rawLocation:j,location:f,type:r,parent:h,key:m,parentLocations:{},oasVersion:u.oasVersion,getVisitorData:L.bind(void 0,i)},{node:$,location:C,error:T})}}function N(e,t,n,i,o,s){e(t,{report:R.bind(void 0,o,s),resolve:A,rawNode:n,location:P,rawLocation:j,type:r,parent:h,key:m,parentLocations:a(i),oasVersion:u.oasVersion,ignoreNextVisitorsOnNode:()=>{d.add(`${P.absolutePointer}${P.pointer}`)},getVisitorData:L.bind(void 0,o)},function(e){var t;const r={};for(;e.parent;)r[e.parent.type.name]=null===(t=e.parent.activatedOn)||void 0===t?void 0:t.value.node,e=e.parent;return r}(i),i)}function R(e,t,r){const n=(r.location?Array.isArray(r.location)?r.location:[r.location]:[Object.assign(Object.assign({},P),{reportOnKey:!1})]).map(e=>Object.assign(Object.assign(Object.assign({},P),{reportOnKey:!1}),e)),i=r.forceSeverity||t;"off"!==i&&u.problems.push(Object.assign(Object.assign({ruleId:r.ruleId||e,severity:i},r),{suggest:r.suggest||[],location:n}))}function L(e){return u.visitorsData[e]=u.visitorsData[e]||{},u.visitorsData[e]}}(t.parsed,r,new n.Location(t.source,"#/"),void 0,"")}},34077(e){const t="object"==typeof process&&process&&!1;e.exports=t?{sep:"\\"}:{sep:"/"}},84536(e,t,r){const n=e.exports=(e,t,r={})=>(y(t),!(!r.nocomment&&"#"===t.charAt(0))&&new x(t,r).match(e));e.exports=n;const i=r(34077);n.sep=i.sep;const o=Symbol("globstar **");n.GLOBSTAR=o;const s=r(68928),a={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},l="[^/]",c=l+"*?",u=e=>e.split("").reduce((e,t)=>(e[t]=!0,e),{}),p=u("().*{}+?[]^$\\!"),d=u("[.("),f=/\/+/;n.filter=(e,t={})=>(r,i,o)=>n(r,e,t);const h=(e,t={})=>{const r={};return Object.keys(e).forEach(t=>r[t]=e[t]),Object.keys(t).forEach(e=>r[e]=t[e]),r};n.defaults=e=>{if(!e||"object"!=typeof e||!Object.keys(e).length)return n;const t=n,r=(r,n,i)=>t(r,n,h(e,i));return(r.Minimatch=class extends t.Minimatch{constructor(t,r){super(t,h(e,r))}}).defaults=r=>t.defaults(h(e,r)).Minimatch,r.filter=(r,n)=>t.filter(r,h(e,n)),r.defaults=r=>t.defaults(h(e,r)),r.makeRe=(r,n)=>t.makeRe(r,h(e,n)),r.braceExpand=(r,n)=>t.braceExpand(r,h(e,n)),r.match=(r,n,i)=>t.match(r,n,h(e,i)),r},n.braceExpand=(e,t)=>m(e,t);const m=(e,t={})=>(y(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:s(e)),y=e=>{if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},g=Symbol("subparse");n.makeRe=(e,t)=>new x(e,t||{}).makeRe(),n.match=(e,t,r={})=>{const n=new x(t,r);return e=e.filter(e=>n.match(e)),n.options.nonull&&!e.length&&e.push(t),e};const b=e=>e.replace(/\\([^-\]])/g,"$1"),v=e=>e.replace(/[[\]\\]/g,"\\$&");class x{constructor(e,t){y(e),t||(t={}),this.options=t,this.maxGlobstarRecursion=void 0!==t.maxGlobstarRecursion?t.maxGlobstarRecursion:200,this.set=[],this.pattern=e,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||!1===t.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}debug(){}make(){const e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();let r=this.globSet=this.braceExpand();t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,r),r=this.globParts=r.map(e=>e.split(f)),this.debug(this.pattern,r),r=r.map((e,t,r)=>e.map(this.parse,this)),this.debug(this.pattern,r),r=r.filter(e=>-1===e.indexOf(!1)),this.debug(this.pattern,r),this.set=r}parseNegate(){if(this.options.nonegate)return;const e=this.pattern;let t=!1,r=0;for(let n=0;n=0;b--)if(t[b]===o){a=b;break}const l=t.slice(i,s),c=r?t.slice(s+1):t.slice(s+1,a),u=r?[]:t.slice(a+1);if(l.length){const t=e.slice(n,n+l.length);if(!this._matchOne(t,l,r,0,0))return!1;n+=l.length}let p=0;if(u.length){if(u.length+n>e.length)return!1;const t=e.length-u.length;if(this._matchOne(e,u,r,t,0))p=u.length;else{if(""!==e[e.length-1]||n+u.length===e.length)return!1;if(!this._matchOne(e,u,r,t-1,0))return!1;p=u.length+1}}if(!c.length){let t=!!p;for(let r=n;r"."===e.charAt(0)?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",j=()=>{if(h){switch(h){case"*":n+=c,i=!0;break;case"?":n+=l,i=!0;break;default:n+="\\"+h}this.debug("clearStateChar %j %j",h,n),h=!1}};for(let o,l=0;l(r||(r="\\"),t+t+r+"|")),this.debug("tail=%j\n %s",e,e,x,n);const t="*"===x.type?c:"?"===x.type?l:"\\"+x.type;i=!0,n=n.slice(0,x.reStart)+t+"\\("+e}j(),s&&(n+="\\\\");const P=d[n.charAt(0)];for(let o=f.length-1;o>-1;o--){const e=f[o],r=n.slice(0,e.reStart),i=n.slice(e.reStart,e.reEnd-8);let s=n.slice(e.reEnd);const a=n.slice(e.reEnd-8,e.reEnd)+s,l=r.split(")").length,c=r.split("(").length-l;let u=s;for(let t=0;t(e=e.map(e=>"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e===o?o:e._src).reduce((e,t)=>(e[e.length-1]===o&&t===o||e.push(t),e),[]),e.forEach((t,n)=>{t===o&&e[n-1]!==o&&(0===n?e.length>1?e[n+1]="(?:\\/|"+r+"\\/)?"+e[n+1]:e[n]=r:n===e.length-1?e[n-1]+="(?:\\/|"+r+")?":(e[n-1]+="(?:\\/|\\/"+r+"\\/)"+e[n+1],e[n+1]=o))}),e.filter(e=>e!==o).join("/"))).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,n)}catch(s){this.regexp=!1}return this.regexp}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;const r=this.options;"/"!==i.sep&&(e=e.split(i.sep).join("/")),e=e.split(f),this.debug(this.pattern,"split",e);const n=this.set;let o;this.debug(this.pattern,"set",n);for(let i=e.length-1;i>=0&&(o=e[i],!o);i--);for(let i=0;i_});var n=r(96540),i=r(36882),o=r(66588);const s=function(e,t){var r;const n=(0,o.kh)("docusaurus-plugin-redoc");return t?{spec:t}:e?null==n?void 0:n[e]:null==(r=Object.values(null!=n?n:{}))?void 0:r[0]};function a(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t{const e=a.lightTheme,n=a.darkTheme,o=a.options,s={scrollYOffset:"string"==typeof o.scrollYOffset?r?()=>{var e,t;return null!=(e=null==(t=document.querySelector(o.scrollYOffset))?void 0:t.clientHeight)?e:0}:0:o.scrollYOffset},l=f()(Object.assign({},o,s,{theme:e}),t),c=f()(Object.assign({},o,s,{theme:n}),t);return{options:r&&i?c:l,darkThemeOptions:c,lightThemeOptions:l}},[r,i,a,t])}var m=r(98587),y=r(63427),g=r(86025);let b=null;var v=r(74848);function x(e){return(0,v.jsx)("div",{className:"redocusaurus-styles"})}const w=["className","optionsOverrides"];function S(e,t,r){void 0===r&&(r=""),t.forEach(t=>{if(e.collectAnchor(t.id),""!=r){const n=t.id.replace(r+"/","");e.collectAnchor(n)}t.items.length>0&&S(e,t.items,t.id)})}const k=function(e){const t=e.className,r=e.optionsOverrides,i=(0,m.A)(e,w),o=function(e,t){let r=e.spec,i=e.url,o=e.themeId,s=e.normalizeUrl;const a=h(o,t),l=(0,g.Ay)(i,{absolute:!0}),d=s?l:i,f=(0,u.A)(),m="dark"===(0,p.G)().colorMode,y=(0,n.useMemo)(()=>{var e;return null!==b&&f&&b.dispose(),b=new c.AppStore(r,d,a.options),Object.assign({},a,{hasLogo:!(null==(e=r.info)||!e["x-logo"]),store:b})},[f,r,d,a]);return(0,n.useEffect)(()=>{y.store.onDidMount()},[y,f,m]),y}(i,r),s=o.store,a=o.darkThemeOptions,d=o.lightThemeOptions,f=o.hasLogo;return S((0,y.A)(),s.menu.items),(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(x,{specProps:i,lightThemeOptions:d,darkThemeOptions:a}),(0,v.jsx)("div",{className:l(["redocusaurus",f&&"redocusaurus-has-logo",t]),children:(0,v.jsx)(c.Redoc,{store:s})})]})};const O=function(e){const t=s(e.id,e.spec),r=Object.assign({},t,e),n=r.spec,i=r.className,o=(r.isSpecFile,r.url),a=h(r.themeId,r.optionsOverrides).options;return null!=n&&!0?(0,v.jsx)(k,Object.assign({},r,{spec:n})):(0,v.jsx)("div",{className:l(["redocusaurus",i]),children:(0,v.jsx)(c.RedocStandalone,{specUrl:o,options:a})})};const _=function(e){var t,r;let n=e.layoutProps,o=e.specProps;const s=(null==(t=o.spec)||null==(t=t.info)?void 0:t.title)||"API Docs",a=(null==(r=o.spec)||null==(r=r.info)?void 0:r.description)||"Open API Reference Docs for the API";return(0,v.jsx)(i.A,Object.assign({title:s,description:a},n,{children:(0,v.jsx)(O,Object.assign({},o))}))}},8505(e){"use strict";function t(e,t,i){e instanceof RegExp&&(e=r(e,i)),t instanceof RegExp&&(t=r(t,i));var o=n(e,t,i);return o&&{start:o[0],end:o[1],pre:i.slice(0,o[0]),body:i.slice(o[0]+e.length,o[1]),post:i.slice(o[1]+t.length)}}function r(e,t){var r=t.match(e);return r?r[0]:null}function n(e,t,r){var n,i,o,s,a,l=r.indexOf(e),c=r.indexOf(t,l+1),u=l;if(l>=0&&c>0){if(e===t)return[l,c];for(n=[],o=r.length;u>=0&&!a;)u==l?(n.push(u),l=r.indexOf(e,u+1)):1==n.length?a=[n.pop(),c]:((i=n.pop())=0?l:c;n.length&&(a=[o,s])}return a}e.exports=t,t.range=n},68928(e,t,r){var n=r(8505);e.exports=function(e,t){if(!e)return[];var r=null==(t=t||{}).max?1e5:t.max,n=null==t.maxLength?4e6:t.maxLength;"{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2));return b(function(e){return e.split("\\\\").join(i).split("\\{").join(o).split("\\}").join(s).split("\\,").join(a).split("\\.").join(l)}(e),r,n,!0).map(u)};var i="\0SLASH"+Math.random()+"\0",o="\0OPEN"+Math.random()+"\0",s="\0CLOSE"+Math.random()+"\0",a="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function c(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function u(e){return e.split(i).join("\\").split(o).join("{").split(s).join("}").split(a).join(",").split(l).join(".")}function p(e){if(!e)return[""];var t=[],r=n("{","}",e);if(!r)return e.split(",");var i=r.pre,o=r.body,s=r.post,a=i.split(",");a[a.length-1]+="{"+o+"}";var l=p(s);return s.length&&(a[a.length-1]+=l.shift(),a.push.apply(a,l)),t.push.apply(t,a),t}function d(e){return"{"+e+"}"}function f(e){return/^-?0\d/.test(e)}function h(e,t){return e<=t}function m(e,t){return e>=t}function y(e,t,r,n,i,o){for(var s=[],a=0,l=0;l=n)return s;var u=e[l]+t+r[c];if(!o||u){if(a+u.length>i)return s;s.push(u),a+=u.length}}return s}function g(e,t,r,n){var i=e.split(/\.\./),o=[];if(void 0===i[0]||void 0===i[1])return o;var s=c(i[0]),a=c(i[1]),l=Math.max(i[0].length,i[1].length),u=3===i.length&&void 0!==i[2]?Math.max(Math.abs(c(i[2])),1):1,p=h;a0){var x=new Array(v+1).join("0");b=g<0?"-"+x+b.slice(1):x+b}}if(y+b.length>n)break;o.push(b),y+=b.length}return o}function b(e,t,r,i){for(var o=[""],a=!1,l=!0;;){const A=n("{","}",e);if(!A)return y(o,e,[""],t,r,a);const j=A.pre;if(/\$$/.test(j)){if(o=y(o,j+"{"+A.body+"}",[""],t,r,a&&!A.post.length),l=!1,!A.post.length)break;e=A.post}else{var c,u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(A.body),f=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(A.body),h=u||f,m=A.body.indexOf(",")>=0;if(!h&&!m){if(A.post.match(/,(?!,).*\}/)){e=A.pre+"{"+A.body+s+A.post,i=!0;continue}return y(o,j+"{"+A.body+"}"+A.post,[""],t,r,a)}if(l&&(a=i&&!h,l=!1),h)c=g(A.body,f,t,r);else{var v=p(A.body);if(1===v.length&&void 0!==v[0]&&1===(v=b(v[0],t,r,!1).map(d)).length){if(o=y(o,j+v[0],[""],t,r,a&&!A.post.length),!A.post.length)break;e=A.post;continue}for(var x=a&&!A.post.length&&!j,w=0;x&&w=t||S+E.length>r)break e;c.push(E),S+=E.length}}}if(o=y(o,j,c,t,r,a&&!A.post.length),!A.post.length)break;e=A.post}}return o}},13998(e,t,r){"use strict";var n=r(61137);e.exports=function(e,t){return e?void t.then(function(t){n(function(){e(null,t)})},function(t){n(function(){e(t)})}):t}},61137(e){"use strict";e.exports="object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:"function"==typeof setImmediate?setImmediate:function(e){setTimeout(e,0)}},55156(e,t){var r,n,i;n=[t],r=function(e){"use strict";e.__esModule=!0;var t={},r=Object.prototype.hasOwnProperty,n={memoize:function(e){var n=arguments.length<=1||void 0===arguments[1]?t:arguments[1],i=n.cache||{};return function(){for(var t=arguments.length,o=Array(t),s=0;s2?r:e).apply(void 0,i)}}function l(e){return function(t){return"function"==typeof t?e(t):function(r,n,i){i.value=e(i.value,t,r,n,i)}}}e.memoize=i,e.debounce=o,e.bind=s,e.default={memoize:i,debounce:o,bind:s}},void 0===(i="function"==typeof r?r.apply(t,n):r)||(e.exports=i)},25454(e){"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r2?r-2:0),i=2;i1?t-1:0),n=1;n1?r-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:x;if(i&&i(e,null),!v(t))return e;let n=t.length;for(;n--;){let i=t[n];if("string"==typeof i){const e=r(i);e!==i&&(o(t)||(t[n]=e),i=e)}e[i]=!0}return e}function D(e){for(let t=0;t/g),Z=c(/\${[\w\W]*/g),ee=c(/^data-[\-\w.\u00B7-\uFFFF]+$/),te=c(/^aria-[\-\w]+$/),re=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ne=c(/^(?:\w+script|data):/i),ie=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),oe=c(/^html$/i),se=c(/^[a-z][.\w]*(-[.\w]+)+$/i),ae=c(/<[/\w!]/g),le=c(/<[/\w]/g),ce=c(/<\/no(script|embed|frames)/i),ue=c(/\/>/i),pe=1,de=3,fe=7,he=8,me=9,ye=11,ge=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],be=l(L({},ge)),ve=function(){const e={};return h(ge,t=>{e[t]=c(new RegExp("])","i"))}),l(e)}(),xe=function(){return"undefined"==typeof window?null:window},we=function(e,t,r,n){return $(e,t)&&v(e[t])?L(n.base?M(n.base):{},e[t],n.transform):r},Se=function(e,t,r){const n=$(e,t)?e[t]:void 0;return n&&"object"==typeof n?M(n):r()};var ke=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xe();const r=t=>e(t);if(r.version="3.4.14",r.removed=[],!t||!t.document||t.document.nodeType!==me||!t.Element)return r.isSupported=!1,r;let i=t.document;const o=i,s=o.currentScript;t.DocumentFragment;const a=t.HTMLTemplateElement,p=t.Node,d=t.Element,f=t.NodeFilter,N=t.NamedNodeMap;void 0===N&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const R=t.DOMParser,D=t.trustedTypes,ge=d.prototype,ke=z(ge,"cloneNode"),Oe=z(ge,"remove"),_e=z(ge,"nextSibling"),Ee=z(ge,"childNodes"),Ae=z(ge,"parentNode"),je=z(ge,"shadowRoot"),Pe=z(ge,"attributes"),$e=p&&p.prototype?z(p.prototype,"nodeType"):null,Ce=p&&p.prototype?z(p.prototype,"nodeName"):null,Te=p&&p.prototype?z(p.prototype,"ownerDocument"):null,Ie=function(e){return $e?$e(e):e.nodeType},Ne=function(e){return Ce?Ce(e):e.nodeName};if("function"==typeof a){const e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let Re,Le,De="",Me=!1,ze=0;const Be=function(){if(ze>0)throw I('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Fe=function(e){Be(),ze++;try{return Re.createHTML(e)}finally{ze--}},qe=function(){return Me||(Le=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let r=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(r=t.getAttribute(n));const i="dompurify"+(r?"#"+r:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(o){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(D,s),Me=!0),Le},Ue=i,Ve=Ue.implementation,We=Ue.createNodeIterator,He=Ue.createDocumentFragment,Ke=Ue.getElementsByTagName,Qe=o.importNode;let Ge={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported="function"==typeof n&&"function"==typeof Ae&&Ve&&void 0!==Ve.createHTMLDocument;const Ye=X,Xe=J,Je=Z,Ze=ee,et=te,tt=ne,rt=ie,nt=se;let it=re,ot=null;const st=L({},[...B,...F,...q,...V,...H]);let at=null;const lt=L({},[...K,...Q,...G,...Y]);let ct=Object.seal(u(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ut=null,pt=null;const dt=Object.seal(u(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ft=!0,ht=!0,mt=!1,yt=!0,gt=!1,bt=!0,vt=!1,xt=!1,wt=null,St=null,kt=!1,Ot=!1,_t=!1,Et=!1,At=!0,jt=!1;const Pt="user-content-";let $t=!0,Ct=!1,Tt={},It=null;const Nt=L({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Rt=null;const Lt=L({},["audio","video","img","source","image","track"]);let Dt=null;const Mt=L({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),zt="http://www.w3.org/1998/Math/MathML",Bt="http://www.w3.org/2000/svg",Ft="http://www.w3.org/1999/xhtml";let qt=Ft,Ut=!1,Vt=null;const Wt=L({},[zt,Bt,Ft],w),Ht=l(["mi","mo","mn","ms","mtext"]);let Kt=L({},Ht);const Qt=l(["annotation-xml"]);let Gt=L({},Qt);const Yt=L({},["title","style","font","a","script"]);let Xt=null;const Jt=["application/xhtml+xml","text/html"];let Zt=null,er=null;const tr=i.createElement("form"),rr=function(e){return e instanceof RegExp||e instanceof Function},nr=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(er&&er===e)return;e&&"object"==typeof e||(e={}),e=M(e),Xt=-1===Jt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Zt="application/xhtml+xml"===Xt?w:x,ot=we(e,"ALLOWED_TAGS",st,{transform:Zt}),at=we(e,"ALLOWED_ATTR",lt,{transform:Zt}),Vt=we(e,"ALLOWED_NAMESPACES",Wt,{transform:w}),Dt=we(e,"ADD_URI_SAFE_ATTR",Mt,{transform:Zt,base:Mt}),Rt=we(e,"ADD_DATA_URI_TAGS",Lt,{transform:Zt,base:Lt}),It=we(e,"FORBID_CONTENTS",Nt,{transform:Zt}),ut=we(e,"FORBID_TAGS",M({}),{transform:Zt}),pt=we(e,"FORBID_ATTR",M({}),{transform:Zt}),Tt=!!$(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?M(e.USE_PROFILES):e.USE_PROFILES),ft=!1!==e.ALLOW_ARIA_ATTR,ht=!1!==e.ALLOW_DATA_ATTR,mt=e.ALLOW_UNKNOWN_PROTOCOLS||!1,yt=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,gt=e.SAFE_FOR_TEMPLATES||!1,bt=!1!==e.SAFE_FOR_XML,vt=e.WHOLE_DOCUMENT||!1,Ot=e.RETURN_DOM||!1,_t=e.RETURN_DOM_FRAGMENT||!1,Et=e.RETURN_TRUSTED_TYPE||!1,kt=e.FORCE_BODY||!1,At=!1!==e.SANITIZE_DOM,jt=e.SANITIZE_NAMED_PROPS||!1,$t=!1!==e.KEEP_CONTENT,Ct=e.IN_PLACE||!1,it=function(e){try{return T(e,""),!0}catch(t){return!1}}(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:re,qt="string"==typeof e.NAMESPACE?e.NAMESPACE:Ft,Kt=Se(e,"MATHML_TEXT_INTEGRATION_POINTS",()=>L({},Ht)),Gt=Se(e,"HTML_INTEGRATION_POINTS",()=>L({},Qt));const t=Se(e,"CUSTOM_ELEMENT_HANDLING",()=>u(null));if(ct=u(null),$(t,"tagNameCheck")&&rr(t.tagNameCheck)&&(ct.tagNameCheck=t.tagNameCheck),$(t,"attributeNameCheck")&&rr(t.attributeNameCheck)&&(ct.attributeNameCheck=t.attributeNameCheck),$(t,"allowCustomizedBuiltInElements")&&"boolean"==typeof t.allowCustomizedBuiltInElements&&(ct.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),c(ct),gt&&(ht=!1),_t&&(Ot=!0),Tt&&(ot=L({},H),at=u(null),!0===Tt.html&&(L(ot,B),L(at,K)),!0===Tt.svg&&(L(ot,F),L(at,Q),L(at,Y)),!0===Tt.svgFilters&&(L(ot,q),L(at,Q),L(at,Y)),!0===Tt.mathMl&&(L(ot,V),L(at,G),L(at,Y))),dt.tagCheck=null,dt.attributeCheck=null,$(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?dt.tagCheck=e.ADD_TAGS:v(e.ADD_TAGS)&&(ot===st&&(ot=M(ot)),L(ot,e.ADD_TAGS,Zt))),$(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?dt.attributeCheck=e.ADD_ATTR:v(e.ADD_ATTR)&&(at===lt&&(at=M(at)),L(at,e.ADD_ATTR,Zt))),$(e,"ADD_FORBID_CONTENTS")&&v(e.ADD_FORBID_CONTENTS)&&(It===Nt&&(It=M(It)),L(It,e.ADD_FORBID_CONTENTS,Zt)),$t&&(ot["#text"]=!0),vt&&L(ot,["html","head","body"]),ot.table&&(L(ot,["tbody"]),delete ut.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw I('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw I('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const t=Re;Re=e.TRUSTED_TYPES_POLICY;try{De=Fe("")}catch(r){throw Re=t,r}}else null===e.TRUSTED_TYPES_POLICY?(Re=void 0,De=""):(void 0===Re&&(Re=qe()),Re&&"string"==typeof De&&(De=Fe("")));l&&l(e),er=e},ir=L({},[...F,...q,...U]),or=L({},[...V,...W]),sr=function(e){let t=Ae(e);t&&t.tagName||(t={namespaceURI:qt,tagName:"template"});const r=x(e.tagName),n=x(t.tagName);return!!Vt[e.namespaceURI]&&(e.namespaceURI===Bt?function(e,t,r){return t.namespaceURI===Ft?"svg"===e:t.namespaceURI===zt?"svg"===e&&("annotation-xml"===r||Kt[r]):Boolean(ir[e])}(r,t,n):e.namespaceURI===zt?function(e,t,r){return t.namespaceURI===Ft?"math"===e:t.namespaceURI===Bt?"math"===e&&Gt[r]:Boolean(or[e])}(r,t,n):e.namespaceURI===Ft?function(e,t,r){return!(t.namespaceURI===Bt&&!Gt[r])&&!(t.namespaceURI===zt&&!Kt[r])&&!or[e]&&(Yt[e]||!ir[e])}(r,t,n):!("application/xhtml+xml"!==Xt||!Vt[e.namespaceURI]))},ar=function(e){g(r.removed,{element:e});try{Ae(e).removeChild(e)}catch(t){if(Oe(e),!Ae(e))throw I("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},lr=function(e,t,r){try{e.removeAttributeNode(t)}catch(n){try{e.removeAttribute(r)}catch(n){}}},cr=function(e){dr(e);const t=Ee(e);if(t){const e=[];h(t,t=>{g(e,t)}),h(e,e=>{try{Oe(e)}catch(t){}})}const r=Pe(e);if(r)for(let n=r.length-1;n>=0;--n){const t=r[n],i=t&&t.name;"string"==typeof i&&lr(e,t,i)}},ur=function(e,t,n){if(!n)try{n=t.getAttributeNode(e)}catch(i){n=null}g(r.removed,{attribute:n||null,from:t});try{n?t.removeAttributeNode(n):t.removeAttribute(e)}catch(i){try{t.removeAttribute(e)}catch(i){}}if("is"===e)if(Ot||_t)try{ar(t)}catch(i){}else try{t.setAttribute(e,"")}catch(i){}},pr=function(e){const t=Pe(e);if(t)for(let r=t.length-1;r>=0;--r){const n=t[r],i=n&&n.name;"string"!=typeof i||at[Zt(i)]||lr(e,n,i)}},dr=function(e){const t=[e];for(;t.length>0;){const e=t.pop();Ie(e)===pe&&pr(e);const r=Ee(e);if(r)for(let n=r.length-1;n>=0;--n)t.push(r[n])}},fr=function(e,t){return!!bt&&("patchsrc"===e||"for"===e&&"label"!==t&&"output"!==t)},hr=function(e){let t=null,r=null;if(kt)e=""+e;else{const t=S(e,/^[\r\n\t ]+/);r=t&&t[0]}"application/xhtml+xml"===Xt&&qt===Ft&&(e=''+e+"");const n=Re?Fe(e):e;if(qt===Ft)try{t=(new R).parseFromString(n,Xt)}catch(s){}if(!t||!t.documentElement){t=Ve.createDocument(qt,"template",null);try{t.documentElement.innerHTML=Ut?De:n}catch(s){}}const o=t.body||t.documentElement;return e&&r&&o.insertBefore(i.createTextNode(r),o.childNodes[0]||null),qt===Ft?Ke.call(t,vt?"html":"body")[0]:vt?t.documentElement:o},mr=function(e){const t=Te?Te(e):e.ownerDocument;return We.call(t||e,e,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT|f.SHOW_PROCESSING_INSTRUCTION|f.SHOW_CDATA_SECTION,null)},yr=function(e){return e=k(e,Ye," "),e=k(e,Xe," "),e=k(e,Je," ")},gr=function(e){var t;e.normalize();const r=Te?Te(e):e.ownerDocument,n=We.call(r||e,e,f.SHOW_TEXT|f.SHOW_COMMENT|f.SHOW_CDATA_SECTION|f.SHOW_PROCESSING_INSTRUCTION,null);let i=n.nextNode();for(;i;)i.data=yr(i.data),i=n.nextNode();const o=null===(t=e.querySelectorAll)||void 0===t?void 0:t.call(e,"template");o&&h(o,e=>{vr(e.content)&&gr(e.content)})},br=function(e){const t=Ce?Ce(e):null;return"string"==typeof t&&("form"===Zt(t)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==Pe(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==$e(e)||e.childNodes!==Ee(e)))},vr=function(e){if(!$e||"object"!=typeof e||null===e)return!1;try{return $e(e)===ye}catch(t){return!1}},xr=function(e){if(!$e||"object"!=typeof e||null===e)return!1;try{return"number"==typeof $e(e)}catch(t){return!1}};function wr(e,t,n){0!==e.length&&h(e,e=>{e.call(r,t,n,er)})}const Sr=function(e,t){if(e instanceof RegExp)return T(e,t);if(e instanceof Function){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i=0;--i){const o=e===r?ke(n[i],!0):n[i];t.insertBefore(o,_e(e))}}return ar(e),!0}(e,n,t);return!1===r&&wr(Ge.afterSanitizeElements,e,null),r}if(Ie(e)===pe&&!sr(e))return ar(e),!0;if(("noscript"===n||"noembed"===n||"noframes"===n)&&T(ce,e.innerHTML))return ar(e),!0;if(gt&&e.nodeType===de){const t=yr(e.textContent);e.textContent!==t&&(g(r.removed,{element:e.cloneNode()}),e.textContent=t)}return wr(Ge.afterSanitizeElements,e,null),!1},Er=function(e,t,r){if(pt[t])return!1;if(fr(t,e))return!1;if(At&&("id"===t||"name"===t)&&(r in i||r in tr))return!1;const n=at[t]||dt.attributeCheck instanceof Function&&dt.attributeCheck(t,e);return!(!ht||!T(Ze,t))||(!(!ft||!T(et,t))||(n?!!Dt[t]||(!!T(it,k(r,rt,""))||(!("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==O(r,"data:")||!Rt[e])||(!(!mt||T(tt,k(r,rt,"")))||!r))):jr(e)&&Sr(ct.tagNameCheck,e)&&Sr(ct.attributeNameCheck,t,e)||"is"===t&&ct.allowCustomizedBuiltInElements&&Sr(ct.tagNameCheck,r)))},Ar=L({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),jr=function(e){return!Ar[x(e)]&&T(nt,e)},Pr=function(e,t,r,n){if(Re&&"object"==typeof D&&"function"==typeof D.getAttributeType&&!r)switch(D.getAttributeType(e,t)){case"TrustedHTML":return Fe(n);case"TrustedScriptURL":return function(e){Be(),ze++;try{return Re.createScriptURL(e)}finally{ze--}}(n)}return n},$r=function(e,t,n,i){try{n?e.setAttributeNS(n,t,i):e.setAttribute(t,i),br(e)?ar(e):y(r.removed)}catch(o){ur(t,e)}},Cr=function(e){wr(Ge.beforeSanitizeAttributes,e,null);const t=e.attributes;if(!t||br(e))return;at=kr(Ge.uponSanitizeAttribute,at,lt,St);const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:at,forceKeepAttr:void 0};let n=t.length;const i=Zt(e.nodeName);for(;n--;){const o=t[n],s=o.name,a=o.namespaceURI,l=o.value,c=Zt(s),u=l;let p="value"===s?u:_(u);r.attrName=c,r.attrValue=p,r.keepAttr=!0,r.forceKeepAttr=void 0,wr(Ge.uponSanitizeAttribute,e,r),p=r.attrValue,!jt||"id"!==c&&"name"!==c||0===O(p,Pt)||(ur(s,e,o),p=Pt+p),bt&&T(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,p)?ur(s,e,o):"attributename"===c&&S(p,"href")?ur(s,e,o):r.forceKeepAttr||(r.keepAttr&&(yt||!T(ue,p))?(gt&&(p=yr(p)),Er(i,c,p)?(p=Pr(i,c,a,p),p!==u&&$r(e,s,a,p)):ur(s,e,o)):ur(s,e,o))}wr(Ge.afterSanitizeAttributes,e,null)},Tr=function(e){let t=null;const r=mr(e);for(wr(Ge.beforeSanitizeShadowDOM,e,null);t=r.nextNode();)if(wr(Ge.uponSanitizeShadowNode,t,null),_r(t,e),Cr(t),vr(t.content)&&Tr(t.content),Ie(t)===pe){const e=je(t);vr(e)&&(Ir(e),Tr(e))}wr(Ge.afterSanitizeShadowDOM,e,null)},Ir=function(e){const t=[{node:e,shadow:null}];for(;t.length>0;){const e=t.pop();if(e.shadow){Tr(e.shadow);continue}const r=e.node,n=Ie(r)===pe,i=Ee(r);if(i)for(let o=i.length-1;o>=0;--o)t.push({node:i[o],shadow:null});if(n){const e=Ce?Ce(r):null;if("string"==typeof e&&"template"===Zt(e)){const e=r.content;vr(e)&&t.push({node:e,shadow:null})}}if(n){const e=je(r);vr(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,i=null,s=null,a=null;if(Ut=!e,Ut&&(e="\x3c!--\x3e"),"string"!=typeof e&&!xr(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return E(e);case"boolean":return A(e);case"bigint":return j?j(e):"0";case"symbol":return P?P(e):"Symbol()";case"undefined":default:return C(e);case"function":case"object":{if(null===e)return C(e);const t=e,r=z(t,"toString");if("function"==typeof r){const e=r(t);return"string"==typeof e?e:C(e)}return C(e)}}}(e)))throw I("dirty is not a string, aborting");if(!r.isSupported)return e;xt?(ot=wt,at=St):nr(t),(Ge.uponSanitizeElement.length>0||Ge.uponSanitizeAttribute.length>0)&&(ot=M(ot)),Ge.uponSanitizeAttribute.length>0&&(at=M(at)),r.removed=[];const l=Ct&&"string"!=typeof e&&xr(e);if(l){!function(e){if(!bt)return;const t=[e];for(;t.length>0;){const e=t.pop(),n=Ie(e);if(n===fe||n===he&&T(le,e.data)){try{Oe(e)}catch(r){}continue}if(n===pe){const t=e,n=Zt(Ne(e));try{t.hasAttribute&&t.hasAttribute("patchsrc")&&t.removeAttribute("patchsrc"),t.hasAttribute&&t.hasAttribute("for")&&fr("for",n)&&t.removeAttribute("for")}catch(r){}}const i=Ee(e);if(i)for(let r=i.length-1;r>=0;--r)t.push(i[r])}}(e);const t=Ne(e);if("string"==typeof t){const r=Zt(t);if(!ot[r]||ut[r])throw cr(e),I("root node is forbidden and cannot be sanitized in-place")}if(br(e))throw cr(e),I("root node is clobbered and cannot be sanitized in-place");try{Ir(e)}catch(p){throw cr(e),p}}else if(xr(e))n=hr("\x3c!----\x3e"),i=n.ownerDocument.importNode(e,!0),i.nodeType===pe&&"BODY"===i.nodeName||"HTML"===i.nodeName?n=i:n.appendChild(i),Ir(i);else{if(!Ot&&!gt&&!vt&&-1===e.indexOf("<"))return Re&&Et?Fe(e):e;if(n=hr(e),!n)return Ot?null:Et?De:""}n&&kt&&ar(n.firstChild);const c=l?e:n;try{const e=mr(c);for(;s=e.nextNode();)_r(s,c),Cr(s),vr(s.content)&&Tr(s.content)}catch(p){throw l&&(cr(e),h(r.removed,e=>{e.element&&dr(e.element)})),p}if(l)return h(r.removed,e=>{e.element&&dr(e.element)}),gt&&gr(e),e;if(Ot){if(gt&&gr(n),_t)for(a=He.call(n.ownerDocument);n.firstChild;)a.appendChild(n.firstChild);else a=n;return(at.shadowroot||at.shadowrootmode)&&(a=Qe.call(o,a,!0)),a}let u=vt?n.outerHTML:n.innerHTML;return vt&&ot["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&T(oe,n.ownerDocument.doctype.name)&&(u="\n"+u),gt&&(u=yr(u)),Re&&Et?Fe(u):u},r.setConfig=function(){nr(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),xt=!0,wt=ot,St=at},r.clearConfig=function(){er=null,xt=!1,wt=null,St=null,Re=Le,De=""},r.isValidAttribute=function(e,t,r){er||nr({});const n=Zt(e),i=Zt(t);return Er(n,i,r)},r.addHook=function(e,t){"function"==typeof t&&$(Ge,e)&&g(Ge[e],t)},r.removeHook=function(e,t){if($(Ge,e)){if(void 0!==t){const r=m(Ge[e],t);return-1===r?void 0:b(Ge[e],r,1)[0]}return y(Ge[e])}},r.removeHooks=function(e){$(Ge,e)&&(Ge[e]=[])},r.removeAllHooks=function(){Ge={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r}();e.exports=ke},32017(e){"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!==i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!==i--;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;0!==i--;){var s=o[i];if(!e(t[s],r[s]))return!1}return!0}return t!=t&&r!=r}},78463(e){e.exports=s,s.default=s,s.stable=u,s.stableStringify=u;var t="[...]",r="[Circular]",n=[],i=[];function o(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(e,t,r,s){var a;void 0===s&&(s=o()),l(e,"",0,[],void 0,0,s);try{a=0===i.length?JSON.stringify(e,t,r):JSON.stringify(e,d(t),r)}catch(u){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var c=n.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return a}function a(e,t,r,o){var s=Object.getOwnPropertyDescriptor(o,r);void 0!==s.get?s.configurable?(Object.defineProperty(o,r,{value:e}),n.push([o,r,t,s])):i.push([t,r,e]):(o[r]=e,n.push([o,r,t]))}function l(e,n,i,o,s,c,u){var p;if(c+=1,"object"==typeof e&&null!==e){for(p=0;pu.depthLimit)return void a(t,e,n,s);if(void 0!==u.edgesLimit&&i+1>u.edgesLimit)return void a(t,e,n,s);if(o.push(e),Array.isArray(e))for(p=0;pt?1:0}function u(e,t,r,s){void 0===s&&(s=o());var a,l=p(e,"",0,[],void 0,0,s)||e;try{a=0===i.length?JSON.stringify(l,t,r):JSON.stringify(l,d(t),r)}catch(u){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var c=n.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return a}function p(e,i,o,s,l,u,d){var f;if(u+=1,"object"==typeof e&&null!==e){for(f=0;fd.depthLimit)return void a(t,e,i,l);if(void 0!==d.edgesLimit&&o+1>d.edgesLimit)return void a(t,e,i,l);if(s.push(e),Array.isArray(e))for(f=0;f0)for(var n=0;n=32&&e<=126||e>=161&&e<=55295&&8232!==e&&8233!==e||e>=57344&&e<=65533&&e!==l||e>=65536&&e<=1114111}function b(e){return g(e)&&e!==l&&13!==e&&10!==e}function v(e,t,r){const n=b(e),i=n&&!y(e);return(r?n:n&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e)&&35!==e&&!(58===t&&!i)||b(t)&&!y(t)&&35===e||58===t&&i}function x(e,t){const r=e.charCodeAt(t);let n;return r>=55296&&r<=56319&&t+1=56320&&n<=57343)?1024*(r-55296)+n-56320+65536:r}function w(e){return/^\n* /.test(e)}function S(e,t,r,n,i,o,s,a){let c,u=0,p=null,d=!1,f=!1;const h=-1!==n;let m=-1,b=g(S=x(e,0))&&S!==l&&!y(S)&&45!==S&&63!==S&&58!==S&&44!==S&&91!==S&&93!==S&&123!==S&&125!==S&&35!==S&&38!==S&&42!==S&&33!==S&&124!==S&&61!==S&&62!==S&&39!==S&&34!==S&&37!==S&&64!==S&&96!==S&&function(e){return!y(e)&&58!==e}(x(e,e.length-1));var S;if(t||s)for(c=0;c=65536?c+=2:c++){if(u=x(e,c),!g(u))return 5;b=b&&v(u,p,a),p=u}else{for(c=0;c=65536?c+=2:c++){if(u=x(e,c),10===u)d=!0,h&&(f=f||c-m-1>n&&" "!==e[m+1],m=c);else if(!g(u))return 5;b=b&&v(u,p,a),p=u}f=f||h&&c-m-1>n&&" "!==e[m+1]}return d||f?r>9&&w(e)?5:s?2===o?5:2:f?4:3:!b||s||i(e)?2===o?5:2:1}function k(e,t,r,n,o){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==u.indexOf(t)||p.test(t)))return 2===e.quotingType?'"'+t+'"':"'"+t+"'";const s=e.indent*Math.max(1,r),a=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),l=n||e.flowLevel>-1&&r>=e.flowLevel;switch(S(t,l,e.indent,a,function(t){return function(e,t){for(let r=0,n=e.implicitTypes.length;r"+O(t,e.indent)+_(h(function(e,t){const r=/(\n+)([^\n]*)/g;let n,i,o=function(){let n=e.indexOf("\n");return n=-1!==n?n:e.length,r.lastIndex=n,E(e.slice(0,n),t)}(),s="\n"===e[0]||" "===e[0];for(;i=r.exec(e);){const e=i[1],r=i[2];n=" "===r[0],o+=e+(s||n||""===r?"":"\n")+E(r,t),s=n}return o}(t,a),s));case 5:return'"'+function(e){let t="",r=0;for(let n=0;n=65536?n+=2:n++){r=x(e,n);const i=c[r];!i&&g(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||d(r)}return t}(t)+'"';default:throw new i("impossible error: invalid scalar style")}}()}function O(e,t){const r=w(e)?String(t):"",n="\n"===e[e.length-1];return r+(n&&("\n"===e[e.length-2]||"\n"===e)?"+":n?"":"-")+"\n"}function _(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function E(e,t){if(""===e||" "===e[0])return e;const r=/ [^ ]/g;let n,i,o=0,s=0,a=0,l="";for(;n=r.exec(e);)a=n.index,a-o>t&&(i=s>o?s:a,l+="\n"+e.slice(o,i),o=i+1),s=a;return l+="\n",e.length-o>t&&s>o?l+=e.slice(o,s)+"\n"+e.slice(s+1):l+=e.slice(o),l.slice(1)}function A(e,t,r,n){let i="";const o=e.tag;for(let s=0,a=r.length;s tag resolver accepts not "'+r+'" style');n=l.represent[r](t,r)}e.dump=n}return!0}}return!1}function P(e,t,r,n,o,a,l){e.tag=null,e.dump=r,j(e,r,!1)||j(e,r,!0);const c=s.call(e.dump),u=n;n&&(n=e.flowLevel<0||e.flowLevel>t);const p="[object Object]"===c||"[object Array]"===c;let d,f;if(p&&(d=e.duplicates.indexOf(r),f=-1!==d),(null!==e.tag&&"?"!==e.tag||f||2!==e.indent&&t>0)&&(o=!1),f&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(p&&f&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),"[object Object]"===c)n&&0!==Object.keys(e.dump).length?(!function(e,t,r,n){let o="";const s=e.tag,a=Object.keys(r);if(!0===e.sortKeys)a.sort();else if("function"==typeof e.sortKeys)a.sort(e.sortKeys);else if(e.sortKeys)throw new i("sortKeys must be a boolean or a function");for(let i=0,l=a.length;i1024;u&&(e.dump&&10===e.dump.charCodeAt(0)?s+="?":s+="? "),s+=e.dump,u&&(s+=m(e,t)),P(e,t+1,c,!0,u)&&(e.dump&&10===e.dump.charCodeAt(0)?s+=":":s+=": ",s+=e.dump,o+=s)}e.tag=s,e.dump=o||"{}"}(e,t,e.dump,o),f&&(e.dump="&ref_"+d+e.dump)):(!function(e,t,r){let n="";const i=e.tag,o=Object.keys(r);for(let s=0,a=o.length;s1024&&(i+="? "),i+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),P(e,t,l,!1,!1)&&(i+=e.dump,n+=i))}e.tag=i,e.dump="{"+n+"}"}(e,t,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else if("[object Array]"===c)n&&0!==e.dump.length?(e.noArrayIndent&&!l&&t>0?A(e,t-1,e.dump,o):A(e,t,e.dump,o),f&&(e.dump="&ref_"+d+e.dump)):(!function(e,t,r){let n="";const i=e.tag;for(let o=0,s=r.length;o",e.dump=t+" "+e.dump}}return!0}function $(e,t){const r=[],n=[];C(e,r,n);const i=n.length;for(let o=0;o=48&&e<=57)return e-48;const t=32|e;return t>=97&&t<=102?t-97+10:-1}function v(e){return 120===e?2:117===e?4:85===e?8:0}function x(e){return e>=48&&e<=57?e-48:-1}function w(e){switch(e){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:case 9:return"\t";case 110:return"\n";case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1b";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"\x85";case 95:return"\xa0";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function S(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}function k(e,t,r){"__proto__"===t?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}const O=new Array(256),_=new Array(256);for(let G=0;G<256;G++)O[G]=w(G)?1:0,_[G]=w(G);function E(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.maxDepth="number"==typeof t.maxDepth?t.maxDepth:100,this.maxTotalMergeKeys="number"==typeof t.maxTotalMergeKeys?t.maxTotalMergeKeys:1e4,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.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function A(e,t){const r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=o(r),new i(t,r)}function j(e,t){throw A(e,t)}function P(e,t){e.onWarning&&e.onWarning.call(null,A(e,t))}function $(e,t,r){const n=e.anchorMapTransactions;if(0!==n.length){const r=n[n.length-1];a.call(r,t)||(r[t]={existed:a.call(e.anchorMap,t),value:e.anchorMap[t]})}e.anchorMap[t]=r}function C(e){return{position:e.position,line:e.line,lineStart:e.lineStart,lineIndent:e.lineIndent,firstTabInLine:e.firstTabInLine,tag:e.tag,anchor:e.anchor,kind:e.kind,result:e.result}}function T(e,t){e.position=t.position,e.line=t.line,e.lineStart=t.lineStart,e.lineIndent=t.lineIndent,e.firstTabInLine=t.firstTabInLine,e.tag=t.tag,e.anchor=t.anchor,e.kind=t.kind,e.result=t.result}const I={YAML:function(e,t,r){null!==e.version&&j(e,"duplication of %YAML directive"),1!==r.length&&j(e,"YAML directive accepts exactly one argument");const n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]);null===n&&j(e,"ill-formed argument of the YAML directive");const i=parseInt(n[1],10),o=parseInt(n[2],10);1!==i&&j(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&P(e,"unsupported YAML version of the document")},TAG:function(e,t,r){let n;2!==r.length&&j(e,"TAG directive accepts exactly two arguments");const i=r[0];n=r[1],p.test(i)||j(e,"ill-formed tag handle (first argument) of the TAG directive"),a.call(e.tagMap,i)&&j(e,'there is a previously declared suffix for "'+i+'" tag handle'),d.test(n)||j(e,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch(o){j(e,"tag prefix is malformed: "+n)}e.tagMap[i]=n}};function N(e,t,r,n){if(t=32&&r<=1114111||j(e,"expected valid JSON character")}else l.test(i)&&j(e,"the stream contains non-printable characters");e.result+=i}}function R(e,t,r,i){n.isObject(r)||j(e,"cannot merge mappings; the provided source object is unacceptable");const o=Object.keys(r);for(let n=0,s=o.length;ne.maxTotalMergeKeys&&j(e,"merge keys exceeded maxTotalMergeKeys ("+e.maxTotalMergeKeys+")"),a.call(t,s)||(k(t,s,r[s]),i[s]=!0)}}function L(e,t,r,n,i,o,s,l,c){if(Array.isArray(i))for(let a=0,u=(i=Array.prototype.slice.call(i)).length;a1&&(e.result+=n.repeat("\n",t-1))}function F(e,t){const r=e.tag,n=e.anchor,i=[];let o=!1;if(-1!==e.firstTabInLine)return!1;null!==e.anchor&&$(e,e.anchor,i);let s=e.input.charCodeAt(e.position);for(;0!==s&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,j(e,"tab characters must not be used in indentation")),45===s);){if(!y(e.input.charCodeAt(e.position+1)))break;if(o=!0,e.position++,M(e,!0,-1)&&e.lineIndent<=t){i.push(null),s=e.input.charCodeAt(e.position);continue}const r=e.line;if(H(e,t,3,!1,!0),i.push(e.result),M(e,!0,-1),s=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&0!==s)j(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(h&&(i=e.line,o=e.lineStart,s=e.position),H(e,t,4,!0,n)&&(h?d=e.result:f=e.result),h||(L(e,c,u,p,d,f,i,o,s),p=d=f=null),M(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===x||e.lineIndent>t)&&0!==b)j(e,"bad indentation of a mapping entry");else if(e.lineIndent=0;n-=1){const i=t[r[n]];i.existed?e.anchorMap[r[n]]=i.value:delete e.anchorMap[r[n]]}}(e),T(e,i),!1)}function H(e,t,r,i,o){let s,l,c,u,p,d=1,f=!1,w=!1,k=null;e.depth>=e.maxDepth&&j(e,"nesting exceeded maxDepth ("+e.maxDepth+")"),e.depth+=1,null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null;const E=s=l=4===r||3===r;if(i&&M(e,!0,-1)&&(f=!0,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndentt?d=1:e.lineIndent===t?d=0:e.lineIndent=0))break;0===i?j(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?j(e,"repeat of an indentation width identifier"):(l=t+i-1,a=!0)}if(m(p)){do{p=e.input.charCodeAt(++e.position)}while(m(p));if(35===p)do{p=e.input.charCodeAt(++e.position)}while(!h(p)&&0!==p)}for(;0!==p;){for(D(e),e.lineIndent=0,p=e.input.charCodeAt(e.position);(!a||e.lineIndentl&&(l=e.lineIndent),h(p)){c++;continue}if(a||0!==l||j(e,"missing indentation for block scalar"),e.lineIndent0){let t=i,r=0;for(;t>0;t--)o=e.input.charCodeAt(++e.position),(i=b(o))>=0?r=(r<<4)+i:j(e,"expected hexadecimal character");e.result+=S(r),e.position++}else j(e,"unknown escape sequence");r=n=e.position}else h(o)?(N(e,r,n,!0),B(e,M(e,!1,t)),r=n=e.position):e.position===e.lineStart&&z(e)?j(e,"unexpected end of the document within a double quoted scalar"):(e.position++,m(o)||(n=e.position))}j(e,"unexpected end of the stream within a double quoted scalar")}(e,u)?w=!0:!function(e){let t=e.input.charCodeAt(e.position);if(42!==t)return!1;t=e.input.charCodeAt(++e.position);const r=e.position;for(;0!==t&&!y(t)&&!g(t);)t=e.input.charCodeAt(++e.position);e.position===r&&j(e,"name of an alias node must contain at least one character");const n=e.input.slice(r,e.position);return a.call(e.anchorMap,n)||j(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],M(e,!0,-1),!0}(e)?function(e,t,r){let n,i,o,s,a,l;const c=e.kind,u=e.result;let p=e.input.charCodeAt(e.position);if(y(p)||g(p)||35===p||38===p||42===p||33===p||124===p||62===p||39===p||34===p||37===p||64===p||96===p)return!1;if(63===p||45===p){const t=e.input.charCodeAt(e.position+1);if(y(t)||r&&g(t))return!1}for(e.kind="scalar",e.result="",n=i=e.position,o=!1;0!==p;){if(58===p){const t=e.input.charCodeAt(e.position+1);if(y(t)||r&&g(t))break}else if(35===p){if(y(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&z(e)||r&&g(p))break;if(h(p)){if(s=e.line,a=e.lineStart,l=e.lineIndent,M(e,!1,-1),e.lineIndent>=t){o=!0,p=e.input.charCodeAt(e.position);continue}e.position=i,e.line=s,e.lineStart=a,e.lineIndent=l;break}}o&&(N(e,n,i,!1),B(e,e.line-s),n=i=e.position,o=!1),m(p)||(i=e.position+1),p=e.input.charCodeAt(++e.position)}return N(e,n,i,!1),!!e.result||(e.kind=c,e.result=u,!1)}(e,u,1===r)&&(w=!0,null===e.tag&&(e.tag="?")):(w=!0,null===e.tag&&null===e.anchor||j(e,"alias node should not have any properties")),null!==e.anchor&&$(e,e.anchor,e.result)}else 0===d&&(w=l&&F(e,p));if(null===e.tag)null!==e.anchor&&$(e,e.anchor,e.result);else if("?"===e.tag){null!==e.result&&"scalar"!==e.kind&&j(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"');for(let t=0,r=e.implicitTypes.length;t"),null!==e.result&&c.kind!==e.kind&&j(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+c.kind+'", not "'+e.kind+'"'),c.resolve(e.result,e.tag)?(e.result=c.construct(e.result,e.tag),null!==e.anchor&&$(e,e.anchor,e.result)):j(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),e.depth-=1,null!==e.tag||null!==e.anchor||w}function K(e){const t=e.position;let r,n=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(r=e.input.charCodeAt(e.position))&&(M(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==r));){n=!0,r=e.input.charCodeAt(++e.position);let t=e.position;for(;0!==r&&!y(r);)r=e.input.charCodeAt(++e.position);const i=e.input.slice(t,e.position),o=[];for(i.length<1&&j(e,"directive name must not be less than one character in length");0!==r;){for(;m(r);)r=e.input.charCodeAt(++e.position);if(35===r){do{r=e.input.charCodeAt(++e.position)}while(0!==r&&!h(r));break}if(h(r))break;for(t=e.position;0!==r&&!y(r);)r=e.input.charCodeAt(++e.position);o.push(e.input.slice(t,e.position))}0!==r&&D(e),a.call(I,i)?I[i](e,i,o):P(e,'unknown document directive "'+i+'"')}M(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,M(e,!0,-1)):n&&j(e,"directives end mark is expected"),H(e,e.lineIndent-1,4,!1,!0),M(e,!0,-1),e.checkLineBreaks&&c.test(e.input.slice(t,e.position))&&P(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&z(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,M(e,!0,-1)):e.positiona&&(o=" ... ",t=n-a+o.length),r-n>a&&(s=" ...",r=n+a-s.length),{str:o+e.slice(t,r).replace(/\t/g,"\u2192")+s,pos:n-t+o.length}}function o(e,t){return n.repeat(" ",t-e.length)+e}e.exports=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);const r=/\r?\n|\r|\0/g,s=[0],a=[];let l,c=-1;for(;l=r.exec(e.buffer);)a.push(l.index),s.push(l.index+l[0].length),e.position<=l.index&&c<0&&(c=s.length-2);c<0&&(c=s.length-1);let u="";const p=Math.min(e.line+t.linesAfter,a.length).toString().length,d=t.maxLength-(t.indent+p+3);for(let h=1;h<=t.linesBefore&&!(c-h<0);h++){const r=i(e.buffer,s[c-h],a[c-h],e.position-(s[c]-s[c-h]),d);u=n.repeat(" ",t.indent)+o((e.line-h+1).toString(),p)+" | "+r.str+"\n"+u}const f=i(e.buffer,s[c],a[c],e.position,d);u+=n.repeat(" ",t.indent)+o((e.line+1).toString(),p)+" | "+f.str+"\n",u+=n.repeat("-",t.indent+p+3+f.pos)+"^\n";for(let h=1;h<=t.linesAfter&&!(c+h>=a.length);h++){const r=i(e.buffer,s[c+h],a[c+h],e.position-(s[c]-s[c+h]),d);u+=n.repeat(" ",t.indent)+o((e.line+h+1).toString(),p)+" | "+r.str+"\n"}return u.replace(/\n$/,"")}},55388(e,t,r){"use strict";const n=r(41231),i=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],o=["scalar","sequence","mapping"];e.exports=function(e,t){if(t=t||{},Object.keys(t).forEach(function(t){if(-1===i.indexOf(t))throw new n('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){const t={};return null!==e&&Object.keys(e).forEach(function(r){e[r].forEach(function(e){t[String(e)]=r})}),t}(t.styleAliases||null),-1===o.indexOf(this.kind))throw new n('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},89342(e,t,r){"use strict";const n=r(55388),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new n("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;let t=0;const r=e.length,n=i;for(let i=0;i64)){if(r<0)return!1;t+=6}}return t%8==0},construct:function(e){const t=e.replace(/[\r\n=]/g,""),r=t.length,n=i;let o=0;const s=[];for(let i=0;i>16&255),s.push(o>>8&255),s.push(255&o)),o=o<<6|n.indexOf(t.charAt(i));const a=r%4*6;return 0===a?(s.push(o>>16&255),s.push(o>>8&255),s.push(255&o)):18===a?(s.push(o>>10&255),s.push(o>>2&255)):12===a&&s.push(o>>4&255),new Uint8Array(s)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){let t="",r=0;const n=e.length,o=i;for(let i=0;i>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[63&r]),r=(r<<8)+e[i];const s=n%3;return 0===s?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[63&r]):2===s?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):1===s&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}})},66199(e,t,r){"use strict";const n=r(55388);e.exports=new n("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;const 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"})},81461(e,t,r){"use strict";const n=r(88433),i=r(55388),o=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),s=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");const a=/^[-+]?[0-9]+e/;e.exports=new i("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&(!!o.test(e)&&(!!isFinite(parseFloat(e,10))||s.test(e)))},construct:function(e){let t=e.toLowerCase();const r="-"===t[0]?-1:1;return"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:r*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||n.isNegativeZero(e))},represent:function(e,t){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(n.isNegativeZero(e))return"-0.0";const r=e.toString(10);return a.test(r)?r.replace("e",".e"):r},defaultStyle:"lowercase"})},44466(e,t,r){"use strict";const n=r(88433),i=r(55388);function o(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function s(e){return e>=48&&e<=55}function a(e){return e>=48&&e<=57}function l(e){let t=e,r=1,n=t[0];if("-"!==n&&"+"!==n||("-"===n&&(r=-1),t=t.slice(1),n=t[0]),"0"===t)return 0;if("0"===n){if("b"===t[1])return r*parseInt(t.slice(2),2);if("x"===t[1])return r*parseInt(t.slice(2),16);if("o"===t[1])return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}e.exports=new i("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;const t=e.length;let r=0,n=!1;if(!t)return!1;let i=e[r];if("-"!==i&&"+"!==i||(i=e[++r]),"0"===i){if(r+1===t)return!0;if(i=e[++r],"b"===i){for(r++;r=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+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"]}})},52369(e,t,r){"use strict";const n=r(55388);e.exports=new n("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},61851(e,t,r){"use strict";const n=r(55388);e.exports=new n("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},59198(e,t,r){"use strict";const n=r(55388);e.exports=new n("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;const 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"},empty:function(){return""}},defaultStyle:"lowercase"})},16946(e,t,r){"use strict";const n=r(55388),i=Object.prototype.hasOwnProperty,o=Object.prototype.toString;e.exports=new n("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;const t=[],r=e;for(let n=0,s=r.length;na))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var u=-1,p=!0,d=2&r?new we:void 0;for(o.set(e,t),o.set(t,e);++u-1},ve.prototype.set=function(e,t){var r=this.__data__,n=Oe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},xe.prototype.clear=function(){this.size=0,this.__data__={hash:new be,map:new(se||ve),string:new be}},xe.prototype.delete=function(e){var t=Te(this,e).delete(e);return this.size-=t?1:0,t},xe.prototype.get=function(e){return Te(this,e).get(e)},xe.prototype.has=function(e){return Te(this,e).has(e)},xe.prototype.set=function(e,t){var r=Te(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},we.prototype.add=we.prototype.push=function(e){return this.__data__.set(e,n),this},we.prototype.has=function(e){return this.__data__.has(e)},Se.prototype.clear=function(){this.__data__=new ve,this.size=0},Se.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Se.prototype.get=function(e){return this.__data__.get(e)},Se.prototype.has=function(e){return this.__data__.has(e)},Se.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ve){var n=r.__data__;if(!se||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new xe(n)}return r.set(e,t),this.size=r.size,this};var Ne=re?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r-1&&e%1==0&&e-1&&e%1==0&&e<=i}function Ve(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function We(e){return null!=e&&"object"==typeof e}var He=I?function(e){return function(t){return e(t)}}(I):function(e){return We(e)&&Ue(e.length)&&!!O[_e(e)]};function Ke(e){return null!=(t=e)&&Ue(t.length)&&!qe(t)?ke(e):Pe(e);var t}e.exports=function(e,t){return Ae(e,t)}},21549(e,t,r){var n=r(22032),i=r(63862),o=r(66721),s=r(12749),a=r(35749);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(s=e.length>3&&"function"==typeof s?(o--,s):void 0,a&&i(r[0],r[1],a)&&(s=o<3?void 0:s,o=1),t=Object(t);++n-1&&e%1==0&&e-1}},31175(e,t,r){var n=r(26025);e.exports=function(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},63040(e,t,r){var n=r(21549),i=r(80079),o=r(68223);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},17670(e,t,r){var n=r(12651);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},90289(e,t,r){var n=r(12651);e.exports=function(e){return n(this,e).get(e)}},4509(e,t,r){var n=r(12651);e.exports=function(e){return n(this,e).has(e)}},72949(e,t,r){var n=r(12651);e.exports=function(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}},81042(e,t,r){var n=r(56110)(Object,"create");e.exports=n},90181(e){e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},86009(e,t,r){e=r.nmd(e);var n=r(34840),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i&&n.process,a=function(){try{var e=o&&o.require&&o.require("util").types;return e||s&&s.binding&&s.binding("util")}catch(t){}}();e.exports=a},59350(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},74335(e){e.exports=function(e,t){return function(r){return e(t(r))}}},56757(e,t,r){var n=r(91033),i=Math.max;e.exports=function(e,t,r){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=i(o.length-t,0),l=Array(a);++s0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},51420(e,t,r){var n=r(80079);e.exports=function(){this.__data__=new n,this.size=0}},90938(e){e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},63605(e){e.exports=function(e){return this.__data__.get(e)}},29817(e){e.exports=function(e){return this.__data__.has(e)}},80945(e,t,r){var n=r(80079),i=r(68223),o=r(53661);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var s=r.__data__;if(!i||s.length<199)return s.push([e,t]),this.size=++r.size,this;r=this.__data__=new o(s)}return r.set(e,t),this.size=r.size,this}},47473(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(r){}try{return e+""}catch(r){}}return""}},37334(e){e.exports=function(e){return function(){return e}}},75288(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},83488(e){e.exports=function(e){return e}},72428(e,t,r){var n=r(27534),i=r(40346),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,l=n(function(){return arguments}())?n:function(e){return i(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=l},56449(e){var t=Array.isArray;e.exports=t},64894(e,t,r){var n=r(1882),i=r(30294);e.exports=function(e){return null!=e&&i(e.length)&&!n(e)}},83693(e,t,r){var n=r(64894),i=r(40346);e.exports=function(e){return i(e)&&n(e)}},3656(e,t,r){e=r.nmd(e);var n=r(9325),i=r(89935),o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,a=s&&s.exports===o?n.Buffer:void 0,l=(a?a.isBuffer:void 0)||i;e.exports=l},1882(e,t,r){var n=r(72552),i=r(23805);e.exports=function(e){if(!i(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},30294(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},23805(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},40346(e){e.exports=function(e){return null!=e&&"object"==typeof e}},11331(e,t,r){var n=r(72552),i=r(28879),o=r(40346),s=Function.prototype,a=Object.prototype,l=s.toString,c=a.hasOwnProperty,u=l.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=n(e))return!1;var t=i(e);if(null===t)return!0;var r=c.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&l.call(r)==u}},37167(e,t,r){var n=r(4901),i=r(27301),o=r(86009),s=o&&o.isTypedArray,a=s?i(s):n;e.exports=a},37241(e,t,r){var n=r(70695),i=r(72903),o=r(64894);e.exports=function(e){return o(e)?n(e,!0):i(e)}},55364(e,t,r){var n=r(85250),i=r(20999)(function(e,t,r){n(e,t,r)});e.exports=i},89935(e){e.exports=function(){return!1}},69884(e,t,r){var n=r(21791),i=r(37241);e.exports=function(e){return n(e,i(e))}},58291(e,t,r){var n,i;!function(){var o,s,a,l,c,u,p,d,f,h,m,y,g,b,v,x,w,S,k,O,_,E,A,j,P,$,C,T,I,N,R=function(e){var t=new R.Builder;return t.pipeline.add(R.trimmer,R.stopWordFilter,R.stemmer),t.searchPipeline.add(R.stemmer),e.call(t,t),t.build()};R.version="2.3.9",R.utils={},R.utils.warn=(o=this,function(e){o.console&&console.warn&&console.warn(e)}),R.utils.asString=function(e){return null==e?"":e.toString()},R.utils.clone=function(e){if(null==e)return e;for(var t=Object.create(null),r=Object.keys(e),n=0;n0){var l=R.utils.clone(t)||{};l.position=[s,a],l.index=i.length,i.push(new R.Token(r.slice(s,o),l))}s=o+1}}return i},R.tokenizer.separator=/[\s\-]+/,R.Pipeline=function(){this._stack=[]},R.Pipeline.registeredFunctions=Object.create(null),R.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&R.utils.warn("Overwriting existing registered function: "+t),e.label=t,R.Pipeline.registeredFunctions[e.label]=e},R.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||R.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},R.Pipeline.load=function(e){var t=new R.Pipeline;return e.forEach(function(e){var r=R.Pipeline.registeredFunctions[e];if(!r)throw new Error("Cannot load unregistered function: "+e);t.add(r)}),t},R.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEach(function(e){R.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)},this)},R.Pipeline.prototype.after=function(e,t){R.Pipeline.warnIfFunctionNotRegistered(t);var r=this._stack.indexOf(e);if(-1==r)throw new Error("Cannot find existingFn");r+=1,this._stack.splice(r,0,t)},R.Pipeline.prototype.before=function(e,t){R.Pipeline.warnIfFunctionNotRegistered(t);var r=this._stack.indexOf(e);if(-1==r)throw new Error("Cannot find existingFn");this._stack.splice(r,0,t)},R.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},R.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r1&&(oe&&(r=i),o!=e);)n=r-t,i=t+Math.floor(n/2),o=this.elements[2*i];return o==e||o>e?2*i:oa?c+=2:s==a&&(t+=r[l+1]*n[c+1],l+=2,c+=2);return t},R.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},R.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t0){var o,s=i.str.charAt(0);s in i.node.edges?o=i.node.edges[s]:(o=new R.TokenSet,i.node.edges[s]=o),1==i.str.length&&(o.final=!0),n.push({node:o,editsRemaining:i.editsRemaining,str:i.str.slice(1)})}if(0!=i.editsRemaining){if("*"in i.node.edges)var a=i.node.edges["*"];else{a=new R.TokenSet;i.node.edges["*"]=a}if(0==i.str.length&&(a.final=!0),n.push({node:a,editsRemaining:i.editsRemaining-1,str:i.str}),i.str.length>1&&n.push({node:i.node,editsRemaining:i.editsRemaining-1,str:i.str.slice(1)}),1==i.str.length&&(i.node.final=!0),i.str.length>=1){if("*"in i.node.edges)var l=i.node.edges["*"];else{l=new R.TokenSet;i.node.edges["*"]=l}1==i.str.length&&(l.final=!0),n.push({node:l,editsRemaining:i.editsRemaining-1,str:i.str.slice(1)})}if(i.str.length>1){var c,u=i.str.charAt(0),p=i.str.charAt(1);p in i.node.edges?c=i.node.edges[p]:(c=new R.TokenSet,i.node.edges[p]=c),1==i.str.length&&(c.final=!0),n.push({node:c,editsRemaining:i.editsRemaining-1,str:u+i.str.slice(2)})}}}return r},R.TokenSet.fromString=function(e){for(var t=new R.TokenSet,r=t,n=0,i=e.length;n=e;t--){var r=this.uncheckedNodes[t],n=r.child.toString();n in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[n]:(r.child._str=n,this.minimizedNodes[n]=r.child),this.uncheckedNodes.pop()}},R.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},R.Index.prototype.search=function(e){return this.query(function(t){new R.QueryParser(e,t).parse()})},R.Index.prototype.query=function(e){for(var t=new R.Query(this.fields),r=Object.create(null),n=Object.create(null),i=Object.create(null),o=Object.create(null),s=Object.create(null),a=0;a1?1:e},R.Builder.prototype.k1=function(e){this._k1=e},R.Builder.prototype.add=function(e,t){var r=e[this._ref],n=Object.keys(this._fields);this._documents[r]=t||{},this.documentCount+=1;for(var i=0;i=this.length)return R.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},R.QueryLexer.prototype.width=function(){return this.pos-this.start},R.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},R.QueryLexer.prototype.backup=function(){this.pos-=1},R.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do{t=(e=this.next()).charCodeAt(0)}while(t>47&&t<58);e!=R.QueryLexer.EOS&&this.backup()},R.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(R.QueryLexer.TERM)),e.ignore(),e.more())return R.QueryLexer.lexText},R.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(R.QueryLexer.EDIT_DISTANCE),R.QueryLexer.lexText},R.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(R.QueryLexer.BOOST),R.QueryLexer.lexText},R.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(R.QueryLexer.TERM)},R.QueryLexer.termSeparator=R.tokenizer.separator,R.QueryLexer.lexText=function(e){for(;;){var t=e.next();if(t==R.QueryLexer.EOS)return R.QueryLexer.lexEOS;if(92!=t.charCodeAt(0)){if(":"==t)return R.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(R.QueryLexer.TERM),R.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(R.QueryLexer.TERM),R.QueryLexer.lexBoost;if("+"==t&&1===e.width())return e.emit(R.QueryLexer.PRESENCE),R.QueryLexer.lexText;if("-"==t&&1===e.width())return e.emit(R.QueryLexer.PRESENCE),R.QueryLexer.lexText;if(t.match(R.QueryLexer.termSeparator))return R.QueryLexer.lexTerm}else e.escapeCharacter()}},R.QueryParser=function(e,t){this.lexer=new R.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0},R.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=R.QueryParser.parseClause;e;)e=e(this);return this.query},R.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},R.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},R.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},R.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(null!=t)switch(t.type){case R.QueryLexer.PRESENCE:return R.QueryParser.parsePresence;case R.QueryLexer.FIELD:return R.QueryParser.parseField;case R.QueryLexer.TERM:return R.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+t.type;throw t.str.length>=1&&(r+=" with value '"+t.str+"'"),new R.QueryParseError(r,t.start,t.end)}},R.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(null!=t){switch(t.str){case"-":e.currentClause.presence=R.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=R.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+t.str+"'";throw new R.QueryParseError(r,t.start,t.end)}var n=e.peekLexeme();if(null==n){r="expecting term or field, found nothing";throw new R.QueryParseError(r,t.start,t.end)}switch(n.type){case R.QueryLexer.FIELD:return R.QueryParser.parseField;case R.QueryLexer.TERM:return R.QueryParser.parseTerm;default:r="expecting term or field, found '"+n.type+"'";throw new R.QueryParseError(r,n.start,n.end)}}},R.QueryParser.parseField=function(e){var t=e.consumeLexeme();if(null!=t){if(-1==e.query.allFields.indexOf(t.str)){var r=e.query.allFields.map(function(e){return"'"+e+"'"}).join(", "),n="unrecognised field '"+t.str+"', possible fields: "+r;throw new R.QueryParseError(n,t.start,t.end)}e.currentClause.fields=[t.str];var i=e.peekLexeme();if(null==i){n="expecting term, found nothing";throw new R.QueryParseError(n,t.start,t.end)}if(i.type===R.QueryLexer.TERM)return R.QueryParser.parseTerm;n="expecting term, found '"+i.type+"'";throw new R.QueryParseError(n,i.start,i.end)}},R.QueryParser.parseTerm=function(e){var t=e.consumeLexeme();if(null!=t){e.currentClause.term=t.str.toLowerCase(),-1!=t.str.indexOf("*")&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(null!=r)switch(r.type){case R.QueryLexer.TERM:return e.nextClause(),R.QueryParser.parseTerm;case R.QueryLexer.FIELD:return e.nextClause(),R.QueryParser.parseField;case R.QueryLexer.EDIT_DISTANCE:return R.QueryParser.parseEditDistance;case R.QueryLexer.BOOST:return R.QueryParser.parseBoost;case R.QueryLexer.PRESENCE:return e.nextClause(),R.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+r.type+"'";throw new R.QueryParseError(n,r.start,r.end)}else e.nextClause()}},R.QueryParser.parseEditDistance=function(e){var t=e.consumeLexeme();if(null!=t){var r=parseInt(t.str,10);if(isNaN(r)){var n="edit distance must be numeric";throw new R.QueryParseError(n,t.start,t.end)}e.currentClause.editDistance=r;var i=e.peekLexeme();if(null!=i)switch(i.type){case R.QueryLexer.TERM:return e.nextClause(),R.QueryParser.parseTerm;case R.QueryLexer.FIELD:return e.nextClause(),R.QueryParser.parseField;case R.QueryLexer.EDIT_DISTANCE:return R.QueryParser.parseEditDistance;case R.QueryLexer.BOOST:return R.QueryParser.parseBoost;case R.QueryLexer.PRESENCE:return e.nextClause(),R.QueryParser.parsePresence;default:n="Unexpected lexeme type '"+i.type+"'";throw new R.QueryParseError(n,i.start,i.end)}else e.nextClause()}},R.QueryParser.parseBoost=function(e){var t=e.consumeLexeme();if(null!=t){var r=parseInt(t.str,10);if(isNaN(r)){var n="boost must be numeric";throw new R.QueryParseError(n,t.start,t.end)}e.currentClause.boost=r;var i=e.peekLexeme();if(null!=i)switch(i.type){case R.QueryLexer.TERM:return e.nextClause(),R.QueryParser.parseTerm;case R.QueryLexer.FIELD:return e.nextClause(),R.QueryParser.parseField;case R.QueryLexer.EDIT_DISTANCE:return R.QueryParser.parseEditDistance;case R.QueryLexer.BOOST:return R.QueryParser.parseBoost;case R.QueryLexer.PRESENCE:return e.nextClause(),R.QueryParser.parsePresence;default:n="Unexpected lexeme type '"+i.type+"'";throw new R.QueryParseError(n,i.start,i.end)}else e.nextClause()}},void 0===(i="function"==typeof(n=function(){return R})?n.call(t,r,t,e):n)||(e.exports=i)}()},689(e){e.exports=function(){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},r=function(){function e(e,t){for(var r=0;r1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5e3;t(this,e),this.ctx=r,this.iframes=n,this.exclude=i,this.iframesTimeout=o}return r(e,[{key:"getContexts",value:function(){var e=[];return(void 0!==this.ctx&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:"string"==typeof this.ctx?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach(function(t){var r=e.filter(function(e){return e.contains(t)}).length>0;-1!==e.indexOf(t)||r||e.push(t)}),e}},{key:"getIframeContents",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},n=void 0;try{var i=e.contentWindow;if(n=i.document,!i||!n)throw new Error("iframe inaccessible")}catch(o){r()}n&&t(n)}},{key:"isIframeBlank",value:function(e){var t="about:blank",r=e.getAttribute("src").trim();return e.contentWindow.location.href===t&&r!==t&&r}},{key:"observeIframeLoad",value:function(e,t,r){var n=this,i=!1,o=null,s=function s(){if(!i){i=!0,clearTimeout(o);try{n.isIframeBlank(e)||(e.removeEventListener("load",s),n.getIframeContents(e,t,r))}catch(a){r()}}};e.addEventListener("load",s),o=setTimeout(s,this.iframesTimeout)}},{key:"onIframeReady",value:function(e,t,r){try{"complete"===e.contentWindow.document.readyState?this.isIframeBlank(e)?this.observeIframeLoad(e,t,r):this.getIframeContents(e,t,r):this.observeIframeLoad(e,t,r)}catch(n){r()}}},{key:"waitForIframes",value:function(e,t){var r=this,n=0;this.forEachIframe(e,function(){return!0},function(e){n++,r.waitForIframes(e.querySelector("html"),function(){--n||t()})},function(e){e||t()})}},{key:"forEachIframe",value:function(t,r,n){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},s=t.querySelectorAll("iframe"),a=s.length,l=0;s=Array.prototype.slice.call(s);var c=function(){--a<=0&&o(l)};a||c(),s.forEach(function(t){e.matches(t,i.exclude)?c():i.onIframeReady(t,function(e){r(t)&&(l++,n(e)),c()},c)})}},{key:"createIterator",value:function(e,t,r){return document.createNodeIterator(e,t,r,!1)}},{key:"createInstanceOnIframe",value:function(t){return new e(t.querySelector("html"),this.iframes)}},{key:"compareNodeIframe",value:function(e,t,r){if(e.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_PRECEDING){if(null===t)return!0;if(t.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_FOLLOWING)return!0}return!1}},{key:"getIteratorNode",value:function(e){var t=e.previousNode();return{prevNode:t,node:(null===t||e.nextNode())&&e.nextNode()}}},{key:"checkIframeFilter",value:function(e,t,r,n){var i=!1,o=!1;return n.forEach(function(e,t){e.val===r&&(i=t,o=e.handled)}),this.compareNodeIframe(e,t,r)?(!1!==i||o?!1===i||o||(n[i].handled=!0):n.push({val:r,handled:!0}),!0):(!1===i&&n.push({val:r,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(e,t,r,n){var i=this;e.forEach(function(e){e.handled||i.getIframeContents(e.val,function(e){i.createInstanceOnIframe(e).forEachNode(t,r,n)})})}},{key:"iterateThroughNodes",value:function(e,t,r,n,i){for(var o=this,s=this.createIterator(t,e,n),a=[],l=[],c=void 0,u=void 0,p=function(){var e=o.getIteratorNode(s);return u=e.prevNode,c=e.node};p();)this.iframes&&this.forEachIframe(t,function(e){return o.checkIframeFilter(c,u,e,a)},function(t){o.createInstanceOnIframe(t).forEachNode(e,function(e){return l.push(e)},n)}),l.push(c);l.forEach(function(e){r(e)}),this.iframes&&this.handleOpenIframes(a,e,r,n),i()}},{key:"forEachNode",value:function(e,t,r){var n=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},o=this.getContexts(),s=o.length;s||i(),o.forEach(function(o){var a=function(){n.iterateThroughNodes(e,o,t,r,function(){--s<=0&&i()})};n.iframes?n.waitForIframes(o,a):a()})}}],[{key:"matches",value:function(e,t){var r="string"==typeof t?[t]:t,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(n){var i=!1;return r.every(function(t){return!n.call(e,t)||(i=!0,!1)}),i}return!1}}]),e}(),o=function(){function o(e){t(this,o),this.ctx=e,this.ie=!1;var r=window.navigator.userAgent;(r.indexOf("MSIE")>-1||r.indexOf("Trident")>-1)&&(this.ie=!0)}return r(o,[{key:"log",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"debug",n=this.opt.log;this.opt.debug&&"object"===(void 0===n?"undefined":e(n))&&"function"==typeof n[r]&&n[r]("mark.js: "+t)}},{key:"escapeStr",value:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}},{key:"createRegExp",value:function(e){return"disabled"!==this.opt.wildcards&&(e=this.setupWildcardsRegExp(e)),e=this.escapeStr(e),Object.keys(this.opt.synonyms).length&&(e=this.createSynonymsRegExp(e)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),this.opt.diacritics&&(e=this.createDiacriticsRegExp(e)),e=this.createMergedBlanksRegExp(e),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.createJoinersRegExp(e)),"disabled"!==this.opt.wildcards&&(e=this.createWildcardsRegExp(e)),e=this.createAccuracyRegExp(e)}},{key:"createSynonymsRegExp",value:function(e){var t=this.opt.synonyms,r=this.opt.caseSensitive?"":"i",n=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(var i in t)if(t.hasOwnProperty(i)){var o=t[i],s="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(i):this.escapeStr(i),a="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(o):this.escapeStr(o);""!==s&&""!==a&&(e=e.replace(new RegExp("("+this.escapeStr(s)+"|"+this.escapeStr(a)+")","gm"+r),n+"("+this.processSynomyms(s)+"|"+this.processSynomyms(a)+")"+n))}return e}},{key:"processSynomyms",value:function(e){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),e}},{key:"setupWildcardsRegExp",value:function(e){return(e=e.replace(/(?:\\)*\?/g,function(e){return"\\"===e.charAt(0)?"?":"\x01"})).replace(/(?:\\)*\*/g,function(e){return"\\"===e.charAt(0)?"*":"\x02"})}},{key:"createWildcardsRegExp",value:function(e){var t="withSpaces"===this.opt.wildcards;return e.replace(/\u0001/g,t?"[\\S\\s]?":"\\S?").replace(/\u0002/g,t?"[\\S\\s]*?":"\\S*")}},{key:"setupIgnoreJoinersRegExp",value:function(e){return e.replace(/[^(|)\\]/g,function(e,t,r){var n=r.charAt(t+1);return/[(|)\\]/.test(n)||""===n?e:e+"\0"})}},{key:"createJoinersRegExp",value:function(e){var t=[],r=this.opt.ignorePunctuation;return Array.isArray(r)&&r.length&&t.push(this.escapeStr(r.join(""))),this.opt.ignoreJoiners&&t.push("\\u00ad\\u200b\\u200c\\u200d"),t.length?e.split(/\u0000+/).join("["+t.join("")+"]*"):e}},{key:"createDiacriticsRegExp",value:function(e){var t=this.opt.caseSensitive?"":"i",r=this.opt.caseSensitive?["a\xe0\xe1\u1ea3\xe3\u1ea1\u0103\u1eb1\u1eaf\u1eb3\u1eb5\u1eb7\xe2\u1ea7\u1ea5\u1ea9\u1eab\u1ead\xe4\xe5\u0101\u0105","A\xc0\xc1\u1ea2\xc3\u1ea0\u0102\u1eb0\u1eae\u1eb2\u1eb4\u1eb6\xc2\u1ea6\u1ea4\u1ea8\u1eaa\u1eac\xc4\xc5\u0100\u0104","c\xe7\u0107\u010d","C\xc7\u0106\u010c","d\u0111\u010f","D\u0110\u010e","e\xe8\xe9\u1ebb\u1ebd\u1eb9\xea\u1ec1\u1ebf\u1ec3\u1ec5\u1ec7\xeb\u011b\u0113\u0119","E\xc8\xc9\u1eba\u1ebc\u1eb8\xca\u1ec0\u1ebe\u1ec2\u1ec4\u1ec6\xcb\u011a\u0112\u0118","i\xec\xed\u1ec9\u0129\u1ecb\xee\xef\u012b","I\xcc\xcd\u1ec8\u0128\u1eca\xce\xcf\u012a","l\u0142","L\u0141","n\xf1\u0148\u0144","N\xd1\u0147\u0143","o\xf2\xf3\u1ecf\xf5\u1ecd\xf4\u1ed3\u1ed1\u1ed5\u1ed7\u1ed9\u01a1\u1edf\u1ee1\u1edb\u1edd\u1ee3\xf6\xf8\u014d","O\xd2\xd3\u1ece\xd5\u1ecc\xd4\u1ed2\u1ed0\u1ed4\u1ed6\u1ed8\u01a0\u1ede\u1ee0\u1eda\u1edc\u1ee2\xd6\xd8\u014c","r\u0159","R\u0158","s\u0161\u015b\u0219\u015f","S\u0160\u015a\u0218\u015e","t\u0165\u021b\u0163","T\u0164\u021a\u0162","u\xf9\xfa\u1ee7\u0169\u1ee5\u01b0\u1eeb\u1ee9\u1eed\u1eef\u1ef1\xfb\xfc\u016f\u016b","U\xd9\xda\u1ee6\u0168\u1ee4\u01af\u1eea\u1ee8\u1eec\u1eee\u1ef0\xdb\xdc\u016e\u016a","y\xfd\u1ef3\u1ef7\u1ef9\u1ef5\xff","Y\xdd\u1ef2\u1ef6\u1ef8\u1ef4\u0178","z\u017e\u017c\u017a","Z\u017d\u017b\u0179"]:["a\xe0\xe1\u1ea3\xe3\u1ea1\u0103\u1eb1\u1eaf\u1eb3\u1eb5\u1eb7\xe2\u1ea7\u1ea5\u1ea9\u1eab\u1ead\xe4\xe5\u0101\u0105A\xc0\xc1\u1ea2\xc3\u1ea0\u0102\u1eb0\u1eae\u1eb2\u1eb4\u1eb6\xc2\u1ea6\u1ea4\u1ea8\u1eaa\u1eac\xc4\xc5\u0100\u0104","c\xe7\u0107\u010dC\xc7\u0106\u010c","d\u0111\u010fD\u0110\u010e","e\xe8\xe9\u1ebb\u1ebd\u1eb9\xea\u1ec1\u1ebf\u1ec3\u1ec5\u1ec7\xeb\u011b\u0113\u0119E\xc8\xc9\u1eba\u1ebc\u1eb8\xca\u1ec0\u1ebe\u1ec2\u1ec4\u1ec6\xcb\u011a\u0112\u0118","i\xec\xed\u1ec9\u0129\u1ecb\xee\xef\u012bI\xcc\xcd\u1ec8\u0128\u1eca\xce\xcf\u012a","l\u0142L\u0141","n\xf1\u0148\u0144N\xd1\u0147\u0143","o\xf2\xf3\u1ecf\xf5\u1ecd\xf4\u1ed3\u1ed1\u1ed5\u1ed7\u1ed9\u01a1\u1edf\u1ee1\u1edb\u1edd\u1ee3\xf6\xf8\u014dO\xd2\xd3\u1ece\xd5\u1ecc\xd4\u1ed2\u1ed0\u1ed4\u1ed6\u1ed8\u01a0\u1ede\u1ee0\u1eda\u1edc\u1ee2\xd6\xd8\u014c","r\u0159R\u0158","s\u0161\u015b\u0219\u015fS\u0160\u015a\u0218\u015e","t\u0165\u021b\u0163T\u0164\u021a\u0162","u\xf9\xfa\u1ee7\u0169\u1ee5\u01b0\u1eeb\u1ee9\u1eed\u1eef\u1ef1\xfb\xfc\u016f\u016bU\xd9\xda\u1ee6\u0168\u1ee4\u01af\u1eea\u1ee8\u1eec\u1eee\u1ef0\xdb\xdc\u016e\u016a","y\xfd\u1ef3\u1ef7\u1ef9\u1ef5\xffY\xdd\u1ef2\u1ef6\u1ef8\u1ef4\u0178","z\u017e\u017c\u017aZ\u017d\u017b\u0179"],n=[];return e.split("").forEach(function(i){r.every(function(r){if(-1!==r.indexOf(i)){if(n.indexOf(r)>-1)return!1;e=e.replace(new RegExp("["+r+"]","gm"+t),"["+r+"]"),n.push(r)}return!0})}),e}},{key:"createMergedBlanksRegExp",value:function(e){return e.replace(/[\s]+/gim,"[\\s]+")}},{key:"createAccuracyRegExp",value:function(e){var t=this,r="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~\xa1\xbf",n=this.opt.accuracy,i="string"==typeof n?n:n.value,o="string"==typeof n?[]:n.limiters,s="";switch(o.forEach(function(e){s+="|"+t.escapeStr(e)}),i){case"partially":default:return"()("+e+")";case"complementary":return"()([^"+(s="\\s"+(s||this.escapeStr(r)))+"]*"+e+"[^"+s+"]*)";case"exactly":return"(^|\\s"+s+")("+e+")(?=$|\\s"+s+")"}}},{key:"getSeparatedKeywords",value:function(e){var t=this,r=[];return e.forEach(function(e){t.opt.separateWordSearch?e.split(" ").forEach(function(e){e.trim()&&-1===r.indexOf(e)&&r.push(e)}):e.trim()&&-1===r.indexOf(e)&&r.push(e)}),{keywords:r.sort(function(e,t){return t.length-e.length}),length:r.length}}},{key:"isNumeric",value:function(e){return Number(parseFloat(e))==e}},{key:"checkRanges",value:function(e){var t=this;if(!Array.isArray(e)||"[object Object]"!==Object.prototype.toString.call(e[0]))return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(e),[];var r=[],n=0;return e.sort(function(e,t){return e.start-t.start}).forEach(function(e){var i=t.callNoMatchOnInvalidRanges(e,n),o=i.start,s=i.end;i.valid&&(e.start=o,e.length=s-o,r.push(e),n=s)}),r}},{key:"callNoMatchOnInvalidRanges",value:function(e,t){var r=void 0,n=void 0,i=!1;return e&&void 0!==e.start?(n=(r=parseInt(e.start,10))+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&n-t>0&&n-r>0?i=!0:(this.log("Ignoring invalid or overlapping range: "+JSON.stringify(e)),this.opt.noMatch(e))):(this.log("Ignoring invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:r,end:n,valid:i}}},{key:"checkWhitespaceRanges",value:function(e,t,r){var n=void 0,i=!0,o=r.length,s=t-o,a=parseInt(e.start,10)-s;return(n=(a=a>o?o:a)+parseInt(e.length,10))>o&&(n=o,this.log("End range automatically set to the max value of "+o)),a<0||n-a<0||a>o||n>o?(i=!1,this.log("Invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)):""===r.substring(a,n).replace(/\s+/g,"")&&(i=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:a,end:n,valid:i}}},{key:"getTextNodes",value:function(e){var t=this,r="",n=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,function(e){n.push({start:r.length,end:(r+=e.textContent).length,node:e})},function(e){return t.matchesExclude(e.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},function(){e({value:r,nodes:n})})}},{key:"matchesExclude",value:function(e){return i.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}},{key:"wrapRangeInTextNode",value:function(e,t,r){var n=this.opt.element?this.opt.element:"mark",i=e.splitText(t),o=i.splitText(r-t),s=document.createElement(n);return s.setAttribute("data-markjs","true"),this.opt.className&&s.setAttribute("class",this.opt.className),s.textContent=i.textContent,i.parentNode.replaceChild(s,i),o}},{key:"wrapRangeInMappedTextNode",value:function(e,t,r,n,i){var o=this;e.nodes.every(function(s,a){var l=e.nodes[a+1];if(void 0===l||l.start>t){if(!n(s.node))return!1;var c=t-s.start,u=(r>s.end?s.end:r)-s.start,p=e.value.substr(0,s.start),d=e.value.substr(u+s.start);if(s.node=o.wrapRangeInTextNode(s.node,c,u),e.value=p+d,e.nodes.forEach(function(t,r){r>=a&&(e.nodes[r].start>0&&r!==a&&(e.nodes[r].start-=u),e.nodes[r].end-=u)}),r-=u,i(s.node.previousSibling,s.start),!(r>s.end))return!1;t=s.end}return!0})}},{key:"wrapMatches",value:function(e,t,r,n,i){var o=this,s=0===t?0:t+1;this.getTextNodes(function(t){t.nodes.forEach(function(t){t=t.node;for(var i=void 0;null!==(i=e.exec(t.textContent))&&""!==i[s];)if(r(i[s],t)){var a=i.index;if(0!==s)for(var l=1;lG,Observer:()=>E,PropTypes:()=>ce,Provider:()=>Y,disposeOnUnmount:()=>ie,enableStaticRendering:()=>u,inject:()=>J,isUsingStaticRendering:()=>p,observer:()=>H,observerBatching:()=>a,useAsObservableSource:()=>j,useLocalObservable:()=>A,useLocalStore:()=>P,useObserver:()=>$,useStaticRendering:()=>C});var n=r(27813),i=r(96540);if(!i.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!n.makeObservable)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");var o=r(40961);function s(e){e()}function a(e){e||(e=s),(0,n.configure)({reactionScheduler:e})}function l(e){return(0,n.getDependencyTree)(e)}var c=!1;function u(e){c=e}function p(){return c}var d,f,h=function(){function e(e){var t=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(e){void 0===e&&(e=1e4),clearTimeout(t.sweepTimeout),t.sweepTimeout=void 0;var r=Date.now();t.registrations.forEach(function(n,i){r-n.registeredAt>=e&&(t.finalize(n.value),t.registrations.delete(i))}),t.registrations.size>0&&t.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){this.registrations.set(r,{value:t,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.registrations.delete(e)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){void 0===this.sweepTimeout&&(this.sweepTimeout=setTimeout(this.sweep,1e4))}}),e}(),m=new("undefined"!=typeof FinalizationRegistry?FinalizationRegistry:h)(function(e){var t;null===(t=e.reaction)||void 0===t||t.dispose(),e.reaction=null}),y=r(19888);function g(e){e.reaction=new n.Reaction("observer".concat(e.name),function(){var t;e.stateVersion=Symbol(),null===(t=e.onStoreChange)||void 0===t||t.call(e)})}function b(e,t){if(void 0===t&&(t="observed"),p())return e();var r=i.useRef(null);if(!r.current){var n={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:t,subscribe:function(e){return m.unregister(n),n.onStoreChange=e,n.reaction||(g(n),n.stateVersion=Symbol()),function(){var e;n.onStoreChange=null,null===(e=n.reaction)||void 0===e||e.dispose(),n.reaction=null}},getSnapshot:function(){return n.stateVersion}};r.current=n}var o,s,a=r.current;if(a.reaction||(g(a),m.register(r,a,a)),i.useDebugValue(a.reaction,l),(0,y.useSyncExternalStore)(a.subscribe,a.getSnapshot,a.getSnapshot),a.reaction.track(function(){try{o=e()}catch(t){s=t}}),s)throw s;return o}var v="function"==typeof Symbol&&Symbol.for,x=null!==(f=null===(d=Object.getOwnPropertyDescriptor(function(){},"name"))||void 0===d?void 0:d.configurable)&&void 0!==f&&f,w=v?Symbol.for("react.forward_ref"):"function"==typeof i.forwardRef&&(0,i.forwardRef)(function(e){return null}).$$typeof,S=v?Symbol.for("react.memo"):"function"==typeof i.memo&&(0,i.memo)(function(e){return null}).$$typeof;function k(e,t){var r;if(S&&e.$$typeof===S)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");if(p())return e;var n=null!==(r=null==t?void 0:t.forwardRef)&&void 0!==r&&r,o=e,s=e.displayName||e.name;if(w&&e.$$typeof===w&&(n=!0,"function"!=typeof(o=e.render)))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var a,l,c=function(e,t){return b(function(){return o(e,t)},s)};return c.displayName=e.displayName,x&&Object.defineProperty(c,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(c.contextTypes=e.contextTypes),n&&(c=(0,i.forwardRef)(c)),c=(0,i.memo)(c),a=e,l=c,Object.keys(a).forEach(function(e){_[e]||Object.defineProperty(l,e,Object.getOwnPropertyDescriptor(a,e))}),c}var O,_={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function E(e){var t=e.children,r=e.render;t&&r&&console.error("MobX Observer: Do not use children and render in the same time in `Observer`");var n=t||r;return"function"!=typeof n?null:b(n)}function A(e,t){return(0,i.useState)(function(){return(0,n.observable)(e(),t,{autoBind:!0})})[0]}function j(e){var t=(0,i.useState)(function(){return(0,n.observable)(e,{},{deep:!1})})[0];return(0,n.runInAction)(function(){Object.assign(t,e)}),t}function P(e,t){var r=t&&j(t);return(0,i.useState)(function(){return(0,n.observable)(e(r),void 0,{autoBind:!0})})[0]}E.displayName="Observer",a(o.unstable_batchedUpdates);O=m.finalizeAllImmediately;function $(e,t){return void 0===t&&(t="observed"),b(e,t)}function C(e){u(e)}function T(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}var I={$$typeof:1,render:1,compare:1,type:1,childContextTypes:1,contextType:1,contextTypes:1,defaultProps:1,getDefaultProps:1,getDerivedStateFromError:1,getDerivedStateFromProps:1,mixins:1,displayName:1,propTypes:1};var N=Symbol("patchMixins"),R=Symbol("patchedDefinition");function L(e,t){for(var r=this,n=arguments.length,i=new Array(n>2?n-2:0),o=2;o"}function V(e){var t=e.bind(this),r=q(this);return function(){r.reaction||(r.reaction=function(t){return new n.Reaction(t.name+".render()",function(){if(t.mounted)try{null==t.forceUpdate||t.forceUpdate()}catch(e){var r;null==(r=t.reaction)||r.dispose(),t.reaction=null}else t.reactionInvalidatedBeforeMount=!0})}(r),r.mounted||m.register(this,r,this));var e=void 0,i=void 0;if(r.reaction.track(function(){try{i=(0,n._allowStateChanges)(!1,t)}catch(r){e=r}}),e)throw e;return i}}function W(e,t){return p()&&console.warn("[mobx-react] It seems that a re-rendering of a React component is triggered while in static (server-side) mode. Please make sure components are rendered only once server-side."),this.state!==t||!function(e,t){if(T(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var i=0;i {}` or `render = function() {}` is not supported.")}t.render=function(){return Object.defineProperty(this,"render",{configurable:!1,writable:!1,value:p()?n:V.call(this,n)}),this.render()};var s=t.componentDidMount;return t.componentDidMount=function(){var e=this,t=q(this);return t.mounted=!0,m.unregister(this),t.forceUpdate=function(){return e.forceUpdate()},t.reaction&&!t.reactionInvalidatedBeforeMount||t.forceUpdate(),null==s?void 0:s.apply(this,arguments)},M(t,"componentWillUnmount",function(){var e;if(!p()){var t=q(this);null==(e=t.reaction)||e.dispose(),t.reaction=null,t.forceUpdate=null,t.mounted=!1,t.reactionInvalidatedBeforeMount=!1}}),e}(e):k(e)}function K(){return K=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)continue;r[n]=e[n]}return r}(e,Q),n=i.useContext(G),o=i.useRef(K({},n,r)).current;return i.createElement(G.Provider,{value:o},t)}function X(e,t,r,n){var o,s,a,l=i.forwardRef(function(r,n){var o=K({},r),s=i.useContext(G);return Object.assign(o,e(s||{},o)||{}),n&&(o.ref=n),i.createElement(t,o)});return n&&(l=H(l)),l.isMobxInjector=!0,o=t,s=l,a=Object.getOwnPropertyNames(Object.getPrototypeOf(o)),Object.getOwnPropertyNames(o).forEach(function(e){I[e]||-1!==a.indexOf(e)||Object.defineProperty(s,e,Object.getOwnPropertyDescriptor(o,e))}),l.wrappedComponent=t,l.displayName=function(e,t){var r,n=e.displayName||e.name||e.constructor&&e.constructor.name||"Component";r=t?"inject-with-"+t+"("+n+")":"inject("+n+")";return r}(t,r),l}function J(){for(var e=arguments.length,t=new Array(e),r=0;r=18?console.error("[mobx-react] disposeOnUnmount is not compatible with React 18 and higher. Don't use it."):console.warn("[mobx-react] disposeOnUnmount is deprecated. It won't work correctly with React 18 and higher."),ee=!0);var r=Object.getPrototypeOf(e).constructor,n=Object.getPrototypeOf(e.constructor),o=Object.getPrototypeOf(Object.getPrototypeOf(e));if(r!==i.Component&&r!==i.PureComponent&&n!==i.Component&&n!==i.PureComponent&&o!==i.Component&&o!==i.PureComponent)throw new Error("[mobx-react] disposeOnUnmount only supports direct subclasses of React.Component or React.PureComponent.");if("string"!=typeof t&&"function"!=typeof t&&!Array.isArray(t))throw new Error("[mobx-react] disposeOnUnmount only works if the parameter is either a property key or a function.");var s="string"==typeof t,a=!!e[te]||!!e[re];return(s?e[te]||(e[te]=[]):e[re]||(e[re]=[])).push(t),a||M(e,"componentWillUnmount",ne),"string"!=typeof t?t:void 0}function oe(e){function t(t,r,i,o,s,a){for(var l=arguments.length,c=new Array(l>6?l-6:0),u=6;u>",a=a||i,null==r[i]){if(t){var n=null===r[i]?"null":"undefined";return new Error("The "+s+" `"+a+"` is marked as required in `"+o+"`, but its value is `"+n+"`.")}return null}return e.apply(void 0,[r,i,o,s,a].concat(c))})}var r=t.bind(null,!1);return r.isRequired=t.bind(null,!0),r}function se(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}function ae(e,t){return oe(function(r,i,o,s,a){return(0,n.untracked)(function(){if(e&&se(r[i])===t.toLowerCase())return null;var s;switch(t){case"Array":s=n.isObservableArray;break;case"Object":s=n.isObservableObject;break;case"Map":s=n.isObservableMap;break;default:throw new Error("Unexpected mobxType: "+t)}var l=r[i];if(!s(l)){var c=function(e){var t=se(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}(l),u=e?" or javascript `"+t.toLowerCase()+"`":"";return new Error("Invalid prop `"+a+"` of type `"+c+"` supplied to `"+o+"`, expected `mobx.Observable"+t+"`"+u+".")}return null})})}function le(e,t){return oe(function(r,i,o,s,a){for(var l=arguments.length,c=new Array(l>5?l-5:0),u=5;uH,FlowCancellationError:()=>ur,ObservableMap:()=>yn,ObservableSet:()=>xn,Reaction:()=>$t,_allowStateChanges:()=>Qe,_allowStateChangesInsideComputed:()=>Kt,_allowStateReadsEnd:()=>ht,_allowStateReadsStart:()=>ft,_autoAction:()=>Ht,_endAction:()=>Ke,_getAdministration:()=>Vn,_getGlobalState:()=>wt,_interceptReads:()=>br,_isComputingDerivation:()=>st,_resetGlobalState:()=>St,_startAction:()=>He,action:()=>Wt,autorun:()=>Gt,comparer:()=>Y,computed:()=>ze,configure:()=>nr,createAtom:()=>G,defineProperty:()=>Ir,entries:()=>jr,extendObservable:()=>ir,flow:()=>hr,flowResult:()=>yr,get:()=>Tr,getAtom:()=>Un,getDebugName:()=>Wn,getDependencyTree:()=>or,getObserverTree:()=>ar,has:()=>Cr,intercept:()=>vr,isAction:()=>Qt,isBoxedObservable:()=>Je,isComputed:()=>wr,isComputedProp:()=>Sr,isFlow:()=>gr,isFlowCancellationError:()=>pr,isObservable:()=>Or,isObservableArray:()=>dn,isObservableMap:()=>gn,isObservableObject:()=>Pn,isObservableProp:()=>_r,isObservableSet:()=>wn,keys:()=>Er,makeAutoObservable:()=>Zr,makeObservable:()=>Xr,observable:()=>Re,observe:()=>Rr,onBecomeObserved:()=>Zt,onBecomeUnobserved:()=>er,onReactionError:()=>Ct,override:()=>ee,ownKeys:()=>Nr,reaction:()=>Jt,remove:()=>$r,runInAction:()=>Kt,set:()=>Pr,spy:()=>Lt,toJS:()=>Mr,trace:()=>zr,transaction:()=>Br,untracked:()=>ut,values:()=>Ar,when:()=>Fr});function n(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;ne.length)&&(t=e.length);for(var r=0,n=Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function M(){return M=Object.assign?Object.assign.bind():function(e){for(var t=1;tn&&(n=a.dependenciesState_)}r.length=i,e.newObserving_=null,o=t.length;for(;o--;){var l=t[o];0===l.diffValue&&Ot(l,e),l.diffValue=0}for(;i--;){var c=r[i];1===c.diffValue&&(c.diffValue=0,kt(c,e))}n!==et.UP_TO_DATE_&&(e.dependenciesState_=n,e.onBecomeStale_())}(e),ht(n),i}function ct(e){var t=e.observing_;e.observing_=[];for(var r=t.length;r--;)Ot(t[r],e);e.dependenciesState_=et.NOT_TRACKING_}function ut(e){var t=pt();try{return e()}finally{dt(t)}}function pt(){var e=xt.trackingDerivation;return xt.trackingDerivation=null,e}function dt(e){xt.trackingDerivation=e}function ft(e){var t=xt.allowStateReads;return xt.allowStateReads=e,t}function ht(e){xt.allowStateReads=e}function mt(e){if(e.dependenciesState_!==et.UP_TO_DATE_){e.dependenciesState_=et.UP_TO_DATE_;for(var t=e.observing_,r=t.length;r--;)t[r].lowestObserverState_=et.UP_TO_DATE_}}var yt=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","allowStateReads","disableErrorBoundaries","runId","UNCHANGED","useProxies"],gt=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},bt=!0,vt=!1,xt=function(){var e=o();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(bt=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new gt).version&&(bt=!1),bt?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new gt):(setTimeout(function(){vt||n(35)},1),new gt)}();function wt(){return xt}function St(){var e=new gt;for(var t in e)-1===yt.indexOf(t)&&(xt[t]=e[t]);xt.allowStateChanges=!xt.enforceActions}function kt(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function Ot(e,t){e.observers_.delete(t),0===e.observers_.size&&_t(e)}function _t(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,xt.pendingUnobservations.push(e))}function Et(){xt.inBatch++}function At(){if(0===--xt.inBatch){It();for(var e=xt.pendingUnobservations,t=0;t0&&_t(e),!1)}function Pt(e){e.lowestObserverState_!==et.STALE_&&(e.lowestObserverState_=et.STALE_,e.observers_.forEach(function(e){e.dependenciesState_===et.UP_TO_DATE_&&e.onBecomeStale_(),e.dependenciesState_=et.STALE_}))}var $t=function(){function e(e,t,r,n){void 0===e&&(e="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=et.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=tt.NONE,this.name_=e,this.onInvalidate_=t,this.errorHandler_=r,this.requiresObservable_=n}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled||(this.isScheduled=!0,xt.pendingReactions.push(this),It())},t.runReaction_=function(){if(!this.isDisposed){Et(),this.isScheduled=!1;var e=xt.trackingContext;if(xt.trackingContext=this,ot(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(t){this.reportExceptionInDerivation_(t)}}xt.trackingContext=e,At()}},t.track=function(e){if(!this.isDisposed){Et();0,this.isRunning=!0;var t=xt.trackingContext;xt.trackingContext=this;var r=lt(this,e,void 0);xt.trackingContext=t,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&ct(this),it(r)&&this.reportExceptionInDerivation_(r.cause),At()}},t.reportExceptionInDerivation_=function(e){var t=this;if(this.errorHandler_)this.errorHandler_(e,this);else{if(xt.disableErrorBoundaries)throw e;var r="[mobx] uncaught error in '"+this+"'";xt.suppressReactionErrors||console.error(r,e),xt.globalReactionErrorHandlers.forEach(function(r){return r(e,t)})}},t.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(Et(),ct(this),At()))},t.getDisposer_=function(e){var t=this,r=function r(){t.dispose(),null==e||null==e.removeEventListener||e.removeEventListener("abort",r)};return null==e||null==e.addEventListener||e.addEventListener("abort",r),r[H]=this,"dispose"in Symbol&&"symbol"==typeof Symbol.dispose&&(r[Symbol.dispose]=r),r},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(e){void 0===e&&(e=!1),zr()},L(e,[{key:"isDisposed",get:function(){return T(this.flags_,e.isDisposedMask_)},set:function(t){this.flags_=I(this.flags_,e.isDisposedMask_,t)}},{key:"isScheduled",get:function(){return T(this.flags_,e.isScheduledMask_)},set:function(t){this.flags_=I(this.flags_,e.isScheduledMask_,t)}},{key:"isTrackPending",get:function(){return T(this.flags_,e.isTrackPendingMask_)},set:function(t){this.flags_=I(this.flags_,e.isTrackPendingMask_,t)}},{key:"isRunning",get:function(){return T(this.flags_,e.isRunningMask_)},set:function(t){this.flags_=I(this.flags_,e.isRunningMask_,t)}},{key:"diffValue",get:function(){return T(this.flags_,e.diffValueMask_)?1:0},set:function(t){this.flags_=I(this.flags_,e.diffValueMask_,1===t)}}])}();function Ct(e){return xt.globalReactionErrorHandlers.push(e),function(){var t=xt.globalReactionErrorHandlers.indexOf(e);t>=0&&xt.globalReactionErrorHandlers.splice(t,1)}}$t.isDisposedMask_=1,$t.isScheduledMask_=2,$t.isTrackPendingMask_=4,$t.isRunningMask_=8,$t.diffValueMask_=16;var Tt=function(e){return e()};function It(){xt.inBatch>0||xt.isRunningReactions||Tt(Nt)}function Nt(){xt.isRunningReactions=!0;for(var e=xt.pendingReactions,t=0;e.length>0;){100===++t&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var r=e.splice(0),n=0,i=r.length;n0&&(r.dependencies=(t=e.observing_,Array.from(new Set(t))).map(sr)),r}function ar(e,t){return lr(Un(e,t))}function lr(e){var t={name:e.name_};return function(e){return e.observers_&&e.observers_.size>0}(e)&&(t.observers=Array.from(function(e){return e.observers_}(e)).map(lr)),t}var cr=0;function ur(){this.message="FLOW_CANCELLED"}function pr(e){return e instanceof ur}ur.prototype=Object.create(Error.prototype);var dr=se("flow"),fr=se("flow.bound",{bound:!0}),hr=Object.assign(function(e,t){if(W(t))return dr.decorate_20223_(e,t);if(b(t))return V(e,t,dr);var r=e,n=r.name||"",i=function(){var e,t=arguments,i=++cr,o=Wt(n+" - runid: "+i+" - init",r).apply(this,t),s=void 0,a=new Promise(function(t,r){var a=0;function l(e){var t;s=void 0;try{t=Wt(n+" - runid: "+i+" - yield "+a++,o.next).call(o,e)}catch(l){return r(l)}u(t)}function c(e){var t;s=void 0;try{t=Wt(n+" - runid: "+i+" - yield "+a++,o.throw).call(o,e)}catch(l){return r(l)}u(t)}function u(e){if(!g(null==e?void 0:e.then))return e.done?t(e.value):(s=Promise.resolve(e.value)).then(l,c);e.then(u,r)}e=r,l(void 0)});return a.cancel=Wt(n+" - runid: "+i+" - cancel",function(){try{s&&mr(s);var t=o.return(void 0),r=Promise.resolve(t.value);r.then(y,y),mr(r),e(new ur)}catch(n){e(n)}}),a};return i.isMobXFlow=!0,i},dr);function mr(e){g(e.cancel)&&e.cancel()}function yr(e){return e}function gr(e){return!0===(null==e?void 0:e.isMobXFlow)}function br(e,t,r){var n;return gn(e)||dn(e)||Je(e)?n=Vn(e):Pn(e)&&(n=Vn(e,t)),n.dehancer="function"==typeof t?t:r,function(){n.dehancer=void 0}}function vr(e,t,r){return g(r)?function(e,t,r){return Vn(e,t).intercept_(r)}(e,t,r):function(e,t){return Vn(e).intercept_(t)}(e,t)}function xr(e,t){if(void 0===t)return rt(e);if(!1===Pn(e))return!1;if(!e[H].values_.has(t))return!1;var r=Un(e,t);return rt(r)}function wr(e){return xr(e)}function Sr(e,t){return xr(e,t)}function kr(e,t){return!!e&&(void 0!==t?!!Pn(e)&&e[H].values_.has(t):Pn(e)||!!e[H]||Q(e)||Rt(e)||rt(e))}function Or(e){return kr(e)}function _r(e,t){return kr(e,t)}function Er(e){return Pn(e)?e[H].keys_():gn(e)||wn(e)?Array.from(e.keys()):dn(e)?e.map(function(e,t){return t}):void n(5)}function Ar(e){return Pn(e)?Er(e).map(function(t){return e[t]}):gn(e)?Er(e).map(function(t){return e.get(t)}):wn(e)?Array.from(e.values()):dn(e)?e.slice():void n(6)}function jr(e){return Pn(e)?Er(e).map(function(t){return[t,e[t]]}):gn(e)?Er(e).map(function(t){return[t,e.get(t)]}):wn(e)?Array.from(e.entries()):dn(e)?e.map(function(e,t){return[t,e]}):void n(7)}function Pr(e,t,r){if(2!==arguments.length||wn(e))Pn(e)?e[H].set_(t,r):gn(e)?e.set(t,r):wn(e)?e.add(t):dn(e)?("number"!=typeof t&&(t=parseInt(t,10)),t<0&&n("Invalid index: '"+t+"'"),Et(),t>=e.length&&(e.length=t+1),e[t]=r,At()):n(8);else{Et();var i=t;try{for(var o in i)Pr(e,o,i[o])}finally{At()}}}function $r(e,t){Pn(e)?e[H].delete_(t):gn(e)||wn(e)?e.delete(t):dn(e)?("number"!=typeof t&&(t=parseInt(t,10)),e.splice(t,1)):n(9)}function Cr(e,t){return Pn(e)?e[H].has_(t):gn(e)||wn(e)?e.has(t):dn(e)?t>=0&&t0}function Hr(e,t){var r=e.interceptors_||(e.interceptors_=[]);return r.push(t),m(function(){var e=r.indexOf(t);-1!==e&&r.splice(e,1)})}function Kr(e,t){var r=pt();try{for(var i=[].concat(e.interceptors_||[]),o=0,s=i.length;o0}function Gr(e,t){var r=e.changeListeners_||(e.changeListeners_=[]);return r.push(t),m(function(){var e=r.indexOf(t);-1!==e&&r.splice(e,1)})}function Yr(e,t){var r=pt(),n=e.changeListeners_;if(n){for(var i=0,o=(n=n.slice()).length;i0?e.map(this.dehancer):e},t.intercept_=function(e){return Hr(this,e)},t.observe_=function(e,t){return void 0===t&&(t=!1),t&&e({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),Gr(this,e)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(e){("number"!=typeof e||isNaN(e)||e<0)&&n("Out of range: "+e);var t=this.values_.length;if(e!==t)if(e>t){for(var r=new Array(e-t),i=0;i0&&Fn(e+t+1)},t.spliceWithArray_=function(e,t,r){var n=this;this.atom_;var i=this.values_.length;if(void 0===e?e=0:e>i?e=i:e<0&&(e=Math.max(0,i+e)),t=1===arguments.length?i-e:null==t?0:Math.max(0,Math.min(t,i-e)),void 0===r&&(r=u),Wr(this)){var o=Kr(this,{object:this.proxy_,type:en,index:e,removedCount:t,added:r});if(!o)return u;t=o.removedCount,r=o.added}if(r=0===r.length?r:r.map(function(e){return n.enhancer_(e,void 0)}),this.legacyMode_){var s=r.length-t;this.updateArrayLength_(i,s)}var a=this.spliceItemsIntoValues_(e,t,r);return 0===t&&0===r.length||this.notifyArraySplice_(e,r,a),this.dehanceValues_(a)},t.spliceItemsIntoValues_=function(e,t,r){var n;if(r.length<1e4)return(n=this.values_).splice.apply(n,[e,t].concat(r));var i=this.values_.slice(e,e+t),o=this.values_.slice(e+t);this.values_.length+=r.length-t;for(var s=0;s=this.values_.length))return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e]);console.warn("[mobx] Out of bounds read: "+e)},t.set_=function(e,t){var r=this.values_;if(this.legacyMode_&&e>r.length&&n(17,e,r.length),e2?r-2:0),i=2;i-1&&(this.splice(r,1),!0)}};function an(e,t){"function"==typeof Array.prototype[e]&&(sn[e]=t(e))}function ln(e){return function(){var t=this[H];t.atom_.reportObserved();var r=t.dehanceValues_(t.values_);return r[e].apply(r,arguments)}}function cn(e){return function(t,r){var n=this,i=this[H];return i.atom_.reportObserved(),i.dehanceValues_(i.values_)[e](function(e,i){return t.call(r,e,i,n)})}}function un(e){return function(){var t=this,r=this[H];r.atom_.reportObserved();var n=r.dehanceValues_(r.values_),i=arguments[0];return arguments[0]=function(e,r,n){return i(e,r,n,t)},n[e].apply(n,arguments)}}an("at",ln),an("concat",ln),an("flat",ln),an("includes",ln),an("indexOf",ln),an("join",ln),an("lastIndexOf",ln),an("slice",ln),an("toString",ln),an("toLocaleString",ln),an("toSorted",ln),an("toSpliced",ln),an("with",ln),an("every",cn),an("filter",cn),an("find",cn),an("findIndex",cn),an("findLast",cn),an("findLastIndex",cn),an("flatMap",cn),an("forEach",cn),an("map",cn),an("some",cn),an("toReversed",cn),an("reduce",un),an("reduceRight",un);var pn=O("ObservableArrayAdministration",nn);function dn(e){return v(e)&&pn(e[H])}var fn={},hn="add",mn="delete",yn=function(){function e(e,t,r){var i=this;void 0===t&&(t=X),void 0===r&&(r="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[H]=fn,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=t,this.name_=r,g(Map)||n(18),Hn(function(){i.keysAtom_=G("ObservableMap.keys()"),i.data_=new Map,i.hasMap_=new Map,e&&i.merge(e)})}var t=e.prototype;return t.has_=function(e){return this.data_.has(e)},t.has=function(e){var t=this;if(!xt.trackingDerivation)return this.has_(e);var r=this.hasMap_.get(e);if(!r){var n=r=new Xe(this.has_(e),J,"ObservableMap.key?",!1);this.hasMap_.set(e,n),er(n,function(){return t.hasMap_.delete(e)})}return r.get()},t.set=function(e,t){var r=this.has_(e);if(Wr(this)){var n=Kr(this,{type:r?tn:hn,object:this,newValue:t,name:e});if(!n)return this;t=n.newValue}return r?this.updateValue_(e,t):this.addValue_(e,t),this},t.delete=function(e){var t=this;if((this.keysAtom_,Wr(this))&&!Kr(this,{type:mn,object:this,name:e}))return!1;if(this.has_(e)){var r=Qr(this),n=r?{observableKind:"map",debugObjectName:this.name_,type:mn,object:this,oldValue:this.data_.get(e).value_,name:e}:null;return Br(function(){var r;t.keysAtom_.reportChanged(),null==(r=t.hasMap_.get(e))||r.setNewValue_(!1),t.data_.get(e).setNewValue_(void 0),t.data_.delete(e)}),r&&Yr(this,n),!0}return!1},t.updateValue_=function(e,t){var r=this.data_.get(e);if((t=r.prepareNewValue_(t))!==xt.UNCHANGED){var n=Qr(this),i=n?{observableKind:"map",debugObjectName:this.name_,type:tn,object:this,oldValue:r.value_,name:e,newValue:t}:null;0,r.setNewValue_(t),n&&Yr(this,i)}},t.addValue_=function(e,t){var r=this;this.keysAtom_,Br(function(){var n,i=new Xe(t,r.enhancer_,"ObservableMap.key",!1);r.data_.set(e,i),t=i.value_,null==(n=r.hasMap_.get(e))||n.setNewValue_(!0),r.keysAtom_.reportChanged()});var n=Qr(this),i=n?{observableKind:"map",debugObjectName:this.name_,type:hn,object:this,name:e,newValue:t}:null;n&&Yr(this,i)},t.get=function(e){return this.has(e)?this.dehanceValue_(this.data_.get(e).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var e=this,t=this.keys();return bn({next:function(){var r=t.next(),n=r.done,i=r.value;return{done:n,value:n?void 0:e.get(i)}}})},t.entries=function(){var e=this,t=this.keys();return bn({next:function(){var r=t.next(),n=r.done,i=r.value;return{done:n,value:n?void 0:[i,e.get(i)]}}})},t[Symbol.iterator]=function(){return this.entries()},t.forEach=function(e,t){for(var r,n=D(this);!(r=n()).done;){var i=r.value,o=i[0],s=i[1];e.call(t,s,o,this)}},t.merge=function(e){var t=this;return gn(e)&&(e=new Map(e)),Br(function(){var r,i,o;x(e)?function(e){var t=Object.keys(e);if(!A)return t;var r=Object.getOwnPropertySymbols(e);return r.length?[].concat(t,r.filter(function(t){return c.propertyIsEnumerable.call(e,t)})):t}(e).forEach(function(r){return t.set(r,e[r])}):Array.isArray(e)?e.forEach(function(e){var r=e[0],n=e[1];return t.set(r,n)}):_(e)?(r=e,i=Object.getPrototypeOf(r),o=Object.getPrototypeOf(i),null!==Object.getPrototypeOf(o)&&n(19,e),e.forEach(function(e,r){return t.set(r,e)})):null!=e&&n(20,e)}),this},t.clear=function(){var e=this;Br(function(){ut(function(){for(var t,r=D(e.keys());!(t=r()).done;){var n=t.value;e.delete(n)}})})},t.replace=function(e){var t=this;return Br(function(){for(var r,i=function(e){if(_(e)||gn(e))return e;if(Array.isArray(e))return new Map(e);if(x(e)){var t=new Map;for(var r in e)t.set(r,e[r]);return t}return n(21,e)}(e),o=new Map,s=!1,a=D(t.data_.keys());!(r=a()).done;){var l=r.value;if(!i.has(l))if(t.delete(l))s=!0;else{var c=t.data_.get(l);o.set(l,c)}}for(var u,p=D(i.entries());!(u=p()).done;){var d=u.value,f=d[0],h=d[1],m=t.data_.has(f);if(t.set(f,h),t.data_.has(f)){var y=t.data_.get(f);o.set(f,y),m||(s=!0)}}if(!s)if(t.data_.size!==o.size)t.keysAtom_.reportChanged();else for(var g=t.data_.keys(),b=o.keys(),v=g.next(),w=b.next();!v.done;){if(v.value!==w.value){t.keysAtom_.reportChanged();break}v=g.next(),w=b.next()}t.data_=o}),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(e,t){return Gr(this,e)},t.intercept_=function(e){return Hr(this,e)},L(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])}(),gn=O("ObservableMap",yn);function bn(e){return e[Symbol.toStringTag]="MapIterator",Zn(e)}var vn={},xn=function(){function e(e,t,r){var i=this;void 0===t&&(t=X),void 0===r&&(r="ObservableSet"),this.name_=void 0,this[H]=vn,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=r,g(Set)||n(22),this.enhancer_=function(e,n){return t(e,n,r)},Hn(function(){i.atom_=G(i.name_),e&&i.replace(e)})}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.clear=function(){var e=this;Br(function(){ut(function(){for(var t,r=D(e.data_.values());!(t=r()).done;){var n=t.value;e.delete(n)}})})},t.forEach=function(e,t){for(var r,n=D(this);!(r=n()).done;){var i=r.value;e.call(t,i,i,this)}},t.add=function(e){var t=this;if(this.atom_,Wr(this)){var r=Kr(this,{type:hn,object:this,newValue:e});if(!r)return this;e=r.newValue}if(!this.has(e)){Br(function(){t.data_.add(t.enhancer_(e,void 0)),t.atom_.reportChanged()});var n=!1,i=Qr(this),o=i?{observableKind:"set",debugObjectName:this.name_,type:hn,object:this,newValue:e}:null;n,i&&Yr(this,o)}return this},t.delete=function(e){var t=this;if(Wr(this)&&!Kr(this,{type:mn,object:this,oldValue:e}))return!1;if(this.has(e)){var r=Qr(this),n=r?{observableKind:"set",debugObjectName:this.name_,type:mn,object:this,oldValue:e}:null;return Br(function(){t.atom_.reportChanged(),t.data_.delete(e)}),r&&Yr(this,n),!0}return!1},t.has=function(e){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(e))},t.entries=function(){var e=this.values();return Sn({next:function(){var t=e.next(),r=t.value,n=t.done;return n?{value:void 0,done:n}:{value:[r,r],done:n}}})},t.keys=function(){return this.values()},t.values=function(){this.atom_.reportObserved();var e=this,t=this.data_.values();return Sn({next:function(){var r=t.next(),n=r.value,i=r.done;return i?{value:void 0,done:i}:{value:e.dehanceValue_(n),done:i}}})},t.intersection=function(e){return E(e)&&!wn(e)?e.intersection(this):new Set(this).intersection(e)},t.union=function(e){return E(e)&&!wn(e)?e.union(this):new Set(this).union(e)},t.difference=function(e){return new Set(this).difference(e)},t.symmetricDifference=function(e){return E(e)&&!wn(e)?e.symmetricDifference(this):new Set(this).symmetricDifference(e)},t.isSubsetOf=function(e){return new Set(this).isSubsetOf(e)},t.isSupersetOf=function(e){return new Set(this).isSupersetOf(e)},t.isDisjointFrom=function(e){return E(e)&&!wn(e)?e.isDisjointFrom(this):new Set(this).isDisjointFrom(e)},t.replace=function(e){var t=this;return wn(e)&&(e=new Set(e)),Br(function(){Array.isArray(e)||E(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):null!=e&&n("Cannot initialize set from "+e)}),this},t.observe_=function(e,t){return Gr(this,e)},t.intercept_=function(e){return Hr(this,e)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return"[object ObservableSet]"},t[Symbol.iterator]=function(){return this.values()},L(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])}(),wn=O("ObservableSet",xn);function Sn(e){return e[Symbol.toStringTag]="SetIterator",Zn(e)}var kn=Object.create(null),On="remove",_n=function(){function e(e,t,r,n){void 0===t&&(t=new Map),void 0===n&&(n=ve),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=e,this.values_=t,this.name_=r,this.defaultAnnotation_=n,this.keysAtom_=new K("ObservableObject.keys"),this.isPlainObject_=x(this.target_)}var t=e.prototype;return t.getObservablePropValue_=function(e){return this.values_.get(e).get()},t.setObservablePropValue_=function(e,t){var r=this.values_.get(e);if(r instanceof Ze)return r.set(t),!0;if(Wr(this)){var n=Kr(this,{type:tn,object:this.proxy_||this.target_,name:e,newValue:t});if(!n)return null;t=n.newValue}if((t=r.prepareNewValue_(t))!==xt.UNCHANGED){var i=Qr(this),o=i?{type:tn,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:r.value_,name:e,newValue:t}:null;0,r.setNewValue_(t),i&&Yr(this,o)}return!0},t.get_=function(e){return xt.trackingDerivation&&!$(this.target_,e)&&this.has_(e),this.target_[e]},t.set_=function(e,t,r){return void 0===r&&(r=!1),$(this.target_,e)?this.values_.has(e)?this.setObservablePropValue_(e,t):r?Reflect.set(this.target_,e,t):(this.target_[e]=t,!0):this.extend_(e,{value:t,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,r)},t.has_=function(e){if(!xt.trackingDerivation)return e in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var t=this.pendingKeys_.get(e);return t||(t=new Xe(e in this.target_,J,"ObservableObject.key?",!1),this.pendingKeys_.set(e,t)),t.get()},t.make_=function(e,t){if(!0===t&&(t=this.defaultAnnotation_),!1!==t){if(Cn(this,t,e),!(e in this.target_)){var r;if(null!=(r=this.target_[q])&&r[e])return;n(1,t.annotationType_,this.name_+"."+e.toString())}for(var i=this.target_;i&&i!==c;){var o=a(i,e);if(o){var s=t.make_(this,e,o,i);if(0===s)return;if(1===s)break}i=Object.getPrototypeOf(i)}$n(this,t,e)}},t.extend_=function(e,t,r,n){if(void 0===n&&(n=!1),!0===r&&(r=this.defaultAnnotation_),!1===r)return this.defineProperty_(e,t,n);Cn(this,r,e);var i=r.extend_(this,e,t,n);return i&&$n(this,r,e),i},t.defineProperty_=function(e,t,r){void 0===r&&(r=!1),this.keysAtom_;try{Et();var n=this.delete_(e);if(!n)return n;if(Wr(this)){var i=Kr(this,{object:this.proxy_||this.target_,name:e,type:hn,newValue:t.value});if(!i)return null;var o=i.newValue;t.value!==o&&(t=M({},t,{value:o}))}if(r){if(!Reflect.defineProperty(this.target_,e,t))return!1}else l(this.target_,e,t);this.notifyPropertyAddition_(e,t.value)}finally{At()}return!0},t.defineObservableProperty_=function(e,t,r,n){void 0===n&&(n=!1),this.keysAtom_;try{Et();var i=this.delete_(e);if(!i)return i;if(Wr(this)){var o=Kr(this,{object:this.proxy_||this.target_,name:e,type:hn,newValue:t});if(!o)return null;t=o.newValue}var s=jn(e),a={configurable:!xt.safeDescriptors||this.isPlainObject_,enumerable:!0,get:s.get,set:s.set};if(n){if(!Reflect.defineProperty(this.target_,e,a))return!1}else l(this.target_,e,a);var c=new Xe(t,r,"ObservableObject.key",!1);this.values_.set(e,c),this.notifyPropertyAddition_(e,c.value_)}finally{At()}return!0},t.defineComputedProperty_=function(e,t,r){void 0===r&&(r=!1),this.keysAtom_;try{Et();var n=this.delete_(e);if(!n)return n;if(Wr(this))if(!Kr(this,{object:this.proxy_||this.target_,name:e,type:hn,newValue:void 0}))return null;t.name||(t.name="ObservableObject.key"),t.context=this.proxy_||this.target_;var i=jn(e),o={configurable:!xt.safeDescriptors||this.isPlainObject_,enumerable:!1,get:i.get,set:i.set};if(r){if(!Reflect.defineProperty(this.target_,e,o))return!1}else l(this.target_,e,o);this.values_.set(e,new Ze(t)),this.notifyPropertyAddition_(e,void 0)}finally{At()}return!0},t.delete_=function(e,t){if(void 0===t&&(t=!1),this.keysAtom_,!$(this.target_,e))return!0;if(Wr(this)&&!Kr(this,{object:this.proxy_||this.target_,name:e,type:On}))return null;try{var r;Et();var n,i=Qr(this),o=this.values_.get(e),s=void 0;if(!o&&i)s=null==(n=a(this.target_,e))?void 0:n.value;if(t){if(!Reflect.deleteProperty(this.target_,e))return!1}else delete this.target_[e];if(o&&(this.values_.delete(e),o instanceof Xe&&(s=o.value_),Pt(o)),this.keysAtom_.reportChanged(),null==(r=this.pendingKeys_)||null==(r=r.get(e))||r.set(e in this.target_),i){var l={type:On,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:s,name:e};0,i&&Yr(this,l)}}finally{At()}return!0},t.observe_=function(e,t){return Gr(this,e)},t.intercept_=function(e){return Hr(this,e)},t.notifyPropertyAddition_=function(e,t){var r,n=Qr(this);if(n){var i=n?{type:hn,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:e,newValue:t}:null;0,n&&Yr(this,i)}null==(r=this.pendingKeys_)||null==(r=r.get(e))||r.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),j(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function En(e,t){var r;if($(e,H))return e;var n=null!=(r=null==t?void 0:t.name)?r:"ObservableObject",i=new _n(e,new Map,String(n),function(e){var t;return e?null!=(t=e.defaultDecorator)?t:xe(e):void 0}(t));return S(e,H,i),e}var An=O("ObservableObjectAdministration",_n);function jn(e){return kn[e]||(kn[e]={get:function(){return this[H].getObservablePropValue_(e)},set:function(t){return this[H].setObservablePropValue_(e,t)}})}function Pn(e){return!!v(e)&&An(e[H])}function $n(e,t,r){var n;null==(n=e.target_[q])||delete n[r]}function Cn(e,t,r){}var Tn,In,Nn=zn(0),Rn=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,!1===e}(),Ln=0,Dn=function(){};Tn=Dn,In=Array.prototype,Object.setPrototypeOf?Object.setPrototypeOf(Tn.prototype,In):void 0!==Tn.prototype.__proto__?Tn.prototype.__proto__=In:Tn.prototype=In;var Mn=function(e){function t(t,r,n,i){var o;return void 0===n&&(n="ObservableArray"),void 0===i&&(i=!1),o=e.call(this)||this,Hn(function(){var e=new nn(n,r,i,!0);e.proxy_=o,k(o,H,e),t&&t.length&&o.spliceWithArray(0,0,t),Rn&&Object.defineProperty(o,"0",Nn)}),o}z(t,e);var r=t.prototype;return r.concat=function(){this[H].atom_.reportObserved();for(var e=arguments.length,t=new Array(e),r=0;rLn){for(var t=Ln;t=0&&r++}e=Xn(e),t=Xn(t);var a="[object Array]"===s;if(!a){if("object"!=typeof e||"object"!=typeof t)return!1;var l=e.constructor,c=t.constructor;if(l!==c&&!(g(l)&&l instanceof l&&g(c)&&c instanceof c)&&"constructor"in e&&"constructor"in t)return!1}if(0===r)return!1;r<0&&(r=-1),i=i||[];for(var u=(n=n||[]).length;u--;)if(n[u]===e)return i[u]===t;if(n.push(e),i.push(t),a){if((u=e.length)!==t.length)return!1;for(;u--;)if(!Yn(e[u],t[u],r-1,n,i))return!1}else{var p=Object.keys(e),d=p.length;if(Object.keys(t).length!==d)return!1;for(var f=0;foe,_samplers:()=>re,inferType:()=>p,sample:()=>ie});const n=Symbol("skip");function i(e){return e<10?"0"+e:e}function o(e,t){return t>e.length?e.repeat(Math.trunc(t/e.length)+1).substring(0,t):e}function s(...e){const t=e=>e&&"object"==typeof e;return e.reduce((e,r)=>(Object.keys(r||{}).forEach(n=>{const i=e[n],o=r[n];t(i)&&t(o)?e[n]=s(i,o):e[n]=o}),e),Array.isArray(e[e.length-1])?[]:{})}function a(e){return{value:"object"===e?{}:"array"===e?[]:void 0}}function l(e,t){t&&e.pop()}function c(e,t={},r={}){const{value:n}=e,{propertyName:i}=r,{name:o,prefix:s,namespace:a}=function(e){return{name:e?.xml?.name||"",prefix:e?.xml?.prefix||"",namespace:e?.xml?.namespace||null,attribute:e?.xml?.attribute??!1,wrapped:e?.xml?.wrapped??!1}}(t),l=function(e){const t=e?.xml;return t?.nodeType?t.nodeType:!0===t?.attribute?"attribute":!0===t?.wrapped&&"array"===e?.type?"element":e?.$ref||e?.$dynamicRef||"array"===e?.type||e?.oneOf||e?.anyOf||e?.allOf?"none":"element"}(t);let c=o||i?`${s?s+":":""}${o||i}`:null,u="object"==typeof n?Array.isArray(n)?[...n]:{...n}:n;switch(l){case"attribute":c&&(c=`$${c}`);break;case"text":c="#text";break;case"cdata":c="#cdata";break;case"none":"array"===t.type?(c=null,void 0!==t.example&&(c=t.items?.xml?.name||c)):c=null;break;default:"array"===t.type&&Array.isArray(u)&&(u={[c]:[...u]})}return a&&"text"!==l&&"cdata"!==l&&"none"!==l&&("object"==typeof u?u["$xmlns"+(s?":"+s:"")]=a:u={["$xmlns"+(s?":"+s:"")]:a,"#text":u}),{propertyName:c,value:u}}const u={multipleOf:"number",maximum:"number",exclusiveMaximum:"number",minimum:"number",exclusiveMinimum:"number",maxLength:"string",minLength:"string",pattern:"string",items:"array",maxItems:"array",minItems:"array",uniqueItems:"array",additionalItems:"array",maxProperties:"object",minProperties:"object",required:"object",additionalProperties:"object",properties:"object",patternProperties:"object",dependencies:"object"};function p(e){if(void 0!==e.type)return Array.isArray(e.type)?0===e.type.length?null:e.type[0]:e.type;const t=Object.keys(u);for(var r=0;rt.maxSampleDepth)return l(m,i),a(p(e));if(e.$ref){if(!r)throw new Error("Your schema contains $ref. You must provide full specification in the third parameter.");let n=decodeURIComponent(e.$ref);n.startsWith("#")&&(n=n.substring(1));const o=f().get(r,n);let s;if(!0!==h[n]){h[n]=!0;const e=b(o,t,r,i);if("xml"===t.format){const t=n.split("/").pop(),r={...i,propertyName:i?.propertyName||t},{propertyName:a,value:l}=c(e,o,r);s={...e,value:{[a||"root"]:l}}}else s=e;h[n]=!1}else{s=a(p(o))}return l(m,i),s}if(void 0!==e.example)return l(m,i),{value:e.example,readOnly:e.readOnly,writeOnly:e.writeOnly,type:e.type};if(void 0!==e.allOf)return l(m,i),g(e)||function(e,t,r,i,o){let a=b(e,r,i);const l=[];for(let n of t){const{type:e,readOnly:t,writeOnly:s,value:c}=b({type:a.type,...n},r,i,{...o,isAllOfChild:!0});a.type&&e&&e!==a.type&&(console.warn("allOf: schemas with different types can't be merged"),a.type=e),a.type=a.type||e,a.readOnly=a.readOnly||t,a.writeOnly=a.writeOnly||s,null!=c&&l.push(c)}if("object"===a.type){a.value=s(a.value||{},...l.filter(e=>"object"==typeof e));for(const e in a.value)a.value[e]===n&&delete a.value[e];return a}{"array"===a.type&&(r.quiet||console.warn('OpenAPI Sampler: found allOf with "array" type. Result may be incorrect'));const e=l[l.length-1];return a.value=null!=e?e:a.value,a}}({...e,allOf:void 0},e.allOf,t,r,i);if(e.oneOf&&e.oneOf.length){e.anyOf&&(t.quiet||console.warn("oneOf and anyOf are not supported on the same level. Skipping anyOf")),l(m,i);return d(e,Object.assign({readOnly:e.readOnly,writeOnly:e.writeOnly},e.oneOf[0]))}if(e.anyOf&&e.anyOf.length){l(m,i);return d(e,Object.assign({readOnly:e.readOnly,writeOnly:e.writeOnly},e.anyOf[0]))}if(e.if&&e.then){l(m,i);const{if:n,then:o,...a}=e;return b(s(a,n,o),t,r,i)}let o=y(e),u=null;if(void 0===o){o=null,u=e.type,Array.isArray(u)&&e.type.length>0&&(u=e.type[0]),u||(u=p(e));let n=re[u];n&&(o=n(e,t,r,i))}return l(m,i),{value:o,readOnly:e.readOnly,writeOnly:e.writeOnly,type:u};function d(e,n){const o=g(e);if(void 0!==o)return o;const a=b({...e,oneOf:void 0,anyOf:void 0},t,r,i),l=b(n,t,r,i);if("object"==typeof a.value&&"object"==typeof l.value){const e=s(a.value,l.value);return{...l,value:e}}return l}}function v(e){let t=0;if("number"!==e.type||"float"!==e.format&&"double"!==e.format||(t=.1),"boolean"==typeof e.exclusiveMinimum||"boolean"==typeof e.exclusiveMaximum){if(e.maximum&&e.minimum)return t=e.exclusiveMinimum?Math.floor(e.minimum)+1:e.minimum,(e.exclusiveMaximum&&t>=e.maximum||!e.exclusiveMaximum&&t>e.maximum)&&(t=(e.maximum+e.minimum)/2),t;if(e.minimum)return e.exclusiveMinimum?Math.floor(e.minimum)+1:e.minimum;if(e.maximum)return e.exclusiveMaximum?e.maximum>0?0:Math.floor(e.maximum)-1:e.maximum>0?0:e.maximum}else{if(e.minimum)return e.minimum;e.exclusiveMinimum?(t=Math.floor(e.exclusiveMinimum)+1,t===e.exclusiveMaximum&&(t=(t+Math.floor(e.exclusiveMaximum)-1)/2)):e.exclusiveMaximum?t=Math.floor(e.exclusiveMaximum)-1:e.maximum&&(t=e.maximum)}return t}function x(e,t){return e}function w(e,t,r){let n=1;if(e)switch(e){case"?":n=0;break;case"*":n=x(0);break;case"+":n=x(1);break;default:throw new Error("Unknown quantifier symbol provided.")}else null!=t&&null!=r?n=x(parseInt(t),parseInt(r)):null!=t&&null==r&&(n=parseInt(t));return n}function S({min:e,max:t,omitTime:r,omitDate:n}){let o=function(e,t,r,n){var o=r?"":e.getUTCFullYear()+"-"+i(e.getUTCMonth()+1)+"-"+i(e.getUTCDate());return t||(o+="T"+i(e.getUTCHours())+":"+i(e.getUTCMinutes())+":"+i(e.getUTCSeconds())+(n?"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5):"")+"Z"),o}(new Date("2019-08-24T14:15:22.123Z"),r,n,!1);return o.lengtht&&console.warn(`Using maxLength = ${t} is incorrect with format "date-time"`),o}function k(e,t,r,n,i=!1){if(n&&i)return function(e){let t,r,n,i=!1;e instanceof RegExp&&(i=e.flags.includes("i"),e=e.toString(),e=e.match(/\/(.+?)\//)?.[1]??"");const o=/([.A-Za-z0-9])(?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+))(?![^[]*]|[^{]*})/;let s=(e=e.replace(/^(\^)?(.*?)(\$)?$/,"$2")).match(o);for(;null!=s;){const t=s[2],r=s[3];n=w(s[4],t,r),e=e.slice(0,s.index)+s[1].repeat(n)+e.slice(s.index+s[0].length),s=e.match(o)}const a=/(\d-\d|\w-\w|\d|\w|[-!@#$&()`.+,/"])/,l=/\[(\^|)(-|)(.+?)\](?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+)|)/;for(s=e.match(l);null!=s;){const o="^"===s[1],c="-"===s[2],u=s[4],p=s[5],d=s[6],f=[];let h=s[3],m=h.match(a);for(c&&f.push(45);null!=m;){if(-1===m[0].indexOf("-"))i&&isNaN(Number(m[0]))?(f.push(m[0].toUpperCase().charCodeAt(0)),f.push(m[0].toLowerCase().charCodeAt(0))):f.push(m[0].charCodeAt(0));else{const e=m[0].split("-").map(e=>e.charCodeAt(0));if(t=e[0],r=e[1],t>r)throw new Error("Character range provided is out of order.");for(let n=t;n<=r;n++)if(i&&isNaN(Number(String.fromCharCode(n)))){const e=String.fromCharCode(n);f.push(e.toUpperCase().charCodeAt(0)),f.push(e.toLowerCase().charCodeAt(0))}else f.push(n)}h=h.substring(m[0].length),m=h.match(a)}if(n=w(d,u,p),o){let e=-1;for(let t=48;t<=57;t++)e=f.indexOf(t),e>-1?f.splice(e,1):f.push(t);for(let t=65;t<=90;t++)e=f.indexOf(t),e>-1?f.splice(e,1):f.push(t);for(let t=97;t<=122;t++)e=f.indexOf(t),e>-1?f.splice(e,1):f.push(t)}const y=Array.from({length:n},()=>String.fromCharCode(f[x(0,f.length)])).join("");s=(e=e.slice(0,s.index)+y+e.slice(s.index+s[0].length)).match(l)}const c=/(.)\{(\d+)\,(\d+)\}/;for(s=e.match(c);null!=s;){if(t=parseInt(s[2]),r=parseInt(s[3]),t>r)throw new Error("Numbers out of order in {} quantifier.");n=x(t),e=e.slice(0,s.index)+s[1].repeat(n)+e.slice(s.index+s[0].length),s=e.match(c)}const u=/(.)\{(\d+)\}/;for(s=e.match(u);null!=s;)n=parseInt(s[2]),e=e.slice(0,s.index)+s[1].repeat(n)+e.slice(s.index+s[0].length),s=e.match(u);return e}(n);let s=o("string",e);return t&&s.length>t&&(s=s.substring(0,t)),s}const O={email:function(){return"user@example.com"},"idn-email":function(){return"\u043f\u043e\u0448\u0442\u0430@\u0443\u043a\u0440.\u043d\u0435\u0442"},password:function(e,t){let r="pa$$word";return e>r.length&&(r+="_",r+=o("qwerty!@#$%^123456",e-r.length).substring(0,e-r.length)),r},"date-time":function(e,t){return S({min:e,max:t,omitTime:!1,omitDate:!1})},date:function(e,t){return S({min:e,max:t,omitTime:!0,omitDate:!1})},time:function(e,t){return S({min:e,max:t,omitTime:!1,omitDate:!0}).slice(1)},ipv4:function(){return"192.168.0.1"},ipv6:function(){return"2001:0db8:85a3:0000:0000:8a2e:0370:7334"},hostname:function(){return"example.com"},"idn-hostname":function(){return"\u043f\u0440\u0438\u043a\u043b\u0430\u0434.\u0443\u043a\u0440"},iri:function(){return"http://example.com/entity/1"},"iri-reference":function(){return"/entity/1"},uri:function(){return"http://example.com"},"uri-reference":function(){return"../dictionary"},"uri-template":function(){return"http://example.com/{endpoint}"},uuid:function(e,t,r){return function(e){var t,r,n,i,o=function(e){var t=0;if(0==e.length)return t;for(var r=0;r>>5)|0;return t=r^((n|=0)<<17|n>>>15),r=n+(i|=0)|0,n=i+e|0,((i=t+e|0)>>>0)/4294967296}),a="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{var t=16*s()%16|0;return("x"==e?t:3&t|8).toString(16)});return a}(r||"id")},default:k,"json-pointer":function(){return"/json/pointer"},"relative-json-pointer":function(){return"1/relative/json/pointer"},regex:function(){return"/regex/"}};class _{constructor(e,t={},r){this.pattern=e,this.separator=t.separator||".",this.segments=this._parse(e),this.data=r,this._hasDeepWildcard=this.segments.some(e=>"deep-wildcard"===e.type),this._hasAttributeCondition=this.segments.some(e=>void 0!==e.attrName),this._hasPositionSelector=this.segments.some(e=>void 0!==e.position)}_parse(e){const t=[];let r=0,n="";for(;r0?e[e.length-1].tag:void 0}getCurrentNamespace(){const e=this._matcher.path;return e.length>0?e[e.length-1].namespace:void 0}getAttrValue(e){const t=this._matcher.path;if(0!==t.length)return t[t.length-1].values?.[e]}hasAttr(e){const t=this._matcher.path;if(0===t.length)return!1;const r=t[t.length-1];return void 0!==r.values&&e in r.values}getAnyParentAttr(e){return this._matcher.getAnyParentAttr(e)}hasAnyParentAttr(e){return this._matcher.hasAnyParentAttr(e)}getPosition(){const e=this._matcher.path;return 0===e.length?-1:e[e.length-1].position??0}getCounter(){const e=this._matcher.path;return 0===e.length?-1:e[e.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(e,t=!0){return this._matcher.toString(e,t)}toArray(){return this._matcher.path.map(e=>e.tag)}matches(e){return this._matcher.matches(e)}matchesAny(e){return e.matchesAny(this._matcher)}}class A{constructor(e={}){this.separator=e.separator||".",this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new E(this),this._keptAttrs=[]}push(e,t=null,r=null,n=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);const i=this.path.length;let o=this.siblingStacks[i];o||(o={counts:new Map,total:0},this.siblingStacks[i]=o);const s=r?`${r}:${e}`:e,a=o.counts.get(s)||0,l=o.total;o.counts.set(s,a+1),o.total++;const c={tag:e,position:l,counter:a};null!=r&&(c.namespace=r),null!=t&&(c.values=t),this.path.push(c);const u=this.path.length,p=null!==n?n.keep:null;if(null!=p&&p.length>0&&t)for(let d=0;dthis.path.length+1&&(this.siblingStacks.length=this.path.length+1);const t=this.path.length+1;for(;this._keptAttrs.length>0&&this._keptAttrs[this._keptAttrs.length-1].depth>=t;)this._keptAttrs.pop();return e}updateCurrent(e){if(this.path.length>0){const t=this.path[this.path.length-1];null!=e&&(t.values=e)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(e){if(0!==this.path.length)return this.path[this.path.length-1].values?.[e]}hasAttr(e){if(0===this.path.length)return!1;const t=this.path[this.path.length-1];return void 0!==t.values&&e in t.values}getAnyParentAttr(e){const t=this._keptAttrs;for(let r=t.length-1;r>=0;r--)if(t[r].name===e)return t[r].value}hasAnyParentAttr(e){const t=this._keptAttrs;for(let r=t.length-1;r>=0;r--)if(t[r].name===e)return!0;return!1}getPosition(){return 0===this.path.length?-1:this.path[this.path.length-1].position??0}getCounter(){return 0===this.path.length?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(e,t=!0){const r=e||this.separator;if(r===this.separator&&!0===t){if(null!==this._pathStringCache)return this._pathStringCache;const e=this.path.map(e=>e.namespace?`${e.namespace}:${e.tag}`:e.tag).join(r);return this._pathStringCache=e,e}return this.path.map(e=>t&&e.namespace?`${e.namespace}:${e.tag}`:e.tag).join(r)}toArray(){return this.path.map(e=>e.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[],this._keptAttrs=[]}matches(e){const t=e.segments;return 0!==t.length&&(e.hasDeepWildcard()?this._matchWithDeepWildcard(t):this._matchSimple(t))}_matchSimple(e){if(this.path.length!==e.length)return!1;for(let t=0;t=0&&t>=0;){const n=e[r];if("deep-wildcard"===n.type){if(r--,r<0)return!0;const n=e[r];let i=!1;for(let e=t;e>=0;e--)if(this._matchSegment(n,this.path[e],e===this.path.length-1)){t=e-1,r--,i=!0;break}if(!i)return!1}else{if(!this._matchSegment(n,this.path[t],t===this.path.length-1))return!1;t--,r--}}return r<0}_matchSegment(e,t,r){if("*"!==e.tag&&e.tag!==t.tag)return!1;if(void 0!==e.namespace&&"*"!==e.namespace&&e.namespace!==t.namespace)return!1;if(void 0!==e.attrName){if(!r)return!1;if(!t.values||!(e.attrName in t.values))return!1;if(void 0!==e.attrValue&&String(t.values[e.attrName])!==String(e.attrValue))return!1}if(void 0!==e.position){if(!r)return!1;const n=t.counter??0;if("first"===e.position&&0!==n)return!1;if("odd"===e.position&&n%2!=1)return!1;if("even"===e.position&&n%2!=0)return!1;if("nth"===e.position&&n!==e.positionValue)return!1}return!0}matchesAny(e){return e.matchesAny(this)}snapshot(){return{path:this.path.map(e=>({...e})),siblingStacks:this.siblingStacks.map(e=>e?{counts:new Map(e.counts),total:e.total}:e),keptAttrs:this._keptAttrs.map(e=>({...e}))}}restore(e){this._pathStringCache=null,this.path=e.path.map(e=>({...e})),this.siblingStacks=e.siblingStacks.map(e=>e?{counts:new Map(e.counts),total:e.total}:e),this._keptAttrs=(e.keptAttrs||[]).map(e=>({...e}))}readOnly(){return this._view}}function j(e){return String(e).replace(/--/g,"- -").replace(/--/g,"- -").replace(/-$/,"- ")}function P(e){return String(e).replace(/\]\]>/g,"]]]]>")}function $(e){return String(e).replace(/"/g,""").replace(/'/g,"'")}const C=":A-Za-z_\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u0486\u0488-\u1fff\u200c-\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd",T=":A-Za-z_\xc0-\u02ff\u0370-\u037d\u037f-\u0486\u0488-\u1fff\u200c-\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd\ud800\udc00-\udb7f\udfff",I=T+"\\-\\.\\d\xb7\u0300-\u036f\u0487\u203f-\u2040",N=(e,t,r="")=>{const n=`[${e.replace(":","")}][${t.replace(":","")}]*`;return{name:new RegExp(`^[${e}][${t}]*$`,r),ncName:new RegExp(`^${n}$`,r),qName:new RegExp(`^${n}(?::${n})?$`,r),nmToken:new RegExp(`^[${t}]+$`,r),nmTokens:new RegExp(`^[${t}]+(?:\\s+[${t}]+)*$`,r)}},R=N(C,C+"\\-\\.\\d\xb7\u0300-\u036f\u203f-\u2040"),L=N(T,I,"u"),D=(e="1.0")=>"1.1"===e?L:R,M=(e,{xmlVersion:t="1.0"}={})=>D(t).qName.test(e);function z(e,t,r,n,i){return r.sanitizeName?M(e,{xmlVersion:i})?e:r.sanitizeName(e,{isAttribute:t,matcher:n.readOnly()}):e}function B(e,t){let r="";t.format&&(r="\n");const n=[];if(t.stopNodes&&Array.isArray(t.stopNodes))for(let o=0;ot.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(e)){if(null!=e){let r=e.toString();return r=Q(r,t),r}return""}for(let l=0;l`,a=!1,n.pop();continue}if(p===t.commentPropName){s+=r+`\x3c!--${j(c[u][0][t.textNodeName])}--\x3e`,a=!0,n.pop();continue}if("?"===p[0]){s+=("?xml"===p?"":r)+`<${p}${H(c[":@"],t,f,n,o)}?>`,a=!0,n.pop();continue}let h=r;""!==h&&(h+=t.indentBy);const m=r+`<${p}${H(c[":@"],t,f,n,o)}`;let y;y=f?U(c[u],t):F(c[u],t,h,n,i,o),-1!==t.unpairedTags.indexOf(p)?t.suppressUnpairedNode?s+=m+">":s+=m+"/>":y&&0!==y.length||!t.suppressEmptyNode?y&&y.endsWith(">")?s+=m+`>${y}${r}`:(s+=m+">",y&&""!==r&&(y.includes("/>")||y.includes("`):s+=m+"/>",a=!0,n.pop()}return s}function q(e,t){if(!e||t.ignoreAttributes)return null;const r={};let n=!1;for(let i in e){if(!Object.prototype.hasOwnProperty.call(e,i))continue;r[i.startsWith(t.attributeNamePrefix)?i.substr(t.attributeNamePrefix.length):i]=$(e[i]),n=!0}return n?r:null}function U(e,t){if(!Array.isArray(e))return null!=e?e.toString():"";let r="";for(let n=0;n${n}`:r+=`<${o}${e}/>`}}}return r}function V(e,t){let r="";if(e&&!t.ignoreAttributes)for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let i=e[n];!0===i&&t.suppressBooleanAttributes?r+=` ${n.substr(t.attributeNamePrefix.length)}`:r+=` ${n.substr(t.attributeNamePrefix.length)}="${$(i)}"`}return r}function W(e){const t=Object.keys(e);for(let r=0;r0&&t.processEntities)for(let r=0;r","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0,sanitizeName:!1};function Y(e){if(this.options=Object.assign({},G,e),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(e=>"string"==typeof e&&e.startsWith("*.")?".."+e.substring(2):e)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(let r=0;r{for(const r of t){if("string"==typeof r&&e===r)return!0;if(r instanceof RegExp&&r.test(e))return!0}}:()=>!1,this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=ee),this.processTextOrObjNode=J,this.options.format?(this.indentate=Z,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function X(e,t,r,n,i){return r.sanitizeName?M(e,{xmlVersion:i})?e:r.sanitizeName(e,{isAttribute:t,matcher:n.readOnly()}):e}function J(e,t,r,n,i){const o=this.extractAttributes(e);n.push(t,o);if(this.checkStopNode(n)){const i=this.buildRawContent(e),o=this.buildAttributesForStopNode(e);return n.pop(),this.buildObjectNode(i,t,o,r)}const s=this.j2x(e,r+1,n,i);return n.pop(),"?"===t[0]?this.buildTextValNode("",t,s.attrStr,r,n):void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,s.attrStr,r,n):this.buildObjectNode(s.val,t,s.attrStr,r)}function Z(e){return this.options.indentBy.repeat(e)}function ee(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}Y.prototype.build=function(e){if(this.options.preserveOrder)return B(e,this.options);{Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e});const t=new A,r=function(e,t){const r=e["?xml"];if(r&&"object"==typeof r){if(t.attributesGroupName&&r[t.attributesGroupName]){const e=r[t.attributesGroupName][t.attributeNamePrefix+"version"];if(e)return e}const e=r[t.attributeNamePrefix+"version"];if(e)return e}return"1.0"}(e,this.options);return this.j2x(e,0,t,r).val}},Y.prototype.j2x=function(e,t,r,n){let i="",o="";if(this.options.maxNestedTags&&r.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");const s=this.options.jPath?r.toString():r,a=this.checkStopNode(r);for(let l in e){if(!Object.prototype.hasOwnProperty.call(e,l))continue;const c=l===this.options.textNodeName||l===this.options.cdataPropName||l===this.options.commentPropName||this.options.attributesGroupName&&l===this.options.attributesGroupName||this.isAttribute(l)||"?"===l[0]?l:X(l,!1,this.options,r,n);if(void 0===e[l])this.isAttribute(l)&&(o+="");else if(null===e[l])this.isAttribute(l)||c===this.options.cdataPropName||c===this.options.commentPropName?o+="":"?"===c[0]?o+=this.indentate(t)+"<"+c+"?"+this.tagEndChar:o+=this.indentate(t)+"<"+c+"/"+this.tagEndChar;else if(e[l]instanceof Date)o+=this.buildTextValNode(e[l],c,"",t,r);else if("object"!=typeof e[l]){const u=this.isAttribute(l);if(u&&!this.ignoreAttributesFn(u,s)){const t=X(u,!0,this.options,r,n);i+=this.buildAttrPairStr(t,""+e[l],a)}else if(!u)if(l===this.options.textNodeName){let t=this.options.tagValueProcessor(l,""+e[l]);o+=this.replaceEntitiesValue(t)}else{r.push(c);const n=this.checkStopNode(r);if(r.pop(),n){const r=""+e[l];o+=""===r?this.indentate(t)+"<"+c+this.closeTag(c)+this.tagEndChar:this.indentate(t)+"<"+c+">"+r+""+e+"${e}`;else if("object"==typeof e&&null!==e){const n=this.buildRawContent(e),i=this.buildAttributesForStopNode(e);t+=""===n?`<${r}${i}/>`:`<${r}${i}>${n}`}}else if("object"==typeof n&&null!==n){const e=this.buildRawContent(n),i=this.buildAttributesForStopNode(n);t+=""===e?`<${r}${i}/>`:`<${r}${i}>${e}`}else t+=`<${r}>${n}`}return t},Y.prototype.buildAttributesForStopNode=function(e){if(!e||"object"!=typeof e)return"";let t="";if(this.options.attributesGroupName&&e[this.options.attributesGroupName]){const r=e[this.options.attributesGroupName];for(let e in r){if(!Object.prototype.hasOwnProperty.call(r,e))continue;const n=e.startsWith(this.options.attributeNamePrefix)?e.substring(this.options.attributeNamePrefix.length):e,i=r[e];!0===i&&this.options.suppressBooleanAttributes?t+=" "+n:t+=" "+n+'="'+i+'"'}}else for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;const n=this.isAttribute(r);if(n){const i=e[r];!0===i&&this.options.suppressBooleanAttributes?t+=" "+n:t+=" "+n+'="'+i+'"'}}return t},Y.prototype.buildObjectNode=function(e,t,r,n){if(""===e)return"?"===t[0]?this.indentate(n)+"<"+t+r+"?"+this.tagEndChar:this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar;if("?"===t[0])return this.indentate(n)+"<"+t+r+"?"+this.tagEndChar;{let i=""+e+i}},Y.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`>`+this.newLine}if(!1!==this.options.commentPropName&&t===this.options.commentPropName){const t=j(e);return this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine}if("?"===t[0])return this.indentate(n)+"<"+t+r+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(t,e);return i=this.replaceEntitiesValue(i),""===i?this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+r+">"+i+"0&&this.options.processEntities)for(let t=0;t1)&&(e={[t?.xml?.name||"root"]:e}),new te({ignoreAttributes:!1,format:!0,attributeNamePrefix:"$",textNodeName:"#text",cdataPropName:"#cdata"}).build(e)}(i,e):i}function oe(e,t){re[e]=t}oe("array",function(e,t={},r,n){const i=n&&n.depth||1;let o=Math.min(null!=e.maxItems?e.maxItems:1/0,e.minItems||1);const s=e.prefixItems||e.items||e.contains;Array.isArray(s)&&(o=Math.max(o,s.length));let a=e=>Array.isArray(s)?s[e]||{}:s||{},l=[];if(!s)return l;for(let u=0;u({"#text":{...e}}))}}:{[r]:{...l,...t}}:{[r]:l})}return l}),oe("boolean",function(e){return!0}),oe("integer",v),oe("number",v),oe("object",function(e,t={},r,i){let o={};const s=i&&i.depth||1;if(e&&"object"==typeof e.properties){const a=Array.isArray(e.required)?e.required:[],l={};for(const e of a)l[e]=!0;Object.keys(e.properties).forEach(a=>{if(t.skipNonRequired&&!l.hasOwnProperty(a))return;const u=b(e.properties[a],t,r,{propertyName:a,depth:s+1});if(t.skipReadOnly&&u.readOnly)i?.isAllOfChild&&(o[a]=n);else if(t.skipWriteOnly&&u.writeOnly)i?.isAllOfChild&&(o[a]=n);else if("xml"===t?.format){const{propertyName:t,value:r}=c(u,e.properties[a],{propertyName:a});t?o[t]=r:null!==r&&"object"==typeof r&&(o={...o,...r})}else o[a]=u.value})}if(e&&"object"==typeof e.additionalProperties){const n=e.additionalProperties["x-additionalPropertiesName"]||"property";o[`${String(n)}1`]=b(e.additionalProperties,t,r,{depth:s+1}).value,o[`${String(n)}2`]=b(e.additionalProperties,t,r,{depth:s+1}).value}if(e&&"object"==typeof e.properties&&void 0!==e.maxProperties&&Object.keys(o).length>e.maxProperties){const t={};let r=0;(Array.isArray(e.required)?e.required:[]).forEach(e=>{void 0!==o[e]&&(t[e]=o[e],r++)}),Object.keys(o).forEach(n=>{r2){var l=n.lastIndexOf("/");if(l!==n.length-1){-1===l?(n="",i=0):i=(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),o=a,s=0;continue}}else if(2===n.length||1===n.length){n="",i=0,o=a,s=0;continue}t&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),i=a-o-1;o=a,s=0}else 46===r&&-1!==s?++s:s=-1}return n}var n={resolve:function(){for(var e,n="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var s;o>=0?s=arguments[o]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(n=s+"/"+n,i=47===s.charCodeAt(0))}return n=r(n,!i),i?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(e){if(t(e),0===e.length)return".";var n=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!n)).length||n||(e="."),e.length>0&&i&&(e+="/"),n?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,r=0;r0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":n.normalize(e)},relative:function(e,r){if(t(e),t(r),e===r)return"";if((e=n.resolve(e))===(r=n.resolve(r)))return"";for(var i=1;ic){if(47===r.charCodeAt(a+p))return r.slice(a+p+1);if(0===p)return r.slice(a+p)}else s>c&&(47===e.charCodeAt(i+p)?u=p:0===p&&(u=0));break}var d=e.charCodeAt(i+p);if(d!==r.charCodeAt(a+p))break;47===d&&(u=p)}var f="";for(p=i+u+1;p<=o;++p)p!==o&&47!==e.charCodeAt(p)||(0===f.length?f+="..":f+="/..");return f.length>0?f+r.slice(a+u):(a+=u,47===r.charCodeAt(a)&&++a,r.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var r=e.charCodeAt(0),n=47===r,i=-1,o=!0,s=e.length-1;s>=1;--s)if(47===(r=e.charCodeAt(s))){if(!o){i=s;break}}else o=!1;return-1===i?n?"/":".":n&&1===i?"//":e.slice(0,i)},basename:function(e,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');t(e);var n,i=0,o=-1,s=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var a=r.length-1,l=-1;for(n=e.length-1;n>=0;--n){var c=e.charCodeAt(n);if(47===c){if(!s){i=n+1;break}}else-1===l&&(s=!1,l=n+1),a>=0&&(c===r.charCodeAt(a)?-1===--a&&(o=n):(a=-1,o=l))}return i===o?o=l:-1===o&&(o=e.length),e.slice(i,o)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!s){i=n+1;break}}else-1===o&&(s=!1,o=n+1);return-1===o?"":e.slice(i,o)},extname:function(e){t(e);for(var r=-1,n=0,i=-1,o=!0,s=0,a=e.length-1;a>=0;--a){var l=e.charCodeAt(a);if(47!==l)-1===i&&(o=!1,i=a+1),46===l?-1===r?r=a:1!==s&&(s=1):-1!==r&&(s=-1);else if(!o){n=a+1;break}}return-1===r||-1===i||0===s||1===s&&r===i-1&&r===n+1?"":e.slice(r,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+e+n:n}("/",e)},parse:function(e){t(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return r;var n,i=e.charCodeAt(0),o=47===i;o?(r.root="/",n=1):n=0;for(var s=-1,a=0,l=-1,c=!0,u=e.length-1,p=0;u>=n;--u)if(47!==(i=e.charCodeAt(u)))-1===l&&(c=!1,l=u+1),46===i?-1===s?s=u:1!==p&&(p=1):-1!==s&&(p=-1);else if(!c){a=u+1;break}return-1===s||-1===l||0===p||1===p&&s===l-1&&s===a+1?-1!==l&&(r.base=r.name=0===a&&o?e.slice(1,l):e.slice(a,l)):(0===a&&o?(r.name=e.slice(1,s),r.base=e.slice(1,l)):(r.name=e.slice(a,s),r.base=e.slice(a,l)),r.ext=e.slice(s,l)),a>0?r.dir=e.slice(0,a-1):o&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,e.exports=n},49205(e,t,r){"use strict";function n(e){return getComputedStyle(e)}function i(e,t){for(var r in t){var n=t[r];"number"==typeof n&&(n+="px"),e.style[r]=n}return e}function o(e){var t=document.createElement("div");return t.className=e,t}r.r(t),r.d(t,{default:()=>$});var s="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function a(e,t){if(!s)throw new Error("No element matching method supported");return s.call(e,t)}function l(e){e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}function c(e,t){return Array.prototype.filter.call(e.children,function(e){return a(e,t)})}var u="ps",p="ps__rtl",d={thumb:function(e){return"ps__thumb-"+e},rail:function(e){return"ps__rail-"+e},consuming:"ps__child--consume"},f={focus:"ps--focus",clicking:"ps--clicking",active:function(e){return"ps--active-"+e},scrolling:function(e){return"ps--scrolling-"+e}},h={x:null,y:null};function m(e,t){var r=e.element.classList,n=f.scrolling(t);r.contains(n)?clearTimeout(h[t]):r.add(n)}function y(e,t){h[t]=setTimeout(function(){return e.isAlive&&e.element.classList.remove(f.scrolling(t))},e.settings.scrollingThreshold)}var g=function(e){this.element=e,this.handlers={}},b={isEmpty:{configurable:!0}};g.prototype.bind=function(e,t){void 0===this.handlers[e]&&(this.handlers[e]=[]),this.handlers[e].push(t),this.element.addEventListener(e,t,!1)},g.prototype.unbind=function(e,t){var r=this;this.handlers[e]=this.handlers[e].filter(function(n){return!(!t||n===t)||(r.element.removeEventListener(e,n,!1),!1)})},g.prototype.unbindAll=function(){for(var e in this.handlers)this.unbind(e)},b.isEmpty.get=function(){var e=this;return Object.keys(this.handlers).every(function(t){return 0===e.handlers[t].length})},Object.defineProperties(g.prototype,b);var v=function(){this.eventElements=[]};function x(e){if("function"==typeof window.CustomEvent)return new CustomEvent(e);var t=document.createEvent("CustomEvent");return t.initCustomEvent(e,!1,!1,void 0),t}function w(e,t,r,n,i){var o;if(void 0===n&&(n=!0),void 0===i&&(i=!1),"top"===t)o=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==t)throw new Error("A proper axis should be provided");o=["contentWidth","containerWidth","scrollLeft","x","left","right"]}!function(e,t,r,n,i){var o=r[0],s=r[1],a=r[2],l=r[3],c=r[4],u=r[5];void 0===n&&(n=!0);void 0===i&&(i=!1);var p=e.element;e.reach[l]=null,p[a]<1&&(e.reach[l]="start");p[a]>e[o]-e[s]-1&&(e.reach[l]="end");t&&(p.dispatchEvent(x("ps-scroll-"+l)),t<0?p.dispatchEvent(x("ps-scroll-"+c)):t>0&&p.dispatchEvent(x("ps-scroll-"+u)),n&&function(e,t){m(e,t),y(e,t)}(e,l));e.reach[l]&&(t||i)&&p.dispatchEvent(x("ps-"+l+"-reach-"+e.reach[l]))}(e,r,o,n,i)}function S(e){return parseInt(e,10)||0}v.prototype.eventElement=function(e){var t=this.eventElements.filter(function(t){return t.element===e})[0];return t||(t=new g(e),this.eventElements.push(t)),t},v.prototype.bind=function(e,t,r){this.eventElement(e).bind(t,r)},v.prototype.unbind=function(e,t,r){var n=this.eventElement(e);n.unbind(t,r),n.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(n),1)},v.prototype.unbindAll=function(){this.eventElements.forEach(function(e){return e.unbindAll()}),this.eventElements=[]},v.prototype.once=function(e,t,r){var n=this.eventElement(e),i=function(e){n.unbind(t,i),r(e)};n.bind(t,i)};var k={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)};function O(e){var t=e.element,r=Math.floor(t.scrollTop),n=t.getBoundingClientRect();e.containerWidth=Math.floor(n.width),e.containerHeight=Math.floor(n.height),e.contentWidth=t.scrollWidth,e.contentHeight=t.scrollHeight,t.contains(e.scrollbarXRail)||(c(t,d.rail("x")).forEach(function(e){return l(e)}),t.appendChild(e.scrollbarXRail)),t.contains(e.scrollbarYRail)||(c(t,d.rail("y")).forEach(function(e){return l(e)}),t.appendChild(e.scrollbarYRail)),!e.settings.suppressScrollX&&e.containerWidth+e.settings.scrollXMarginOffset=e.railXWidth-e.scrollbarXWidth&&(e.scrollbarXLeft=e.railXWidth-e.scrollbarXWidth),e.scrollbarYTop>=e.railYHeight-e.scrollbarYHeight&&(e.scrollbarYTop=e.railYHeight-e.scrollbarYHeight),function(e,t){var r={width:t.railXWidth},n=Math.floor(e.scrollTop);t.isRtl?r.left=t.negativeScrollAdjustment+e.scrollLeft+t.containerWidth-t.contentWidth:r.left=e.scrollLeft;t.isScrollbarXUsingBottom?r.bottom=t.scrollbarXBottom-n:r.top=t.scrollbarXTop+n;i(t.scrollbarXRail,r);var o={top:n,height:t.railYHeight};t.isScrollbarYUsingRight?t.isRtl?o.right=t.contentWidth-(t.negativeScrollAdjustment+e.scrollLeft)-t.scrollbarYRight-t.scrollbarYOuterWidth-9:o.right=t.scrollbarYRight-e.scrollLeft:t.isRtl?o.left=t.negativeScrollAdjustment+e.scrollLeft+2*t.containerWidth-t.contentWidth-t.scrollbarYLeft-t.scrollbarYOuterWidth:o.left=t.scrollbarYLeft+e.scrollLeft;i(t.scrollbarYRail,o),i(t.scrollbarX,{left:t.scrollbarXLeft,width:t.scrollbarXWidth-t.railBorderXWidth}),i(t.scrollbarY,{top:t.scrollbarYTop,height:t.scrollbarYHeight-t.railBorderYWidth})}(t,e),e.scrollbarXActive?t.classList.add(f.active("x")):(t.classList.remove(f.active("x")),e.scrollbarXWidth=0,e.scrollbarXLeft=0,t.scrollLeft=!0===e.isRtl?e.contentWidth:0),e.scrollbarYActive?t.classList.add(f.active("y")):(t.classList.remove(f.active("y")),e.scrollbarYHeight=0,e.scrollbarYTop=0,t.scrollTop=0)}function _(e,t){return e.settings.minScrollbarLength&&(t=Math.max(t,e.settings.minScrollbarLength)),e.settings.maxScrollbarLength&&(t=Math.min(t,e.settings.maxScrollbarLength)),t}var E=null;function A(e,t){var r=t[0],n=t[1],i=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],u=t[8],p=e.element,d=null,h=null,g=null;function b(t){t.touches&&t.touches[0]&&(t[i]=t.touches[0]["page"+c.toUpperCase()]),E===s&&(p[l]=d+g*(t[i]-h),m(e,c),O(e),t.stopPropagation(),t.preventDefault())}function v(){y(e,c),e[u].classList.remove(f.clicking),document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",v),document.removeEventListener("touchmove",b),document.removeEventListener("touchend",v),E=null}function x(t){null===E&&(E=s,d=p[l],t.touches&&(t[i]=t.touches[0]["page"+c.toUpperCase()]),h=t[i],g=(e[n]-e[r])/(e[o]-e[a]),t.touches?(document.addEventListener("touchmove",b,{passive:!1}),document.addEventListener("touchend",v)):(document.addEventListener("mousemove",b),document.addEventListener("mouseup",v)),e[u].classList.add(f.clicking)),t.stopPropagation(),t.cancelable&&t.preventDefault()}e[s].addEventListener("mousedown",x),e[s].addEventListener("touchstart",x)}var j={"click-rail":function(e){e.event.bind(e.scrollbarY,"mousedown",function(e){return e.stopPropagation()}),e.event.bind(e.scrollbarYRail,"mousedown",function(t){var r=t.pageY-window.pageYOffset-e.scrollbarYRail.getBoundingClientRect().top>e.scrollbarYTop?1:-1;e.element.scrollTop+=r*e.containerHeight,O(e),t.stopPropagation()}),e.event.bind(e.scrollbarX,"mousedown",function(e){return e.stopPropagation()}),e.event.bind(e.scrollbarXRail,"mousedown",function(t){var r=t.pageX-window.pageXOffset-e.scrollbarXRail.getBoundingClientRect().left>e.scrollbarXLeft?1:-1;e.element.scrollLeft+=r*e.containerWidth,O(e),t.stopPropagation()})},"drag-thumb":function(e){A(e,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"]),A(e,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"])},keyboard:function(e){var t=e.element;e.event.bind(e.ownerDocument,"keydown",function(r){if(!(r.isDefaultPrevented&&r.isDefaultPrevented()||r.defaultPrevented)&&(a(t,":hover")||a(e.scrollbarX,":focus")||a(e.scrollbarY,":focus"))){var n,i=document.activeElement?document.activeElement:e.ownerDocument.activeElement;if(i){if("IFRAME"===i.tagName)i=i.contentDocument.activeElement;else for(;i.shadowRoot;)i=i.shadowRoot.activeElement;if(a(n=i,"input,[contenteditable]")||a(n,"select,[contenteditable]")||a(n,"textarea,[contenteditable]")||a(n,"button,[contenteditable]"))return}var o=0,s=0;switch(r.which){case 37:o=r.metaKey?-e.contentWidth:r.altKey?-e.containerWidth:-30;break;case 38:s=r.metaKey?e.contentHeight:r.altKey?e.containerHeight:30;break;case 39:o=r.metaKey?e.contentWidth:r.altKey?e.containerWidth:30;break;case 40:s=r.metaKey?-e.contentHeight:r.altKey?-e.containerHeight:-30;break;case 32:s=r.shiftKey?e.containerHeight:-e.containerHeight;break;case 33:s=e.containerHeight;break;case 34:s=-e.containerHeight;break;case 36:s=e.contentHeight;break;case 35:s=-e.contentHeight;break;default:return}e.settings.suppressScrollX&&0!==o||e.settings.suppressScrollY&&0!==s||(t.scrollTop-=s,t.scrollLeft+=o,O(e),function(r,n){var i=Math.floor(t.scrollTop);if(0===r){if(!e.scrollbarYActive)return!1;if(0===i&&n>0||i>=e.contentHeight-e.containerHeight&&n<0)return!e.settings.wheelPropagation}var o=t.scrollLeft;if(0===n){if(!e.scrollbarXActive)return!1;if(0===o&&r<0||o>=e.contentWidth-e.containerWidth&&r>0)return!e.settings.wheelPropagation}return!0}(o,s)&&r.preventDefault())}})},wheel:function(e){var t=e.element;function r(r){var i=function(e){var t=e.deltaX,r=-1*e.deltaY;return void 0!==t&&void 0!==r||(t=-1*e.wheelDeltaX/6,r=e.wheelDeltaY/6),e.deltaMode&&1===e.deltaMode&&(t*=10,r*=10),t!=t&&r!=r&&(t=0,r=e.wheelDelta),e.shiftKey?[-r,-t]:[t,r]}(r),o=i[0],s=i[1];if(!function(e,r,i){if(!k.isWebKit&&t.querySelector("select:focus"))return!0;if(!t.contains(e))return!1;for(var o=e;o&&o!==t;){if(o.classList.contains(d.consuming))return!0;var s=n(o);if(i&&s.overflowY.match(/(scroll|auto)/)){var a=o.scrollHeight-o.clientHeight;if(a>0&&(o.scrollTop>0&&i<0||o.scrollTop0))return!0}if(r&&s.overflowX.match(/(scroll|auto)/)){var l=o.scrollWidth-o.clientWidth;if(l>0&&(o.scrollLeft>0&&r<0||o.scrollLeft0))return!0}o=o.parentNode}return!1}(r.target,o,s)){var a=!1;e.settings.useBothWheelAxes?e.scrollbarYActive&&!e.scrollbarXActive?(s?t.scrollTop-=s*e.settings.wheelSpeed:t.scrollTop+=o*e.settings.wheelSpeed,a=!0):e.scrollbarXActive&&!e.scrollbarYActive&&(o?t.scrollLeft+=o*e.settings.wheelSpeed:t.scrollLeft-=s*e.settings.wheelSpeed,a=!0):(t.scrollTop-=s*e.settings.wheelSpeed,t.scrollLeft+=o*e.settings.wheelSpeed),O(e),a=a||function(r,n){var i=Math.floor(t.scrollTop),o=0===t.scrollTop,s=i+t.offsetHeight===t.scrollHeight,a=0===t.scrollLeft,l=t.scrollLeft+t.offsetWidth===t.scrollWidth;return!(Math.abs(n)>Math.abs(r)?o||s:a||l)||!e.settings.wheelPropagation}(o,s),a&&!r.ctrlKey&&(r.stopPropagation(),r.preventDefault())}}void 0!==window.onwheel?e.event.bind(t,"wheel",r):void 0!==window.onmousewheel&&e.event.bind(t,"mousewheel",r)},touch:function(e){if(k.supportsTouch||k.supportsIePointer){var t=e.element,r={startOffset:{},startTime:0,speed:{},easingLoop:null};k.supportsTouch?(e.event.bind(t,"touchstart",a),e.event.bind(t,"touchmove",l),e.event.bind(t,"touchend",c)):k.supportsIePointer&&(window.PointerEvent?(e.event.bind(t,"pointerdown",a),e.event.bind(t,"pointermove",l),e.event.bind(t,"pointerup",c)):window.MSPointerEvent&&(e.event.bind(t,"MSPointerDown",a),e.event.bind(t,"MSPointerMove",l),e.event.bind(t,"MSPointerUp",c)))}function i(r,n){t.scrollTop-=n,t.scrollLeft-=r,O(e)}function o(e){return e.targetTouches?e.targetTouches[0]:e}function s(t){return t.target!==e.scrollbarX&&t.target!==e.scrollbarY&&((!t.pointerType||"pen"!==t.pointerType||0!==t.buttons)&&(!(!t.targetTouches||1!==t.targetTouches.length)||!(!t.pointerType||"mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE)))}function a(e){if(s(e)){var t=o(e);r.startOffset.pageX=t.pageX,r.startOffset.pageY=t.pageY,r.startTime=(new Date).getTime(),null!==r.easingLoop&&clearInterval(r.easingLoop)}}function l(a){if(s(a)){var l=o(a),c={pageX:l.pageX,pageY:l.pageY},u=c.pageX-r.startOffset.pageX,p=c.pageY-r.startOffset.pageY;if(function(e,r,i){if(!t.contains(e))return!1;for(var o=e;o&&o!==t;){if(o.classList.contains(d.consuming))return!0;var s=n(o);if(i&&s.overflowY.match(/(scroll|auto)/)){var a=o.scrollHeight-o.clientHeight;if(a>0&&(o.scrollTop>0&&i<0||o.scrollTop0))return!0}if(r&&s.overflowX.match(/(scroll|auto)/)){var l=o.scrollWidth-o.clientWidth;if(l>0&&(o.scrollLeft>0&&r<0||o.scrollLeft0))return!0}o=o.parentNode}return!1}(a.target,u,p))return;i(u,p),r.startOffset=c;var f=(new Date).getTime(),h=f-r.startTime;h>0&&(r.speed.x=u/h,r.speed.y=p/h,r.startTime=f),function(r,n){var i=Math.floor(t.scrollTop),o=t.scrollLeft,s=Math.abs(r),a=Math.abs(n);if(a>s){if(n<0&&i===e.contentHeight-e.containerHeight||n>0&&0===i)return 0===window.scrollY&&n>0&&k.isChrome}else if(s>a&&(r<0&&o===e.contentWidth-e.containerWidth||r>0&&0===o))return!0;return!0}(u,p)&&a.cancelable&&a.preventDefault()}}function c(){e.settings.swipeEasing&&(clearInterval(r.easingLoop),r.easingLoop=setInterval(function(){e.isInitialized?clearInterval(r.easingLoop):r.speed.x||r.speed.y?Math.abs(r.speed.x)<.01&&Math.abs(r.speed.y)<.01?clearInterval(r.easingLoop):(i(30*r.speed.x,30*r.speed.y),r.speed.x*=.8,r.speed.y*=.8):clearInterval(r.easingLoop)},10))}}},P=function(e,t){var r=this;if(void 0===t&&(t={}),"string"==typeof e&&(e=document.querySelector(e)),!e||!e.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(var s in this.element=e,e.classList.add(u),this.settings={handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1},t)this.settings[s]=t[s];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var a,l,c=function(){return e.classList.add(f.focus)},h=function(){return e.classList.remove(f.focus)};this.isRtl="rtl"===n(e).direction,!0===this.isRtl&&e.classList.add(p),this.isNegativeScroll=(l=e.scrollLeft,e.scrollLeft=-1,a=e.scrollLeft<0,e.scrollLeft=l,a),this.negativeScrollAdjustment=this.isNegativeScroll?e.scrollWidth-e.clientWidth:0,this.event=new v,this.ownerDocument=e.ownerDocument||document,this.scrollbarXRail=o(d.rail("x")),e.appendChild(this.scrollbarXRail),this.scrollbarX=o(d.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",c),this.event.bind(this.scrollbarX,"blur",h),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var m=n(this.scrollbarXRail);this.scrollbarXBottom=parseInt(m.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=S(m.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=S(m.borderLeftWidth)+S(m.borderRightWidth),i(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=S(m.marginLeft)+S(m.marginRight),i(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=o(d.rail("y")),e.appendChild(this.scrollbarYRail),this.scrollbarY=o(d.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",c),this.event.bind(this.scrollbarY,"blur",h),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var y=n(this.scrollbarYRail);this.scrollbarYRight=parseInt(y.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=S(y.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?function(e){var t=n(e);return S(t.width)+S(t.paddingLeft)+S(t.paddingRight)+S(t.borderLeftWidth)+S(t.borderRightWidth)}(this.scrollbarY):null,this.railBorderYWidth=S(y.borderTopWidth)+S(y.borderBottomWidth),i(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=S(y.marginTop)+S(y.marginBottom),i(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:e.scrollLeft<=0?"start":e.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:e.scrollTop<=0?"start":e.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach(function(e){return j[e](r)}),this.lastScrollTop=Math.floor(e.scrollTop),this.lastScrollLeft=e.scrollLeft,this.event.bind(this.element,"scroll",function(e){return r.onScroll(e)}),O(this)};P.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,i(this.scrollbarXRail,{display:"block"}),i(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=S(n(this.scrollbarXRail).marginLeft)+S(n(this.scrollbarXRail).marginRight),this.railYMarginHeight=S(n(this.scrollbarYRail).marginTop)+S(n(this.scrollbarYRail).marginBottom),i(this.scrollbarXRail,{display:"none"}),i(this.scrollbarYRail,{display:"none"}),O(this),w(this,"top",0,!1,!0),w(this,"left",0,!1,!0),i(this.scrollbarXRail,{display:""}),i(this.scrollbarYRail,{display:""}))},P.prototype.onScroll=function(e){this.isAlive&&(O(this),w(this,"top",this.element.scrollTop-this.lastScrollTop),w(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},P.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),l(this.scrollbarX),l(this.scrollbarY),l(this.scrollbarXRail),l(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},P.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter(function(e){return!e.match(/^ps([-_].+|)$/)}).join(" ")};const $=P},55127(e){e.exports=function(){var e=[],t=[],r={},n={},i={};function o(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function s(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function a(e,t){return e.replace(/\$(\d{1,2})/g,function(e,r){return t[r]||""})}function l(e,t){return e.replace(t[0],function(r,n){var i=a(t[1],arguments);return s(""===r?e[n-1]:r,i)})}function c(e,t,n){if(!e.length||r.hasOwnProperty(e))return t;for(var i=n.length;i--;){var o=n[i];if(o[0].test(t))return l(t,o)}return t}function u(e,t,r){return function(n){var i=n.toLowerCase();return t.hasOwnProperty(i)?s(n,i):e.hasOwnProperty(i)?s(n,e[i]):c(i,n,r)}}function p(e,t,r,n){return function(n){var i=n.toLowerCase();return!!t.hasOwnProperty(i)||!e.hasOwnProperty(i)&&c(i,i,r)===i}}function d(e,t,r){return(r?t+" ":"")+(1===t?d.singular(e):d.plural(e))}return d.plural=u(i,n,e),d.isPlural=p(i,n,e),d.singular=u(n,i,t),d.isSingular=p(n,i,t),d.addPluralRule=function(t,r){e.push([o(t),r])},d.addSingularRule=function(e,r){t.push([o(e),r])},d.addUncountableRule=function(e){"string"!=typeof e?(d.addPluralRule(e,"$0"),d.addSingularRule(e,"$0")):r[e.toLowerCase()]=!0},d.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),i[e]=t,n[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(e){return d.addIrregularRule(e[0],e[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(e){return d.addPluralRule(e[0],e[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(e){return d.addSingularRule(e[0],e[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[e\xe9]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(d.addUncountableRule),d}()},1885(e,t,r){"use strict";r.r(t),r.d(t,{adjustHue:()=>Ve,animation:()=>mt,backgroundImages:()=>yt,backgrounds:()=>gt,between:()=>V,border:()=>vt,borderColor:()=>xt,borderRadius:()=>wt,borderStyle:()=>St,borderWidth:()=>kt,buttons:()=>jt,clearFix:()=>W,complement:()=>We,cover:()=>H,cssVar:()=>x,darken:()=>Ke,desaturate:()=>Qe,directionalProperty:()=>O,easeIn:()=>z,easeInOut:()=>F,easeOut:()=>U,ellipsis:()=>K,em:()=>P,fluidRange:()=>Y,fontFace:()=>ie,getContrast:()=>Ye,getLuminance:()=>Ge,getValueAndUnit:()=>C,grayscale:()=>Xe,hiDPI:()=>ae,hideText:()=>oe,hideVisually:()=>se,hsl:()=>De,hslToColorString:()=>Je,hsla:()=>Me,important:()=>T,invert:()=>Ze,lighten:()=>et,linearGradient:()=>ce,margin:()=>Pt,math:()=>b,meetsContrastGuidelines:()=>tt,mix:()=>rt,modularScale:()=>N,normalize:()=>ue,opacify:()=>nt,padding:()=>$t,parseToHsl:()=>Ce,parseToRgb:()=>$e,position:()=>Tt,radialGradient:()=>pe,readableColor:()=>st,rem:()=>R,remToPx:()=>D,retinaImage:()=>de,rgb:()=>ze,rgbToColorString:()=>at,rgba:()=>Be,saturate:()=>lt,setHue:()=>ct,setLightness:()=>ut,setSaturation:()=>pt,shade:()=>dt,size:()=>It,stripUnit:()=>A,textInputs:()=>Lt,timingFunctions:()=>he,tint:()=>ft,toColorString:()=>Fe,transitions:()=>Dt,transparentize:()=>ht,triangle:()=>ye,wordWrap:()=>ge});var n=r(58168);var i=r(77387);function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}var s=r(63662);function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}function l(e){var t="function"==typeof Map?new Map:void 0;return l=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(a())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&(0,s.A)(i,r.prototype),i}(e,arguments,o(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),(0,s.A)(r,e)},l(e)}function c(e,t){return t||(t=e.slice(0)),e.raw=t,e}function u(){var e;return(e=arguments.length-1)<0||arguments.length<=e?void 0:arguments[e]}var p={symbols:{"*":{infix:{symbol:"*",f:function(e,t){return e*t},notation:"infix",precedence:4,rightToLeft:0,argCount:2},symbol:"*",regSymbol:"\\*"},"/":{infix:{symbol:"/",f:function(e,t){return e/t},notation:"infix",precedence:4,rightToLeft:0,argCount:2},symbol:"/",regSymbol:"/"},"+":{infix:{symbol:"+",f:function(e,t){return e+t},notation:"infix",precedence:2,rightToLeft:0,argCount:2},prefix:{symbol:"+",f:u,notation:"prefix",precedence:3,rightToLeft:0,argCount:1},symbol:"+",regSymbol:"\\+"},"-":{infix:{symbol:"-",f:function(e,t){return e-t},notation:"infix",precedence:2,rightToLeft:0,argCount:2},prefix:{symbol:"-",f:function(e){return-e},notation:"prefix",precedence:3,rightToLeft:0,argCount:1},symbol:"-",regSymbol:"-"},",":{infix:{symbol:",",f:function(){return Array.of.apply(Array,arguments)},notation:"infix",precedence:1,rightToLeft:0,argCount:2},symbol:",",regSymbol:","},"(":{prefix:{symbol:"(",f:u,notation:"prefix",precedence:0,rightToLeft:0,argCount:1},symbol:"(",regSymbol:"\\("},")":{postfix:{symbol:")",f:void 0,notation:"postfix",precedence:0,rightToLeft:0,argCount:1},symbol:")",regSymbol:"\\)"},min:{func:{symbol:"min",f:function(){return Math.min.apply(Math,arguments)},notation:"func",precedence:0,rightToLeft:0,argCount:1},symbol:"min",regSymbol:"min\\b"},max:{func:{symbol:"max",f:function(){return Math.max.apply(Math,arguments)},notation:"func",precedence:0,rightToLeft:0,argCount:1},symbol:"max",regSymbol:"max\\b"}}},d=p;var f=function(e){function t(t){return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#"+t+" for more information.")||this)}return(0,i.A)(t,e),t}(l(Error)),h=/((?!\w)a|na|hc|mc|dg|me[r]?|xe|ni(?![a-zA-Z])|mm|cp|tp|xp|q(?!s)|hv|xamv|nimv|wv|sm|s(?!\D|$)|ged|darg?|nrut)/g;function m(e,t){var r,n=e.pop();return t.push(n.f.apply(n,(r=[]).concat.apply(r,t.splice(-n.argCount)))),n.precedence}function y(e,t){var r,i=function(e){var t={};return t.symbols=e?(0,n.A)({},d.symbols,e.symbols):(0,n.A)({},d.symbols),t}(t),o=[i.symbols["("].prefix],s=[],a=new RegExp("\\d+(?:\\.\\d+)?|"+Object.keys(i.symbols).map(function(e){return i.symbols[e]}).sort(function(e,t){return t.symbol.length-e.symbol.length}).map(function(e){return e.regSymbol}).join("|")+"|(\\S)","g");a.lastIndex=0;var l=!1;do{var c=(r=a.exec(e))||[")",void 0],u=c[0],p=c[1],h=i.symbols[u],y=h&&!h.prefix&&!h.func,g=!h||!h.postfix&&!h.infix;if(p||(l?g:y))throw new f(37,r?r.index:e.length,e);if(l){var b=h.postfix||h.infix;do{var v=o[o.length-1];if((b.precedence-v.precedence||v.rightToLeft)>0)break}while(m(o,s));l="postfix"===b.notation,")"!==b.symbol&&(o.push(b),l&&m(o,s))}else if(h){if(o.push(h.prefix||h.func),h.func&&(!(r=a.exec(e))||"("!==r[0]))throw new f(38,r?r.index:e.length,e)}else s.push(+u),l=!0}while(r&&o.length);if(o.length)throw new f(39,r?r.index:e.length,e);if(r)throw new f(40,r?r.index:e.length,e);return s.pop()}function g(e){return e.split("").reverse().join("")}function b(e,t){var r=g(e),n=r.match(h);if(n&&!n.every(function(e){return e===n[0]}))throw new f(41);return""+y(g(r.replace(h,"")),t)+(n?g(n[0]):"")}var v=/--[\S]*/g;function x(e,t){if(!e||!e.match(v))throw new f(73);var r;if("undefined"!=typeof document&&null!==document.documentElement&&(r=getComputedStyle(document.documentElement).getPropertyValue(e)),r)return r.trim();if(t)return t;throw new f(74)}function w(e){return e.charAt(0).toUpperCase()+e.slice(1)}var S=["Top","Right","Bottom","Left"];function k(e,t){if(!e)return t.toLowerCase();var r=e.split("-");if(r.length>1)return r.splice(1,0,t),r.reduce(function(e,t){return""+e+w(t)});var n=e.replace(/([a-z])([A-Z])/g,"$1"+t+"$2");return e===n?""+e+t:n}function O(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=0)?r[n]=e[n]+" !important":r[n]=e[n]}),r}var I={minorSecond:1.067,majorSecond:1.125,minorThird:1.2,majorThird:1.25,perfectFourth:1.333,augFourth:1.414,perfectFifth:1.5,minorSixth:1.6,goldenSection:1.618,majorSixth:1.667,minorSeventh:1.778,majorSeventh:1.875,octave:2,majorTenth:2.5,majorEleventh:2.667,majorTwelfth:3,doubleOctave:4};function N(e,t,r){if(void 0===t&&(t="1em"),void 0===r&&(r=1.333),"number"!=typeof e)throw new f(42);if("string"==typeof r&&!I[r])throw new f(43);var n="string"==typeof t?C(t):[t,""],i=n[0],o=n[1],s="string"==typeof r?I[r]:r;if("string"==typeof i)throw new f(44,t);return""+i*Math.pow(s,e)+(o||"")}var R=j("rem");function L(e){var t=C(e);if("px"===t[1])return parseFloat(e);if("%"===t[1])return parseFloat(e)/100*16;throw new f(78,t[1])}function D(e,t){var r=C(e);if("rem"!==r[1]&&""!==r[1])throw new f(77,r[1]);var n=t?L(t):function(){if("undefined"!=typeof document&&null!==document.documentElement){var e=getComputedStyle(document.documentElement).fontSize;return e?L(e):16}return 16}();return r[0]*n+"px"}var M={back:"cubic-bezier(0.600, -0.280, 0.735, 0.045)",circ:"cubic-bezier(0.600, 0.040, 0.980, 0.335)",cubic:"cubic-bezier(0.550, 0.055, 0.675, 0.190)",expo:"cubic-bezier(0.950, 0.050, 0.795, 0.035)",quad:"cubic-bezier(0.550, 0.085, 0.680, 0.530)",quart:"cubic-bezier(0.895, 0.030, 0.685, 0.220)",quint:"cubic-bezier(0.755, 0.050, 0.855, 0.060)",sine:"cubic-bezier(0.470, 0.000, 0.745, 0.715)"};function z(e){return M[e.toLowerCase().trim()]}var B={back:"cubic-bezier(0.680, -0.550, 0.265, 1.550)",circ:"cubic-bezier(0.785, 0.135, 0.150, 0.860)",cubic:"cubic-bezier(0.645, 0.045, 0.355, 1.000)",expo:"cubic-bezier(1.000, 0.000, 0.000, 1.000)",quad:"cubic-bezier(0.455, 0.030, 0.515, 0.955)",quart:"cubic-bezier(0.770, 0.000, 0.175, 1.000)",quint:"cubic-bezier(0.860, 0.000, 0.070, 1.000)",sine:"cubic-bezier(0.445, 0.050, 0.550, 0.950)"};function F(e){return B[e.toLowerCase().trim()]}var q={back:"cubic-bezier(0.175, 0.885, 0.320, 1.275)",cubic:"cubic-bezier(0.215, 0.610, 0.355, 1.000)",circ:"cubic-bezier(0.075, 0.820, 0.165, 1.000)",expo:"cubic-bezier(0.190, 1.000, 0.220, 1.000)",quad:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",quart:"cubic-bezier(0.165, 0.840, 0.440, 1.000)",quint:"cubic-bezier(0.230, 1.000, 0.320, 1.000)",sine:"cubic-bezier(0.390, 0.575, 0.565, 1.000)"};function U(e){return q[e.toLowerCase().trim()]}function V(e,t,r,n){void 0===r&&(r="320px"),void 0===n&&(n="1200px");var i=C(e),o=i[0],s=i[1],a=C(t),l=a[0],c=a[1],u=C(r),p=u[0],d=u[1],h=C(n),m=h[0],y=h[1];if("number"!=typeof p||"number"!=typeof m||!d||!y||d!==y)throw new f(47);if("number"!=typeof o||"number"!=typeof l||s!==c)throw new f(48);if(s!==d||c!==y)throw new f(76);var g=(o-l)/(p-m);return"calc("+(l-g*m).toFixed(2)+(s||"")+" + "+(100*g).toFixed(2)+"vw)"}function W(e){var t;return void 0===e&&(e="&"),(t={})[e+"::after"]={clear:"both",content:'""',display:"table"},t}function H(e){return void 0===e&&(e=0),{position:"absolute",top:e,right:e,bottom:e,left:e}}function K(e,t){void 0===t&&(t=1);var r={display:"inline-block",maxWidth:e||"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",wordWrap:"normal"};return t>1?(0,n.A)({},r,{WebkitBoxOrient:"vertical",WebkitLineClamp:t,display:"-webkit-box",whiteSpace:"normal"}):r}function Q(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return G(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return G(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1?r-1:0),i=1;i1?(t=t.slice(0,-1),t+=", "+n[o]):1===s.length&&(t+=""+n[o])}else n[o]&&(t+=n[o]+" ");return t.trim()}function ce(e){var t=e.colorStops,r=e.fallback,n=e.toDirection,i=void 0===n?"":n;if(!t||t.length<2)throw new f(56);return{backgroundColor:r||t[0].replace(/,\s+/g,",").split(" ")[0].replace(/,(?=\S)/g,", "),backgroundImage:le(X||(X=c(["linear-gradient(","",")"])),i,t.join(", ").replace(/,(?=\S)/g,", "))}}function ue(){var e;return[(e={html:{lineHeight:"1.15",textSizeAdjust:"100%"},body:{margin:"0"},main:{display:"block"},h1:{fontSize:"2em",margin:"0.67em 0"},hr:{boxSizing:"content-box",height:"0",overflow:"visible"},pre:{fontFamily:"monospace, monospace",fontSize:"1em"},a:{backgroundColor:"transparent"},"abbr[title]":{borderBottom:"none",textDecoration:"underline"}},e["b,\n strong"]={fontWeight:"bolder"},e["code,\n kbd,\n samp"]={fontFamily:"monospace, monospace",fontSize:"1em"},e.small={fontSize:"80%"},e["sub,\n sup"]={fontSize:"75%",lineHeight:"0",position:"relative",verticalAlign:"baseline"},e.sub={bottom:"-0.25em"},e.sup={top:"-0.5em"},e.img={borderStyle:"none"},e["button,\n input,\n optgroup,\n select,\n textarea"]={fontFamily:"inherit",fontSize:"100%",lineHeight:"1.15",margin:"0"},e["button,\n input"]={overflow:"visible"},e["button,\n select"]={textTransform:"none"},e['button,\n html [type="button"],\n [type="reset"],\n [type="submit"]']={WebkitAppearance:"button"},e['button::-moz-focus-inner,\n [type="button"]::-moz-focus-inner,\n [type="reset"]::-moz-focus-inner,\n [type="submit"]::-moz-focus-inner']={borderStyle:"none",padding:"0"},e['button:-moz-focusring,\n [type="button"]:-moz-focusring,\n [type="reset"]:-moz-focusring,\n [type="submit"]:-moz-focusring']={outline:"1px dotted ButtonText"},e.fieldset={padding:"0.35em 0.625em 0.75em"},e.legend={boxSizing:"border-box",color:"inherit",display:"table",maxWidth:"100%",padding:"0",whiteSpace:"normal"},e.progress={verticalAlign:"baseline"},e.textarea={overflow:"auto"},e['[type="checkbox"],\n [type="radio"]']={boxSizing:"border-box",padding:"0"},e['[type="number"]::-webkit-inner-spin-button,\n [type="number"]::-webkit-outer-spin-button']={height:"auto"},e['[type="search"]']={WebkitAppearance:"textfield",outlineOffset:"-2px"},e['[type="search"]::-webkit-search-decoration']={WebkitAppearance:"none"},e["::-webkit-file-upload-button"]={WebkitAppearance:"button",font:"inherit"},e.details={display:"block"},e.summary={display:"list-item"},e.template={display:"none"},e["[hidden]"]={display:"none"},e),{"abbr[title]":{textDecoration:"underline dotted"}}]}function pe(e){var t=e.colorStops,r=e.extent,n=void 0===r?"":r,i=e.fallback,o=e.position,s=void 0===o?"":o,a=e.shape,l=void 0===a?"":a;if(!t||t.length<2)throw new f(57);return{backgroundColor:i||t[0].split(" ")[0],backgroundImage:le(J||(J=c(["radial-gradient(","","","",")"])),s,l,n,t.join(", "))}}function de(e,t,r,i,o){var s;if(void 0===r&&(r="png"),void 0===o&&(o="_2x"),!e)throw new f(58);var a=r.replace(/^\./,""),l=i?i+"."+a:""+e+o+"."+a;return(s={backgroundImage:"url("+e+"."+a+")"})[ae()]=(0,n.A)({backgroundImage:"url("+l+")"},t?{backgroundSize:t}:{}),s}var fe={easeInBack:"cubic-bezier(0.600, -0.280, 0.735, 0.045)",easeInCirc:"cubic-bezier(0.600, 0.040, 0.980, 0.335)",easeInCubic:"cubic-bezier(0.550, 0.055, 0.675, 0.190)",easeInExpo:"cubic-bezier(0.950, 0.050, 0.795, 0.035)",easeInQuad:"cubic-bezier(0.550, 0.085, 0.680, 0.530)",easeInQuart:"cubic-bezier(0.895, 0.030, 0.685, 0.220)",easeInQuint:"cubic-bezier(0.755, 0.050, 0.855, 0.060)",easeInSine:"cubic-bezier(0.470, 0.000, 0.745, 0.715)",easeOutBack:"cubic-bezier(0.175, 0.885, 0.320, 1.275)",easeOutCubic:"cubic-bezier(0.215, 0.610, 0.355, 1.000)",easeOutCirc:"cubic-bezier(0.075, 0.820, 0.165, 1.000)",easeOutExpo:"cubic-bezier(0.190, 1.000, 0.220, 1.000)",easeOutQuad:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",easeOutQuart:"cubic-bezier(0.165, 0.840, 0.440, 1.000)",easeOutQuint:"cubic-bezier(0.230, 1.000, 0.320, 1.000)",easeOutSine:"cubic-bezier(0.390, 0.575, 0.565, 1.000)",easeInOutBack:"cubic-bezier(0.680, -0.550, 0.265, 1.550)",easeInOutCirc:"cubic-bezier(0.785, 0.135, 0.150, 0.860)",easeInOutCubic:"cubic-bezier(0.645, 0.045, 0.355, 1.000)",easeInOutExpo:"cubic-bezier(1.000, 0.000, 0.000, 1.000)",easeInOutQuad:"cubic-bezier(0.455, 0.030, 0.515, 0.955)",easeInOutQuart:"cubic-bezier(0.770, 0.000, 0.175, 1.000)",easeInOutQuint:"cubic-bezier(0.860, 0.000, 0.070, 1.000)",easeInOutSine:"cubic-bezier(0.445, 0.050, 0.550, 0.950)"};function he(e){return fe[e]}var me=function(e,t,r){var n=""+r[0]+(r[1]||""),i=""+r[0]/2+(r[1]||""),o=""+t[0]+(t[1]||""),s=""+t[0]/2+(t[1]||"");switch(e){case"top":return"0 "+i+" "+o+" "+i;case"topLeft":return n+" "+o+" 0 0";case"left":return s+" "+n+" "+s+" 0";case"bottomLeft":return n+" 0 0 "+o;case"bottom":return o+" "+i+" 0 "+i;case"bottomRight":return"0 0 "+n+" "+o;case"right":return s+" 0 "+s+" "+n;default:return"0 "+n+" "+o+" 0"}};function ye(e){var t=e.pointingDirection,r=e.height,i=e.width,o=e.foregroundColor,s=e.backgroundColor,a=void 0===s?"transparent":s,l=C(i),c=C(r);if(isNaN(c[0])||isNaN(l[0]))throw new f(60);return(0,n.A)({width:"0",height:"0",borderColor:a},function(e,t){switch(e){case"top":case"bottomRight":return{borderBottomColor:t};case"right":case"bottomLeft":return{borderLeftColor:t};case"bottom":case"topLeft":return{borderTopColor:t};case"left":case"topRight":return{borderRightColor:t};default:throw new f(59)}}(t,o),{borderStyle:"solid",borderWidth:me(t,c,l)})}function ge(e){return void 0===e&&(e="break-word"),{overflowWrap:e,wordWrap:e,wordBreak:"break-word"===e?"break-all":e}}function be(e){return Math.round(255*e)}function ve(e,t,r){return be(e)+","+be(t)+","+be(r)}function xe(e,t,r,n){if(void 0===n&&(n=ve),0===t)return n(r,r,r);var i=(e%360+360)%360/60,o=(1-Math.abs(2*r-1))*t,s=o*(1-Math.abs(i%2-1)),a=0,l=0,c=0;i>=0&&i<1?(a=o,l=s):i>=1&&i<2?(a=s,l=o):i>=2&&i<3?(l=o,c=s):i>=3&&i<4?(l=s,c=o):i>=4&&i<5?(a=s,c=o):i>=5&&i<6&&(a=o,c=s);var u=r-o/2;return n(a+u,l+u,c+u)}var we={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};var Se=/^#[a-fA-F0-9]{6}$/,ke=/^#[a-fA-F0-9]{8}$/,Oe=/^#[a-fA-F0-9]{3}$/,_e=/^#[a-fA-F0-9]{4}$/,Ee=/^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,Ae=/^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i,je=/^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,Pe=/^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;function $e(e){if("string"!=typeof e)throw new f(3);var t=function(e){if("string"!=typeof e)return e;var t=e.toLowerCase();return we[t]?"#"+we[t]:e}(e);if(t.match(Se))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(ke)){var r=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:r}}if(t.match(Oe))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(_e)){var n=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:n}}var i=Ee.exec(t);if(i)return{red:parseInt(""+i[1],10),green:parseInt(""+i[2],10),blue:parseInt(""+i[3],10)};var o=Ae.exec(t.substring(0,50));if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10),alpha:parseFloat(""+o[4])>1?parseFloat(""+o[4])/100:parseFloat(""+o[4])};var s=je.exec(t);if(s){var a="rgb("+xe(parseInt(""+s[1],10),parseInt(""+s[2],10)/100,parseInt(""+s[3],10)/100)+")",l=Ee.exec(a);if(!l)throw new f(4,t,a);return{red:parseInt(""+l[1],10),green:parseInt(""+l[2],10),blue:parseInt(""+l[3],10)}}var c=Pe.exec(t.substring(0,50));if(c){var u="rgb("+xe(parseInt(""+c[1],10),parseInt(""+c[2],10)/100,parseInt(""+c[3],10)/100)+")",p=Ee.exec(u);if(!p)throw new f(4,t,u);return{red:parseInt(""+p[1],10),green:parseInt(""+p[2],10),blue:parseInt(""+p[3],10),alpha:parseFloat(""+c[4])>1?parseFloat(""+c[4])/100:parseFloat(""+c[4])}}throw new f(5)}function Ce(e){return function(e){var t,r=e.red/255,n=e.green/255,i=e.blue/255,o=Math.max(r,n,i),s=Math.min(r,n,i),a=(o+s)/2;if(o===s)return void 0!==e.alpha?{hue:0,saturation:0,lightness:a,alpha:e.alpha}:{hue:0,saturation:0,lightness:a};var l=o-s,c=a>.5?l/(2-o-s):l/(o+s);switch(o){case r:t=(n-i)/l+(n=1?Le(e,t,r):"rgba("+xe(e,t,r)+","+n+")";if("object"==typeof e&&void 0===t&&void 0===r&&void 0===n)return e.alpha>=1?Le(e.hue,e.saturation,e.lightness):"rgba("+xe(e.hue,e.saturation,e.lightness)+","+e.alpha+")";throw new f(2)}function ze(e,t,r){if("number"==typeof e&&"number"==typeof t&&"number"==typeof r)return Te("#"+Ie(e)+Ie(t)+Ie(r));if("object"==typeof e&&void 0===t&&void 0===r)return Te("#"+Ie(e.red)+Ie(e.green)+Ie(e.blue));throw new f(6)}function Be(e,t,r,n){if("string"==typeof e&&"number"==typeof t){var i=$e(e);return"rgba("+i.red+","+i.green+","+i.blue+","+t+")"}if("number"==typeof e&&"number"==typeof t&&"number"==typeof r&&"number"==typeof n)return n>=1?ze(e,t,r):"rgba("+e+","+t+","+r+","+n+")";if("object"==typeof e&&void 0===t&&void 0===r&&void 0===n)return e.alpha>=1?ze(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new f(7)}function Fe(e){if("object"!=typeof e)throw new f(8);if(function(e){return"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&"number"==typeof e.alpha}(e))return Be(e);if(function(e){return"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&("number"!=typeof e.alpha||void 0===e.alpha)}(e))return ze(e);if(function(e){return"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&"number"==typeof e.alpha}(e))return Me(e);if(function(e){return"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&("number"!=typeof e.alpha||void 0===e.alpha)}(e))return De(e);throw new f(8)}function qe(e,t,r){return function(){var n=r.concat(Array.prototype.slice.call(arguments));return n.length>=t?e.apply(this,n):qe(e,t,n)}}function Ue(e){return qe(e,e.length,[])}var Ve=Ue(function(e,t){if("transparent"===t)return t;var r=Ce(t);return Fe((0,n.A)({},r,{hue:r.hue+parseFloat(e)}))});function We(e){if("transparent"===e)return e;var t=Ce(e);return Fe((0,n.A)({},t,{hue:(t.hue+180)%360}))}function He(e,t,r){return Math.max(e,Math.min(t,r))}var Ke=Ue(function(e,t){if("transparent"===t)return t;var r=Ce(t);return Fe((0,n.A)({},r,{lightness:He(0,1,r.lightness-parseFloat(e))}))});var Qe=Ue(function(e,t){if("transparent"===t)return t;var r=Ce(t);return Fe((0,n.A)({},r,{saturation:He(0,1,r.saturation-parseFloat(e))}))});function Ge(e){if("transparent"===e)return 0;var t=$e(e),r=Object.keys(t).map(function(e){var r=t[e]/255;return r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4)}),n=r[0],i=r[1],o=r[2];return parseFloat((.2126*n+.7152*i+.0722*o).toFixed(3))}function Ye(e,t){var r=Ge(e),n=Ge(t);return parseFloat((r>n?(r+.05)/(n+.05):(n+.05)/(r+.05)).toFixed(2))}function Xe(e){return"transparent"===e?e:Fe((0,n.A)({},Ce(e),{saturation:0}))}function Je(e){if("object"==typeof e&&"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness)return e.alpha&&"number"==typeof e.alpha?Me({hue:e.hue,saturation:e.saturation,lightness:e.lightness,alpha:e.alpha}):De({hue:e.hue,saturation:e.saturation,lightness:e.lightness});throw new f(45)}function Ze(e){if("transparent"===e)return e;var t=$e(e);return Fe((0,n.A)({},t,{red:255-t.red,green:255-t.green,blue:255-t.blue}))}var et=Ue(function(e,t){if("transparent"===t)return t;var r=Ce(t);return Fe((0,n.A)({},r,{lightness:He(0,1,r.lightness+parseFloat(e))}))});function tt(e,t){var r=Ye(e,t);return{AA:r>=4.5,AALarge:r>=3,AAA:r>=7,AAALarge:r>=4.5}}var rt=Ue(function(e,t,r){if("transparent"===t)return r;if("transparent"===r)return t;if(0===e)return r;var i=$e(t),o=(0,n.A)({},i,{alpha:"number"==typeof i.alpha?i.alpha:1}),s=$e(r),a=(0,n.A)({},s,{alpha:"number"==typeof s.alpha?s.alpha:1}),l=o.alpha-a.alpha,c=2*parseFloat(e)-1,u=((c*l===-1?c:c+l)/(1+c*l)+1)/2,p=1-u;return Be({red:Math.floor(o.red*u+a.red*p),green:Math.floor(o.green*u+a.green*p),blue:Math.floor(o.blue*u+a.blue*p),alpha:o.alpha*parseFloat(e)+a.alpha*(1-parseFloat(e))})});var nt=Ue(function(e,t){if("transparent"===t)return t;var r=$e(t),i="number"==typeof r.alpha?r.alpha:1;return Be((0,n.A)({},r,{alpha:He(0,1,(100*i+100*parseFloat(e))/100)}))}),it="#000",ot="#fff";function st(e,t,r,n){void 0===t&&(t=it),void 0===r&&(r=ot),void 0===n&&(n=!0);var i=Ge(e)>.179,o=i?t:r;return!n||Ye(e,o)>=4.5?o:i?it:ot}function at(e){if("object"==typeof e&&"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue)return"number"==typeof e.alpha?Be({red:e.red,green:e.green,blue:e.blue,alpha:e.alpha}):ze({red:e.red,green:e.green,blue:e.blue});throw new f(46)}var lt=Ue(function(e,t){if("transparent"===t)return t;var r=Ce(t);return Fe((0,n.A)({},r,{saturation:He(0,1,r.saturation+parseFloat(e))}))});var ct=Ue(function(e,t){return"transparent"===t?t:Fe((0,n.A)({},Ce(t),{hue:parseFloat(e)}))});var ut=Ue(function(e,t){return"transparent"===t?t:Fe((0,n.A)({},Ce(t),{lightness:parseFloat(e)}))});var pt=Ue(function(e,t){return"transparent"===t?t:Fe((0,n.A)({},Ce(t),{saturation:parseFloat(e)}))});var dt=Ue(function(e,t){return"transparent"===t?t:rt(parseFloat(e),"rgb(0, 0, 0)",t)});var ft=Ue(function(e,t){return"transparent"===t?t:rt(parseFloat(e),"rgb(255, 255, 255)",t)});var ht=Ue(function(e,t){if("transparent"===t)return t;var r=$e(t),i="number"==typeof r.alpha?r.alpha:1;return Be((0,n.A)({},r,{alpha:He(0,1,+(100*i-100*parseFloat(e)).toFixed(2)/100)}))});function mt(){for(var e=arguments.length,t=new Array(e),r=0;r8)throw new f(64);return{animation:t.map(function(e){if(n&&!Array.isArray(e)||!n&&Array.isArray(e))throw new f(65);if(Array.isArray(e)&&e.length>8)throw new f(66);return Array.isArray(e)?e.join(" "):e}).join(", ")}}function yt(){for(var e=arguments.length,t=new Array(e),r=0;r1?t-1:0),n=1;n=0?((i={})["border"+w(e)+"Width"]=r[0],i["border"+w(e)+"Style"]=r[1],i["border"+w(e)+"Color"]=r[2],i):(r.unshift(e),{borderWidth:r[0],borderStyle:r[1],borderColor:r[2]})}function xt(){for(var e=arguments.length,t=new Array(e),r=0;r1?t-1:0),i=1;i=0&&e?(0,n.A)({},O.apply(void 0,[""].concat(r)),{position:e}):O.apply(void 0,["",e].concat(r))}function It(e,t){return void 0===t&&(t=e),{height:e,width:t}}var Nt=[void 0,null,"active","focus","hover"];function Rt(e){return'input[type="color"]'+e+',\n input[type="date"]'+e+',\n input[type="datetime"]'+e+',\n input[type="datetime-local"]'+e+',\n input[type="email"]'+e+',\n input[type="month"]'+e+',\n input[type="number"]'+e+',\n input[type="password"]'+e+',\n input[type="search"]'+e+',\n input[type="tel"]'+e+',\n input[type="text"]'+e+',\n input[type="time"]'+e+',\n input[type="url"]'+e+',\n input[type="week"]'+e+",\n input:not([type])"+e+",\n textarea"+e}function Lt(){for(var e=arguments.length,t=new Array(e),r=0;r>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:n},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:n.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=e.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=n.variable[1].inside,s=0;s>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),n.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),n.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},n.languages.c.string],char:n.languages.c.char,comment:n.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:n.languages.c}}}}),n.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete n.languages.c.boolean},75624(e,t,r){r(28848).languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}},44511(e,t,r){!function(e){var t=/#(?!\{).+/,r={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:r}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:r}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:r}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(r(28848))},72415(e,t,r){!function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,r=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,function(){return r})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(r(28848))},5651(e,t,r){!function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,function(e,r){return"(?:"+t[+r]+")"})}function r(e,r,n){return RegExp(t(e,r),n||"")}function n(e,t){for(var r=0;r>/g,function(){return"(?:"+e+")"});return e.replace(/<>/g,"[^\\s\\S]")}var i="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",o="class enum interface record struct",s="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",a="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var c=l(o),u=RegExp(l(i+" "+o+" "+s+" "+a)),p=l(o+" "+s+" "+a),d=l(i+" "+o+" "+a),f=n(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),h=n(/\((?:[^()]|<>)*\)/.source,2),m=/@?\b[A-Za-z_]\w*\b/.source,y=t(/<<0>>(?:\s*<<1>>)?/.source,[m,f]),g=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[p,y]),b=/\[\s*(?:,\s*)*\]/.source,v=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[g,b]),x=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[f,h,b]),w=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[x]),S=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[w,g,b]),k={keyword:u,punctuation:/[<>()?,.:[\]]/},O=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,_=/"(?:\\.|[^\\"\r\n])*"/.source,E=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:r(/(^|[^$\\])<<0>>/.source,[E]),lookbehind:!0,greedy:!0},{pattern:r(/(^|[^@$\\])<<0>>/.source,[_]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:r(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[g]),lookbehind:!0,inside:k},{pattern:r(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[m,S]),lookbehind:!0,inside:k},{pattern:r(/(\busing\s+)<<0>>(?=\s*=)/.source,[m]),lookbehind:!0},{pattern:r(/(\b<<0>>\s+)<<1>>/.source,[c,y]),lookbehind:!0,inside:k},{pattern:r(/(\bcatch\s*\(\s*)<<0>>/.source,[g]),lookbehind:!0,inside:k},{pattern:r(/(\bwhere\s+)<<0>>/.source,[m]),lookbehind:!0},{pattern:r(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[v]),lookbehind:!0,inside:k},{pattern:r(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[S,d,m]),inside:k}],keyword:u,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:r(/([(,]\s*)<<0>>(?=\s*:)/.source,[m]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:r(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[m]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:r(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[h]),lookbehind:!0,alias:"class-name",inside:k},"return-type":{pattern:r(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[S,g]),inside:k,alias:"class-name"},"constructor-invocation":{pattern:r(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[S]),lookbehind:!0,inside:k,alias:"class-name"},"generic-method":{pattern:r(/<<0>>\s*<<1>>(?=\s*\()/.source,[m,f]),inside:{function:r(/^<<0>>/.source,[m]),generic:{pattern:RegExp(f),alias:"class-name",inside:k}}},"type-list":{pattern:r(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[c,y,m,S,u.source,h,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:r(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[y,h]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:u,"class-name":{pattern:RegExp(S),greedy:!0,inside:k},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var A=_+"|"+O,j=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[A]),P=n(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[j]),2),$=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,C=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[g,P]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:r(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[$,C]),lookbehind:!0,greedy:!0,inside:{target:{pattern:r(/^<<0>>(?=\s*:)/.source,[$]),alias:"keyword"},"attribute-arguments":{pattern:r(/\(<<0>>*\)/.source,[P]),inside:e.languages.csharp},"class-name":{pattern:RegExp(g),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var T=/:[^}\r\n]+/.source,I=n(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[j]),2),N=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[I,T]),R=n(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[A]),2),L=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[R,T]);function D(t,n){return{interpolation:{pattern:r(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[t]),lookbehind:!0,inside:{"format-string":{pattern:r(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[n,T]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:r(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[N]),lookbehind:!0,greedy:!0,inside:D(N,I)},{pattern:r(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[L]),lookbehind:!0,greedy:!0,inside:D(L,R)}],char:{pattern:RegExp(O),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(r(28848))},62630(e,t,r){r(28848).languages.csv={value:/[^\r\n,"]+|"(?:[^"]|"")*"(?!")/,punctuation:/,/}},86378(e,t,r){var n=r(28848);n.languages.go=n.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),n.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete n.languages.go["class-name"]},24784(e,t,r){!function(e){function t(e){return RegExp("(^(?:"+e+"):[ \t]*(?![ \t]))[^]+","i")}e.languages.http={"request-line":{pattern:/^(?:CONNECT|DELETE|GET|HEAD|OPTIONS|PATCH|POST|PRI|PUT|SEARCH|TRACE)\s(?:https?:\/\/|\/)\S*\sHTTP\/[\d.]+/m,inside:{method:{pattern:/^[A-Z]+\b/,alias:"property"},"request-target":{pattern:/^(\s)(?:https?:\/\/|\/)\S*(?=\s)/,lookbehind:!0,alias:"url",inside:e.languages.uri},"http-version":{pattern:/^(\s)HTTP\/[\d.]+/,lookbehind:!0,alias:"property"}}},"response-status":{pattern:/^HTTP\/[\d.]+ \d+ .+/m,inside:{"http-version":{pattern:/^HTTP\/[\d.]+/,alias:"property"},"status-code":{pattern:/^(\s)\d+(?=\s)/,lookbehind:!0,alias:"number"},"reason-phrase":{pattern:/^(\s).+/,lookbehind:!0,alias:"string"}}},header:{pattern:/^[\w-]+:.+(?:(?:\r\n?|\n)[ \t].+)*/m,inside:{"header-value":[{pattern:t(/Content-Security-Policy/.source),lookbehind:!0,alias:["csp","languages-csp"],inside:e.languages.csp},{pattern:t(/Public-Key-Pins(?:-Report-Only)?/.source),lookbehind:!0,alias:["hpkp","languages-hpkp"],inside:e.languages.hpkp},{pattern:t(/Strict-Transport-Security/.source),lookbehind:!0,alias:["hsts","languages-hsts"],inside:e.languages.hsts},{pattern:t(/[^:]+/.source),lookbehind:!0}],"header-name":{pattern:/^[^:]+/,alias:"keyword"},punctuation:/^:/}}};var r,n=e.languages,i={"application/javascript":n.javascript,"application/json":n.json||n.javascript,"application/xml":n.xml,"text/xml":n.xml,"text/html":n.html,"text/css":n.css,"text/plain":n.plain},o={"application/json":!0,"application/xml":!0};function s(e){var t=e.replace(/^[a-z]+\//,"");return"(?:"+e+"|"+("\\w+/(?:[\\w.-]+\\+)+"+t+"(?![+\\w.-])")+")"}for(var a in i)if(i[a]){r=r||{};var l=o[a]?s(a):a;r[a.replace(/\//g,"-")]={pattern:RegExp("("+/content-type:\s*/.source+l+/(?:(?:\r\n?|\n)[\w-].*)*(?:\r(?:\n|(?!\n))|\n)/.source+")"+/[^ \t\w-][\s\S]*/.source,"i"),lookbehind:!0,inside:i[a]}}r&&e.languages.insertBefore("http","header",r)}(r(28848))},96976(e,t,r){!function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,r=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,n={pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[n,{pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:n.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+r+/[A-Z]\w*\b/.source),lookbehind:!0,inside:n.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":n,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+r+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:n.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+r+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:n.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(r(28848))},80064(e,t,r){r(28848).languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}},64312(e,t,r){var n=r(28848);n.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(e,t){var r={};r["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:n.languages[t]},r.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:r}};i["language-"+t]={pattern:/[\s\S]+/,inside:n.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:i},n.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(e,t){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:n.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml},20596(e,t,r){var n=r(28848);n.languages.objectivec=n.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete n.languages.objectivec["class-name"],n.languages.objc=n.languages.objectivec},32821(e,t,r){!function(e){var t=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;e.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,t+/\s*/.source+t].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}}(r(28848))},43554(e,t,r){!function(e){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,r=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],n=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,i=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,o=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:r,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:n,operator:i,punctuation:o};var s={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},a=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:s}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:s}}];e.languages.insertBefore("php","variable",{string:a,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:a,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:r,number:n,operator:i,punctuation:o}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",function(t){if(/<\?/.test(t.code)){e.languages["markup-templating"].buildPlaceholders(t,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)}}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"php")})}(r(28848))},52342(e,t,r){var n=r(28848);n.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},n.languages.python["string-interpolation"].inside.interpolation.inside.rest=n.languages.python,n.languages.py=n.languages.python},84113(e,t,r){r(28848).languages.q={string:/"(?:\\.|[^"\\\r\n])*"/,comment:[{pattern:/([\t )\]}])\/.*/,lookbehind:!0,greedy:!0},{pattern:/(^|\r?\n|\r)\/[\t ]*(?:(?:\r?\n|\r)(?:.*(?:\r?\n|\r(?!\n)))*?(?:\\(?=[\t ]*(?:\r?\n|\r))|$)|\S.*)/,lookbehind:!0,greedy:!0},{pattern:/^\\[\t ]*(?:\r?\n|\r)[\s\S]+/m,greedy:!0},{pattern:/^#!.+/m,greedy:!0}],symbol:/`(?::\S+|[\w.]*)/,datetime:{pattern:/0N[mdzuvt]|0W[dtz]|\d{4}\.\d\d(?:m|\.\d\d(?:T(?:\d\d(?::\d\d(?::\d\d(?:[.:]\d\d\d)?)?)?)?)?[dz]?)|\d\d:\d\d(?::\d\d(?:[.:]\d\d\d)?)?[uvt]?/,alias:"number"},number:/\b(?![01]:)(?:0N[hje]?|0W[hj]?|0[wn]|0x[\da-fA-F]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?[hjfeb]?)/,keyword:/\\\w+\b|\b(?:abs|acos|aj0?|all|and|any|asc|asin|asof|atan|attr|avgs?|binr?|by|ceiling|cols|cor|cos|count|cov|cross|csv|cut|delete|deltas|desc|dev|differ|distinct|div|do|dsave|ej|enlist|eval|except|exec|exit|exp|fby|fills|first|fkeys|flip|floor|from|get|getenv|group|gtime|hclose|hcount|hdel|hopen|hsym|iasc|identity|idesc|if|ij|in|insert|inter|inv|keys?|last|like|list|ljf?|load|log|lower|lsq|ltime|ltrim|mavg|maxs?|mcount|md5|mdev|med|meta|mins?|mmax|mmin|mmu|mod|msum|neg|next|not|null|or|over|parse|peach|pj|plist|prds?|prev|prior|rand|rank|ratios|raze|read0|read1|reciprocal|reval|reverse|rload|rotate|rsave|rtrim|save|scan|scov|sdev|select|set|setenv|show|signum|sin|sqrt|ssr?|string|sublist|sums?|sv|svar|system|tables|tan|til|trim|txf|type|uj|ungroup|union|update|upper|upsert|value|var|views?|vs|wavg|where|while|within|wj1?|wsum|ww|xasc|xbar|xcols?|xdesc|xexp|xgroup|xkey|xlog|xprev|xrank)\b/,adverb:{pattern:/['\/\\]:?|\beach\b/,alias:"function"},verb:{pattern:/(?:\B\.\B|\b[01]:|<[=>]?|>=?|[:+\-*%,!?~=|$&#@^]):?|\b_\b:?/,alias:"operator"},punctuation:/[(){}\[\];.]/}},41648(e,t,r){!function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var r="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",n=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+r+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+n),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+n+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+r),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+r),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(r(28848))},64252(e,t,r){var n=r(28848);n.languages.scala=n.languages.extend("java",{"triple-quoted-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:/<-|=>|\b(?:abstract|case|catch|class|def|derives|do|else|enum|extends|extension|final|finally|for|forSome|given|if|implicit|import|infix|inline|lazy|match|new|null|object|opaque|open|override|package|private|protected|return|sealed|self|super|this|throw|trait|transparent|try|type|using|val|var|while|with|yield)\b/,number:/\b0x(?:[\da-f]*\.)?[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e\d+)?[dfl]?/i,builtin:/\b(?:Any|AnyRef|AnyVal|Boolean|Byte|Char|Double|Float|Int|Long|Nothing|Short|String|Unit)\b/,symbol:/'[^\d\s\\]\w*/}),n.languages.insertBefore("scala","triple-quoted-string",{"string-interpolation":{pattern:/\b[a-z]\w*(?:"""(?:[^$]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*?"""|"(?:[^$"\r\n]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*")/i,greedy:!0,inside:{id:{pattern:/^\w+/,greedy:!0,alias:"function"},escape:{pattern:/\\\$"|\$[$"]/,greedy:!0,alias:"symbol"},interpolation:{pattern:/\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,greedy:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:n.languages.scala}}},string:/[\s\S]+/}}}),delete n.languages.scala["class-name"],delete n.languages.scala.function,delete n.languages.scala.constant},96966(e,t,r){r(28848).languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}},54793(e,t,r){var n=r(28848);n.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},n.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=n.languages.swift})},60083(e,t,r){!function(e){var t=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,n="(?:"+r.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+r.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function s(e,t){t=(t||"").replace(/m/g,"")+"m";var r=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return n}).replace(/<>/g,function(){return e});return RegExp(r,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,function(){return n})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,function(){return n}).replace(/<>/g,function(){return"(?:"+i+"|"+o+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:s(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:s(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:s(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:s(o),lookbehind:!0,greedy:!0},number:{pattern:s(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:r,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(r(28848))},63053(e,t,r){"use strict";r.r(t),r.d(t,{Tab:()=>R,TabList:()=>$,TabPanel:()=>B,Tabs:()=>E});var n=r(5556),i=r(96540);function o(e){return t=>!!t.type&&t.type.tabsRole===e}const s=o("Tab"),a=o("TabList"),l=o("TabPanel");function c(e,t){return i.Children.map(e,e=>null===e?null:function(e){return s(e)||a(e)||l(e)}(e)?t(e):e.props&&e.props.children&&"object"==typeof e.props.children?(0,i.cloneElement)(e,Object.assign({},e.props,{children:c(e.props.children,t)})):e)}function u(e,t){return i.Children.forEach(e,e=>{null!==e&&(s(e)||l(e)?t(e):e.props&&e.props.children&&"object"==typeof e.props.children&&(a(e)&&t(e),u(e.props.children,t)))})}function p(e,t,r){let n,i=0,o=0,c=!1;const p=[];return u(e[t],e=>{a(e)&&(e.props&&e.props.children&&"object"==typeof e.props.children&&u(e.props.children,e=>p.push(e)),c&&(n=new Error("Found multiple 'TabList' components inside 'Tabs'. Only one is allowed.")),c=!0),s(e)?(c&&-1!==p.indexOf(e)||(n=new Error("Found a 'Tab' component outside of the 'TabList' component. 'Tab' components have to be inside the 'TabList' component.")),i++):l(e)&&o++}),n||i===o||(n=new Error(`There should be an equal number of 'Tab' and 'TabPanel' in \`${r}\`. Received ${i} 'Tab' and ${o} 'TabPanel'.`)),n}var d=r(34164);function f(e){let t=0;return u(e,e=>{s(e)&&t++}),t}const h=["children","className","disabledTabClassName","domRef","focus","forceRenderTabPanel","onSelect","selectedIndex","selectedTabClassName","selectedTabPanelClassName","environment","disableUpDownKeys","disableLeftRightKeys"];function m(e){return e&&"getAttribute"in e}function y(e){return m(e)&&e.getAttribute("data-rttab")}function g(e){return m(e)&&"true"===e.getAttribute("aria-disabled")}let b;const v={className:"react-tabs",focus:!1},x={children:p},w=e=>{(0,n.checkPropTypes)(x,e,"prop","UncontrolledTabs");let t=(0,i.useRef)([]),r=(0,i.useRef)([]);const o=(0,i.useRef)();function u(t,r){if(t<0||t>=w())return;const{onSelect:n,selectedIndex:i}=e;n(t,i,r)}function p(e){const t=w();for(let r=e+1;re;)if(!g(S(t)))return t;return e}function w(){const{children:t}=e;return f(t)}function S(e){return t.current[`tabs-${e}`]}function k(e){let t=e.target;do{if(O(t)){if(g(t))return;return void u([].slice.call(t.parentNode.children).filter(y).indexOf(t),e)}}while(null!=(t=t.parentNode))}function O(e){if(!y(e))return!1;let t=e.parentElement;do{if(t===o.current)return!0;if(t.getAttribute("data-rttabs"))break;t=t.parentElement}while(t);return!1}const _=Object.assign({},v,e),{className:E,domRef:A}=_,j=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r}(_,h);return i.createElement("div",Object.assign({},j,{className:(0,d.A)(E),onClick:k,onKeyDown:function(t){const{direction:r,disableUpDownKeys:n,disableLeftRightKeys:i}=e;if(O(t.target)){let{selectedIndex:o}=e,s=!1,a=!1;"Space"!==t.code&&32!==t.keyCode&&"Enter"!==t.code&&13!==t.keyCode||(s=!0,a=!1,k(t)),(i||37!==t.keyCode&&"ArrowLeft"!==t.code)&&(n||38!==t.keyCode&&"ArrowUp"!==t.code)?(i||39!==t.keyCode&&"ArrowRight"!==t.code)&&(n||40!==t.keyCode&&"ArrowDown"!==t.code)?35===t.keyCode||"End"===t.code?(o=function(){let e=w();for(;e--;)if(!g(S(e)))return e;return null}(),s=!0,a=!0):36!==t.keyCode&&"Home"!==t.code||(o=function(){const e=w();for(let t=0;t{o.current=e,A&&A(e)},"data-rttabs":!0}),function(){let n=0;const{children:o,disabledTabClassName:u,focus:p,forceRenderTabPanel:d,selectedIndex:f,selectedTabClassName:h,selectedTabPanelClassName:m,environment:y}=e;r.current=r.current||[];let g=r.current.length-w();const v=(0,i.useId)();for(;g++<0;)r.current.push(`${v}${r.current.length}`);return c(o,e=>{let o=e;if(a(e)){let n=0,a=!1;null==b&&function(e){const t=e||("undefined"!=typeof window?window:void 0);try{b=!(void 0===t||!t.document||!t.document.activeElement)}catch(r){b=!1}}(y);const l=y||("undefined"!=typeof window?window:void 0);b&&l&&(a=i.Children.toArray(e.props.children).filter(s).some((e,t)=>l.document.activeElement===S(t))),o=(0,i.cloneElement)(e,{children:c(e.props.children,e=>{const o=`tabs-${n}`,s=f===n,l={tabRef:e=>{t.current[o]=e},id:r.current[n],selected:s,focus:s&&(p||a)};return h&&(l.selectedClassName=h),u&&(l.disabledClassName=u),n++,(0,i.cloneElement)(e,l)})})}else if(l(e)){const t={id:r.current[n],selected:f===n};d&&(t.forceRender=d),m&&(t.selectedClassName=m),n++,o=(0,i.cloneElement)(e,t)}return o})}())},S=["children","defaultFocus","defaultIndex","focusTabOnClick","onSelect"];const k={children:p,onSelect:function(e,t,r,n,i){const o=e[t],s=i||t;let a=null;return o&&"function"!=typeof o?a=new Error(`Invalid ${n} \`${s}\` of type \`${typeof o}\` supplied to \`${r}\`, expected \`function\`.`):null!=e.selectedIndex&&null==o&&(a=new Error(`The ${n} \`${s}\` is marked as required in \`${r}\`, but its value is \`undefined\` or \`null\`.\n\`onSelect\` is required when \`selectedIndex\` is also set. Not doing so will make the tabs not do anything, as \`selectedIndex\` indicates that you want to handle the selected tab yourself.\nIf you only want to set the inital tab replace \`selectedIndex\` with \`defaultIndex\`.`)),a},selectedIndex:function(e,t,r,n,i){const o=e[t],s=i||t;let a=null;if(null!=o&&"number"!=typeof o)a=new Error(`Invalid ${n} \`${s}\` of type \`${typeof o}\` supplied to \`${r}\`, expected \`number\`.`);else if(null!=e.defaultIndex&&null!=o)return new Error(`The ${n} \`${s}\` cannot be used together with \`defaultIndex\` in \`${r}\`.\nEither remove \`${s}\` to let \`${r}\` handle the selected tab internally or remove \`defaultIndex\` to handle it yourself.`);return a}},O={defaultFocus:!1,focusTabOnClick:!0,forceRenderTabPanel:!1,selectedIndex:null,defaultIndex:null,environment:null,disableUpDownKeys:!1,disableLeftRightKeys:!1},_=e=>{(0,n.checkPropTypes)(k,e,"prop","Tabs");const t=Object.assign({},O,e),{children:r,defaultFocus:o,defaultIndex:s,focusTabOnClick:a,onSelect:l}=t,c=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r}(t,S),[u,p]=(0,i.useState)(o),[d]=(0,i.useState)((e=>null===e.selectedIndex?1:0)(c)),[h,m]=(0,i.useState)(1===d?s||0:null);if((0,i.useEffect)(()=>{p(!1)},[]),1===d){const e=f(r);(0,i.useEffect)(()=>{if(null!=h){const t=Math.max(0,e-1);m(Math.min(h,t))}},[e])}let y=Object.assign({},e,c);return y.focus=u,y.onSelect=(e,t,r)=>{"function"==typeof l&&!1===l(e,t,r)||(a&&p(!0),1===d&&m(e))},null!=h&&(y.selectedIndex=h),delete y.defaultFocus,delete y.defaultIndex,delete y.focusTabOnClick,i.createElement(w,y,r)};_.tabsRole="Tabs";const E=_,A=["children","className"];const j={className:"react-tabs__tab-list"},P=e=>{const t=Object.assign({},j,e),{children:r,className:n}=t,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r}(t,A);return i.createElement("ul",Object.assign({},o,{className:(0,d.A)(n),role:"tablist"}),r)};P.tabsRole="TabList";const $=P,C=["children","className","disabled","disabledClassName","focus","id","selected","selectedClassName","tabIndex","tabRef"];const T="react-tabs__tab",I={className:T,disabledClassName:`${T}--disabled`,focus:!1,id:null,selected:!1,selectedClassName:`${T}--selected`},N=e=>{let t=(0,i.useRef)();const r=Object.assign({},I,e),{children:n,className:o,disabled:s,disabledClassName:a,focus:l,id:c,selected:u,selectedClassName:p,tabIndex:f,tabRef:h}=r,m=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r}(r,C);return(0,i.useEffect)(()=>{u&&l&&t.current.focus()},[u,l]),i.createElement("li",Object.assign({},m,{className:(0,d.A)(o,{[p]:u,[a]:s}),ref:e=>{t.current=e,h&&h(e)},role:"tab",id:`tab${c}`,"aria-selected":u?"true":"false","aria-disabled":s?"true":"false","aria-controls":`panel${c}`,tabIndex:f||(u?"0":null),"data-rttab":!0}),n)};N.tabsRole="Tab";const R=N,L=["children","className","forceRender","id","selected","selectedClassName"];const D="react-tabs__tab-panel",M={className:D,forceRender:!1,selectedClassName:`${D}--selected`},z=e=>{const t=Object.assign({},M,e),{children:r,className:n,forceRender:o,id:s,selected:a,selectedClassName:l}=t,c=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r}(t,L);return i.createElement("div",Object.assign({},c,{className:(0,d.A)(n,{[l]:a}),role:"tabpanel",id:`panel${s}`,"aria-labelledby":`tab${s}`}),o||a?r:null)};z.tabsRole="TabPanel";const B=z},28794(e,t,r){e.exports=function(){var e={997:function(e,t,r){"use strict";var n=r(991),i=r.n(n),o=r(314),s=r.n(o)()(i());s.push([e.id,".ps{overflow:hidden!important;overflow-anchor:none;-ms-overflow-style:none;touch-action:auto;-ms-touch-action:auto}.ps__rail-x{display:none;opacity:0;transition:background-color .2s linear,opacity .2s linear;-webkit-transition:background-color .2s linear,opacity .2s linear;height:15px;bottom:0;position:absolute}.ps__rail-y{display:none;opacity:0;transition:background-color .2s linear,opacity .2s linear;-webkit-transition:background-color .2s linear,opacity .2s linear;width:15px;right:0;position:absolute}.ps--active-x>.ps__rail-x,.ps--active-y>.ps__rail-y{display:block;background-color:transparent}.ps:hover>.ps__rail-x,.ps:hover>.ps__rail-y,.ps--focus>.ps__rail-x,.ps--focus>.ps__rail-y,.ps--scrolling-x>.ps__rail-x,.ps--scrolling-y>.ps__rail-y{opacity:.6}.ps .ps__rail-x:hover,.ps .ps__rail-y:hover,.ps .ps__rail-x:focus,.ps .ps__rail-y:focus,.ps .ps__rail-x.ps--clicking,.ps .ps__rail-y.ps--clicking{background-color:#eee;opacity:.9}.ps__thumb-x{background-color:#aaa;border-radius:6px;transition:background-color .2s linear,height .2s ease-in-out;-webkit-transition:background-color .2s linear,height .2s ease-in-out;height:6px;bottom:2px;position:absolute}.ps__thumb-y{background-color:#aaa;border-radius:6px;transition:background-color .2s linear,width .2s ease-in-out;-webkit-transition:background-color .2s linear,width .2s ease-in-out;width:6px;right:2px;position:absolute}.ps__rail-x:hover>.ps__thumb-x,.ps__rail-x:focus>.ps__thumb-x,.ps__rail-x.ps--clicking .ps__thumb-x{background-color:#999;height:11px}.ps__rail-y:hover>.ps__thumb-y,.ps__rail-y:focus>.ps__thumb-y,.ps__rail-y.ps--clicking .ps__thumb-y{background-color:#999;width:11px}@supports (-ms-overflow-style: none){.ps{overflow:auto!important}}@media screen and (-ms-high-contrast: active),(-ms-high-contrast: none){.ps{overflow:auto!important}}\n","",{version:3,sources:["webpack://./node_modules/perfect-scrollbar/css/perfect-scrollbar.css"],names:[],mappings:"AAGA,IACE,yBAAA,CACA,oBAAA,CACA,uBAAA,CACA,iBAAA,CACA,qBAAA,CAMF,YACE,YAAA,CACA,SAAA,CACA,yDAAA,CACA,iEAAA,CACA,WAAA,CAEA,QAAA,CAEA,iBAAA,CAGF,YACE,YAAA,CACA,SAAA,CACA,yDAAA,CACA,iEAAA,CACA,UAAA,CAEA,OAAA,CAEA,iBAAA,CAGF,oDAEE,aAAA,CACA,4BAAA,CAGF,oJAME,UAAA,CAGF,kJAME,qBAAA,CACA,UAAA,CAMF,aACE,qBAAA,CAnEF,iBAAA,CAqEE,6DAAA,CACA,qEAAA,CACA,UAAA,CAEA,UAAA,CAEA,iBAAA,CAGF,aACE,qBAAA,CA/EF,iBAAA,CAiFE,4DAAA,CACA,oEAAA,CACA,SAAA,CAEA,SAAA,CAEA,iBAAA,CAGF,oGAGE,qBAAA,CACA,WAAA,CAGF,oGAGE,qBAAA,CACA,UAAA,CAIF,qCACE,IACE,uBAAA,CAAA,CAIJ,wEACE,IACE,uBAAA,CAAA",sourcesContent:["/*\n * Container style\n */\n.ps {\n overflow: hidden !important;\n overflow-anchor: none;\n -ms-overflow-style: none;\n touch-action: auto;\n -ms-touch-action: auto;\n}\n\n/*\n * Scrollbar rail styles\n */\n.ps__rail-x {\n display: none;\n opacity: 0;\n transition: background-color .2s linear, opacity .2s linear;\n -webkit-transition: background-color .2s linear, opacity .2s linear;\n height: 15px;\n /* there must be 'bottom' or 'top' for ps__rail-x */\n bottom: 0px;\n /* please don't change 'position' */\n position: absolute;\n}\n\n.ps__rail-y {\n display: none;\n opacity: 0;\n transition: background-color .2s linear, opacity .2s linear;\n -webkit-transition: background-color .2s linear, opacity .2s linear;\n width: 15px;\n /* there must be 'right' or 'left' for ps__rail-y */\n right: 0;\n /* please don't change 'position' */\n position: absolute;\n}\n\n.ps--active-x > .ps__rail-x,\n.ps--active-y > .ps__rail-y {\n display: block;\n background-color: transparent;\n}\n\n.ps:hover > .ps__rail-x,\n.ps:hover > .ps__rail-y,\n.ps--focus > .ps__rail-x,\n.ps--focus > .ps__rail-y,\n.ps--scrolling-x > .ps__rail-x,\n.ps--scrolling-y > .ps__rail-y {\n opacity: 0.6;\n}\n\n.ps .ps__rail-x:hover,\n.ps .ps__rail-y:hover,\n.ps .ps__rail-x:focus,\n.ps .ps__rail-y:focus,\n.ps .ps__rail-x.ps--clicking,\n.ps .ps__rail-y.ps--clicking {\n background-color: #eee;\n opacity: 0.9;\n}\n\n/*\n * Scrollbar thumb styles\n */\n.ps__thumb-x {\n background-color: #aaa;\n border-radius: 6px;\n transition: background-color .2s linear, height .2s ease-in-out;\n -webkit-transition: background-color .2s linear, height .2s ease-in-out;\n height: 6px;\n /* there must be 'bottom' for ps__thumb-x */\n bottom: 2px;\n /* please don't change 'position' */\n position: absolute;\n}\n\n.ps__thumb-y {\n background-color: #aaa;\n border-radius: 6px;\n transition: background-color .2s linear, width .2s ease-in-out;\n -webkit-transition: background-color .2s linear, width .2s ease-in-out;\n width: 6px;\n /* there must be 'right' for ps__thumb-y */\n right: 2px;\n /* please don't change 'position' */\n position: absolute;\n}\n\n.ps__rail-x:hover > .ps__thumb-x,\n.ps__rail-x:focus > .ps__thumb-x,\n.ps__rail-x.ps--clicking .ps__thumb-x {\n background-color: #999;\n height: 11px;\n}\n\n.ps__rail-y:hover > .ps__thumb-y,\n.ps__rail-y:focus > .ps__thumb-y,\n.ps__rail-y.ps--clicking .ps__thumb-y {\n background-color: #999;\n width: 11px;\n}\n\n/* MS supports */\n@supports (-ms-overflow-style: none) {\n .ps {\n overflow: auto !important;\n }\n}\n\n@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {\n .ps {\n overflow: auto !important;\n }\n}\n"],sourceRoot:""}]),t.A=s},314:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r=e(t);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r}).join("")},t.i=function(e,r,n){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(n)for(var o=0;oe.length)&&(t=e.length);for(var r=0,n=new Array(t);rnew Promise((n,i)=>{var o=e=>{try{a(r.next(e))}catch(e){i(e)}},s=e=>{try{a(r.throw(e))}catch(e){i(e)}},a=e=>e.done?n(e.value):Promise.resolve(e.value).then(o,s);a((r=r.apply(e,t)).next())});class s{constructor(){this.add=f,this.done=h,this.search=v,this.toJS=m,this.load=g,this.dispose=b,this.fromExternalJS=y}}let a,l,c,u=[];function p(){a=new i.Builder,a.field("title"),a.field("description"),a.ref("ref"),a.pipeline.add(i.trimmer,i.stopWordFilter,i.stemmer),c=new Promise(e=>{l=e})}i.tokenizer.separator=/\s+/,p();const d=e=>{const t=i.trimmer(new i.Token(e,{}));return"*"+i.stemmer(t)+"*"};function f(e,t,r){const n=u.push(r)-1,i={title:e.toLowerCase(),description:t.toLowerCase(),ref:n};a.add(i)}function h(){return o(this,null,function*(){l(a.build())})}function m(){return o(this,null,function*(){return{store:u,index:(yield c).toJSON()}})}function y(e,t){return o(this,null,function*(){try{if(importScripts(e),!self[t])throw new Error("Broken index file format");g(self[t])}catch(e){console.error("Failed to load search index: "+e.message)}})}function g(e){return o(this,null,function*(){u=e.store,l(i.Index.load(e.index))})}function b(){return o(this,null,function*(){u=[],p()})}function v(e,t=0){return o(this,null,function*(){if(0===e.trim().length)return[];let r=(yield c).query(t=>{e.trim().toLowerCase().split(/\s+/).forEach(e=>{if(1===e.length)return;const r=d(e);t.term(r,{})})});return t>0&&(r=r.slice(0,t)),r.map(e=>({meta:u[e.ref],score:e.score}))})}},435:function(e,t,r){"use strict";const n=r(648),i={}.NODE_DISABLE_COLORS?{red:"",yellow:"",green:"",normal:""}:{red:"\x1b[31m",yellow:"\x1b[33;1m",green:"\x1b[32m",normal:"\x1b[0m"};function o(e,t){function r(e,t){return n.stringify(e)===n.stringify(Object.assign({},e,t))}return r(e,t)&&r(t,e)}function s(e){let t=(e=e.replace("[]","Array")).split("/");return t[0]=t[0].replace(/[^A-Za-z0-9_\-\.]+|\s+/gm,"_"),t.join("/")}String.prototype.toCamelCase=function(){return this.toLowerCase().replace(/[-_ \/\.](.)/g,function(e,t){return t.toUpperCase()})},e.exports={colour:i,uniqueOnly:function(e,t,r){return r.indexOf(e)===t},hasDuplicates:function(e){return new Set(e).size!==e.length},allSame:function(e){return new Set(e).size<=1},distinctArray:function(e){return e.length===function(e){let t=[];for(let r of e)t.find(function(e,t,n){return o(e,r)})||t.push(r);return t}(e).length},firstDupe:function(e){return e.find(function(t,r,n){return e.indexOf(t)1&&console.warn("Replacing with",t),m++}}else{let i=u(l(t,e[r]));if(s.verbose>1&&console.warn((!1===i?f.colour.red:f.colour.green)+"Fragment resolution",e[r],f.colour.normal),!1===i){if(n.parent[n.pkey]={},s.fatal){let t=new Error("Fragment $ref resolution failed "+e[r]);if(!s.promise)throw t;s.promise.reject(t)}}else m++,n.parent[n.pkey]=i,h[e[r]]=n.path.replace("/%24ref","")}else if(p.protocol){let t=o.resolve(i,e[r]).toString();s.verbose>1&&console.warn(f.colour.yellow+"Rewriting external url ref",e[r],"as",t,f.colour.normal),e["x-miro"]=e[r],s.externalRefs[e[r]]&&(s.externalRefs[t]||(s.externalRefs[t]=s.externalRefs[e[r]]),s.externalRefs[t].failed=s.externalRefs[e[r]].failed),e[r]=t}else if(!e["x-miro"]){let t=o.resolve(i,e[r]).toString(),n=!1;s.externalRefs[e[r]]&&(n=s.externalRefs[e[r]].failed),n||(s.verbose>1&&console.warn(f.colour.yellow+"Rewriting external ref",e[r],"as",t,f.colour.normal),e["x-miro"]=e[r],e[r]=t)}});return c(e,{},function(e,t,r){d(e,t)&&void 0!==e.$fixed&&delete e.$fixed}),s.verbose>1&&console.warn("Finished fragment resolution"),e}function m(e,t){if(!t.filters||!t.filters.length)return e;for(let r of t.filters)e=r(e,t);return e}function y(e,t,r,s){var c=o.parse(r.source),p=r.source.split("\\").join("/").split("/");p.pop()||p.pop();let d="",f=t.split("#");f.length>1&&(d="#"+f[1],t=f[0]),p=p.join("/");let y=(g=o.parse(t).protocol,b=c.protocol,g&&g.length>2?g:b&&b.length>2?b:"file:");var g,b;let v;if(v="file:"===y?i.resolve(p?p+"/":"",t):o.resolve(p?p+"/":"",t),r.cache[v]){r.verbose&&console.warn("CACHED",v,d);let e=u(r.cache[v]),n=r.externalRef=e;if(d&&(n=l(n,d),!1===n&&(n={},r.fatal))){let e=new Error("Cached $ref resolution failed "+v+d);if(!r.promise)throw e;r.promise.reject(e)}return n=h(n,e,t,d,v,r),n=m(n,r),s(u(n),v,r),Promise.resolve(n)}if(r.verbose&&console.warn("GET",v,d),r.handlers&&r.handlers[y])return r.handlers[y](p,t,d,r).then(function(e){return r.externalRef=e,e=m(e,r),r.cache[v]=e,s(e,v,r),e}).catch(function(e){throw r.verbose&&console.warn(e),e});if(y&&y.startsWith("http")){const e=Object.assign({},r.fetchOptions,{agent:r.agent});return r.fetch(v,e).then(function(e){if(200!==e.status){if(r.ignoreIOErrors)return r.verbose&&console.warn("FAILED",t),r.externalRefs[t].failed=!0,'{"$ref":"'+t+'"}';throw new Error(`Received status code ${e.status}: ${v}`)}return e.text()}).then(function(e){try{let n=a.parse(e,{schema:"core",prettyErrors:!0});if(e=r.externalRef=n,r.cache[v]=u(e),d&&!1===(e=l(e,d))&&(e={},r.fatal)){let e=new Error("Remote $ref resolution failed "+v+d);if(!r.promise)throw e;r.promise.reject(e)}e=m(e=h(e,n,t,d,v,r),r)}catch(e){if(r.verbose&&console.warn(e),!r.promise||!r.fatal)throw e;r.promise.reject(e)}return s(e,v,r),e}).catch(function(e){if(r.verbose&&console.warn(e),r.cache[v]={},!r.promise||!r.fatal)throw e;r.promise.reject(e)})}{const e='{"$ref":"'+t+'"}';return function(e,t,r,i,o){return new Promise(function(s,a){n.readFile(e,t,function(e,t){e?r.ignoreIOErrors&&o?(r.verbose&&console.warn("FAILED",i),r.externalRefs[i].failed=!0,s(o)):a(e):s(t)})})}(v,r.encoding||"utf8",r,t,e).then(function(e){try{let n=a.parse(e,{schema:"core",prettyErrors:!0});if(e=r.externalRef=n,r.cache[v]=u(e),d&&!1===(e=l(e,d))&&(e={},r.fatal)){let e=new Error("File $ref resolution failed "+v+d);if(!r.promise)throw e;r.promise.reject(e)}e=m(e=h(e,n,t,d,v,r),r)}catch(e){if(r.verbose&&console.warn(e),!r.promise||!r.fatal)throw e;r.promise.reject(e)}return s(e,v,r),e}).catch(function(e){if(r.verbose&&console.warn(e),!r.promise||!r.fatal)throw e;r.promise.reject(e)})}}function g(e){return new Promise(function(t,r){(function(e){return new Promise(function(t,r){function n(t,r,n){if(t[r]&&d(t[r],"$ref")){let o=t[r].$ref;if(!o.startsWith("#")){let s="";if(!i[o]){let t=Object.keys(i).find(function(e,t,r){return o.startsWith(e+"/")});t&&(e.verbose&&console.warn("Found potential subschema at",t),s="/"+(o.split("#")[1]||"").replace(t.split("#")[1]||""),s=s.split("/undefined").join(""),o=t)}if(i[o]||(i[o]={resolved:!1,paths:[],extras:{},description:t[r].description}),i[o].resolved)if(i[o].failed);else if(e.rewriteRefs){let n=i[o].resolvedAt;e.verbose>1&&console.warn("Rewriting ref",o,n),t[r]["x-miro"]=o,t[r].$ref=n+s}else t[r]=u(i[o].data);else i[o].paths.push(n.path),i[o].extras[n.path]=s}}}let i=e.externalRefs;if(e.resolver.depth>0&&e.source===e.resolver.base)return t(i);c(e.openapi.definitions,{identityDetection:!0,path:"#/definitions"},n),c(e.openapi.components,{identityDetection:!0,path:"#/components"},n),c(e.openapi,{identityDetection:!0},n),t(i)})})(e).then(function(t){for(let r in t)if(!t[r].resolved){let n=e.resolver.depth;n>0&&n++,e.resolver.actions[n].push(function(){return y(e.openapi,r,e,function(e,n,i){if(!t[r].resolved){let o={};o.context=t[r],o.$ref=r,o.original=u(e),o.updated=e,o.source=n,i.externals.push(o),t[r].resolved=!0}let o=Object.assign({},i,{source:"",resolver:{actions:i.resolver.actions,depth:i.resolver.actions.length-1,base:i.resolver.base}});i.patch&&t[r].description&&!e.description&&"object"==typeof e&&(e.description=t[r].description),t[r].data=e;let s=(a=t[r].paths,[...new Set(a)]);var a;s=s.sort(function(e,t){const r=e.startsWith("#/components/")||e.startsWith("#/definitions/"),n=t.startsWith("#/components/")||t.startsWith("#/definitions/");return r&&!n?-1:n&&!r?1:0});for(let c of s)if(t[r].resolvedAt&&c!==t[r].resolvedAt&&c.indexOf("x-ms-examples/")<0)i.verbose>1&&console.warn("Creating pointer to data at",c),l(i.openapi,c,{$ref:t[r].resolvedAt+t[r].extras[c],"x-miro":r+t[r].extras[c]});else{t[r].resolvedAt?i.verbose>1&&console.warn("Avoiding circular reference"):(t[r].resolvedAt=c,i.verbose>1&&console.warn("Creating initial clone of data at",c));let n=u(e);l(i.openapi,c,n)}0===i.resolver.actions[o.resolver.depth].length&&i.resolver.actions[o.resolver.depth].push(function(){return g(o)})})})}}).catch(function(t){e.verbose&&console.warn(t),r(t)});let n={options:e};n.actions=e.resolver.actions[e.resolver.depth],t(n)})}function b(e,t,r){e.resolver.actions.push([]),g(e).then(function(n){var i;(i=n.actions,i.reduce((e,t)=>e.then(e=>t().then(Array.prototype.concat.bind(e))),Promise.resolve([]))).then(function(){if(e.resolver.depth>=e.resolver.actions.length)return console.warn("Ran off the end of resolver actions"),t(!0);e.resolver.depth++,e.resolver.actions[e.resolver.depth].length?setTimeout(function(){b(n.options,t,r)},0):(e.verbose>1&&console.warn(f.colour.yellow+"Finished external resolution!",f.colour.normal),e.resolveInternal&&(e.verbose>1&&console.warn(f.colour.yellow+"Starting internal resolution!",f.colour.normal),e.openapi=p(e.openapi,e.original,{verbose:e.verbose-1}),e.verbose>1&&console.warn(f.colour.yellow+"Finished internal resolution!",f.colour.normal)),c(e.openapi,{},function(t,r,n){d(t,r)&&(e.preserveMiro||delete t["x-miro"])}),t(e))}).catch(function(t){e.verbose&&console.warn(t),r(t)})}).catch(function(t){e.verbose&&console.warn(t),r(t)})}function v(e){if(e.cache||(e.cache={}),e.fetch||(e.fetch=s),e.source){let t=o.parse(e.source);(!t.protocol||t.protocol.length<=2)&&(e.source=i.resolve(e.source))}e.externals=[],e.externalRefs={},e.rewriteRefs=!0,e.resolver={},e.resolver.depth=0,e.resolver.base=e.source,e.resolver.actions=[[]]}e.exports={optionalResolve:function(e){return v(e),new Promise(function(t,r){e.resolve?b(e,t,r):t(e)})},resolve:function(e,t,r){return r||(r={}),r.openapi=e,r.source=t,r.resolve=!0,v(r),new Promise(function(e,t){b(r,e,t)})}}},319:function(e){"use strict";function t(){return{depth:0,seen:new WeakMap,top:!0,combine:!1,allowRefSiblings:!1}}e.exports={getDefaultState:t,walkSchema:function e(r,n,i,o){if(void 0===i.depth&&(i=t()),null==r)return r;if(void 0!==r.$ref){let e={$ref:r.$ref};return i.allowRefSiblings&&r.description&&(e.description=r.description),o(e,n,i),e}if(i.combine&&(r.allOf&&Array.isArray(r.allOf)&&1===r.allOf.length&&delete(r=Object.assign({},r.allOf[0],r)).allOf,r.anyOf&&Array.isArray(r.anyOf)&&1===r.anyOf.length&&delete(r=Object.assign({},r.anyOf[0],r)).anyOf,r.oneOf&&Array.isArray(r.oneOf)&&1===r.oneOf.length&&delete(r=Object.assign({},r.oneOf[0],r)).oneOf),o(r,n,i),i.seen.has(r))return r;if("object"==typeof r&&null!==r&&i.seen.set(r,!0),i.top=!1,i.depth++,void 0!==r.items&&(i.property="items",e(r.items,r,i,o)),r.additionalItems&&"object"==typeof r.additionalItems&&(i.property="additionalItems",e(r.additionalItems,r,i,o)),r.additionalProperties&&"object"==typeof r.additionalProperties&&(i.property="additionalProperties",e(r.additionalProperties,r,i,o)),r.properties)for(let t in r.properties){let n=r.properties[t];i.property="properties/"+t,e(n,r,i,o)}if(r.patternProperties)for(let t in r.patternProperties){let n=r.patternProperties[t];i.property="patternProperties/"+t,e(n,r,i,o)}if(r.allOf)for(let t in r.allOf){let n=r.allOf[t];i.property="allOf/"+t,e(n,r,i,o)}if(r.anyOf)for(let t in r.anyOf){let n=r.anyOf[t];i.property="anyOf/"+t,e(n,r,i,o)}if(r.oneOf)for(let t in r.oneOf){let n=r.oneOf[t];i.property="oneOf/"+t,e(n,r,i,o)}return r.not&&(i.property="not",e(r.not,r,i,o)),i.depth--,r}}},975:function(e){"use strict";function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,t){for(var r,n="",i=0,o=-1,s=0,a=0;a<=e.length;++a){if(a2){var l=n.lastIndexOf("/");if(l!==n.length-1){-1===l?(n="",i=0):i=(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),o=a,s=0;continue}}else if(2===n.length||1===n.length){n="",i=0,o=a,s=0;continue}t&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),i=a-o-1;o=a,s=0}else 46===r&&-1!==s?++s:s=-1}return n}var n={resolve:function(){for(var e,n="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var s;o>=0?s=arguments[o]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(n=s+"/"+n,i=47===s.charCodeAt(0))}return n=r(n,!i),i?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(e){if(t(e),0===e.length)return".";var n=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!n)).length||n||(e="."),e.length>0&&i&&(e+="/"),n?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,r=0;r0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":n.normalize(e)},relative:function(e,r){if(t(e),t(r),e===r)return"";if((e=n.resolve(e))===(r=n.resolve(r)))return"";for(var i=1;ic){if(47===r.charCodeAt(a+p))return r.slice(a+p+1);if(0===p)return r.slice(a+p)}else s>c&&(47===e.charCodeAt(i+p)?u=p:0===p&&(u=0));break}var d=e.charCodeAt(i+p);if(d!==r.charCodeAt(a+p))break;47===d&&(u=p)}var f="";for(p=i+u+1;p<=o;++p)p!==o&&47!==e.charCodeAt(p)||(0===f.length?f+="..":f+="/..");return f.length>0?f+r.slice(a+u):(a+=u,47===r.charCodeAt(a)&&++a,r.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var r=e.charCodeAt(0),n=47===r,i=-1,o=!0,s=e.length-1;s>=1;--s)if(47===(r=e.charCodeAt(s))){if(!o){i=s;break}}else o=!1;return-1===i?n?"/":".":n&&1===i?"//":e.slice(0,i)},basename:function(e,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');t(e);var n,i=0,o=-1,s=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var a=r.length-1,l=-1;for(n=e.length-1;n>=0;--n){var c=e.charCodeAt(n);if(47===c){if(!s){i=n+1;break}}else-1===l&&(s=!1,l=n+1),a>=0&&(c===r.charCodeAt(a)?-1==--a&&(o=n):(a=-1,o=l))}return i===o?o=l:-1===o&&(o=e.length),e.slice(i,o)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!s){i=n+1;break}}else-1===o&&(s=!1,o=n+1);return-1===o?"":e.slice(i,o)},extname:function(e){t(e);for(var r=-1,n=0,i=-1,o=!0,s=0,a=e.length-1;a>=0;--a){var l=e.charCodeAt(a);if(47!==l)-1===i&&(o=!1,i=a+1),46===l?-1===r?r=a:1!==s&&(s=1):-1!==r&&(s=-1);else if(!o){n=a+1;break}}return-1===r||-1===i||0===s||1===s&&r===i-1&&r===n+1?"":e.slice(r,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+"/"+n:n}(0,e)},parse:function(e){t(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return r;var n,i=e.charCodeAt(0),o=47===i;o?(r.root="/",n=1):n=0;for(var s=-1,a=0,l=-1,c=!0,u=e.length-1,p=0;u>=n;--u)if(47!==(i=e.charCodeAt(u)))-1===l&&(c=!1,l=u+1),46===i?-1===s?s=u:1!==p&&(p=1):-1!==s&&(p=-1);else if(!c){a=u+1;break}return-1===s||-1===l||0===p||1===p&&s===l-1&&s===a+1?-1!==l&&(r.base=r.name=0===a&&o?e.slice(1,l):e.slice(a,l)):(0===a&&o?(r.name=e.slice(1,s),r.base=e.slice(1,l)):(r.name=e.slice(a,s),r.base=e.slice(a,l)),r.ext=e.slice(s,l)),a>0?r.dir=e.slice(0,a-1):o&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,e.exports=n},920:function(e){"use strict";e.exports={nop:function(e){return e},clone:function(e){return JSON.parse(JSON.stringify(e))},shallowClone:function(e){let t={};for(let r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t},deepClone:function e(t){let r=Array.isArray(t)?[]:{};for(let n in t)(t.hasOwnProperty(n)||Array.isArray(t))&&(r[n]="object"==typeof t[n]?e(t[n]):t[n]);return r},fastClone:function(e){return Object.assign({},e)},circularClone:function e(t,r){if(r||(r=new WeakMap),Object(t)!==t||t instanceof Function)return t;if(r.has(t))return r.get(t);try{var n=new t.constructor}catch(e){n=Object.create(Object.getPrototypeOf(t))}return r.set(t,n),Object.assign(n,...Object.keys(t).map(n=>({[n]:e(t[n],r)})))}}},737:function(e,t,r){"use strict";const n=r(880).recurse,i=r(920).shallowClone,o=r(33).jptr,s=r(264).isRef;e.exports={dereference:function e(t,r,a){a||(a={}),a.cache||(a.cache={}),a.state||(a.state={}),a.state.identityDetection=!0,a.depth=a.depth?a.depth+1:1;let l=a.depth>1?t:i(t),c={data:l},u=a.depth>1?r:i(r);a.master||(a.master=l);let p=function(e){return e&&e.verbose?{warn:function(){var e=Array.prototype.slice.call(arguments);console.warn.apply(console,e)}}:{warn:function(){}}}(a),d=1;for(;d>0;)d=0,n(c,a.state,function(t,r,n){if(s(t,r)){let i=t[r];if(d++,a.cache[i]){let e=a.cache[i];if(e.resolved)p.warn("Patching %s for %s",i,e.path),n.parent[n.pkey]=e.data,a.$ref&&"object"==typeof n.parent[n.pkey]&&null!==n.parent[n.pkey]&&(n.parent[n.pkey][a.$ref]=i);else{if(i===e.path)throw new Error(`Tight circle at ${e.path}`);p.warn("Unresolved ref"),n.parent[n.pkey]=o(e.source,e.path),!1===n.parent[n.pkey]&&(n.parent[n.pkey]=o(e.source,e.key)),a.$ref&&"object"==typeof n.parent[n.pkey]&&null!==n.parent[n.pkey]&&(n.parent[a.$ref]=i)}}else{let t={};t.path=n.path.split("/$ref")[0],t.key=i,p.warn("Dereffing %s at %s",i,t.path),t.source=u,t.data=o(t.source,t.key),!1===t.data&&(t.data=o(a.master,t.key),t.source=a.master),!1===t.data&&p.warn("Missing $ref target",t.key),a.cache[i]=t,t.data=n.parent[n.pkey]=e(o(t.source,t.key),t.source,a),a.$ref&&"object"==typeof n.parent[n.pkey]&&null!==n.parent[n.pkey]&&(n.parent[n.pkey][a.$ref]=i),t.resolved=!0}}});return c.data}}},264:function(e){"use strict";e.exports={isRef:function(e,t){return"$ref"===t&&!!e&&"string"==typeof e[t]}}},33:function(e){"use strict";function t(e){return e.replace(/\~1/g,"/").replace(/~0/g,"~")}e.exports={jptr:function(e,r,n){if(void 0===e)return!1;if(!r||"string"!=typeof r||"#"===r)return void 0!==n?n:e;if(r.indexOf("#")>=0){let e=r.split("#");if(e[0])return!1;r=e[1],r=decodeURIComponent(r.slice(1).split("+").join(" "))}r.startsWith("/")&&(r=r.slice(1));let i=r.split("/");for(let o=0;o0?i[o-1]:"",-1!=s||e&&e.hasOwnProperty(i[o]))if(s>=0)r&&(e[s]=n),e=e[s];else{if(-2===s)return r?(Array.isArray(e)&&e.push(n),n):void 0;r&&(e[i[o]]=n),e=e[i[o]]}else{if(void 0===n||"object"!=typeof e||Array.isArray(e))return!1;e[i[o]]=r?n:"0"===i[o+1]||"-"===i[o+1]?[]:{},e=e[i[o]]}}return e},jpescape:function(e){return e.replace(/\~/g,"~0").replace(/\//g,"~1")},jpunescape:t}},880:function(e,t,r){"use strict";const n=r(33).jpescape;e.exports={recurse:function e(t,r,i){if(r||(r={depth:0}),r.depth||(r=Object.assign({},{path:"#",depth:0,pkey:"",parent:{},payload:{},seen:new WeakMap,identity:!1,identityDetection:!1},r)),"object"!=typeof t)return;let o=r.path;for(let s in t){if(r.key=s,r.path=r.path+"/"+encodeURIComponent(n(s)),r.identityPath=r.seen.get(t[s]),r.identity=void 0!==r.identityPath,t.hasOwnProperty(s)&&i(t,s,r),"object"==typeof t[s]&&!r.identity){r.identityDetection&&!Array.isArray(t[s])&&null!==t[s]&&r.seen.set(t[s],r.path);let n={};n.parent=t,n.path=r.path,n.depth=r.depth?r.depth+1:1,n.pkey=s,n.payload=r.payload,n.seen=r.seen,n.identity=!1,n.identityDetection=r.identityDetection,e(t[s],n,i)}r.path=o}}}},494:function(e,t,r){"use strict";r.r(t);var n=r(72),i=r.n(n),o=r(825),s=r.n(o),a=r(659),l=r.n(a),c=r(56),u=r.n(c),p=r(540),d=r.n(p),f=r(113),h=r.n(f),m=r(997),y={};y.styleTagTransform=h(),y.setAttributes=u(),y.insert=l().bind(null,"head"),y.domAPI=s(),y.insertStyleElement=d(),i()(m.A,y),t.default=m.A&&m.A.locals?m.A.locals:void 0},72:function(e){"use strict";var t=[];function r(e){for(var r=-1,n=0;n0?" ".concat(r.layer):""," {")),n+=r.css,i&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var o=r.sourceMap;o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},113:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},65:function(e,t,r){"use strict";const n=r(364),i=r(725),o=(r(975),r(884)),s=r(725),a=r(115),l=r(33),c=l.jptr,u=r(264).isRef,p=r(920).clone,d=r(920).circularClone,f=r(880).recurse,h=r(751),m=r(319),y=r(435),g=r(665).statusCodes,b=r(430).rE,v="3.0.0";let x;class w extends Error{constructor(e){super(e),this.name="S2OError"}}function S(e,t){let r=new w(e);if(r.options=t,!t.promise)throw r;t.promise.reject(r)}function k(e,t,r){r.warnOnly?t[r.warnProperty||"x-s2o-warning"]=e:S(e,r)}function O(e,t){m.walkSchema(e,{},{},function(e,r,n){!function(e){if(e["x-required"]&&Array.isArray(e["x-required"])&&(e.required||(e.required=[]),e.required=e.required.concat(e["x-required"]),delete e["x-required"]),e["x-anyOf"]&&(e.anyOf=e["x-anyOf"],delete e["x-anyOf"]),e["x-oneOf"]&&(e.oneOf=e["x-oneOf"],delete e["x-oneOf"]),e["x-not"]&&(e.not=e["x-not"],delete e["x-not"]),"boolean"==typeof e["x-nullable"]&&(e.nullable=e["x-nullable"],delete e["x-nullable"]),"object"==typeof e["x-discriminator"]&&"string"==typeof e["x-discriminator"].propertyName){e.discriminator=e["x-discriminator"],delete e["x-discriminator"];for(let t in e.discriminator.mapping){let r=e.discriminator.mapping[t];r.startsWith("#/definitions/")&&(e.discriminator.mapping[t]=r.replace("#/definitions/","#/components/schemas/"))}}}(e),function(e,t,r){if(e.nullable&&r.patches++,e.discriminator&&"string"==typeof e.discriminator&&(e.discriminator={propertyName:e.discriminator}),e.items&&Array.isArray(e.items)&&(0===e.items.length?e.items={}:1===e.items.length?e.items=e.items[0]:e.items={anyOf:e.items}),e.type&&Array.isArray(e.type))if(r.patch){if(r.patches++,0===e.type.length)delete e.type;else{e.oneOf||(e.oneOf=[]);for(let t of e.type){let r={};if("null"===t)e.nullable=!0;else{r.type=t;for(let t of y.arrayProperties)void 0!==e.prop&&(r[t]=e[t],delete e[t])}r.type&&e.oneOf.push(r)}delete e.type,0===e.oneOf.length?delete e.oneOf:e.oneOf.length<2&&(e.type=e.oneOf[0].type,Object.keys(e.oneOf[0]).length>1&&k("Lost properties from oneOf",e,r),delete e.oneOf)}e.type&&Array.isArray(e.type)&&1===e.type.length&&(e.type=e.type[0])}else S("(Patchable) schema type must not be an array",r);e.type&&"null"===e.type&&(delete e.type,e.nullable=!0),"array"!==e.type||e.items||(e.items={}),"file"===e.type&&(e.type="string",e.format="binary"),"boolean"==typeof e.required&&(e.required&&e.name&&(void 0===t.required&&(t.required=[]),Array.isArray(t.required)&&t.required.push(e.name)),delete e.required),e.xml&&"string"==typeof e.xml.namespace&&(e.xml.namespace||delete e.xml.namespace),void 0!==e.allowEmptyValue&&(r.patches++,delete e.allowEmptyValue)}(e,r,t)})}function _(e,t,r){let n=r.payload.options;if(u(e,t)){if(e[t].startsWith("#/components/"));else if("#/consumes"===e[t])delete e[t],r.parent[r.pkey]=p(n.openapi.consumes);else if("#/produces"===e[t])delete e[t],r.parent[r.pkey]=p(n.openapi.produces);else if(e[t].startsWith("#/definitions/")){let r=e[t].replace("#/definitions/","").split("/");const i=l.jpunescape(r[0]);let o=x.schemas[decodeURIComponent(i)];o?r[0]=o:k("Could not resolve reference "+e[t],e,n),e[t]="#/components/schemas/"+r.join("/")}else if(e[t].startsWith("#/parameters/"))e[t]="#/components/parameters/"+y.sanitise(e[t].replace("#/parameters/",""));else if(e[t].startsWith("#/responses/"))e[t]="#/components/responses/"+y.sanitise(e[t].replace("#/responses/",""));else if(e[t].startsWith("#")){let r=p(l.jptr(n.openapi,e[t]));if(!1===r)k("direct $ref not found "+e[t],e,n);else if(n.refmap[e[t]])e[t]=n.refmap[e[t]];else{let o=e[t];o=o.replace("/properties/headers/",""),o=o.replace("/properties/responses/",""),o=o.replace("/properties/parameters/",""),o=o.replace("/properties/schemas/","");let s="schemas",a=o.lastIndexOf("/schema");if(s=o.indexOf("/headers/")>a?"headers":o.indexOf("/responses/")>a?"responses":o.indexOf("/example")>a?"examples":o.indexOf("/x-")>a?"extensions":o.indexOf("/parameters/")>a?"parameters":"schemas","schemas"===s&&O(r,n),"responses"!==s&&"extensions"!==s){let o=s.substr(0,s.length-1);"parameter"===o&&r.name&&r.name===y.sanitise(r.name)&&(o=encodeURIComponent(r.name));let a=1;for(e["x-miro"]&&(i=(i=e["x-miro"]).indexOf("#")>=0?i.split("#")[1].split("/").pop():i.split("/").pop().split(".")[0],o=encodeURIComponent(y.sanitise(i)),a="");l.jptr(n.openapi,"#/components/"+s+"/"+o+a);)a=""===a?2:++a;let c="#/components/"+s+"/"+o+a,u="";"examples"===s&&(r={value:r},u="/value"),l.jptr(n.openapi,c,r),n.refmap[e[t]]=c+u,e[t]=c+u}}}if(delete e["x-miro"],Object.keys(e).length>1){const i=e[t],o=r.path.indexOf("/schema")>=0;"preserve"===n.refSiblings||(o&&"allOf"===n.refSiblings?(delete e.$ref,r.parent[r.pkey]={allOf:[{$ref:i},e]}):r.parent[r.pkey]={$ref:i})}}var i;if("x-ms-odata"===t&&"string"==typeof e[t]&&e[t].startsWith("#/")){let r=e[t].replace("#/definitions/","").replace("#/components/schemas/","").split("/"),i=x.schemas[decodeURIComponent(r[0])];i?r[0]=i:k("Could not resolve reference "+e[t],e,n),e[t]="#/components/schemas/"+r.join("/")}}function E(e){for(let t in e)for(let r in e[t]){let n=y.sanitise(r);r!==n&&(e[t][n]=e[t][r],delete e[t][r])}}function A(e,t){if("basic"===e.type&&(e.type="http",e.scheme="basic"),"oauth2"===e.type){let r={},n=e.flow;"application"===e.flow&&(n="clientCredentials"),"accessCode"===e.flow&&(n="authorizationCode"),void 0!==e.authorizationUrl&&(r.authorizationUrl=e.authorizationUrl.split("?")[0].trim()||"/"),"string"==typeof e.tokenUrl&&(r.tokenUrl=e.tokenUrl.split("?")[0].trim()||"/"),r.scopes=e.scopes||{},e.flows={},e.flows[n]=r,delete e.flow,delete e.authorizationUrl,delete e.tokenUrl,delete e.scopes,void 0!==e.name&&(t.patch?(t.patches++,delete e.name):S("(Patchable) oauth2 securitySchemes should not have name property",t))}}function j(e){return e&&!e["x-s2o-delete"]}function P(e,t){if(e.$ref)e.$ref=e.$ref.replace("#/responses/","#/components/responses/");else{e.type&&!e.schema&&(e.schema={}),e.type&&(e.schema.type=e.type),e.items&&"array"!==e.items.type&&(e.items.collectionFormat!==e.collectionFormat&&k("Nested collectionFormats are not supported",e,t),delete e.items.collectionFormat),"array"===e.type?("ssv"===e.collectionFormat?k("collectionFormat:ssv is no longer supported for headers",e,t):"pipes"===e.collectionFormat?k("collectionFormat:pipes is no longer supported for headers",e,t):"multi"===e.collectionFormat?e.explode=!0:"tsv"===e.collectionFormat?(k("collectionFormat:tsv is no longer supported",e,t),e["x-collectionFormat"]="tsv"):e.style="simple",delete e.collectionFormat):e.collectionFormat&&(t.patch?(t.patches++,delete e.collectionFormat):S("(Patchable) collectionFormat is only applicable to header.type array",t)),delete e.type;for(let t of y.parameterTypeProperties)void 0!==e[t]&&(e.schema[t]=e[t],delete e[t]);for(let t of y.arrayProperties)void 0!==e[t]&&(e.schema[t]=e[t],delete e[t])}}function $(e,t){if(e.$ref.indexOf("#/parameters/")>=0){let t=e.$ref.split("#/parameters/");e.$ref=t[0]+"#/components/parameters/"+y.sanitise(t[1])}e.$ref.indexOf("#/definitions/")>=0&&k("Definition used as parameter",e,t)}function C(e,t,r,n,i,o,s){let a,l={},u=!0;if(t&&t.consumes&&"string"==typeof t.consumes){if(!s.patch)return S("(Patchable) operation.consumes must be an array",s);s.patches++,t.consumes=[t.consumes]}Array.isArray(o.consumes)||delete o.consumes;let d=((t?t.consumes:null)||o.consumes||[]).filter(y.uniqueOnly);if(e&&e.$ref&&"string"==typeof e.$ref){$(e,s);let t=decodeURIComponent(e.$ref.replace("#/components/parameters/","")),r=!1,n=o.components.parameters[t];if(n&&!n["x-s2o-delete"]||!e.$ref.startsWith("#/")||(e["x-s2o-delete"]=!0,r=!0),r){let t=e.$ref,r=c(o,e.$ref);!r&&t.startsWith("#/")?k("Could not resolve reference "+t,e,s):r&&(e=r)}}if(e&&(e.name||e.in)){"boolean"==typeof e["x-deprecated"]&&(e.deprecated=e["x-deprecated"],delete e["x-deprecated"]),void 0!==e["x-example"]&&(e.example=e["x-example"],delete e["x-example"]),"body"===e.in||e.type||(s.patch?(s.patches++,e.type="string"):S("(Patchable) parameter.type is mandatory for non-body parameters",s)),e.type&&"object"==typeof e.type&&e.type.$ref&&(e.type=c(o,e.type.$ref)),"file"===e.type&&(e["x-s2o-originalType"]=e.type,a=e.type),e.description&&"object"==typeof e.description&&e.description.$ref&&(e.description=c(o,e.description.$ref)),null===e.description&&delete e.description;let t=e.collectionFormat;if("array"!==e.type||t||(t="csv"),t&&("array"!==e.type&&(s.patch?(s.patches++,delete e.collectionFormat):S("(Patchable) collectionFormat is only applicable to param.type array",s)),"csv"!==t||"query"!==e.in&&"cookie"!==e.in||(e.style="form",e.explode=!1),"csv"!==t||"path"!==e.in&&"header"!==e.in||(e.style="simple"),"ssv"===t&&("query"===e.in?e.style="spaceDelimited":k("collectionFormat:ssv is no longer supported except for in:query parameters",e,s)),"pipes"===t&&("query"===e.in?e.style="pipeDelimited":k("collectionFormat:pipes is no longer supported except for in:query parameters",e,s)),"multi"===t&&(e.explode=!0),"tsv"===t&&(k("collectionFormat:tsv is no longer supported",e,s),e["x-collectionFormat"]="tsv"),delete e.collectionFormat),e.type&&"body"!==e.type&&"formData"!==e.in)if(e.items&&e.schema)k("parameter has array,items and schema",e,s);else{e.schema&&s.patches++,e.schema&&"object"==typeof e.schema||(e.schema={}),e.schema.type=e.type,e.items&&(e.schema.items=e.items,delete e.items,f(e.schema.items,null,function(r,n,i){"collectionFormat"===n&&"string"==typeof r[n]&&(t&&r[n]!==t&&k("Nested collectionFormats are not supported",e,s),delete r[n])}));for(let t of y.parameterTypeProperties)void 0!==e[t]&&(e.schema[t]=e[t]),delete e[t]}e.schema&&O(e.schema,s),e["x-ms-skip-url-encoding"]&&"query"===e.in&&(e.allowReserved=!0,delete e["x-ms-skip-url-encoding"])}if(e&&"formData"===e.in){u=!1,l.content={};let t="application/x-www-form-urlencoded";if(d.length&&d.indexOf("multipart/form-data")>=0&&(t="multipart/form-data"),l.content[t]={},e.schema)l.content[t].schema=e.schema,e.schema.$ref&&(l["x-s2o-name"]=decodeURIComponent(e.schema.$ref.replace("#/components/schemas/","")));else{l.content[t].schema={},l.content[t].schema.type="object",l.content[t].schema.properties={},l.content[t].schema.properties[e.name]={};let r=l.content[t].schema,n=l.content[t].schema.properties[e.name];e.description&&(n.description=e.description),e.example&&(n.example=e.example),e.type&&(n.type=e.type);for(let t of y.parameterTypeProperties)void 0!==e[t]&&(n[t]=e[t]);!0===e.required&&(r.required||(r.required=[]),r.required.push(e.name),l.required=!0),void 0!==e.default&&(n.default=e.default),n.properties&&(n.properties=e.properties),e.allOf&&(n.allOf=e.allOf),"array"===e.type&&e.items&&(n.items=e.items,n.items.collectionFormat&&delete n.items.collectionFormat),"file"!==a&&"file"!==e["x-s2o-originalType"]||(n.type="string",n.format="binary"),T(e,n)}}else e&&"file"===e.type&&(e.required&&(l.required=e.required),l.content={},l.content["application/octet-stream"]={},l.content["application/octet-stream"].schema={},l.content["application/octet-stream"].schema.type="string",l.content["application/octet-stream"].schema.format="binary",T(e,l));if(e&&"body"===e.in){l.content={},e.name&&(l["x-s2o-name"]=(t&&t.operationId?y.sanitiseAll(t.operationId):"")+("_"+e.name).toCamelCase()),e.description&&(l.description=e.description),e.required&&(l.required=e.required),t&&s.rbname&&e.name&&(t[s.rbname]=e.name),e.schema&&e.schema.$ref?l["x-s2o-name"]=decodeURIComponent(e.schema.$ref.replace("#/components/schemas/","")):e.schema&&"array"===e.schema.type&&e.schema.items&&e.schema.items.$ref&&(l["x-s2o-name"]=decodeURIComponent(e.schema.items.$ref.replace("#/components/schemas/",""))+"Array"),d.length||d.push("application/json");for(let t of d)l.content[t]={},l.content[t].schema=p(e.schema||{}),O(l.content[t].schema,s);T(e,l)}if(Object.keys(l).length>0&&(e["x-s2o-delete"]=!0,t)&&(t.requestBody&&u?(t.requestBody["x-s2o-overloaded"]=!0,k("Operation "+(t.operationId||i)+" has multiple requestBodies",t,s)):(t.requestBody||(t=r[n]=function(e,t){let r={};for(let n of Object.keys(e))r[n]=e[n],"parameters"===n&&(r.requestBody={},t.rbname&&(r[t.rbname]=""));return r.requestBody={},r}(t,s)),t.requestBody.content&&t.requestBody.content["multipart/form-data"]&&t.requestBody.content["multipart/form-data"].schema&&t.requestBody.content["multipart/form-data"].schema.properties&&l.content["multipart/form-data"]&&l.content["multipart/form-data"].schema&&l.content["multipart/form-data"].schema.properties?(t.requestBody.content["multipart/form-data"].schema.properties=Object.assign(t.requestBody.content["multipart/form-data"].schema.properties,l.content["multipart/form-data"].schema.properties),t.requestBody.content["multipart/form-data"].schema.required=(t.requestBody.content["multipart/form-data"].schema.required||[]).concat(l.content["multipart/form-data"].schema.required||[]),t.requestBody.content["multipart/form-data"].schema.required.length||delete t.requestBody.content["multipart/form-data"].schema.required):t.requestBody.content&&t.requestBody.content["application/x-www-form-urlencoded"]&&t.requestBody.content["application/x-www-form-urlencoded"].schema&&t.requestBody.content["application/x-www-form-urlencoded"].schema.properties&&l.content["application/x-www-form-urlencoded"]&&l.content["application/x-www-form-urlencoded"].schema&&l.content["application/x-www-form-urlencoded"].schema.properties?(t.requestBody.content["application/x-www-form-urlencoded"].schema.properties=Object.assign(t.requestBody.content["application/x-www-form-urlencoded"].schema.properties,l.content["application/x-www-form-urlencoded"].schema.properties),t.requestBody.content["application/x-www-form-urlencoded"].schema.required=(t.requestBody.content["application/x-www-form-urlencoded"].schema.required||[]).concat(l.content["application/x-www-form-urlencoded"].schema.required||[]),t.requestBody.content["application/x-www-form-urlencoded"].schema.required.length||delete t.requestBody.content["application/x-www-form-urlencoded"].schema.required):(t.requestBody=Object.assign(t.requestBody,l),t.requestBody["x-s2o-name"]||(t.requestBody.schema&&t.requestBody.schema.$ref?t.requestBody["x-s2o-name"]=decodeURIComponent(t.requestBody.schema.$ref.replace("#/components/schemas/","")).split("/").join(""):t.operationId&&(t.requestBody["x-s2o-name"]=y.sanitiseAll(t.operationId)))))),e&&!e["x-s2o-delete"]){delete e.type;for(let t of y.parameterTypeProperties)delete e[t];"path"!==e.in||void 0!==e.required&&!0===e.required||(s.patch?(s.patches++,e.required=!0):S("(Patchable) path parameters must be required:true ["+e.name+" in "+i+"]",s))}return t}function T(e,t){for(let r in e)r.startsWith("x-")&&!r.startsWith("x-s2o")&&(t[r]=e[r])}function I(e,t,r,n,i){if(!e)return!1;if(e.$ref&&"string"==typeof e.$ref)e.$ref.indexOf("#/definitions/")>=0?k("definition used as response: "+e.$ref,e,i):e.$ref.startsWith("#/responses/")&&(e.$ref="#/components/responses/"+y.sanitise(decodeURIComponent(e.$ref.replace("#/responses/",""))));else{if((void 0===e.description||null===e.description||""===e.description&&i.patch)&&(i.patch?"object"!=typeof e||Array.isArray(e)||(i.patches++,e.description=g[e]||""):S("(Patchable) response.description is mandatory",i)),void 0!==e.schema){if(O(e.schema,i),e.schema.$ref&&"string"==typeof e.schema.$ref&&e.schema.$ref.startsWith("#/responses/")&&(e.schema.$ref="#/components/responses/"+y.sanitise(decodeURIComponent(e.schema.$ref.replace("#/responses/","")))),r&&r.produces&&"string"==typeof r.produces){if(!i.patch)return S("(Patchable) operation.produces must be an array",i);i.patches++,r.produces=[r.produces]}n.produces&&!Array.isArray(n.produces)&&delete n.produces;let t=((r?r.produces:null)||n.produces||[]).filter(y.uniqueOnly);t.length||t.push("*/*"),e.content={};for(let r of t){if(e.content[r]={},e.content[r].schema=p(e.schema),e.examples&&e.examples[r]){let t={};t.value=e.examples[r],e.content[r].examples={},e.content[r].examples.response=t,delete e.examples[r]}"file"===e.content[r].schema.type&&(e.content[r].schema={type:"string",format:"binary"})}delete e.schema}for(let t in e.examples)e.content||(e.content={}),e.content[t]||(e.content[t]={}),e.content[t].examples={},e.content[t].examples.response={},e.content[t].examples.response.value=e.examples[t];if(delete e.examples,e.headers)for(let t in e.headers)"status code"===t.toLowerCase()?i.patch?(i.patches++,delete e.headers[t]):S('(Patchable) "Status Code" is not a valid header',i):P(e.headers[t],i)}}function N(e,t,r,n,o){for(let s in e){let a=e[s];a&&a["x-trace"]&&"object"==typeof a["x-trace"]&&(a.trace=a["x-trace"],delete a["x-trace"]),a&&a["x-summary"]&&"string"==typeof a["x-summary"]&&(a.summary=a["x-summary"],delete a["x-summary"]),a&&a["x-description"]&&"string"==typeof a["x-description"]&&(a.description=a["x-description"],delete a["x-description"]),a&&a["x-servers"]&&Array.isArray(a["x-servers"])&&(a.servers=a["x-servers"],delete a["x-servers"]);for(let e in a)if(y.httpMethods.indexOf(e)>=0||"x-amazon-apigateway-any-method"===e){let u=a[e];if(u&&u.parameters&&Array.isArray(u.parameters)){if(a.parameters)for(let t of a.parameters)"string"==typeof t.$ref&&($(t,r),t=c(o,t.$ref)),u.parameters.find(function(e,r,n){return e.name===t.name&&e.in===t.in})||"formData"!==t.in&&"body"!==t.in&&"file"!==t.type||(u=C(t,u,a,e,s,o,r),r.rbname&&""===u[r.rbname]&&delete u[r.rbname]);for(let t of u.parameters)u=C(t,u,a,e,e+":"+s,o,r);r.rbname&&""===u[r.rbname]&&delete u[r.rbname],r.debug||u.parameters&&(u.parameters=u.parameters.filter(j))}if(u&&u.security&&E(u.security),"object"==typeof u){if(!u.responses){let e={description:"Default response"};u.responses={default:e}}for(let e in u.responses)I(u.responses[e],0,u,o,r)}if(u&&u["x-servers"]&&Array.isArray(u["x-servers"]))u.servers=u["x-servers"],delete u["x-servers"];else if(u&&u.schemes&&u.schemes.length)for(let e of u.schemes)if((!o.schemes||o.schemes.indexOf(e)<0)&&(u.servers||(u.servers=[]),Array.isArray(o.servers)))for(let t of o.servers){let r=p(t),n=i.parse(r.url);n.protocol=e,r.url=n.format(),u.servers.push(r)}if(r.debug&&(u["x-s2o-consumes"]=u.consumes||[],u["x-s2o-produces"]=u.produces||[]),u){if(delete u.consumes,delete u.produces,delete u.schemes,u["x-ms-examples"]){for(let e in u["x-ms-examples"]){let t=u["x-ms-examples"][e],r=y.sanitiseAll(e);if(t.parameters)for(let n in t.parameters){let r=t.parameters[n];for(let t of(u.parameters||[]).concat(a.parameters||[]))t.$ref&&(t=l.jptr(o,t.$ref)),t.name!==n||t.example||(t.examples||(t.examples={}),t.examples[e]={value:r})}if(t.responses)for(let n in t.responses){if(t.responses[n].headers)for(let e in t.responses[n].headers){let r=t.responses[n].headers[e];for(let t in u.responses[n].headers)t===e&&(u.responses[n].headers[t].example=r)}if(t.responses[n].body&&(o.components.examples[r]={value:p(t.responses[n].body)},u.responses[n]&&u.responses[n].content))for(let t in u.responses[n].content){let i=u.responses[n].content[t];i.examples||(i.examples={}),i.examples[e]={$ref:"#/components/examples/"+r}}}}delete u["x-ms-examples"]}if(u.parameters&&0===u.parameters.length&&delete u.parameters,u.requestBody){let r=u.operationId?y.sanitiseAll(u.operationId):y.sanitiseAll(e+s).toCamelCase(),i=y.sanitise(u.requestBody["x-s2o-name"]||r||"");delete u.requestBody["x-s2o-name"];let o=JSON.stringify(u.requestBody),a=y.hash(o);if(!n[a]){let e={};e.name=i,e.body=u.requestBody,e.refs=[],n[a]=e}let c="#/"+t+"/"+encodeURIComponent(l.jpescape(s))+"/"+e+"/requestBody";n[a].refs.push(c)}}}if(a&&a.parameters){for(let e in a.parameters)C(a.parameters[e],null,a,null,s,o,r);!r.debug&&Array.isArray(a.parameters)&&(a.parameters=a.parameters.filter(j))}}}function R(e){return e&&e.url&&"string"==typeof e.url?(e.url=e.url.split("{{").join("{"),e.url=e.url.split("}}").join("}"),e.url.replace(/\{(.+?)\}/g,function(t,r){e.variables||(e.variables={}),e.variables[r]={default:"unknown"}}),e):e}function L(e,t,r){if(void 0===e.info||null===e.info){if(!t.patch)return r(new w("(Patchable) info object is mandatory"));t.patches++,e.info={version:"",title:""}}if("object"!=typeof e.info||Array.isArray(e.info))return r(new w("info must be an object"));if(void 0===e.info.title||null===e.info.title){if(!t.patch)return r(new w("(Patchable) info.title cannot be null"));t.patches++,e.info.title=""}if(void 0===e.info.version||null===e.info.version){if(!t.patch)return r(new w("(Patchable) info.version cannot be null"));t.patches++,e.info.version=""}if("string"!=typeof e.info.version){if(!t.patch)return r(new w("(Patchable) info.version must be a string"));t.patches++,e.info.version=e.info.version.toString()}if(void 0!==e.info.logo){if(!t.patch)return r(new w("(Patchable) info should not have logo property"));t.patches++,e.info["x-logo"]=e.info.logo,delete e.info.logo}if(void 0!==e.info.termsOfService){if(null===e.info.termsOfService){if(!t.patch)return r(new w("(Patchable) info.termsOfService cannot be null"));t.patches++,e.info.termsOfService=""}try{new URL(e.info.termsOfService)}catch(n){if(!t.patch)return r(new w("(Patchable) info.termsOfService must be a URL"));t.patches++,delete e.info.termsOfService}}}function D(e,t,r){if(void 0===e.paths){if(!t.patch)return r(new w("(Patchable) paths object is mandatory"));t.patches++,e.paths={}}}function M(e,t,r){return o(r,new Promise(function(r,n){if(e||(e={}),t.original=e,t.text||(t.text=a.stringify(e)),t.externals=[],t.externalRefs={},t.rewriteRefs=!0,t.preserveMiro=!0,t.promise={},t.promise.resolve=r,t.promise.reject=n,t.patches=0,t.cache||(t.cache={}),t.source&&(t.cache[t.source]=t.original),function(e,t){const r=new WeakSet;f(e,{identityDetection:!0},function(e,n,i){"object"==typeof e[n]&&null!==e[n]&&(r.has(e[n])?t.anchors?e[n]=p(e[n]):S("YAML anchor or merge key at "+i.path,t):r.add(e[n]))})}(e,t),e.openapi&&"string"==typeof e.openapi&&e.openapi.startsWith("3."))return t.openapi=d(e),L(t.openapi,t,n),D(t.openapi,t,n),void h.optionalResolve(t).then(function(){return t.direct?r(t.openapi):r(t)}).catch(function(e){console.warn(e),n(e)});if(!e.swagger||"2.0"!=e.swagger)return n(new w("Unsupported swagger/OpenAPI version: "+(e.openapi?e.openapi:e.swagger)));let i=t.openapi={};if(i.openapi="string"==typeof t.targetVersion&&t.targetVersion.startsWith("3.")?t.targetVersion:v,t.origin){i["x-origin"]||(i["x-origin"]=[]);let r={};r.url=t.source||t.origin,r.format="swagger",r.version=e.swagger,r.converter={},r.converter.url="https://github.com/mermade/oas-kit",r.converter.version=b,i["x-origin"].push(r)}if(i=Object.assign(i,d(e)),delete i.swagger,f(i,{},function(e,t,r){null===e[t]&&!t.startsWith("x-")&&"default"!==t&&r.path.indexOf("/example")<0&&delete e[t]}),e.host)for(let t of Array.isArray(e.schemes)?e.schemes:[""]){let r={},n=(e.basePath||"").replace(/\/$/,"");r.url=(t?t+":":"")+"//"+e.host+n,R(r),i.servers||(i.servers=[]),i.servers.push(r)}else if(e.basePath){let t={};t.url=e.basePath,R(t),i.servers||(i.servers=[]),i.servers.push(t)}if(delete i.host,delete i.basePath,i["x-servers"]&&Array.isArray(i["x-servers"])&&(i.servers=i["x-servers"],delete i["x-servers"]),e["x-ms-parameterized-host"]){let t=e["x-ms-parameterized-host"],r={};r.url=t.hostTemplate+(e.basePath?e.basePath:""),r.variables={};const n=r.url.match(/\{\w+\}/g);for(let e in t.parameters){let o=t.parameters[e];o.$ref&&(o=p(c(i,o.$ref))),e.startsWith("x-")||(delete o.required,delete o.type,delete o.in,void 0===o.default&&(o.enum?o.default=o.enum[0]:o.default="none"),o.name||(o.name=n[e].replace("{","").replace("}","")),r.variables[o.name]=o,delete o.name)}i.servers||(i.servers=[]),!1===t.useSchemePrefix?i.servers.push(r):e.schemes.forEach(e=>{i.servers.push(Object.assign({},r,{url:e+"://"+r.url}))}),delete i["x-ms-parameterized-host"]}L(i,t,n),D(i,t,n),"string"==typeof i.consumes&&(i.consumes=[i.consumes]),"string"==typeof i.produces&&(i.produces=[i.produces]),i.components={},i["x-callbacks"]&&(i.components.callbacks=i["x-callbacks"],delete i["x-callbacks"]),i.components.examples={},i.components.headers={},i["x-links"]&&(i.components.links=i["x-links"],delete i["x-links"]),i.components.parameters=i.parameters||{},i.components.responses=i.responses||{},i.components.requestBodies={},i.components.securitySchemes=i.securityDefinitions||{},i.components.schemas=i.definitions||{},delete i.definitions,delete i.responses,delete i.parameters,delete i.securityDefinitions,h.optionalResolve(t).then(function(){(function(e,t){let r={};x={schemas:{}},e.security&&E(e.security);for(let i in e.components.securitySchemes){let r=y.sanitise(i);i!==r&&(e.components.securitySchemes[r]&&S("Duplicate sanitised securityScheme name "+r,t),e.components.securitySchemes[r]=e.components.securitySchemes[i],delete e.components.securitySchemes[i]),A(e.components.securitySchemes[r],t)}for(let i in e.components.schemas){let r=y.sanitiseAll(i),n="";if(i!==r){for(;e.components.schemas[r+n];)n=n?++n:2;e.components.schemas[r+n]=e.components.schemas[i],delete e.components.schemas[i]}x.schemas[i]=r+n,O(e.components.schemas[r+n],t)}t.refmap={},f(e,{payload:{options:t}},_),function(e,t){for(let r in t.refmap)l.jptr(e,r,{$ref:t.refmap[r]})}(e,t);for(let i in e.components.parameters){let r=y.sanitise(i);i!==r&&(e.components.parameters[r]&&S("Duplicate sanitised parameter name "+r,t),e.components.parameters[r]=e.components.parameters[i],delete e.components.parameters[i]),C(e.components.parameters[r],null,null,null,r,e,t)}for(let i in e.components.responses){let r=y.sanitise(i);i!==r&&(e.components.responses[r]&&S("Duplicate sanitised response name "+r,t),e.components.responses[r]=e.components.responses[i],delete e.components.responses[i]);let n=e.components.responses[r];if(I(n,0,null,e,t),n.headers)for(let e in n.headers)"status code"===e.toLowerCase()?t.patch?(t.patches++,delete n.headers[e]):S('(Patchable) "Status Code" is not a valid header',t):P(n.headers[e],t)}for(let i in e.components.requestBodies){let t=e.components.requestBodies[i],n=JSON.stringify(t),o=y.hash(n),s={};s.name=i,s.body=t,s.refs=[],r[o]=s}if(N(e.paths,"paths",t,r,e),e["x-ms-paths"]&&N(e["x-ms-paths"],"x-ms-paths",t,r,e),!t.debug)for(let i in e.components.parameters)e.components.parameters[i]["x-s2o-delete"]&&delete e.components.parameters[i];t.debug&&(e["x-s2o-consumes"]=e.consumes||[],e["x-s2o-produces"]=e.produces||[]),delete e.consumes,delete e.produces,delete e.schemes;let n=[];if(e.components.requestBodies={},!t.resolveInternal){let t=1;for(let i in r){let o=r[i];if(o.refs.length>1){let r="";for(o.name||(o.name="requestBody",r=t++);n.indexOf(o.name+r)>=0;)r=r?++r:2;o.name=o.name+r,n.push(o.name),e.components.requestBodies[o.name]=p(o.body);for(let t in o.refs){let r={};r.$ref="#/components/requestBodies/"+o.name,l.jptr(e,o.refs[t],r)}}}}e.components.responses&&0===Object.keys(e.components.responses).length&&delete e.components.responses,e.components.parameters&&0===Object.keys(e.components.parameters).length&&delete e.components.parameters,e.components.examples&&0===Object.keys(e.components.examples).length&&delete e.components.examples,e.components.requestBodies&&0===Object.keys(e.components.requestBodies).length&&delete e.components.requestBodies,e.components.securitySchemes&&0===Object.keys(e.components.securitySchemes).length&&delete e.components.securitySchemes,e.components.headers&&0===Object.keys(e.components.headers).length&&delete e.components.headers,e.components.schemas&&0===Object.keys(e.components.schemas).length&&delete e.components.schemas,e.components&&0===Object.keys(e.components).length&&delete e.components})(t.openapi,t),t.direct?r(t.openapi):r(t)}).catch(function(e){console.warn(e),n(e)})}))}function z(e,t,r){return o(r,new Promise(function(r,n){let i=null,o=null;try{i=JSON.parse(e),t.text=JSON.stringify(i,null,2)}catch(r){o=r;try{i=a.parse(e,{schema:"core",prettyErrors:!0}),t.sourceYaml=!0,t.text=e}catch(e){o=e}}i?M(i,t).then(e=>r(e)).catch(e=>n(e)):n(new w(o?o.message:"Could not parse string"))}))}e.exports={S2OError:w,targetVersion:v,convert:M,convertObj:M,convertUrl:function(e,t,r){return o(r,new Promise(function(r,n){t.origin=!0,t.source||(t.source=e),t.verbose&&console.warn("GET "+e),t.fetch||(t.fetch=s);const i=Object.assign({},t.fetchOptions,{agent:t.agent});t.fetch(e,i).then(function(t){if(200!==t.status)throw new w(`Received status code ${t.status}: ${e}`);return t.text()}).then(function(e){z(e,t).then(e=>r(e)).catch(e=>n(e))}).catch(function(e){n(e)})}))},convertStr:z,convertFile:function(e,t,r){return o(r,new Promise(function(r,i){n.readFile(e,t.encoding||"utf8",function(n,o){n?i(n):(t.sourceFile=e,z(o,t).then(e=>r(e)).catch(e=>i(e)))})}))},convertStream:function(e,t,r){return o(r,new Promise(function(r,n){let i="";e.on("data",function(e){i+=e}).on("end",function(){z(i,t).then(e=>r(e)).catch(e=>n(e))})}))}}},665:function(e,t,r){"use strict";const n=r(375);e.exports={statusCodes:Object.assign({},{default:"Default response","1XX":"Informational",103:"Early hints","2XX":"Successful","3XX":"Redirection","4XX":"Client Error","5XX":"Server Error","7XX":"Developer Error"},n.STATUS_CODES)}},988:function(e,t,r){var n=r(7),i=["add","done","toJS","fromExternalJS","load","dispose","search","Worker"];e.exports=function(){var e=new Worker(URL.createObjectURL(new Blob(['/*! For license information please see a6b6d6494d34d2b1b721.worker.js.LICENSE.txt */\n!function(){var e={291:function(e,t,r){var n,i;!function(){var s,o,a,u,l,c,h,d,f,p,y,m,g,x,v,w,Q,k,S,E,L,P,b,T,O,I,R,F,C,N,j=function(e){var t=new j.Builder;return t.pipeline.add(j.trimmer,j.stopWordFilter,j.stemmer),t.searchPipeline.add(j.stemmer),e.call(t,t),t.build()};j.version="2.3.9",j.utils={},j.utils.warn=(s=this,function(e){s.console&&console.warn&&console.warn(e)}),j.utils.asString=function(e){return null==e?"":e.toString()},j.utils.clone=function(e){if(null==e)return e;for(var t=Object.create(null),r=Object.keys(e),n=0;n0){var u=j.utils.clone(t)||{};u.position=[o,a],u.index=i.length,i.push(new j.Token(r.slice(o,s),u))}o=s+1}}return i},j.tokenizer.separator=/[\\s\\-]+/,j.Pipeline=function(){this._stack=[]},j.Pipeline.registeredFunctions=Object.create(null),j.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&j.utils.warn("Overwriting existing registered function: "+t),e.label=t,j.Pipeline.registeredFunctions[e.label]=e},j.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||j.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\\n",e)},j.Pipeline.load=function(e){var t=new j.Pipeline;return e.forEach((function(e){var r=j.Pipeline.registeredFunctions[e];if(!r)throw new Error("Cannot load unregistered function: "+e);t.add(r)})),t},j.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEach((function(e){j.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)}),this)},j.Pipeline.prototype.after=function(e,t){j.Pipeline.warnIfFunctionNotRegistered(t);var r=this._stack.indexOf(e);if(-1==r)throw new Error("Cannot find existingFn");r+=1,this._stack.splice(r,0,t)},j.Pipeline.prototype.before=function(e,t){j.Pipeline.warnIfFunctionNotRegistered(t);var r=this._stack.indexOf(e);if(-1==r)throw new Error("Cannot find existingFn");this._stack.splice(r,0,t)},j.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},j.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r1&&(se&&(r=i),s!=e);)n=r-t,i=t+Math.floor(n/2),s=this.elements[2*i];return s==e||s>e?2*i:sa?l+=2:o==a&&(t+=r[u+1]*n[l+1],u+=2,l+=2);return t},j.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},j.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t0){var s,o=i.str.charAt(0);o in i.node.edges?s=i.node.edges[o]:(s=new j.TokenSet,i.node.edges[o]=s),1==i.str.length&&(s.final=!0),n.push({node:s,editsRemaining:i.editsRemaining,str:i.str.slice(1)})}if(0!=i.editsRemaining){if("*"in i.node.edges)var a=i.node.edges["*"];else a=new j.TokenSet,i.node.edges["*"]=a;if(0==i.str.length&&(a.final=!0),n.push({node:a,editsRemaining:i.editsRemaining-1,str:i.str}),i.str.length>1&&n.push({node:i.node,editsRemaining:i.editsRemaining-1,str:i.str.slice(1)}),1==i.str.length&&(i.node.final=!0),i.str.length>=1){if("*"in i.node.edges)var u=i.node.edges["*"];else u=new j.TokenSet,i.node.edges["*"]=u;1==i.str.length&&(u.final=!0),n.push({node:u,editsRemaining:i.editsRemaining-1,str:i.str.slice(1)})}if(i.str.length>1){var l,c=i.str.charAt(0),h=i.str.charAt(1);h in i.node.edges?l=i.node.edges[h]:(l=new j.TokenSet,i.node.edges[h]=l),1==i.str.length&&(l.final=!0),n.push({node:l,editsRemaining:i.editsRemaining-1,str:c+i.str.slice(2)})}}}return r},j.TokenSet.fromString=function(e){for(var t=new j.TokenSet,r=t,n=0,i=e.length;n=e;t--){var r=this.uncheckedNodes[t],n=r.child.toString();n in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[n]:(r.child._str=n,this.minimizedNodes[n]=r.child),this.uncheckedNodes.pop()}},j.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},j.Index.prototype.search=function(e){return this.query((function(t){new j.QueryParser(e,t).parse()}))},j.Index.prototype.query=function(e){for(var t=new j.Query(this.fields),r=Object.create(null),n=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=0;a1?1:e},j.Builder.prototype.k1=function(e){this._k1=e},j.Builder.prototype.add=function(e,t){var r=e[this._ref],n=Object.keys(this._fields);this._documents[r]=t||{},this.documentCount+=1;for(var i=0;i=this.length)return j.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},j.QueryLexer.prototype.width=function(){return this.pos-this.start},j.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},j.QueryLexer.prototype.backup=function(){this.pos-=1},j.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do{t=(e=this.next()).charCodeAt(0)}while(t>47&&t<58);e!=j.QueryLexer.EOS&&this.backup()},j.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(j.QueryLexer.TERM)),e.ignore(),e.more())return j.QueryLexer.lexText},j.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(j.QueryLexer.EDIT_DISTANCE),j.QueryLexer.lexText},j.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(j.QueryLexer.BOOST),j.QueryLexer.lexText},j.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(j.QueryLexer.TERM)},j.QueryLexer.termSeparator=j.tokenizer.separator,j.QueryLexer.lexText=function(e){for(;;){var t=e.next();if(t==j.QueryLexer.EOS)return j.QueryLexer.lexEOS;if(92!=t.charCodeAt(0)){if(":"==t)return j.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(j.QueryLexer.TERM),j.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(j.QueryLexer.TERM),j.QueryLexer.lexBoost;if("+"==t&&1===e.width())return e.emit(j.QueryLexer.PRESENCE),j.QueryLexer.lexText;if("-"==t&&1===e.width())return e.emit(j.QueryLexer.PRESENCE),j.QueryLexer.lexText;if(t.match(j.QueryLexer.termSeparator))return j.QueryLexer.lexTerm}else e.escapeCharacter()}},j.QueryParser=function(e,t){this.lexer=new j.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0},j.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=j.QueryParser.parseClause;e;)e=e(this);return this.query},j.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},j.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},j.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},j.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(null!=t)switch(t.type){case j.QueryLexer.PRESENCE:return j.QueryParser.parsePresence;case j.QueryLexer.FIELD:return j.QueryParser.parseField;case j.QueryLexer.TERM:return j.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+t.type;throw t.str.length>=1&&(r+=" with value \'"+t.str+"\'"),new j.QueryParseError(r,t.start,t.end)}},j.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(null!=t){switch(t.str){case"-":e.currentClause.presence=j.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=j.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator\'"+t.str+"\'";throw new j.QueryParseError(r,t.start,t.end)}var n=e.peekLexeme();if(null==n)throw r="expecting term or field, found nothing",new j.QueryParseError(r,t.start,t.end);switch(n.type){case j.QueryLexer.FIELD:return j.QueryParser.parseField;case j.QueryLexer.TERM:return j.QueryParser.parseTerm;default:throw r="expecting term or field, found \'"+n.type+"\'",new j.QueryParseError(r,n.start,n.end)}}},j.QueryParser.parseField=function(e){var t=e.consumeLexeme();if(null!=t){if(-1==e.query.allFields.indexOf(t.str)){var r=e.query.allFields.map((function(e){return"\'"+e+"\'"})).join(", "),n="unrecognised field \'"+t.str+"\', possible fields: "+r;throw new j.QueryParseError(n,t.start,t.end)}e.currentClause.fields=[t.str];var i=e.peekLexeme();if(null==i)throw n="expecting term, found nothing",new j.QueryParseError(n,t.start,t.end);if(i.type===j.QueryLexer.TERM)return j.QueryParser.parseTerm;throw n="expecting term, found \'"+i.type+"\'",new j.QueryParseError(n,i.start,i.end)}},j.QueryParser.parseTerm=function(e){var t=e.consumeLexeme();if(null!=t){e.currentClause.term=t.str.toLowerCase(),-1!=t.str.indexOf("*")&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(null!=r)switch(r.type){case j.QueryLexer.TERM:return e.nextClause(),j.QueryParser.parseTerm;case j.QueryLexer.FIELD:return e.nextClause(),j.QueryParser.parseField;case j.QueryLexer.EDIT_DISTANCE:return j.QueryParser.parseEditDistance;case j.QueryLexer.BOOST:return j.QueryParser.parseBoost;case j.QueryLexer.PRESENCE:return e.nextClause(),j.QueryParser.parsePresence;default:var n="Unexpected lexeme type \'"+r.type+"\'";throw new j.QueryParseError(n,r.start,r.end)}else e.nextClause()}},j.QueryParser.parseEditDistance=function(e){var t=e.consumeLexeme();if(null!=t){var r=parseInt(t.str,10);if(isNaN(r)){var n="edit distance must be numeric";throw new j.QueryParseError(n,t.start,t.end)}e.currentClause.editDistance=r;var i=e.peekLexeme();if(null!=i)switch(i.type){case j.QueryLexer.TERM:return e.nextClause(),j.QueryParser.parseTerm;case j.QueryLexer.FIELD:return e.nextClause(),j.QueryParser.parseField;case j.QueryLexer.EDIT_DISTANCE:return j.QueryParser.parseEditDistance;case j.QueryLexer.BOOST:return j.QueryParser.parseBoost;case j.QueryLexer.PRESENCE:return e.nextClause(),j.QueryParser.parsePresence;default:throw n="Unexpected lexeme type \'"+i.type+"\'",new j.QueryParseError(n,i.start,i.end)}else e.nextClause()}},j.QueryParser.parseBoost=function(e){var t=e.consumeLexeme();if(null!=t){var r=parseInt(t.str,10);if(isNaN(r)){var n="boost must be numeric";throw new j.QueryParseError(n,t.start,t.end)}e.currentClause.boost=r;var i=e.peekLexeme();if(null!=i)switch(i.type){case j.QueryLexer.TERM:return e.nextClause(),j.QueryParser.parseTerm;case j.QueryLexer.FIELD:return e.nextClause(),j.QueryParser.parseField;case j.QueryLexer.EDIT_DISTANCE:return j.QueryParser.parseEditDistance;case j.QueryLexer.BOOST:return j.QueryParser.parseBoost;case j.QueryLexer.PRESENCE:return e.nextClause(),j.QueryParser.parsePresence;default:throw n="Unexpected lexeme type \'"+i.type+"\'",new j.QueryParseError(n,i.start,i.end)}else e.nextClause()}},void 0===(i="function"==typeof(n=function(){return j})?n.call(t,r,t,e):n)||(e.exports=i)}()}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,r),s.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var n={};!function(){"use strict";r.d(n,{add:function(){return c},dispose:function(){return y},done:function(){return h},fromExternalJS:function(){return f},load:function(){return p},search:function(){return m},toJS:function(){return d}});var e=r(291),t=(e,t,r)=>new Promise(((n,i)=>{var s=e=>{try{a(r.next(e))}catch(e){i(e)}},o=e=>{try{a(r.throw(e))}catch(e){i(e)}},a=e=>e.done?n(e.value):Promise.resolve(e.value).then(s,o);a((r=r.apply(e,t)).next())}));let i,s,o,a=[];function u(){i=new e.Builder,i.field("title"),i.field("description"),i.ref("ref"),i.pipeline.add(e.trimmer,e.stopWordFilter,e.stemmer),o=new Promise((e=>{s=e}))}e.tokenizer.separator=/\\s+/,u();const l=t=>{const r=e.trimmer(new e.Token(t,{}));return"*"+e.stemmer(r)+"*"};function c(e,t,r){const n=a.push(r)-1,s={title:e.toLowerCase(),description:t.toLowerCase(),ref:n};i.add(s)}function h(){return t(this,null,(function*(){s(i.build())}))}function d(){return t(this,null,(function*(){return{store:a,index:(yield o).toJSON()}}))}function f(e,r){return t(this,null,(function*(){try{if(importScripts(e),!self[r])throw new Error("Broken index file format");p(self[r])}catch(e){console.error("Failed to load search index: "+e.message)}}))}function p(r){return t(this,null,(function*(){a=r.store,s(e.Index.load(r.index))}))}function y(){return t(this,null,(function*(){a=[],u()}))}function m(e,r=0){return t(this,null,(function*(){if(0===e.trim().length)return[];let t=(yield o).query((t=>{e.trim().toLowerCase().split(/\\s+/).forEach((e=>{if(1===e.length)return;const r=l(e);t.term(r,{})}))}));return r>0&&(t=t.slice(0,r)),t.map((e=>({meta:a[e.ref],score:e.score})))}))}addEventListener("message",(function(e){var t,r=e.data,i=r.type,s=r.method,o=r.id,a=r.params;"RPC"===i&&s&&((t=n[s])?Promise.resolve().then((function(){return t.apply(n,a)})):Promise.reject("No such method")).then((function(e){postMessage({type:"RPC",id:o,result:e})})).catch((function(e){var t={message:e};e.stack&&(t.message=e.message,t.stack=e.stack,t.name=e.name),postMessage({type:"RPC",id:o,error:t})}))})),postMessage({type:"RPC",method:"ready"})}()}();\n//# sourceMappingURL=a6b6d6494d34d2b1b721.worker.js.map'])),{name:"[fullhash].worker.js"});return n(e,i),e}},7:function(e){e.exports=function(e,t){var r=0,n={};e.addEventListener("message",function(t){var r=t.data;if("RPC"===r.type)if(r.id){var i=n[r.id];i&&(delete n[r.id],r.error?i[1](Object.assign(Error(r.error.message),r.error)):i[0](r.result))}else{var o=document.createEvent("Event");o.initEvent(r.method,!1,!1),o.data=r.params,e.dispatchEvent(o)}}),t.forEach(function(t){e[t]=function(){var i=arguments;return new Promise(function(o,s){var a=++r;n[a]=[o,s],e.postMessage({type:"RPC",id:a,method:t,params:[].slice.call(i)})})}})}},884:function(e){"use strict";e.exports=r(13998)},648:function(e){"use strict";e.exports=r(78463)},230:function(e){"use strict";e.exports=r(227)},115:function(e){"use strict";e.exports=r(94562)},725:function(e){"use strict";e.exports=void 0},375:function(){},430:function(e){"use strict";e.exports={rE:"7.0.8"}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,exports:{}};return e[r](o,o.exports,n),o.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var i={};return function(){"use strict";n.r(i),n.d(i,{AUTH_TYPES:function(){return cc},ApiContentWrap:function(){return nd},ApiInfo:function(){return xc},ApiInfoModel:function(){return Kr},ApiLogo:function(){return Oc},AppStore:function(){return fc},ArraySchema:function(){return yl},BackgroundStub:function(){return id},BodyContent:function(){return fu},COMPONENT_REGEXP:function(){return Ur},CallbackModel:function(){return fn},ClipboardService:function(){return Us},ContentItem:function(){return Ap},ContentItems:function(){return Ep},DiscriminatorDropdown:function(){return il},Dropdown:function(){return fs},DropdownLabel:function(){return la},DropdownOrLabel:function(){return Ss},DropdownWrapper:function(){return ca},ErrorBoundary:function(){return ie},Example:function(){return oa},ExampleModel:function(){return Un},ExternalExample:function(){return sa},FieldModel:function(){return Qn},GROUP_DEPTH:function(){return Gi},GroupModel:function(){return zi},HistoryService:function(){return Wt},IS_BROWSER:function(){return a},InvertedSimpleDropdown:function(){return ua},JsonPointer:function(){return Oe},JsonViewer:function(){return ea},LEGACY_REGEXP:function(){return Fr},Loading:function(){return le},MDX_COMPONENT_REGEXP:function(){return qr},Markdown:function(){return Rs},MarkdownRenderer:function(){return Wr},MarkerService:function(){return Qt},MediaContentModel:function(){return ei},MediaTypeModel:function(){return Yn},MediaTypesSwitch:function(){return ru},MenuBuilder:function(){return Yi},MenuItem:function(){return Mp},MenuItemLabel:function(){return Mc},MenuItemLi:function(){return Lc},MenuItemTitle:function(){return zc},MenuItemUl:function(){return Rc},MenuItems:function(){return Wp},MenuStore:function(){return to},MiddlePanel:function(){return ao},MimeLabel:function(){return aa},NoSampleLabel:function(){return pa},OLD_SECURITY_DEFINITIONS_JSX_NAME:function(){return ht},ObjectSchema:function(){return ol},OneOfButton:function(){return El},OneOfSchema:function(){return Al},OpenAPIParser:function(){return En},Operation:function(){return bp},OperationBadge:function(){return Ic},OperationItem:function(){return $p},OperationMenuItemContent:function(){return zp},OperationModel:function(){return gi},OptionsConsumer:function(){return de},OptionsContext:function(){return ue},OptionsProvider:function(){return pe},Parameters:function(){return pu},PayloadSamples:function(){return Yu},Redoc:function(){return fd},RedocAttribution:function(){return Bc},RedocNormalizedOptions:function(){return H},RedocStandalone:function(){return xd},RedocWrap:function(){return rd},RequestBodyModel:function(){return ti},ResponseDetails:function(){return ju},ResponseHeaders:function(){return Su},ResponseModel:function(){return pi},ResponseSamples:function(){return cp},ResponseTitle:function(){return gu},ResponseView:function(){return Pu},ResponsesList:function(){return Cu},RightPanel:function(){return co},Row:function(){return po},SCHEMA_DEFINITION_JSX_NAME:function(){return mt},SECTION_ATTR:function(){return eo},SECURITY_DEFINITIONS_JSX_NAME:function(){return ft},SECURITY_SCHEMES_SECTION_PREFIX:function(){return yt},Schema:function(){return Ml},SchemaDefinition:function(){return Hl},SchemaModel:function(){return zn},ScrollService:function(){return oo},SearchBox:function(){return dd},SearchStore:function(){return so},Section:function(){return lo},SectionItem:function(){return Pp},SecurityDefs:function(){return uc},SecuritySchemeModel:function(){return Ai},SecuritySchemesModel:function(){return ji},SideMenu:function(){return Kp},SideNavStyleEnum:function(){return R},SimpleDropdown:function(){return hs},SourceCode:function(){return ta},SourceCodeWithCopy:function(){return ra},SpecStore:function(){return Ri},StickyResponsiveSidebar:function(){return td},StoreBuilder:function(){return Oo},StoreConsumer:function(){return ko},StoreContext:function(){return wo},StoreProvider:function(){return So},StyledMarkdownBlock:function(){return _s},ThemeProvider:function(){return Z},Throttle:function(){return At},alphabeticallyByProp:function(){return Ft},appendToMdHeading:function(){return b},argValueToBoolean:function(){return V},buildComponentComment:function(){return Vr},concatRefStacks:function(){return _n},convertSwagger2OpenAPI:function(){return ve},createGlobalStyle:function(){return X},createStore:function(){return dc},css:function(){return Y},debugTime:function(){return jt},debugTimeEnd:function(){return Pt},detectType:function(){return Ue},escapeHTMLAttrChars:function(){return P},expandDefaultServerVariables:function(){return pt},extensionsHook:function(){return re},extractExtensions:function(){return xt},flattenByProp:function(){return m},getBasePath:function(){return _},getContentWithLegacyExamples:function(){return St},getDefinitionName:function(){return nt},getOperationSummary:function(){return Fe},getSerializedValue:function(){return Ze},getStatusCodeType:function(){return Me},highlight:function(){return Et},history:function(){return Ht},html2Str:function(){return c},humanizeConstraints:function(){return st},humanizeNumberRange:function(){return ot},isAbsoluteUrl:function(){return k},isArray:function(){return C},isBoolean:function(){return T},isFormUrlEncoded:function(){return He},isJsonLike:function(){return We},isNamedDefinition:function(){return rt},isNumeric:function(){return g},isObject:function(){return x},isOperationName:function(){return Be},isPayloadSample:function(){return mi},isPrimitiveType:function(){return Ve},isRedocExtension:function(){return vt},isStatusCode:function(){return De},keyframes:function(){return J},langFromMime:function(){return et},loadAndBundleSpec:function(){return be},mapLang:function(){return _t},mapValues:function(){return h},mapWithLast:function(){return f},media:function(){return ee},memoize:function(){return Bt},menuItemDepth:function(){return Dc},mergeObjects:function(){return v},mergeParams:function(){return ct},mergeSimilarMediaTypes:function(){return ut},normalizeServers:function(){return dt},pluralizeType:function(){return wt},pushRef:function(){return On},querySelector:function(){return l},removeQueryStringAndHash:function(){return A},resolveUrl:function(){return O},safeSlugify:function(){return S},scrollIntoViewIfNeeded:function(){return u},serializeParameterValue:function(){return Je},serializeParameterValueWithMime:function(){return Xe},setSecuritySchemePrefix:function(){return gt},shortenHTTPVerb:function(){return bt},sortByField:function(){return lt},sortByRequired:function(){return at},stripTrailingSlash:function(){return y},styled:function(){return te},titleize:function(){return E},unescapeHTMLChars:function(){return $},urlFormEncodePayload:function(){return Ye},useStore:function(){return _o}});var e=r(96540),t=r(1885);const o={spacing:{unit:5,sectionHorizontal:({spacing:e})=>8*e.unit,sectionVertical:({spacing:e})=>8*e.unit},breakpoints:{small:"50rem",medium:"75rem",large:"105rem"},colors:{tonalOffset:.2,primary:{main:"#32329f",light:({colors:e})=>(0,t.lighten)(e.tonalOffset,e.primary.main),dark:({colors:e})=>(0,t.darken)(e.tonalOffset,e.primary.main),contrastText:({colors:e})=>(0,t.readableColor)(e.primary.main)},success:{main:"#1d8127",light:({colors:e})=>(0,t.lighten)(2*e.tonalOffset,e.success.main),dark:({colors:e})=>(0,t.darken)(e.tonalOffset,e.success.main),contrastText:({colors:e})=>(0,t.readableColor)(e.success.main)},warning:{main:"#ffa500",light:({colors:e})=>(0,t.lighten)(e.tonalOffset,e.warning.main),dark:({colors:e})=>(0,t.darken)(e.tonalOffset,e.warning.main),contrastText:"#ffffff"},error:{main:"#d41f1c",light:({colors:e})=>(0,t.lighten)(e.tonalOffset,e.error.main),dark:({colors:e})=>(0,t.darken)(e.tonalOffset,e.error.main),contrastText:({colors:e})=>(0,t.readableColor)(e.error.main)},gray:{50:"#FAFAFA",100:"#F5F5F5"},text:{primary:"#333333",secondary:({colors:e})=>(0,t.lighten)(e.tonalOffset,e.text.primary)},border:{dark:"rgba(0,0,0, 0.1)",light:"#ffffff"},responses:{success:{color:({colors:e})=>e.success.main,backgroundColor:({colors:e})=>(0,t.transparentize)(.93,e.success.main),tabTextColor:({colors:e})=>e.responses.success.color},error:{color:({colors:e})=>e.error.main,backgroundColor:({colors:e})=>(0,t.transparentize)(.93,e.error.main),tabTextColor:({colors:e})=>e.responses.error.color},redirect:{color:({colors:e})=>e.warning.main,backgroundColor:({colors:e})=>(0,t.transparentize)(.9,e.responses.redirect.color),tabTextColor:({colors:e})=>e.responses.redirect.color},info:{color:"#87ceeb",backgroundColor:({colors:e})=>(0,t.transparentize)(.9,e.responses.info.color),tabTextColor:({colors:e})=>e.responses.info.color}},http:{get:"#2F8132",post:"#186FAF",put:"#95507c",options:"#947014",patch:"#bf581d",delete:"#cc3333",basic:"#707070",link:"#07818F",head:"#A23DAD"}},schema:{linesColor:e=>(0,t.lighten)(e.colors.tonalOffset,(0,t.desaturate)(e.colors.tonalOffset,e.colors.primary.main)),defaultDetailsWidth:"75%",typeNameColor:e=>e.colors.text.secondary,typeTitleColor:e=>e.schema.typeNameColor,requireLabelColor:e=>e.colors.error.main,labelsTextSize:"0.9em",nestingSpacing:"1em",nestedBackground:"#fafafa",arrow:{size:"1.1em",color:e=>e.colors.text.secondary}},typography:{fontSize:"14px",lineHeight:"1.5em",fontWeightRegular:"400",fontWeightBold:"600",fontWeightLight:"300",fontFamily:"Roboto, sans-serif",smoothing:"antialiased",optimizeSpeed:!0,headings:{fontFamily:"Montserrat, sans-serif",fontWeight:"400",lineHeight:"1.6em"},code:{fontSize:"13px",fontFamily:"Courier, monospace",lineHeight:({typography:e})=>e.lineHeight,fontWeight:({typography:e})=>e.fontWeightRegular,color:"#e53935",backgroundColor:"rgba(38, 50, 56, 0.05)",wrap:!1},links:{color:({colors:e})=>e.primary.main,visited:({typography:e})=>e.links.color,hover:({typography:e})=>(0,t.lighten)(.2,e.links.color),textDecoration:"auto",hoverTextDecoration:"auto"}},sidebar:{width:"260px",backgroundColor:"#fafafa",textColor:"#333333",activeTextColor:e=>e.sidebar.textColor!==o.sidebar.textColor?e.sidebar.textColor:e.colors.primary.main,groupItems:{activeBackgroundColor:e=>(0,t.darken)(.1,e.sidebar.backgroundColor),activeTextColor:e=>e.sidebar.activeTextColor,textTransform:"uppercase"},level1Items:{activeBackgroundColor:e=>(0,t.darken)(.05,e.sidebar.backgroundColor),activeTextColor:e=>e.sidebar.activeTextColor,textTransform:"none"},arrow:{size:"1.5em",color:e=>e.sidebar.textColor}},logo:{maxHeight:({sidebar:e})=>e.width,maxWidth:({sidebar:e})=>e.width,gutter:"2px"},rightPanel:{backgroundColor:"#263238",width:"40%",textColor:"#ffffff",servers:{overlay:{backgroundColor:"#fafafa",textColor:"#263238"},url:{backgroundColor:"#fff"}}},codeBlock:{backgroundColor:({rightPanel:e})=>(0,t.darken)(.1,e.backgroundColor)},fab:{backgroundColor:"#f2f2f2",color:"#0065FB"}};var s=o;const a="undefined"!=typeof window&&"HTMLElement"in window;function l(e){return"undefined"!=typeof document?document.querySelector(e):null}function c(e){return e.split(/<[^>]+>/).map(e=>e.trim()).filter(e=>e.length>0).join(" ")}function u(e,t=!0){const r=e.parentNode;if(!r)return;const n=window.getComputedStyle(r,void 0),i=parseInt(n.getPropertyValue("border-top-width"),10),o=parseInt(n.getPropertyValue("border-left-width"),10),s=e.offsetTop-r.offsetTopr.scrollTop+r.clientHeight,l=e.offsetLeft-r.offsetLeftr.scrollLeft+r.clientWidth,u=s&&!a;(s||a)&&t&&(r.scrollTop=e.offsetTop-r.offsetTop-r.clientHeight/2-i+e.clientHeight/2),(l||c)&&t&&(r.scrollLeft=e.offsetLeft-r.offsetLeft-r.clientWidth/2-o+e.clientWidth/2),(s||a||l||c)&&!t&&e.scrollIntoView(u)}var p=r(12495),d=n.n(p);function f(e,t){const r=[];for(let n=0;n{for(const i of e)r.push(i),i[t]&&n(i[t])};return n(e),r}function y(e){return e.endsWith("/")?e.substring(0,e.length-1):e}function g(e){return!isNaN(parseFloat(e))&&isFinite(e)}function b(e,t,r){const n=new RegExp(`(^|\\n)#\\s?${t}\\s*\\n`,"i"),i=new RegExp(`((\\n|^)#\\s*${t}\\s*(\\n|$)(?:.|\\n)*?)(\\n#|$)`,"i");if(n.test(e))return e.replace(i,`$1\n\n${r}\n$4`);{const n=""===e||e.endsWith("\n\n")?"":e.endsWith("\n")?"\n":"\n\n";return`${e}${n}# ${t}\n\n${r}`}}const v=(e,...t)=>{if(!t.length)return e;const r=t.shift();return void 0===r?e:(w(e)&&w(r)&&Object.keys(r).forEach(t=>{Object.prototype.hasOwnProperty.call(r,t)&&"__proto__"!==t&&(w(r[t])?(e[t]||(e[t]={}),v(e[t],r[t])):e[t]=r[t])}),v(e,...t))},x=e=>null!==e&&"object"==typeof e,w=e=>x(e)&&!C(e);function S(e){return d()(e)||e.toString().toLowerCase().replace(/\s+/g,"-").replace(/&/g,"-and-").replace(/\--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")}function k(e){return/(?:^[a-z][a-z0-9+.-]*:|\/\/)/i.test(e)}function O(e,t){let r;if(t.startsWith("//"))try{r=`${new URL(e).protocol||"https:"}${t}`}catch(e){r=`https:${t}`}else if(k(t))r=t;else if(t.startsWith("/"))try{const n=new URL(e);n.pathname=t,r=n.href}catch(e){r=t}else r=y(e)+"/"+t;return y(r)}function _(e){try{return j(e).pathname}catch(t){return e}}function E(e){return e.charAt(0).toUpperCase()+e.slice(1)}function A(e){try{const t=j(e);return t.search="",t.hash="",t.toString()}catch(t){return e}}function j(e){return"undefined"==typeof URL?new(n(725).URL)(e):new URL(e)}function P(e){return e.replace(/["\\]/g,"\\$&")}function $(e){return e.replace(/&#(\d+);/g,(e,t)=>String.fromCharCode(parseInt(t,10))).replace(/&/g,"&").replace(/"/g,'"')}function C(e){return Array.isArray(e)}function T(e){return"boolean"==typeof e}const I={enum:"Enum",enumSingleValue:"Value",enumArray:"Items",default:"Default",deprecated:"Deprecated",example:"Example",examples:"Examples",recursive:"Recursive",arrayOf:"Array of ",webhook:"Event",const:"Value",noResultsFound:"No results found",download:"Download",downloadSpecification:"Download OpenAPI specification",responses:"Responses",callbackResponses:"Callback responses",requestSamples:"Request samples",responseSamples:"Response samples"};function N(e,t){const r=I[e];return void 0!==t?r[t]:r}var R=(e=>(e.SummaryOnly="summary-only",e.PathOnly="path-only",e.IdOnly="id-only",e))(R||{}),L=Object.defineProperty,D=Object.defineProperties,M=Object.getOwnPropertyDescriptors,z=Object.getOwnPropertySymbols,B=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable,q=(e,t,r)=>t in e?L(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,U=(e,t)=>{for(var r in t||(t={}))B.call(t,r)&&q(e,r,t[r]);if(z)for(var r of z(t))F.call(t,r)&&q(e,r,t[r]);return e};function V(e,t){return void 0===e?t||!1:"string"==typeof e?"false"!==e:e}function W(e){return"string"==typeof e?parseInt(e,10):"number"==typeof e?e:void 0}class H{static normalizeExpandResponses(e){if("all"===e)return"all";if("string"==typeof e){const t={};return e.split(",").forEach(e=>{t[e.trim()]=!0}),t}return void 0!==e&&console.warn(`expandResponses must be a string but received value "${e}" of type ${typeof e}`),{}}static normalizeHideHostname(e){return!!e}static normalizeScrollYOffset(e){if("string"==typeof e&&!g(e)){const t=l(e);t||console.warn("scrollYOffset value is a selector to non-existing element. Using offset 0 by default");const r=t&&t.getBoundingClientRect().bottom||0;return()=>r}return"number"==typeof e||g(e)?()=>"number"==typeof e?e:parseFloat(e):"function"==typeof e?()=>{const t=e();return"number"!=typeof t&&console.warn(`scrollYOffset should return number but returned value "${t}" of type ${typeof t}`),t}:(void 0!==e&&console.warn("Wrong value for scrollYOffset ReDoc option: should be string, number or function"),()=>0)}static normalizeShowExtensions(e){if(void 0===e)return!1;if(""===e)return!0;if("string"!=typeof e)return e;switch(e){case"true":return!0;case"false":return!1;default:return e.split(",").map(e=>e.trim())}}static normalizeSideNavStyle(e){const t=R.SummaryOnly;if("string"!=typeof e)return t;switch(e){case t:return e;case R.PathOnly:return R.PathOnly;case R.IdOnly:return R.IdOnly;default:return t}}static normalizePayloadSampleIdx(e){return"number"==typeof e?Math.max(0,e):"string"==typeof e&&isFinite(e)?parseInt(e,10):0}static normalizeJsonSampleExpandLevel(e){return"all"===e?1/0:isNaN(Number(e))?2:Math.ceil(Number(e))}static normalizeGeneratedPayloadSamplesMaxDepth(e){return isNaN(Number(e))?10:Math.max(0,Number(e))}constructor(e,t={}){var r,n,i,o,a;const l=(e=U(U({},t),e)).theme&&e.theme.extensionsHook;var c,u;(null==(r=e.theme)?void 0:r.menu)&&!(null==(n=e.theme)?void 0:n.sidebar)&&(console.warn('Theme setting "menu" is deprecated. Rename to "sidebar"'),e.theme.sidebar=e.theme.menu),(null==(i=e.theme)?void 0:i.codeSample)&&!(null==(o=e.theme)?void 0:o.codeBlock)&&(console.warn('Theme setting "codeSample" is deprecated. Rename to "codeBlock"'),e.theme.codeBlock=e.theme.codeSample),this.theme=function(e){const t={};let r=0;const n=(i,o)=>{Object.keys(i).forEach(s=>{const a=(o?o+".":"")+s,l=i[s];"function"==typeof l?Object.defineProperty(i,s,{get(){if(!t[a]){if(r++,r>1e3)throw new Error(`Theme probably contains circular dependency at ${a}: ${l.toString()}`);t[a]=l(e)}return t[a]},enumerable:!0}):"object"==typeof l&&n(l,a)})};return n(e,""),JSON.parse(JSON.stringify(e))}(v({},s,(c=U({},e.theme),D(c,M({extensionsHook:void 0}))))),this.theme.extensionsHook=l,u=e.labels,Object.assign(I,u),this.scrollYOffset=H.normalizeScrollYOffset(e.scrollYOffset),this.hideHostname=H.normalizeHideHostname(e.hideHostname),this.expandResponses=H.normalizeExpandResponses(e.expandResponses),this.sortRequiredPropsFirst=V(e.sortRequiredPropsFirst||e.requiredPropsFirst),this.sortPropsAlphabetically=V(e.sortPropsAlphabetically),this.sortEnumValuesAlphabetically=V(e.sortEnumValuesAlphabetically),this.sortOperationsAlphabetically=V(e.sortOperationsAlphabetically),this.sortTagsAlphabetically=V(e.sortTagsAlphabetically),this.nativeScrollbars=V(e.nativeScrollbars),this.pathInMiddlePanel=V(e.pathInMiddlePanel),this.sanitize=V(e.sanitize||e.untrustedSpec),this.hideDownloadButtons=V(e.hideDownloadButtons||e.hideDownloadButton),this.downloadFileName=e.downloadFileName,this.downloadDefinitionUrl=e.downloadDefinitionUrl,this.downloadUrls=e.downloadUrls,this.disableSearch=V(e.disableSearch),this.onlyRequiredInSamples=V(e.onlyRequiredInSamples),this.showExtensions=H.normalizeShowExtensions(e.showExtensions),this.sideNavStyle=H.normalizeSideNavStyle(e.sideNavStyle),this.hideSingleRequestSampleTab=V(e.hideSingleRequestSampleTab),this.hideRequestPayloadSample=V(e.hideRequestPayloadSample),this.menuToggle=V(e.menuToggle,!0),this.jsonSamplesExpandLevel=H.normalizeJsonSampleExpandLevel(e.jsonSamplesExpandLevel||e.jsonSampleExpandLevel),this.enumSkipQuotes=V(e.enumSkipQuotes),this.hideSchemaTitles=V(e.hideSchemaTitles),this.simpleOneOfTypeLabel=V(e.simpleOneOfTypeLabel),this.payloadSampleIdx=H.normalizePayloadSampleIdx(e.payloadSampleIdx),this.expandSingleSchemaField=V(e.expandSingleSchemaField),this.schemasExpansionLevel=function(e,t=0){return"all"===e?1/0:W(e)||t}(e.schemasExpansionLevel||e.schemaExpansionLevel),this.schemaDefinitionsTagName=e.schemaDefinitionsTagName,this.showObjectSchemaExamples=V(e.showObjectSchemaExamples),this.showSecuritySchemeType=V(e.showSecuritySchemeType),this.hideSecuritySection=V(e.hideSecuritySection),this.unstable_ignoreMimeParameters=V(e.unstable_ignoreMimeParameters),this.allowedMdComponents=e.allowedMdComponents||{},this.expandDefaultServerVariables=V(e.expandDefaultServerVariables),this.maxDisplayedEnumValues=W(e.maxDisplayedEnumValues);const p=C(e.ignoreNamedSchemas)?e.ignoreNamedSchemas:null==(a=e.ignoreNamedSchemas)?void 0:a.split(",").map(e=>e.trim());this.ignoreNamedSchemas=new Set(p),this.hideSchemaPattern=V(e.hideSchemaPattern),this.generatedSamplesMaxDepth=H.normalizeGeneratedPayloadSamplesMaxDepth(e.generatedSamplesMaxDepth||e.generatedPayloadSamplesMaxDepth),this.nonce=e.nonce,this.hideFab=V(e.hideFab),this.minCharacterLengthToInitSearch=W(e.minCharacterLengthToInitSearch)||3,this.showWebhookVerb=V(e.showWebhookVerb),this.hidePropertiesPrefix=V(e.hidePropertiesPrefix,!0)}}var K=r(68796),Q=n.n(K);const{default:G,css:Y,createGlobalStyle:X,keyframes:J,ThemeProvider:Z}=K,ee={lessThan:(e,t,r)=>(...n)=>Y` + @media ${t?"print, ":""} screen and (max-width: ${t=>t.theme.breakpoints[e]}) ${r||""} { + ${Y(...n)}; + } + `,greaterThan:e=>(...t)=>Y` + @media (min-width: ${t=>t.theme.breakpoints[e]}) { + ${Y(...t)}; + } + `,between:(e,t)=>(...r)=>Y` + @media (min-width: ${t=>t.theme.breakpoints[e]}) and (max-width: ${e=>e.theme.breakpoints[t]}) { + ${Y(...r)}; + } + `};var te=G;function re(e){return t=>{if(t.theme.extensionsHook)return t.theme.extensionsHook(e,t)}}const ne=te.div` + padding: 20px; + color: red; +`;class ie extends e.Component{constructor(e){super(e),this.state={error:void 0}}componentDidCatch(e){return this.setState({error:e}),!1}render(){return this.state.error?e.createElement(ne,null,e.createElement("h1",null,"Something went wrong..."),e.createElement("small",null," ",this.state.error.message," "),e.createElement("p",null,e.createElement("details",null,e.createElement("summary",null,"Stack trace"),e.createElement("pre",null,this.state.error.stack))),e.createElement("small",null," ReDoc Version: ","2.4.0")," ",e.createElement("br",null),e.createElement("small",null," Commit: ","1243095")):e.createElement(e.Fragment,null,e.Children.only(this.props.children))}}const oe=J` + 0% { + transform: rotate(0deg); } + 100% { + transform: rotate(360deg); + } +`,se=te(t=>e.createElement("svg",{className:t.className,version:"1.1",width:"512",height:"512",viewBox:"0 0 512 512"},e.createElement("path",{d:"M275.682 147.999c0 10.864-8.837 19.661-19.682 19.661v0c-10.875 0-19.681-8.796-19.681-19.661v-96.635c0-10.885 8.806-19.661 19.681-19.661v0c10.844 0 19.682 8.776 19.682 19.661v96.635z"}),e.createElement("path",{d:"M275.682 460.615c0 10.865-8.837 19.682-19.682 19.682v0c-10.875 0-19.681-8.817-19.681-19.682v-96.604c0-10.885 8.806-19.681 19.681-19.681v0c10.844 0 19.682 8.796 19.682 19.682v96.604z"}),e.createElement("path",{d:"M147.978 236.339c10.885 0 19.681 8.755 19.681 19.641v0c0 10.885-8.796 19.702-19.681 19.702h-96.624c-10.864 0-19.661-8.817-19.661-19.702v0c0-10.885 8.796-19.641 19.661-19.641h96.624z"}),e.createElement("path",{d:"M460.615 236.339c10.865 0 19.682 8.755 19.682 19.641v0c0 10.885-8.817 19.702-19.682 19.702h-96.584c-10.885 0-19.722-8.817-19.722-19.702v0c0-10.885 8.837-19.641 19.722-19.641h96.584z"}),e.createElement("path",{d:"M193.546 165.703c7.69 7.66 7.68 20.142 0 27.822v0c-7.701 7.701-20.162 7.701-27.853 0.020l-68.311-68.322c-7.68-7.701-7.68-20.142 0-27.863v0c7.68-7.68 20.121-7.68 27.822 0l68.342 68.342z"}),e.createElement("path",{d:"M414.597 386.775c7.7 7.68 7.7 20.163 0.021 27.863v0c-7.7 7.659-20.142 7.659-27.843-0.062l-68.311-68.26c-7.68-7.7-7.68-20.204 0-27.863v0c7.68-7.7 20.163-7.7 27.842 0l68.291 68.322z"}),e.createElement("path",{d:"M165.694 318.464c7.69-7.7 20.153-7.7 27.853 0v0c7.68 7.659 7.69 20.163 0 27.863l-68.342 68.322c-7.67 7.659-20.142 7.659-27.822-0.062v0c-7.68-7.68-7.68-20.122 0-27.801l68.311-68.322z"}),e.createElement("path",{d:"M386.775 97.362c7.7-7.68 20.142-7.68 27.822 0v0c7.7 7.68 7.7 20.183 0.021 27.863l-68.322 68.311c-7.68 7.68-20.163 7.68-27.843-0.020v0c-7.68-7.68-7.68-20.162 0-27.822l68.322-68.332z"})))` + animation: 2s ${oe} linear infinite; + width: 50px; + height: 50px; + content: ''; + display: inline-block; + margin-left: -25px; + + path { + fill: ${e=>e.color}; + } +`,ae=te.div` + font-family: helvetica, sans; + width: 100%; + text-align: center; + font-size: 25px; + margin: 30px 0 20px 0; + color: ${e=>e.color}; +`;class le extends e.PureComponent{render(){return e.createElement("div",{style:{textAlign:"center"}},e.createElement(ae,{color:this.props.color},"Loading ..."),e.createElement(se,{color:this.props.color}))}}var ce=r(5556);const ue=e.createContext(new H({})),pe=ue.Provider,de=ue.Consumer;var fe=r(27813),he=r(10854),me=r(88921),ye=n(65),ge=(e,t,r)=>new Promise((n,i)=>{var o=e=>{try{a(r.next(e))}catch(e){i(e)}},s=e=>{try{a(r.throw(e))}catch(e){i(e)}},a=e=>e.done?n(e.value):Promise.resolve(e.value).then(o,s);a((r=r.apply(e,t)).next())});function be(e){return ge(this,null,function*(){const t=new me.Config({}),r={config:t,base:a?window.location.href:process.cwd()};a&&(t.resolve.http.customFetch=n.g.fetch),"object"==typeof e&&null!==e?r.doc={source:{absoluteRef:""},parsed:e}:r.ref=e;const{bundle:{parsed:i}}=yield(0,he.bundle)(r);return void 0!==i.swagger?ve(i):i})}function ve(e){return console.warn("[ReDoc Compatibility mode]: Converting OpenAPI 2.0 to OpenAPI 3.0"),new Promise((t,r)=>(0,ye.convertObj)(e,{patch:!0,warnOnly:!0,text:"{}",anchors:!0},(e,n)=>{if(e)return r(e);t(n&&n.openapi)}))}var xe=r(55156),we=r(48313),Se=r(31095);const ke=Se.parse;class Oe{static baseName(e,t=1){const r=Oe.parse(e);return r[r.length-t]}static dirName(e,t=1){const r=Oe.parse(e);return Se.compile(r.slice(0,r.length-t))}static relative(e,t){const r=Oe.parse(e);return Oe.parse(t).slice(r.length)}static parse(e){let t=e;return"#"===t.charAt(0)&&(t=t.substring(1)),ke(t)}static join(e,t){const r=Oe.parse(e).concat(t);return Se.compile(r)}static get(e,t){return Se.get(e,t)}static compile(e){return Se.compile(e)}static escape(e){return Se.escape(e)}}Se.parse=Oe.parse,Object.assign(Oe,Se);var _e=n(975),Ee=r(8769),Ae=Object.defineProperty,je=Object.defineProperties,Pe=Object.getOwnPropertyDescriptors,$e=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable,Ie=(e,t,r)=>t in e?Ae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ne=(e,t)=>{for(var r in t||(t={}))Ce.call(t,r)&&Ie(e,r,t[r]);if($e)for(var r of $e(t))Te.call(t,r)&&Ie(e,r,t[r]);return e},Re=(e,t)=>je(e,Pe(t));function Le(e){return"string"==typeof e&&/\dxx/i.test(e)}function De(e){return"default"===e||g(e)||Le(e)}function Me(e,t=!1){if("default"===e)return t?"error":"success";let r="string"==typeof e?parseInt(e,10):e;if(Le(e)&&(r*=100),r<100||r>599)throw new Error("invalid HTTP code");let n="success";return r>=300&&r<400?n="redirect":r>=400?n="error":r<200&&(n="info"),n}const ze={get:!0,post:!0,put:!0,head:!0,patch:!0,delete:!0,options:!0,$ref:!0};function Be(e){return e in ze}function Fe(e){return e.summary||e.operationId||e.description&&e.description.substring(0,50)||e.pathName||""}const qe={multipleOf:"number",maximum:"number",exclusiveMaximum:"number",minimum:"number",exclusiveMinimum:"number",maxLength:"string",minLength:"string",pattern:"string",contentEncoding:"string",contentMediaType:"string",items:"array",maxItems:"array",minItems:"array",uniqueItems:"array",maxProperties:"object",minProperties:"object",required:"object",additionalProperties:"object",unevaluatedProperties:"object",properties:"object",patternProperties:"object"};function Ue(e){if(void 0!==e.type&&!C(e.type))return e.type;const t=Object.keys(qe);for(const r of t){const t=qe[r];if(void 0!==e[r])return t}return"any"}function Ve(e,t=e.type){if(e["x-circular-ref"])return!0;if(void 0!==e.oneOf||void 0!==e.anyOf)return!1;if(e.if&&e.then||e.if&&e.else)return!1;let r=!0;const n=C(t);return("object"===t||n&&(null==t?void 0:t.includes("object")))&&(r=void 0!==e.properties?0===Object.keys(e.properties).length:void 0===e.additionalProperties&&void 0===e.unevaluatedProperties&&void 0===e.patternProperties),!C(e.items)&&!C(e.prefixItems)&&(void 0!==e.items&&!T(e.items)&&("array"===t||n&&(null==t?void 0:t.includes("array")))&&(r=Ve(e.items,e.items.type)),r)}function We(e){return-1!==e.search(/json/i)}function He(e){return"application/x-www-form-urlencoded"===e}function Ke(e,t,r){return C(e)?e.map(e=>e.toString()).join(r):"object"==typeof e?Object.keys(e).map(t=>`${t}${r}${e[t]}`).join(r):t+"="+e.toString()}function Qe(e,t){return C(e)?(console.warn("deepObject style cannot be used with array value:"+e.toString()),""):"object"==typeof e?Object.keys(e).map(r=>`${t}[${r}]=${e[r]}`).join("&"):(console.warn("deepObject style cannot be used with non-object value:"+e.toString()),"")}function Ge(e,t,r){const n="__redoc_param_name__",i=t?"*":"";return Ee.parse(`{?${n}${i}}`).expand({[n]:r}).substring(1).replace(/__redoc_param_name__/g,e)}function Ye(e,t={}){if(C(e))throw new Error("Payload must have fields: "+e.toString());return Object.keys(e).map(r=>{const n=e[r],{style:i="form",explode:o=!0}=t[r]||{};switch(i){case"form":return Ge(r,o,n);case"spaceDelimited":return Ke(n,r,"%20");case"pipeDelimited":return Ke(n,r,"|");case"deepObject":return Qe(n,r);default:return console.warn("Incorrect or unsupported encoding style: "+i),""}}).join("&")}function Xe(e,t){return We(t)?JSON.stringify(e):(console.warn(`Parameter serialization as ${t} is not supported`),"")}function Je(e,t){const{name:r,style:n,explode:i=!1,serializationMime:o}=e;if(o)switch(e.in){case"path":case"header":return Xe(t,o);case"cookie":case"query":return`${r}=${Xe(t,o)}`;default:return console.warn("Unexpected parameter location: "+e.in),""}if(!n)return console.warn(`Missing style attribute or content for parameter ${r}`),"";switch(e.in){case"path":return function(e,t,r,n){const i=r?"*":"";let o="";"label"===t?o=".":"matrix"===t&&(o=";");const s="__redoc_param_name__";return Ee.parse(`{${o}${s}${i}}`).expand({[s]:n}).replace(/__redoc_param_name__/g,e)}(r,n,i,t);case"query":return function(e,t,r,n){switch(t){case"form":return Ge(e,r,n);case"spaceDelimited":return C(n)?r?Ge(e,r,n):`${e}=${n.join("%20")}`:(console.warn("The style spaceDelimited is only applicable to arrays"),"");case"pipeDelimited":return C(n)?r?Ge(e,r,n):`${e}=${n.join("|")}`:(console.warn("The style pipeDelimited is only applicable to arrays"),"");case"deepObject":return!r||C(n)||"object"!=typeof n?(console.warn("The style deepObject is only applicable for objects with explode=true"),""):Qe(n,e);default:return console.warn("Unexpected style for query: "+t),""}}(r,n,i,t);case"header":return function(e,t,r){if("simple"===e){const e=t?"*":"",n="__redoc_param_name__",i=Ee.parse(`{${n}${e}}`);return decodeURIComponent(i.expand({[n]:r}))}return console.warn("Unexpected style for header: "+e),""}(n,i,t);case"cookie":return function(e,t,r,n){return"form"===t?Ge(e,r,n):(console.warn("Unexpected style for cookie: "+t),"")}(r,n,i,t);default:return console.warn("Unexpected parameter location: "+e.in),""}}function Ze(e,t){return e.in?decodeURIComponent(Je(e,t)):"object"==typeof t?t:String(t)}function et(e){return-1!==e.search(/xml/i)?"xml":-1!==e.search(/csv/i)?"csv":-1!==e.search(/plain/i)?"tex":"clike"}const tt=/^#\/components\/(schemas|pathItems)\/([^/]+)$/;function rt(e){return tt.test(e||"")}function nt(e){var t;const[r]=(null==(t=null==e?void 0:e.match(tt))?void 0:t.reverse())||[];return r}function it(e,t,r){let n;return void 0!==t&&void 0!==r?n=t===r?`= ${t} ${e}`:`[ ${t} .. ${r} ] ${e}`:void 0!==r?n=`<= ${r} ${e}`:void 0!==t&&(n=1===t?"non-empty":`>= ${t} ${e}`),n}function ot(e){var t,r;const n="number"==typeof e.exclusiveMinimum?Math.min(e.exclusiveMinimum,null!=(t=e.minimum)?t:1/0):e.minimum,i="number"==typeof e.exclusiveMaximum?Math.max(e.exclusiveMaximum,null!=(r=e.maximum)?r:-1/0):e.maximum,o="number"==typeof e.exclusiveMinimum||e.exclusiveMinimum,s="number"==typeof e.exclusiveMaximum||e.exclusiveMaximum;return void 0!==n&&void 0!==i?`${o?"( ":"[ "}${n} .. ${i}${s?" )":" ]"}`:void 0!==i?`${s?"< ":"<= "}${i}`:void 0!==n?`${o?"> ":">= "}${n}`:void 0}function st(e){const t=[],r=it("characters",e.minLength,e.maxLength);void 0!==r&&t.push(r);const n=it("items",e.minItems,e.maxItems);void 0!==n&&t.push(n);const i=it("properties",e.minProperties,e.maxProperties);void 0!==i&&t.push(i);const o=function(e){if(void 0===e)return;const t=e.toString(10);return/^0\.0*1$/.test(t)?`decimal places <= ${t.split(".")[1].length}`:`multiple of ${t}`}(e.multipleOf);void 0!==o&&t.push(o);const s=ot(e);return void 0!==s&&t.push(s),e.uniqueItems&&t.push("unique"),t}function at(e,t=[]){const r=[],n=[],i=[];return e.forEach(e=>{e.required?t.includes(e.name)?n.push(e):i.push(e):r.push(e)}),n.sort((e,r)=>t.indexOf(e.name)-t.indexOf(r.name)),[...n,...i,...r]}function lt(e,t){return[...e].sort((e,r)=>e[t].localeCompare(r[t]))}function ct(e,t=[],r=[]){const n={};return r.forEach(t=>{({resolved:t}=e.deref(t)),n[t.name+"_"+t.in]=!0}),(t=t.filter(t=>(({resolved:t}=e.deref(t)),!n[t.name+"_"+t.in]))).concat(r)}function ut(e){const t={};return Object.keys(e).forEach(r=>{const n=e[r],i=r.split(";")[0].trim();t[i]?t[i]=Ne(Ne({},t[i]),n):t[i]=n}),t}function pt(e,t={}){return e.replace(/(?:{)([\w-.]+)(?:})/g,(e,r)=>t[r]&&t[r].default||e)}function dt(e,t){const r=void 0===e?A((()=>{if(!a)return"";const e=window.location.href;return e.endsWith(".html")?(0,_e.dirname)(e):e})()):(0,_e.dirname)(e);return 0===t.length&&(t=[{url:"/"}]),t.map(e=>{return Re(Ne({},e),{url:(t=e.url,O(r,t)),description:e.description||""});var t})}const ft="SecurityDefinitions",ht="security-definitions",mt="SchemaDefinition";let yt="section/Authentication/";function gt(e){yt=e}const bt=e=>({delete:"del",options:"opts"}[e]||e);function vt(e){return e in{"x-circular-ref":!0,"x-parentRefs":!0,"x-refsStack":!0,"x-code-samples":!0,"x-codeSamples":!0,"x-displayName":!0,"x-examples":!0,"x-enumDescriptions":!0,"x-logo":!0,"x-nullable":!0,"x-servers":!0,"x-tagGroups":!0,"x-traitTag":!0,"x-badges":!0,"x-additionalPropertiesName":!0,"x-explicitMappingOnly":!0}}function xt(e,t){return Object.keys(e).filter(e=>!0===t?e.startsWith("x-")&&!vt(e):e.startsWith("x-")&&t.indexOf(e)>-1).reduce((t,r)=>(t[r]=e[r],t),{})}function wt(e){return e.split(" or ").map(e=>e.replace(/^(string|object|number|integer|array|boolean)s?( ?.*)/,"$1s$2")).join(" or ")}function St(e){let t=e.content;const r=e["x-examples"],n=e["x-example"];if(r){t=Ne({},t);for(const e of Object.keys(r)){const n=r[e];t[e]=Re(Ne({},t[e]),{examples:n})}}else if(n){t=Ne({},t);for(const e of Object.keys(n)){const r=n[e];t[e]=Re(Ne({},t[e]),{example:r})}}return t}var kt=r(28848);r(57022),r(50271),r(75624),r(44511),r(72415),r(5651),r(86378),r(24784),r(96976),r(80064),r(19700),r(64312),r(20596),r(32821),r(43554),r(52342),r(84113),r(41648),r(64252),r(96966),r(54793),r(60083),r(62630);const Ot="clike";function _t(e){return{json:"js","c++":"cpp","c#":"csharp","objective-c":"objectivec",shell:"bash",viml:"vim"}[e]||Ot}function Et(e,t=Ot){t=t.toLowerCase();let r=kt.languages[t];return r||(r=kt.languages[_t(t)]),kt.highlight(e.toString(),r,t)}function At(e){return(t,r,n)=>{n.value=function(e,t){let r,n,i,o=null,s=0;const a=()=>{s=(new Date).getTime(),o=null,i=e.apply(r,n),o||(r=n=null)};return function(){const l=(new Date).getTime(),c=t-(l-s);return r=this,n=arguments,c<=0||c>t?(o&&(clearTimeout(o),o=null),s=l,i=e.apply(r,n),o||(r=n=null)):o||(o=setTimeout(a,c)),i}}(n.value,e)}}function jt(e){}function Pt(e){}kt.languages.insertBefore("javascript","string",{"property string":{pattern:/([{,]\s*)"(?:\\.|[^\\"\r\n])*"(?=\s*:)/i,lookbehind:!0}},void 0),kt.languages.insertBefore("javascript","punctuation",{property:{pattern:/([{,]\s*)[a-z]\w*(?=\s*:)/i,lookbehind:!0}},void 0);var $t=Object.defineProperty,Ct=Object.defineProperties,Tt=Object.getOwnPropertyDescriptors,It=Object.getOwnPropertySymbols,Nt=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable,Lt=(e,t,r)=>t in e?$t(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Dt=(e,t)=>{for(var r in t||(t={}))Nt.call(t,r)&&Lt(e,r,t[r]);if(It)for(var r of It(t))Rt.call(t,r)&&Lt(e,r,t[r]);return e},Mt=(e,t)=>Ct(e,Tt(t));const zt={};function Bt(e,t,r){if("function"==typeof r.value)return function(e,t,r){if(!r.value||r.value.length>0)throw new Error("@memoize decorator can only be applied to methods of zero arguments");const n=`_memoized_${t}`,i=r.value;return e[n]=zt,Mt(Dt({},r),{value(){return this[n]===zt&&(this[n]=i.call(this)),this[n]}})}(e,t,r);if("function"==typeof r.get)return function(e,t,r){const n=`_memoized_${t}`,i=r.get;return e[n]=zt,Mt(Dt({},r),{get(){return this[n]===zt&&(this[n]=i.call(this)),this[n]}})}(e,t,r);throw new Error("@memoize decorator can be applied to methods or getters, got "+String(r.value)+" instead")}function Ft(e){let t=1;return"-"===e[0]&&(t=-1,e=e.substr(1)),(r,n)=>-1==t?n[e].localeCompare(r[e]):r[e].localeCompare(n[e])}var qt=Object.defineProperty,Ut=Object.getOwnPropertyDescriptor;const Vt="hashchange";class Wt{constructor(){this.emit=()=>{this._emiter.emit(Vt,this.currentId)},this._emiter=new we.EventEmitter,this.bind()}get currentId(){return a?decodeURIComponent(window.location.hash.substring(1)):""}linkForId(e){return e?"#"+e:""}subscribe(e){const t=this._emiter.addListener(Vt,e);return()=>t.removeListener(Vt,e)}bind(){a&&window.addEventListener("hashchange",this.emit,!1)}dispose(){a&&window.removeEventListener("hashchange",this.emit)}replace(e,t=!1){a&&null!=e&&e!==this.currentId&&(t?window.history.replaceState(null,"",window.location.href.split("#")[0]+this.linkForId(e)):(window.history.pushState(null,"",window.location.href.split("#")[0]+this.linkForId(e)),this.emit()))}}((e,t,r)=>{for(var n,i=Ut(t,r),o=e.length-1;o>=0;o--)(n=e[o])&&(i=n(t,r,i)||i);i&&qt(t,r,i)})([xe.bind,xe.debounce],Wt.prototype,"replace");const Ht=new Wt;var Kt=r(689);class Qt{constructor(){this.map=new Map,this.prevTerm=""}add(e){this.map.set(e,new Kt(e))}delete(e){this.map.delete(e)}addOnly(e){this.map.forEach((t,r)=>{-1===e.indexOf(r)&&(t.unmark(),this.map.delete(r))});for(const t of e)this.map.has(t)||this.map.set(t,new Kt(t))}clearAll(){this.unmark(),this.map.clear()}mark(e){(e||this.prevTerm)&&(this.map.forEach(t=>{t.unmark(),t.mark(e||this.prevTerm)}),this.prevTerm=e||this.prevTerm)}unmark(){this.map.forEach(e=>e.unmark()),this.prevTerm=""}}let Gt={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};const Yt=/[&<>"']/,Xt=new RegExp(Yt.source,"g"),Jt=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Zt=new RegExp(Jt.source,"g"),er={"&":"&","<":"<",">":">",'"':""","'":"'"},tr=e=>er[e];function rr(e,t){if(t){if(Yt.test(e))return e.replace(Xt,tr)}else if(Jt.test(e))return e.replace(Zt,tr);return e}const nr=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function ir(e){return e.replace(nr,(e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):"")}const or=/(^|[^\[])\^/g;function sr(e,t){e="string"==typeof e?e:e.source,t=t||"";const r={replace:(t,n)=>(n=(n=n.source||n).replace(or,"$1"),e=e.replace(t,n),r),getRegex:()=>new RegExp(e,t)};return r}const ar=/[^\w:]/g,lr=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function cr(e,t,r){if(e){let t;try{t=decodeURIComponent(ir(r)).replace(ar,"").toLowerCase()}catch(e){return null}if(0===t.indexOf("javascript:")||0===t.indexOf("vbscript:")||0===t.indexOf("data:"))return null}t&&!lr.test(r)&&(r=function(e,t){ur[" "+e]||(pr.test(e)?ur[" "+e]=e+"/":ur[" "+e]=yr(e,"/",!0));const r=-1===(e=ur[" "+e]).indexOf(":");return"//"===t.substring(0,2)?r?t:e.replace(dr,"$1")+t:"/"===t.charAt(0)?r?t:e.replace(fr,"$1")+t:e+t}(t,r));try{r=encodeURI(r).replace(/%25/g,"%")}catch(e){return null}return r}const ur={},pr=/^[^:]+:\/*[^/]*$/,dr=/^([^:]+:)[\s\S]*$/,fr=/^([^:]+:\/*[^/]*)[\s\S]*$/,hr={exec:function(){}};function mr(e,t){const r=e.replace(/\|/g,(e,t,r)=>{let n=!1,i=t;for(;--i>=0&&"\\"===r[i];)n=!n;return n?"|":" |"}).split(/ \|/);let n=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>t)r.splice(t);else for(;r.length1;)1&t&&(r+=e),t>>=1,e+=e;return r+e}function br(e,t,r,n){const i=t.href,o=t.title?rr(t.title):null,s=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){n.state.inLink=!0;const e={type:"link",raw:r,href:i,title:o,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,e}return{type:"image",raw:r,href:i,title:o,text:rr(s)}}class vr{constructor(e){this.options=e||Gt}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:yr(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],r=function(e,t){const r=e.match(/^(\s+)(?:```)/);if(null===r)return t;const n=r[1];return t.split("\n").map(e=>{const t=e.match(/^\s+/);if(null===t)return e;const[r]=t;return r.length>=n.length?e.slice(n.length):e}).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:r}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=yr(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=t[0].replace(/^ *>[ \t]?/gm,""),r=this.lexer.state.top;this.lexer.state.top=!0;const n=this.lexer.blockTokens(e);return this.lexer.state.top=r,{type:"blockquote",raw:t[0],tokens:n,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r,n,i,o,s,a,l,c,u,p,d,f,h=t[1].trim();const m=h.length>1,y={type:"list",raw:"",ordered:m,start:m?+h.slice(0,-1):"",loose:!1,items:[]};h=m?`\\d{1,9}\\${h.slice(-1)}`:`\\${h}`,this.options.pedantic&&(h=m?h:"[*+-]");const g=new RegExp(`^( {0,3}${h})((?:[\t ][^\\n]*)?(?:\\n|$))`);for(;e&&(f=!1,t=g.exec(e))&&!this.rules.block.hr.test(e);){if(r=t[0],e=e.substring(r.length),c=t[2].split("\n",1)[0].replace(/^\t+/,e=>" ".repeat(3*e.length)),u=e.split("\n",1)[0],this.options.pedantic?(o=2,d=c.trimLeft()):(o=t[2].search(/[^ ]/),o=o>4?1:o,d=c.slice(o),o+=t[1].length),a=!1,!c&&/^ *$/.test(u)&&(r+=u+"\n",e=e.substring(u.length+1),f=!0),!f){const t=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,o-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),i=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:\`\`\`|~~~)`),s=new RegExp(`^ {0,${Math.min(3,o-1)}}#`);for(;e&&(p=e.split("\n",1)[0],u=p,this.options.pedantic&&(u=u.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!i.test(u))&&!s.test(u)&&!t.test(u)&&!n.test(e);){if(u.search(/[^ ]/)>=o||!u.trim())d+="\n"+u.slice(o);else{if(a)break;if(c.search(/[^ ]/)>=4)break;if(i.test(c))break;if(s.test(c))break;if(n.test(c))break;d+="\n"+u}a||u.trim()||(a=!0),r+=p+"\n",e=e.substring(p.length+1),c=u.slice(o)}}y.loose||(l?y.loose=!0:/\n *\n *$/.test(r)&&(l=!0)),this.options.gfm&&(n=/^\[[ xX]\] /.exec(d),n&&(i="[ ] "!==n[0],d=d.replace(/^\[[ xX]\] +/,""))),y.items.push({type:"list_item",raw:r,task:!!n,checked:i,loose:!1,text:d}),y.raw+=r}y.items[y.items.length-1].raw=r.trimRight(),y.items[y.items.length-1].text=d.trimRight(),y.raw=y.raw.trimRight();const b=y.items.length;for(s=0;s"space"===e.type),t=e.length>0&&e.some(e=>/\n.*\n/.test(e.raw));y.loose=t}if(y.loose)for(s=0;s$/,"$1").replace(this.rules.inline._escapes,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline._escapes,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:r,title:n}}}table(e){const t=this.rules.block.table.exec(e);if(t){const e={type:"table",header:mr(t[1]).map(e=>({text:e})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(e.header.length===e.align.length){e.raw=t[0];let r,n,i,o,s=e.align.length;for(r=0;r({text:e}));for(s=e.header.length,n=0;n/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):rr(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=yr(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;const r=e.length;let n=0,i=0;for(;i-1){const r=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,r).trim(),t[3]=""}}let r=t[2],n="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);e&&(r=e[1],n=e[3])}else n=t[3]?t[3].slice(1,-1):"";return r=r.trim(),/^$/.test(e)?r.slice(1):r.slice(1,-1)),br(t,{href:r?r.replace(this.rules.inline._escapes,"$1"):r,title:n?n.replace(this.rules.inline._escapes,"$1"):n},t[0],this.lexer)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let e=(r[2]||r[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e){const e=r[0].charAt(0);return{type:"text",raw:e,text:e}}return br(r,e,r[0],this.lexer)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrong.lDelim.exec(e);if(!n)return;if(n[3]&&r.match(/[\p{L}\p{N}]/u))return;const i=n[1]||n[2]||"";if(!i||i&&(""===r||this.rules.inline.punctuation.exec(r))){const r=n[0].length-1;let i,o,s=r,a=0;const l="*"===n[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+r);null!=(n=l.exec(t));){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i)continue;if(o=i.length,n[3]||n[4]){s+=o;continue}if((n[5]||n[6])&&r%3&&!((r+o)%3)){a+=o;continue}if(s-=o,s>0)continue;o=Math.min(o,o+s+a);const t=e.slice(0,r+n.index+(n[0].length-i.length)+o);if(Math.min(r,o)%2){const e=t.slice(1,-1);return{type:"em",raw:t,text:e,tokens:this.lexer.inlineTokens(e)}}const l=t.slice(2,-2);return{type:"strong",raw:t,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const r=/[^ ]/.test(e),n=/^ /.test(e)&&/ $/.test(e);return r&&n&&(e=e.substring(1,e.length-1)),e=rr(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e,t){const r=this.rules.inline.autolink.exec(e);if(r){let e,n;return"@"===r[2]?(e=rr(this.options.mangle?t(r[1]):r[1]),n="mailto:"+e):(e=rr(r[1]),n=e),{type:"link",raw:r[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let r;if(r=this.rules.inline.url.exec(e)){let e,n;if("@"===r[2])e=rr(this.options.mangle?t(r[0]):r[0]),n="mailto:"+e;else{let t;do{t=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0]}while(t!==r[0]);e=rr(r[0]),n="www."===r[1]?"http://"+r[0]:r[0]}return{type:"link",raw:r[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t){const r=this.rules.inline.text.exec(e);if(r){let e;return e=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):rr(r[0]):r[0]:rr(this.options.smartypants?t(r[0]):r[0]),{type:"text",raw:r[0],text:e}}}}const xr={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:hr,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};xr.def=sr(xr.def).replace("label",xr._label).replace("title",xr._title).getRegex(),xr.bullet=/(?:[*+-]|\d{1,9}[.)])/,xr.listItemStart=sr(/^( *)(bull) */).replace("bull",xr.bullet).getRegex(),xr.list=sr(xr.list).replace(/bull/g,xr.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+xr.def.source+")").getRegex(),xr._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",xr._comment=/|$)/,xr.html=sr(xr.html,"i").replace("comment",xr._comment).replace("tag",xr._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),xr.paragraph=sr(xr._paragraph).replace("hr",xr.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",xr._tag).getRegex(),xr.blockquote=sr(xr.blockquote).replace("paragraph",xr.paragraph).getRegex(),xr.normal={...xr},xr.gfm={...xr.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"},xr.gfm.table=sr(xr.gfm.table).replace("hr",xr.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",xr._tag).getRegex(),xr.gfm.paragraph=sr(xr._paragraph).replace("hr",xr.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",xr.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",xr._tag).getRegex(),xr.pedantic={...xr.normal,html:sr("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",xr._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+|$)/,fences:hr,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:sr(xr.normal._paragraph).replace("hr",xr.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",xr.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const wr={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:hr,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:hr,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(r="x"+r.toString(16)),n+="&#"+r+";";return n}wr._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",wr.punctuation=sr(wr.punctuation).replace(/punctuation/g,wr._punctuation).getRegex(),wr.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,wr.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,wr._comment=sr(xr._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),wr.emStrong.lDelim=sr(wr.emStrong.lDelim).replace(/punct/g,wr._punctuation).getRegex(),wr.emStrong.rDelimAst=sr(wr.emStrong.rDelimAst,"g").replace(/punct/g,wr._punctuation).getRegex(),wr.emStrong.rDelimUnd=sr(wr.emStrong.rDelimUnd,"g").replace(/punct/g,wr._punctuation).getRegex(),wr._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,wr._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,wr._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])?)+(?![-_])/,wr.autolink=sr(wr.autolink).replace("scheme",wr._scheme).replace("email",wr._email).getRegex(),wr._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,wr.tag=sr(wr.tag).replace("comment",wr._comment).replace("attribute",wr._attribute).getRegex(),wr._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,wr._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,wr._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,wr.link=sr(wr.link).replace("label",wr._label).replace("href",wr._href).replace("title",wr._title).getRegex(),wr.reflink=sr(wr.reflink).replace("label",wr._label).replace("ref",xr._label).getRegex(),wr.nolink=sr(wr.nolink).replace("ref",xr._label).getRegex(),wr.reflinkSearch=sr(wr.reflinkSearch,"g").replace("reflink",wr.reflink).replace("nolink",wr.nolink).getRegex(),wr.normal={...wr},wr.pedantic={...wr.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:sr(/^!?\[(label)\]\((.*?)\)/).replace("label",wr._label).getRegex(),reflink:sr(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",wr._label).getRegex()},wr.gfm={...wr.normal,escape:sr(wr.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~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\t+" ".repeat(r.length));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0))))if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),1===r.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(r);else if(r=this.tokenizer.code(e))e=e.substring(r.raw.length),n=t[t.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?t.push(r):(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.list(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.html(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.def(e))e=e.substring(r.raw.length),n=t[t.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title}):(n.raw+="\n"+r.raw,n.text+="\n"+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(r=this.tokenizer.table(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.lheading(e))e=e.substring(r.raw.length),t.push(r);else{if(i=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const r=e.slice(1);let n;this.options.extensions.startBlock.forEach(function(e){n=e.call({lexer:this},r),"number"==typeof n&&n>=0&&(t=Math.min(t,n))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i)))n=t[t.length-1],o&&"paragraph"===n.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(r),o=i.length!==e.length,e=e.substring(r.raw.length);else if(r=this.tokenizer.text(e))e=e.substring(r.raw.length),n=t[t.length-1],n&&"text"===n.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(r);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let r,n,i,o,s,a,l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,o.index)+"["+gr("a",o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,o.index)+"["+gr("a",o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.escapedEmSt.exec(l));)l=l.slice(0,o.index+o[0].length-2)+"++"+l.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(s||(a=""),s=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0))))if(r=this.tokenizer.escape(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.tag(e))e=e.substring(r.raw.length),n=t[t.length-1],n&&"text"===r.type&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);else if(r=this.tokenizer.link(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(r.raw.length),n=t[t.length-1],n&&"text"===r.type&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);else if(r=this.tokenizer.emStrong(e,l,a))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.codespan(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.br(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.del(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.autolink(e,kr))e=e.substring(r.raw.length),t.push(r);else if(this.state.inLink||!(r=this.tokenizer.url(e,kr))){if(i=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const r=e.slice(1);let n;this.options.extensions.startInline.forEach(function(e){n=e.call({lexer:this},r),"number"==typeof n&&n>=0&&(t=Math.min(t,n))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i,Sr))e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(a=r.raw.slice(-1)),s=!0,n=t[t.length-1],n&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(r.raw.length),t.push(r);return t}}class _r{constructor(e){this.options=e||Gt}code(e,t,r){const n=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,n);null!=t&&t!==e&&(r=!0,e=t)}return e=e.replace(/\n$/,"")+"\n",n?'
    '+(r?e:rr(e,!0))+"
    \n":"
    "+(r?e:rr(e,!0))+"
    \n"}blockquote(e){return`
    \n${e}
    \n`}html(e){return e}heading(e,t,r,n){return this.options.headerIds?`${e}\n`:`${e}\n`}hr(){return this.options.xhtml?"
    \n":"
    \n"}list(e,t,r){const n=t?"ol":"ul";return"<"+n+(t&&1!==r?' start="'+r+'"':"")+">\n"+e+"\n"}listitem(e){return`
  • ${e}
  • \n`}checkbox(e){return" "}paragraph(e){return`

    ${e}

    \n`}table(e,t){return t&&(t=`${t}`),"\n\n"+e+"\n"+t+"
    \n"}tablerow(e){return`\n${e}\n`}tablecell(e,t){const r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`\n`}strong(e){return`${e}`}em(e){return`${e}`}codespan(e){return`${e}`}br(){return this.options.xhtml?"
    ":"
    "}del(e){return`${e}`}link(e,t,r){if(null===(e=cr(this.options.sanitize,this.options.baseUrl,e)))return r;let n='
    ",n}image(e,t,r){if(null===(e=cr(this.options.sanitize,this.options.baseUrl,e)))return r;let n=`${r}":">",n}text(e){return e}}class Er{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,r){return""+r}image(e,t,r){return""+r}br(){return""}}class Ar{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let r=e,n=0;if(this.seen.hasOwnProperty(r)){n=this.seen[e];do{n++,r=e+"-"+n}while(this.seen.hasOwnProperty(r))}return t||(this.seen[e]=n,this.seen[r]=0),r}slug(e,t={}){const r=this.serialize(e);return this.getNextSafeSlug(r,t.dryrun)}}class jr{constructor(e){this.options=e||Gt,this.options.renderer=this.options.renderer||new _r,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Er,this.slugger=new Ar}static parse(e,t){return new jr(t).parse(e)}static parseInline(e,t){return new jr(t).parseInline(e)}parse(e,t=!0){let r,n,i,o,s,a,l,c,u,p,d,f,h,m,y,g,b,v,x,w="";const S=e.length;for(r=0;r0&&"paragraph"===y.tokens[0].type?(y.tokens[0].text=v+" "+y.tokens[0].text,y.tokens[0].tokens&&y.tokens[0].tokens.length>0&&"text"===y.tokens[0].tokens[0].type&&(y.tokens[0].tokens[0].text=v+" "+y.tokens[0].tokens[0].text)):y.tokens.unshift({type:"text",text:v}):m+=v),m+=this.parse(y.tokens,h),u+=this.renderer.listitem(m,b,g);w+=this.renderer.list(u,d,f);continue;case"html":w+=this.renderer.html(p.text);continue;case"paragraph":w+=this.renderer.paragraph(this.parseInline(p.tokens));continue;case"text":for(u=p.tokens?this.parseInline(p.tokens):p.text;r+1{"function"==typeof n&&(i=n,n=null);const o={...n},s=function(e,t,r){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="

    An error occurred:

    "+rr(n.message+"",!0)+"
    ";return t?Promise.resolve(e):r?void r(null,e):e}if(t)return Promise.reject(n);if(!r)throw n;r(n)}}((n={...Cr.defaults,...o}).silent,n.async,i);if(null==r)return s(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof r)return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(function(e){e&&e.sanitize&&!e.silent&&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.hooks&&(n.hooks.options=n),i){const o=n.highlight;let a;try{n.hooks&&(r=n.hooks.preprocess(r)),a=e(r,n)}catch(e){return s(e)}const l=function(e){let r;if(!e)try{n.walkTokens&&Cr.walkTokens(a,n.walkTokens),r=t(a,n),n.hooks&&(r=n.hooks.postprocess(r))}catch(t){e=t}return n.highlight=o,e?s(e):i(null,r)};if(!o||o.length<3)return l();if(delete n.highlight,!a.length)return l();let c=0;return Cr.walkTokens(a,function(e){"code"===e.type&&(c++,setTimeout(()=>{o(e.text,e.lang,function(t,r){if(t)return l(t);null!=r&&r!==e.text&&(e.text=r,e.escaped=!0),c--,0===c&&l()})},0))}),void(0===c&&l())}if(n.async)return Promise.resolve(n.hooks?n.hooks.preprocess(r):r).then(t=>e(t,n)).then(e=>n.walkTokens?Promise.all(Cr.walkTokens(e,n.walkTokens)).then(()=>e):e).then(e=>t(e,n)).then(e=>n.hooks?n.hooks.postprocess(e):e).catch(s);try{n.hooks&&(r=n.hooks.preprocess(r));const i=e(r,n);n.walkTokens&&Cr.walkTokens(i,n.walkTokens);let o=t(i,n);return n.hooks&&(o=n.hooks.postprocess(o)),o}catch(e){return s(e)}}}function Cr(e,t,r){return $r(Or.lex,jr.parse)(e,t,r)}Cr.options=Cr.setOptions=function(e){var t;return Cr.defaults={...Cr.defaults,...e},t=Cr.defaults,Gt=t,Cr},Cr.getDefaults=function(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}},Cr.defaults=Gt,Cr.use=function(...e){const t=Cr.defaults.extensions||{renderers:{},childTokens:{}};e.forEach(e=>{const r={...e};if(r.async=Cr.defaults.async||r.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw new Error("extension name required");if(e.renderer){const r=t.renderers[e.name];t.renderers[e.name]=r?function(...t){let n=e.renderer.apply(this,t);return!1===n&&(n=r.apply(this,t)),n}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");t[e.level]?t[e.level].unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),r.extensions=t),e.renderer){const t=Cr.defaults.renderer||new _r;for(const r in e.renderer){const n=t[r];t[r]=(...i)=>{let o=e.renderer[r].apply(t,i);return!1===o&&(o=n.apply(t,i)),o}}r.renderer=t}if(e.tokenizer){const t=Cr.defaults.tokenizer||new vr;for(const r in e.tokenizer){const n=t[r];t[r]=(...i)=>{let o=e.tokenizer[r].apply(t,i);return!1===o&&(o=n.apply(t,i)),o}}r.tokenizer=t}if(e.hooks){const t=Cr.defaults.hooks||new Pr;for(const r in e.hooks){const n=t[r];Pr.passThroughHooks.has(r)?t[r]=i=>{if(Cr.defaults.async)return Promise.resolve(e.hooks[r].call(t,i)).then(e=>n.call(t,e));const o=e.hooks[r].call(t,i);return n.call(t,o)}:t[r]=(...i)=>{let o=e.hooks[r].apply(t,i);return!1===o&&(o=n.apply(t,i)),o}}r.hooks=t}if(e.walkTokens){const t=Cr.defaults.walkTokens;r.walkTokens=function(r){let n=[];return n.push(e.walkTokens.call(this,r)),t&&(n=n.concat(t.call(this,r))),n}}Cr.setOptions(r)})},Cr.walkTokens=function(e,t){let r=[];for(const n of e)switch(r=r.concat(t.call(Cr,n)),n.type){case"table":for(const e of n.header)r=r.concat(Cr.walkTokens(e.tokens,t));for(const e of n.rows)for(const n of e)r=r.concat(Cr.walkTokens(n.tokens,t));break;case"list":r=r.concat(Cr.walkTokens(n.items,t));break;default:Cr.defaults.extensions&&Cr.defaults.extensions.childTokens&&Cr.defaults.extensions.childTokens[n.type]?Cr.defaults.extensions.childTokens[n.type].forEach(function(e){r=r.concat(Cr.walkTokens(n[e],t))}):n.tokens&&(r=r.concat(Cr.walkTokens(n.tokens,t)))}return r},Cr.parseInline=$r(Or.lexInline,jr.parseInline),Cr.Parser=jr,Cr.parser=jr.parse,Cr.Renderer=_r,Cr.TextRenderer=Er,Cr.Lexer=Or,Cr.lexer=Or.lex,Cr.Tokenizer=vr,Cr.Slugger=Ar,Cr.Hooks=Pr,Cr.parse=Cr,Cr.options,Cr.setOptions,Cr.use,Cr.walkTokens,Cr.parseInline,jr.parse,Or.lex;var Tr=Object.defineProperty,Ir=Object.defineProperties,Nr=Object.getOwnPropertyDescriptors,Rr=Object.getOwnPropertySymbols,Lr=Object.prototype.hasOwnProperty,Dr=Object.prototype.propertyIsEnumerable,Mr=(e,t,r)=>t in e?Tr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,zr=(e,t)=>{for(var r in t||(t={}))Lr.call(t,r)&&Mr(e,r,t[r]);if(Rr)for(var r of Rr(t))Dr.call(t,r)&&Mr(e,r,t[r]);return e};const Br=new Cr.Renderer;Cr.setOptions({renderer:Br,highlight:(e,t)=>Et(e,t)});const Fr="^ {0,3}\x3c!-- ReDoc-Inject:\\s+?<({component}).*?/?>\\s+?--\x3e\\s*$",qr="(?:^ {0,3}<({component})([\\s\\S]*?)>([\\s\\S]*?)|^ {0,3}<({component})([\\s\\S]*?)(?:/>|\\n{2,}))",Ur="(?:"+Fr+"|"+qr+")";function Vr(e){return`\x3c!-- ReDoc-Inject: <${e}> --\x3e`}class Wr{constructor(e,t){this.options=e,this.parentId=t,this.headings=[],this.headingRule=(e,t,r,n)=>(1===t?this.currentTopHeading=this.saveHeading(e,t):2===t&&this.saveHeading(e,t,this.currentTopHeading&&this.currentTopHeading.items,this.currentTopHeading&&this.currentTopHeading.id),this.originalHeadingRule(e,t,r,n)),this.parentId=t,this.parser=new Cr.Parser,this.headingEnhanceRenderer=new Cr.Renderer,this.originalHeadingRule=this.headingEnhanceRenderer.heading.bind(this.headingEnhanceRenderer),this.headingEnhanceRenderer.heading=this.headingRule}static containsComponent(e,t){return new RegExp(Ur.replace(/{component}/g,t),"gmi").test(e)}static getTextBeforeHading(e,t){const r=e.search(new RegExp(`^##?\\s+${t}`,"m"));return r>-1?e.substring(0,r):e}saveHeading(e,t,r=this.headings,n){e=$(e);const i={id:n?`${n}/${S(e)}`:`${this.parentId||"section"}/${S(e)}`,name:e,level:t,items:[]};return r.push(i),i}flattenHeadings(e){if(void 0===e)return[];const t=[];for(const r of e)t.push(r),t.push(...this.flattenHeadings(r.items));return t}attachHeadingsDescriptions(e){const t=e=>new RegExp(`##?\\s+${e.name.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}s*(\n|\r\n|$|s*)`),r=this.flattenHeadings(this.headings);if(r.length<1)return;let n=r[0],i=t(n),o=e.search(i);for(let s=1;s-1&&(this.description=this.description.substring(0,r)),this.downloadUrls=this.getDownloadUrls(),this.downloadFileName=this.getDownloadFileName()}getDownloadUrls(){return(this.options.downloadUrls?this.options.downloadUrls.map(({title:e,url:t})=>({title:e||N("download"),url:this.getDownloadLink(t)})):[{title:N("download"),url:this.getDownloadLink(this.options.downloadDefinitionUrl)}]).filter(({title:e,url:t})=>e&&t)}getDownloadLink(e){if(e)return e;if(this.parser.specUrl)return this.parser.specUrl;if(a&&window.Blob&&window.URL&&window.URL.createObjectURL){const e=new Blob([JSON.stringify(this.parser.spec,null,2)],{type:"application/json"});return window.URL.createObjectURL(e)}}getDownloadFileName(){return this.parser.specUrl||this.options.downloadDefinitionUrl?this.options.downloadFileName:this.options.downloadFileName||"openapi.json"}}var Qr=Object.defineProperty,Gr=Object.defineProperties,Yr=Object.getOwnPropertyDescriptors,Xr=Object.getOwnPropertySymbols,Jr=Object.prototype.hasOwnProperty,Zr=Object.prototype.propertyIsEnumerable,en=(e,t,r)=>t in e?Qr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;class tn{constructor(e,t){const r=t.spec.components&&t.spec.components.securitySchemes||{};this.schemes=Object.keys(e||{}).map(n=>{const{resolved:i}=t.deref(r[n]),o=e[n]||[];if(!i)return void console.warn(`Non existing security scheme referenced: ${n}. Skipping`);const s=i["x-displayName"]||n;return a=((e,t)=>{for(var r in t||(t={}))Jr.call(t,r)&&en(e,r,t[r]);if(Xr)for(var r of Xr(t))Zr.call(t,r)&&en(e,r,t[r]);return e})({},i),Gr(a,Yr({id:n,sectionId:n,displayName:s,scopes:o}));var a}).filter(e=>void 0!==e)}}var rn=Object.defineProperty,nn=Object.defineProperties,on=Object.getOwnPropertyDescriptor,sn=Object.getOwnPropertyDescriptors,an=Object.getOwnPropertySymbols,ln=Object.prototype.hasOwnProperty,cn=Object.prototype.propertyIsEnumerable,un=(e,t,r)=>t in e?rn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pn=(e,t)=>{for(var r in t||(t={}))ln.call(t,r)&&un(e,r,t[r]);if(an)for(var r of an(t))cn.call(t,r)&&un(e,r,t[r]);return e},dn=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?on(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&rn(t,r,o),o};class fn{constructor(e,t,r,n,i){this.expanded=!1,this.operations=[],(0,fe.makeObservable)(this),this.name=t;const{resolved:o}=e.deref(r);for(const l of Object.keys(o)){const r=o[l],c=Object.keys(r).filter(Be);for(const o of c){const c=r[o],u=new gi(e,(s=pn({},c),a={pathName:l,pointer:Oe.compile([n,t,l,o]),httpVerb:o,pathParameters:r.parameters||[],pathServers:r.servers},nn(s,sn(a))),void 0,i,!0);this.operations.push(u)}}var s,a}toggle(){this.expanded=!this.expanded}}dn([fe.observable],fn.prototype,"expanded",2),dn([fe.action],fn.prototype,"toggle",1);var hn=Object.defineProperty,mn=Object.defineProperties,yn=Object.getOwnPropertyDescriptors,gn=Object.getOwnPropertySymbols,bn=Object.prototype.hasOwnProperty,vn=Object.prototype.propertyIsEnumerable,xn=(e,t,r)=>t in e?hn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wn=(e,t)=>{for(var r in t||(t={}))bn.call(t,r)&&xn(e,r,t[r]);if(gn)for(var r of gn(t))vn.call(t,r)&&xn(e,r,t[r]);return e},Sn=(e,t)=>mn(e,yn(t)),kn=(e,t)=>{var r={};for(var n in e)bn.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&gn)for(var n of gn(e))t.indexOf(n)<0&&vn.call(e,n)&&(r[n]=e[n]);return r};function On(e,t){return t&&e[e.length-1]!==t?[...e,t]:e}function _n(e,t){return t?e.concat(t):e}class En{constructor(e,t,r=new H({})){this.options=r,this.allowMergeRefs=!1,this.byRef=e=>{let t;if(this.spec){"#"!==e.charAt(0)&&(e="#"+e),e=decodeURIComponent(e);try{t=Oe.get(this.spec,e)}catch(e){}return t||{}}},this.validate(e),this.spec=e,this.allowMergeRefs=e.openapi.startsWith("3.1");const n=a?window.location.href:"";"string"==typeof t&&(this.specUrl=n?new URL(t,n).href:t)}validate(e){if(void 0===e.openapi)throw new Error("Document must be valid OpenAPI 3.0.0 definition")}isRef(e){return!!e&&void 0!==e.$ref&&null!==e.$ref}deref(e,t=[],r=!1){const n=null==e?void 0:e["x-refsStack"];if(t=_n(t,n),this.isRef(e)){const n=nt(e.$ref);if(n&&this.options.ignoreNamedSchemas.has(n))return{resolved:{type:"object",title:n},refsStack:t};let i=this.byRef(e.$ref);if(!i)throw new Error(`Failed to resolve $ref "${e.$ref}"`);let o=t;if(t.includes(e.$ref)||t.length>999)i=Object.assign({},i,{"x-circular-ref":!0});else if(this.isRef(i)){const e=this.deref(i,t,r);o=e.refsStack,i=e.resolved}return o=On(t,e.$ref),i=this.allowMergeRefs?this.mergeRefs(e,i,r):i,{resolved:i,refsStack:o}}return{resolved:e,refsStack:_n(t,n)}}mergeRefs(e,t,r){const n=e,{$ref:i}=n,o=kn(n,["$ref"]),s=Object.keys(o);if(0===s.length)return t;if(r&&s.some(e=>!["description","title","externalDocs","x-refsStack","x-parentRefs","readOnly","writeOnly"].includes(e))){const e=o,{description:r,title:n,readOnly:i,writeOnly:s}=e;return{allOf:[{description:r,title:n,readOnly:i,writeOnly:s},t,kn(e,["description","title","readOnly","writeOnly"])]}}return wn(wn({},t),o)}mergeAllOf(e,t,r){var n;if(e["x-circular-ref"])return e;if(void 0===(e=this.hoistOneOfs(e,r)).allOf)return e;let i=Sn(wn({},e),{"x-parentRefs":[],allOf:void 0,title:e.title||nt(t)});void 0!==i.properties&&"object"==typeof i.properties&&(i.properties=wn({},i.properties)),void 0!==i.items&&"object"==typeof i.items&&(i.items=wn({},i.items));const o=function(e){const t=new Set;return e.filter(e=>{const r=e.$ref;return!r||r&&!t.has(r)&&t.add(r)})}(e.allOf.map(e=>{var t;const{resolved:n,refsStack:o}=this.deref(e,r,!0),s=e.$ref||void 0,a=this.mergeAllOf(n,s,o);if(!a["x-circular-ref"]||!a.allOf)return s&&(null==(t=i["x-parentRefs"])||t.push(...a["x-parentRefs"]||[],s)),{$ref:s,refsStack:On(o,s),schema:a}}).filter(e=>void 0!==e));for(const{schema:s,refsStack:a}of o){const e=s,{type:r,enum:o,properties:l,items:c,required:u,title:p,description:d,readOnly:f,writeOnly:h,oneOf:m,anyOf:y,"x-circular-ref":g}=e,b=kn(e,["type","enum","properties","items","required","title","description","readOnly","writeOnly","oneOf","anyOf","x-circular-ref"]);if(i.type!==r&&void 0!==i.type&&void 0!==r&&console.warn(`Incompatible types in allOf at "${t}": "${i.type}" and "${r}"`),void 0!==r&&(Array.isArray(r)&&Array.isArray(i.type)?i.type=[...r,...i.type]:i.type=r),void 0!==o&&(Array.isArray(o)&&Array.isArray(i.enum)?i.enum=Array.from(new Set([...o,...i.enum])):i.enum=o),void 0!==l&&"object"==typeof l){i.properties=i.properties||{};for(const e in l){const r=_n(a,null==(n=l[e])?void 0:n["x-refsStack"]);if(i.properties[e]){if(!g){const n=this.mergeAllOf({allOf:[i.properties[e],Sn(wn({},l[e]),{"x-refsStack":r})],"x-refsStack":r},t+"/properties/"+e,r);i.properties[e]=n}}else i.properties[e]=Sn(wn({},l[e]),{"x-refsStack":r})}}if(void 0!==c&&!g){const e="boolean"==typeof i.items?{}:Object.assign({},i.items),r="boolean"==typeof s.items?{}:Object.assign({},s.items);i.items=this.mergeAllOf({allOf:[e,r]},t+"/items",a)}void 0!==m&&(i.oneOf=m),void 0!==y&&(i.anyOf=y),void 0!==u&&(i.required=[...i.required||[],...u]),i=wn(Sn(wn({},i),{title:i.title||p,description:i.description||d,readOnly:void 0!==i.readOnly?i.readOnly:f,writeOnly:void 0!==i.writeOnly?i.writeOnly:h,"x-circular-ref":i["x-circular-ref"]||g}),b)}return i}findDerived(e){const t={},r=this.spec.components&&this.spec.components.schemas||{};for(const n in r){const{resolved:i}=this.deref(r[n]);void 0!==i.allOf&&i.allOf.find(t=>void 0!==t.$ref&&e.indexOf(t.$ref)>-1)&&(t["#/components/schemas/"+n]=[i["x-discriminator-value"]||n])}return t}hoistOneOfs(e,t){if(void 0===e.allOf)return e;const r=e.allOf;for(let n=0;n0?[o]:[];return{oneOf:i.map(r=>({allOf:[...e,...a,r,...s],"x-refsStack":t}))}}}return e}}var An=Object.defineProperty,jn=Object.defineProperties,Pn=Object.getOwnPropertyDescriptor,$n=Object.getOwnPropertyDescriptors,Cn=Object.getOwnPropertySymbols,Tn=Object.prototype.hasOwnProperty,In=Object.prototype.propertyIsEnumerable,Nn=(e,t,r)=>t in e?An(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Rn=(e,t)=>{for(var r in t||(t={}))Tn.call(t,r)&&Nn(e,r,t[r]);if(Cn)for(var r of Cn(t))In.call(t,r)&&Nn(e,r,t[r]);return e},Ln=(e,t)=>jn(e,$n(t)),Dn=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Pn(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&An(t,r,o),o};const Mn=class{constructor(e,t,r,n,i=!1,o=[]){this.options=n,this.refsStack=o,this.typePrefix="",this.isCircular=!1,this.activeOneOf=0,(0,fe.makeObservable)(this),this.pointer=t.$ref||r||"";const{resolved:s,refsStack:a}=e.deref(t,o,!0);this.refsStack=On(a,this.pointer),this.rawSchema=s,this.schema=e.mergeAllOf(this.rawSchema,this.pointer,this.refsStack),this.init(e,i),n.showExtensions&&(this.extensions=xt(this.schema,n.showExtensions))}activateOneOf(e){this.activeOneOf=e}hasType(e){return this.type===e||C(this.type)&&this.type.includes(e)}init(e,t){var r,n,i,o,s,a,l,c;const u=this.schema;if(this.isCircular=!!u["x-circular-ref"],this.title=u.title||rt(this.pointer)&&Oe.baseName(this.pointer)||"",this.description=u.description||"",this.type=u.type||Ue(u),this.format=u.format,this.enum=u.enum||[],this["x-enumDescriptions"]=u["x-enumDescriptions"],this.example=u.example,this.examples=u.examples,this.deprecated=!!u.deprecated,this.pattern=u.pattern,this.externalDocs=u.externalDocs,this.constraints=st(u),this.displayFormat=this.format,this.isPrimitive=Ve(u,this.type),this.default=u.default,this.readOnly=!!u.readOnly,this.writeOnly=!!u.writeOnly,this.const=u.const||"",this.contentEncoding=u.contentEncoding,this.contentMediaType=u.contentMediaType,this.minItems=u.minItems,this.maxItems=u.maxItems,(u.nullable||u["x-nullable"])&&(C(this.type)&&!this.type.some(e=>null===e||"null"===e)?this.type=[...this.type,"null"]:C(this.type)||null===this.type&&"null"===this.type||(this.type=[this.type,"null"])),this.displayType=C(this.type)?this.type.map(e=>null===e?"null":e).join(" or "):this.type,!this.isCircular)if(u.if&&u.then||u.if&&u.else)this.initConditionalOperators(u,e);else if(t||void 0===Fn(u)){if(t&&C(u.oneOf)&&u.oneOf.find(e=>e.$ref===this.pointer)&&delete u.oneOf,void 0!==u.oneOf)return this.initOneOf(u.oneOf,e),this.oneOfType="One of",void(void 0!==u.anyOf&&console.warn(`oneOf and anyOf are not supported on the same level. Skipping anyOf at ${this.pointer}`));if(void 0!==u.anyOf)return this.initOneOf(u.anyOf,e),void(this.oneOfType="Any of");if(this.hasType("object"))this.fields=Bn(e,u,this.pointer,this.options,this.refsStack);else if(this.hasType("array")&&(C(u.items)||C(u.prefixItems)?this.fields=Bn(e,u,this.pointer,this.options,this.refsStack):u.items&&(this.items=new Mn(e,u.items,this.pointer+"/items",this.options,!1,this.refsStack)),this.displayType=u.prefixItems||C(u.items)?"items":wt((null==(r=this.items)?void 0:r.displayType)||this.displayType),this.displayFormat=(null==(n=this.items)?void 0:n.format)||"",this.typePrefix=(null==(i=this.items)?void 0:i.typePrefix)||""+N("arrayOf"),this.title=this.title||(null==(o=this.items)?void 0:o.title)||"",this.isPrimitive=void 0!==(null==(s=this.items)?void 0:s.isPrimitive)?null==(a=this.items)?void 0:a.isPrimitive:this.isPrimitive,void 0===this.example&&void 0!==(null==(l=this.items)?void 0:l.example)&&(this.example=[this.items.example]),(null==(c=this.items)?void 0:c.isPrimitive)&&(this.enum=this.items.enum,this["x-enumDescriptions"]=this.items["x-enumDescriptions"]),C(this.type))){const e=this.type.filter(e=>"array"!==e);e.length&&(this.displayType+=` or ${e.join(" or ")}`)}this.enum.length&&this.options.sortEnumValuesAlphabetically&&this.enum.sort()}else this.initDiscriminator(u,e)}initOneOf(e,t){if(this.oneOf=e.map((e,r)=>{const{resolved:n,refsStack:i}=t.deref(e,this.refsStack,!0),o=t.mergeAllOf(n,this.pointer+"/oneOf/"+r,i),s=rt(e.$ref)&&!o.title?Oe.baseName(e.$ref):`${o.title||""}${void 0!==o.const&&JSON.stringify(o.const)||""}`;return new Mn(t,Ln(Rn({},o),{title:s,allOf:[Ln(Rn({},this.schema),{oneOf:void 0,anyOf:void 0})],discriminator:n.allOf?void 0:o.discriminator}),e.$ref||this.pointer+"/oneOf/"+r,this.options,!1,i)}),this.options.simpleOneOfTypeLabel){const e=function(e){const t=new Set;return function e(r){for(const n of r.oneOf||[])n.oneOf?e(n):n.type&&t.add(n.type)}(e),Array.from(t.values())}(this);this.displayType=e.join(" or ")}else this.displayType=this.oneOf.map(e=>{let t=e.typePrefix+(e.title?`${e.title} (${e.displayType})`:e.displayType);return t.indexOf(" or ")>-1&&(t=`(${t})`),t}).join(" or ")}initDiscriminator(e,t){const r=Fn(e);this.discriminatorProp=r.propertyName;const n=t.findDerived([...this.schema["x-parentRefs"]||[],this.pointer]);if(e.oneOf)for(const u of e.oneOf){if(void 0===u.$ref)continue;const e=Oe.baseName(u.$ref);n[u.$ref]=e}const i=r.mapping||{};let o=r["x-explicitMappingOnly"]||!1;0===Object.keys(i).length&&(o=!1);const s={};for(const u in i){const e=i[u];C(s[e])?s[e].push(u):s[e]=[u]}const a=Rn(o?{}:Rn({},n),s);let l=[];for(const u of Object.keys(a)){const e=a[u];if(C(e))for(const t of e)l.push({$ref:u,name:t});else l.push({$ref:u,name:e})}const c=Object.keys(i);0!==c.length&&(l=l.sort((e,t)=>{const r=c.indexOf(e.name),n=c.indexOf(t.name);return r<0&&n<0?e.name.localeCompare(t.name):r<0?1:n<0?-1:r-n})),this.oneOf=l.map(({$ref:e,name:r})=>{const n=new Mn(t,{$ref:e},e,this.options,!0,this.refsStack.slice(0,-1));return n.title=r,n})}initConditionalOperators(e,t){const r=e,{if:n,else:i={},then:o={}}=r,s=((e,t)=>{var r={};for(var n in e)Tn.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&Cn)for(var n of Cn(e))t.indexOf(n)<0&&In.call(e,n)&&(r[n]=e[n]);return r})(r,["if","else","then"]),a=[{allOf:[s,o,n],title:n&&n["x-displayName"]||(null==n?void 0:n.title)||"case 1"},{allOf:[s,i],title:i&&i["x-displayName"]||(null==i?void 0:i.title)||"case 2"}];this.oneOf=a.map((e,r)=>new Mn(t,Rn({},e),this.pointer+"/oneOf/"+r,this.options,!1,this.refsStack)),this.oneOfType="One of"}};let zn=Mn;function Bn(e,t,r,n,i){const o=t.properties||t.prefixItems||t.items||{},s=t.patternProperties||{},a=t.additionalProperties||t.unevaluatedProperties,l=t.prefixItems?t.items:t.additionalItems,c=t.default;let u=Object.keys(o||[]).map(s=>{let a=o[s];a||(console.warn(`Field "${s}" is invalid, skipping.\n Field must be an object but got ${typeof a} at "${r}"`),a={});const l=void 0!==t.required&&t.required.indexOf(s)>-1;return new Qn(e,{name:t.properties?s:`[${s}]`,required:l,schema:Ln(Rn({},a),{default:void 0===a.default&&c?c[s]:a.default})},r+"/properties/"+s,n,i)});return n.sortPropsAlphabetically&&(u=lt(u,"name")),n.sortRequiredPropsFirst&&(u=at(u,n.sortPropsAlphabetically?void 0:t.required)),u.push(...Object.keys(s).map(t=>{let o=s[t];return o||(console.warn(`Field "${t}" is invalid, skipping.\n Field must be an object but got ${typeof o} at "${r}"`),o={}),new Qn(e,{name:t,required:!1,schema:o,kind:"patternProperties"},`${r}/patternProperties/${t}`,n,i)})),"object"!=typeof a&&!0!==a||u.push(new Qn(e,{name:("object"==typeof a&&a["x-additionalPropertiesName"]||"property name").concat("*"),required:!1,schema:!0===a?{}:a,kind:"additionalProperties"},r+"/additionalProperties",n,i)),u.push(...function({parser:e,schema:t=!1,fieldsCount:r,$ref:n,options:i,refsStack:o}){return T(t)?t?[new Qn(e,{name:`[${r}...]`,schema:{}},`${n}/additionalItems`,i,o)]:[]:C(t)?[...t.map((t,s)=>new Qn(e,{name:`[${r+s}]`,schema:t},`${n}/additionalItems`,i,o))]:x(t)?[new Qn(e,{name:`[${r}...]`,schema:t},`${n}/additionalItems`,i,o)]:[]}({parser:e,schema:l,fieldsCount:u.length,$ref:r,options:n,refsStack:i})),u}function Fn(e){return e.discriminator||e["x-discriminator"]}Dn([fe.observable],zn.prototype,"activeOneOf",2),Dn([fe.action],zn.prototype,"activateOneOf",1);const qn={};class Un{constructor(e,t,r,n){this.mime=r;const{resolved:i}=e.deref(t);this.value=i.value,this.summary=i.summary,this.description=i.description,i.externalValue&&(this.externalValueUrl=new URL(i.externalValue,e.specUrl).href),He(r)&&this.value&&"object"==typeof this.value&&(this.value=Ye(this.value,n))}getExternalValue(e){return this.externalValueUrl?(this.externalValueUrl in qn||(qn[this.externalValueUrl]=fetch(this.externalValueUrl).then(t=>t.text().then(r=>{if(!t.ok)return Promise.reject(new Error(r));if(!We(e))return r;try{return JSON.parse(r)}catch(e){return r}}))),qn[this.externalValueUrl]):Promise.resolve(void 0)}}var Vn=Object.defineProperty,Wn=Object.getOwnPropertyDescriptor,Hn=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Wn(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Vn(t,r,o),o};const Kn={path:{style:"simple",explode:!1},query:{style:"form",explode:!0},header:{style:"simple",explode:!1},cookie:{style:"form",explode:!0}};class Qn{constructor(e,t,r,n,i){var o,s,a,l,c;this.expanded=void 0,(0,fe.makeObservable)(this);const{resolved:u}=e.deref(t);this.kind=t.kind||"field",this.name=t.name||u.name,this.in=u.in,this.required=!!u.required;let p=u.schema,d="";if(!p&&u.in&&u.content&&(d=Object.keys(u.content)[0],p=u.content[d]&&u.content[d].schema),this.schema=new zn(e,p||{},r,n,!1,i),this.description=void 0===u.description?this.schema.description||"":u.description,this.example=u.example||this.schema.example,void 0!==u.examples||void 0!==this.schema.examples){const t=u.examples||this.schema.examples;this.examples=C(t)?t:h(t,(t,r)=>new Un(e,t,r,u.encoding))}d?this.serializationMime=d:u.style?this.style=u.style:this.in&&(this.style=null!=(s=null==(o=Kn[this.in])?void 0:o.style)?s:"form"),void 0===u.explode&&this.in?this.explode=null==(l=null==(a=Kn[this.in])?void 0:a.explode)||l:this.explode=!!u.explode,this.deprecated=void 0===u.deprecated?!!this.schema.deprecated:u.deprecated,n.showExtensions&&(this.extensions=xt(u,n.showExtensions)),this.const=(null==(c=this.schema)?void 0:c.const)||(null==u?void 0:u.const)||""}toggle(){this.expanded=!this.expanded}collapse(){this.expanded=!1}expand(){this.expanded=!0}}Hn([fe.observable],Qn.prototype,"expanded",2),Hn([fe.action],Qn.prototype,"toggle",1),Hn([fe.action],Qn.prototype,"collapse",1),Hn([fe.action],Qn.prototype,"expand",1);var Gn=r(64253);class Yn{constructor(e,t,r,n,i){this.name=t,this.isRequestType=r,this.schema=n.schema&&new zn(e,n.schema,"",i),this.onlyRequiredInSamples=i.onlyRequiredInSamples,this.generatedSamplesMaxDepth=i.generatedSamplesMaxDepth,void 0!==n.examples?this.examples=h(n.examples,r=>new Un(e,r,t,n.encoding)):void 0!==n.example?this.examples={default:new Un(e,{value:e.deref(n.example).resolved},t,n.encoding)}:We(t)&&this.generateExample(e,n)}generateExample(e,t){const r={skipReadOnly:this.isRequestType,skipWriteOnly:!this.isRequestType,skipNonRequired:this.isRequestType&&this.onlyRequiredInSamples,maxSampleDepth:this.generatedSamplesMaxDepth};if(this.schema&&this.schema.oneOf){this.examples={};for(const n of this.schema.oneOf){const i=Gn.sample(n.rawSchema,r,e.spec);this.schema.discriminatorProp&&"object"==typeof i&&i&&(i[this.schema.discriminatorProp]=n.title),this.examples[n.title]=new Un(e,{value:i},this.name,t.encoding)}}else this.schema&&(this.examples={default:new Un(e,{value:Gn.sample(t.schema,r,e.spec)},this.name,t.encoding)})}}var Xn=Object.defineProperty,Jn=Object.getOwnPropertyDescriptor,Zn=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Jn(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Xn(t,r,o),o};class ei{constructor(e,t,r,n){this.isRequestType=r,this.activeMimeIdx=0,(0,fe.makeObservable)(this),n.unstable_ignoreMimeParameters&&(t=ut(t)),this.mediaTypes=Object.keys(t).map(i=>{const o=t[i];return new Yn(e,i,r,o,n)})}activate(e){this.activeMimeIdx=e}get active(){return this.mediaTypes[this.activeMimeIdx]}get hasSample(){return this.mediaTypes.filter(e=>!!e.examples).length>0}}Zn([fe.observable],ei.prototype,"activeMimeIdx",2),Zn([fe.action],ei.prototype,"activate",1),Zn([fe.computed],ei.prototype,"active",1);class ti{constructor({parser:e,infoOrRef:t,options:r,isEvent:n}){const i=!n,{resolved:o}=e.deref(t);this.description=o.description||"",this.required=o.required;const s=St(o);void 0!==s&&(this.content=new ei(e,s,i,r))}}var ri=Object.defineProperty,ni=Object.defineProperties,ii=Object.getOwnPropertyDescriptor,oi=Object.getOwnPropertyDescriptors,si=Object.getOwnPropertySymbols,ai=Object.prototype.hasOwnProperty,li=Object.prototype.propertyIsEnumerable,ci=(e,t,r)=>t in e?ri(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ui=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?ii(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&ri(t,r,o),o};class pi{constructor({parser:e,code:t,defaultAsError:r,infoOrRef:n,options:i,isEvent:o}){this.expanded=!1,this.headers=[],(0,fe.makeObservable)(this),this.expanded="all"===i.expandResponses||i.expandResponses[t];const{resolved:s}=e.deref(n);this.code=t,void 0!==s.content&&(this.content=new ei(e,s.content,o,i)),void 0!==s["x-summary"]?(this.summary=s["x-summary"],this.description=s.description||""):(this.summary=s.description||"",this.description=""),this.type=Me(t,r);const a=s.headers;void 0!==a&&(this.headers=Object.keys(a).map(t=>{const r=a[t];return new Qn(e,(n=((e,t)=>{for(var r in t||(t={}))ai.call(t,r)&&ci(e,r,t[r]);if(si)for(var r of si(t))li.call(t,r)&&ci(e,r,t[r]);return e})({},r),ni(n,oi({name:t}))),"",i);var n})),i.showExtensions&&(this.extensions=xt(s,i.showExtensions))}toggle(){this.expanded=!this.expanded}}ui([fe.observable],pi.prototype,"expanded",2),ui([fe.action],pi.prototype,"toggle",1);var di=Object.defineProperty,fi=Object.getOwnPropertyDescriptor,hi=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?fi(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&di(t,r,o),o};function mi(e){return"payload"===e.lang&&e.requestBodyContent}let yi=!1;class gi{constructor(e,t,r,n,i=!1){var o;this.parser=e,this.operationSpec=t,this.options=n,this.type="operation",this.items=[],this.ready=!0,this.active=!1,this.expanded=!1,(0,fe.makeObservable)(this),this.pointer=t.pointer,this.description=t.description,this.parent=r,this.externalDocs=t.externalDocs,this.deprecated=!!t.deprecated,this.httpVerb=t.httpVerb,this.deprecated=!!t.deprecated,this.operationId=t.operationId,this.path=t.pathName,this.isCallback=i,this.isWebhook=t.isWebhook,this.isEvent=this.isCallback||this.isWebhook,this.name=Fe(t),this.sidebarLabel=n.sideNavStyle===R.IdOnly?this.operationId||this.path:n.sideNavStyle===R.PathOnly?this.path:this.name,this.badges=(null==(o=t["x-badges"])?void 0:o.map(({name:e,color:t,position:r})=>({name:e,color:t,position:r||"after"})))||[],this.isCallback?(this.security=(t.security||[]).map(t=>new tn(t,e)),this.servers=dt("",t.servers||t.pathServers||[])):(this.operationHash=t.operationId&&"operation/"+t.operationId,this.id=void 0!==t.operationId?(r?r.id+"/":"")+this.operationHash:void 0!==r?r.id+this.pointer:this.pointer,this.security=(t.security||e.spec.security||[]).map(t=>new tn(t,e)),this.servers=dt(e.specUrl,t.servers||t.pathServers||e.spec.servers||[])),n.showExtensions&&(this.extensions=xt(t,n.showExtensions))}activate(){this.active=!0}deactivate(){this.active=!1}toggle(){this.expanded=!this.expanded}expand(){this.parent&&this.parent.expand()}collapse(){}get requestBody(){return this.operationSpec.requestBody&&new ti({parser:this.parser,infoOrRef:this.operationSpec.requestBody,options:this.options,isEvent:this.isEvent})}get codeSamples(){const{payloadSampleIdx:e,hideRequestPayloadSample:t}=this.options;let r=this.operationSpec["x-codeSamples"]||this.operationSpec["x-code-samples"]||[];this.operationSpec["x-code-samples"]&&!yi&&(yi=!0,console.warn('"x-code-samples" is deprecated. Use "x-codeSamples" instead'));const n=this.requestBody&&this.requestBody.content;if(n&&n.hasSample&&!t){const t=Math.min(r.length,e);r=[...r.slice(0,t),{lang:"payload",label:"Payload",source:"",requestBodyContent:n},...r.slice(t)]}return r}get parameters(){const e=ct(this.parser,this.operationSpec.pathParameters,this.operationSpec.parameters).map(e=>new Qn(this.parser,e,this.pointer,this.options));return this.options.sortPropsAlphabetically?lt(e,"name"):this.options.sortRequiredPropsFirst?at(e):e}get responses(){let e=!1;return Object.keys(this.operationSpec.responses||[]).filter(t=>"default"===t||("success"===Me(t)&&(e=!0),De(t))).map(t=>new pi({parser:this.parser,code:t,defaultAsError:e,infoOrRef:this.operationSpec.responses[t],options:this.options,isEvent:this.isEvent}))}get callbacks(){return Object.keys(this.operationSpec.callbacks||[]).map(e=>new fn(this.parser,e,this.operationSpec.callbacks[e],this.pointer,this.options))}}hi([fe.observable],gi.prototype,"ready",2),hi([fe.observable],gi.prototype,"active",2),hi([fe.observable],gi.prototype,"expanded",2),hi([fe.action],gi.prototype,"activate",1),hi([fe.action],gi.prototype,"deactivate",1),hi([fe.action],gi.prototype,"toggle",1),hi([Bt],gi.prototype,"requestBody",1),hi([Bt],gi.prototype,"codeSamples",1),hi([Bt],gi.prototype,"parameters",1),hi([Bt],gi.prototype,"responses",1),hi([Bt],gi.prototype,"callbacks",1);var bi=Object.defineProperty,vi=Object.defineProperties,xi=Object.getOwnPropertyDescriptors,wi=Object.getOwnPropertySymbols,Si=Object.prototype.hasOwnProperty,ki=Object.prototype.propertyIsEnumerable,Oi=(e,t,r)=>t in e?bi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_i=(e,t)=>{for(var r in t||(t={}))Si.call(t,r)&&Oi(e,r,t[r]);if(wi)for(var r of wi(t))ki.call(t,r)&&Oi(e,r,t[r]);return e};class Ei{constructor(e,t,r){this.operations=[];const{resolved:n}=e.deref(r||{});this.initWebhooks(e,n,t)}initWebhooks(e,t,r){for(const i of Object.keys(t)){const o=t[i],s=Object.keys(o).filter(Be);for(const t of s){const i=o[t];if(o.$ref){const n=e.deref(o||{});this.initWebhooks(e,{[t]:n},r)}if(!i)continue;const s=new gi(e,(n=_i({},i),vi(n,xi({httpVerb:t}))),void 0,r,!1);this.operations.push(s)}}var n}}class Ai{constructor(e,t,r){const{resolved:n}=e.deref(r);this.id=t,this.sectionId=yt+t,this.type=n.type,this.displayName=n["x-displayName"]||t,this.description=n.description||"","apiKey"===n.type&&(this.apiKey={name:n.name,in:n.in}),"http"===n.type&&(this.http={scheme:n.scheme,bearerFormat:n.bearerFormat}),"openIdConnect"===n.type&&(this.openId={connectUrl:n.openIdConnectUrl}),"oauth2"===n.type&&n.flows&&(this.flows=n.flows)}}class ji{constructor(e){const t=e.spec.components&&e.spec.components.securitySchemes||{};this.schemes=Object.keys(t).map(r=>new Ai(e,r,t[r]))}}var Pi=Object.defineProperty,$i=Object.getOwnPropertySymbols,Ci=Object.prototype.hasOwnProperty,Ti=Object.prototype.propertyIsEnumerable,Ii=(e,t,r)=>t in e?Pi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ni=(e,t)=>{for(var r in t||(t={}))Ci.call(t,r)&&Ii(e,r,t[r]);if($i)for(var r of $i(t))Ti.call(t,r)&&Ii(e,r,t[r]);return e};class Ri{constructor(e,t,r){var n,i,o;this.options=r,this.parser=new En(e,t,r),this.info=new Kr(this.parser,this.options),this.externalDocs=this.parser.spec.externalDocs,this.contentItems=Yi.buildStructure(this.parser,this.options),this.securitySchemes=new ji(this.parser);const s=Ni(Ni({},null==(i=null==(n=this.parser)?void 0:n.spec)?void 0:i["x-webhooks"]),null==(o=this.parser)?void 0:o.spec.webhooks);this.webhooks=new Ei(this.parser,r,s)}}var Li=Object.defineProperty,Di=Object.getOwnPropertyDescriptor,Mi=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Di(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Li(t,r,o),o};class zi{constructor(e,t,r){this.items=[],this.active=!1,this.expanded=!1,(0,fe.makeObservable)(this),this.id=t.id||e+"/"+S(t.name),this.type=e,this.name=t["x-displayName"]||t.name,this.level=t.level||1,this.sidebarLabel=this.name,this.description=t.description||"";const n=t.items;n&&n.length&&(this.description=Wr.getTextBeforeHading(this.description,n[0].name)),this.parent=r,this.externalDocs=t.externalDocs,"group"===this.type&&(this.expanded=!0)}activate(){this.active=!0}expand(){this.parent&&this.parent.expand(),this.expanded=!0}collapse(){"group"!==this.type&&(this.expanded=!1)}deactivate(){this.active=!1}}Mi([fe.observable],zi.prototype,"active",2),Mi([fe.observable],zi.prototype,"expanded",2),Mi([fe.action],zi.prototype,"activate",1),Mi([fe.action],zi.prototype,"expand",1),Mi([fe.action],zi.prototype,"collapse",1),Mi([fe.action],zi.prototype,"deactivate",1);var Bi=Object.defineProperty,Fi=Object.defineProperties,qi=Object.getOwnPropertyDescriptors,Ui=Object.getOwnPropertySymbols,Vi=Object.prototype.hasOwnProperty,Wi=Object.prototype.propertyIsEnumerable,Hi=(e,t,r)=>t in e?Bi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ki=(e,t)=>{for(var r in t||(t={}))Vi.call(t,r)&&Hi(e,r,t[r]);if(Ui)for(var r of Ui(t))Wi.call(t,r)&&Hi(e,r,t[r]);return e},Qi=(e,t)=>Fi(e,qi(t));const Gi=0;class Yi{static buildStructure(e,t){const r=e.spec,{schemaDefinitionsTagName:n}=t,i=[],o=[...r.tags||[]];!o.find(e=>(null==e?void 0:e.name)===n)&&n&&o.push({name:n});const s=Yi.getTagsWithOperations(e,o);return i.push(...Yi.addMarkdownItems(r.info.description||"",void 0,1,t)),r["x-tagGroups"]&&r["x-tagGroups"].length>0?i.push(...Yi.getTagGroupsItems(e,void 0,r["x-tagGroups"],s,t)):i.push(...Yi.getTagsItems(e,s,void 0,void 0,t)),i}static addMarkdownItems(e,t,r,n){const i=new Wr(n,null==t?void 0:t.id).extractHeadings(e||"");i.length&&t&&t.description&&(t.description=Wr.getTextBeforeHading(t.description,i[0].name));const o=(e,t,r=1)=>t.map(t=>{const n=new zi("section",t,e);return n.depth=r,t.items&&(n.items=o(n,t.items,r+1)),n});return o(t,i,r)}static getTagGroupsItems(e,t,r,n,i){const o=[];for(const s of r){const r=new zi("group",s,t);r.depth=Gi,r.items=Yi.getTagsItems(e,n,r,s,i),o.push(r)}return o}static getTagsItems(e,t,r,n,i){let o;o=void 0===n?Object.keys(t):n.tags;const s=o.map(e=>t[e]?(t[e].used=!0,t[e]):(console.warn(`Non-existing tag "${e}" is added to the group "${n.name}"`),null)),a=[];for(const l of s){if(!l)continue;const t=new zi("tag",l,r);if(t.depth=Gi+1,""===l.name){const r=[...Yi.addMarkdownItems(l.description||"",t,t.depth+1,i),...this.getOperationsItems(e,void 0,l,t.depth+1,i)];a.push(...r);continue}const n=this.getTagRelatedSchema({parser:e,tag:l,parent:t,schemaDefinitionsTagName:i.schemaDefinitionsTagName});t.items=[...n,...Yi.addMarkdownItems(l.description||"",t,t.depth+1,i),...this.getOperationsItems(e,t,l,t.depth+1,i)],a.push(t)}return i.sortTagsAlphabetically&&a.sort(Ft("name")),a}static getOperationsItems(e,t,r,n,i){if(0===r.operations.length)return[];const o=[];for(const s of r.operations){const r=new gi(e,s,t,i);r.depth=n,o.push(r)}return i.sortOperationsAlphabetically&&o.sort(Ft("name")),o}static getTagsWithOperations(e,t){const{spec:r}=e,n={},i=r["x-webhooks"]||r.webhooks;for(const s of t||[])n[s.name]=Qi(Ki({},s),{operations:[]});function o(e,t,r){for(const i of Object.keys(t)){const s=t[i],a=Object.keys(s).filter(Be);for(const t of a){const a=s[t];if(s.$ref){const{resolved:t}=e.deref(s);o(e,{[i]:t},r);continue}let l=null==a?void 0:a.tags;l&&l.length||(l=[""]);for(const e of l){let o=n[e];void 0===o&&(o={name:e,operations:[]},n[e]=o),o["x-traitTag"]||o.operations.push(Qi(Ki({},a),{pathName:i,pointer:Oe.compile(["paths",i,t]),httpVerb:t,pathParameters:s.parameters||[],pathServers:s.servers,isWebhook:!!r}))}}}}return i&&o(e,i,!0),r.paths&&o(e,r.paths),n}static getTagRelatedSchema({parser:e,tag:t,parent:r,schemaDefinitionsTagName:n}){var i;const o=n?[n]:[];return Object.entries((null==(i=e.spec.components)?void 0:i.schemas)||{}).map(([e,n])=>{const i=n["x-tags"]||o;if(!(null==i?void 0:i.includes(t.name)))return null;const s=new zi("schema",{name:e,"x-displayName":`${n.title||e}`,description:``},r);return s.depth=r.depth+1,s}).filter(Boolean)}}var Xi=Object.defineProperty,Ji=Object.getOwnPropertyDescriptor,Zi=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Ji(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Xi(t,r,o),o};const eo="data-section-id";class to{constructor(e,t,r){this.scroll=t,this.history=r,this.activeItemIdx=-1,this.sideBarOpened=!1,this.updateOnScroll=e=>{const t=e?1:-1;let r=this.activeItemIdx;for(;(-1!==r||e)&&!(r>=this.flatItems.length-1&&e);){if(e){const e=this.getElementAtOrFirstChild(r+1);if(this.scroll.isElementBellow(e))break}else{const e=this.getElementAt(r);if(this.scroll.isElementAbove(e))break}r+=t}this.activate(this.flatItems[r],!0,!0)},this.updateOnHistory=(e=this.history.currentId)=>{if(!e)return;let t;t=this.flatItems.find(t=>t.id===e),t?this.activateAndScroll(t,!1):(e.startsWith(yt)&&(t=this.flatItems.find(e=>yt.startsWith(e.id)),this.activateAndScroll(t,!1)),this.scroll.scrollIntoViewBySelector(`[${eo}="${P(e)}"]`))},this.getItemById=e=>this.flatItems.find(t=>t.id===e),(0,fe.makeObservable)(this),this.items=e.contentItems,this.flatItems=m(this.items||[],"items"),this.flatItems.forEach((e,t)=>e.absoluteIdx=t),this.subscribe()}static updateOnHistory(e=Ht.currentId,t){e&&t.scrollIntoViewBySelector(`[${eo}="${P(e)}"]`)}subscribe(){this._unsubscribe=this.scroll.subscribe(this.updateOnScroll),this._hashUnsubscribe=this.history.subscribe(this.updateOnHistory)}toggleSidebar(){this.sideBarOpened=!this.sideBarOpened}closeSidebar(){this.sideBarOpened=!1}getElementAt(e){const t=this.flatItems[e];return t&&l(`[${eo}="${P(t.id)}"]`)||null}getElementAtOrFirstChild(e){let t=this.flatItems[e];return t&&"group"===t.type&&(t=t.items[0]),t&&l(`[${eo}="${P(t.id)}"]`)||null}get activeItem(){return this.flatItems[this.activeItemIdx]||void 0}activate(e,t=!0,r=!1){if((this.activeItem&&this.activeItem.id)!==(e&&e.id)&&(!e||"group"!==e.type)){if(this.deactivate(this.activeItem),!e)return this.activeItemIdx=-1,void this.history.replace("",r);e.depth<=Gi||(this.activeItemIdx=e.absoluteIdx,t&&this.history.replace(encodeURI(e.id),r),e.activate(),e.expand())}}deactivate(e){if(void 0!==e)for(e.deactivate();void 0!==e;)e.collapse(),e=e.parent}activateAndScroll(e,t,r){const n=e&&this.getItemById(e.id)||e;this.activate(n,t,r),this.scrollToActive(),n&&n.items.length||this.closeSidebar()}scrollToActive(){this.scroll.scrollIntoView(this.getElementAt(this.activeItemIdx))}dispose(){this._unsubscribe(),this._hashUnsubscribe()}}Zi([fe.observable],to.prototype,"activeItemIdx",2),Zi([fe.observable],to.prototype,"sideBarOpened",2),Zi([fe.action],to.prototype,"toggleSidebar",1),Zi([fe.action],to.prototype,"closeSidebar",1),Zi([fe.action],to.prototype,"activate",1),Zi([fe.action.bound],to.prototype,"activateAndScroll",1);var ro=Object.defineProperty,no=Object.getOwnPropertyDescriptor;const io="scroll";class oo{constructor(e){this.options=e,this._prevOffsetY=0,this._scrollParent=a?window:void 0,this._emiter=new we.EventEmitter,this.bind()}bind(){this._prevOffsetY=this.scrollY(),this._scrollParent&&this._scrollParent.addEventListener("scroll",this.handleScroll)}dispose(){this._scrollParent&&this._scrollParent.removeEventListener("scroll",this.handleScroll),this._emiter.removeAllListeners(io)}scrollY(){return"undefined"!=typeof HTMLElement&&this._scrollParent instanceof HTMLElement?this._scrollParent.scrollTop:void 0!==this._scrollParent?this._scrollParent.pageYOffset:0}isElementBellow(e){if(null!==e)return e.getBoundingClientRect().top>this.options.scrollYOffset()}isElementAbove(e){if(null===e)return;const t=e.getBoundingClientRect().top;return(t>0?Math.floor(t):Math.ceil(t))<=this.options.scrollYOffset()}subscribe(e){const t=this._emiter.addListener(io,e);return()=>t.removeListener(io,e)}scrollIntoView(e){null!==e&&(e.scrollIntoView(),this._scrollParent&&this._scrollParent.scrollBy&&this._scrollParent.scrollBy(0,1-this.options.scrollYOffset()))}scrollIntoViewBySelector(e){const t=l(e);this.scrollIntoView(t)}handleScroll(){const e=this.scrollY()-this._prevOffsetY>0;this._prevOffsetY=this.scrollY(),this._emiter.emit(io,e)}}((e,t,r)=>{for(var n,i=no(t,r),o=e.length-1;o>=0;o--)(n=e[o])&&(i=n(t,r,i)||i);i&&ro(t,r,i)})([xe.bind,At(100)],oo.prototype,"handleScroll");class so{constructor(){this.searchWorker=function(){let e;if(a)try{e=n(988)}catch(t){e=n(353).Ay}else e=n(353).Ay;return new e}()}indexItems(e){const t=e=>{e.forEach(e=>{"group"!==e.type&&this.add(e.name,(e.description||"").concat(" ",e.path||""),e.id),t(e.items)})};t(e),this.searchWorker.done()}add(e,t,r){this.searchWorker.add(e,t,r)}dispose(){this.searchWorker.terminate(),this.searchWorker.dispose()}search(e){return this.searchWorker.search(e)}toJS(){return e=this,t=function*(){return this.searchWorker.toJS()},new Promise((r,n)=>{var i=e=>{try{s(t.next(e))}catch(e){n(e)}},o=e=>{try{s(t.throw(e))}catch(e){n(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(i,o);s((t=t.apply(e,null)).next())});var e,t}load(e){this.searchWorker.load(e)}fromExternalJS(e,t){e&&t&&this.searchWorker.fromExternalJS(e,t)}}const ao=te.div` + width: calc(100% - ${e=>e.theme.rightPanel.width}); + padding: 0 ${e=>e.theme.spacing.sectionHorizontal}px; + + ${({$compact:e,theme:t})=>ee.lessThan("medium",!0)` + width: 100%; + padding: ${`${e?0:t.spacing.sectionVertical}px ${t.spacing.sectionHorizontal}px`}; + `}; +`,lo=te.div.attrs(e=>({[eo]:e.id}))` + padding: ${e=>e.theme.spacing.sectionVertical}px 0; + + &:last-child { + min-height: calc(100vh + 1px); + } + + & > &:last-child { + min-height: initial; + } + + ${ee.lessThan("medium",!0)` + padding: 0; + `} + ${({$underlined:e})=>e?"\n position: relative;\n\n &:not(:last-of-type):after {\n position: absolute;\n bottom: 0;\n width: 100%;\n display: block;\n content: '';\n border-bottom: 1px solid rgba(0, 0, 0, 0.2);\n }\n ":""} +`,co=te.div` + width: ${e=>e.theme.rightPanel.width}; + color: ${({theme:e})=>e.rightPanel.textColor}; + background-color: ${e=>e.theme.rightPanel.backgroundColor}; + padding: 0 ${e=>e.theme.spacing.sectionHorizontal}px; + + ${ee.lessThan("medium",!0)` + width: 100%; + padding: ${e=>`${e.theme.spacing.sectionVertical}px ${e.theme.spacing.sectionHorizontal}px`}; + `}; +`,uo=te(co)` + background-color: ${e=>e.theme.rightPanel.backgroundColor}; +`,po=te.div` + display: flex; + width: 100%; + padding: 0; + + ${ee.lessThan("medium",!0)` + flex-direction: column; + `}; +`,fo={1:"1.85714em",2:"1.57143em",3:"1.27em"},ho=e=>Y` + font-family: ${({theme:e})=>e.typography.headings.fontFamily}; + font-weight: ${({theme:e})=>e.typography.headings.fontWeight}; + font-size: ${fo[e]}; + line-height: ${({theme:e})=>e.typography.headings.lineHeight}; +`,mo=te.h1` + ${ho(1)}; + color: ${({theme:e})=>e.colors.text.primary}; + + ${re("H1")}; +`,yo=te.h2` + ${ho(2)}; + color: ${({theme:e})=>e.colors.text.primary}; + margin: 0 0 20px; + + ${re("H2")}; +`,go=te.h2` + ${ho(3)}; + color: ${({theme:e})=>e.colors.text.primary}; + + ${re("H3")}; +`,bo=te.h3` + color: ${({theme:e})=>e.rightPanel.textColor}; + + ${re("RightPanelHeader")}; +`,vo=te.h5` + border-bottom: 1px solid rgba(38, 50, 56, 0.3); + margin: 1em 0 1em 0; + color: rgba(38, 50, 56, 0.5); + font-weight: normal; + text-transform: uppercase; + font-size: 0.929em; + line-height: 20px; + + ${re("UnderlinedHeader")}; +`;var xo=(e,t,r)=>new Promise((n,i)=>{var o=e=>{try{a(r.next(e))}catch(e){i(e)}},s=e=>{try{a(r.throw(e))}catch(e){i(e)}},a=e=>e.done?n(e.value):Promise.resolve(e.value).then(o,s);a((r=r.apply(e,t)).next())});const wo=(0,e.createContext)(void 0),{Provider:So,Consumer:ko}=wo;function Oo(t){const{spec:r,specUrl:n,options:i,onLoaded:o,children:s}=t,[a,l]=e.useState(null),[c,u]=e.useState(null);if(c)throw c;e.useEffect(()=>{!function(){xo(this,null,function*(){if(r||n){l(null);try{const e=yield be(r||n);l(e)}catch(e){throw o&&o(e),u(e),e}}})}()},[r,n]);const p=e.useMemo(()=>{if(!a)return null;try{return new fc(a,n,i)}catch(e){throw o&&o(e),e}},[a,n,i]);return e.useEffect(()=>{p&&o&&o()},[p,o]),s({loading:!p,store:p})}function _o(){return(0,e.useContext)(wo)}const Eo=e=>Y` + ${e} { + cursor: pointer; + margin-left: -20px; + padding: 0; + line-height: 1; + width: 20px; + display: inline-block; + outline: 0; + } + ${e}:before { + content: ''; + width: 15px; + height: 15px; + background-size: contain; + background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeD0iMCIgeT0iMCIgd2lkdGg9IjUxMiIgaGVpZ2h0PSI1MTIiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA1MTIgNTEyIiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBmaWxsPSIjMDEwMTAxIiBkPSJNNDU5LjcgMjMzLjRsLTkwLjUgOTAuNWMtNTAgNTAtMTMxIDUwLTE4MSAwIC03LjktNy44LTE0LTE2LjctMTkuNC0yNS44bDQyLjEtNDIuMWMyLTIgNC41LTMuMiA2LjgtNC41IDIuOSA5LjkgOCAxOS4zIDE1LjggMjcuMiAyNSAyNSA2NS42IDI0LjkgOTAuNSAwbDkwLjUtOTAuNWMyNS0yNSAyNS02NS42IDAtOTAuNSAtMjQuOS0yNS02NS41LTI1LTkwLjUgMGwtMzIuMiAzMi4yYy0yNi4xLTEwLjItNTQuMi0xMi45LTgxLjYtOC45bDY4LjYtNjguNmM1MC01MCAxMzEtNTAgMTgxIDBDNTA5LjYgMTAyLjMgNTA5LjYgMTgzLjQgNDU5LjcgMjMzLjR6TTIyMC4zIDM4Mi4ybC0zMi4yIDMyLjJjLTI1IDI0LjktNjUuNiAyNC45LTkwLjUgMCAtMjUtMjUtMjUtNjUuNiAwLTkwLjVsOTAuNS05MC41YzI1LTI1IDY1LjUtMjUgOTAuNSAwIDcuOCA3LjggMTIuOSAxNy4yIDE1LjggMjcuMSAyLjQtMS40IDQuOC0yLjUgNi44LTQuNWw0Mi4xLTQyYy01LjQtOS4yLTExLjYtMTgtMTkuNC0yNS44IC01MC01MC0xMzEtNTAtMTgxIDBsLTkwLjUgOTAuNWMtNTAgNTAtNTAgMTMxIDAgMTgxIDUwIDUwIDEzMSA1MCAxODEgMGw2OC42LTY4LjZDMjc0LjYgMzk1LjEgMjQ2LjQgMzkyLjMgMjIwLjMgMzgyLjJ6Ii8+PC9zdmc+Cg=='); + opacity: 0.5; + visibility: hidden; + display: inline-block; + vertical-align: middle; + } + + h1:hover > ${e}::before, h2:hover > ${e}::before, ${e}:hover::before { + visibility: visible; + } +`,Ao=te(function(t){const r=e.useContext(wo),n=e.useCallback(e=>{r&&function(e,t,r){t.defaultPrevented||0!==t.button||(e=>!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey))(t)||(t.preventDefault(),e.replace(encodeURI(r)))}(r.menu.history,e,t.to)},[r,t.to]);return r?e.createElement("a",{className:t.className,href:r.menu.history.linkForId(t.to),onClick:n,"aria-label":t.to},t.children):null})` + ${Eo("&")}; +`;function jo(t){return e.createElement(Ao,{to:t.to})}const Po={left:"90deg",right:"-90deg",up:"-180deg",down:"0"},$o=te(t=>e.createElement("svg",{className:t.className,style:t.style,version:"1.1",viewBox:"0 0 24 24",x:"0",xmlns:"http://www.w3.org/2000/svg",y:"0","aria-hidden":"true"},e.createElement("polygon",{points:"17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 "})))` + height: ${e=>e.size||"18px"}; + width: ${e=>e.size||"18px"}; + min-width: ${e=>e.size||"18px"}; + vertical-align: middle; + float: ${e=>e.float||""}; + transition: transform 0.2s ease-out; + transform: rotateZ(${e=>Po[e.direction||"down"]}); + + polygon { + fill: ${({color:e,theme:t})=>e&&t.colors.responses[e]&&t.colors.responses[e].color||e}; + } +`,Co=te.span` + display: inline-block; + padding: 2px 8px; + margin: 0; + background-color: ${e=>e.color||e.theme.colors[e.type].main}; + color: ${e=>e.theme.colors[e.type].contrastText}; + font-size: ${e=>e.theme.typography.code.fontSize}; + vertical-align: middle; + line-height: 1.6; + border-radius: 4px; + font-weight: ${({theme:e})=>e.typography.fontWeightBold}; + font-size: 12px; + + span[type] { + margin-left: 4px; + } +`,To=Y` + text-decoration: line-through; + color: #707070; +`,Io=te.caption` + text-align: right; + font-size: 0.9em; + font-weight: normal; + color: ${e=>e.theme.colors.text.secondary}; +`,No=te.td` + border-left: 1px solid ${e=>e.theme.schema.linesColor}; + box-sizing: border-box; + position: relative; + padding: 10px 10px 10px 0; + + ${ee.lessThan("small")` + display: block; + overflow: hidden; + `} + + tr:first-of-type > &, + tr.last > & { + border-left-width: 0; + background-position: top left; + background-repeat: no-repeat; + background-size: 1px 100%; + } + + tr:first-of-type > & { + background-image: linear-gradient( + to bottom, + transparent 0%, + transparent 22px, + ${e=>e.theme.schema.linesColor} 22px, + ${e=>e.theme.schema.linesColor} 100% + ); + } + + tr.last > & { + background-image: linear-gradient( + to bottom, + ${e=>e.theme.schema.linesColor} 0%, + ${e=>e.theme.schema.linesColor} 22px, + transparent 22px, + transparent 100% + ); + } + + tr.last + tr > & { + border-left-color: transparent; + } + + tr.last:first-child > & { + background: none; + border-left-color: transparent; + } +`,Ro=te(No)` + padding: 0; +`,Lo=te(No)` + vertical-align: top; + line-height: 20px; + white-space: nowrap; + font-size: 13px; + font-family: ${e=>e.theme.typography.code.fontFamily}; + + &.deprecated { + ${To}; + } + + ${({kind:e})=>"patternProperties"===e&&Y` + > span.property-name { + display: inline-table; + white-space: break-spaces; + margin-right: 20px; + + ::before, + ::after { + content: '/'; + filter: opacity(0.2); + } + } + `} + + ${({kind:e=""})=>["field","additionalProperties","patternProperties"].includes(e)?"":"font-style: italic"}; + + ${re("PropertyNameCell")}; +`,Do=te.td` + border-bottom: 1px solid #9fb4be; + padding: 10px 0; + width: ${e=>e.theme.schema.defaultDetailsWidth}; + box-sizing: border-box; + + tr.expanded & { + border-bottom: none; + } + + ${ee.lessThan("small")` + padding: 0 20px; + border-bottom: none; + border-left: 1px solid ${e=>e.theme.schema.linesColor}; + + tr.last > & { + border-left: none; + } + `} + + ${re("PropertyDetailsCell")}; +`,Mo=te.span` + color: ${e=>e.theme.schema.linesColor}; + font-family: ${e=>e.theme.typography.code.fontFamily}; + margin-right: 10px; + + &::before { + content: ''; + display: inline-block; + vertical-align: middle; + width: 10px; + height: 1px; + background: ${e=>e.theme.schema.linesColor}; + } + + &::after { + content: ''; + display: inline-block; + vertical-align: middle; + width: 1px; + background: ${e=>e.theme.schema.linesColor}; + height: 7px; + } +`,zo=te.div` + padding: ${({theme:e})=>e.schema.nestingSpacing}; +`,Bo=te.table` + border-collapse: separate; + border-radius: 3px; + font-size: ${e=>e.theme.typography.fontSize}; + + border-spacing: 0; + width: 100%; + + > tr { + vertical-align: middle; + } + + ${ee.lessThan("small")` + display: block; + > tr, > tbody > tr { + display: block; + } + `} + + ${ee.lessThan("small",!1," and (-ms-high-contrast:none)")` + td { + float: left; + width: 100%; + } + `} + + & + ${zo}, + & + ${zo} + ${zo} + ${zo}, + & + ${zo} + ${zo} + ${zo} + ${zo} + ${zo} { + margin: ${({theme:e})=>e.schema.nestingSpacing}; + margin-right: 0; + background: ${({theme:e})=>e.schema.nestedBackground}; + } + + & + ${zo} + ${zo}, + & + ${zo} + ${zo} + ${zo} + ${zo}, + & + ${zo} + ${zo} + ${zo} + ${zo} + ${zo} + ${zo} { + background: #ffffff; + } +`,Fo=te.div` + margin: 0 0 3px 0; + display: inline-block; +`,qo=te.span` + font-size: 0.9em; + margin-right: 10px; + color: ${e=>e.theme.colors.primary.main}; + font-family: ${e=>e.theme.typography.headings.fontFamily}; +} +`,Uo=te.button` + display: inline-block; + margin-right: 10px; + margin-bottom: 5px; + font-size: 0.8em; + cursor: pointer; + border: 1px solid ${e=>e.theme.colors.primary.main}; + padding: 2px 10px; + line-height: 1.5em; + outline: none; + &:focus { + box-shadow: 0 0 0 1px ${e=>e.theme.colors.primary.main}; + } + + ${({$deprecated:e})=>e&&To||""}; + + ${e=>e.$active?`\n color: white;\n background-color: ${e.theme.colors.primary.main};\n &:focus {\n box-shadow: none;\n background-color: ${(0,t.darken)(.15,e.theme.colors.primary.main)};\n }\n `:`\n color: ${e.theme.colors.primary.main};\n background-color: white;\n `} +`,Vo=te.div` + font-size: 0.9em; + font-family: ${e=>e.theme.typography.code.fontFamily}; + &::after { + content: ' ['; + } +`,Wo=te.div` + font-size: 0.9em; + font-family: ${e=>e.theme.typography.code.fontFamily}; + &::after { + content: ']'; + } +`;var Ho=r(63053);const Ko=te(Ho.Tabs)` + > ul { + list-style: none; + padding: 0; + margin: 0; + margin: 0 -5px; + + > li { + padding: 5px 10px; + display: inline-block; + + background-color: ${({theme:e})=>e.codeBlock.backgroundColor}; + border-bottom: 1px solid rgba(0, 0, 0, 0.5); + cursor: pointer; + text-align: center; + outline: none; + color: ${({theme:e})=>(0,t.darken)(e.colors.tonalOffset,e.rightPanel.textColor)}; + margin: 0 + ${({theme:e})=>`${e.spacing.unit}px ${e.spacing.unit}px ${e.spacing.unit}px`}; + border: 1px solid ${({theme:e})=>(0,t.darken)(.05,e.codeBlock.backgroundColor)}; + border-radius: 5px; + min-width: 60px; + font-size: 0.9em; + font-weight: bold; + + &.react-tabs__tab--selected { + color: ${e=>e.theme.colors.text.primary}; + background: ${({theme:e})=>e.rightPanel.textColor}; + &:focus { + outline: auto; + } + } + + &:only-child { + flex: none; + min-width: 100px; + } + + &.tab-success { + color: ${e=>e.theme.colors.responses.success.tabTextColor}; + } + + &.tab-redirect { + color: ${e=>e.theme.colors.responses.redirect.tabTextColor}; + } + + &.tab-info { + color: ${e=>e.theme.colors.responses.info.tabTextColor}; + } + + &.tab-error { + color: ${e=>e.theme.colors.responses.error.tabTextColor}; + } + } + } + > .react-tabs__tab-panel { + background: ${({theme:e})=>e.codeBlock.backgroundColor}; + & > div, + & > pre { + padding: ${e=>4*e.theme.spacing.unit}px; + margin: 0; + } + + & > div > pre { + padding: 0; + } + } +`,Qo=(te(Ko)` + > ul { + display: block; + > li { + padding: 2px 5px; + min-width: auto; + margin: 0 15px 0 0; + font-size: 13px; + font-weight: normal; + border-bottom: 1px dashed; + color: ${({theme:e})=>(0,t.darken)(e.colors.tonalOffset,e.rightPanel.textColor)}; + border-radius: 0; + background: none; + + &:last-child { + margin-right: 0; + } + + &.react-tabs__tab--selected { + color: ${({theme:e})=>e.rightPanel.textColor}; + background: none; + } + } + } + > .react-tabs__tab-panel { + & > div, + & > pre { + padding: ${e=>2*e.theme.spacing.unit}px 0; + } + } +`,te.div` + /** + * Based on prism-dark.css + */ + + code[class*='language-'], + pre[class*='language-'] { + /* color: white; + background: none; */ + text-shadow: 0 -0.1em 0.2em black; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + word-wrap: normal; + line-height: 1.5; + + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; + } + + @media print { + code[class*='language-'], + pre[class*='language-'] { + text-shadow: none; + } + } + + /* Code blocks */ + pre[class*='language-'] { + padding: 1em; + margin: 0.5em 0; + overflow: auto; + } + + .token.comment, + .token.prolog, + .token.doctype, + .token.cdata { + color: hsl(30, 20%, 50%); + } + + .token.punctuation { + opacity: 0.7; + } + + .namespace { + opacity: 0.7; + } + + .token.property, + .token.tag, + .token.number, + .token.constant, + .token.symbol { + color: #4a8bb3; + } + + .token.boolean { + color: #e64441; + } + + .token.selector, + .token.attr-name, + .token.string, + .token.char, + .token.builtin, + .token.inserted { + color: #a0fbaa; + & + a, + & + a:visited { + color: #4ed2ba; + text-decoration: underline; + } + } + + .token.property.string { + color: white; + } + + .token.operator, + .token.entity, + .token.url, + .token.variable { + color: hsl(40, 90%, 60%); + } + + .token.atrule, + .token.attr-value, + .token.keyword { + color: hsl(350, 40%, 70%); + } + + .token.regex, + .token.important { + color: #e90; + } + + .token.important, + .token.bold { + font-weight: bold; + } + .token.italic { + font-style: italic; + } + + .token.entity { + cursor: help; + } + + .token.deleted { + color: red; + } + + ${re("Prism")}; +`),Go=te.div` + opacity: 0.7; + transition: opacity 0.3s ease; + text-align: right; + &:focus-within { + opacity: 1; + } + > button { + background-color: transparent; + border: 0; + color: inherit; + padding: 2px 10px; + font-family: ${({theme:e})=>e.typography.fontFamily}; + font-size: ${({theme:e})=>e.typography.fontSize}; + line-height: ${({theme:e})=>e.typography.lineHeight}; + cursor: pointer; + outline: 0; + + :hover, + :focus { + background: rgba(255, 255, 255, 0.1); + } + } +`,Yo=te.div` + &:hover ${Go} { + opacity: 1; + } +`,Xo=te(Qo).attrs({as:"pre"})` + font-family: ${e=>e.theme.typography.code.fontFamily}; + font-size: ${e=>e.theme.typography.code.fontSize}; + overflow-x: auto; + margin: 0; + + white-space: ${({theme:e})=>e.typography.code.wrap?"pre-wrap":"pre"}; +`;var Jo=r(49205),Zo=n.n(Jo),es=Object.defineProperty,ts=Object.getOwnPropertySymbols,rs=Object.prototype.hasOwnProperty,ns=Object.prototype.propertyIsEnumerable,is=(e,t,r)=>t in e?es(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;const os=Zo()||Jo;let ss="";a&&(ss=n(494),ss="function"==typeof ss.toString&&ss.toString()||"",ss="[object Object]"===ss?"":ss);const as=X`${ss}`,ls=te.div` + position: relative; +`;class cs extends e.Component{constructor(){super(...arguments),this.handleRef=e=>{this._container=e}}componentDidMount(){const e=this._container.parentElement&&this._container.parentElement.scrollTop||0;this.inst=new os(this._container,this.props.options||{}),this._container.scrollTo&&this._container.scrollTo(0,e)}componentDidUpdate(){this.inst.update()}componentWillUnmount(){this.inst.destroy()}render(){const{children:t,className:r,updateFn:n}=this.props;return n&&n(this.componentDidUpdate.bind(this)),e.createElement(e.Fragment,null,ss&&e.createElement(as,null),e.createElement(ls,{className:`scrollbar-container ${r}`,ref:this.handleRef},t))}}function us(t){return e.createElement(ue.Consumer,null,r=>r.nativeScrollbars?e.createElement("div",{style:{overflow:"auto",overscrollBehavior:"contain",msOverflowStyle:"-ms-autohiding-scrollbar"}},t.children):e.createElement(cs,((e,t)=>{for(var r in t||(t={}))rs.call(t,r)&&is(e,r,t[r]);if(ts)for(var r of ts(t))ns.call(t,r)&&is(e,r,t[r]);return e})({},t),t.children))}const ps=te(({className:t,style:r})=>e.createElement("svg",{className:t,style:r,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e.createElement("polyline",{points:"6 9 12 15 18 9"})))` + position: absolute; + pointer-events: none; + z-index: 1; + top: 50%; + -webkit-transform: translateY(-50%); + -ms-transform: translateY(-50%); + transform: translateY(-50%); + right: 8px; + margin: auto; + text-align: center; + polyline { + color: ${e=>"dark"===e.variant&&"white"}; + } +`,ds=e.memo(t=>{const{options:r,onChange:n,placeholder:i,value:o="",variant:s,className:a}=t;return e.createElement("div",{className:a},e.createElement(ps,{variant:s}),e.createElement("select",{onChange:e=>{const{selectedIndex:t}=e.target;n(r[i?t-1:t])},value:o,className:"dropdown-select"},i&&e.createElement("option",{disabled:!0,hidden:!0,value:i},i),r.map(({idx:t,value:r,title:n},i)=>e.createElement("option",{key:t||r+i,value:r},n||r))),e.createElement("label",null,o))}),fs=Q()(ds)` + label { + box-sizing: border-box; + min-width: 100px; + outline: none; + display: inline-block; + font-family: ${e=>e.theme.typography.headings.fontFamily}; + color: ${({theme:e})=>e.colors.text.primary}; + vertical-align: bottom; + width: ${({fullWidth:e})=>e?"100%":"auto"}; + text-transform: none; + padding: 0 22px 0 4px; + + font-size: 0.929em; + line-height: 1.5em; + font-family: inherit; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + } + .dropdown-select { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + opacity: 0; + border: none; + appearance: none; + cursor: pointer; + + color: ${({theme:e})=>e.colors.text.primary}; + line-height: inherit; + font-family: inherit; + } + box-sizing: border-box; + min-width: 100px; + outline: none; + display: inline-block; + border-radius: 2px; + border: 1px solid rgba(38, 50, 56, 0.5); + vertical-align: bottom; + padding: 2px 0px 2px 6px; + position: relative; + width: auto; + background: white; + color: #263238; + font-family: ${e=>e.theme.typography.headings.fontFamily}; + font-size: 0.929em; + line-height: 1.5em; + cursor: pointer; + transition: border 0.25s ease, color 0.25s ease, box-shadow 0.25s ease; + + &:hover, + &:focus-within { + border: 1px solid ${e=>e.theme.colors.primary.main}; + color: ${e=>e.theme.colors.primary.main}; + box-shadow: 0px 0px 0px 1px ${e=>e.theme.colors.primary.main}; + } +`,hs=Q()(fs)` + margin-left: 10px; + text-transform: none; + font-size: 0.969em; + + font-size: 1em; + border: none; + padding: 0 1.2em 0 0; + background: transparent; + + &:hover, + &:focus-within { + border: none; + box-shadow: none; + label { + color: ${e=>e.theme.colors.primary.main}; + text-shadow: 0px 0px 0px ${e=>e.theme.colors.primary.main}; + } + } +`,ms=Q().span` + margin-left: 10px; + text-transform: none; + font-size: 0.929em; + color: black; +`;var ys=Object.defineProperty,gs=Object.getOwnPropertySymbols,bs=Object.prototype.hasOwnProperty,vs=Object.prototype.propertyIsEnumerable,xs=(e,t,r)=>t in e?ys(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ws=(e,t)=>{for(var r in t||(t={}))bs.call(t,r)&&xs(e,r,t[r]);if(gs)for(var r of gs(t))vs.call(t,r)&&xs(e,r,t[r]);return e};function Ss(t){const{Label:r=ms,Dropdown:n=hs}=t;return 1===t.options.length?e.createElement(r,null,t.options[0].value):e.createElement(n,ws({},t))}var ks=r(25454);const Os=Y` + a { + text-decoration: ${e=>e.theme.typography.links.textDecoration}; + color: ${e=>e.theme.typography.links.color}; + + &:visited { + color: ${e=>e.theme.typography.links.visited}; + } + + &:hover { + color: ${e=>e.theme.typography.links.hover}; + text-decoration: ${e=>e.theme.typography.links.hoverTextDecoration}; + } + } +`,_s=te(Qo)` + font-family: ${e=>e.theme.typography.fontFamily}; + font-weight: ${e=>e.theme.typography.fontWeightRegular}; + line-height: ${e=>e.theme.typography.lineHeight}; + + p { + &:last-child { + margin-bottom: 0; + } + } + + ${({$compact:e})=>e&&"\n p:first-child {\n margin-top: 0;\n }\n p:last-child {\n margin-bottom: 0;\n }\n "} + + ${({$inline:e})=>e&&" p {\n display: inline-block;\n }"} + + h1 { + ${ho(1)}; + color: ${e=>e.theme.colors.primary.main}; + margin-top: 0; + } + + h2 { + ${ho(2)}; + color: ${e=>e.theme.colors.text.primary}; + } + + code { + color: ${({theme:e})=>e.typography.code.color}; + background-color: ${({theme:e})=>e.typography.code.backgroundColor}; + + font-family: ${e=>e.theme.typography.code.fontFamily}; + border-radius: 2px; + border: 1px solid rgba(38, 50, 56, 0.1); + padding: 0 ${({theme:e})=>e.spacing.unit}px; + font-size: ${e=>e.theme.typography.code.fontSize}; + font-weight: ${({theme:e})=>e.typography.code.fontWeight}; + + word-break: break-word; + } + + pre { + font-family: ${e=>e.theme.typography.code.fontFamily}; + white-space: ${({theme:e})=>e.typography.code.wrap?"pre-wrap":"pre"}; + background-color: ${({theme:e})=>e.codeBlock.backgroundColor}; + color: white; + padding: ${e=>4*e.theme.spacing.unit}px; + overflow-x: auto; + line-height: normal; + border-radius: 0; + border: 1px solid rgba(38, 50, 56, 0.1); + + code { + background-color: transparent; + color: white; + padding: 0; + + &:before, + &:after { + content: none; + } + } + } + + blockquote { + margin: 0; + margin-bottom: 1em; + padding: 0 15px; + color: #777; + border-left: 4px solid #ddd; + } + + img { + max-width: 100%; + box-sizing: content-box; + } + + ul, + ol { + padding-left: 2em; + margin: 0; + margin-bottom: 1em; + + ul, + ol { + margin-bottom: 0; + margin-top: 0; + } + } + + table { + display: block; + width: 100%; + overflow: auto; + word-break: normal; + word-break: keep-all; + border-collapse: collapse; + border-spacing: 0; + margin-top: 1.5em; + margin-bottom: 1.5em; + } + + table tr { + background-color: #fff; + border-top: 1px solid #ccc; + + &:nth-child(2n) { + background-color: ${({theme:e})=>e.schema.nestedBackground}; + } + } + + table th, + table td { + padding: 6px 13px; + border: 1px solid #ddd; + } + + table th { + text-align: left; + font-weight: bold; + } + + ${Eo(".share-link")}; + + ${Os} + + ${re("Markdown")}; +`;var Es=Object.defineProperty,As=Object.defineProperties,js=Object.getOwnPropertyDescriptors,Ps=Object.getOwnPropertySymbols,$s=Object.prototype.hasOwnProperty,Cs=Object.prototype.propertyIsEnumerable,Ts=(e,t,r)=>t in e?Es(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;const Is=Q()(_s)` + display: inline; +`;function Ns(t){var r=t,{inline:n,compact:i}=r,o=((e,t)=>{var r={};for(var n in e)$s.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&Ps)for(var n of Ps(e))t.indexOf(n)<0&&Cs.call(e,n)&&(r[n]=e[n]);return r})(r,["inline","compact"]);const s=n?Is:_s;return e.createElement(de,null,t=>{return e.createElement(s,(r=((e,t)=>{for(var r in t||(t={}))$s.call(t,r)&&Ts(e,r,t[r]);if(Ps)for(var r of Ps(t))Cs.call(t,r)&&Ts(e,r,t[r]);return e})({className:"redoc-markdown "+(o.className||""),dangerouslySetInnerHTML:{__html:(a=t.sanitize,l=o.html,a?ks.sanitize(l):l)},"data-role":o["data-role"]},o),As(r,js({$inline:n,$compact:i}))));var r,a,l})}class Rs extends e.Component{render(){const{source:t,inline:r,compact:n,className:i,"data-role":o}=this.props,s=new Wr;return e.createElement(Ns,{html:s.renderMd(t),inline:r,compact:n,className:i,"data-role":o})}}const Ls=te.div` + position: relative; +`,Ds=te.div` + position: absolute; + min-width: 80px; + max-width: 500px; + background: #fff; + bottom: 100%; + left: 50%; + margin-bottom: 10px; + transform: translateX(-50%); + + border-radius: 4px; + padding: 0.3em 0.6em; + text-align: center; + box-shadow: 0px 0px 5px 0px rgba(204, 204, 204, 1); +`,Ms=te.div` + background: #fff; + color: #000; + display: inline; + font-size: 0.85em; + white-space: nowrap; +`,zs=te.div` + position: absolute; + width: 0; + height: 0; + bottom: -5px; + left: 50%; + margin-left: -5px; + border-left: solid transparent 5px; + border-right: solid transparent 5px; + border-top: solid #fff 5px; +`,Bs=te.div` + position: absolute; + width: 100%; + height: 20px; + bottom: -20px; +`;class Fs extends e.Component{render(){const{open:t,title:r,children:n}=this.props;return e.createElement(Ls,null,n,t&&e.createElement(Ds,null,e.createElement(Ms,null,r),e.createElement(zs,null),e.createElement(Bs,null)))}}const qs="undefined"!=typeof document&&document.queryCommandSupported&&document.queryCommandSupported("copy");class Us{static isSupported(){return qs}static selectElement(e){let t,r;document.body.createTextRange?(t=document.body.createTextRange(),t.moveToElementText(e),t.select()):document.createRange&&window.getSelection&&(r=window.getSelection(),t=document.createRange(),t.selectNodeContents(e),r.removeAllRanges(),r.addRange(t))}static deselect(){if(document.selection)document.selection.empty();else if(window.getSelection){const e=window.getSelection();e&&e.removeAllRanges()}}static copySelected(){let e;try{e=document.execCommand("copy")}catch(t){e=!1}return e}static copyElement(e){Us.selectElement(e);const t=Us.copySelected();return t&&Us.deselect(),t}static copyCustom(e){const t=document.createElement("textarea");t.style.position="fixed",t.style.top="0",t.style.left="0",t.style.width="2em",t.style.height="2em",t.style.padding="0",t.style.border="none",t.style.outline="none",t.style.boxShadow="none",t.style.background="transparent",t.value=e,document.body.appendChild(t),t.select();const r=Us.copySelected();return document.body.removeChild(t),r}}const Vs=t=>{const[r,n]=e.useState(!1),i=()=>{const e="string"==typeof t.data?t.data:JSON.stringify(t.data,null,2);Us.copyCustom(e),o()},o=()=>{n(!0),setTimeout(()=>{n(!1)},1500)};return t.children({renderCopyButton:()=>e.createElement("button",{onClick:i},e.createElement(Fs,{title:Us.isSupported()?"Copied":"Not supported in your browser",open:r},"Copy"))})};let Ws=1;function Hs(e,t){Ws=1;let r="";return r+='
    ',r+="",r+=Xs(e,t),r+="",r+="
    ",r}function Ks(e){return void 0!==e?e.toString().replace(/&/g,"&").replace(/"/g,""").replace(//g,">"):""}function Qs(e){return JSON.stringify(e).slice(1,-1)}function Gs(e,t){return''+Ks(e)+""}function Ys(e){return''+e+""}function Xs(e,t){const r=typeof e;let n="";return null==e?n+=Gs("null","token keyword"):e&&e.constructor===Array?(Ws++,n+=function(e,t){const r=Ws>t?"collapsed":"";let n=`${Ys("[")}
      `,i=!1;const o=e.length;for(let s=0;s
      ',n+=Xs(e[s],t),s";return n+=`
    ${Ys("]")}`,i||(n=Ys("[ ]")),n}(e,t),Ws--):e&&e.constructor===Date?n+=Gs('"'+e.toISOString()+'"',"token string"):"object"===r?(Ws++,n+=function(e,t){const r=Ws>t?"collapsed":"",n=Object.keys(e),i=n.length;let o=`${Ys("{")}
      `,s=!1;for(let a=0;a
      ',o+='"'+Ks(l)+'": ',o+=Xs(e[l],t),a"}return o+=`
    ${Ys("}")}`,s||(o=Ys("{ }")),o}(e,t),Ws--):"number"===r?n+=Gs(e,"token number"):"string"===r?/^(http|https):\/\/[^\s]+$/.test(e)?n+=Gs('"',"token string")+'
    '+Ks(Qs(e))+""+Gs('"',"token string"):n+=Gs('"'+Qs(e)+'"',"token string"):"boolean"===r&&(n+=Gs(e,"token boolean")),n}const Js=Y` + .redoc-json code > .collapser { + display: none; + pointer-events: none; + } + + font-family: ${e=>e.theme.typography.code.fontFamily}; + font-size: ${e=>e.theme.typography.code.fontSize}; + + white-space: ${({theme:e})=>e.typography.code.wrap?"pre-wrap":"pre"}; + contain: content; + overflow-x: auto; + + .callback-function { + color: gray; + } + + .collapser:after { + content: '-'; + cursor: pointer; + } + + .collapsed > .collapser:after { + content: '+'; + cursor: pointer; + } + + .ellipsis:after { + content: ' … '; + } + + .collapsible { + margin-left: 2em; + } + + .hoverable { + padding-top: 1px; + padding-bottom: 1px; + padding-left: 2px; + padding-right: 2px; + border-radius: 2px; + } + + .hovered { + background-color: rgba(235, 238, 249, 1); + } + + .collapser { + background-color: transparent; + border: 0; + color: #fff; + font-family: ${e=>e.theme.typography.code.fontFamily}; + font-size: ${e=>e.theme.typography.code.fontSize}; + padding-right: 6px; + padding-left: 6px; + padding-top: 0; + padding-bottom: 0; + display: flex; + align-items: center; + justify-content: center; + width: 15px; + height: 15px; + position: absolute; + top: 4px; + left: -1.5em; + cursor: default; + user-select: none; + -webkit-user-select: none; + padding: 2px; + &:focus { + outline-color: #fff; + outline-style: dotted; + outline-width: 1px; + } + } + + ul { + list-style-type: none; + padding: 0px; + margin: 0px 0px 0px 26px; + } + + li { + position: relative; + display: block; + } + + .hoverable { + display: inline-block; + } + + .selected { + outline-style: solid; + outline-width: 1px; + outline-style: dotted; + } + + .collapsed > .collapsible { + display: none; + } + + .ellipsis { + display: none; + } + + .collapsed > .ellipsis { + display: inherit; + } +`,Zs=te.div` + &:hover > ${Go} { + opacity: 1; + } +`,ea=te(t=>{const[r,n]=e.useState(),i=({renderCopyButton:r})=>{const i=t.data&&Object.values(t.data).some(e=>"object"==typeof e&&null!==e);return e.createElement(Zs,null,e.createElement(Go,null,r(),i&&e.createElement(e.Fragment,null,e.createElement("button",{onClick:o}," Expand all "),e.createElement("button",{onClick:s}," Collapse all "))),e.createElement(ue.Consumer,null,r=>e.createElement(Qo,{className:t.className,ref:e=>n(e),dangerouslySetInnerHTML:{__html:Hs(t.data,r.jsonSamplesExpandLevel)}})))},o=()=>{const e=null==r?void 0:r.getElementsByClassName("collapsible");for(const t of Array.prototype.slice.call(e)){const e=t.parentNode;e.classList.remove("collapsed"),e.querySelector(".collapser").setAttribute("aria-label","collapse")}},s=()=>{const e=null==r?void 0:r.getElementsByClassName("collapsible"),t=Array.prototype.slice.call(e,1);for(const r of t){const e=r.parentNode;e.classList.add("collapsed"),e.querySelector(".collapser").setAttribute("aria-label","expand")}},a=e=>{let t;"collapser"===e.className&&(t=e.parentElement.getElementsByClassName("collapsible")[0],t.parentElement.classList.contains("collapsed")?(t.parentElement.classList.remove("collapsed"),e.setAttribute("aria-label","collapse")):(t.parentElement.classList.add("collapsed"),e.setAttribute("aria-label","expand")))},l=e.useCallback(e=>{a(e.target)},[]),c=e.useCallback(e=>{"Enter"===e.key&&a(e.target)},[]);return e.useEffect(()=>(null==r||r.addEventListener("click",l),null==r||r.addEventListener("focus",c),()=>{null==r||r.removeEventListener("click",l),null==r||r.removeEventListener("focus",c)}),[l,c,r]),e.createElement(Vs,{data:t.data},i)})` + ${Js}; +`,ta=t=>{const{source:r,lang:n}=t;return e.createElement(Xo,{dangerouslySetInnerHTML:{__html:Et(r,n)}})},ra=t=>{const{source:r,lang:n}=t;return e.createElement(Vs,{data:r},({renderCopyButton:t})=>e.createElement(Yo,null,e.createElement(Go,null,t()),e.createElement(ta,{lang:n,source:r})))};function na({value:t,mimeType:r}){return We(r)?e.createElement(ea,{data:t}):("object"==typeof t&&(t=JSON.stringify(t,null,2)),e.createElement(ra,{lang:et(r),source:t}))}var ia=(e,t,r)=>new Promise((n,i)=>{var o=e=>{try{a(r.next(e))}catch(e){i(e)}},s=e=>{try{a(r.throw(e))}catch(e){i(e)}},a=e=>e.done?n(e.value):Promise.resolve(e.value).then(o,s);a((r=r.apply(e,t)).next())});function oa({example:t,mimeType:r}){return void 0===t.value&&t.externalValueUrl?e.createElement(sa,{example:t,mimeType:r}):e.createElement(na,{value:t.value,mimeType:r})}function sa({example:t,mimeType:r}){const n=function(t,r){const[,n]=(0,e.useState)(!0),i=(0,e.useRef)(void 0),o=(0,e.useRef)(void 0);return o.current!==t&&(i.current=void 0),o.current=t,(0,e.useEffect)(()=>{(()=>{ia(this,null,function*(){n(!0);try{i.current=yield t.getExternalValue(r)}catch(e){i.current=e}n(!1)})})()},[t,r]),i.current}(t,r);return void 0===n?e.createElement("span",null,"Loading..."):n instanceof Error?e.createElement(Xo,null,"Error loading external example: ",e.createElement("br",null),e.createElement("a",{className:"token string",href:t.externalValueUrl,target:"_blank",rel:"noopener noreferrer"},t.externalValueUrl)):e.createElement(na,{value:n,mimeType:r})}const aa=te.div` + padding: 0.9em; + background-color: ${({theme:e})=>(0,t.transparentize)(.6,e.rightPanel.backgroundColor)}; + margin: 0 0 10px 0; + display: block; + font-family: ${({theme:e})=>e.typography.headings.fontFamily}; + font-size: 0.929em; + line-height: 1.5em; +`,la=te.span` + font-family: ${({theme:e})=>e.typography.headings.fontFamily}; + font-size: 12px; + position: absolute; + z-index: 1; + top: -11px; + left: 12px; + font-weight: ${({theme:e})=>e.typography.fontWeightBold}; + color: ${({theme:e})=>(0,t.transparentize)(.3,e.rightPanel.textColor)}; +`,ca=te.div` + position: relative; +`,ua=te(fs)` + label { + color: ${({theme:e})=>e.rightPanel.textColor}; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + font-size: 1em; + text-transform: none; + border: none; + } + margin: 0 0 10px 0; + display: block; + background-color: ${({theme:e})=>(0,t.transparentize)(.6,e.rightPanel.backgroundColor)}; + border: none; + padding: 0.9em 1.6em 0.9em 0.9em; + box-shadow: none; + &:hover, + &:focus-within { + border: none; + box-shadow: none; + background-color: ${({theme:e})=>(0,t.transparentize)(.3,e.rightPanel.backgroundColor)}; + } +`,pa=te.div` + font-family: ${e=>e.theme.typography.code.fontFamily}; + font-size: 12px; + color: #ee807f; +`;class da extends e.Component{constructor(){super(...arguments),this.state={activeIdx:0},this.switchMedia=({idx:e})=>{void 0!==e&&this.setState({activeIdx:e})}}render(){const{activeIdx:t}=this.state,r=this.props.mediaType.examples||{},n=this.props.mediaType.name,i=e.createElement(pa,null,"No sample"),o=Object.keys(r);if(0===o.length)return i;if(o.length>1){const i=o.map((e,t)=>({value:r[e].summary||e,idx:t})),s=r[o[t]],a=s.description;return e.createElement(fa,null,e.createElement(ca,null,e.createElement(la,null,"Example"),this.props.renderDropdown({value:i[t].value,options:i,onChange:this.switchMedia,ariaLabel:"Example"})),e.createElement("div",null,a&&e.createElement(Rs,{source:a}),e.createElement(oa,{example:s,mimeType:n})))}{const t=r[o[0]];return e.createElement(fa,null,t.description&&e.createElement(Rs,{source:t.description}),e.createElement(oa,{example:t,mimeType:n}))}}}const fa=te.div` + margin-top: 15px; +`;var ha=r(48557);const ma=te(Lo)` + &.deprecated { + span.property-name { + ${To} + } + } + + button { + background-color: transparent; + border: 0; + outline: 0; + font-size: 13px; + font-family: ${e=>e.theme.typography.code.fontFamily}; + cursor: pointer; + padding: 0; + color: ${e=>e.theme.colors.text.primary}; + &:focus { + font-weight: ${({theme:e})=>e.typography.fontWeightBold}; + } + ${({kind:e})=>"patternProperties"===e&&Y` + display: inline-flex; + margin-right: 20px; + + > span.property-name { + white-space: break-spaces; + text-align: left; + + ::before, + ::after { + content: '/'; + filter: opacity(0.2); + } + } + + > svg { + align-self: center; + } + `} + } + ${$o} { + height: ${({theme:e})=>e.schema.arrow.size}; + width: ${({theme:e})=>e.schema.arrow.size}; + polygon { + fill: ${({theme:e})=>e.schema.arrow.color}; + } + } +`,ya=te.span` + vertical-align: middle; + font-size: ${({theme:e})=>e.typography.code.fontSize}; + line-height: 20px; +`,ga=te(ya)` + color: ${e=>(0,t.transparentize)(.1,e.theme.schema.typeNameColor)}; +`,ba=te(ya)` + color: ${e=>e.theme.schema.typeNameColor}; +`,va=te(ya)` + color: ${e=>e.theme.schema.typeTitleColor}; + word-break: break-word; +`,xa=ba,wa=te(ya).attrs({as:"div"})` + color: ${e=>e.theme.schema.requireLabelColor}; + font-size: ${e=>e.theme.schema.labelsTextSize}; + font-weight: normal; + margin-left: 20px; + line-height: 1; +`,Sa=te(wa)` + color: ${e=>e.theme.colors.primary.light}; +`,ka=te(ya)` + color: ${({theme:e})=>e.colors.warning.main}; + font-size: 13px; +`,Oa=te(ya)` + color: #0e7c86; + font-family: ${e=>e.theme.typography.code.fontFamily}; + font-size: 12px; + &::before, + &::after { + content: ' '; + } +`,_a=te(ya)` + border-radius: 2px; + word-break: break-word; + ${({theme:e})=>`\n background-color: ${(0,t.transparentize)(.95,e.colors.text.primary)};\n color: ${(0,t.transparentize)(.1,e.colors.text.primary)};\n\n padding: 0 ${e.spacing.unit}px;\n border: 1px solid ${(0,t.transparentize)(.9,e.colors.text.primary)};\n font-family: ${e.typography.code.fontFamily};\n}`}; + & + & { + margin-left: 0; + } + ${re("ExampleValue")}; +`,Ea=te(_a)``,Aa=te(ya)` + border-radius: 2px; + ${({theme:e})=>`\n background-color: ${(0,t.transparentize)(.95,e.colors.primary.light)};\n color: ${(0,t.transparentize)(.1,e.colors.primary.main)};\n\n margin: 0 ${e.spacing.unit}px;\n padding: 0 ${e.spacing.unit}px;\n border: 1px solid ${(0,t.transparentize)(.9,e.colors.primary.main)};\n}`}; + & + & { + margin-left: 0; + } + ${re("ConstraintItem")}; +`,ja=te.button` + background-color: transparent; + border: 0; + color: ${({theme:e})=>e.colors.text.secondary}; + margin-left: ${({theme:e})=>e.spacing.unit}px; + border-radius: 2px; + cursor: pointer; + outline-color: ${({theme:e})=>e.colors.text.secondary}; + font-size: 12px; +`;Object.defineProperty,Object.getOwnPropertyDescriptor;const Pa=te.div` + ${Os}; + ${({$compact:e})=>e?"":"margin: 1em 0"} +`;let $a=class extends e.Component{render(){const{externalDocs:t}=this.props;return t&&t.url?e.createElement(Pa,{$compact:this.props.compact},e.createElement("a",{href:t.url},t.description||t.url)):null}};$a=((e,t)=>{for(var r,n=t,i=e.length-1;i>=0;i--)(r=e[i])&&(n=r(n)||n);return n})([ha.observer],$a);const Ca=te(_s)` + table { + margin-bottom: 0.2em; + } +`;class Ta extends e.PureComponent{constructor(e){super(e),this.state={collapsed:!0},this.toggle=this.toggle.bind(this)}toggle(){this.setState({collapsed:!this.state.collapsed})}render(){const{values:t,type:r}=this.props,{collapsed:n}=this.state,i=!Array.isArray(t),o=Array.isArray(t)&&t||Object.entries(t||{}).map(([e,t])=>({value:e,description:t})),{enumSkipQuotes:s,maxDisplayedEnumValues:a}=this.context;if(!o.length)return null;const l=this.state.collapsed&&a?o.slice(0,a):o,c=!!a&&o.length>a,u=a?n?`\u2026 ${o.length-a} more`:"Hide":"";return e.createElement("div",null,i?e.createElement(e.Fragment,null,e.createElement(Ca,null,e.createElement("table",null,e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",null,e.createElement(ya,null,"array"===r?N("enumArray"):""," ",1===o.length?N("enumSingleValue"):N("enum"))," "),e.createElement("th",null,e.createElement("strong",null,"Description")))),e.createElement("tbody",null,l.map(({description:t,value:r})=>e.createElement("tr",{key:r},e.createElement("td",null,r),e.createElement("td",null,e.createElement(Rs,{source:t,compact:!0,inline:!0}))))))),c?e.createElement(Ia,{onClick:this.toggle},u):null):e.createElement(e.Fragment,null,e.createElement(ya,null,"array"===r?N("enumArray"):""," ",1===t.length?N("enumSingleValue"):N("enum"),":")," ",l.map((t,r)=>{const n=s?String(t):JSON.stringify(t);return e.createElement(e.Fragment,{key:r},e.createElement(_a,null,n)," ")}),c?e.createElement(Ia,{onClick:this.toggle},u):null))}}Ta.contextType=ue;const Ia=te.span` + color: ${e=>e.theme.colors.primary.main}; + vertical-align: middle; + font-size: 13px; + line-height: 20px; + padding: 0 5px; + cursor: pointer; +`,Na=te(_s)` + margin: 2px 0; +`;class Ra extends e.PureComponent{render(){const t=this.props.extensions;return e.createElement(ue.Consumer,null,r=>e.createElement(e.Fragment,null,r.showExtensions&&Object.keys(t).map(r=>e.createElement(Na,{key:r},e.createElement(ya,null," ",r.substring(2),": ")," ",e.createElement(Ea,null,"string"==typeof t[r]?t[r]:JSON.stringify(t[r]))))))}}function La({field:t}){return t.examples?e.createElement(e.Fragment,null,e.createElement(ya,null," ",N("examples"),": "),C(t.examples)?t.examples.map((r,n)=>{const i=Ze(t,r),o=t.in?String(i):JSON.stringify(i);return e.createElement(e.Fragment,{key:n},e.createElement(_a,null,o)," ")}):e.createElement(Da,null,Object.values(t.examples).map((r,n)=>e.createElement("li",{key:n+r.value},e.createElement(_a,null,Ze(t,r.value))," -"," ",r.summary||r.description)))):null}const Da=te.ul` + margin-top: 1em; + list-style-position: outside; +`;class Ma extends e.PureComponent{render(){return 0===this.props.constraints.length?null:e.createElement("span",null," ",this.props.constraints.map(t=>e.createElement(Aa,{key:t}," ",t," ")))}}const za=e.memo(function({value:t,label:r,raw:n}){if(void 0===t)return null;const i=n?String(t):JSON.stringify(t);return e.createElement("div",null,e.createElement(ya,null," ",r," ")," ",e.createElement(_a,null,i))}),Ba=45;function Fa(t){const r=t.schema.pattern,{hideSchemaPattern:n}=e.useContext(ue),[i,o]=e.useState(!1),s=e.useCallback(()=>o(!i),[i]);return!r||n?null:e.createElement(e.Fragment,null,e.createElement(Oa,null,i||r.lengthBa&&e.createElement(ja,{onClick:s},i?"Hide pattern":"Show pattern"))}function qa({schema:t}){var r;const{hideSchemaPattern:n}=e.useContext(ue);return t&&((null==t?void 0:t.pattern)&&!n||t.items||t.displayFormat||(null==(r=t.constraints)?void 0:r.length))?e.createElement(Ua,null,"[ items",t.displayFormat&&e.createElement(xa,null," <",t.displayFormat," >"),e.createElement(Ma,{constraints:t.constraints}),e.createElement(Fa,{schema:t}),t.items&&e.createElement(qa,{schema:t.items})," ]"):null}const Ua=te(ga)` + margin: 0 5px; + vertical-align: text-top; +`;var Va=Object.defineProperty,Wa=Object.getOwnPropertySymbols,Ha=Object.prototype.hasOwnProperty,Ka=Object.prototype.propertyIsEnumerable,Qa=(e,t,r)=>t in e?Va(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ga=(e,t)=>{for(var r in t||(t={}))Ha.call(t,r)&&Qa(e,r,t[r]);if(Wa)for(var r of Wa(t))Ka.call(t,r)&&Qa(e,r,t[r]);return e};const Ya=(0,ha.observer)(t=>{const{enumSkipQuotes:r,hideSchemaTitles:n}=e.useContext(ue),{showExamples:i,field:o,renderDiscriminatorSwitch:s}=t,{schema:a,description:l,deprecated:c,extensions:u,in:p,const:d}=o,f="array"===a.type||C(a.type)&&a.type.includes("array"),h=r||"header"===p,m=e.useMemo(()=>!i||void 0===o.example&&void 0===o.examples?null:void 0!==o.examples?e.createElement(La,{field:o}):e.createElement(za,{label:N("example")+":",value:Ze(o,o.example),raw:Boolean(o.in)}),[o,i]),y=x(a.default)&&o.in?Ze(o,a.default).replace(`${o.name}=`,""):a.default;return e.createElement("div",null,e.createElement("div",null,e.createElement(ga,null,a.typePrefix),e.createElement(ba,null,a.displayType),a.displayFormat&&e.createElement(xa,null," ","<",a.displayFormat,">"," "),a.contentEncoding&&e.createElement(xa,null," ","<",a.contentEncoding,">"," "),a.contentMediaType&&e.createElement(xa,null," ","<",a.contentMediaType,">"," "),a.title&&!n&&e.createElement(va,null," (",a.title,") "),e.createElement(Ma,{constraints:a.constraints}),e.createElement(Fa,{schema:a}),a.isCircular&&e.createElement(ka,null," ",N("recursive")," "),f&&a.items&&e.createElement(qa,{schema:a.items})),c&&e.createElement("div",null,e.createElement(Co,{type:"warning"}," ",N("deprecated")," ")),e.createElement(za,{raw:h,label:N("default")+":",value:y}),!s&&e.createElement(Ta,{type:a.type,values:a["x-enumDescriptions"]||a.enum})," ",m,e.createElement(Ra,{extensions:Ga(Ga({},u),a.extensions)}),e.createElement("div",null,e.createElement(Rs,{compact:!0,source:l})),a.externalDocs&&e.createElement($a,{externalDocs:a.externalDocs,compact:!0}),s&&s(t)||null,d&&e.createElement(za,{label:N("const")+":",value:d})||null)}),Xa=e.memo(Ya);var Ja=Object.defineProperty,Za=(Object.getOwnPropertyDescriptor,Object.getOwnPropertySymbols),el=Object.prototype.hasOwnProperty,tl=Object.prototype.propertyIsEnumerable,rl=(e,t,r)=>t in e?Ja(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;let nl=class extends e.Component{constructor(){super(...arguments),this.toggle=()=>{void 0===this.props.field.expanded&&this.props.expandByDefault?this.props.field.collapse():this.props.field.toggle()},this.handleKeyPress=e=>{"Enter"===e.key&&(e.preventDefault(),this.toggle())}}render(){const{hidePropertiesPrefix:t}=this.context,{className:r="",field:n,isLast:i,expandByDefault:o,fieldParentsName:s=[]}=this.props,{name:a,deprecated:l,required:c,kind:u}=n,p=!n.schema.isPrimitive&&!n.schema.isCircular,d=void 0===n.expanded?o:n.expanded,f=e.createElement(e.Fragment,null,"additionalProperties"===u&&e.createElement(Sa,null,"additional property"),"patternProperties"===u&&e.createElement(Sa,null,"pattern property"),c&&e.createElement(wa,null,"required")),h=p?e.createElement(ma,{className:l?"deprecated":"",kind:u,title:a},e.createElement(Mo,null),e.createElement("button",{onClick:this.toggle,onKeyPress:this.handleKeyPress,"aria-label":`expand ${a}`},!t&&s.map(e=>e+".\u200b"),e.createElement("span",{className:"property-name"},a),e.createElement($o,{direction:d?"down":"right"})),f):e.createElement(Lo,{className:l?"deprecated":void 0,kind:u,title:a},e.createElement(Mo,null),!t&&s.map(e=>e+".\u200b"),e.createElement("span",{className:"property-name"},a),f);return e.createElement(e.Fragment,null,e.createElement("tr",{className:i?"last "+r:r},h,e.createElement(Do,null,e.createElement(Xa,((e,t)=>{for(var r in t||(t={}))el.call(t,r)&&rl(e,r,t[r]);if(Za)for(var r of Za(t))tl.call(t,r)&&rl(e,r,t[r]);return e})({},this.props)))),d&&p&&e.createElement("tr",{key:n.name+"inner"},e.createElement(Ro,{colSpan:2},e.createElement(zo,null,e.createElement(Ml,{schema:n.schema,fieldParentsName:[...s||[],n.name],skipReadOnly:this.props.skipReadOnly,skipWriteOnly:this.props.skipWriteOnly,showTitle:this.props.showTitle,level:this.props.level})))))}};nl.contextType=ue,nl=((e,t)=>{for(var r,n=t,i=e.length-1;i>=0;i--)(r=e[i])&&(n=r(n)||n);return n})([ha.observer],nl),Object.defineProperty,Object.getOwnPropertyDescriptor;let il=class extends e.Component{constructor(){super(...arguments),this.changeActiveChild=e=>{void 0!==e.idx&&this.props.parent.activateOneOf(e.idx)}}sortOptions(e,t){if(0===t.length)return;const r={};t.forEach((e,t)=>{r[e]=t}),e.sort((e,t)=>r[e.value]>r[t.value]?1:-1)}render(){const{parent:t,enumValues:r}=this.props;if(void 0===t.oneOf)return null;const n=t.oneOf.map((e,t)=>({value:e.title,idx:t})),i=n[t.activeOneOf].value;return this.sortOptions(n,r),e.createElement(fs,{value:i,options:n,onChange:this.changeActiveChild,ariaLabel:"Example"})}};il=((e,t)=>{for(var r,n=t,i=e.length-1;i>=0;i--)(r=e[i])&&(n=r(n)||n);return n})([ha.observer],il);const ol=(0,ha.observer)(({schema:{fields:t=[],title:r},showTitle:n,discriminator:i,skipReadOnly:o,skipWriteOnly:s,level:a,fieldParentsName:l})=>{const{expandSingleSchemaField:c,showObjectSchemaExamples:u,schemasExpansionLevel:p}=e.useContext(ue),d=e.useMemo(()=>o||s?t.filter(e=>!(o&&e.schema.readOnly||s&&e.schema.writeOnly)):t,[o,s,t]),h=c&&1===d.length||p>=a;return e.createElement(Bo,null,n&&e.createElement(Io,null,r),e.createElement("tbody",null,f(d,(t,r)=>e.createElement(nl,{key:t.name,isLast:r,field:t,expandByDefault:h,fieldParentsName:Number(a)>1?l:[],renderDiscriminatorSwitch:(null==i?void 0:i.fieldName)===t.name?()=>e.createElement(il,{parent:i.parentSchema,enumValues:t.schema.enum}):void 0,className:t.expanded?"expanded":void 0,showExamples:u,skipReadOnly:o,skipWriteOnly:s,showTitle:n,level:a}))))});var sl=Object.defineProperty,al=Object.defineProperties,ll=Object.getOwnPropertyDescriptors,cl=Object.getOwnPropertySymbols,ul=Object.prototype.hasOwnProperty,pl=Object.prototype.propertyIsEnumerable,dl=(e,t,r)=>t in e?sl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fl=(e,t)=>{for(var r in t||(t={}))ul.call(t,r)&&dl(e,r,t[r]);if(cl)for(var r of cl(t))pl.call(t,r)&&dl(e,r,t[r]);return e},hl=(e,t)=>al(e,ll(t));const ml=te.div` + padding-left: ${({theme:e})=>2*e.spacing.unit}px; +`;class yl extends e.PureComponent{render(){const t=this.props.schema,r=t.items,n=this.props.fieldParentsName,i=void 0===t.minItems&&void 0===t.maxItems?"":`(${st(t)})`,o=n?[...n.slice(0,-1),n[n.length-1]+"[]"]:n;return t.fields?e.createElement(ol,hl(fl({},this.props),{level:this.props.level,fieldParentsName:o})):!t.displayType||r||i.length?e.createElement("div",null,e.createElement(Vo,null," Array ",i),e.createElement(ml,null,e.createElement(Ml,hl(fl({},this.props),{schema:r,fieldParentsName:o}))),e.createElement(Wo,null)):e.createElement("div",null,e.createElement(ba,null,t.displayType))}}var gl=Object.defineProperty,bl=Object.defineProperties,vl=Object.getOwnPropertyDescriptor,xl=Object.getOwnPropertyDescriptors,wl=Object.getOwnPropertySymbols,Sl=Object.prototype.hasOwnProperty,kl=Object.prototype.propertyIsEnumerable,Ol=(e,t,r)=>t in e?gl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_l=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?vl(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&gl(t,r,o),o};let El=class extends e.Component{constructor(){super(...arguments),this.activateOneOf=()=>{this.props.schema.activateOneOf(this.props.idx)}}render(){const{idx:t,schema:r,subSchema:n}=this.props;return e.createElement(Uo,{$deprecated:n.deprecated,$active:t===r.activeOneOf,onClick:this.activateOneOf},n.title||n.typePrefix+n.displayType)}};El=_l([ha.observer],El);let Al=class extends e.Component{render(){const{schema:{oneOf:t},schema:r}=this.props;if(void 0===t)return null;const n=t[r.activeOneOf];return e.createElement("div",null,e.createElement(qo,null," ",r.oneOfType," "),e.createElement(Fo,null,t.map((t,n)=>e.createElement(El,{key:t.pointer,schema:r,subSchema:t,idx:n}))),e.createElement("div",null,t[r.activeOneOf].deprecated&&e.createElement(Co,{type:"warning"},"Deprecated")),e.createElement(Ma,{constraints:n.constraints}),e.createElement(Ml,(i=((e,t)=>{for(var r in t||(t={}))Sl.call(t,r)&&Ol(e,r,t[r]);if(wl)for(var r of wl(t))kl.call(t,r)&&Ol(e,r,t[r]);return e})({},this.props),bl(i,xl({schema:n})))));var i}};Al=_l([ha.observer],Al);const jl=(0,ha.observer)(({schema:t})=>e.createElement("div",null,e.createElement(ba,null,t.displayType),t.title&&e.createElement(va,null," ",t.title," "),e.createElement(ka,null," ",N("recursive")," ")));var Pl=Object.defineProperty,$l=Object.defineProperties,Cl=(Object.getOwnPropertyDescriptor,Object.getOwnPropertyDescriptors),Tl=Object.getOwnPropertySymbols,Il=Object.prototype.hasOwnProperty,Nl=Object.prototype.propertyIsEnumerable,Rl=(e,t,r)=>t in e?Pl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ll=(e,t)=>{for(var r in t||(t={}))Il.call(t,r)&&Rl(e,r,t[r]);if(Tl)for(var r of Tl(t))Nl.call(t,r)&&Rl(e,r,t[r]);return e},Dl=(e,t)=>$l(e,Cl(t));let Ml=class extends e.Component{render(){var t;const r=this.props,{schema:n}=r,i=((e,t)=>{var r={};for(var n in e)Il.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&Tl)for(var n of Tl(e))t.indexOf(n)<0&&Nl.call(e,n)&&(r[n]=e[n]);return r})(r,["schema"]),o=(i.level||0)+1;if(!n)return e.createElement("em",null," Schema not provided ");const{type:s,oneOf:a,discriminatorProp:l,isCircular:c}=n;if(c)return e.createElement(jl,{schema:n});if(void 0!==l){if(!a||!a.length)return console.warn(`Looks like you are using discriminator wrong: you don't have any definition inherited from the ${n.title}`),null;const t=a[n.activeOneOf];return t.isCircular?e.createElement(jl,{schema:t}):e.createElement(ol,Dl(Ll({},i),{level:o,schema:t,discriminator:{fieldName:l,parentSchema:n}}))}if(void 0!==a)return e.createElement(Al,Ll({schema:n},i));const u=C(s)?s:[s];if(u.includes("object")){if(null==(t=n.fields)?void 0:t.length)return e.createElement(ol,Dl(Ll({},this.props),{level:o}))}else if(u.includes("array"))return e.createElement(yl,Dl(Ll({},this.props),{level:o}));const p={schema:n,name:"",required:!1,description:n.description,externalDocs:n.externalDocs,deprecated:!1,toggle:()=>null,expanded:!1};return e.createElement("div",null,e.createElement(Xa,{field:p}))}};Ml=((e,t)=>{for(var r,n=t,i=e.length-1;i>=0;i--)(r=e[i])&&(n=r(n)||n);return n})([ha.observer],Ml);var zl=Object.defineProperty,Bl=Object.defineProperties,Fl=Object.getOwnPropertyDescriptors,ql=Object.getOwnPropertySymbols,Ul=Object.prototype.hasOwnProperty,Vl=Object.prototype.propertyIsEnumerable,Wl=(e,t,r)=>t in e?zl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;class Hl extends e.PureComponent{constructor(){super(...arguments),this.renderDropdown=t=>{return e.createElement(Ss,(r=((e,t)=>{for(var r in t||(t={}))Ul.call(t,r)&&Wl(e,r,t[r]);if(ql)for(var r of ql(t))Vl.call(t,r)&&Wl(e,r,t[r]);return e})({Label:ms,Dropdown:ua},t),Bl(r,Fl({variant:"dark"}))));var r}}static getMediaType(e,t){if(!e)return{};const r={schema:{$ref:e}};return t&&(r.examples={example:{$ref:t}}),r}get mediaModel(){const{parser:e,schemaRef:t,exampleRef:r,options:n}=this.props;return this._mediaModel||(this._mediaModel=new Yn(e,"json",!1,Hl.getMediaType(t,r),n)),this._mediaModel}render(){const{showReadOnly:t=!0,showWriteOnly:r=!1,showExample:n=!0}=this.props;return e.createElement(lo,null,e.createElement(po,null,e.createElement(ao,null,e.createElement(Ml,{skipWriteOnly:!r,skipReadOnly:!t,schema:this.mediaModel.schema})),n&&e.createElement(uo,null,e.createElement(Kl,null,e.createElement(da,{renderDropdown:this.renderDropdown,mediaType:this.mediaModel})))))}}const Kl=te.div` + background: ${({theme:e})=>e.codeBlock.backgroundColor}; + & > div, + & > pre { + padding: ${e=>4*e.theme.spacing.unit}px; + margin: 0; + } + + & > div > pre { + padding: 0; + } +`,Ql=(Q().div` + background-color: #e4e7eb; +`,Q().ul` + display: inline; + list-style: none; + padding: 0; + + li { + display: inherit; + + &:after { + content: ','; + } + &:last-child:after { + content: none; + } + } +`,Q().code` + font-size: ${e=>e.theme.typography.code.fontSize}; + font-family: ${e=>e.theme.typography.code.fontFamily}; + margin: 0 3px; + padding: 0.2em; + display: inline-block; + line-height: 1; + + &:after { + content: ','; + font-weight: normal; + } + + &:last-child:after { + content: none; + } +`),Gl=Q().span` + &:after { + content: ' and '; + font-weight: normal; + } + + &:last-child:after { + content: none; + } + + ${Os}; +`,Yl=Q().span` + ${e=>!e.$expanded&&"white-space: nowrap;"} + &:after { + content: ' or '; + ${e=>e.$expanded&&"content: ' or \\a';"} + white-space: pre; + } + + &:last-child:after, + &:only-child:after { + content: none; + } + + ${Os}; +`,Xl=Q().div` + flex: 1 1 auto; + cursor: pointer; +`,Jl=Q().div` + width: ${e=>e.theme.schema.defaultDetailsWidth}; + text-overflow: ellipsis; + border-radius: 4px; + overflow: hidden; + ${e=>e.$expanded&&`background: ${e.theme.colors.gray[100]};\n padding: 8px 9.6px;\n margin: 20px 0;\n width: 100%;\n `}; + ${ee.lessThan("small")` + margin-top: 10px; + `} +`,Zl=Q()(vo)` + display: inline-block; + margin: 0; +`,ec=Q().div` + width: 100%; + display: flex; + margin: 1em 0; + flex-direction: ${e=>e.$expanded?"column":"row"}; + ${ee.lessThan("small")` + flex-direction: column; + `} +`,tc=Q().div` + margin: 0.5em 0; +`,rc=Q().div` + border-bottom: 1px solid ${({theme:e})=>e.colors.border.dark}; + margin-bottom: 1.5em; + padding-bottom: 0.7em; + + h5 { + line-height: 1em; + margin: 0 0 0.6em; + font-size: ${({theme:e})=>e.typography.fontSize}; + } + + .redoc-markdown p:first-child { + display: inline; + } +`;function nc({children:t,height:r}){const n=e.createRef(),[i,o]=e.useState(!1),[s,a]=e.useState(!1);return e.useEffect(()=>{n.current&&n.current.clientHeight+20{o(!i)}},i?"See less":"See more")))}const ic=Q().div` + overflow-y: hidden; +`,oc=Q().div` + text-align: center; + line-height: 1.5em; + ${({$dimmed:e})=>e&&"background-image: linear-gradient(to bottom, transparent,rgb(255 255 255));\n position: relative;\n top: -0.5em;\n padding-top: 0.5em;\n background-position-y: -1em;\n "} +`,sc=Q().a` + cursor: pointer; +`,ac=e.memo(function(t){const{type:r,flow:n,RequiredScopes:i}=t,o=Object.keys((null==n?void 0:n.scopes)||{});return e.createElement(e.Fragment,null,e.createElement(tc,null,e.createElement("b",null,"Flow type: "),e.createElement("code",null,r," ")),("implicit"===r||"authorizationCode"===r)&&e.createElement(tc,null,e.createElement("strong",null," Authorization URL: "),e.createElement("code",null,e.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:n.authorizationUrl},n.authorizationUrl))),("password"===r||"clientCredentials"===r||"authorizationCode"===r)&&e.createElement(tc,null,e.createElement("b",null," Token URL: "),e.createElement("code",null,n.tokenUrl)),n.refreshUrl&&e.createElement(tc,null,e.createElement("strong",null," Refresh URL: "),e.createElement("code",null,n.refreshUrl)),!!o.length&&e.createElement(e.Fragment,null,i||null,e.createElement(tc,null,e.createElement("b",null," Scopes: ")),e.createElement(nc,{height:"4em"},e.createElement("ul",null,o.map(t=>e.createElement("li",{key:t},e.createElement("code",null,t)," -"," ",e.createElement(Rs,{className:"redoc-markdown",inline:!0,source:n.scopes[t]||""})))))))});function lc(t){const{RequiredScopes:r,scheme:n}=t;return e.createElement(_s,null,n.apiKey?e.createElement(e.Fragment,null,e.createElement(tc,null,e.createElement("b",null,E(n.apiKey.in||"")," parameter name: "),e.createElement("code",null,n.apiKey.name)),r):n.http?e.createElement(e.Fragment,null,e.createElement(tc,null,e.createElement("b",null,"HTTP Authorization Scheme: "),e.createElement("code",null,n.http.scheme)),e.createElement(tc,null,"bearer"===n.http.scheme&&n.http.bearerFormat&&e.createElement(e.Fragment,null,e.createElement("b",null,"Bearer format: "),e.createElement("code",null,n.http.bearerFormat))),r):n.openId?e.createElement(e.Fragment,null,e.createElement(tc,null,e.createElement("b",null,"Connect URL: "),e.createElement("code",null,e.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:n.openId.connectUrl},n.openId.connectUrl))),r):n.flows?Object.keys(n.flows).map(t=>e.createElement(ac,{key:t,type:t,RequiredScopes:r,flow:n.flows[t]})):null)}const cc={oauth2:"OAuth2",apiKey:"API Key",http:"HTTP",openIdConnect:"OpenID Connect"};class uc extends e.PureComponent{render(){return this.props.securitySchemes.schemes.map(t=>e.createElement(lo,{id:t.sectionId,key:t.id},e.createElement(po,null,e.createElement(ao,null,e.createElement(yo,null,e.createElement(jo,{to:t.sectionId}),t.displayName),e.createElement(Rs,{source:t.description||""}),e.createElement(rc,null,e.createElement(tc,null,e.createElement("b",null,"Security Scheme Type: "),e.createElement("span",null,cc[t.type]||t.type)),e.createElement(lc,{scheme:t}))))))}}var pc=(e,t,r)=>new Promise((n,i)=>{var o=e=>{try{a(r.next(e))}catch(e){i(e)}},s=e=>{try{a(r.throw(e))}catch(e){i(e)}},a=e=>e.done?n(e.value):Promise.resolve(e.value).then(o,s);a((r=r.apply(e,t)).next())});function dc(e,t){return pc(this,arguments,function*(e,t,r={}){const n=yield be(e||t);return new fc(n,t,r)})}class fc{constructor(e,t,r={},n=!0){this.marker=new Qt,this.disposer=null,this.rawOptions=r,this.options=new H(r,hc),this.scroll=new oo(this.options),to.updateOnHistory(Ht.currentId,this.scroll),this.spec=new Ri(e,t,this.options),this.menu=new to(this.spec,this.scroll,Ht),this.options.disableSearch||(this.search=new so,n&&this.search.indexItems(this.menu.items),this.disposer=(0,fe.observe)(this.menu,"activeItemIdx",e=>{this.updateMarkOnMenu(e.newValue)}))}static fromJS(e){const t=new fc(e.spec.data,e.spec.url,e.options,!1);return t.menu.activeItemIdx=e.menu.activeItemIdx||0,t.menu.activate(t.menu.flatItems[t.menu.activeItemIdx]),t.options.disableSearch||t.search.load(e.searchIndex),t}onDidMount(){this.menu.updateOnHistory(),this.updateMarkOnMenu(this.menu.activeItemIdx)}dispose(){this.scroll.dispose(),this.menu.dispose(),this.search&&this.search.dispose(),null!=this.disposer&&this.disposer()}toJS(){return pc(this,null,function*(){return{menu:{activeItemIdx:this.menu.activeItemIdx},spec:{url:this.spec.parser.specUrl,data:this.spec.parser.spec},searchIndex:this.search?yield this.search.toJS():void 0,options:this.rawOptions}})}updateMarkOnMenu(e){const t=Math.max(0,e),r=Math.min(this.menu.flatItems.length,t+5),n=[];for(let i=t;i({securitySchemes:e.spec.securitySchemes})},[ht]:{component:uc,propsSelector:e=>({securitySchemes:e.spec.securitySchemes})},[mt]:{component:Hl,propsSelector:e=>({parser:e.spec.parser,options:e.options})}}},mc=te(mo)` + margin-top: 0; + margin-bottom: 0.5em; + + ${re("ApiHeader")}; +`,yc=te.a` + border: 1px solid ${e=>e.theme.colors.primary.main}; + color: ${e=>e.theme.colors.primary.main}; + font-weight: normal; + margin-left: 0.5em; + padding: 4px 8px 4px; + display: inline-block; + text-decoration: none; + cursor: pointer; + + ${re("DownloadButton")}; +`,gc=te.span` + &::before { + content: '|'; + display: inline-block; + opacity: 0.5; + width: ${15}px; + text-align: center; + } + + &:last-child::after { + display: none; + } +`,bc=te.div` + overflow: hidden; +`,vc=te.div` + display: flex; + flex-wrap: wrap; + // hide separator on new lines: idea from https://stackoverflow.com/a/31732902/1749888 + margin-left: -${15}px; +`;Object.defineProperty,Object.getOwnPropertyDescriptor;let xc=class extends e.Component{render(){const{store:t}=this.props,{info:r,externalDocs:n}=t.spec,i=t.options.hideDownloadButtons,o=r.downloadUrls,s=r.downloadFileName,a=r.license&&e.createElement(gc,null,"License:"," ",r.license.identifier?r.license.identifier:e.createElement("a",{href:r.license.url},r.license.name))||null,l=r.contact&&r.contact.url&&e.createElement(gc,null,"URL: ",e.createElement("a",{href:r.contact.url},r.contact.url))||null,c=r.contact&&r.contact.email&&e.createElement(gc,null,r.contact.name||"E-mail",":"," ",e.createElement("a",{href:"mailto:"+r.contact.email},r.contact.email))||null,u=r.termsOfService&&e.createElement(gc,null,e.createElement("a",{href:r.termsOfService},"Terms of Service"))||null,p=r.version&&e.createElement("span",null,"(",r.version,")")||null;return e.createElement(lo,null,e.createElement(po,null,e.createElement(ao,{className:"api-info"},e.createElement(mc,null,r.title," ",p),!i&&e.createElement("p",null,N("downloadSpecification"),":",null==o?void 0:o.map(({title:t,url:r})=>e.createElement(yc,{download:s||!0,target:"_blank",href:r,rel:"noreferrer",key:r},t))),e.createElement(_s,null,(r.license||r.contact||r.termsOfService)&&e.createElement(bc,null,e.createElement(vc,null,c," ",l," ",a," ",u))||null),e.createElement(Rs,{source:t.spec.info.summary,"data-role":"redoc-summary"}),e.createElement(Rs,{source:t.spec.info.description,"data-role":"redoc-description"}),n&&e.createElement($a,{externalDocs:n}))))}};xc=((e,t)=>{for(var r,n=t,i=e.length-1;i>=0;i--)(r=e[i])&&(n=r(n)||n);return n})([ha.observer],xc);const wc=te.img` + max-height: ${e=>e.theme.logo.maxHeight}; + max-width: ${e=>e.theme.logo.maxWidth}; + padding: ${e=>e.theme.logo.gutter}; + width: 100%; + display: block; +`,Sc=te.div` + text-align: center; +`,kc=te.a` + display: inline-block; +`;Object.defineProperty,Object.getOwnPropertyDescriptor;let Oc=class extends e.Component{render(){const{info:t}=this.props,r=t["x-logo"];if(!r||!r.url)return null;const n=r.href||t.contact&&t.contact.url,i=r.altText?r.altText:"logo",o=e.createElement(wc,{src:r.url,alt:i});return e.createElement(Sc,{style:{backgroundColor:r.backgroundColor}},n?(s=n,t=>e.createElement(kc,{href:s},t))(o):o);var s}};Oc=((e,t)=>{for(var r,n=t,i=e.length-1;i>=0;i--)(r=e[i])&&(n=r(n)||n);return n})([ha.observer],Oc);var _c=Object.defineProperty,Ec=Object.getOwnPropertySymbols,Ac=Object.prototype.hasOwnProperty,jc=Object.prototype.propertyIsEnumerable,Pc=(e,t,r)=>t in e?_c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$c=(e,t)=>{for(var r in t||(t={}))Ac.call(t,r)&&Pc(e,r,t[r]);if(Ec)for(var r of Ec(t))jc.call(t,r)&&Pc(e,r,t[r]);return e};class Cc extends e.Component{render(){return e.createElement(de,null,t=>e.createElement(ko,null,e=>this.renderWithOptionsAndStore(t,e)))}renderWithOptionsAndStore(t,r){const{source:n,htmlWrap:i=e=>e}=this.props;if(!r)throw new Error("When using components in markdown, store prop must be provided");const o=new Wr(t,this.props.parentId).renderMdWithComponents(n);return o.length?o.map((t,n)=>{if("string"==typeof t)return e.cloneElement(i(e.createElement(Ns,{html:t,inline:!1,compact:!1})),{key:n});const o=t.component;return e.createElement(o,$c({key:n},$c($c({},t.props),t.propsSelector(r))))}):null}}var Tc=r(46942);const Ic=te.span.attrs(e=>({className:`operation-type ${e.type}`}))` + width: 9ex; + display: inline-block; + height: ${e=>e.theme.typography.code.fontSize}; + line-height: ${e=>e.theme.typography.code.fontSize}; + background-color: ${e=>e.color||"#333"}; + border-radius: 3px; + background-repeat: no-repeat; + background-position: 6px 4px; + font-size: 7px; + font-family: Verdana, sans-serif; // web-safe + color: white; + text-transform: uppercase; + text-align: center; + font-weight: bold; + vertical-align: middle; + margin-right: 6px; + margin-top: 2px; + + &.get { + background-color: ${({theme:e})=>e.colors.http.get}; + } + + &.post { + background-color: ${({theme:e})=>e.colors.http.post}; + } + + &.put { + background-color: ${({theme:e})=>e.colors.http.put}; + } + + &.options { + background-color: ${({theme:e})=>e.colors.http.options}; + } + + &.patch { + background-color: ${({theme:e})=>e.colors.http.patch}; + } + + &.delete { + background-color: ${({theme:e})=>e.colors.http.delete}; + } + + &.basic { + background-color: ${({theme:e})=>e.colors.http.basic}; + } + + &.link { + background-color: ${({theme:e})=>e.colors.http.link}; + } + + &.head { + background-color: ${({theme:e})=>e.colors.http.head}; + } + + &.hook { + background-color: ${({theme:e})=>e.colors.primary.main}; + } + + &.schema { + background-color: ${({theme:e})=>e.colors.http.basic}; + } +`;function Nc(e,{theme:t},r){return e>1?t.sidebar.level1Items[r]:1===e?t.sidebar.groupItems[r]:""}const Rc=te.ul` + margin: 0; + padding: 0; + + &:first-child { + padding-bottom: 32px; + } + + & & { + font-size: 0.929em; + } + + ${e=>e.$expanded?"":"display: none;"}; +`,Lc=te.li` + list-style: none inside none; + overflow: hidden; + text-overflow: ellipsis; + padding: 0; + ${e=>0===e.depth?"margin-top: 15px":""}; +`,Dc={0:Y` + opacity: 0.7; + text-transform: ${({theme:e})=>e.sidebar.groupItems.textTransform}; + font-size: 0.8em; + padding-bottom: 0; + cursor: default; + `,1:Y` + font-size: 0.929em; + text-transform: ${({theme:e})=>e.sidebar.level1Items.textTransform}; + `},Mc=te.label.attrs(e=>({className:Tc("-depth"+e.$depth,{active:e.$active})}))` + cursor: pointer; + color: ${e=>e.$active?Nc(e.$depth,e,"activeTextColor"):e.theme.sidebar.textColor}; + margin: 0; + padding: 12.5px ${e=>4*e.theme.spacing.unit}px; + ${({$depth:e,$type:t,theme:r})=>"section"===t&&e>1&&"padding-left: "+8*r.spacing.unit+"px;"||""} + display: flex; + justify-content: space-between; + font-family: ${e=>e.theme.typography.headings.fontFamily}; + ${e=>Dc[e.$depth]}; + background-color: ${e=>e.$active?Nc(e.$depth,e,"activeBackgroundColor"):e.theme.sidebar.backgroundColor}; + + ${e=>e.$deprecated&&To||""}; + + &:hover { + color: ${e=>Nc(e.$depth,e,"activeTextColor")}; + background-color: ${e=>Nc(e.$depth,e,"activeBackgroundColor")}; + } + + ${$o} { + height: ${({theme:e})=>e.sidebar.arrow.size}; + width: ${({theme:e})=>e.sidebar.arrow.size}; + polygon { + fill: ${({theme:e})=>e.sidebar.arrow.color}; + } + } +`,zc=te.span` + display: inline-block; + vertical-align: middle; + width: ${e=>e.width?e.width:"auto"}; + overflow: hidden; + text-overflow: ellipsis; +`,Bc=te.div` + ${({theme:e})=>Y` + font-size: 0.8em; + margin-top: ${2*e.spacing.unit}px; + text-align: center; + position: fixed; + width: ${e.sidebar.width}; + bottom: 0; + background: ${e.sidebar.backgroundColor}; + + a, + a:visited, + a:hover { + color: ${e.sidebar.textColor} !important; + padding: ${e.spacing.unit}px 0; + border-top: 1px solid ${(0,t.darken)(.1,e.sidebar.backgroundColor)}; + text-decoration: none; + display: flex; + align-items: center; + justify-content: center; + } + `}; + img { + width: 15px; + margin-right: 5px; + } + + ${ee.lessThan("small")` + width: 100%; + `}; +`,Fc=te.button` + border: 0; + width: 100%; + text-align: left; + & > * { + vertical-align: middle; + } + + ${$o} { + polygon { + fill: ${({theme:e})=>(0,t.darken)(e.colors.tonalOffset,e.colors.gray[100])}; + } + } +`,qc=te.span` + text-decoration: ${e=>e.$deprecated?"line-through":"none"}; + margin-right: 8px; +`,Uc=te(Ic)` + margin: 0 5px 0 0; +`,Vc=te(t=>{const{name:r,opened:n,className:i,onClick:o,httpVerb:s,deprecated:a}=t;return e.createElement(Fc,{className:i,onClick:o||void 0},e.createElement(Uc,{type:s},bt(s)),e.createElement($o,{size:"1.5em",direction:n?"down":"right",float:"left"}),e.createElement(qc,{$deprecated:a},r),a?e.createElement(Co,{type:"warning"}," ",N("deprecated")," "):null)})` + padding: 10px; + border-radius: 2px; + margin-bottom: 4px; + line-height: 1.5em; + background-color: ${({theme:e})=>e.colors.gray[100]}; + cursor: pointer; + outline-color: ${({theme:e})=>(0,t.darken)(e.colors.tonalOffset,e.colors.gray[100])}; +`,Wc=te.div` + padding: 10px 25px; + background-color: ${({theme:e})=>e.colors.gray[50]}; + margin-bottom: 5px; + margin-top: 5px; +`;class Hc extends e.PureComponent{constructor(){super(...arguments),this.selectElement=()=>{Us.selectElement(this.child)}}render(){const{children:t}=this.props;return e.createElement("div",{ref:e=>this.child=e,onClick:this.selectElement,onFocus:this.selectElement,tabIndex:0,role:"button"},t)}}const Kc=te.div` + cursor: pointer; + position: relative; + margin-bottom: 5px; +`,Qc=te.span` + font-family: ${e=>e.theme.typography.code.fontFamily}; + margin-left: 10px; + flex: 1; + overflow-x: hidden; + text-overflow: ellipsis; +`,Gc=te.button` + outline: 0; + color: inherit; + width: 100%; + text-align: left; + cursor: pointer; + padding: 10px 30px 10px ${e=>e.$inverted?"10px":"20px"}; + border-radius: ${e=>e.$inverted?"0":"4px 4px 0 0"}; + background-color: ${e=>e.$inverted?"transparent":e.theme.codeBlock.backgroundColor}; + display: flex; + white-space: nowrap; + align-items: center; + border: ${e=>e.$inverted?"0":"1px solid transparent"}; + border-bottom: ${e=>e.$inverted?"1px solid #ccc":"0"}; + transition: border-color 0.25s ease; + + ${e=>e.$expanded&&!e.$inverted&&`border-color: ${e.theme.colors.border.dark};`||""} + + .${Qc} { + color: ${e=>e.$inverted?e.theme.colors.text.primary:"#ffffff"}; + } + &:focus { + box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.45), 0 2px 0 rgba(128, 128, 128, 0.25); + } +`,Yc=te.span.attrs(e=>({className:`http-verb ${e.type}`}))` + font-size: ${e=>e.$compact?"0.8em":"0.929em"}; + line-height: ${e=>e.$compact?"18px":"20px"}; + background-color: ${e=>e.theme.colors.http[e.type]||"#999999"}; + color: #ffffff; + padding: ${e=>e.$compact?"2px 8px":"3px 10px"}; + text-transform: uppercase; + font-family: ${e=>e.theme.typography.headings.fontFamily}; + margin: 0; +`,Xc=te.div` + position: absolute; + width: 100%; + z-index: 100; + background: ${e=>e.theme.rightPanel.servers.overlay.backgroundColor}; + color: ${e=>e.theme.rightPanel.servers.overlay.textColor}; + box-sizing: border-box; + box-shadow: 0 0 6px rgba(0, 0, 0, 0.33); + overflow: hidden; + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + transition: all 0.25s ease; + visibility: hidden; + ${e=>e.$expanded?"visibility: visible;":"transform: translateY(-50%) scaleY(0);"} +`,Jc=te.div` + padding: 10px; +`,Zc=te.div` + padding: 5px; + border: 1px solid #ccc; + background: ${e=>e.theme.rightPanel.servers.url.backgroundColor}; + word-break: break-all; + color: ${e=>e.theme.colors.primary.main}; + > span { + color: ${e=>e.theme.colors.text.primary}; + } +`;class eu extends e.Component{constructor(e){super(e),this.toggle=()=>{this.setState({expanded:!this.state.expanded})},this.state={expanded:!1}}render(){const{operation:t,inverted:r,hideHostname:n}=this.props,{expanded:i}=this.state;return e.createElement(ue.Consumer,null,o=>e.createElement(Kc,null,e.createElement(Gc,{onClick:this.toggle,$expanded:i,$inverted:r},e.createElement(Yc,{type:t.httpVerb,$compact:this.props.compact},t.httpVerb),e.createElement(Qc,null,t.path),e.createElement($o,{float:"right",color:r?"black":"white",size:"20px",direction:i?"up":"down",style:{marginRight:"-25px"}})),e.createElement(Xc,{$expanded:i,"aria-hidden":!i},t.servers.map(r=>{const i=o.expandDefaultServerVariables?pt(r.url,r.variables):r.url,s=_(i);return e.createElement(Jc,{key:i},e.createElement(Rs,{source:r.description||"",compact:!0}),e.createElement(Hc,null,e.createElement(Zc,null,e.createElement("span",null,n||o.hideHostname?"/"===s?"":s:i),t.path)))}))))}}class tu extends e.PureComponent{render(){const{place:t,parameters:r}=this.props;return r&&r.length?e.createElement("div",{key:t},e.createElement(vo,null,t," Parameters"),e.createElement(Bo,null,e.createElement("tbody",null,f(r,(t,r)=>e.createElement(nl,{key:t.name,isLast:r,field:t,showExamples:!0}))))):null}}Object.defineProperty,Object.getOwnPropertyDescriptor;let ru=class extends e.Component{constructor(){super(...arguments),this.switchMedia=({idx:e})=>{this.props.content&&void 0!==e&&this.props.content.activate(e)}}render(){const{content:t}=this.props;if(!t||!t.mediaTypes||!t.mediaTypes.length)return null;const r=t.activeMimeIdx,n=t.mediaTypes.map((e,t)=>({value:e.name,idx:t})),i=({children:t})=>this.props.withLabel?e.createElement(ca,null,e.createElement(la,null,"Content type"),t):t;return e.createElement(e.Fragment,null,e.createElement(i,null,this.props.renderDropdown({value:n[r].value,options:n,onChange:this.switchMedia,ariaLabel:"Content type"})),this.props.children(t.active))}};ru=((e,t)=>{for(var r,n=t,i=e.length-1;i>=0;i--)(r=e[i])&&(n=r(n)||n);return n})([ha.observer],ru);var nu=Object.defineProperty,iu=Object.getOwnPropertySymbols,ou=Object.prototype.hasOwnProperty,su=Object.prototype.propertyIsEnumerable,au=(e,t,r)=>t in e?nu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lu=(e,t)=>{for(var r in t||(t={}))ou.call(t,r)&&au(e,r,t[r]);if(iu)for(var r of iu(t))su.call(t,r)&&au(e,r,t[r]);return e},cu=(e,t)=>{var r={};for(var n in e)ou.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&iu)for(var n of iu(e))t.indexOf(n)<0&&su.call(e,n)&&(r[n]=e[n]);return r};const uu=["path","query","cookie","header"];class pu extends e.PureComponent{orderParams(e){const t={};return e.forEach(e=>{var r,n,i;i=e,(r=t)[n=e.in]||(r[n]=[]),r[n].push(i)}),t}render(){const{body:t,parameters:r=[]}=this.props;if(void 0===t&&void 0===r)return null;const n=this.orderParams(r),i=r.length>0?uu:[],o=t&&t.content,s=t&&t.description,a=t&&t.required;return e.createElement(e.Fragment,null,i.map(t=>e.createElement(tu,{key:t,place:t,parameters:n[t]})),o&&e.createElement(fu,{content:o,description:s,bodyRequired:a}))}}function du(t){var r=t,{bodyRequired:n}=r,i=cu(r,["bodyRequired"]);const o="boolean"==typeof n&&!!n,s="boolean"==typeof n&&!n;return e.createElement(vo,{key:"header"},"Request Body schema: ",e.createElement(Ss,lu({},i)),o&&e.createElement(mu,null,"required"),s&&e.createElement(yu,null,"optional"))}function fu(t){const{content:r,description:n,bodyRequired:i}=t,{isRequestType:o}=r;return e.createElement(ru,{content:r,renderDropdown:t=>e.createElement(du,lu({bodyRequired:i},t))},({schema:t})=>e.createElement(e.Fragment,null,void 0!==n&&e.createElement(Rs,{source:n}),"object"===(null==t?void 0:t.type)&&e.createElement(Ma,{constraints:(null==t?void 0:t.constraints)||[]}),e.createElement(Ml,{skipReadOnly:o,skipWriteOnly:!o,key:"schema",schema:t})))}const hu="\n text-transform: lowercase;\n margin-left: 0;\n line-height: 1.5em;\n",mu=te(wa)` + ${hu} +`,yu=te("div")` + ${hu} + color: ${({theme:e})=>e.colors.text.secondary}; + font-size: ${e=>e.theme.schema.labelsTextSize}; +`,gu=e.memo(function({title:t,type:r,empty:n,code:i,opened:o,className:s,onClick:a}){return e.createElement("button",{className:s,onClick:!n&&a||void 0,"aria-expanded":o,disabled:n},!n&&e.createElement($o,{size:"1.5em",color:r,direction:o?"down":"right",float:"left"}),e.createElement(wu,null,i," "),e.createElement(Rs,{compact:!0,inline:!0,source:t}))}),bu=te(gu)` + display: block; + border: 0; + width: 100%; + text-align: left; + padding: 10px; + border-radius: 2px; + margin-bottom: 4px; + line-height: 1.5em; + cursor: pointer; + + color: ${e=>e.theme.colors.responses[e.type].color}; + background-color: ${e=>e.theme.colors.responses[e.type].backgroundColor}; + &:focus { + outline: auto ${e=>e.theme.colors.responses[e.type].color}; + } + ${e=>e.empty?'\ncursor: default;\n&::before {\n content: "\u2014";\n font-weight: bold;\n width: 1.5em;\n text-align: center;\n display: inline-block;\n vertical-align: top;\n}\n&:focus {\n outline: 0;\n}\n':""}; +`,vu=te.div` + padding: 10px; +`,xu=te(vo).attrs({as:"caption"})` + text-align: left; + margin-top: 1em; + caption-side: top; +`,wu=te.strong` + vertical-align: top; +`;class Su extends e.PureComponent{render(){const{headers:t}=this.props;return void 0===t||0===t.length?null:e.createElement(Bo,null,e.createElement(xu,null," Response Headers "),e.createElement("tbody",null,f(t,(t,r)=>e.createElement(nl,{isLast:r,key:t.name,field:t,showExamples:!0}))))}}var ku=Object.defineProperty,Ou=Object.getOwnPropertySymbols,_u=Object.prototype.hasOwnProperty,Eu=Object.prototype.propertyIsEnumerable,Au=(e,t,r)=>t in e?ku(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;class ju extends e.PureComponent{constructor(){super(...arguments),this.renderDropdown=t=>e.createElement(vo,{key:"header"},"Response Schema: ",e.createElement(Ss,((e,t)=>{for(var r in t||(t={}))_u.call(t,r)&&Au(e,r,t[r]);if(Ou)for(var r of Ou(t))Eu.call(t,r)&&Au(e,r,t[r]);return e})({},t)))}render(){const{description:t,extensions:r,headers:n,content:i}=this.props.response;return e.createElement(e.Fragment,null,t&&e.createElement(Rs,{source:t}),e.createElement(Ra,{extensions:r}),e.createElement(Su,{headers:n}),e.createElement(ru,{content:i,renderDropdown:this.renderDropdown},({schema:t})=>e.createElement(e.Fragment,null,"object"===(null==t?void 0:t.type)&&e.createElement(Ma,{constraints:(null==t?void 0:t.constraints)||[]}),e.createElement(Ml,{skipWriteOnly:!0,key:"schema",schema:t}))))}}const Pu=(0,ha.observer)(({response:t})=>{const{extensions:r,headers:n,type:i,summary:o,description:s,code:a,expanded:l,content:c}=t,u=e.useMemo(()=>void 0===c?[]:c.mediaTypes.filter(e=>void 0!==e.schema),[c]),p=e.useMemo(()=>!(r&&0!==Object.keys(r).length||0!==n.length||0!==u.length||s),[r,n,u,s]);return e.createElement("div",null,e.createElement(bu,{onClick:()=>t.toggle(),type:i,empty:p,title:o||"",code:a,opened:l}),l&&!p&&e.createElement(vu,null,e.createElement(ju,{response:t})))}),$u=te.h3` + font-size: 1.3em; + padding: 0.2em 0; + margin: 3em 0 1.1em; + color: ${({theme:e})=>e.colors.text.primary}; + font-weight: normal; +`;class Cu extends e.PureComponent{render(){const{responses:t,isCallback:r}=this.props;return t&&0!==t.length?e.createElement("div",null,e.createElement($u,null,N(r?"callbackResponses":"responses")),t.map(t=>e.createElement(Pu,{key:t.code,response:t}))):null}}function Tu(t){const{security:r,showSecuritySchemeType:n,expanded:i}=t,o=r.schemes.length>1;return 0===r.schemes.length?e.createElement(Yl,{$expanded:i},"None"):e.createElement(Yl,{$expanded:i},o&&"(",r.schemes.map(t=>e.createElement(Gl,{key:t.id},n&&`${cc[t.type]||t.type}: `,e.createElement("i",null,t.displayName),i&&t.scopes.length?[" (",t.scopes.map(t=>e.createElement(Ql,{key:t},t)),") "]:null)),o&&") ")}const Iu=({scopes:t})=>t.length?e.createElement("div",null,e.createElement("b",null,"Required scopes: "),t.map((t,r)=>e.createElement(e.Fragment,{key:r},e.createElement("code",null,t)," "))):null;function Nu(t){const r=_o(),n=null==r?void 0:r.options.showSecuritySchemeType,[i,o]=(0,e.useState)(!1),{securities:s}=t;if(!(null==s?void 0:s.length)||(null==r?void 0:r.options.hideSecuritySection))return null;const a=null==r?void 0:r.spec.securitySchemes.schemes.filter(({id:e})=>s.find(t=>t.schemes.find(t=>t.id===e)));return e.createElement(e.Fragment,null,e.createElement(ec,{$expanded:i},e.createElement(Xl,{onClick:()=>o(!i)},e.createElement(Zl,null,"Authorizations:"),e.createElement($o,{size:"1.3em",direction:i?"down":"right"})),e.createElement(Jl,{$expanded:i},s.map((t,r)=>e.createElement(Tu,{key:r,expanded:i,showSecuritySchemeType:n,security:t})))),i&&!!(null==a?void 0:a.length)&&a.map((t,r)=>e.createElement(rc,{key:r},e.createElement("h5",null,e.createElement(Ru,null)," ",cc[t.type]||t.type,": ",t.id),e.createElement(Rs,{source:t.description||""}),e.createElement(lc,{key:t.id,scheme:t,RequiredScopes:e.createElement(Iu,{scopes:Lu(t.id,s)})}))))}const Ru=()=>e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"11",height:"11"},e.createElement("path",{fill:"currentColor",d:"M18 10V6A6 6 0 0 0 6 6v4H3v14h18V10h-3zM8 6c0-2.206 1.794-4 4-4s4 1.794 4 4v4H8V6zm11 16H5V12h14v10z"}));function Lu(e,t){const r=[];let n=t.length;for(;n--;){const i=t[n];let o=i.schemes.length;for(;o--;){const t=i.schemes[o];t.id===e&&Array.isArray(t.scopes)&&r.push(...t.scopes)}}return Array.from(new Set(r))}Object.defineProperty,Object.getOwnPropertyDescriptor;let Du=class extends e.Component{render(){const{operation:t}=this.props,{description:r,externalDocs:n}=t,i=!(!r&&!n);return e.createElement(Wc,null,i&&e.createElement(Mu,null,void 0!==r&&e.createElement(Rs,{source:r}),n&&e.createElement($a,{externalDocs:n})),e.createElement(eu,{operation:this.props.operation,inverted:!0,compact:!0}),e.createElement(Ra,{extensions:t.extensions}),e.createElement(Nu,{securities:t.security}),e.createElement(pu,{parameters:t.parameters,body:t.requestBody}),e.createElement(Cu,{responses:t.responses,isCallback:t.isCallback}))}};Du=((e,t)=>{for(var r,n=t,i=e.length-1;i>=0;i--)(r=e[i])&&(n=r(n)||n);return n})([ha.observer],Du);const Mu=te.div` + margin-bottom: ${({theme:e})=>3*e.spacing.unit}px; +`;Object.defineProperty,Object.getOwnPropertyDescriptor;let zu=class extends e.Component{constructor(){super(...arguments),this.toggle=()=>{this.props.callbackOperation.toggle()}}render(){const{name:t,expanded:r,httpVerb:n,deprecated:i}=this.props.callbackOperation;return e.createElement(e.Fragment,null,e.createElement(Vc,{onClick:this.toggle,name:t,opened:r,httpVerb:n,deprecated:i}),r&&e.createElement(Du,{operation:this.props.callbackOperation}))}};zu=((e,t)=>{for(var r,n=t,i=e.length-1;i>=0;i--)(r=e[i])&&(n=r(n)||n);return n})([ha.observer],zu);class Bu extends e.PureComponent{render(){const{callbacks:t}=this.props;return t&&0!==t.length?e.createElement("div",null,e.createElement(Fu,null," Callbacks "),t.map(t=>t.operations.map((r,n)=>e.createElement(zu,{key:`${t.name}_${n}`,callbackOperation:r})))):null}}const Fu=te.h3` + font-size: 1.3em; + padding: 0.2em 0; + margin: 3em 0 1.1em; + color: ${({theme:e})=>e.colors.text.primary}; + font-weight: normal; +`;Object.defineProperty,Object.getOwnPropertyDescriptor;let qu=class extends e.Component{constructor(e){super(e),this.switchItem=({idx:e})=>{this.props.items&&void 0!==e&&this.setState({activeItemIdx:e})},this.state={activeItemIdx:0}}render(){const{items:t}=this.props;if(!t||!t.length)return null;const r=({children:t})=>this.props.label?e.createElement(ca,null,e.createElement(la,null,this.props.label),t):t;return e.createElement(e.Fragment,null,e.createElement(r,null,this.props.renderDropdown({value:this.props.options[this.state.activeItemIdx].value,options:this.props.options,onChange:this.switchItem,ariaLabel:this.props.label||"Callback"})),this.props.children(t[this.state.activeItemIdx]))}};qu=((e,t)=>{for(var r,n=t,i=e.length-1;i>=0;i--)(r=e[i])&&(n=r(n)||n);return n})([ha.observer],qu);var Uu=Object.defineProperty,Vu=Object.defineProperties,Wu=(Object.getOwnPropertyDescriptor,Object.getOwnPropertyDescriptors),Hu=Object.getOwnPropertySymbols,Ku=Object.prototype.hasOwnProperty,Qu=Object.prototype.propertyIsEnumerable,Gu=(e,t,r)=>t in e?Uu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;let Yu=class extends e.Component{constructor(){super(...arguments),this.renderDropdown=t=>{return e.createElement(Ss,(r=((e,t)=>{for(var r in t||(t={}))Ku.call(t,r)&&Gu(e,r,t[r]);if(Hu)for(var r of Hu(t))Qu.call(t,r)&&Gu(e,r,t[r]);return e})({Label:aa,Dropdown:ua},t),Vu(r,Wu({variant:"dark"}))));var r}}render(){const t=this.props.content;return void 0===t?null:e.createElement(ru,{content:t,renderDropdown:this.renderDropdown,withLabel:!0},t=>e.createElement(da,{key:"samples",mediaType:t,renderDropdown:this.renderDropdown}))}};Yu=((e,t)=>{for(var r,n=t,i=e.length-1;i>=0;i--)(r=e[i])&&(n=r(n)||n);return n})([ha.observer],Yu);class Xu extends e.Component{render(){const t=this.props.callback.codeSamples.find(e=>mi(e));return t?e.createElement(Ju,null,e.createElement(Yu,{content:t.requestBodyContent})):null}}const Ju=te.div` + margin-top: 15px; +`;var Zu=Object.defineProperty,ep=Object.defineProperties,tp=(Object.getOwnPropertyDescriptor,Object.getOwnPropertyDescriptors),rp=Object.getOwnPropertySymbols,np=Object.prototype.hasOwnProperty,ip=Object.prototype.propertyIsEnumerable,op=(e,t,r)=>t in e?Zu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;let sp=class extends e.Component{constructor(){super(...arguments),this.renderDropdown=t=>{return e.createElement(Ss,(r=((e,t)=>{for(var r in t||(t={}))np.call(t,r)&&op(e,r,t[r]);if(rp)for(var r of rp(t))ip.call(t,r)&&op(e,r,t[r]);return e})({Label:aa,Dropdown:ua},t),ep(r,tp({variant:"dark"}))));var r}}render(){const{callbacks:t}=this.props;if(!t||0===t.length)return null;const r=t.map(e=>e.operations.map(e=>e)).reduce((e,t)=>e.concat(t),[]);if(!r.some(e=>e.codeSamples.length>0))return null;const n=r.map((e,t)=>({value:`${e.httpVerb.toUpperCase()}: ${e.name}`,idx:t}));return e.createElement("div",null,e.createElement(bo,null," Callback payload samples "),e.createElement(ap,null,e.createElement(qu,{items:r,renderDropdown:this.renderDropdown,label:"Callback",options:n},t=>e.createElement(Xu,{key:"callbackPayloadSample",callback:t,renderDropdown:this.renderDropdown}))))}};sp.contextType=ue,sp=((e,t)=>{for(var r,n=t,i=e.length-1;i>=0;i--)(r=e[i])&&(n=r(n)||n);return n})([ha.observer],sp);const ap=te.div` + background: ${({theme:e})=>e.codeBlock.backgroundColor}; + padding: ${e=>4*e.theme.spacing.unit}px; +`;Object.defineProperty,Object.getOwnPropertyDescriptor;let lp=class extends e.Component{render(){const{operation:t}=this.props,r=t.codeSamples,n=r.length>0,i=1===r.length&&this.context.hideSingleRequestSampleTab;return n&&e.createElement("div",null,e.createElement(bo,null," ",N("requestSamples")," "),e.createElement(Ko,{defaultIndex:0},e.createElement(Ho.TabList,{hidden:i},r.map(t=>e.createElement(Ho.Tab,{key:t.lang+"_"+(t.label||"")},void 0!==t.label?t.label:t.lang))),r.map(t=>e.createElement(Ho.TabPanel,{key:t.lang+"_"+(t.label||"")},mi(t)?e.createElement("div",null,e.createElement(Yu,{content:t.requestBodyContent})):e.createElement(ra,{lang:t.lang,source:t.source})))))||null}};lp.contextType=ue,lp=((e,t)=>{for(var r,n=t,i=e.length-1;i>=0;i--)(r=e[i])&&(n=r(n)||n);return n})([ha.observer],lp),Object.defineProperty,Object.getOwnPropertyDescriptor;let cp=class extends e.Component{render(){const{operation:t}=this.props,r=t.responses.filter(e=>e.content&&e.content.hasSample);return r.length>0&&e.createElement("div",null,e.createElement(bo,null," ",N("responseSamples")," "),e.createElement(Ko,{defaultIndex:0},e.createElement(Ho.TabList,null,r.map(t=>e.createElement(Ho.Tab,{className:"tab-"+t.type,key:t.code},t.code))),r.map(t=>e.createElement(Ho.TabPanel,{key:t.code},e.createElement("div",null,e.createElement(Yu,{content:t.content}))))))||null}};cp=((e,t)=>{for(var r,n=t,i=e.length-1;i>=0;i--)(r=e[i])&&(n=r(n)||n);return n})([ha.observer],cp);var up=Object.defineProperty,pp=Object.defineProperties,dp=Object.getOwnPropertyDescriptors,fp=Object.getOwnPropertySymbols,hp=Object.prototype.hasOwnProperty,mp=Object.prototype.propertyIsEnumerable,yp=(e,t,r)=>t in e?up(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;const gp=te.div` + margin-bottom: ${({theme:e})=>6*e.spacing.unit}px; +`,bp=(0,ha.observer)(({operation:t})=>{const{name:r,description:n,deprecated:i,externalDocs:o,isWebhook:s,httpVerb:a,badges:l}=t,c=!(!n&&!o),{showWebhookVerb:u}=e.useContext(ue),p=l.filter(({position:e})=>"before"===e),d=l.filter(({position:e})=>"after"===e);return e.createElement(ue.Consumer,null,l=>{return e.createElement(po,(f=((e,t)=>{for(var r in t||(t={}))hp.call(t,r)&&yp(e,r,t[r]);if(fp)for(var r of fp(t))mp.call(t,r)&&yp(e,r,t[r]);return e})({},{[eo]:t.operationHash}),h={id:t.operationHash},pp(f,dp(h))),e.createElement(ao,null,e.createElement(yo,null,e.createElement(jo,{to:t.id}),p.map(({name:t,color:r})=>e.createElement(Co,{type:"primary",key:t,color:r},t)),r," ",i&&e.createElement(Co,{type:"warning"}," Deprecated "),s&&e.createElement(Co,{type:"primary"}," ","Webhook ",u&&a&&"| "+a.toUpperCase()),d.map(({name:t,color:r})=>e.createElement(Co,{type:"primary",key:t,color:r},t))),l.pathInMiddlePanel&&!s&&e.createElement(eu,{operation:t,inverted:!0}),c&&e.createElement(gp,null,void 0!==n&&e.createElement(Rs,{source:n}),o&&e.createElement($a,{externalDocs:o})),e.createElement(Ra,{extensions:t.extensions}),e.createElement(Nu,{securities:t.security}),e.createElement(pu,{parameters:t.parameters,body:t.requestBody}),e.createElement(Cu,{responses:t.responses}),e.createElement(Bu,{callbacks:t.callbacks})),e.createElement(uo,null,!l.pathInMiddlePanel&&!s&&e.createElement(eu,{operation:t}),e.createElement(lp,{operation:t}),e.createElement(cp,{operation:t}),e.createElement(sp,{callbacks:t.callbacks})));var f,h})});var vp=Object.defineProperty,xp=Object.getOwnPropertyDescriptor,wp=Object.getOwnPropertySymbols,Sp=Object.prototype.hasOwnProperty,kp=Object.prototype.propertyIsEnumerable,Op=(e,t,r)=>t in e?vp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_p=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?xp(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&vp(t,r,o),o};let Ep=class extends e.Component{render(){const t=this.props.items;return 0===t.length?null:t.map(t=>e.createElement(Ap,{key:t.id,item:t}))}};Ep=_p([ha.observer],Ep);let Ap=class extends e.Component{render(){const t=this.props.item;let r;const{type:n}=t;switch(n){case"group":r=null;break;case"tag":case"section":default:r=e.createElement(Pp,((e,t)=>{for(var r in t||(t={}))Sp.call(t,r)&&Op(e,r,t[r]);if(wp)for(var r of wp(t))kp.call(t,r)&&Op(e,r,t[r]);return e})({},this.props));break;case"operation":r=e.createElement($p,{item:t})}return e.createElement(e.Fragment,null,r&&e.createElement(lo,{id:t.id,$underlined:"operation"===t.type},r),t.items&&e.createElement(Ep,{items:t.items}))}};Ap=_p([ha.observer],Ap);const jp=t=>e.createElement(ao,{$compact:!0},t);let Pp=class extends e.Component{render(){const{name:t,description:r,externalDocs:n,level:i}=this.props.item,o=2===i?go:yo;return e.createElement(e.Fragment,null,e.createElement(po,null,e.createElement(ao,{$compact:!1},e.createElement(o,null,e.createElement(jo,{to:this.props.item.id}),t))),e.createElement(Cc,{parentId:this.props.item.id,source:r||"",htmlWrap:jp}),n&&e.createElement(po,null,e.createElement(ao,null,e.createElement($a,{externalDocs:n}))))}};Pp=_p([ha.observer],Pp);let $p=class extends e.Component{render(){return e.createElement(bp,{operation:this.props.item})}};$p=_p([ha.observer],$p);var Cp=Object.defineProperty,Tp=Object.defineProperties,Ip=(Object.getOwnPropertyDescriptor,Object.getOwnPropertyDescriptors),Np=Object.getOwnPropertySymbols,Rp=Object.prototype.hasOwnProperty,Lp=Object.prototype.propertyIsEnumerable,Dp=(e,t,r)=>t in e?Cp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;let Mp=class extends e.Component{constructor(){super(...arguments),this.ref=e.createRef(),this.activate=e=>{this.props.onActivate(this.props.item),e.stopPropagation()}}componentDidMount(){this.scrollIntoViewIfActive()}componentDidUpdate(){this.scrollIntoViewIfActive()}scrollIntoViewIfActive(){this.props.item.active&&this.ref.current&&u(this.ref.current)}render(){const{item:t,withoutChildren:r}=this.props;return e.createElement(Lc,{tabIndex:0,onClick:this.activate,depth:t.depth,"data-item-id":t.id,role:"menuitem"},"operation"===t.type?e.createElement(zp,(n=((e,t)=>{for(var r in t||(t={}))Rp.call(t,r)&&Dp(e,r,t[r]);if(Np)for(var r of Np(t))Lp.call(t,r)&&Dp(e,r,t[r]);return e})({},this.props),Tp(n,Ip({item:t})))):e.createElement(Mc,{$depth:t.depth,$active:t.active,$type:t.type,ref:this.ref},"schema"===t.type&&e.createElement(Ic,{type:"schema"},"schema"),e.createElement(zc,{width:"calc(100% - 38px)",title:t.sidebarLabel},t.sidebarLabel,this.props.children),t.depth>0&&t.items.length>0&&e.createElement($o,{float:"right",direction:t.expanded?"down":"right"})||null),!r&&t.items&&t.items.length>0&&e.createElement(Wp,{expanded:t.expanded,items:t.items,onActivate:this.props.onActivate}));var n}};Mp=((e,t)=>{for(var r,n=t,i=e.length-1;i>=0;i--)(r=e[i])&&(n=r(n)||n);return n})([ha.observer],Mp);const zp=(0,ha.observer)(t=>{var r;const{item:n}=t,i=e.createRef(),{showWebhookVerb:o}=e.useContext(ue);return e.useEffect(()=>{t.item.active&&i.current&&u(i.current)},[t.item.active,i]),e.createElement(Mc,{$depth:n.depth,$active:n.active,$deprecated:n.deprecated,ref:i},n.badges&&(null==(r=n.badges)?void 0:r.map(({name:t,color:r})=>e.createElement(Ic,{type:"badge",color:r,key:t},t))),n.isWebhook?e.createElement(Ic,{type:"hook"},o?n.httpVerb:N("webhook")):e.createElement(Ic,{type:n.httpVerb},bt(n.httpVerb)),e.createElement(zc,{tabIndex:0,width:"calc(100% - 38px)"},n.sidebarLabel,t.children))});var Bp=Object.defineProperty,Fp=(Object.getOwnPropertyDescriptor,Object.getOwnPropertySymbols),qp=Object.prototype.hasOwnProperty,Up=Object.prototype.propertyIsEnumerable,Vp=(e,t,r)=>t in e?Bp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;let Wp=class extends e.Component{render(){const{items:t,root:r,className:n}=this.props,i=null==this.props.expanded||this.props.expanded;return e.createElement(Rc,((e,t)=>{for(var r in t||(t={}))qp.call(t,r)&&Vp(e,r,t[r]);if(Fp)for(var r of Fp(t))Up.call(t,r)&&Vp(e,r,t[r]);return e})({className:n,style:this.props.style,$expanded:i},r?{role:"menu"}:{}),t.map((t,r)=>e.createElement(Mp,{key:r,item:t,onActivate:this.props.onActivate})))}};function Hp(){const[t,r]=(0,e.useState)(!1);return(0,e.useEffect)(()=>{r(!0)},[]),t?e.createElement("img",{alt:"redocly logo",onError:()=>r(!1),src:"https://cdn.redoc.ly/redoc/logo-mini.svg"}):null}Wp=((e,t)=>{for(var r,n=t,i=e.length-1;i>=0;i--)(r=e[i])&&(n=r(n)||n);return n})([ha.observer],Wp),Object.defineProperty,Object.getOwnPropertyDescriptor;let Kp=class extends e.Component{constructor(){super(...arguments),this.activate=e=>{if(e&&e.active&&this.context.menuToggle)return e.expanded?e.collapse():e.expand();this.props.menu.activateAndScroll(e,!0),setTimeout(()=>{this._updateScroll&&this._updateScroll()})},this.saveScrollUpdate=e=>{this._updateScroll=e}}render(){const t=this.props.menu;return e.createElement(us,{updateFn:this.saveScrollUpdate,className:this.props.className,options:{wheelPropagation:!1}},e.createElement(Wp,{items:t.items,onActivate:this.activate,root:!0}),e.createElement(Bc,null,e.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://redocly.com/redoc/"},e.createElement(Hp,null),"API docs by Redocly")))}};Kp.contextType=ue,Kp=((e,t)=>{for(var r,n=t,i=e.length-1;i>=0;i--)(r=e[i])&&(n=r(n)||n);return n})([ha.observer],Kp);const Qp=({open:t})=>{const r=t?8:-4;return e.createElement(Yp,null,e.createElement(Gp,{size:15,style:{transform:`translate(2px, ${r}px) rotate(180deg)`,transition:"transform 0.2s ease"}}),e.createElement(Gp,{size:15,style:{transform:`translate(2px, ${0-r}px)`,transition:"transform 0.2s ease"}}))},Gp=({size:t=10,className:r="",style:n})=>e.createElement("svg",{className:r,style:n||{},viewBox:"0 0 926.23699 573.74994",version:"1.1",x:"0px",y:"0px",width:t,height:t},e.createElement("g",{transform:"translate(904.92214,-879.1482)"},e.createElement("path",{d:"\n m -673.67664,1221.6502 -231.2455,-231.24803 55.6165,\n -55.627 c 30.5891,-30.59485 56.1806,-55.627 56.8701,-55.627 0.6894,\n 0 79.8637,78.60862 175.9427,174.68583 l 174.6892,174.6858 174.6892,\n -174.6858 c 96.079,-96.07721 175.253196,-174.68583 175.942696,\n -174.68583 0.6895,0 26.281,25.03215 56.8701,\n 55.627 l 55.6165,55.627 -231.245496,231.24803 c -127.185,127.1864\n -231.5279,231.248 -231.873,231.248 -0.3451,0 -104.688,\n -104.0616 -231.873,-231.248 z\n ",fill:"currentColor"}))),Yp=te.div` + user-select: none; + width: 20px; + height: 20px; + align-self: center; + display: flex; + flex-direction: column; + color: ${e=>e.theme.colors.primary.main}; +`;let Xp;Object.defineProperty,Object.getOwnPropertyDescriptor,a&&(Xp=n(230));const Jp=Xp&&Xp(),Zp=te.div` + width: ${e=>e.theme.sidebar.width}; + background-color: ${e=>e.theme.sidebar.backgroundColor}; + overflow: hidden; + display: flex; + flex-direction: column; + + backface-visibility: hidden; + /* contain: strict; TODO: breaks layout since Chrome 80*/ + + height: 100vh; + position: sticky; + position: -webkit-sticky; + top: 0; + + ${ee.lessThan("small")` + position: fixed; + z-index: 20; + width: 100%; + background: ${({theme:e})=>e.sidebar.backgroundColor}; + display: ${e=>e.$open?"flex":"none"}; + `}; + + @media print { + display: none; + } +`,ed=te.div` + outline: none; + user-select: none; + background-color: ${({theme:e})=>e.fab.backgroundColor}; + color: ${e=>e.theme.colors.primary.main}; + display: none; + cursor: pointer; + position: fixed; + right: 20px; + z-index: 100; + border-radius: 50%; + box-shadow: 0 0 20px rgba(0, 0, 0, 0.3); + ${ee.lessThan("small")` + display: flex; + `}; + + bottom: 44px; + + width: 60px; + height: 60px; + padding: 0 20px; + svg { + color: ${({theme:e})=>e.fab.color}; + } + + @media print { + display: none; + } +`;let td=class extends e.Component{constructor(){super(...arguments),this.state={offsetTop:"0px"},this.toggleNavMenu=()=>{this.props.menu.toggleSidebar()}}componentDidMount(){Jp&&Jp.add(this.stickyElement),this.setState({offsetTop:this.getScrollYOffset(this.context)})}componentWillUnmount(){Jp&&Jp.remove(this.stickyElement)}getScrollYOffset(e){let t;return t=void 0!==this.props.scrollYOffset?H.normalizeScrollYOffset(this.props.scrollYOffset)():e.scrollYOffset(),t+"px"}render(){const t=this.props.menu.sideBarOpened,r=this.state.offsetTop;return e.createElement(e.Fragment,null,e.createElement(Zp,{$open:t,className:this.props.className,style:{top:r,height:`calc(100vh - ${r})`},ref:e=>{this.stickyElement=e}},this.props.children),!this.context.hideFab&&e.createElement(ed,{onClick:this.toggleNavMenu},e.createElement(Qp,{open:t})))}};td.contextType=ue,td=((e,t)=>{for(var r,n=t,i=e.length-1;i>=0;i--)(r=e[i])&&(n=r(n)||n);return n})([ha.observer],td);const rd=te.div` + ${({theme:e})=>`\n font-family: ${e.typography.fontFamily};\n font-size: ${e.typography.fontSize};\n font-weight: ${e.typography.fontWeightRegular};\n line-height: ${e.typography.lineHeight};\n color: ${e.colors.text.primary};\n display: flex;\n position: relative;\n text-align: left;\n\n -webkit-font-smoothing: ${e.typography.smoothing};\n font-smoothing: ${e.typography.smoothing};\n ${e.typography.optimizeSpeed?"text-rendering: optimizeSpeed !important":""};\n\n tap-highlight-color: rgba(0, 0, 0, 0);\n text-size-adjust: 100%;\n\n * {\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(255, 255, 255, 0);\n }\n`}; +`,nd=te.div` + z-index: 1; + position: relative; + overflow: hidden; + width: calc(100% - ${e=>e.theme.sidebar.width}); + ${ee.lessThan("small",!0)` + width: 100%; + `}; + + contain: layout; +`,id=te.div` + background: ${({theme:e})=>e.rightPanel.backgroundColor}; + position: absolute; + top: 0; + bottom: 0; + right: 0; + width: ${({theme:e})=>{if(e.rightPanel.width.endsWith("%")){const t=parseInt(e.rightPanel.width,10);return`calc((100% - ${e.sidebar.width}) * ${t/100})`}return e.rightPanel.width}}; + ${ee.lessThan("medium",!0)` + display: none; + `}; +`,od=te.div` + padding: 5px 0; +`,sd=te.input.attrs(()=>({className:"search-input"}))` + width: calc(100% - ${e=>8*e.theme.spacing.unit}px); + box-sizing: border-box; + margin: 0 ${e=>4*e.theme.spacing.unit}px; + padding: 5px ${e=>2*e.theme.spacing.unit}px 5px + ${e=>4*e.theme.spacing.unit}px; + border: 0; + border-bottom: 1px solid + ${({theme:e})=>((0,t.getLuminance)(e.sidebar.backgroundColor)>.5?t.darken:t.lighten)(.1,e.sidebar.backgroundColor)}; + font-family: ${({theme:e})=>e.typography.fontFamily}; + font-weight: bold; + font-size: 13px; + color: ${e=>e.theme.sidebar.textColor}; + background-color: transparent; + outline: none; +`,ad=te(t=>e.createElement("svg",{className:t.className,version:"1.1",viewBox:"0 0 1000 1000",x:"0px",xmlns:"http://www.w3.org/2000/svg",y:"0px"},e.createElement("path",{d:"M968.2,849.4L667.3,549c83.9-136.5,66.7-317.4-51.7-435.6C477.1-25,252.5-25,113.9,113.4c-138.5,138.3-138.5,362.6,0,501C219.2,730.1,413.2,743,547.6,666.5l301.9,301.4c43.6,43.6,76.9,14.9,104.2-12.4C981,928.3,1011.8,893,968.2,849.4z M524.5,522c-88.9,88.7-233,88.7-321.8,0c-88.9-88.7-88.9-232.6,0-321.3c88.9-88.7,233-88.7,321.8,0C613.4,289.4,613.4,433.3,524.5,522z"}))).attrs({className:"search-icon"})` + position: absolute; + left: ${e=>4*e.theme.spacing.unit}px; + height: 1.8em; + width: 0.9em; + + path { + fill: ${e=>e.theme.sidebar.textColor}; + } +`,ld=te.div` + padding: ${e=>e.theme.spacing.unit}px 0; + background-color: ${({theme:e})=>(0,t.darken)(.05,e.sidebar.backgroundColor)}}; + color: ${e=>e.theme.sidebar.textColor}; + min-height: 150px; + max-height: 250px; + border-top: ${({theme:e})=>(0,t.darken)(.1,e.sidebar.backgroundColor)}}; + border-bottom: ${({theme:e})=>(0,t.darken)(.1,e.sidebar.backgroundColor)}}; + margin-top: 10px; + line-height: 1.4; + font-size: 0.9em; + + li { + background-color: inherit; + } + + ${Mc} { + padding-top: 6px; + padding-bottom: 6px; + + &:hover, + &.active { + background-color: ${({theme:e})=>(0,t.darken)(.1,e.sidebar.backgroundColor)}; + } + + > svg { + display: none; + } + } +`,cd=te.i` + position: absolute; + display: inline-block; + width: ${e=>2*e.theme.spacing.unit}px; + text-align: center; + right: ${e=>4*e.theme.spacing.unit}px; + line-height: 2em; + vertical-align: middle; + margin-right: 2px; + cursor: pointer; + font-style: normal; + color: '#666'; +`;var ud=Object.defineProperty,pd=Object.getOwnPropertyDescriptor;class dd extends e.PureComponent{constructor(e){super(e),this.activeItemRef=null,this.clear=()=>{this.setState({results:[],noResults:!1,term:"",activeItemIdx:-1}),this.props.marker.unmark()},this.handleKeyDown=e=>{if(27===e.keyCode&&this.clear(),40===e.keyCode&&(this.setState({activeItemIdx:Math.min(this.state.activeItemIdx+1,this.state.results.length-1)}),e.preventDefault()),38===e.keyCode&&(this.setState({activeItemIdx:Math.max(0,this.state.activeItemIdx-1)}),e.preventDefault()),13===e.keyCode){const e=this.state.results[this.state.activeItemIdx];if(e){const t=this.props.getItemById(e.meta);t&&this.props.onActivate(t)}}},this.search=e=>{const{minCharacterLengthToInitSearch:t}=this.context,r=e.target.value;r.lengththis.searchCallback(this.state.term))},this.state={results:[],noResults:!1,term:"",activeItemIdx:-1}}clearResults(e){this.setState({results:[],noResults:!1,term:e}),this.props.marker.unmark()}setResults(e,t){this.setState({results:e,noResults:0===e.length}),this.props.marker.mark(t)}searchCallback(e){this.props.search.search(e).then(t=>{this.setResults(t,e)})}render(){const{activeItemIdx:t}=this.state,r=this.state.results.filter(e=>this.props.getItemById(e.meta)).map(e=>({item:this.props.getItemById(e.meta),score:e.score})).sort((e,t)=>t.score-e.score);return e.createElement(od,{role:"search"},this.state.term&&e.createElement(cd,{onClick:this.clear},"\xd7"),e.createElement(ad,null),e.createElement(sd,{value:this.state.term,onKeyDown:this.handleKeyDown,placeholder:"Search...","aria-label":"Search",type:"text",onChange:this.search}),r.length>0&&e.createElement(us,{options:{wheelPropagation:!1}},e.createElement(ld,{"data-role":"search:results"},r.map((r,n)=>e.createElement(Mp,{item:Object.create(r.item,{active:{value:n===t}}),onActivate:this.props.onActivate,withoutChildren:!0,key:r.item.id,"data-role":"search:result"})))),this.state.term&&this.state.noResults?e.createElement(ld,{"data-role":"search:results"},N("noResultsFound")):null)}}dd.contextType=ue,((e,t,r)=>{for(var n,i=pd(t,r),o=e.length-1;o>=0;o--)(n=e[o])&&(i=n(t,r,i)||i);i&&ud(t,r,i)})([xe.bind,(0,xe.debounce)(400)],dd.prototype,"searchCallback");class fd extends e.Component{componentDidMount(){this.props.store.onDidMount()}componentWillUnmount(){this.props.store.dispose()}render(){const{store:{spec:t,menu:r,options:n,search:i,marker:o}}=this.props,s=this.props.store;return e.createElement(Z,{theme:n.theme},e.createElement(So,{value:s},e.createElement(pe,{value:n},e.createElement(rd,{className:"redoc-wrap"},e.createElement(td,{menu:r,className:"menu-content"},e.createElement(Oc,{info:t.info}),!n.disableSearch&&e.createElement(dd,{search:i,marker:o,getItemById:r.getItemById,onActivate:r.activateAndScroll})||null,e.createElement(Kp,{menu:r})),e.createElement(nd,{className:"api-content"},e.createElement(xc,{store:s}),e.createElement(Ep,{items:r.items})),e.createElement(id,null)))))}}fd.propTypes={store:ce.instanceOf(fc).isRequired};var hd=Object.defineProperty,md=Object.getOwnPropertySymbols,yd=Object.prototype.hasOwnProperty,gd=Object.prototype.propertyIsEnumerable,bd=(e,t,r)=>t in e?hd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vd=(e,t)=>{for(var r in t||(t={}))yd.call(t,r)&&bd(e,r,t[r]);if(md)for(var r of md(t))gd.call(t,r)&&bd(e,r,t[r]);return e};const xd=function(t){const{spec:r,specUrl:i,options:o={},onLoaded:s}=t,a=V(o.hideLoading,!1),l=new H(o);if(void 0!==l.nonce)try{n.nc=l.nonce}catch(e){}return e.createElement(ie,null,e.createElement(Oo,{spec:r?vd({},r):void 0,specUrl:i,options:o,onLoaded:s},({loading:t,store:r})=>t?a?null:e.createElement(le,{color:l.theme.colors.primary.main}):e.createElement(fd,{store:r})))}}(),i}()},48313(e){"use strict";var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,n,o,s){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new i(n,o||e,s),l=r?r+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],a]:e._events[l].push(a):(e._events[l]=a,e._eventsCount++),e}function s(e,t){0===--e._eventsCount?e._events=new n:delete e._events[t]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),a.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,s=new Array(o);i":"greater","|":"or","\xa2":"cent","\xa3":"pound","\xa4":"currency","\xa5":"yen","\xa9":"(c)","\xaa":"a","\xae":"(r)","\xba":"o","\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xc6":"AE","\xc7":"C","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xd0":"D","\xd1":"N","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xdd":"Y","\xde":"TH","\xdf":"ss","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xe6":"ae","\xe7":"c","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xf0":"d","\xf1":"n","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xfd":"y","\xfe":"th","\xff":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010c":"C","\u010d":"c","\u010e":"D","\u010f":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011a":"E","\u011b":"e","\u011e":"G","\u011f":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012a":"i","\u012b":"i","\u012e":"I","\u012f":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013b":"L","\u013c":"l","\u013d":"L","\u013e":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u014c":"O","\u014d":"o","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015a":"S","\u015b":"s","\u015e":"S","\u015f":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016a":"u","\u016b":"u","\u016e":"U","\u016f":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017a":"z","\u017b":"Z","\u017c":"z","\u017d":"Z","\u017e":"z","\u018f":"E","\u0192":"f","\u01a0":"O","\u01a1":"o","\u01af":"U","\u01b0":"u","\u01c8":"LJ","\u01c9":"lj","\u01cb":"NJ","\u01cc":"nj","\u0218":"S","\u0219":"s","\u021a":"T","\u021b":"t","\u0259":"e","\u02da":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038a":"I","\u038c":"O","\u038e":"Y","\u038f":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039a":"K","\u039b":"L","\u039c":"M","\u039d":"N","\u039e":"3","\u039f":"O","\u03a0":"P","\u03a1":"R","\u03a3":"S","\u03a4":"T","\u03a5":"Y","\u03a6":"F","\u03a7":"X","\u03a8":"PS","\u03a9":"W","\u03aa":"I","\u03ab":"Y","\u03ac":"a","\u03ad":"e","\u03ae":"h","\u03af":"i","\u03b0":"y","\u03b1":"a","\u03b2":"b","\u03b3":"g","\u03b4":"d","\u03b5":"e","\u03b6":"z","\u03b7":"h","\u03b8":"8","\u03b9":"i","\u03ba":"k","\u03bb":"l","\u03bc":"m","\u03bd":"n","\u03be":"3","\u03bf":"o","\u03c0":"p","\u03c1":"r","\u03c2":"s","\u03c3":"s","\u03c4":"t","\u03c5":"y","\u03c6":"f","\u03c7":"x","\u03c8":"ps","\u03c9":"w","\u03ca":"i","\u03cb":"y","\u03cc":"o","\u03cd":"y","\u03ce":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040a":"NJ","\u040b":"C","\u040f":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041a":"K","\u041b":"L","\u041c":"M","\u041d":"N","\u041e":"O","\u041f":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042a":"U","\u042b":"Y","\u042c":"","\u042d":"E","\u042e":"Yu","\u042f":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043a":"k","\u043b":"l","\u043c":"m","\u043d":"n","\u043e":"o","\u043f":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044a":"u","\u044b":"y","\u044c":"","\u044d":"e","\u044e":"yu","\u044f":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045a":"nj","\u045b":"c","\u045d":"u","\u045f":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049a":"KH","\u049b":"kh","\u04a2":"NG","\u04a3":"ng","\u04ae":"UE","\u04af":"ue","\u04b0":"U","\u04b1":"u","\u04ba":"H","\u04bb":"h","\u04d8":"AE","\u04d9":"ae","\u04e8":"OE","\u04e9":"oe","\u0e3f":"baht","\u10d0":"a","\u10d1":"b","\u10d2":"g","\u10d3":"d","\u10d4":"e","\u10d5":"v","\u10d6":"z","\u10d7":"t","\u10d8":"i","\u10d9":"k","\u10da":"l","\u10db":"m","\u10dc":"n","\u10dd":"o","\u10de":"p","\u10df":"zh","\u10e0":"r","\u10e1":"s","\u10e2":"t","\u10e3":"u","\u10e4":"f","\u10e5":"k","\u10e6":"gh","\u10e7":"q","\u10e8":"sh","\u10e9":"ch","\u10ea":"ts","\u10eb":"dz","\u10ec":"ts","\u10ed":"ch","\u10ee":"kh","\u10ef":"j","\u10f0":"h","\u1e80":"W","\u1e81":"w","\u1e82":"W","\u1e83":"w","\u1e84":"W","\u1e85":"w","\u1e9e":"SS","\u1ea0":"A","\u1ea1":"a","\u1ea2":"A","\u1ea3":"a","\u1ea4":"A","\u1ea5":"a","\u1ea6":"A","\u1ea7":"a","\u1ea8":"A","\u1ea9":"a","\u1eaa":"A","\u1eab":"a","\u1eac":"A","\u1ead":"a","\u1eae":"A","\u1eaf":"a","\u1eb0":"A","\u1eb1":"a","\u1eb2":"A","\u1eb3":"a","\u1eb4":"A","\u1eb5":"a","\u1eb6":"A","\u1eb7":"a","\u1eb8":"E","\u1eb9":"e","\u1eba":"E","\u1ebb":"e","\u1ebc":"E","\u1ebd":"e","\u1ebe":"E","\u1ebf":"e","\u1ec0":"E","\u1ec1":"e","\u1ec2":"E","\u1ec3":"e","\u1ec4":"E","\u1ec5":"e","\u1ec6":"E","\u1ec7":"e","\u1ec8":"I","\u1ec9":"i","\u1eca":"I","\u1ecb":"i","\u1ecc":"O","\u1ecd":"o","\u1ece":"O","\u1ecf":"o","\u1ed0":"O","\u1ed1":"o","\u1ed2":"O","\u1ed3":"o","\u1ed4":"O","\u1ed5":"o","\u1ed6":"O","\u1ed7":"o","\u1ed8":"O","\u1ed9":"o","\u1eda":"O","\u1edb":"o","\u1edc":"O","\u1edd":"o","\u1ede":"O","\u1edf":"o","\u1ee0":"O","\u1ee1":"o","\u1ee2":"O","\u1ee3":"o","\u1ee4":"U","\u1ee5":"u","\u1ee6":"U","\u1ee7":"u","\u1ee8":"U","\u1ee9":"u","\u1eea":"U","\u1eeb":"u","\u1eec":"U","\u1eed":"u","\u1eee":"U","\u1eef":"u","\u1ef0":"U","\u1ef1":"u","\u1ef2":"Y","\u1ef3":"y","\u1ef4":"Y","\u1ef5":"y","\u1ef6":"Y","\u1ef7":"y","\u1ef8":"Y","\u1ef9":"y","\u2018":"\'","\u2019":"\'","\u201c":"\\"","\u201d":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20a0":"ecu","\u20a2":"cruzeiro","\u20a3":"french franc","\u20a4":"lira","\u20a5":"mill","\u20a6":"naira","\u20a7":"peseta","\u20a8":"rupee","\u20a9":"won","\u20aa":"new shequel","\u20ab":"dong","\u20ac":"euro","\u20ad":"kip","\u20ae":"tugrik","\u20af":"drachma","\u20b0":"penny","\u20b1":"peso","\u20b2":"guarani","\u20b3":"austral","\u20b4":"hryvnia","\u20b5":"cedi","\u20b8":"kazakhstani tenge","\u20b9":"indian rupee","\u20ba":"turkish lira","\u20bd":"russian ruble","\u20bf":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221e":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\ufdfc":"rial"}'),t=JSON.parse('{"de":{"\xc4":"AE","\xe4":"ae","\xd6":"OE","\xf6":"oe","\xdc":"UE","\xfc":"ue","%":"prozent","&":"und","|":"oder","\u2211":"summe","\u221e":"unendlich","\u2665":"liebe"},"vi":{"\u0110":"D","\u0111":"d"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","\xa2":"centime","\xa3":"livre","\xa4":"devise","\u20a3":"franc","\u2211":"somme","\u221e":"infini","\u2665":"amour"}}');function r(r,n){if("string"!=typeof r)throw new Error("slugify: string argument expected");var i=t[(n="string"==typeof n?{replacement:n}:n||{}).locale]||{},o=void 0===n.replacement?"-":n.replacement,s=r.split("").reduce(function(t,r){return t+(i[r]||e[r]||r).replace(n.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"").trim().replace(new RegExp("[\\s"+o+"]+","g"),o);return n.lower&&(s=s.toLowerCase()),n.strict&&(s=s.replace(new RegExp("[^a-zA-Z0-9"+o+"]","g"),"").replace(new RegExp("[\\s"+o+"]+","g"),o)),s}return r.extend=function(t){for(var r in t)e[r]=t[r]},r},e.exports=t(),e.exports.default=t()},227(e){e.exports=function(e,t){e||(e=document),t||(t=window);var r,n,i=[],o=!1,s=e.documentElement,a=function(){},l="hidden",c="visibilitychange";void 0!==e.webkitHidden&&(l="webkitHidden",c="webkitvisibilitychange"),t.getComputedStyle||f();for(var u=["","-webkit-","-moz-","-ms-"],p=document.createElement("div"),d=u.length-1;d>=0;d--){try{p.style.position=u[d]+"sticky"}catch(L){}""!=p.style.position&&f()}function f(){$=R=C=T=I=N=a}function h(e){return parseFloat(e)||0}function m(){r={top:t.pageYOffset,left:t.pageXOffset}}function y(){if(t.pageXOffset!=r.left)return m(),void C();t.pageYOffset!=r.top&&(m(),b())}function g(e){setTimeout(function(){t.pageYOffset!=r.top&&(r.top=t.pageYOffset,b())},0)}function b(){for(var e=i.length-1;e>=0;e--)v(i[e])}function v(e){if(e.inited){var t=r.top<=e.limit.start?0:r.top>=e.limit.end?2:1;e.mode!=t&&function(e,t){var r=e.node.style;switch(t){case 0:r.position="absolute",r.left=e.offset.left+"px",r.right=e.offset.right+"px",r.top=e.offset.top+"px",r.bottom="auto",r.width="auto",r.marginLeft=0,r.marginRight=0,r.marginTop=0;break;case 1:r.position="fixed",r.left=e.box.left+"px",r.right=e.box.right+"px",r.top=e.css.top,r.bottom="auto",r.width="auto",r.marginLeft=0,r.marginRight=0,r.marginTop=0;break;case 2:r.position="absolute",r.left=e.offset.left+"px",r.right=e.offset.right+"px",r.top="auto",r.bottom=0,r.width="auto",r.marginLeft=0,r.marginRight=0}e.mode=t}(e,t)}}function x(e){isNaN(parseFloat(e.computed.top))||e.isCell||(e.inited=!0,e.clone||function(e){e.clone=document.createElement("div");var t=e.node.nextSibling||e.node,r=e.clone.style;r.height=e.height+"px",r.width=e.width+"px",r.marginTop=e.computed.marginTop,r.marginBottom=e.computed.marginBottom,r.marginLeft=e.computed.marginLeft,r.marginRight=e.computed.marginRight,r.padding=r.border=r.borderSpacing=0,r.fontSize="1em",r.position="static",r.cssFloat=e.computed.cssFloat,e.node.parentNode.insertBefore(e.clone,t)}(e),"absolute"!=e.parent.computed.position&&"relative"!=e.parent.computed.position&&(e.parent.node.style.position="relative"),v(e),e.parent.height=e.parent.node.offsetHeight,e.docOffsetTop=_(e.clone))}function w(e){var t=!0;e.clone&&function(e){e.clone.parentNode.removeChild(e.clone),e.clone=void 0}(e),function(e,t){for(key in t)t.hasOwnProperty(key)&&(e[key]=t[key])}(e.node.style,e.css);for(var r=i.length-1;r>=0;r--)if(i[r].node!==e.node&&i[r].parent.node===e.parent.node){t=!1;break}t&&(e.parent.node.style.position=e.parent.css.position),e.mode=-1}function S(){for(var e=i.length-1;e>=0;e--)x(i[e])}function k(){for(var e=i.length-1;e>=0;e--)w(i[e])}function O(e){var t=getComputedStyle(e),r=e.parentNode,n=getComputedStyle(r),i=e.style.position;e.style.position="relative";var o={top:t.top,marginTop:t.marginTop,marginBottom:t.marginBottom,marginLeft:t.marginLeft,marginRight:t.marginRight,cssFloat:t.cssFloat},a={top:h(t.top),marginBottom:h(t.marginBottom),paddingLeft:h(t.paddingLeft),paddingRight:h(t.paddingRight),borderLeftWidth:h(t.borderLeftWidth),borderRightWidth:h(t.borderRightWidth)};e.style.position=i;var l={position:e.style.position,top:e.style.top,bottom:e.style.bottom,left:e.style.left,right:e.style.right,width:e.style.width,marginTop:e.style.marginTop,marginLeft:e.style.marginLeft,marginRight:e.style.marginRight},c=E(e),u=E(r),p={node:r,css:{position:r.style.position},computed:{position:n.position},numeric:{borderLeftWidth:h(n.borderLeftWidth),borderRightWidth:h(n.borderRightWidth),borderTopWidth:h(n.borderTopWidth),borderBottomWidth:h(n.borderBottomWidth)}};return{node:e,box:{left:c.win.left,right:s.clientWidth-c.win.right},offset:{top:c.win.top-u.win.top-p.numeric.borderTopWidth,left:c.win.left-u.win.left-p.numeric.borderLeftWidth,right:-c.win.right+u.win.right-p.numeric.borderRightWidth},css:l,isCell:"table-cell"==t.display,computed:o,numeric:a,width:c.win.right-c.win.left,height:c.win.bottom-c.win.top,mode:-1,inited:!1,parent:p,limit:{start:c.doc.top-a.top,end:u.doc.top+r.offsetHeight-p.numeric.borderBottomWidth-e.offsetHeight-a.top-a.marginBottom}}}function _(e){for(var t=0;e;)t+=e.offsetTop,e=e.offsetParent;return t}function E(e){var r=e.getBoundingClientRect();return{doc:{top:r.top+t.pageYOffset,left:r.left+t.pageXOffset},win:r}}function A(){n=setInterval(function(){!function(){for(var e=i.length-1;e>=0;e--)if(i[e].inited){var t=Math.abs(_(i[e].clone)-i[e].docOffsetTop),r=Math.abs(i[e].parent.node.offsetHeight-i[e].parent.height);if(t>=2||r>=2)return!1}return!0}()&&C()},500)}function j(){clearInterval(n)}function P(){o&&(document[l]?j():A())}function $(){o||(m(),S(),t.addEventListener("scroll",y),t.addEventListener("wheel",g),t.addEventListener("resize",C),t.addEventListener("orientationchange",C),e.addEventListener(c,P),A(),o=!0)}function C(){if(o){k();for(var e=i.length-1;e>=0;e--)i[e]=O(i[e].node);S()}}function T(){t.removeEventListener("scroll",y),t.removeEventListener("wheel",g),t.removeEventListener("resize",C),t.removeEventListener("orientationchange",C),e.removeEventListener(c,P),j(),o=!1}function I(){T(),k()}function N(){for(I();i.length;)i.pop()}function R(e){for(var t=i.length-1;t>=0;t--)if(i[t].node===e)return;var r=O(e);i.push(r),o?x(r):$()}return m(),{stickies:i,add:R,remove:function(e){for(var t=i.length-1;t>=0;t--)i[t].node===e&&(w(i[t]),i.splice(t,1))},init:$,rebuild:C,pause:T,stop:I,kill:N}}},68796(e,t,r){"use strict";r.r(t),r.d(t,{ServerStyleSheet:()=>ct,StyleSheetConsumer:()=>Ie,StyleSheetContext:()=>Te,StyleSheetManager:()=>Le,ThemeConsumer:()=>Qe,ThemeContext:()=>Ke,ThemeProvider:()=>Ye,__PRIVATE__:()=>ut,createGlobalStyle:()=>st,css:()=>tt,default:()=>it,isStyledComponent:()=>re,keyframes:()=>at,styled:()=>it,useTheme:()=>Ge,version:()=>f,withTheme:()=>lt});var n=r(31635),i=r(96540),o=r(24534),s=r(72373),a=r(50483),l=r(73716),c={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},u="undefined"!=typeof process&&void 0!=={}&&({}.REACT_APP_SC_ATTR||{}.SC_ATTR)||"data-styled",p="active",d="data-styled-version",f="6.3.11",h="/*!sc*/\n",m="undefined"!=typeof window&&"undefined"!=typeof document,y=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!=={}&&void 0!=={}.REACT_APP_SC_DISABLE_SPEEDY&&""!=={}.REACT_APP_SC_DISABLE_SPEEDY?"false"!=={}.REACT_APP_SC_DISABLE_SPEEDY&&{}.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!=={}&&void 0!=={}.SC_DISABLE_SPEEDY&&""!=={}.SC_DISABLE_SPEEDY&&("false"!=={}.SC_DISABLE_SPEEDY&&{}.SC_DISABLE_SPEEDY)),g={};function b(e){for(var t=[],r=1;r0?" Args: ".concat(t.join(", ")):""))}var v=new Map,x=new Map,w=1,S=function(e){if(v.has(e))return v.get(e);for(;x.has(w);)w++;var t=w++;return v.set(e,t),x.set(t,e),t},k=function(e,t){w=t+1,v.set(e,t),x.set(t,e)},O=(new Set,Object.freeze([])),_=Object.freeze({});function E(e,t,r){return void 0===r&&(r=_),e.theme!==r.theme&&e.theme||t||r.theme}var A=new Set(["a","abbr","address","area","article","aside","audio","b","bdi","bdo","blockquote","body","button","br","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","map","mark","menu","meter","nav","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","slot","small","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use"]),j=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,P=/(^-|-$)/g;function $(e){return e.replace(j,"-").replace(P,"")}var C=/(a)(d)/gi,T=function(e){return String.fromCharCode(e+(e>25?39:97))};function I(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=T(t%52)+r;return(T(t%52)+r).replace(C,"$1-$2")}var N,R=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},L=function(e){return R(5381,e)};function D(e){return I(L(e)>>>0)}function M(e){return e.displayName||e.name||"Component"}function z(e){return"string"==typeof e&&!0}var B="function"==typeof Symbol&&Symbol.for,F=B?Symbol.for("react.memo"):60115,q=B?Symbol.for("react.forward_ref"):60112,U={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},V={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},W={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},H=((N={})[q]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},N[F]=W,N);function K(e){return("type"in(t=e)&&t.type.$$typeof)===F?W:"$$typeof"in e?H[e.$$typeof]:U;var t}var Q=Object.defineProperty,G=Object.getOwnPropertyNames,Y=Object.getOwnPropertySymbols,X=Object.getOwnPropertyDescriptor,J=Object.getPrototypeOf,Z=Object.prototype;function ee(e,t,r){if("string"!=typeof t){if(Z){var n=J(t);n&&n!==Z&&ee(e,n,r)}var i=G(t);Y&&(i=i.concat(Y(t)));for(var o=K(e),s=K(t),a=0;athis._cGroup)for(var r=this._cGroup;r=e;r--)t-=this.groupSizes[r];return this._cGroup=e,this._cIndex=t,t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,i=n;e>=i;)if((i<<=1)<0)throw b(16,"".concat(e));this.groupSizes=new Uint32Array(i),this.groupSizes.set(r),this.length=i;for(var o=n;o0&&this._cGroup>e&&(this._cIndex+=a)},e.prototype.clearGroup=function(e){if(e0&&this._cGroup>e&&(this._cIndex-=t)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],n=this.indexOfGroup(e),i=n+r,o=n;o=0){var r=document.createTextNode(t);return this.element.insertBefore(r,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e0&&(l+=e+",")}),n+=s+a+'{content:"'+l+'"}'+h},o=0;o0?".".concat(t):e},h=d.slice();h.push(function(e){e.type===o.XZ&&e.value.includes("&")&&(n||(n=new RegExp("\\".concat(r,"\\b"),"g")),e.props[0]=e.props[0].replace(Oe,r).replace(n,f))}),u.prefix&&h.push(s.gi),h.push(a.A);var m=[],y=s.r1(h.concat(s.MY(function(e){return m.push(e)}))),g=function(e,i,o,s){void 0===i&&(i=""),void 0===o&&(o=""),void 0===s&&(s="&"),t=s,r=i,n=void 0;var c=function(e){if(!Ae(e))return e;for(var t=e.length,r="",n=0,i=0,o=0,s=!1,a=0;a=3&&108==(32|e.charCodeAt(i-1))&&114==(32|e.charCodeAt(i-2))&&117==(32|e.charCodeAt(i-3)))s=1,i++;else if(s>0)41===a?s--:40===a&&s++,i++;else if(a===Ee&&i+1n&&r.push(e.substring(n,i)),n=i+=2;else if(a===_e&&i+1n&&r.push(e.substring(n,i));i="A"&&e<="Z"};function Be(e){for(var t="",r=0;r>>0);if(!t.hasNameForId(this.componentId,o)){var s=r(i,".".concat(o),void 0,this.componentId);t.insertRules(this.componentId,o,s)}n=ne(n,o),this.staticRulesId=o}else{for(var a=R(this.baseHash,r.hash),l="",c=0;c>>0);if(!t.hasNameForId(this.componentId,d)){var f=r(l,".".concat(d),void 0,this.componentId);t.insertRules(this.componentId,d,f)}n=ne(n,d)}}return{className:n,css:"undefined"==typeof window?t.getTag().getGroup(S(this.componentId)):""}},e}(),Ke=i.createContext(void 0),Qe=Ke.Consumer;function Ge(){var e=i.useContext(Ke);if(!e)throw b(18);return e}function Ye(e){var t=i.useContext(Ke),r=i.useMemo(function(){return function(e,t){if(!e)throw b(14);if(te(e))return e(t);if(Array.isArray(e)||"object"!=typeof e)throw b(8);return t?(0,n.__assign)((0,n.__assign)({},t),e):e}(e.theme,t)},[e.theme,t]);return e.children?i.createElement(Ke.Provider,{value:r},e.children):null}var Xe={};new Set;function Je(e,t,r){var o=re(e),s=e,a=!z(e),l=t.attrs,c=void 0===l?O:l,u=t.componentId,p=void 0===u?function(e,t){var r="string"!=typeof e?"sc":$(e);Xe[r]=(Xe[r]||0)+1;var n="".concat(r,"-").concat(D(f+r+Xe[r]));return t?"".concat(t,"-").concat(n):n}(t.displayName,t.parentComponentId):u,d=t.displayName,h=void 0===d?function(e){return z(e)?"styled.".concat(e):"Styled(".concat(M(e),")")}(e):d,m=t.displayName&&t.componentId?"".concat($(t.displayName),"-").concat(t.componentId):t.componentId||p,y=o&&s.attrs?s.attrs.concat(c).filter(Boolean):c,g=t.shouldForwardProp;if(o&&s.shouldForwardProp){var b=s.shouldForwardProp;if(t.shouldForwardProp){var v=t.shouldForwardProp;g=function(e,t){return b(e,t)&&v(e,t)}}else g=b}var x=new He(r,m,o?s.componentStyle:void 0);function w(e,t){return function(e,t,r){var o=e.attrs,s=e.componentStyle,a=e.defaultProps,l=e.foldedComponentIds,c=e.styledComponentId,u=e.target,p=i.useContext(Ke),d=Re(),f=e.shouldForwardProp||d.shouldForwardProp,h=E(t,p,a)||_,m=function(e,t,r){for(var i,o=(0,n.__assign)((0,n.__assign)({},t),{className:void 0,theme:r}),s=0;s2&&ke.registerId(this.componentId+e);var i=this.componentId+e;this.isStatic?r.hasNameForId(i,i)||this.createStyles(e,t,r,n):(this.removeStyles(e,r),this.createStyles(e,t,r,n))},e}();function st(e){for(var t=[],r=1;r").concat(t,"")},this.getStyleTags=function(){if(e.sealed)throw b(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw b(2);var r=e.instance.toString();if(!r)return[];var o=((t={})[u]="",t[d]=f,t.dangerouslySetInnerHTML={__html:r},t),s=ye();return s&&(o.nonce=s),[i.createElement("style",(0,n.__assign)({},o,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new ke({isServer:!0}),this.sealed=!1}return e.prototype.collectStyles=function(e){if(this.sealed)throw b(2);return i.createElement(Le,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw b(3)},e}(),ut={StyleSheet:ke,mainSheet:$e};"__sc-".concat(u,"__")},8769(e){e.exports=function(){function e(){}return e.prototype.encodeReserved=function(e){return e.split(/(%[0-9A-Fa-f]{2})/g).map(function(e){return/%[0-9A-Fa-f]/.test(e)||(e=encodeURI(e).replace(/%5B/g,"[").replace(/%5D/g,"]")),e}).join("")},e.prototype.encodeUnreserved=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})},e.prototype.encodeValue=function(e,t,r){return t="+"===e||"#"===e?this.encodeReserved(t):this.encodeUnreserved(t),r?this.encodeUnreserved(r)+"="+t:t},e.prototype.isDefined=function(e){return null!=e},e.prototype.isKeyOperator=function(e){return";"===e||"&"===e||"?"===e},e.prototype.getValues=function(e,t,r,n){var i=e[r],o=[];if(this.isDefined(i)&&""!==i)if("string"==typeof i||"number"==typeof i||"boolean"==typeof i)i=i.toString(),n&&"*"!==n&&(i=i.substring(0,parseInt(n,10))),o.push(this.encodeValue(t,i,this.isKeyOperator(t)?r:null));else if("*"===n)Array.isArray(i)?i.filter(this.isDefined).forEach(function(e){o.push(this.encodeValue(t,e,this.isKeyOperator(t)?r:null))},this):Object.keys(i).forEach(function(e){this.isDefined(i[e])&&o.push(this.encodeValue(t,i[e],e))},this);else{var s=[];Array.isArray(i)?i.filter(this.isDefined).forEach(function(e){s.push(this.encodeValue(t,e))},this):Object.keys(i).forEach(function(e){this.isDefined(i[e])&&(s.push(this.encodeUnreserved(e)),s.push(this.encodeValue(t,i[e].toString())))},this),this.isKeyOperator(t)?o.push(this.encodeUnreserved(r)+"="+s.join(",")):0!==s.length&&o.push(s.join(","))}else";"===t?this.isDefined(i)&&o.push(this.encodeUnreserved(r)):""!==i||"&"!==t&&"?"!==t?""===i&&o.push(""):o.push(this.encodeUnreserved(r)+"=");return o},e.prototype.parse=function(e){var t=this,r=["+","#",".","/",";","?","&"];return{expand:function(n){return e.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,function(e,i,o){if(i){var s=null,a=[];if(-1!==r.indexOf(i.charAt(0))&&(s=i.charAt(0),i=i.substr(1)),i.split(/,/g).forEach(function(e){var r=/([^:\*]*)(?::(\d+)|(\*))?/.exec(e);a.push.apply(a,t.getValues(n,s,r[1],r[2]||r[3]))}),s&&"+"!==s){var l=",";return"?"===s?l="&":"#"!==s&&(l=s),(0!==a.length?s:"")+a.join(l)}return a.join(",")}return t.encodeReserved(o)})}}},new e}()},58493(e,t,r){"use strict";var n=r(96540);var i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useState,s=n.useEffect,a=n.useLayoutEffect,l=n.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(n){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=o({inst:{value:r,getSnapshot:t}}),i=n[0].inst,u=n[1];return a(function(){i.value=r,i.getSnapshot=t,c(i)&&u({inst:i})},[e,r,t]),s(function(){return c(i)&&u({inst:i}),e(function(){c(i)&&u({inst:i})})},[e]),l(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:u},19888(e,t,r){"use strict";e.exports=r(58493)},46942(e,t){var r;!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e="",t=0;t65535)?"URI port is malformed.":void 0}(i,l);if(void 0!==t&&(i.error=i.error||t,o=!0),i.host){if(!1===u(i.host)){const e=n(i.host);i.host=e.host.toLowerCase(),s=e.isIPV6}else s=!0}void 0!==i.scheme||void 0!==i.userinfo||void 0!==i.host||void 0!==i.port||void 0!==i.query||i.path?void 0===i.scheme?i.reference="relative":void 0===i.fragment?i.reference="absolute":i.reference="uri":i.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==i.reference&&(i.error=i.error||"URI is not a "+r.reference+" reference.");const h=f(r.scheme||i.scheme);if(!(r.unicodeSupport||h&&h.unicodeSupport)&&i.host&&(r.domainHost||h&&h.domainHost)&&!1===s&&p(i.host))try{i.host=URL.domainToASCII(i.host.toLowerCase())}catch(d){i.error=i.error||"Host's domain name can not be converted to ASCII: "+d}if((!h||h&&!h.skipNormalize)&&(-1!==e.indexOf("%")&&(void 0!==i.scheme&&(i.scheme=unescape(i.scheme)),void 0!==i.host&&(i.host=c(unescape(i.host),s))),i.path&&(i.path=a(i.path)),i.fragment))try{i.fragment=encodeURI(decodeURIComponent(i.fragment))}catch{i.error=i.error||"URI malformed"}h&&h.parse&&h.parse(i,r)}else i.error=i.error||"URI can not be parsed.";return{parsed:i,malformedAuthorityOrPort:o}}function b(e,t){return g(e,t).parsed}function v(e,t){const{parsed:r,malformedAuthorityOrPort:n}=g(e,t);return{normalized:n?e:m(r,t),malformedAuthorityOrPort:n}}function x(e,t){if("string"==typeof e){const{normalized:r,malformedAuthorityOrPort:n}=v(e,t);return n?void 0:r}if("object"==typeof e)return m(e,t)}const w={SCHEMES:d,normalize:function(e,t){return"string"==typeof e?e=function(e,t){return v(e,t).normalized}(e,t):"object"==typeof e&&(e=b(m(e,t),t)),e},resolve:function(e,t,r){const n=r?Object.assign({scheme:"null"},r):{scheme:"null"},i=h(b(e,n),b(t,n),n,!0);return n.skipEscape=!0,m(i,n)},resolveComponent:h,equal:function(e,t,r){const n=x(e,r),i=x(t,r);return void 0!==n&&void 0!==i&&n.toLowerCase()===i.toLowerCase()},serialize:m,parse:b};e.exports=w,e.exports.default=w,e.exports.fastUri=w},343(e,t,r){"use strict";const{isUUID:n}=r(34834),i=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,o=["http","https","ws","wss","urn","urn:uuid"];function s(e){return!0===e.secure||!1!==e.secure&&(!!e.scheme&&!(3!==e.scheme.length||"w"!==e.scheme[0]&&"W"!==e.scheme[0]||"s"!==e.scheme[1]&&"S"!==e.scheme[1]||"s"!==e.scheme[2]&&"S"!==e.scheme[2]))}function a(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function l(e){const t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}const c={scheme:"http",domainHost:!0,parse:a,serialize:l},u={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=s(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if(e.port!==(s(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){const[t,r]=e.resourceName.split("?");e.path=t&&"/"!==t?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}},p={http:c,https:{scheme:"https",domainHost:c.domainHost,parse:a,serialize:l},ws:u,wss:{scheme:"wss",domainHost:u.domainHost,parse:u.parse,serialize:u.serialize},urn:{scheme:"urn",parse:function(e,t){if(!e.path)return e.error="URN can not be parsed",e;const r=e.path.match(i);if(r){const n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];const i=d(`${n}:${t.nid||e.nid}`);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,t){if(void 0===e.nid)throw new Error("URN without nid cannot be serialized");const r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),i=d(`${r}:${t.nid||n}`);i&&(e=i.serialize(e,t));const o=e,s=e.nss;return o.path=`${n||t.nid}:${s}`,t.skipEscape=!0,o},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(e,t){const r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&n(r.uuid)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e){const t=e;return t.nss=(e.uuid||"").toLowerCase(),t},skipNormalize:!0}};function d(e){return e&&(p[e]||p[e.toLowerCase()])||void 0}Object.setPrototypeOf(p,null),e.exports={wsIsSecure:s,SCHEMES:p,isValidSchemeName:function(e){return-1!==o.indexOf(e)},getSchemeHandler:d}},34834(e){"use strict";const t=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),r=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),n=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),i=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),o=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function s(e){let t="",r=0,n=0;for(n=0;n=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n];break}for(n+=1;n=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n]}return t}const a=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function l(e){return e.length=0,!0}function c(e,t,r){if(e.length){const n=s(e);if(""===n)return r.error=!0,!1;t.push(n),e.length=0}return!0}function u(e){if(function(e,t){let r=0;for(let n=0;n7){r.error=!0;break}s>0&&":"===e[s-1]&&(o=!0),n.push(":")}}return i.length&&(u===l?r.zone=i.join(""):a?n.push(i.join("")):n.push(s(i))),r.address=n.join(""),r}(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,r=t.address;return t.zone&&(e+="%"+t.zone,r+="%25"+t.zone),{host:e,isIPV6:!0,escapedHost:r}}}const p={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},d=/[@/?#:]/g,f=/[@/?#]/g;function h(e,t){const r=t?f:d;return r.lastIndex=0,e.replace(r,e=>p[e])}e.exports={nonSimpleDomain:a,recomposeAuthority:function(e){const t=[];if(void 0!==e.userinfo&&(t.push(e.userinfo),t.push("@")),void 0!==e.host){let n=unescape(e.host);if(!r(n)){const e=u(n);n=!0===e.isIPV6?`[${e.escapedHost}]`:h(n,!1)}t.push(n)}return"number"!=typeof e.port&&"string"!=typeof e.port||(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0},reescapeHostDelimiters:h,normalizePercentEncoding:function(e,t=!1){if(-1===e.indexOf("%"))return e;let r="";for(let o=0;oB,CST:()=>n,Composer:()=>tr,Document:()=>At,Lexer:()=>Pr,LineCounter:()=>$r,Pair:()=>xe,Parser:()=>Mr,Scalar:()=>U,Schema:()=>Et,YAMLError:()=>Pt,YAMLMap:()=>Ee,YAMLParseError:()=>$t,YAMLSeq:()=>je,YAMLWarning:()=>Ct,default:()=>Vr,isAlias:()=>d,isCollection:()=>b,isDocument:()=>f,isMap:()=>h,isNode:()=>v,isPair:()=>m,isScalar:()=>y,isSeq:()=>g,parse:()=>qr,parseAllDocuments:()=>Br,parseDocument:()=>Fr,stringify:()=>Ur,visit:()=>O,visitAsync:()=>E});var n={};r.r(n),r.d(n,{BOM:()=>mr,DOCUMENT:()=>yr,FLOW_END:()=>gr,SCALAR:()=>br,createScalarToken:()=>nr,isCollection:()=>vr,isScalar:()=>xr,prettyToken:()=>wr,resolveAsScalar:()=>rr,setScalarValue:()=>ir,stringify:()=>ar,tokenType:()=>Sr,visit:()=>fr});var i={};r.r(i),r.d(i,{Alias:()=>B,CST:()=>n,Composer:()=>tr,Document:()=>At,Lexer:()=>Pr,LineCounter:()=>$r,Pair:()=>xe,Parser:()=>Mr,Scalar:()=>U,Schema:()=>Et,YAMLError:()=>Pt,YAMLMap:()=>Ee,YAMLParseError:()=>$t,YAMLSeq:()=>je,YAMLWarning:()=>Ct,isAlias:()=>d,isCollection:()=>b,isDocument:()=>f,isMap:()=>h,isNode:()=>v,isPair:()=>m,isScalar:()=>y,isSeq:()=>g,parse:()=>qr,parseAllDocuments:()=>Br,parseDocument:()=>Fr,stringify:()=>Ur,visit:()=>O,visitAsync:()=>E});const o=Symbol.for("yaml.alias"),s=Symbol.for("yaml.document"),a=Symbol.for("yaml.map"),l=Symbol.for("yaml.pair"),c=Symbol.for("yaml.scalar"),u=Symbol.for("yaml.seq"),p=Symbol.for("yaml.node.type"),d=e=>!!e&&"object"==typeof e&&e[p]===o,f=e=>!!e&&"object"==typeof e&&e[p]===s,h=e=>!!e&&"object"==typeof e&&e[p]===a,m=e=>!!e&&"object"==typeof e&&e[p]===l,y=e=>!!e&&"object"==typeof e&&e[p]===c,g=e=>!!e&&"object"==typeof e&&e[p]===u;function b(e){if(e&&"object"==typeof e)switch(e[p]){case a:case u:return!0}return!1}function v(e){if(e&&"object"==typeof e)switch(e[p]){case o:case a:case c:case u:return!0}return!1}const x=e=>(y(e)||b(e))&&!!e.anchor,w=Symbol("break visit"),S=Symbol("skip children"),k=Symbol("remove node");function O(e,t){const r=j(t);if(f(e)){_(null,e.contents,r,Object.freeze([e]))===k&&(e.contents=null)}else _(null,e,r,Object.freeze([]))}function _(e,t,r,n){const i=P(e,t,r,n);if(v(i)||m(i))return $(e,n,i),_(e,i,r,n);if("symbol"!=typeof i)if(b(t)){n=Object.freeze(n.concat(t));for(let e=0;ee.replace(/[!,[\]{}]/g,e=>C[e]);class I{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},I.defaultYaml,e),this.tags=Object.assign({},I.defaultTags,t)}clone(){const e=new I(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new I(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:I.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},I.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:I.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},I.defaultTags),this.atNextDocument=!1);const r=e.trim().split(/[ \t]+/),n=r.shift();switch(n){case"%TAG":{if(2!==r.length&&(t(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[e,n]=r;return this.tags[e]=n,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==r.length)return t(0,"%YAML directive should contain exactly one part"),!1;const[e]=r;if("1.1"===e||"1.2"===e)return this.yaml.version=e,!0;return t(6,`Unsupported YAML version ${e}`,/^\d+\.\d+$/.test(e)),!1}default:return t(0,`Unknown directive ${n}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){const r=e.slice(2,-1);return"!"===r||"!!"===r?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),r)}const[,r,n]=e.match(/^(.*!)([^!]*)$/s);n||t(`The ${e} tag has no suffix`);const i=this.tags[r];if(i)try{return i+decodeURIComponent(n)}catch(o){return t(String(o)),null}return"!"===r?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,r]of Object.entries(this.tags))if(e.startsWith(r))return t+T(e.substring(r.length));return"!"===e[0]?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let n;if(e&&r.length>0&&v(e.contents)){const t={};O(e.contents,(e,r)=>{v(r)&&r.tag&&(t[r.tag]=!0)}),n=Object.keys(t)}else n=[];for(const[i,o]of r)"!!"===i&&"tag:yaml.org,2002:"===o||e&&!n.some(e=>e.startsWith(o))||t.push(`%TAG ${i} ${o}`);return t.join("\n")}}function N(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);throw new Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0}function R(e){const t=new Set;return O(e,{Value(e,r){r.anchor&&t.add(r.anchor)}}),t}function L(e,t){for(let r=1;;++r){const n=`${e}${r}`;if(!t.has(n))return n}}function D(e,t,r,n){if(n&&"object"==typeof n)if(Array.isArray(n))for(let i=0,o=n.length;iM(e,String(t),r));if(e&&"function"==typeof e.toJSON){if(!r||!x(e))return e.toJSON(t,r);const n={aliasCount:0,count:1,res:void 0};r.anchors.set(e,n),r.onCreate=e=>{n.res=e,delete r.onCreate};const i=e.toJSON(t,r);return r.onCreate&&r.onCreate(i),i}return"bigint"!=typeof e||r?.keep?e:Number(e)}I.defaultYaml={explicit:!1,version:"1.2"},I.defaultTags={"!!":"tag:yaml.org,2002:"};class z{constructor(e){Object.defineProperty(this,p,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:r,onAnchor:n,reviver:i}={}){if(!f(e))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:e,keep:!0,mapAsMap:!0===t,mapKeyWarned:!1,maxAliasCount:"number"==typeof r?r:100},s=M(this,"",o);if("function"==typeof n)for(const{count:a,res:l}of o.anchors.values())n(l,a);return"function"==typeof i?D(i,{"":s},"",s):s}}class B extends z{constructor(e){super(o),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){if(0===t?.maxAliasCount)throw new ReferenceError("Alias resolution is disabled");let r,n;t?.aliasResolveCache?r=t.aliasResolveCache:(r=[],O(e,{Node:(e,t)=>{(d(t)||x(t))&&r.push(t)}}),t&&(t.aliasResolveCache=r));for(const i of r){if(i===this)break;i.anchor===this.source&&(n=i)}return n}toJSON(e,t){if(!t)return{source:this.source};const{anchors:r,doc:n,maxAliasCount:i}=t,o=this.resolve(n,t);if(!o){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}let s=r.get(o);if(s||(M(o,null,t),s=r.get(o)),void 0===s?.res){throw new ReferenceError("This should not happen: Alias anchor was not resolved?")}if(i>=0&&(s.count+=1,0===s.aliasCount&&(s.aliasCount=F(n,o,r)),s.count*s.aliasCount>i)){throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return s.res}toString(e,t,r){const n=`*${this.source}`;if(e){if(N(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(e.implicitKey)return`${n} `}return n}}function F(e,t,r){if(d(t)){const n=t.resolve(e),i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}if(b(t)){let n=0;for(const i of t.items){const t=F(e,i,r);t>n&&(n=t)}return n}if(m(t)){const n=F(e,t.key,r),i=F(e,t.value,r);return Math.max(n,i)}return 1}const q=e=>!e||"function"!=typeof e&&"object"!=typeof e;class U extends z{constructor(e){super(c),this.value=e}toJSON(e,t){return t?.keep?this.value:M(this.value,e,t)}toString(){return String(this.value)}}U.BLOCK_FOLDED="BLOCK_FOLDED",U.BLOCK_LITERAL="BLOCK_LITERAL",U.PLAIN="PLAIN",U.QUOTE_DOUBLE="QUOTE_DOUBLE",U.QUOTE_SINGLE="QUOTE_SINGLE";function V(e,t,r){if(f(e)&&(e=e.contents),v(e))return e;if(m(e)){const t=r.schema[a].createNode?.(r.schema,null,r);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||"undefined"!=typeof BigInt&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:n,onAnchor:i,onTagObj:o,schema:s,sourceObjects:l}=r;let c;if(n&&e&&"object"==typeof e){if(c=l.get(e),c)return c.anchor??(c.anchor=i(e)),new B(c.anchor);c={anchor:null,node:null},l.set(e,c)}t?.startsWith("!!")&&(t="tag:yaml.org,2002:"+t.slice(2));let p=function(e,t,r){if(t){const e=r.filter(e=>e.tag===t),n=e.find(e=>!e.format)??e[0];if(!n)throw new Error(`Tag ${t} not found`);return n}return r.find(t=>t.identify?.(e)&&!t.format)}(e,t,s.tags);if(!p){if(e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e){const t=new U(e);return c&&(c.node=t),t}p=e instanceof Map?s[a]:Symbol.iterator in Object(e)?s[u]:s[a]}o&&(o(p),delete r.onTagObj);const d=p?.createNode?p.createNode(r.schema,e,r):"function"==typeof p?.nodeClass?.from?p.nodeClass.from(r.schema,e,r):new U(e);return t?d.tag=t:p.default||(d.tag=p.tag),c&&(c.node=d),d}function W(e,t,r){let n=r;for(let i=t.length-1;i>=0;--i){const e=t[i];if("number"==typeof e&&Number.isInteger(e)&&e>=0){const t=[];t[e]=n,n=t}else n=new Map([[e,n]])}return V(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const H=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;class K extends z{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>v(t)||m(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(H(e))this.add(t);else{const[r,...n]=e,i=this.get(r,!0);if(b(i))i.addIn(n,t);else{if(void 0!==i||!this.schema)throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`);this.set(r,W(this.schema,n,t))}}}deleteIn(e){const[t,...r]=e;if(0===r.length)return this.delete(t);const n=this.get(t,!0);if(b(n))return n.deleteIn(r);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn(e,t){const[r,...n]=e,i=this.get(r,!0);return 0===n.length?!t&&y(i)?i.value:i:b(i)?i.getIn(n,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!m(t))return!1;const r=t.value;return null==r||e&&y(r)&&null==r.value&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[t,...r]=e;if(0===r.length)return this.has(t);const n=this.get(t,!0);return!!b(n)&&n.hasIn(r)}setIn(e,t){const[r,...n]=e;if(0===n.length)this.set(r,t);else{const e=this.get(r,!0);if(b(e))e.setIn(n,t);else{if(void 0!==e||!this.schema)throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`);this.set(r,W(this.schema,n,t))}}}}const Q=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function G(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const Y=(e,t,r)=>e.endsWith("\n")?G(r,t):r.includes("\n")?"\n"+G(r,t):(e.endsWith(" ")?"":" ")+r,X="flow",J="block",Z="quoted";function ee(e,t,r="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:o=20,onFold:s,onOverflow:a}={}){if(!i||i<0)return e;ii-Math.max(2,o)?c.push(0):f=i-n);let h=!1,m=-1,y=-1,g=-1;r===J&&(m=te(e,m,t.length),-1!==m&&(f=m+l));for(let v;v=e[m+=1];){if(r===Z&&"\\"===v){switch(y=m,e[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}g=m}if("\n"===v)r===J&&(m=te(e,m,t.length)),f=m+t.length+l,p=void 0;else{if(" "===v&&d&&" "!==d&&"\n"!==d&&"\t"!==d){const t=e[m+1];t&&" "!==t&&"\n"!==t&&"\t"!==t&&(p=m)}if(m>=f)if(p)c.push(p),f=p+l,p=void 0;else if(r===Z){for(;" "===d||"\t"===d;)d=v,v=e[m+=1],h=!0;const t=m>g+1?m-2:y-1;if(u[t])return e;c.push(t),u[t]=!0,f=t+l,p=void 0}else h=!0}d=v}if(h&&a&&a(),0===c.length)return e;s&&s();let b=e.slice(0,c[0]);for(let v=0;v({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),ne=e=>/^(%|---|\.\.\.)/m.test(e);function ie(e,t){const r=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return r;const{implicitKey:n}=t,i=t.options.doubleQuotedMinMultiLineLength,o=t.indent||(ne(e)?" ":"");let s="",a=0;for(let l=0,c=r[l];c;c=r[++l])if(" "===c&&"\\"===r[l+1]&&"n"===r[l+2]&&(s+=r.slice(a,l)+"\\ ",l+=1,a=l,c="\\"),"\\"===c)switch(r[l+1]){case"u":{s+=r.slice(a,l);const e=r.substr(l+2,4);switch(e){case"0000":s+="\\0";break;case"0007":s+="\\a";break;case"000b":s+="\\v";break;case"001b":s+="\\e";break;case"0085":s+="\\N";break;case"00a0":s+="\\_";break;case"2028":s+="\\L";break;case"2029":s+="\\P";break;default:"00"===e.substr(0,2)?s+="\\x"+e.substr(2):s+=r.substr(l,6)}l+=5,a=l+1}break;case"n":if(n||'"'===r[l+2]||r.lengthn)return!0;if(s=o+1,i-s<=n)return!1}return!0}(r,l,c.length));if(!r)return u?"|\n":">\n";let p,d;for(d=r.length;d>0;--d){const e=r[d-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let f=r.substring(d);const h=f.indexOf("\n");-1===h?p="-":r===f||h!==f.length-1?(p="+",o&&o()):p="",f&&(r=r.slice(0,-f.length),"\n"===f[f.length-1]&&(f=f.slice(0,-1)),f=f.replace(ae,`$&${c}`));let m,y=!1,g=-1;for(m=0;m{i=!0});const a=ee(`${b}${e}${f}`,c,J,o);if(!i)return`>${v}\n${c}${a}`}return`|${v}\n${c}${b}${r=r.replace(/\n+/g,`$&${c}`)}${f}`}function ce(e,t,r,n){const{implicitKey:i,inFlow:o}=t,s="string"==typeof e.value?e:Object.assign({},e,{value:String(e.value)});let{type:a}=e;a!==U.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value)&&(a=U.QUOTE_DOUBLE);const l=e=>{switch(e){case U.BLOCK_FOLDED:case U.BLOCK_LITERAL:return i||o?se(s.value,t):le(s,t,r,n);case U.QUOTE_DOUBLE:return ie(s.value,t);case U.QUOTE_SINGLE:return oe(s.value,t);case U.PLAIN:return function(e,t,r,n){const{type:i,value:o}=e,{actualString:s,implicitKey:a,indent:l,indentStep:c,inFlow:u}=t;if(a&&o.includes("\n")||u&&/[[\]{},]/.test(o))return se(o,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return a||u||!o.includes("\n")?se(o,t):le(e,t,r,n);if(!a&&!u&&i!==U.PLAIN&&o.includes("\n"))return le(e,t,r,n);if(ne(o)){if(""===l)return t.forceBlockIndent=!0,le(e,t,r,n);if(a&&l===c)return se(o,t)}const p=o.replace(/\n+/g,`$&\n${l}`);if(s){const e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(p),{compat:r,tags:n}=t.doc.schema;if(n.some(e)||r?.some(e))return se(o,t)}return a?p:ee(p,l,X,re(t,!1))}(s,t,r,n);default:return null}};let c=l(a);if(null===c){const{defaultKeyType:e,defaultStringType:r}=t.options,n=i&&e||r;if(c=l(n),null===c)throw new Error(`Unsupported default string type ${n}`)}return c}function ue(e,t){const r=Object.assign({blockQuote:!0,commentString:Q,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let n;switch(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof r.indent?" ".repeat(r.indent):" ",inFlow:n,options:r}}function pe(e,t,r,n){if(m(e))return e.toString(t,r,n);if(d(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i;const o=v(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??(i=function(e,t){if(t.tag){const r=e.filter(e=>e.tag===t.tag);if(r.length>0)return r.find(e=>e.format===t.format)??r[0]}let r,n;if(y(t)){n=t.value;let i=e.filter(e=>e.identify?.(n));if(i.length>1){const e=i.filter(e=>e.test);e.length>0&&(i=e)}r=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else n=t,r=e.find(e=>e.nodeClass&&n instanceof e.nodeClass);if(!r)throw new Error(`Tag not resolved for ${n?.constructor?.name??(null===n?"null":typeof n)} value`);return r}(t.doc.schema.tags,o));const s=function(e,t,{anchors:r,doc:n}){if(!n.directives)return"";const i=[],o=(y(e)||b(e))&&e.anchor;o&&N(o)&&(r.add(o),i.push(`&${o}`));const s=e.tag??(t.default?null:t.tag);return s&&i.push(n.directives.tagString(s)),i.join(" ")}(o,i,t);s.length>0&&(t.indentAtStart=(t.indentAtStart??0)+s.length+1);const a="function"==typeof i.stringify?i.stringify(o,t,r,n):y(o)?ce(o,t,r,n):o.toString(t,r,n);return s?y(o)||"{"===a[0]||"["===a[0]?`${s} ${a}`:`${s}\n${t.indent}${a}`:a}function de(e,t){"debug"!==e&&"warn"!==e||console.warn(t)}const fe="<<",he={identify:e=>e===fe||"symbol"==typeof e&&e.description===fe,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new U(Symbol(fe)),{addToJSMap:me}),stringify:()=>fe};function me(e,t,r){const n=ge(e,r);if(g(n))for(const i of n.items)ye(e,t,i);else if(Array.isArray(n))for(const i of n)ye(e,t,i);else ye(e,t,n)}function ye(e,t,r){const n=ge(e,r);if(!h(n))throw new Error("Merge sources must be maps or map aliases");const i=n.toJSON(null,e,Map);for(const[o,s]of i)t instanceof Map?t.has(o)||t.set(o,s):t instanceof Set?t.add(o):Object.prototype.hasOwnProperty.call(t,o)||Object.defineProperty(t,o,{value:s,writable:!0,enumerable:!0,configurable:!0});return t}function ge(e,t){return e&&d(t)?t.resolve(e.doc,e):t}function be(e,t,{key:r,value:n}){if(v(r)&&r.addToJSMap)r.addToJSMap(e,t,n);else if(((e,t)=>(he.identify(t)||y(t)&&(!t.type||t.type===U.PLAIN)&&he.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===he.tag&&e.default))(e,r))me(e,t,n);else{const i=M(r,"",e);if(t instanceof Map)t.set(i,M(n,i,e));else if(t instanceof Set)t.add(i);else{const o=function(e,t,r){if(null===t)return"";if("object"!=typeof t)return String(t);if(v(e)&&r?.doc){const t=ue(r.doc,{});t.anchors=new Set;for(const e of r.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;const n=e.toString(t);if(!r.mapKeyWarned){let e=JSON.stringify(n);e.length>40&&(e=e.substring(0,36)+'..."'),de(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return n}return JSON.stringify(t)}(r,i,e),s=M(n,o,e);o in t?Object.defineProperty(t,o,{value:s,writable:!0,enumerable:!0,configurable:!0}):t[o]=s}}return t}function ve(e,t,r){const n=V(e,void 0,r),i=V(t,void 0,r);return new xe(n,i)}class xe{constructor(e,t=null){Object.defineProperty(this,p,{value:l}),this.key=e,this.value=t}clone(e){let{key:t,value:r}=this;return v(t)&&(t=t.clone(e)),v(r)&&(r=r.clone(e)),new xe(t,r)}toJSON(e,t){return be(t,t?.mapAsMap?new Map:{},this)}toString(e,t,r){return e?.doc?function({key:e,value:t},r,n,i){const{allNullValues:o,doc:s,indent:a,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:p}}=r;let d=v(e)&&e.comment||null;if(p){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(b(e)||!v(e)&&"object"==typeof e)throw new Error("With simple keys, collection cannot be used as a key value")}let f=!p&&(!e||d&&null==t&&!r.inFlow||b(e)||(y(e)?e.type===U.BLOCK_FOLDED||e.type===U.BLOCK_LITERAL:"object"==typeof e));r=Object.assign({},r,{allNullValues:!1,implicitKey:!f&&(p||!o),indent:a+l});let h,m,x,w=!1,S=!1,k=pe(e,r,()=>w=!0,()=>S=!0);if(!f&&!r.inFlow&&k.length>1024){if(p)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");f=!0}if(r.inFlow){if(o||null==t)return w&&n&&n(),""===k?"?":f?`? ${k}`:k}else if(o&&!p||null==t&&f)return k=`? ${k}`,d&&!w?k+=Y(k,r.indent,c(d)):S&&i&&i(),k;w&&(d=null),f?(d&&(k+=Y(k,r.indent,c(d))),k=`? ${k}\n${a}:`):(k=`${k}:`,d&&(k+=Y(k,r.indent,c(d)))),v(t)?(h=!!t.spaceBefore,m=t.commentBefore,x=t.comment):(h=!1,m=null,x=null,t&&"object"==typeof t&&(t=s.createNode(t))),r.implicitKey=!1,f||d||!y(t)||(r.indentAtStart=k.length+1),S=!1,u||!(l.length>=2)||r.inFlow||f||!g(t)||t.flow||t.tag||t.anchor||(r.indent=r.indent.substring(2));let O=!1;const _=pe(t,r,()=>O=!0,()=>S=!0);let E=" ";if(d||h||m)E=h?"\n":"",m&&(E+=`\n${G(c(m),r.indent)}`),""!==_||r.inFlow?E+=`\n${r.indent}`:"\n"===E&&x&&(E="\n\n");else if(!f&&b(t)){const e=_[0],n=_.indexOf("\n"),i=-1!==n,o=r.inFlow??t.flow??0===t.items.length;if(i||!o){let t=!1;if(i&&("&"===e||"!"===e)){let r=_.indexOf(" ");"&"===e&&-1!==r&&ri=null,()=>p=!0);i&&(s+=Y(s,o,c(i))),p&&i&&(p=!1),d.push(n+s)}let f;if(0===d.length)f=i.start+i.end;else{f=d[0];for(let e=1;ei=null);c||(c=p.length>u||o.includes("\n")),h0&&(c||(c=p.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth)),c&&(o+=",")),i&&(o+=Y(o,n,a(i))),p.push(o),u=p.length}const{start:d,end:f}=r;if(0===p.length)return d+f;if(!c){const e=p.reduce((e,t)=>e+t.length+2,2);c=t.options.lineWidth>0&&e>t.options.lineWidth}if(c){let e=d;for(const t of p)e+=t?`\n${o}${i}${t}`:"\n";return`${e}\n${i}${f}`}return`${d}${s}${p.join(" ")}${s}${f}`}function Oe({indent:e,options:{commentString:t}},r,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){const i=G(t(n),e);r.push(i.trimStart())}}function _e(e,t){const r=y(t)?t.value:t;for(const n of e)if(m(n)){if(n.key===t||n.key===r)return n;if(y(n.key)&&n.key.value===r)return n}}class Ee extends K{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(a,e),this.items=[]}static from(e,t,r){const{keepUndefined:n,replacer:i}=r,o=new this(e),s=(e,s)=>{if("function"==typeof i)s=i.call(t,e,s);else if(Array.isArray(i)&&!i.includes(e))return;(void 0!==s||n)&&o.items.push(ve(e,s,r))};if(t instanceof Map)for(const[a,l]of t)s(a,l);else if(t&&"object"==typeof t)for(const a of Object.keys(t))s(a,t[a]);return"function"==typeof e.sortMapEntries&&o.items.sort(e.sortMapEntries),o}add(e,t){let r;r=m(e)?e:e&&"object"==typeof e&&"key"in e?new xe(e.key,e.value):new xe(e,e?.value);const n=_e(this.items,r.key),i=this.schema?.sortMapEntries;if(n){if(!t)throw new Error(`Key ${r.key} already set`);y(n.value)&&q(r.value)?n.value.value=r.value:n.value=r.value}else if(i){const e=this.items.findIndex(e=>i(r,e)<0);-1===e?this.items.push(r):this.items.splice(e,0,r)}else this.items.push(r)}delete(e){const t=_e(this.items,e);if(!t)return!1;return this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const r=_e(this.items,e),n=r?.value;return(!t&&y(n)?n.value:n)??void 0}has(e){return!!_e(this.items,e)}set(e,t){this.add(new xe(e,t),!0)}toJSON(e,t,r){const n=r?new r:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(n);for(const i of this.items)be(t,n,i);return n}toString(e,t,r){if(!e)return JSON.stringify(this);for(const n of this.items)if(!m(n))throw new Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),we(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:t})}}const Ae={collection:"map",default:!0,nodeClass:Ee,tag:"tag:yaml.org,2002:map",resolve:(e,t)=>(h(e)||t("Expected a mapping for this tag"),e),createNode:(e,t,r)=>Ee.from(e,t,r)};class je extends K{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(u,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=Pe(e);if("number"!=typeof t)return!1;return this.items.splice(t,1).length>0}get(e,t){const r=Pe(e);if("number"!=typeof r)return;const n=this.items[r];return!t&&y(n)?n.value:n}has(e){const t=Pe(e);return"number"==typeof t&&t=0?t:null}const $e={collection:"seq",default:!0,nodeClass:je,tag:"tag:yaml.org,2002:seq",resolve:(e,t)=>(g(e)||t("Expected a sequence for this tag"),e),createNode:(e,t,r)=>je.from(e,t,r)},Ce={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(e,t,r,n)=>ce(e,t=Object.assign({actualString:!0},t),r,n)},Te={identify:e=>null==e,createNode:()=>new U(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new U(null),stringify:({source:e},t)=>"string"==typeof e&&Te.test.test(e)?e:t.options.nullStr},Ie={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new U("t"===e[0]||"T"===e[0]),stringify({source:e,value:t},r){if(e&&Ie.test.test(e)){if(t===("t"===e[0]||"T"===e[0]))return e}return t?r.options.trueStr:r.options.falseStr}};function Ne({format:e,minFractionDigits:t,tag:r,value:n}){if("bigint"==typeof n)return String(n);const i="number"==typeof n?n:Number(n);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let o=Object.is(n,-0)?"-0":JSON.stringify(n);if(!e&&t&&(!r||"tag:yaml.org,2002:float"===r)&&/^-?\d/.test(o)&&!o.includes("e")){let e=o.indexOf(".");e<0&&(e=o.length,o+=".");let r=t-(o.length-e-1);for(;r-- >0;)o+="0"}return o}const Re={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Ne},Le={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Ne(e)}},De={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new U(parseFloat(e)),r=e.indexOf(".");return-1!==r&&"0"===e[e.length-1]&&(t.minFractionDigits=e.length-r-1),t},stringify:Ne},Me=e=>"bigint"==typeof e||Number.isInteger(e),ze=(e,t,r,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),r);function Be(e,t,r){const{value:n}=e;return Me(n)&&n>=0?r+n.toString(t):Ne(e)}const Fe={identify:e=>Me(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>ze(e,2,8,r),stringify:e=>Be(e,8,"0o")},qe={identify:Me,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>ze(e,0,10,r),stringify:Ne},Ue={identify:e=>Me(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>ze(e,2,16,r),stringify:e=>Be(e,16,"0x")},Ve=[Ae,$e,Ce,Te,Ie,Fe,qe,Ue,Re,Le,De];function We(e){return"bigint"==typeof e||Number.isInteger(e)}const He=({value:e})=>JSON.stringify(e),Ke=[Ae,$e].concat([{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:He},{identify:e=>null==e,createNode:()=>new U(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:He},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>"true"===e,stringify:He},{identify:We,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:r})=>r?BigInt(e):parseInt(e,10),stringify:({value:e})=>We(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:He}],{default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)}),Qe={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if("function"==typeof atob){const t=atob(e.replace(/[\n\r]/g,"")),r=new Uint8Array(t.length);for(let e=0;e1&&t("Each pair must have its own sequence indicator");const e=n.items[0]||new xe(new U(null));if(n.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${n.commentBefore}\n${e.key.commentBefore}`:n.commentBefore),n.comment){const t=e.value??e.key;t.comment=t.comment?`${n.comment}\n${t.comment}`:n.comment}n=e}e.items[r]=m(n)?n:new xe(n)}}else t("Expected a sequence for this tag");return e}function Ye(e,t,r){const{replacer:n}=r,i=new je(e);i.tag="tag:yaml.org,2002:pairs";let o=0;if(t&&Symbol.iterator in Object(t))for(let s of t){let e,a;if("function"==typeof n&&(s=n.call(t,String(o++),s)),Array.isArray(s)){if(2!==s.length)throw new TypeError(`Expected [key, value] tuple: ${s}`);e=s[0],a=s[1]}else if(s&&s instanceof Object){const t=Object.keys(s);if(1!==t.length)throw new TypeError(`Expected tuple with one key, not ${t.length} keys`);e=t[0],a=s[e]}else e=s;i.items.push(ve(e,a,r))}return i}const Xe={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Ge,createNode:Ye};class Je extends je{constructor(){super(),this.add=Ee.prototype.add.bind(this),this.delete=Ee.prototype.delete.bind(this),this.get=Ee.prototype.get.bind(this),this.has=Ee.prototype.has.bind(this),this.set=Ee.prototype.set.bind(this),this.tag=Je.tag}toJSON(e,t){if(!t)return super.toJSON(e);const r=new Map;t?.onCreate&&t.onCreate(r);for(const n of this.items){let e,i;if(m(n)?(e=M(n.key,"",t),i=M(n.value,e,t)):e=M(n,"",t),r.has(e))throw new Error("Ordered maps must not include duplicate keys");r.set(e,i)}return r}static from(e,t,r){const n=Ye(e,t,r),i=new this;return i.items=n.items,i}}Je.tag="tag:yaml.org,2002:omap";const Ze={collection:"seq",identify:e=>e instanceof Map,nodeClass:Je,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const r=Ge(e,t),n=[];for(const{key:i}of r.items)y(i)&&(n.includes(i.value)?t(`Ordered maps must not include duplicate keys: ${i.value}`):n.push(i.value));return Object.assign(new Je,r)},createNode:(e,t,r)=>Je.from(e,t,r)};function et({value:e,source:t},r){return t&&(e?tt:rt).test.test(t)?t:e?r.options.trueStr:r.options.falseStr}const tt={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new U(!0),stringify:et},rt={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new U(!1),stringify:et},nt={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Ne},it={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Ne(e)}},ot={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new U(parseFloat(e.replace(/_/g,""))),r=e.indexOf(".");if(-1!==r){const n=e.substring(r+1).replace(/_/g,"");"0"===n[n.length-1]&&(t.minFractionDigits=n.length)}return t},stringify:Ne},st=e=>"bigint"==typeof e||Number.isInteger(e);function at(e,t,r,{intAsBigInt:n}){const i=e[0];if("-"!==i&&"+"!==i||(t+=1),e=e.substring(t).replace(/_/g,""),n){switch(r){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}const t=BigInt(e);return"-"===i?BigInt(-1)*t:t}const o=parseInt(e,r);return"-"===i?-1*o:o}function lt(e,t,r){const{value:n}=e;if(st(n)){const e=n.toString(t);return n<0?"-"+r+e.substr(1):r+e}return Ne(e)}const ct={identify:st,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>at(e,2,2,r),stringify:e=>lt(e,2,"0b")},ut={identify:st,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>at(e,1,8,r),stringify:e=>lt(e,8,"0")},pt={identify:st,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>at(e,0,10,r),stringify:Ne},dt={identify:st,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>at(e,2,16,r),stringify:e=>lt(e,16,"0x")};class ft extends Ee{constructor(e){super(e),this.tag=ft.tag}add(e){let t;t=m(e)?e:e&&"object"==typeof e&&"key"in e&&"value"in e&&null===e.value?new xe(e.key,null):new xe(e,null);_e(this.items,t.key)||this.items.push(t)}get(e,t){const r=_e(this.items,e);return!t&&m(r)?y(r.key)?r.key.value:r.key:r}set(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof t);const r=_e(this.items,e);r&&!t?this.items.splice(this.items.indexOf(r),1):!r&&t&&this.items.push(new xe(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,r);throw new Error("Set items must all have null values")}static from(e,t,r){const{replacer:n}=r,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t)"function"==typeof n&&(o=n.call(t,o,o)),i.items.push(ve(o,null,r));return i}}ft.tag="tag:yaml.org,2002:set";const ht={collection:"map",identify:e=>e instanceof Set,nodeClass:ft,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>ft.from(e,t,r),resolve(e,t){if(h(e)){if(e.hasAllNullValues(!0))return Object.assign(new ft,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function mt(e,t){const r=e[0],n="-"===r||"+"===r?e.substring(1):e,i=e=>t?BigInt(e):Number(e),o=n.replace(/_/g,"").split(":").reduce((e,t)=>e*i(60)+i(t),i(0));return"-"===r?i(-1)*o:o}function yt(e){let{value:t}=e,r=e=>e;if("bigint"==typeof t)r=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return Ne(e);let n="";t<0&&(n="-",t*=r(-1));const i=r(60),o=[t%i];return t<60?o.unshift(0):(t=(t-o[0])/i,o.unshift(t%i),t>=60&&(t=(t-o[0])/i,o.unshift(t))),n+o.map(e=>String(e).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const gt={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:r})=>mt(e,r),stringify:yt},bt={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>mt(e,!1),stringify:yt},vt={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(vt.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,n,i,o,s,a]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0;let c=Date.UTC(r,n-1,i,o||0,s||0,a||0,l);const u=t[8];if(u&&"Z"!==u){let e=mt(u,!1);Math.abs(e)<30&&(e*=60),c-=6e4*e}return new Date(c)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},xt=[Ae,$e,Ce,Te,tt,rt,ct,ut,pt,dt,nt,it,ot,Qe,he,Ze,Xe,ht,gt,bt,vt],wt=new Map([["core",Ve],["failsafe",[Ae,$e,Ce]],["json",Ke],["yaml11",xt],["yaml-1.1",xt]]),St={binary:Qe,bool:Ie,float:De,floatExp:Le,floatNaN:Re,floatTime:bt,int:qe,intHex:Ue,intOct:Fe,intTime:gt,map:Ae,merge:he,null:Te,omap:Ze,pairs:Xe,seq:$e,set:ht,timestamp:vt},kt={"tag:yaml.org,2002:binary":Qe,"tag:yaml.org,2002:merge":he,"tag:yaml.org,2002:omap":Ze,"tag:yaml.org,2002:pairs":Xe,"tag:yaml.org,2002:set":ht,"tag:yaml.org,2002:timestamp":vt};function Ot(e,t,r){const n=wt.get(t);if(n&&!e)return r&&!n.includes(he)?n.concat(he):n.slice();let i=n;if(!i){if(!Array.isArray(e)){const e=Array.from(wt.keys()).filter(e=>"yaml11"!==e).map(e=>JSON.stringify(e)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}i=[]}if(Array.isArray(e))for(const o of e)i=i.concat(o);else"function"==typeof e&&(i=e(i.slice()));return r&&(i=i.concat(he)),i.reduce((e,t)=>{const r="string"==typeof t?St[t]:t;if(!r){const e=JSON.stringify(t),r=Object.keys(St).map(e=>JSON.stringify(e)).join(", ");throw new Error(`Unknown custom tag ${e}; use one of ${r}`)}return e.includes(r)||e.push(r),e},[])}const _t=(e,t)=>e.keyt.key?1:0;class Et{constructor({compat:e,customTags:t,merge:r,resolveKnownTags:n,schema:i,sortMapEntries:o,toStringDefaults:s}){this.compat=Array.isArray(e)?Ot(e,"compat"):e?Ot(null,e):null,this.name="string"==typeof i&&i||"core",this.knownTags=n?kt:{},this.tags=Ot(t,this.name,r),this.toStringOptions=s??null,Object.defineProperty(this,a,{value:Ae}),Object.defineProperty(this,c,{value:Ce}),Object.defineProperty(this,u,{value:$e}),this.sortMapEntries="function"==typeof o?o:!0===o?_t:null}clone(){const e=Object.create(Et.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}class At{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,p,{value:s});let n=null;"function"==typeof t||Array.isArray(t)?n=t:void 0===r&&t&&(r=t,t=void 0);const i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=i;let{version:o}=i;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new I({version:o}),this.setSchema(o,r),this.contents=void 0===e?null:this.createNode(e,n,r)}clone(){const e=Object.create(At.prototype,{[p]:{value:s}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=v(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){jt(this.contents)&&this.contents.add(e)}addIn(e,t){jt(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const r=R(this);e.anchor=!t||r.has(t)?L(t||"a",r):t}return new B(e.anchor)}createNode(e,t,r){let n;if("function"==typeof t)e=t.call({"":e},"",e),n=t;else if(Array.isArray(t)){const e=e=>"number"==typeof e||e instanceof String||e instanceof Number,r=t.filter(e).map(String);r.length>0&&(t=t.concat(r)),n=t}else void 0===r&&t&&(r=t,t=void 0);const{aliasDuplicateObjects:i,anchorPrefix:o,flow:s,keepUndefined:a,onTagObj:l,tag:c}=r??{},{onAnchor:u,setAnchors:p,sourceObjects:d}=function(e,t){const r=[],n=new Map;let i=null;return{onAnchor:n=>{r.push(n),i??(i=R(e));const o=L(t,i);return i.add(o),o},setAnchors:()=>{for(const e of r){const t=n.get(e);if("object"!=typeof t||!t.anchor||!y(t.node)&&!b(t.node)){const t=new Error("Failed to resolve repeated object (this should not happen)");throw t.source=e,t}t.node.anchor=t.anchor}},sourceObjects:n}}(this,o||"a"),f=V(e,c,{aliasDuplicateObjects:i??!0,keepUndefined:a??!1,onAnchor:u,onTagObj:l,replacer:n,schema:this.schema,sourceObjects:d});return s&&b(f)&&(f.flow=!0),p(),f}createPair(e,t,r={}){const n=this.createNode(e,null,r),i=this.createNode(t,null,r);return new xe(n,i)}delete(e){return!!jt(this.contents)&&this.contents.delete(e)}deleteIn(e){return H(e)?null!=this.contents&&(this.contents=null,!0):!!jt(this.contents)&&this.contents.deleteIn(e)}get(e,t){return b(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return H(e)?!t&&y(this.contents)?this.contents.value:this.contents:b(this.contents)?this.contents.getIn(e,t):void 0}has(e){return!!b(this.contents)&&this.contents.has(e)}hasIn(e){return H(e)?void 0!==this.contents:!!b(this.contents)&&this.contents.hasIn(e)}set(e,t){null==this.contents?this.contents=W(this.schema,[e],t):jt(this.contents)&&this.contents.set(e,t)}setIn(e,t){H(e)?this.contents=t:null==this.contents?this.contents=W(this.schema,Array.from(e),t):jt(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){let r;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new I({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new I({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const t=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else{if(!r)throw new Error("With a null YAML version, the { schema: Schema } option is required");this.schema=new Et(Object.assign(r,t))}}toJS({json:e,jsonArg:t,mapAsMap:r,maxAliasCount:n,onAnchor:i,reviver:o}={}){const s={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===r,mapKeyWarned:!1,maxAliasCount:"number"==typeof n?n:100},a=M(this.contents,t??"",s);if("function"==typeof i)for(const{count:l,res:c}of s.anchors.values())i(c,l);return"function"==typeof o?D(o,{"":a},"",a):a}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return function(e,t){const r=[];let n=!0===t.directives;if(!1!==t.directives&&e.directives){const t=e.directives.toString(e);t?(r.push(t),n=!0):e.directives.docStart&&(n=!0)}n&&r.push("---");const i=ue(e,t),{commentString:o}=i.options;if(e.commentBefore){1!==r.length&&r.unshift("");const t=o(e.commentBefore);r.unshift(G(t,""))}let s=!1,a=null;if(e.contents){if(v(e.contents)){if(e.contents.spaceBefore&&n&&r.push(""),e.contents.commentBefore){const t=o(e.contents.commentBefore);r.push(G(t,""))}i.forceBlockIndent=!!e.comment,a=e.contents.comment}const t=a?void 0:()=>s=!0;let l=pe(e.contents,i,()=>a=null,t);a&&(l+=Y(l,"",o(a))),"|"!==l[0]&&">"!==l[0]||"---"!==r[r.length-1]?r.push(l):r[r.length-1]=`--- ${l}`}else r.push(pe(e.contents,i));if(e.directives?.docEnd)if(e.comment){const t=o(e.comment);t.includes("\n")?(r.push("..."),r.push(G(t,""))):r.push(`... ${t}`)}else r.push("...");else{let t=e.comment;t&&s&&(t=t.replace(/^\n+/,"")),t&&(s&&!a||""===r[r.length-1]||r.push(""),r.push(G(o(t),"")))}return r.join("\n")+"\n"}(this,e)}}function jt(e){if(b(e))return!0;throw new Error("Expected a YAML collection as document contents")}class Pt extends Error{constructor(e,t,r,n){super(),this.name=e,this.code=r,this.message=n,this.pos=t}}class $t extends Pt{constructor(e,t,r){super("YAMLParseError",e,t,r)}}class Ct extends Pt{constructor(e,t,r){super("YAMLWarning",e,t,r)}}const Tt=(e,t)=>r=>{if(-1===r.pos[0])return;r.linePos=r.pos.map(e=>t.linePos(e));const{line:n,col:i}=r.linePos[0];r.message+=` at line ${n}, column ${i}`;let o=i-1,s=e.substring(t.lineStarts[n-1],t.lineStarts[n]).replace(/[\n\r]+$/,"");if(o>=60&&s.length>80){const e=Math.min(o-39,s.length-79);s="\u2026"+s.substring(e),o-=e-1}if(s.length>80&&(s=s.substring(0,79)+"\u2026"),n>1&&/^ *$/.test(s.substring(0,o))){let r=e.substring(t.lineStarts[n-2],t.lineStarts[n-1]);r.length>80&&(r=r.substring(0,79)+"\u2026\n"),s=r+s}if(/[^ ]/.test(s)){let e=1;const t=r.linePos[1];t?.line===n&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-o)));const a=" ".repeat(o)+"^".repeat(e);r.message+=`:\n\n${s}\n${a}\n`}};function It(e,{flow:t,indicator:r,next:n,offset:i,onError:o,parentIndent:s,startOnNewline:a}){let l=!1,c=a,u=a,p="",d="",f=!1,h=!1,m=null,y=null,g=null,b=null,v=null,x=null,w=null;for(const O of e)switch(h&&("space"!==O.type&&"newline"!==O.type&&"comma"!==O.type&&o(O.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h=!1),m&&(c&&"comment"!==O.type&&"newline"!==O.type&&o(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),O.type){case"space":t||"doc-start"===r&&"flow-collection"===n?.type||!O.source.includes("\t")||(m=O),u=!0;break;case"comment":{u||o(O,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=O.source.substring(1)||" ";p?p+=d+e:p=e,d="",c=!1;break}case"newline":c?p?p+=O.source:x&&"seq-item-ind"===r||(l=!0):d+=O.source,c=!0,f=!0,(y||g)&&(b=O),u=!0;break;case"anchor":y&&o(O,"MULTIPLE_ANCHORS","A node can have at most one anchor"),O.source.endsWith(":")&&o(O.offset+O.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),y=O,w??(w=O.offset),c=!1,u=!1,h=!0;break;case"tag":g&&o(O,"MULTIPLE_TAGS","A node can have at most one tag"),g=O,w??(w=O.offset),c=!1,u=!1,h=!0;break;case r:(y||g)&&o(O,"BAD_PROP_ORDER",`Anchors and tags must be after the ${O.source} indicator`),x&&o(O,"UNEXPECTED_TOKEN",`Unexpected ${O.source} in ${t??"collection"}`),x=O,c="seq-item-ind"===r||"explicit-key-ind"===r,u=!1;break;case"comma":if(t){v&&o(O,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),v=O,c=!1,u=!1;break}default:o(O,"UNEXPECTED_TOKEN",`Unexpected ${O.type} token`),c=!1,u=!1}const S=e[e.length-1],k=S?S.offset+S.source.length:i;return h&&n&&"space"!==n.type&&"newline"!==n.type&&"comma"!==n.type&&("scalar"!==n.type||""!==n.source)&&o(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(c&&m.indent<=s||"block-map"===n?.type||"block-seq"===n?.type)&&o(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:v,found:x,spaceBefore:l,comment:p,hasNewline:f,anchor:y,tag:g,newlineAfterProp:b,end:k,start:w??k}}function Nt(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes("\n"))return!0;if(e.end)for(const t of e.end)if("newline"===t.type)return!0;return!1;case"flow-collection":for(const t of e.items){for(const e of t.start)if("newline"===e.type)return!0;if(t.sep)for(const e of t.sep)if("newline"===e.type)return!0;if(Nt(t.key)||Nt(t.value))return!0}return!1;default:return!0}}function Rt(e,t,r){if("flow-collection"===t?.type){const n=t.end[0];if(n.indent===e&&("]"===n.source||"}"===n.source)&&Nt(t)){r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}}function Lt(e,t,r){const{uniqueKeys:n}=e.options;if(!1===n)return!1;const i="function"==typeof n?n:(e,t)=>e===t||y(e)&&y(t)&&e.value===t.value;return t.some(e=>i(e.key,r))}const Dt="All mapping items must start at the same column";function Mt(e,t,r,n){let i="";if(e){let o=!1,s="";for(const a of e){const{source:e,type:l}=a;switch(l){case"space":o=!0;break;case"comment":{r&&!o&&n(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";i?i+=s+t:i=t,s="";break}case"newline":i&&(s+=e),o=!0;break;default:n(a,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}t+=e.length}}return{comment:i,offset:t}}const zt="Block collections are not allowed within flow collections",Bt=e=>e&&("block-map"===e.type||"block-seq"===e.type);function Ft(e,t,r,n,i,o){const s="block-map"===r.type?function({composeNode:e,composeEmptyNode:t},r,n,i,o){const s=new(o?.nodeClass??Ee)(r.schema);r.atRoot&&(r.atRoot=!1);let a=n.offset,l=null;for(const c of n.items){const{start:o,key:u,sep:p,value:d}=c,f=It(o,{indicator:"explicit-key-ind",next:u??p?.[0],offset:a,onError:i,parentIndent:n.indent,startOnNewline:!0}),h=!f.found;if(h){if(u&&("block-seq"===u.type?i(a,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in u&&u.indent!==n.indent&&i(a,"BAD_INDENT",Dt)),!f.anchor&&!f.tag&&!p){l=f.end,f.comment&&(s.comment?s.comment+="\n"+f.comment:s.comment=f.comment);continue}(f.newlineAfterProp||Nt(u))&&i(u??o[o.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else f.found?.indent!==n.indent&&i(a,"BAD_INDENT",Dt);r.atKey=!0;const m=f.end,y=u?e(r,u,f,i):t(r,m,o,null,f,i);r.schema.compat&&Rt(n.indent,u,i),r.atKey=!1,Lt(r,s.items,y)&&i(m,"DUPLICATE_KEY","Map keys must be unique");const g=It(p??[],{indicator:"map-value-ind",next:d,offset:y.range[2],onError:i,parentIndent:n.indent,startOnNewline:!u||"block-scalar"===u.type});if(a=g.end,g.found){h&&("block-map"!==d?.type||g.hasNewline||i(a,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&f.start0){const e=Mt(f,h,r.options.strict,i);e.comment&&(l.comment?l.comment+="\n"+e.comment:l.comment=e.comment),l.range=[n.offset,h,e.offset]}else l.range=[n.offset,h,h];return l}(e,t,r,n,o),a=s.constructor;return"!"===i||i===a.tagName?(s.tag=a.tagName,s):(i&&(s.tag=i),s)}function qt(e,t,r){const n=t.offset,i=function({offset:e,props:t},r,n){if("block-scalar-header"!==t[0].type)return n(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:i}=t[0],o=i[0];let s=0,a="",l=-1;for(let d=1;d=0;--m){const e=s[m][1];if(""!==e&&"\r"!==e)break;a=m}if(0===a){const e="+"===i.chomp&&s.length>0?"\n".repeat(Math.max(1,s.length-1)):"";let r=n+i.length;return t.source&&(r+=t.source.length),{value:e,type:o,comment:i.comment,range:[n,r,r]}}let l=t.indent+i.indent,c=t.offset+i.length,u=0;for(let m=0;ml&&(l=t.length),c+=t.length+n.length+1}for(let m=s.length-1;m>=a;--m)s[m][0].length>l&&(a=m+1);let p="",d="",f=!1;for(let m=0;ml||"\t"===t[0]?(" "===d?d="\n":f||"\n"!==d||(d="\n\n"),p+=d+e.slice(l)+t,d="\n",f=!0):""===t?"\n"===d?p+="\n":d="\n":(p+=d+t,d=" ",f=!1)}switch(i.chomp){case"-":break;case"+":for(let e=a;er(n+e,t,i);switch(i){case"scalar":a=U.PLAIN,l=function(e,t){let r="";switch(e[0]){case"\t":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":r=`block scalar indicator ${e[0]}`;break;case"@":case"`":r=`reserved character ${e[0]}`}r&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`);return Vt(e)}(o,c);break;case"single-quoted-scalar":a=U.QUOTE_SINGLE,l=function(e,t){"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote");return Vt(e.slice(1,-1)).replace(/''/g,"'")}(o,c);break;case"double-quoted-scalar":a=U.QUOTE_DOUBLE,l=function(e,t){let r="";for(let n=1;nt?e.slice(t,n+1):i)}else r+=i}'"'===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR",'Missing closing "quote');return r}(o,c);break;default:return r(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[n,n+o.length,n+o.length]}}const u=n+o.length,p=Mt(s,u,t,r);return{value:l,type:a,comment:p.comment,range:[n,u,p.offset]}}function Vt(e){let t,r;try{t=new RegExp("(.*?)(?n(r,"TAG_RESOLVE_FAILED",e)):null;let u,p;u=e.options.stringKeys&&e.atKey?e.schema[c]:l?function(e,t,r,n,i){if("!"===r)return e[c];const o=[];for(const a of e.tags)if(!a.collection&&a.tag===r){if(!a.default||!a.test)return a;o.push(a)}for(const a of o)if(a.test?.test(t))return a;const s=e.knownTags[r];if(s&&!s.collection)return e.tags.push(Object.assign({},s,{default:!1,test:void 0})),s;return i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,"tag:yaml.org,2002:str"!==r),e[c]}(e.schema,i,l,r,n):"scalar"===t.type?function({atKey:e,directives:t,schema:r},n,i,o){const s=r.tags.find(t=>(!0===t.default||e&&"key"===t.default)&&t.test?.test(n))||r[c];if(r.compat){const e=r.compat.find(e=>e.default&&e.test?.test(n))??r[c];if(s.tag!==e.tag){o(i,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${t.tagString(s.tag)} or ${t.tagString(e.tag)}`,!0)}}return s}(e,i,t,n):e.schema[c];try{const o=u.resolve(i,e=>n(r??t,"TAG_RESOLVE_FAILED",e),e.options);p=y(o)?o:new U(o)}catch(d){const e=d instanceof Error?d.message:String(d);n(r??t,"TAG_RESOLVE_FAILED",e),p=new U(i)}return p.range=a,p.source=i,o&&(p.type=o),l&&(p.tag=l),u.format&&(p.format=u.format),s&&(p.comment=s),p}function Gt(e,t,r){if(t){r??(r=t.length);for(let n=r-1;n>=0;--n){let r=t[n];switch(r.type){case"space":case"comment":case"newline":e-=r.source.length;continue}for(r=t[++n];"space"===r?.type;)e+=r.source.length,r=t[++n];break}}return e}const Yt={composeNode:Xt,composeEmptyNode:Jt};function Xt(e,t,r,n){const i=e.atKey,{spaceBefore:o,comment:s,anchor:a,tag:l}=r;let c,u=!0;switch(t.type){case"alias":c=function({options:e},{offset:t,source:r,end:n},i){const o=new B(r.substring(1));""===o.source&&i(t,"BAD_ALIAS","Alias cannot be an empty string");o.source.endsWith(":")&&i(t+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const s=t+r.length,a=Mt(n,s,e.strict,i);o.range=[t,s,a.offset],a.comment&&(o.comment=a.comment);return o}(e,t,n),(a||l)&&n(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=Qt(e,t,l,n),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{c=function(e,t,r,n,i){const o=n.tag,s=o?t.directives.tagName(o.source,e=>i(o,"TAG_RESOLVE_FAILED",e)):null;if("block-seq"===r.type){const{anchor:e,newlineAfterProp:t}=n,r=e&&o?e.offset>o.offset?e:o:e??o;r&&(!t||t.offsete.tag===s&&e.collection===a);if(!l){const n=t.schema.knownTags[s];if(n?.collection!==a)return n?i(o,"BAD_COLLECTION_TYPE",`${n.tag} used for ${a} collection, but expects ${n.collection??"scalar"}`,!0):i(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0),Ft(e,t,r,i,s);t.schema.tags.push(Object.assign({},n,{default:!1})),l=n}const c=Ft(e,t,r,i,s,l),u=l.resolve?.(c,e=>i(o,"TAG_RESOLVE_FAILED",e),t.options)??c,p=v(u)?u:new U(u);return p.range=c.range,p.tag=s,l?.format&&(p.format=l.format),p}(Yt,e,t,r,n),a&&(c.anchor=a.source.substring(1))}catch(p){n(t,"RESOURCE_EXHAUSTION",p instanceof Error?p.message:String(p))}break;default:n(t,"UNEXPECTED_TOKEN","error"===t.type?t.message:`Unsupported token (type: ${t.type})`),u=!1}if(c??(c=Jt(e,t.offset,void 0,null,r,n)),a&&""===c.anchor&&n(a,"BAD_ALIAS","Anchor cannot be an empty string"),i&&e.options.stringKeys&&(!y(c)||"string"!=typeof c.value||c.tag&&"tag:yaml.org,2002:str"!==c.tag)){n(l??t,"NON_STRING_KEY","With stringKeys, all keys must be strings")}return o&&(c.spaceBefore=!0),s&&("scalar"===t.type&&""===t.source?c.comment=s:c.commentBefore=s),e.options.keepSourceTokens&&u&&(c.srcToken=t),c}function Jt(e,t,r,n,{spaceBefore:i,comment:o,anchor:s,tag:a,end:l},c){const u=Qt(e,{type:"scalar",offset:Gt(t,r,n),indent:-1,source:""},a,c);return s&&(u.anchor=s.source.substring(1),""===u.anchor&&c(s,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(u.spaceBefore=!0),o&&(u.comment=o,u.range[2]=l),u}function Zt(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];const{offset:t,source:r}=e;return[t,t+("string"==typeof r?r.length:1)]}function er(e){let t="",r=!1,n=!1;for(let i=0;i{const i=Zt(e);n?this.warnings.push(new Ct(i,t,r)):this.errors.push(new $t(i,t,r))},this.directives=new I({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:r,afterEmptyLine:n}=er(this.prelude);if(r){const i=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${r}`:r;else if(n||e.directives.docStart||!i)e.commentBefore=r;else if(b(i)&&!i.flow&&i.items.length>0){let e=i.items[0];m(e)&&(e=e.key);const t=e.commentBefore;e.commentBefore=t?`${r}\n${t}`:r}else{const e=i.commentBefore;i.commentBefore=e?`${r}\n${e}`:r}}if(t){for(let t=0;t{const i=Zt(e);i[0]+=t,this.onError(i,"BAD_DIRECTIVE",r,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=function(e,t,{offset:r,start:n,value:i,end:o},s){const a=Object.assign({_directives:t},e),l=new At(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},u=It(n,{indicator:"doc-start",next:i??o?.[0],offset:r,onError:s,parentIndent:0,startOnNewline:!0});u.found&&(l.directives.docStart=!0,!i||"block-map"!==i.type&&"block-seq"!==i.type||u.hasNewline||s(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=i?Xt(c,i,u,s):Jt(c,u.end,n,null,u,s);const p=l.contents.range[2],d=Mt(o,p,!1,s);return d.comment&&(l.comment=d.comment),l.range=[r,p,d.offset],l}(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new $t(Zt(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const t="Unexpected doc-end without preceding document";this.errors.push(new $t(Zt(e),"UNEXPECTED_TOKEN",t));break}this.doc.directives.docEnd=!0;const t=Mt(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new $t(Zt(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const e=Object.assign({_directives:this.directives},this.options),r=new At(void 0,e);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,t,t],this.decorate(r,!1),yield r}}}function rr(e,t=!0,r){if(e){const n=(e,t,n)=>{const i="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(!r)throw new $t([i,i+1],t,n);r(i,t,n)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Ut(e,t,n);case"block-scalar":return qt({options:{strict:t}},e,n)}}return null}function nr(e,t){const{implicitKey:r=!1,indent:n,inFlow:i=!1,offset:o=-1,type:s="PLAIN"}=t,a=ce({type:s,value:e},{implicitKey:r,indent:n>0?" ".repeat(n):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:"newline",offset:-1,indent:n,source:"\n"}];switch(a[0]){case"|":case">":{const e=a.indexOf("\n"),t=a.substring(0,e),r=a.substring(e+1)+"\n",i=[{type:"block-scalar-header",offset:o,indent:n,source:t}];return or(i,l)||i.push({type:"newline",offset:-1,indent:n,source:"\n"}),{type:"block-scalar",offset:o,indent:n,props:i,source:r}}case'"':return{type:"double-quoted-scalar",offset:o,indent:n,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:o,indent:n,source:a,end:l};default:return{type:"scalar",offset:o,indent:n,source:a,end:l}}}function ir(e,t,r={}){let{afterKey:n=!1,implicitKey:i=!1,inFlow:o=!1,type:s}=r,a="indent"in e?e.indent:null;if(n&&"number"==typeof a&&(a+=2),!s)switch(e.type){case"single-quoted-scalar":s="QUOTE_SINGLE";break;case"double-quoted-scalar":s="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");s=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:s="PLAIN"}const l=ce({type:s,value:t},{implicitKey:i||null===a,indent:null!==a&&a>0?" ".repeat(a):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":!function(e,t){const r=t.indexOf("\n"),n=t.substring(0,r),i=t.substring(r+1)+"\n";if("block-scalar"===e.type){const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");t.source=n,e.source=i}else{const{offset:t}=e,r="indent"in e?e.indent:-1,o=[{type:"block-scalar-header",offset:t,indent:r,source:n}];or(o,"end"in e?e.end:void 0)||o.push({type:"newline",offset:-1,indent:r,source:"\n"});for(const n of Object.keys(e))"type"!==n&&"offset"!==n&&delete e[n];Object.assign(e,{type:"block-scalar",indent:r,props:o,source:i})}}(e,l);break;case'"':sr(e,l,"double-quoted-scalar");break;case"'":sr(e,l,"single-quoted-scalar");break;default:sr(e,l,"scalar")}}function or(e,t){if(t)for(const r of t)switch(r.type){case"space":case"comment":e.push(r);break;case"newline":return e.push(r),!0}return!1}function sr(e,t,r){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=r,e.source=t;break;case"block-scalar":{const n=e.props.slice(1);let i=t.length;"block-scalar-header"===e.props[0].type&&(i-=e.props[0].source.length);for(const e of n)e.offset+=i;delete e.props,Object.assign(e,{type:r,source:t,end:n});break}case"block-map":case"block-seq":{const n={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:r,source:t,end:[n]});break}default:{const n="indent"in e?e.indent:-1,i="end"in e&&Array.isArray(e.end)?e.end.filter(e=>"space"===e.type||"comment"===e.type||"newline"===e.type):[];for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:r,indent:n,source:t,end:i})}}}const ar=e=>"type"in e?lr(e):cr(e);function lr(e){switch(e.type){case"block-scalar":{let t="";for(const r of e.props)t+=lr(r);return t+e.source}case"block-map":case"block-seq":{let t="";for(const r of e.items)t+=cr(r);return t}case"flow-collection":{let t=e.start.source;for(const r of e.items)t+=cr(r);for(const r of e.end)t+=r.source;return t}case"document":{let t=cr(e);if(e.end)for(const r of e.end)t+=r.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const r of e.end)t+=r.source;return t}}}function cr({start:e,key:t,sep:r,value:n}){let i="";for(const o of e)i+=o.source;if(t&&(i+=lr(t)),r)for(const o of r)i+=o.source;return n&&(i+=lr(n)),i}const ur=Symbol("break visit"),pr=Symbol("skip children"),dr=Symbol("remove item");function fr(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),hr(Object.freeze([]),e,t)}function hr(e,t,r){let n=r(t,e);if("symbol"==typeof n)return n;for(const i of["key","value"]){const o=t[i];if(o&&"items"in o){for(let t=0;t{let r=e;for(const[n,i]of t){const e=r?.[n];if(!e||!("items"in e))return;r=e.items[i]}return r},fr.parentCollection=(e,t)=>{const r=fr.itemAtPath(e,t.slice(0,-1)),n=t[t.length-1][0],i=r?.[n];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};const mr="\ufeff",yr="\x02",gr="\x18",br="\x1f",vr=e=>!!e&&"items"in e,xr=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type);function wr(e){switch(e){case mr:return"";case yr:return"";case gr:return"";case br:return"";default:return JSON.stringify(e)}}function Sr(e){switch(e){case mr:return"byte-order-mark";case yr:return"doc-mode";case gr:return"flow-error-end";case br:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function kr(e){switch(e){case void 0:case" ":case"\n":case"\r":case"\t":return!0;default:return!1}}const Or=new Set("0123456789ABCDEFabcdef"),_r=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Er=new Set(",[]{}"),Ar=new Set(" ,[]{}\n\r\t"),jr=e=>!e||Ar.has(e);class Pr{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if("string"!=typeof e)throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let r=this.next??"stream";for(;r&&(t||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||"\t"===t;)t=this.buffer[++e];return!t||"#"===t||"\n"===t||"\r"===t&&"\n"===this.buffer[e+1]}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let r=0;for(;" "===t;)t=this.buffer[++r+e];if("\r"===t){const t=this.buffer[r+e+1];if("\n"===t||!t&&!this.atEnd)return e+r+1}return"\n"===t||r>=this.indentNext||!t&&!this.atEnd?e+r:-1}if("-"===t||"."===t){const t=this.buffer.substr(e,3);if(("---"===t||"..."===t)&&kr(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return("number"!=typeof e||-1!==e&&ethis.indentValue&&!kr(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&kr(t)){const e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(null===e)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(jr),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=(yield*this.parseBlockScalarHeader()),t+=(yield*this.pushSpaces(!0)),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,r=-1;do{e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=r=t):t=0,t+=(yield*this.pushSpaces(!0))}while(e+t>0);const n=this.getLine();if(null===n)return this.setNext("flow");if(-1!==r&&r"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if("-"!==t)break}return yield*this.pushUntil(e=>kr(e)||"#"===e)}*parseBlockScalar(){let e,t=this.pos-1,r=0;e:for(let i=this.pos;e=this.buffer[i];++i)switch(e){case" ":r+=1;break;case"\n":t=i,r=0;break;case"\r":{const e=this.buffer[i+1];if(!e&&!this.atEnd)return this.setNext("block-scalar");if("\n"===e)break}default:break e}if(!e&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=r:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{const e=this.continueScalar(t+1);if(-1===e)break;t=this.buffer.indexOf("\n",e)}while(-1!==t);if(-1===t){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let n=t+1;for(e=this.buffer[n];" "===e;)e=this.buffer[++n];if("\t"===e){for(;"\t"===e||" "===e||"\r"===e||"\n"===e;)e=this.buffer[++n];t=n-1}else if(!this.blockScalarKeep)for(;;){let e=t-1,n=this.buffer[e];"\r"===n&&(n=this.buffer[--e]);const i=e;for(;" "===n;)n=this.buffer[--e];if(!("\n"===n&&e>=this.pos&&e+1+r>i))break;t=e}return yield br,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t,r=this.pos-1,n=this.pos-1;for(;t=this.buffer[++n];)if(":"===t){const t=this.buffer[n+1];if(kr(t)||e&&Er.has(t))break;r=n}else if(kr(t)){let i=this.buffer[n+1];if("\r"===t&&("\n"===i?(n+=1,t="\n",i=this.buffer[n+1]):r=n),"#"===i||e&&Er.has(i))break;if("\n"===t){const e=this.continueScalar(n+1);if(-1===e)break;n=Math.max(n,e-2)}}else{if(e&&Er.has(t))break;r=n}return t||this.atEnd?(yield br,yield*this.pushToIndex(r+1,!0),e?"flow":"doc"):this.setNext("plain-scalar")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(t&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=(yield*this.pushTag()),e+=(yield*this.pushSpaces(!0));continue e;case"&":e+=(yield*this.pushUntil(jr)),e+=(yield*this.pushSpaces(!0));continue e;case"-":case"?":case":":{const t=this.flowLevel>0,r=this.charAt(1);if(kr(r)||t&&Er.has(r)){t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=(yield*this.pushCount(1)),e+=(yield*this.pushSpaces(!0));continue e}}}break e}return e}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,t=this.buffer[e];for(;!kr(t)&&">"!==t;)t=this.buffer[++e];return yield*this.pushToIndex(">"===t?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(_r.has(t))t=this.buffer[++e];else{if("%"!==t||!Or.has(this.buffer[e+1])||!Or.has(this.buffer[e+2]))break;t=this.buffer[e+=3]}return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return"\n"===e?yield*this.pushCount(1):"\r"===e&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(e){let t,r=this.pos-1;do{t=this.buffer[++r]}while(" "===t||e&&"\t"===t);const n=r-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=r),n}*pushUntil(e){let t=this.pos,r=this.buffer[t];for(;!e(r);)r=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}class $r{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,r=this.lineStarts.length;for(;t>1;this.lineStarts[n]=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;"space"===e[++t]?.type;);return e.splice(t,e.length)}function Lr(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let r=0;r0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if("doc-end"!==this.type||"doc-end"===e?.type){if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}else{for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source})}}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{const e=this.peek(1);switch("block-scalar"===t.type?t.indent="indent"in e?e.indent:0:"flow-collection"===t.type&&"document"===e.type&&(t.indent=0),"flow-collection"===t.type&&Dr(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const r=e.items[e.items.length-1];if(r.value)return e.items.push({start:[],key:t,sep:[]}),void(this.onKeyLine=!0);if(!r.sep)return Object.assign(r,{key:t,sep:[]}),void(this.onKeyLine=!r.explicitKey);r.value=t;break}case"block-seq":{const r=e.items[e.items.length-1];r.value?e.items.push({start:[],value:t}):r.value=t;break}case"flow-collection":{const r=e.items[e.items.length-1];return void(!r||r.value?e.items.push({start:[],key:t,sep:[]}):r.sep?r.value=t:Object.assign(r,{key:t,sep:[]}))}default:yield*this.pop(),yield*this.pop(t)}if(!("document"!==e.type&&"block-map"!==e.type&&"block-seq"!==e.type||"block-map"!==t.type&&"block-seq"!==t.type)){const r=t.items[t.items.length-1];r&&!r.sep&&!r.value&&r.start.length>0&&-1===Tr(r.start)&&(0===t.indent||r.start.every(e=>"comment"!==e.type||e.indent=e.indent){const r=!this.onKeyLine&&this.indent===e.indent,n=r&&(t.sep||t.explicitKey)&&"seq-item-ind"!==this.type;let i=[];if(n&&t.sep&&!t.value){const r=[];for(let n=0;ne.indent&&(r.length=0);break;default:r.length=0}}r.length>=2&&(i=t.sep.splice(r[1]))}switch(this.type){case"anchor":case"tag":return void(n||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"explicit-key-ind":return t.sep||t.explicitKey?n||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}):(t.start.push(this.sourceToken),t.explicitKey=!0),void(this.onKeyLine=!0);case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Cr(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(Ir(t.key)&&!Cr(t.sep,"newline")){const e=Rr(t.start),r=t.key,n=t.sep;n.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:r,sep:n}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken);else if(Cr(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const e=Rr(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||n?e.items.push({start:i,key:null,sep:[this.sourceToken]}):Cr(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return void(this.onKeyLine=!0);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const r=this.flowScalar(this.type);return void(n||t.value?(e.items.push({start:i,key:r,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(r):(Object.assign(t,{key:r,sep:[]}),this.onKeyLine=!0))}default:{const n=this.startBlockValue(e);if(n){if("block-seq"===n.type){if(!t.explicitKey&&t.sep&&!Cr(t.sep,"newline"))return void(yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source}))}else r&&e.items.push({start:i});return void this.stack.push(n)}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const r="end"in t.value?t.value.end:void 0,n=Array.isArray(r)?r[r.length-1]:void 0;"comment"===n?.type?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const r=e.items[e.items.length-2],n=r?.value?.end;if(Array.isArray(n))return Lr(n,t.start),n.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;return void t.start.push(this.sourceToken);case"seq-item-ind":if(this.indent!==e.indent)break;return void(t.value||Cr(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken))}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do{yield*this.pop(),e=this.peek(1)}while("flow-collection"===e?.type)}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":return void(!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken));case"map-value-ind":return void(!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]}));case"space":case"comment":case"newline":case"anchor":case"tag":return void(!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const r=this.flowScalar(this.type);return void(!t||t.value?e.items.push({start:[],key:r,sep:[]}):t.sep?this.stack.push(r):Object.assign(t,{key:r,sep:[]}))}case"flow-map-end":case"flow-seq-end":return void e.end.push(this.sourceToken)}const r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const t=this.peek(2);if("block-map"===t.type&&("map-value-ind"===this.type&&t.indent===e.indent||"newline"===this.type&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if("map-value-ind"===this.type&&"flow-collection"!==t.type){const r=Rr(Nr(t));Dr(e);const n=e.end.splice(1,e.end.length);n.push(this.sourceToken);const i={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=Rr(Nr(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=Rr(Nr(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return"comment"===this.type&&(!(this.indent<=t)&&e.every(e=>"newline"===e.type||"space"===e.type))}*documentEnd(e){"doc-mode"!==this.type&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}}function zr(e){const t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new $r||null,prettyErrors:t}}function Br(e,t={}){const{lineCounter:r,prettyErrors:n}=zr(t),i=new Mr(r?.addNewLine),o=new tr(t),s=Array.from(o.compose(i.parse(e)));if(n&&r)for(const a of s)a.errors.forEach(Tt(e,r)),a.warnings.forEach(Tt(e,r));return s.length>0?s:Object.assign([],{empty:!0},o.streamInfo())}function Fr(e,t={}){const{lineCounter:r,prettyErrors:n}=zr(t),i=new Mr(r?.addNewLine),o=new tr(t);let s=null;for(const a of o.compose(i.parse(e),!0,e.length))if(s){if("silent"!==s.options.logLevel){s.errors.push(new $t(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else s=a;return n&&r&&(s.errors.forEach(Tt(e,r)),s.warnings.forEach(Tt(e,r))),s}function qr(e,t,r){let n;"function"==typeof t?n=t:void 0===r&&t&&"object"==typeof t&&(r=t);const i=Fr(e,r);if(!i)return null;if(i.warnings.forEach(e=>de(i.options.logLevel,e)),i.errors.length>0){if("silent"!==i.options.logLevel)throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:n},r))}function Ur(e,t,r){let n=null;if("function"==typeof t||Array.isArray(t)?n=t:void 0===r&&t&&(r=t),"string"==typeof r&&(r=r.length),"number"==typeof r){const e=Math.round(r);r=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){const{keepUndefined:e}=r??t??{};if(!e)return}return f(e)&&!n?e.toString(r):new At(e,n,r).toString(r)}const Vr=i},68884(e){"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},73243(e){"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/applicator","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/applicator":true},"$dynamicAnchor":"meta","title":"Applicator vocabulary meta-schema","type":["object","boolean"],"properties":{"prefixItems":{"$ref":"#/$defs/schemaArray"},"items":{"$dynamicRef":"#meta"},"contains":{"$dynamicRef":"#meta"},"additionalProperties":{"$dynamicRef":"#meta"},"properties":{"type":"object","additionalProperties":{"$dynamicRef":"#meta"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$dynamicRef":"#meta"},"propertyNames":{"format":"regex"},"default":{}},"dependentSchemas":{"type":"object","additionalProperties":{"$dynamicRef":"#meta"},"default":{}},"propertyNames":{"$dynamicRef":"#meta"},"if":{"$dynamicRef":"#meta"},"then":{"$dynamicRef":"#meta"},"else":{"$dynamicRef":"#meta"},"allOf":{"$ref":"#/$defs/schemaArray"},"anyOf":{"$ref":"#/$defs/schemaArray"},"oneOf":{"$ref":"#/$defs/schemaArray"},"not":{"$dynamicRef":"#meta"}},"$defs":{"schemaArray":{"type":"array","minItems":1,"items":{"$dynamicRef":"#meta"}}}}')},36211(e){"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/content","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/content":true},"$dynamicAnchor":"meta","title":"Content vocabulary meta-schema","type":["object","boolean"],"properties":{"contentEncoding":{"type":"string"},"contentMediaType":{"type":"string"},"contentSchema":{"$dynamicRef":"#meta"}}}')},13953(e){"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/core","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/core":true},"$dynamicAnchor":"meta","title":"Core vocabulary meta-schema","type":["object","boolean"],"properties":{"$id":{"$ref":"#/$defs/uriReferenceString","$comment":"Non-empty fragments not allowed.","pattern":"^[^#]*#?$"},"$schema":{"$ref":"#/$defs/uriString"},"$ref":{"$ref":"#/$defs/uriReferenceString"},"$anchor":{"$ref":"#/$defs/anchorString"},"$dynamicRef":{"$ref":"#/$defs/uriReferenceString"},"$dynamicAnchor":{"$ref":"#/$defs/anchorString"},"$vocabulary":{"type":"object","propertyNames":{"$ref":"#/$defs/uriString"},"additionalProperties":{"type":"boolean"}},"$comment":{"type":"string"},"$defs":{"type":"object","additionalProperties":{"$dynamicRef":"#meta"}}},"$defs":{"anchorString":{"type":"string","pattern":"^[A-Za-z_][-A-Za-z0-9._]*$"},"uriString":{"type":"string","format":"uri"},"uriReferenceString":{"type":"string","format":"uri-reference"}}}')},36573(e){"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/format-annotation","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/format-annotation":true},"$dynamicAnchor":"meta","title":"Format vocabulary meta-schema for annotation results","type":["object","boolean"],"properties":{"format":{"type":"string"}}}')},65386(e){"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/meta-data","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/meta-data":true},"$dynamicAnchor":"meta","title":"Meta-data vocabulary meta-schema","type":["object","boolean"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"default":true,"deprecated":{"type":"boolean","default":false},"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true}}}')},98818(e){"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/unevaluated","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/unevaluated":true},"$dynamicAnchor":"meta","title":"Unevaluated applicator vocabulary meta-schema","type":["object","boolean"],"properties":{"unevaluatedItems":{"$dynamicRef":"#meta"},"unevaluatedProperties":{"$dynamicRef":"#meta"}}}')},9509(e){"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/validation","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/validation":true},"$dynamicAnchor":"meta","title":"Validation vocabulary meta-schema","type":["object","boolean"],"properties":{"type":{"anyOf":[{"$ref":"#/$defs/simpleTypes"},{"type":"array","items":{"$ref":"#/$defs/simpleTypes"},"minItems":1,"uniqueItems":true}]},"const":true,"enum":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/$defs/nonNegativeInteger"},"minLength":{"$ref":"#/$defs/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"maxItems":{"$ref":"#/$defs/nonNegativeInteger"},"minItems":{"$ref":"#/$defs/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"maxContains":{"$ref":"#/$defs/nonNegativeInteger"},"minContains":{"$ref":"#/$defs/nonNegativeInteger","default":1},"maxProperties":{"$ref":"#/$defs/nonNegativeInteger"},"minProperties":{"$ref":"#/$defs/nonNegativeIntegerDefault0"},"required":{"$ref":"#/$defs/stringArray"},"dependentRequired":{"type":"object","additionalProperties":{"$ref":"#/$defs/stringArray"}}},"$defs":{"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"$ref":"#/$defs/nonNegativeInteger","default":0},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}}}')},47207(e){"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/schema","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/core":true,"https://json-schema.org/draft/2020-12/vocab/applicator":true,"https://json-schema.org/draft/2020-12/vocab/unevaluated":true,"https://json-schema.org/draft/2020-12/vocab/validation":true,"https://json-schema.org/draft/2020-12/vocab/meta-data":true,"https://json-schema.org/draft/2020-12/vocab/format-annotation":true,"https://json-schema.org/draft/2020-12/vocab/content":true},"$dynamicAnchor":"meta","title":"Core and Validation specifications meta-schema","allOf":[{"$ref":"meta/core"},{"$ref":"meta/applicator"},{"$ref":"meta/unevaluated"},{"$ref":"meta/validation"},{"$ref":"meta/meta-data"},{"$ref":"meta/format-annotation"},{"$ref":"meta/content"}],"type":["object","boolean"],"$comment":"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.","properties":{"definitions":{"$comment":"\\"definitions\\" has been replaced by \\"$defs\\".","type":"object","additionalProperties":{"$dynamicRef":"#meta"},"deprecated":true,"default":{}},"dependencies":{"$comment":"\\"dependencies\\" has been split and replaced by \\"dependentSchemas\\" and \\"dependentRequired\\" in order to serve their differing semantics.","type":"object","additionalProperties":{"anyOf":[{"$dynamicRef":"#meta"},{"$ref":"meta/validation#/$defs/stringArray"}]},"deprecated":true,"default":{}},"$recursiveAnchor":{"$comment":"\\"$recursiveAnchor\\" has been replaced by \\"$dynamicAnchor\\".","$ref":"meta/core#/$defs/anchorString","deprecated":true},"$recursiveRef":{"$comment":"\\"$recursiveRef\\" has been replaced by \\"$dynamicRef\\".","$ref":"meta/core#/$defs/uriReferenceString","deprecated":true}}}')}}]); \ No newline at end of file diff --git a/assets/js/4307.ad6a53d8.js.LICENSE.txt b/assets/js/4307.ad6a53d8.js.LICENSE.txt new file mode 100644 index 000000000..613dde2a2 --- /dev/null +++ b/assets/js/4307.ad6a53d8.js.LICENSE.txt @@ -0,0 +1,109 @@ +/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/ + +/*! + * Redocusaurus + * https://redocusaurus.vercel.app/ + * (c) 2025 Rohit Gohri + * Released under the MIT License + */ + +/*! + * Stickyfill -- `position: sticky` polyfill + * v. 1.1.1 | https://github.com/wilddeer/stickyfill + * Copyright Oleg Korsunsky | http://wd.dizaina.net/ + * + * MIT License + */ + +/*! + * lunr.Builder + * Copyright (C) 2020 Oliver Nightingale + */ + +/*! + * lunr.Index + * Copyright (C) 2020 Oliver Nightingale + */ + +/*! + * lunr.Pipeline + * Copyright (C) 2020 Oliver Nightingale + */ + +/*! + * lunr.Set + * Copyright (C) 2020 Oliver Nightingale + */ + +/*! + * lunr.TokenSet + * Copyright (C) 2020 Oliver Nightingale + */ + +/*! + * lunr.Vector + * Copyright (C) 2020 Oliver Nightingale + */ + +/*! + * lunr.stemmer + * Copyright (C) 2020 Oliver Nightingale + * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt + */ + +/*! + * lunr.stopWordFilter + * Copyright (C) 2020 Oliver Nightingale + */ + +/*! + * lunr.tokenizer + * Copyright (C) 2020 Oliver Nightingale + */ + +/*! + * lunr.trimmer + * Copyright (C) 2020 Oliver Nightingale + */ + +/*! + * lunr.utils + * Copyright (C) 2020 Oliver Nightingale + */ + +/*! + * perfect-scrollbar v1.5.6 + * Copyright 2024 Hyunje Jun, MDBootstrap and Contributors + * Licensed under MIT + */ + +/*! @license DOMPurify 3.4.14 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.14/LICENSE */ + +/*! For license information please see redoc.browser.lib.js.LICENSE.txt */ + +/*!*************************************************** +* mark.js v8.11.1 +* https://markjs.io/ +* Copyright (c) 2014–2018, Julian KΓΌhnel +* Released under the MIT license https://git.io/vwTVl +*****************************************************/ + +/** + * @license React + * use-sync-external-store-shim.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +/** + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9 + * Copyright (C) 2020 Oliver Nightingale + * @license MIT + */ diff --git a/assets/js/4325.59b87f28.js b/assets/js/4325.59b87f28.js new file mode 100644 index 000000000..539125ce6 --- /dev/null +++ b/assets/js/4325.59b87f28.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[4325],{64918(t,e,n){n.d(e,{o:()=>i});var i=(0,n(86827).K)(()=>"\n /* Font Awesome icon styling - consolidated */\n .label-icon {\n display: inline-block;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n }\n \n .node .label-icon path {\n fill: currentColor;\n stroke: revert;\n stroke-width: revert;\n }\n","getIconStyles")},338(t,e,n){n.d(e,{CP:()=>u,Ck:()=>d,HT:()=>p,PB:()=>y,aC:()=>h,lC:()=>l,m:()=>c,tk:()=>o});var i=n(76385),s=n(86827),r=n(16750),a=n(70451),o=(0,s.K)((t,e)=>{const n=t.append("rect");if(n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),e.name&&n.attr("name",e.name),e.rx&&n.attr("rx",e.rx),e.ry&&n.attr("ry",e.ry),void 0!==e.attrs)for(const i in e.attrs)n.attr(i,e.attrs[i]);return e.class&&n.attr("class",e.class),n},"drawRect"),l=(0,s.K)((t,e)=>{const n={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};o(t,n).lower()},"drawBackgroundRect"),c=(0,s.K)((t,e)=>{const n=e.text.replace(i.H1," "),s=t.append("text");s.attr("x",e.x),s.attr("y",e.y),s.attr("class","legend"),s.style("text-anchor",e.anchor),e.class&&s.attr("class",e.class);const r=s.append("tspan");return r.attr("x",e.x+2*e.textMargin),r.text(n),s},"drawText"),h=(0,s.K)((t,e,n,i)=>{const s=t.append("image");s.attr("x",e),s.attr("y",n);const a=(0,r.J)(i);s.attr("xlink:href",a)},"drawImage"),u=(0,s.K)((t,e,n,i)=>{const s=t.append("use");s.attr("x",e),s.attr("y",n);const a=(0,r.J)(i);s.attr("xlink:href",`#${a}`)},"drawEmbeddedImage"),y=(0,s.K)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),p=(0,s.K)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),d=(0,s.K)(()=>{let t=(0,a.Ltv)(".mermaidTooltip");return t.empty()&&(t=(0,a.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip")},4325(t,e,n){n.d(e,{diagram:()=>X});var i=n(64918),s=n(338),r=n(76385),a=(n(31293),n(86827)),o=n(70451),l=function(){var t=(0,a.K)(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],s=[1,11],r=[1,12],o=[1,13],l=[1,14],c={trace:(0,a.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:(0,a.K)(function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 13:i.addTask(r[o-1],r[o]),this.$="task"}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:s,16:r,17:o,18:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:i,14:s,16:r,17:o,18:l},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:(0,a.K)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,a.K)(function(t){var e=this,n=[0],i=[],s=[null],r=[],o=this.table,l="",c=0,h=0,u=0,y=r.slice.call(arguments,1),p=Object.create(this.lexer),d={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(d.yy[f]=this.yy[f]);p.setInput(t,d.yy),d.yy.lexer=p,d.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var g=p.yylloc;r.push(g);var x=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,a.K)(function(t){n.length=n.length-2*t,s.length=s.length-t,r.length=r.length-t},"popStack"),(0,a.K)(m,"lex");for(var k,b,_,w,v,K,$,T,M,S={};;){if(_=n[n.length-1],this.defaultActions[_]?w=this.defaultActions[_]:(null==k&&(k=m()),w=o[_]&&o[_][k]),void 0===w||!w.length||!w[0]){var C="";for(K in M=[],o[_])this.terminals_[K]&&K>2&&M.push("'"+this.terminals_[K]+"'");C=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==k?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[k]||k,line:p.yylineno,loc:g,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+k);switch(w[0]){case 1:n.push(k),s.push(p.yytext),r.push(p.yylloc),n.push(w[1]),k=null,b?(k=b,b=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,g=p.yylloc,u>0&&u--);break;case 2:if($=this.productions_[w[1]][1],S.$=s[s.length-$],S._$={first_line:r[r.length-($||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-($||1)].first_column,last_column:r[r.length-1].last_column},x&&(S._$.range=[r[r.length-($||1)].range[0],r[r.length-1].range[1]]),void 0!==(v=this.performAction.apply(S,[l,h,c,d.yy,w[1],s,r].concat(y))))return v;$&&(n=n.slice(0,-1*$*2),s=s.slice(0,-1*$),r=r.slice(0,-1*$)),n.push(this.productions_[w[1]][0]),s.push(S.$),r.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0},"parse")},h=function(){return{EOF:1,parseError:(0,a.K)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,a.K)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,a.K)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,a.K)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,a.K)(function(){return this._more=!0,this},"more"),reject:(0,a.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,a.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,a.K)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,a.K)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,a.K)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,a.K)(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},"test_match"),next:(0,a.K)(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,a.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,a.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,a.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,a.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,a.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,a.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,a.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,a.K)(function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}}}();function u(){this.yy={}}return c.lexer=h,(0,a.K)(u,"Parser"),u.prototype=c,c.Parser=u,new u}();l.parser=l;var c=l,h="",u=[],y=[],p=[],d=(0,a.K)(function(){u.length=0,y.length=0,h="",p.length=0,(0,r.IU)()},"clear"),f=(0,a.K)(function(t){h=t,u.push(t)},"addSection"),g=(0,a.K)(function(){return u},"getSections"),x=(0,a.K)(function(){let t=_();let e=0;for(;!t&&e<100;)t=_(),e++;return y.push(...p),y},"getTasks"),m=(0,a.K)(function(){const t=[];y.forEach(e=>{e.people&&t.push(...e.people)});return[...new Set(t)].sort()},"updateActors"),k=(0,a.K)(function(t,e){const n=e.substr(1).split(":");let i=0,s=[];1===n.length?(i=Number(n[0]),s=[]):(i=Number(n[0]),s=n[1].split(","));const r=s.map(t=>t.trim()),a={section:h,type:h,people:r,task:t,score:i};p.push(a)},"addTask"),b=(0,a.K)(function(t){const e={section:h,type:h,description:t,task:t,classes:[]};y.push(e)},"addTaskOrg"),_=(0,a.K)(function(){const t=(0,a.K)(function(t){return p[t].processed},"compileTask");let e=!0;for(const[n,i]of p.entries())t(n),e=e&&i.processed;return e},"compileTasks"),w=(0,a.K)(function(){return m()},"getActors"),v={getConfig:(0,a.K)(()=>(0,r.D7)().journey,"getConfig"),clear:d,setDiagramTitle:r.ke,getDiagramTitle:r.ab,setAccTitle:r.SV,getAccTitle:r.iN,setAccDescription:r.EI,getAccDescription:r.m7,addSection:f,getSections:g,getTasks:x,addTask:k,addTaskOrg:b,getActors:w},K=(0,a.K)(t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${t.textColor}\n }\n\n .legend {\n fill: ${t.textColor};\n font-family: ${t.fontFamily};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${t.textColor}\n }\n\n .face {\n ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${t.fillType0?`fill: ${t.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${t.fillType0?`fill: ${t.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${t.fillType0?`fill: ${t.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${t.fillType0?`fill: ${t.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${t.fillType0?`fill: ${t.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${t.fillType0?`fill: ${t.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${t.fillType0?`fill: ${t.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${t.fillType0?`fill: ${t.fillType7}`:""};\n }\n\n .actor-0 {\n ${t.actor0?`fill: ${t.actor0}`:""};\n }\n .actor-1 {\n ${t.actor1?`fill: ${t.actor1}`:""};\n }\n .actor-2 {\n ${t.actor2?`fill: ${t.actor2}`:""};\n }\n .actor-3 {\n ${t.actor3?`fill: ${t.actor3}`:""};\n }\n .actor-4 {\n ${t.actor4?`fill: ${t.actor4}`:""};\n }\n .actor-5 {\n ${t.actor5?`fill: ${t.actor5}`:""};\n }\n ${(0,i.o)()}\n`,"getStyles"),$=(0,a.K)(function(t,e){return(0,s.tk)(t,e)},"drawRect"),T=(0,a.K)(function(t,e){const n=15,i=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",n).attr("stroke-width",2).attr("overflow","visible"),s=t.append("g");function r(t){const i=(0,o.JLW)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function l(t){const i=(0,o.JLW)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function c(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return s.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),(0,a.K)(r,"smile"),(0,a.K)(l,"sad"),(0,a.K)(c,"ambivalent"),e.score>3?r(s):e.score<3?l(s):c(s),i},"drawFace"),M=(0,a.K)(function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},"drawCircle"),S=(0,a.K)(function(t,e){return(0,s.m)(t,e)},"drawText"),C=(0,a.K)(function(t,e){function n(t,e,n,i,s){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-s)+" "+(t+n-1.2*s)+","+(e+i)+" "+t+","+(e+i)}(0,a.K)(n,"genPoints");const i=t.append("polygon");i.attr("points",n(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,S(t,e)},"drawLabel"),E=(0,a.K)(function(t,e,n){const i=t.append("g"),r=(0,s.PB)();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=n.width*e.taskCount+n.diagramMarginX*(e.taskCount-1),r.height=n.height,r.class="journey-section section-type-"+e.num,r.rx=3,r.ry=3,$(i,r),j(n)(e.text,i,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+e.num},n,e.colour)},"drawSection"),I=-1,P=(0,a.K)(function(t,e,n,i){const r=e.x+n.width/2,a=t.append("g");I++;a.append("line").attr("id",i+"-task"+I).attr("x1",r).attr("y1",e.y).attr("x2",r).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),T(a,{cx:r,cy:300+30*(5-e.score),score:e.score});const o=(0,s.PB)();o.x=e.x,o.y=e.y,o.fill=e.fill,o.width=n.width,o.height=n.height,o.class="task task-type-"+e.num,o.rx=3,o.ry=3,$(a,o);let l=e.x+14;e.people.forEach(t=>{const n=e.actors[t].color,i={cx:l,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};M(a,i),l+=10}),j(n)(e.task,a,o.x,o.y,o.width,o.height,{class:"task"},n,e.colour)},"drawTask"),A=(0,a.K)(function(t,e){(0,s.lC)(t,e)},"drawBackgroundRect"),j=function(){function t(t,e,n,s,r,a,o,l){i(e.append("text").attr("x",n+r/2).attr("y",s+a/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function e(t,e,n,s,r,a,o,l,c){const{taskFontSize:h,taskFontFamily:u}=l,y=t.split(//gi);for(let p=0;p{const r=F[s].color,a={cx:20,cy:i,r:7,fill:r,stroke:"#000",pos:F[s].position};L.drawCircle(t,a);let o=t.append("text").attr("visibility","hidden").text(s);const l=o.node().getBoundingClientRect().width;o.remove();let c=[];if(l<=n)c=[s];else{const e=s.split(" ");let i="";o=t.append("text").attr("visibility","hidden"),e.forEach(t=>{const e=i?`${i} ${t}`:t;o.text(e);if(o.node().getBoundingClientRect().width>n){if(i&&c.push(i),i=t,o.text(t),o.node().getBoundingClientRect().width>n){let e="";for(const i of t)e+=i,o.text(e+"-"),o.node().getBoundingClientRect().width>n&&(c.push(e.slice(0,-1)+"-"),e=i);i=e}}else i=e}),i&&c.push(i),o.remove()}c.forEach((n,s)=>{const r={x:40,y:i+7+20*s,fill:"#666",text:n,textMargin:e.boxTextMargin??5},a=L.drawText(t,r).node().getBoundingClientRect().width;a>D&&a>e.leftMargin-a&&(D=a)}),i+=Math.max(20,20*c.length)})}(0,a.K)(V,"drawActorLegend");var R=(0,r.D7)().journey,O=0,N=(0,a.K)(function(t,e,n,i){const s=(0,r.D7)(),a=s.journey.titleColor,l=s.journey.titleFontSize,c=s.journey.titleFontFamily,h=s.securityLevel;let u;"sandbox"===h&&(u=(0,o.Ltv)("#i"+e));const y="sandbox"===h?(0,o.Ltv)(u.nodes()[0].contentDocument.body):(0,o.Ltv)("body");z.init();const p=y.select("#"+e);L.initGraphics(p,e);const d=i.db.getTasks(),f=i.db.getDiagramTitle(),g=i.db.getActors();for(const r in F)delete F[r];let x=0;g.forEach(t=>{F[t]={color:R.actorColours[x%R.actorColours.length],position:x},x++}),V(p),O=R.leftMargin+D,z.insert(0,0,O,50*Object.keys(F).length),q(p,d,0,e);const m=z.getBounds();f&&p.append("text").text(f).attr("x",O).attr("font-size",l).attr("font-weight","bold").attr("y",25).attr("fill",a).attr("font-family",c);const k=m.stopy-m.starty+2*R.diagramMarginY,b=O+m.stopx+2*R.diagramMarginX;(0,r.a$)(p,k,b,R.useMaxWidth),p.append("line").attr("x1",O).attr("y1",4*R.height).attr("x2",b-O-4).attr("y2",4*R.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+e+"-arrowhead)");const _=f?70:0;p.attr("viewBox",`${m.startx} -25 ${b} ${k+_}`),p.attr("preserveAspectRatio","xMinYMin meet"),p.attr("height",k+_+25)},"draw"),z={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:(0,a.K)(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:(0,a.K)(function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])},"updateVal"),updateBounds:(0,a.K)(function(t,e,n,i){const s=(0,r.D7)().journey,o=this;let l=0;function c(r){return(0,a.K)(function(a){l++;const c=o.sequenceItems.length-l+1;o.updateVal(a,"starty",e-c*s.boxMargin,Math.min),o.updateVal(a,"stopy",i+c*s.boxMargin,Math.max),o.updateVal(z.data,"startx",t-c*s.boxMargin,Math.min),o.updateVal(z.data,"stopx",n+c*s.boxMargin,Math.max),"activation"!==r&&(o.updateVal(a,"startx",t-c*s.boxMargin,Math.min),o.updateVal(a,"stopx",n+c*s.boxMargin,Math.max),o.updateVal(z.data,"starty",e-c*s.boxMargin,Math.min),o.updateVal(z.data,"stopy",i+c*s.boxMargin,Math.max))},"updateItemBounds")}(0,a.K)(c,"updateFn"),this.sequenceItems.forEach(c())},"updateBounds"),insert:(0,a.K)(function(t,e,n,i){const s=Math.min(t,n),r=Math.max(t,n),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(z.data,"startx",s,Math.min),this.updateVal(z.data,"starty",a,Math.min),this.updateVal(z.data,"stopx",r,Math.max),this.updateVal(z.data,"stopy",o,Math.max),this.updateBounds(s,a,r,o)},"insert"),bumpVerticalPos:(0,a.K)(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:(0,a.K)(function(){return this.verticalPos},"getVerticalPos"),getBounds:(0,a.K)(function(){return this.data},"getBounds")},W=R.sectionFills,Y=R.sectionColours,q=(0,a.K)(function(t,e,n,i){const s=(0,r.D7)().journey;let a="";const o=n+(2*s.height+s.diagramMarginY);let l=0,c="#CCC",h="black",u=0;for(const[r,y]of e.entries()){if(a!==y.section){c=W[l%W.length],u=l%W.length,h=Y[l%Y.length];let n=0;const i=y.section;for(let t=r;t(F[e]&&(t[e]=F[e]),t),{});y.x=r*s.taskMargin+r*s.width+O,y.y=o,y.width=s.diagramMarginX,y.height=s.diagramMarginY,y.colour=h,y.fill=c,y.num=u,y.actors=n,L.drawTask(t,y,s,i),z.insert(y.x,y.y,y.x+y.width+s.taskMargin,450)}},"drawTasks"),J={setConf:B,draw:N},X={parser:c,db:v,renderer:J,styles:K,init:(0,a.K)(t=>{J.setConf(t.journey),v.clear()},"init")}}}]); \ No newline at end of file diff --git a/assets/js/45d8935a.ccf9b506.js b/assets/js/45d8935a.ccf9b506.js new file mode 100644 index 000000000..eb90080e5 --- /dev/null +++ b/assets/js/45d8935a.ccf9b506.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[8932],{82057(e,t,o){o.r(t),o.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>p,frontMatter:()=>a,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"develop/tools-and-features/bee-js","title":"Bee JS","description":"Documentation for the JavaScript library providing programmatic access to Bee node APIs.","source":"@site/docs/develop/tools-and-features/bee-js.md","sourceDirName":"develop/tools-and-features","slug":"/develop/tools-and-features/bee-js","permalink":"/docs/develop/tools-and-features/bee-js","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/develop/tools-and-features/bee-js.md","tags":[],"version":"current","frontMatter":{"title":"Bee JS","id":"bee-js","description":"Documentation for the JavaScript library providing programmatic access to Bee node APIs."},"sidebar":"develop","previous":{"title":"Postage Stamp Batches","permalink":"/docs/develop/tools-and-features/buy-a-stamp-batch"},"next":{"title":"Gateway Proxy","permalink":"/docs/develop/tools-and-features/gateway-proxy"}}');var n=o(74848),r=o(28453);const a={title:"Bee JS",id:"bee-js",description:"Documentation for the JavaScript library providing programmatic access to Bee node APIs."},i=void 0,c={},d=[];function l(e){const t={a:"a",p:"p",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(t.p,{children:["bee-js is Bee's complementary JavaScript library. It is the technology underpinning ",(0,n.jsx)(t.a,{href:"/docs/bee/working-with-bee/swarm-cli",children:"swarm-cli"})," and ",(0,n.jsx)(t.a,{href:"/docs/desktop/introduction",children:"Swarm Desktop"})," and is a powerful tool for building completely decentralized apps."]}),"\n",(0,n.jsxs)(t.p,{children:["See the ",(0,n.jsx)(t.a,{href:"https://bee-js.ethswarm.org/docs/",children:"bee-js"})," documentation for detailed information on using and installing the library."]})]})}function p(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(l,{...e})}):l(e)}},28453(e,t,o){o.d(t,{R:()=>a,x:()=>i});var s=o(96540);const n={},r=s.createContext(n);function a(e){const t=s.useContext(r);return s.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:a(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4806.7105a1b8.js b/assets/js/4806.7105a1b8.js new file mode 100644 index 000000000..fce98fcfe --- /dev/null +++ b/assets/js/4806.7105a1b8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[4806],{338(t,e,s){s.d(e,{CP:()=>d,Ck:()=>y,HT:()=>p,PB:()=>u,aC:()=>h,lC:()=>l,m:()=>c,tk:()=>a});var i=s(76385),n=s(86827),r=s(16750),o=s(70451),a=(0,n.K)((t,e)=>{const s=t.append("rect");if(s.attr("x",e.x),s.attr("y",e.y),s.attr("fill",e.fill),s.attr("stroke",e.stroke),s.attr("width",e.width),s.attr("height",e.height),e.name&&s.attr("name",e.name),e.rx&&s.attr("rx",e.rx),e.ry&&s.attr("ry",e.ry),void 0!==e.attrs)for(const i in e.attrs)s.attr(i,e.attrs[i]);return e.class&&s.attr("class",e.class),s},"drawRect"),l=(0,n.K)((t,e)=>{const s={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};a(t,s).lower()},"drawBackgroundRect"),c=(0,n.K)((t,e)=>{const s=e.text.replace(i.H1," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),e.class&&n.attr("class",e.class);const r=n.append("tspan");return r.attr("x",e.x+2*e.textMargin),r.text(s),n},"drawText"),h=(0,n.K)((t,e,s,i)=>{const n=t.append("image");n.attr("x",e),n.attr("y",s);const o=(0,r.J)(i);n.attr("xlink:href",o)},"drawImage"),d=(0,n.K)((t,e,s,i)=>{const n=t.append("use");n.attr("x",e),n.attr("y",s);const o=(0,r.J)(i);n.attr("xlink:href",`#${o}`)},"drawEmbeddedImage"),u=(0,n.K)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),p=(0,n.K)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),y=(0,n.K)(()=>{let t=(0,o.Ltv)(".mermaidTooltip");return t.empty()&&(t=(0,o.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip")},74806(t,e,s){s.d(e,{Zk:()=>y,q7:()=>G,tM:()=>ht,u4:()=>ct});var i=s(96755),n=s(1672),r=s(9417),o=s(338),a=s(16459),l=s(76385),c=s(31293),h=s(86827),d=s(70451),u=s(99418),p=function(){var t=(0,h.K)(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[1,2],s=[1,3],i=[1,4],n=[2,4],r=[1,9],o=[1,11],a=[1,16],l=[1,17],c=[1,18],d=[1,19],u=[1,33],p=[1,20],y=[1,21],g=[1,22],f=[1,23],m=[1,24],S=[1,26],k=[1,27],b=[1,28],T=[1,29],_=[1,30],x=[1,31],E=[1,32],D=[1,35],$=[1,36],C=[1,37],v=[1,38],w=[1,34],I=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],A=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],L=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],R={trace:(0,h.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"--\x3e":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"--\x3e",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:(0,h.K)(function(t,e,s,i,n,r,o){var a=r.length-1;switch(n){case 3:return i.setRootDoc(r[a]),r[a];case 4:this.$=[];break;case 5:"nl"!=r[a]&&(r[a-1].push(r[a]),this.$=r[a-1]);break;case 6:case 7:case 12:this.$=r[a];break;case 8:this.$="nl";break;case 13:const t=r[a-1];t.description=i.trimColon(r[a]),this.$=t;break;case 14:this.$={stmt:"relation",state1:r[a-2],state2:r[a]};break;case 15:const e=i.trimColon(r[a]);this.$={stmt:"relation",state1:r[a-3],state2:r[a-1],description:e};break;case 19:this.$={stmt:"state",id:r[a-3],type:"default",description:"",doc:r[a-1]};break;case 20:var l=r[a],c=r[a-2].trim();if(r[a].match(":")){var h=r[a].split(":");l=h[0],c=[c,h[1]]}this.$={stmt:"state",id:l,type:"default",description:c};break;case 21:this.$={stmt:"state",id:r[a-3],type:"default",description:r[a-5],doc:r[a-1]};break;case 22:this.$={stmt:"state",id:r[a],type:"fork"};break;case 23:this.$={stmt:"state",id:r[a],type:"join"};break;case 24:this.$={stmt:"state",id:r[a],type:"choice"};break;case 25:this.$={stmt:"state",id:i.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:r[a-1].trim(),note:{position:r[a-2].trim(),text:r[a].trim()}};break;case 29:this.$=r[a].trim(),i.setAccTitle(this.$);break;case 30:case 31:this.$=r[a].trim(),i.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:r[a-3],url:r[a-2],tooltip:r[a-1]};break;case 33:this.$={stmt:"click",id:r[a-3],url:r[a-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:r[a-1].trim(),classes:r[a].trim()};break;case 36:this.$={stmt:"style",id:r[a-1].trim(),styleClass:r[a].trim()};break;case 37:this.$={stmt:"applyClass",id:r[a-1].trim(),styleClass:r[a].trim()};break;case 38:i.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:i.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:i.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:i.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:r[a].trim(),type:"default",description:""};break;case 46:case 47:this.$={stmt:"state",id:r[a-2].trim(),classes:[r[a].trim()],type:"default",description:""}}},"anonymous"),table:[{3:1,4:e,5:s,6:i},{1:[3]},{3:5,4:e,5:s,6:i},{3:6,4:e,5:s,6:i},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],n,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:r,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:a,17:l,19:c,22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:x,48:E,51:D,52:$,53:C,54:v,57:w},t(I,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:a,17:l,19:c,22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:x,48:E,51:D,52:$,53:C,54:v,57:w},t(I,[2,7]),t(I,[2,8]),t(I,[2,9]),t(I,[2,10]),t(I,[2,11]),t(I,[2,12],{14:[1,40],15:[1,41]}),t(I,[2,16]),{18:[1,42]},t(I,[2,18],{20:[1,43]}),{23:[1,44]},t(I,[2,22]),t(I,[2,23]),t(I,[2,24]),t(I,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(I,[2,28]),{34:[1,49]},{36:[1,50]},t(I,[2,31]),{13:51,24:u,57:w},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(A,[2,44],{58:[1,56]}),t(A,[2,45],{58:[1,57]}),t(I,[2,38]),t(I,[2,39]),t(I,[2,40]),t(I,[2,41]),t(I,[2,6]),t(I,[2,13]),{13:58,24:u,57:w},t(I,[2,17]),t(L,n,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(I,[2,29]),t(I,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(I,[2,14],{14:[1,71]}),{4:r,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:a,17:l,19:c,21:[1,72],22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:x,48:E,51:D,52:$,53:C,54:v,57:w},t(I,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(I,[2,34]),t(I,[2,35]),t(I,[2,36]),t(I,[2,37]),t(A,[2,46]),t(A,[2,47]),t(I,[2,15]),t(I,[2,19]),t(L,n,{7:78}),t(I,[2,26]),t(I,[2,27]),{5:[1,79]},{5:[1,80]},{4:r,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:a,17:l,19:c,21:[1,81],22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:x,48:E,51:D,52:$,53:C,54:v,57:w},t(I,[2,32]),t(I,[2,33]),t(I,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:(0,h.K)(function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},"parseError"),parse:(0,h.K)(function(t){var e=this,s=[0],i=[],n=[null],r=[],o=this.table,a="",l=0,c=0,d=0,u=r.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;r.push(f);var m=p.options&&p.options.ranges;function S(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,h.K)(function(t){s.length=s.length-2*t,n.length=n.length-t,r.length=r.length-t},"popStack"),(0,h.K)(S,"lex");for(var k,b,T,_,x,E,D,$,C,v={};;){if(T=s[s.length-1],this.defaultActions[T]?_=this.defaultActions[T]:(null==k&&(k=S()),_=o[T]&&o[T][k]),void 0===_||!_.length||!_[0]){var w="";for(E in C=[],o[T])this.terminals_[E]&&E>2&&C.push("'"+this.terminals_[E]+"'");w=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==k?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(w,{text:p.match,token:this.terminals_[k]||k,line:p.yylineno,loc:f,expected:C})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+k);switch(_[0]){case 1:s.push(k),n.push(p.yytext),r.push(p.yylloc),s.push(_[1]),k=null,b?(k=b,b=null):(c=p.yyleng,a=p.yytext,l=p.yylineno,f=p.yylloc,d>0&&d--);break;case 2:if(D=this.productions_[_[1]][1],v.$=n[n.length-D],v._$={first_line:r[r.length-(D||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(D||1)].first_column,last_column:r[r.length-1].last_column},m&&(v._$.range=[r[r.length-(D||1)].range[0],r[r.length-1].range[1]]),void 0!==(x=this.performAction.apply(v,[a,c,l,y.yy,_[1],n,r].concat(u))))return x;D&&(s=s.slice(0,-1*D*2),n=n.slice(0,-1*D),r=r.slice(0,-1*D)),s.push(this.productions_[_[1]][0]),n.push(v.$),r.push(v._$),$=o[s[s.length-2]][s[s.length-1]],s.push($);break;case 3:return!0}}return!0},"parse")},N=function(){return{EOF:1,parseError:(0,h.K)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,h.K)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,h.K)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,h.K)(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,h.K)(function(){return this._more=!0,this},"more"),reject:(0,h.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,h.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,h.K)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,h.K)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,h.K)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,h.K)(function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},"test_match"),next:(0,h.K)(function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;re[0].length)){if(e=s,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,h.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,h.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,h.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,h.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,h.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,h.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,h.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,h.K)(function(t,e,s,i){function n(){const s=e.yytext.indexOf("%%");if(0===s)return!1;if(s>0){const i=e.yytext.slice(0,s),n=e.yytext.slice(s);n&&t.lexer.unput(n),e.yytext=i}return!0}(0,h.K)(n,"processId");switch(s){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:case 43:return 51;case 5:case 44:return 52;case 6:case 45:return 53;case 7:case 46:return 54;case 8:case 78:return 5;case 9:case 10:case 11:case 12:case 57:case 63:break;case 13:case 33:return this.pushState("SCALE"),17;case 14:case 34:return 18;case 15:case 21:case 35:case 50:case 54:this.popState();break;case 16:return this.begin("acc_title"),33;case 17:return this.popState(),"acc_title_value";case 18:return this.begin("acc_descr"),35;case 19:return this.popState(),"acc_descr_value";case 20:this.begin("acc_descr_multiline");break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 25:return this.popState(),this.pushState("CLASSDEFID"),42;case 26:return this.popState(),43;case 27:return this.pushState("CLASS"),48;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;case 29:return this.popState(),50;case 30:return this.pushState("STYLE"),45;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 32:return this.popState(),47;case 36:this.pushState("STATE");break;case 37:case 40:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 38:case 41:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 39:case 42:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";case 49:case 65:if(!n())return;return this.popState(),"ID";case 51:return"STATE_DESCR";case 52:throw new Error('Error: State name must be a single word. Found: "'+e.yytext.trim()+'"');case 53:return 19;case 55:return this.popState(),this.pushState("struct"),20;case 56:return this.popState(),21;case 58:return this.begin("NOTE"),29;case 59:return this.popState(),this.pushState("NOTE_ID"),59;case 60:return this.popState(),this.pushState("NOTE_ID"),60;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 64:return"NOTE_TEXT";case 66:if(!n())return;return this.popState(),this.pushState("NOTE_TEXT"),24;case 67:return this.popState(),e.yytext=e.yytext.substr(2).trim(),31;case 68:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),31;case 69:case 70:return 6;case 71:return 16;case 72:return 57;case 73:if(!n())return;return 24;case 74:return e.yytext=e.yytext.trim(),14;case 75:return 15;case 76:return 28;case 77:return 58;case 79:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}}}();function K(){this.yy={}}return R.lexer=N,(0,h.K)(K,"Parser"),K.prototype=R,R.Parser=K,new K}();p.parser=p;var y=p,g="state",f="root",m="relation",S="default",k="divider",b="fill:none",T="fill: #333",_="markdown",x="normal",E="rect",D="rectWithTitle",$="divider",C="roundedWithTitle",v="statediagram",w=`${v}-state`,I="transition",A=`${I} note-edge`,L=`${v}-note`,R=`${v}-cluster`,N=`${v}-cluster-alt`,K="parent",O="note",B="----",F=`${B}${O}`,P=`${B}${K}`,Y=(0,h.K)((t,e="TB")=>{if(!t.doc)return e;let s=e;for(const i of t.doc)"dir"===i.stmt&&(s=i.value);return s},"getDir"),G={getClasses:(0,h.K)(function(t,e){return e.db.getClasses()},"getClasses"),draw:(0,h.K)(async function(t,e,s,o){c.R.info("REF0:"),c.R.info("Drawing state diagram (v2)",e);const{securityLevel:h,state:d,layout:u}=(0,l.D7)();o.db.extract(o.db.getRootDocV2());const p=o.db.getData(),y=(0,i.A)(e,h);p.type=o.type,p.layoutAlgorithm=u,p.nodeSpacing=d?.nodeSpacing||50,p.rankSpacing=d?.rankSpacing||50;"neo"===(0,l.D7)().look?p.markers=["barbNeo"]:p.markers=["barb"],p.diagramId=e,await(0,r.XX)(p,y);try{("function"==typeof o.db.getLinks?o.db.getLinks():new Map).forEach((t,e)=>{const s="string"==typeof e?e:"string"==typeof e?.id?e.id:"",i=p.nodes.find(t=>t.id===s);if(!s)return void c.R.warn("\u26a0\ufe0f Invalid or missing stateId from key:",JSON.stringify(e));const n=y.node()?.querySelectorAll("g.node, g.rough-node");let r;if(n?.forEach(t=>{const e=t.textContent?.trim();t.id!==i?.domId&&e!==s||(r=t)}),!r)return void c.R.warn("\u26a0\ufe0f Could not find node matching text:",s);const o=r.parentNode;if(!o)return void c.R.warn("\u26a0\ufe0f Node has no parent, cannot wrap:",s);const a=document.createElementNS("http://www.w3.org/2000/svg","a"),l=t.url.replace(/^"+|"+$/g,"");if(a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l),a.setAttribute("target","_blank"),t.tooltip){const e=t.tooltip.replace(/^"+|"+$/g,"");a.setAttribute("title",e),r.setAttribute("title",e)}o.replaceChild(a,r),a.appendChild(r),c.R.info("\ud83d\udd17 Wrapped node in tag for:",s,t.url)})}catch(g){c.R.error("\u274c Error injecting clickable links:",g)}a._K.insertTitle(y,"statediagramTitleText",d?.titleTopMargin??25,o.db.getDiagramTitle()),(0,n.P)(y,8,v,d?.useMaxWidth??!0)},"draw"),getDir:Y},j=new Map,z=0;function M(t="",e=0,s="",i=B){return`state-${t}${null!==s&&s.length>0?`${i}${s}`:""}-${e}`}(0,h.K)(M,"stateDomId");var W=(0,h.K)((t,e,s,i,n,r,o,a)=>{c.R.trace("items",e),e.forEach(e=>{switch(e.stmt){case g:case S:J(t,e,s,i,n,r,o,a);break;case m:{J(t,e.state1,s,i,n,r,o,a),J(t,e.state2,s,i,n,r,o,a);const c="neo"===o,h={id:"edge"+z,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:c?"arrow_barb_neo":"arrow_barb",style:b,labelStyle:"",label:l.Y2.sanitizeText(e.description??"",(0,l.D7)()),arrowheadStyle:T,labelpos:"c",labelType:_,thickness:x,classes:I,look:o};n.push(h),z++}}})},"setupDoc"),U=(0,h.K)((t,e="TB")=>{let s=e;if(t.doc)for(const i of t.doc)"dir"===i.stmt&&(s=i.value);return s},"getDir");function X(t,e,s){if(!e.id||""===e.id||""===e.id)return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(t=>{const i=s.get(t);i&&(e.cssCompiledStyles=[...e.cssCompiledStyles??[],...i.styles])}));const i=t.find(t=>t.id===e.id);i?Object.assign(i,e):t.push(e)}function H(t){return t?.classes?.join(" ")??""}function V(t){return t?.styles??[]}(0,h.K)(X,"insertOrUpdateNode"),(0,h.K)(H,"getClassesFromDbInfo"),(0,h.K)(V,"getStylesFromDbInfo");var J=(0,h.K)((t,e,s,i,n,r,o,a)=>{const h=e.id,d=s.get(h),u=H(d),p=V(d),y=(0,l.D7)();if(c.R.info("dataFetcher parsedItem",e,d,p),"root"!==h){let s=E;!0===e.start?s="stateStart":!1===e.start&&(s="stateEnd"),e.type!==S&&(s=e.type),j.get(h)||j.set(h,{id:h,shape:s,description:l.Y2.sanitizeText(h,y),cssClasses:`${u} ${w}`,cssStyles:p});const d=j.get(h);e.description&&(Array.isArray(d.description)?(d.shape=D,d.description.push(e.description)):d.description?.length&&d.description.length>0?(d.shape=D,d.description===h?d.description=[e.description]:d.description=[d.description,e.description]):(d.shape=E,d.description=e.description),d.description=l.Y2.sanitizeTextOrArray(d.description,y)),1===d.description?.length&&d.shape===D&&("group"===d.type?d.shape=C:d.shape=E),!d.type&&e.doc&&(c.R.info("Setting cluster for XCX",h,U(e)),d.type="group",d.isGroup=!0,d.dir=U(e),d.shape=e.type===k?$:C,d.cssClasses=`${d.cssClasses} ${R} ${r?N:""}`);const g={labelStyle:"",shape:d.shape,label:d.description,cssClasses:d.cssClasses,cssCompiledStyles:[],cssStyles:d.cssStyles,id:h,dir:d.dir,domId:M(h,z),type:d.type,isGroup:"group"===d.type,padding:8,rx:10,ry:10,look:o,labelType:"markdown"};if(g.shape===$&&(g.label=""),t&&"root"!==t.id&&(c.R.trace("Setting node ",h," to be child of its parent ",t.id),g.parentId=t.id),g.centerLabel=!0,e.note){const t={labelStyle:"",shape:"note",label:e.note.text,labelType:"markdown",cssClasses:L,cssStyles:[],cssCompiledStyles:[],id:h+F+"-"+z,domId:M(h,z,O),type:d.type,isGroup:"group"===d.type,padding:y.flowchart?.padding,look:o,position:e.note.position},s=h+P,r={labelStyle:"",shape:"noteGroup",label:e.note.text,cssClasses:d.cssClasses,cssStyles:[],id:h+P,domId:M(h,z,K),type:"group",isGroup:!0,padding:16,look:o,position:e.note.position};z++,r.id=s,t.parentId=s,X(i,r,a),X(i,t,a),X(i,g,a);let l=h,c=t.id;"left of"===e.note.position&&(l=t.id,c=h),n.push({id:l+"-"+c,start:l,end:c,arrowhead:"none",arrowTypeEnd:"",style:b,labelStyle:"",classes:A,arrowheadStyle:T,labelpos:"c",labelType:_,thickness:x,look:o})}else X(i,g,a)}e.doc&&(c.R.trace("Adding nodes children "),W(e,e.doc,s,i,n,!r,o,a))},"dataFetcher"),q=(0,h.K)(()=>{j.clear(),z=0},"reset"),Z="[*]",Q="start",tt="[*]",et="end",st="color",it="fill",nt="bgFill",rt=",",ot=(0,h.K)(()=>new Map,"newClassesList"),at=(0,h.K)(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),lt=(0,h.K)(t=>JSON.parse(JSON.stringify(t)),"clone"),ct=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=ot(),this.documents={root:at()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=l.iN,this.setAccTitle=l.SV,this.getAccDescription=l.m7,this.setAccDescription=l.EI,this.setDiagramTitle=l.ke,this.getDiagramTitle=l.ab,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this),this.bindFunctions=this.bindFunctions.bind(this)}static{(0,h.K)(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){this.clear(!0);for(const i of Array.isArray(t)?t:t.doc)switch(i.stmt){case g:this.addState(i.id.trim(),i.type,i.doc,i.description,i.note);break;case m:this.addRelation(i.state1,i.state2,i.description);break;case"classDef":this.addStyleClass(i.id.trim(),i.classes);break;case"style":this.handleStyleDef(i);break;case"applyClass":this.setCssClass(i.id.trim(),i.styleClass);break;case"click":this.addLink(i.id,i.url,i.tooltip)}const e=this.getStates(),s=(0,l.D7)();q(),J(void 0,this.getRootDocV2(),e,this.nodes,this.edges,!0,s.look,this.classes);for(const i of this.nodes)if(Array.isArray(i.label)){if(i.description=i.label.slice(1),i.isGroup&&i.description.length>0)throw new Error(`Group nodes can only have label. Remove the additional description for node [${i.id}]`);i.label=i.label[0]}}handleStyleDef(t){const e=t.id.trim().split(","),s=t.styleClass.split(",");for(const i of e){let t=this.getState(i);if(!t){const e=i.trim();this.addState(e),t=this.getState(e)}t&&(t.styles=s.map(t=>t.replace(/;/g,"")?.trim()))}}setRootDoc(t){c.R.info("Setting root doc",t),this.rootDoc=t,1===this.version?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(t,e,s){if(e.stmt===m)return this.docTranslator(t,e.state1,!0),void this.docTranslator(t,e.state2,!1);if(e.stmt===g&&(e.id===Z?(e.id=t.id+(s?"_start":"_end"),e.start=s):e.id=e.id.trim()),e.stmt!==f&&e.stmt!==g||!e.doc)return;const i=[];let n=[];for(const r of e.doc)if(r.type===k){const t=lt(r);t.doc=lt(n),i.push(t),n=[]}else n.push(r);if(i.length>0&&n.length>0){const t={stmt:g,id:(0,a.$C)(),type:"divider",doc:lt(n)};i.push(lt(t)),e.doc=i}e.doc.forEach(t=>this.docTranslator(e,t,!0))}getRootDocV2(){return this.docTranslator({id:f,stmt:f},{id:f,stmt:f,doc:this.rootDoc},!0),{id:f,doc:this.rootDoc}}addState(t,e=S,s=void 0,i=void 0,n=void 0,r=void 0,o=void 0,a=void 0){const h=t?.trim();if(this.currentDocument.states.has(h)){const t=this.currentDocument.states.get(h);if(!t)throw new Error(`State not found: ${h}`);t.doc||(t.doc=s),t.type||(t.type=e)}else c.R.info("Adding state ",h,i),this.currentDocument.states.set(h,{stmt:g,id:h,descriptions:[],type:e,doc:s,note:n,classes:[],styles:[],textStyles:[]});if(i){c.R.info("Setting state description",h,i);(Array.isArray(i)?i:[i]).forEach(t=>this.addDescription(h,t.trim()))}if(n){const t=this.currentDocument.states.get(h);if(!t)throw new Error(`State not found: ${h}`);t.note=n,t.note.text=l.Y2.sanitizeText(t.note.text,(0,l.D7)())}if(r){c.R.info("Setting state classes",h,r);(Array.isArray(r)?r:[r]).forEach(t=>this.setCssClass(h,t.trim()))}if(o){c.R.info("Setting state styles",h,o);(Array.isArray(o)?o:[o]).forEach(t=>this.setStyle(h,t.trim()))}if(a){c.R.info("Setting state styles",h,o);(Array.isArray(a)?a:[a]).forEach(t=>this.setTextStyle(h,t.trim()))}}clear(t){this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:at()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=ot(),t||(this.links=new Map,(0,l.IU)())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){c.R.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,e,s){this.links.set(t,{url:e,tooltip:s}),c.R.warn("Adding link",t,e,s)}getLinks(){return this.links}startIdIfNeeded(t=""){return t===Z?(this.startEndCount++,`${Q}${this.startEndCount}`):t}startTypeIfNeeded(t="",e=S){return t===Z?Q:e}endIdIfNeeded(t=""){return t===tt?(this.startEndCount++,`${et}${this.startEndCount}`):t}endTypeIfNeeded(t="",e=S){return t===tt?et:e}addRelationObjs(t,e,s=""){const i=this.startIdIfNeeded(t.id.trim()),n=this.startTypeIfNeeded(t.id.trim(),t.type),r=this.startIdIfNeeded(e.id.trim()),o=this.startTypeIfNeeded(e.id.trim(),e.type);this.addState(i,n,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(r,o,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.currentDocument.relations.push({id1:i,id2:r,relationTitle:l.Y2.sanitizeText(s,(0,l.D7)())})}addRelation(t,e,s){if("object"==typeof t&&"object"==typeof e)this.addRelationObjs(t,e,s);else if("string"==typeof t&&"string"==typeof e){const i=this.startIdIfNeeded(t.trim()),n=this.startTypeIfNeeded(t),r=this.endIdIfNeeded(e.trim()),o=this.endTypeIfNeeded(e);this.addState(i,n),this.addState(r,o),this.currentDocument.relations.push({id1:i,id2:r,relationTitle:s?l.Y2.sanitizeText(s,(0,l.D7)()):void 0})}}addDescription(t,e){const s=this.currentDocument.states.get(t),i=e.startsWith(":")?e.replace(":","").trim():e;s?.descriptions?.push(l.Y2.sanitizeText(i,(0,l.D7)()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,e=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});const s=this.classes.get(t);e&&s&&e.split(rt).forEach(t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(st).exec(t)){const t=e.replace(it,nt).replace(st,it);s.textStyles.push(t)}s.styles.push(e)})}getClasses(){return this.classes}setupToolTips(t){const e=(0,o.Ck)();(0,d.Ltv)(t).select("svg").selectAll("g.node, g.rough-node").on("mouseover",t=>{const s=(0,d.Ltv)(t.currentTarget),i=s.attr("title");if(null===i)return;const n=t.currentTarget?.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.bottom+"px"),e.html(u.A.sanitize(i)),s.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0);(0,d.Ltv)(t.currentTarget).classed("hover",!1)})}setCssClass(t,e){t.split(",").forEach(t=>{let s=this.getState(t);if(!s){const e=t.trim();this.addState(e),s=this.getState(e)}s?.classes?.push(e)})}setStyle(t,e){this.getState(t)?.styles?.push(e)}setTextStyle(t,e){this.getState(t)?.textStyles?.push(e)}bindFunctions(t){this.funs.forEach(e=>{e(t)})}getDirectionStatement(){return this.rootDoc.find(t=>"dir"===t.stmt)}getDirection(){return this.getDirectionStatement()?.value??"TB"}setDirection(t){const e=this.getDirectionStatement();e?e.value=t:this.rootDoc.unshift({stmt:"dir",value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){const t=(0,l.D7)();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:Y(this.getRootDocV2())}}getConfig(){return(0,l.D7)().state}},ht=(0,h.K)(t=>`\ndefs [id$="-barbEnd"] {\n fill: ${t.transitionColor};\n stroke: ${t.transitionColor};\n }\ng.stateGroup text {\n fill: ${t.nodeBorder};\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ${t.textColor};\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ${t.stateLabelColor};\n}\n\ng.stateGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.stateGroup line {\n stroke: ${t.lineColor};\n stroke-width: ${t.strokeWidth||1};\n}\n\n.transition {\n stroke: ${t.transitionColor};\n stroke-width: ${t.strokeWidth||1};\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ${t.background};\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n\n text {\n fill: ${t.noteTextColor};\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ${t.labelBackgroundColor};\n opacity: 0.5;\n}\n.edgeLabel {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n}\n.edgeLabel .label text {\n fill: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n.label div .edgeLabel {\n color: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n\n.stateLabel text {\n fill: ${t.stateLabelColor};\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node .fork-join {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node circle.state-end {\n fill: ${t.innerEndBackground};\n stroke: ${t.background};\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ${t.compositeBackground||t.background};\n // stroke: ${t.background};\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ${t.stateBkg||t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: ${t.strokeWidth||1}px;\n}\n.node polygon {\n fill: ${t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};;\n stroke-width: ${t.strokeWidth||1}px;\n}\n[id$="-barbEnd"] {\n fill: ${t.lineColor};\n}\n\n.statediagram-cluster rect {\n fill: ${t.compositeTitleBackground};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: ${t.strokeWidth||1}px;\n}\n\n.cluster-label, .nodeLabel {\n color: ${t.stateLabelColor};\n // line-height: 1;\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ${t.stateBorder||t.nodeBorder};\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ${t.compositeBackground||t.background};\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ${t.noteTextColor};\n}\n\n.statediagram-note .nodeLabel {\n color: ${t.noteTextColor};\n}\n.statediagram .edgeLabel {\n color: red; // ${t.noteTextColor};\n}\n\n[id$="-dependencyStart"], [id$="-dependencyEnd"] {\n fill: ${t.lineColor};\n stroke: ${t.lineColor};\n stroke-width: ${t.strokeWidth||1};\n}\n\n.statediagramTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n\n[data-look="neo"].statediagram-cluster rect {\n fill: ${t.mainBkg};\n stroke: ${t.useGradient?"url("+t.svgId+"-gradient)":t.stateBorder||t.nodeBorder};\n stroke-width: ${t.strokeWidth??1};\n}\n[data-look="neo"].statediagram-cluster rect.outer {\n rx: ${t.radius}px;\n ry: ${t.radius}px;\n filter: ${t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${t.svgId}-drop-shadow)`):"none"}\n}\n`,"getStyles")},1672(t,e,s){s.d(e,{P:()=>o});var i=s(76385),n=s(31293),r=s(86827),o=(0,r.K)((t,e,s,r)=>{t.attr("class",s);const{width:o,height:c,x:h,y:d}=a(t,e);(0,i.a$)(t,c,o,r);const u=l(h,d,o,c,e);t.attr("viewBox",u),n.R.debug(`viewBox configured: ${u} with padding: ${e}`)},"setupViewPortForSVG"),a=(0,r.K)((t,e)=>{const s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}},"calculateDimensionsWithPadding"),l=(0,r.K)((t,e,s,i,n)=>`${t-n} ${e-n} ${s} ${i}`,"createViewBox")},96755(t,e,s){s.d(e,{A:()=>r});var i=s(86827),n=s(70451),r=(0,i.K)((t,e)=>{let s;"sandbox"===e&&(s=(0,n.Ltv)("#i"+t));return("sandbox"===e?(0,n.Ltv)(s.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement")}}]); \ No newline at end of file diff --git a/assets/js/4830.7045f0d8.js b/assets/js/4830.7045f0d8.js new file mode 100644 index 000000000..7027cb2e8 --- /dev/null +++ b/assets/js/4830.7045f0d8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[4830],{24830(t,e,n){n.r(e),n.d(e,{render:()=>Vn});var o=n(35167),r=(n(78771),n(46853)),s=(n(717),n(79515),n(44505),n(72379),n(58962),n(16459),n(76385),n(31293)),i=n(86827),a=1e-5,c=1e-6;function f(t){const e=[];for(let n=0;n=.999999||h<=c||h>=.999999?null:{point:{x:t.x+u*r,y:t.y+u*s},tA:u,tB:h}}function l(t){return Math.abs(t.b.x-t.a.x)>=Math.abs(t.b.y-t.a.y)}function u(t){const e=[];for(let n=0;n=Math.abs(n)?e>=0?1:0:n>=0?1:0}(0,i.K)(f,"buildSegmentList"),(0,i.K)(d,"segmentIntersection"),(0,i.K)(l,"isHorizontalSeg"),(0,i.K)(u,"findEdgeIntersections"),(0,i.K)(h,"fmt"),(0,i.K)(g,"pointToString"),(0,i.K)(p,"getArcSweepFlag");function x(t,e){if(t.length<2)return t.map(t=>({...t}));const n=t.map(t=>({...t})),o=e.arrowTypeStart&&r.hq[e.arrowTypeStart];if(o){const e=t[0],r=t[1],s=Math.atan2(r.y-e.y,r.x-e.x);n[0].x=e.x+o*Math.cos(s),n[0].y=e.y+o*Math.sin(s)}const s=e.arrowTypeEnd&&r.hq[e.arrowTypeEnd];if(s){const e=t.length,o=t[e-2],r=t[e-1],i=Math.atan2(r.y-o.y,r.x-o.x);n[e-1].x=r.x-s*Math.cos(i),n[e-1].y=r.y-s*Math.sin(i)}return n}function m(t,e,n,o,r){const s=t.point.x,i=t.point.y,a={x:s-e*t.r,y:i-n*t.r},c={x:s+e*t.r,y:i+n*t.r},f=[`L${g(a)}`];return"arc"===r?f.push(`A${h(t.r)},${h(t.r)} 0 0 ${o} ${g(c)}`):f.push(`M${g(c)}`),f}function y(t,e,n,o){const r=e.x-t.x,s=e.y-t.y,i=n.x-e.x,c=n.y-e.y,f=Math.hypot(r,s),d=Math.hypot(i,c);if(f0){const t=y(r[f-1],r[f],r[f+1]??r[f],5);t&&(u=t.cutLen)}let x=e,b=null;s&&ft.t-e.t);for(const n of M)n.r=Math.min(n.r,n.d-u,x-n.d);for(let n=0;nt){const e=t/2;M[n].r=Math.min(M[n].r,e),M[n+1].r=Math.min(M[n+1].r,e)}}for(const r of M)r.r<.001||c.push(...m(r,o,d,l,n.jumpStyle));s&&b?(c.push(`L${h(b.startX)},${h(b.startY)}`),c.push(`Q${h(b.ctrlX)},${h(b.ctrlY)} ${h(b.endX)},${h(b.endY)}`)):c.push(`L${g(t.b)}`)}return c.join(" ")}function M(t){return/^[\d\s+,.LMelm-]*$/.test(t)}function K(t){return!t||("linear"===t||"rounded"===t||"step"===t||"stepBefore"===t||"stepAfter"===t)}function I(t){if(!t)return null;try{const e="function"==typeof atob?atob(t):Buffer.from(t,"base64").toString(),n=JSON.parse(e);if(!Array.isArray(n))return null;const o=[];for(const t of n)t&&"number"==typeof t.x&&"number"==typeof t.y&&o.push({x:t.x,y:t.y});return o.length>=2?o:null}catch{return null}}function S(t,e,n){if(!n.enabled)return;const o=t.node();if(!o)return;const r=new Map;for(const f of e)r.set(f.id,f);const s=[],i=new Map;for(const f of e){const t="undefined"!=typeof CSS&&CSS.escape?CSS.escape(f.id):f.id,e=o.querySelector(`path[data-id="${t}"]`);if(!e)continue;i.set(f.id,e);const n=I(e.getAttribute("data-points"))??f.points;s.push({...f,points:n})}const a=u(s);if(0===a.length)return;const c=new Map;for(const f of a){const t=c.get(f.jumpEdgeId)??[];t.push(f),c.set(f.jumpEdgeId,t)}for(const f of s){const t=c.get(f.id);if(!t||0===t.length)continue;const e=r.get(f.id),o=e?.curve;if(void 0!==o&&!K(o))continue;const s=i.get(f.id);if(!s)continue;if(void 0===o){if(!M(s.getAttribute("d")??""))continue}const a=s.getAttribute("style")??"",d=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(a),l=d?Number.parseFloat(d[1]):null,u=d?Number.parseFloat(d[2]):null,h=b(f,t,n);if(s.setAttribute("d",h),null!==l&&null!==u&&"function"==typeof s.getTotalLength){const t=s.getTotalLength(),e=`0 ${l} ${Math.max(0,t-l-u)} ${u}`,n=a.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${e};`).replace(/;\s*;+/g,";");s.setAttribute("style",n)}}}function w(t,{measure:e}){const n=t.config?.swimlane?.lineHops;if(!1===n)return;const o="gap"===n?"gap":"arc",r=t.edges.filter(t=>Array.isArray(t.points)&&t.points.length>=2).map(t=>({id:t.id,points:t.points,curve:t.curve,arrowTypeStart:t.arrowTypeStart,arrowTypeEnd:t.arrowTypeEnd}));S(e.groups.edgePaths,r,{enabled:!0,jumpRadius:6,jumpStyle:o})}(0,i.K)(x,"applyMarkerOffsets"),(0,i.K)(m,"emitJump"),(0,i.K)(y,"computeRoundedCorner"),(0,i.K)(b,"rewriteEdgePath"),(0,i.K)(M,"isStraightPath"),(0,i.K)(K,"curveSupportsLineHops"),(0,i.K)(I,"decodeDataPoints"),(0,i.K)(S,"applyLineJumpsToSvg"),(0,i.K)(w,"applySwimlaneLineJumps");var v="__swimlane_default__";function C(t){return Math.max(t.padding??20,20)}function L(t){const{x:e,y:n,width:o,height:r}=t,s=t.swimlaneContentTop;if("number"!=typeof e||"number"!=typeof n||"number"!=typeof o||"number"!=typeof r||"number"!=typeof s||!Number.isFinite(e)||!Number.isFinite(n)||!Number.isFinite(o)||!Number.isFinite(r)||!Number.isFinite(s)||o<=0||r<=0)return void delete t.groupTitleRect;const i=n-r/2,a=Math.min(s,n+r/2),c=i+Math.min(21,Math.max(0,a-i));c<=i?delete t.groupTitleRect:t.groupTitleRect={left:e-o/2,right:e+o/2,top:i,bottom:c}}function k(t){const e=t.direction,n=t.nodes??=[];for(const s of t.nodes??[])s.isGroup&&!s.parentId&&(s.shape="swimlane",e&&(s.direction=e));const o=n.filter(t=>!t.isGroup&&!t.parentId);if(0===o.length)return;let r=n.find(t=>t.id===v);r?r.isGroup&&(r.shape="swimlane",e&&(r.direction=e)):(r={id:v,label:"",isGroup:!0,shape:"swimlane",padding:20,...e?{direction:e}:{}},n.push(r));for(const s of o)s.parentId=v}function O(t){const e=new Map;for(const i of t.nodes??[])e.set(i.id,i);const n=[];for(const i of t.edges??[]){const t="string"==typeof i.start?i.start:void 0,e="string"==typeof i.end?i.end:void 0;t&&e&&(i.labelNodeId||n.push({id:i.id,src:t,dst:e,ref:i}))}const o=t.nodes??[],r=o.filter(t=>t.isGroup),s=o.filter(t=>!t.isGroup);return{nodes:[...[...r].reverse(),...s].map(t=>t.id),edges:n,layout:t,nodeById:e}}function R(t,e,n,o){const{layout:r}=t,s=t.nodeById,i=o?.layerGap??100,a=o?.nodeGap??40;let c=0;for(const u of e.layers){let t=0;for(const e of u){const o=s.get(e);if(!o){t++;continue}o.layer=c,o.order=t;const r=n.x[e]??t*a,f=n.y[e]??c*i;o.x=r,o.y=f,t++}c++}const f=r.nodes??[],d=new Map,l=[];for(const u of f){if(!u?.isGroup)continue;u.parentId||l.push(u);const t=f.filter(t=>t.parentId===u.id);let e=1/0,o=-1/0,r=1/0,s=-1/0;for(const i of t){const t=i.x??n.x[i.id],a=i.y??n.y[i.id],c=i.width??0,f=i.height??0;null!=t&&null!=a&&(e=Math.min(e,t-c/2),o=Math.max(o,t+c/2),r=Math.min(r,a-f/2),s=Math.max(s,a+f/2))}if(e===1/0||r===1/0)u.x=u.x??0,u.y=u.y??0,u.width=u.width??0,u.height=u.height??0;else{const t=u.padding??20,n=u.parentId?t:2*C(u),i=t,a=Math.max(0,o-e)+n,c=Math.max(0,s-r)+i,f=(e+o)/2,l=(r+s)/2;u.x=f,u.y=l,u.width=a,u.height=c,d.set(u.id,{minX:e,maxX:o,minY:r,maxY:s})}}if(l.length>0&&d.size>0){let t=1/0,e=-1/0,n=0;for(const o of l){const r=o.padding??20;r>n&&(n=r);const s=d.get(o.id);s&&(t=Math.min(t,s.minY),e=Math.max(e,s.maxY))}if(t!==1/0&&e!==-1/0){const o=36,r=Math.max(0,e-t)+2*Math.max(n,o),s=(t+e)/2;for(const e of l)e.y=s,e.height=r,e.swimlaneContentTop=t;const i=[...l].sort((t,e)=>(t.x??0)-(e.x??0)),a=[],c=[],f=[];for(const t of i){const e=d.get(t.id);if(!e)continue;const n=Math.max(0,e.maxX-e.minX)+2*C(t),o=(e.minX+e.maxX)/2;a.push(t.id),c.push(o),f.push(n)}const u=a.length;if(u>0){const t=new Map;if(1===u)t.set(a[0],f[0]);else{const e=[];for(let t=0;t0&&r>0?{cx:e,cy:n,rect:Q(e,n,o,r)}:void 0}function B(t){if(t.isGroup)return;const e=N(t);if(!e)return;return{id:String(t.id??""),cx:e.cx,cy:e.cy,rect:e.rect}}function F(t,e,n=$){return Math.abs(t.x-e.x)n}function z(t,e,n=$){return E(t,e,n)&&Math.abs(t.y-e.y)>n}function A(t,e,n,o){return Math.max(0,Math.min(Math.max(t,e),Math.max(n,o))-Math.max(Math.min(t,e),Math.min(n,o)))}function P(t,e,n=$){return t.horizontal&&e.horizontal&&Y(t.a,e.a,n)?A(t.a.x,t.b.x,e.a.x,e.b.x):t.vertical&&e.vertical&&E(t.a,e.a,n)?A(t.a.y,t.b.y,e.a.y,e.b.y):0}function D(t,e=$){const n=[];for(let o=0;o0?n[n.length-1]:void 0;t&&F(t,o,e)||n.push({x:o.x,y:o.y})}return n}function j(t,e=$){if(!t||4!==t.length)return;const[n,o,r,s]=t;if(X(n,o,e)&&z(o,r,e)&&X(r,s,e))return{kind:"HVH",p0:n,p1:o,p2:r,p3:s};return z(n,o,e)&&X(o,r,e)&&z(r,s,e)?{kind:"VHV",p0:n,p1:o,p2:r,p3:s}:void 0}function _(t,e,n,o=0){const r=Math.min(t.x,e.x),s=Math.max(t.x,e.x),i=Math.min(t.y,e.y),a=Math.max(t.y,e.y);return s>n.left-o&&rn.top-o&&ie.left+n&&t.xe.top+n&&t.y=e.right&&t.top<=e.top&&t.bottom>=e.bottom}function q(t,e){return t.lefte.left&&t.tope.top}function J(t,e){return{left:t.left-e,right:t.right+e,top:t.top-e,bottom:t.bottom+e}}function Q(t,e,n,o){return{left:t-n/2,right:t+n/2,top:e-o/2,bottom:e+o/2}}function U(t){return N(t)?.rect}function Z(t,e){switch(e){case"top":return{x:t.cx,y:t.rect.top};case"bottom":return{x:t.cx,y:t.rect.bottom};case"left":return{x:t.rect.left,y:t.cy};case"right":return{x:t.rect.right,y:t.cy}}}function tt(t,e,n,o,r,s=$){const i="left"===e||"right"===e,a="left"===o||"right"===o;if(i&&a){if("right"===e&&"left"===o&&t.xn.x){if(Y(t,n,s))return[t,n];const e=(t.x+n.x)/2;return[t,{x:e,y:t.y},{x:e,y:n.y},n]}if(e===o){if(Y(t,n,s))return;const o="left"===e?Math.min(t.x,n.x)-r:Math.max(t.x,n.x)+r;return[t,{x:o,y:t.y},{x:o,y:n.y},n]}return}if(!i&&!a){if(e===o){if(E(t,n,s))return;const o="top"===e?Math.min(t.y,n.y)-r:Math.max(t.y,n.y)+r;return[t,{x:t.x,y:o},{x:n.x,y:o},n]}if(!("bottom"===e&&"top"===o&&t.yn.y))return;if(E(t,n,s))return[t,n];const i=(t.y+n.y)/2;return[t,{x:t.x,y:i},{x:n.x,y:i},n]}if(i&&!a){const r="right"===e&&n.x>t.x||"left"===e&&n.xn.y;return r&&s?[t,{x:n.x,y:t.y},n]:void 0}const c="bottom"===e&&n.y>t.y||"top"===e&&n.yn.x;return c&&f?[t,{x:t.x,y:n.y},n]:void 0}function et(t,e,n,o){return"left"===e||"right"===e?[t,{x:o,y:t.y},{x:o,y:n.y},n]:[t,{x:t.x,y:o},{x:n.x,y:o},n]}function nt(t){const e=new Map,n=[];for(const o of t){if(o.isEdgeLabel)continue;const t=B(o);t&&(e.set(t.id,t),n.push({id:t.id,rect:t.rect}))}return{nodeInfoById:e,realNodeRects:n}}function ot(t){const e=[],n=[];for(const o of t){const t=B(o);if(!t)continue;const r={id:t.id,rect:t.rect};o.isEdgeLabel?n.push(r):e.push(r)}return{realNodeRects:e,labelNodeRects:n}}function rt(t,{includeEdgeLabels:e=!0}={}){const n=[];for(const o of t){if(o.isGroup||!e&&o.isEdgeLabel)continue;const t=o.x??0,r=o.y??0,s=o.width??0,i=o.height??0;n.push({nodeId:o.id,...Q(t,r,s,i)})}return n}function st(t,e,n=$){const o=t.start,r=t.end;if(!o||!r)return;const s=e.get(o),i=e.get(r);return s&&i?{srcId:o,dstId:r,srcInfo:s,dstInfo:i,collinearX:Math.abs(s.cx-i.cx)g||um)return!1;const y=Math.abs(p-d.a.x)r:!!(s&&a&&Y(t,n,r))&&A(t.x,e.x,n.x,o.x)>r}function ft(t,e,n,o,{epsilon:r=$,skipDegenerateOther:s=!1}={}){for(const i of n){if(i===o||i.isLayoutOnly)continue;const n=i.points;if(n&&!(n.length<2))for(let o=0;ou+r&&gp+r&&lo+$&&t=2?e[e.length-2]:void 0,o=!!t&&E(t,n)?{x:n.x,y:r.y}:{x:r.x,y:n.y};e.push(o)}e.push(r)}const n=[];for(const o of e){const t=n[n.length-1];t&&F(t,o)||n.push(o)}return n}function pt(t){if(t.length<3)return t;let e=[...t];for(let n=0;n<32;n++){const t=ht(e);if(e=t.points,!t.changed)break}return e}(0,i.K)(N,"measuredNodeRect"),(0,i.K)(B,"nodeBoundsInfoFor"),(0,i.K)(F,"samePoint"),(0,i.K)(E,"sameX"),(0,i.K)(Y,"sameY"),(0,i.K)(X,"isHorizontalSegment"),(0,i.K)(z,"isVerticalSegment"),(0,i.K)(A,"overlapLength"),(0,i.K)(P,"sameAxisSegmentOverlapLength"),(0,i.K)(D,"orthogonalSegmentsForPoints"),(0,i.K)(G,"countOrthogonalBends"),(0,i.K)(H,"dedupeConsecutivePoints"),(0,i.K)(j,"classifyThreeSegmentRoute"),(0,i.K)(_,"segmentBoundsOverlapRect"),(0,i.K)(V,"pointInsideRect"),(0,i.K)(W,"rectContainsRect"),(0,i.K)(q,"rectsOverlap"),(0,i.K)(J,"inflateRect"),(0,i.K)(Q,"rectFromCenterSize"),(0,i.K)(U,"rectOfNodeBounds"),(0,i.K)(Z,"portForRectSide"),(0,i.K)(tt,"buildOrthogonalPortPath"),(0,i.K)(et,"buildSameSideTrackPath"),(0,i.K)(nt,"collectRealNodeBounds"),(0,i.K)(ot,"collectNodeRectEntries"),(0,i.K)(rt,"collectLayoutNodeRects"),(0,i.K)(st,"getNodePairGeometry"),(0,i.K)(it,"segmentHitsAnyRect"),(0,i.K)(at,"orthogonalSegmentsCross"),(0,i.K)(ct,"sameAxisSegmentsOverlap"),(0,i.K)(ft,"segmentConflictsWithAnyEdge"),(0,i.K)(dt,"orthogonalSegmentsStrictlyCross"),(0,i.K)(lt,"strictlyBetween"),(0,i.K)(ut,"isCollinearIntermediate"),(0,i.K)(ht,"simplifyPolylineOnce"),(0,i.K)(gt,"orthogonalizePolyline"),(0,i.K)(pt,"simplifyPolyline");var xt=.001;function mt(t,e,n){const o=t;if(o.isLayoutOnly||!o.points||o.points.length=0&&r=t.length)return t;const s=r-o;if(s<0||s>=t.length)return t;const i=yt(t[r],t[s],e);return n?[i,...t.slice(r)]:[...t.slice(0,r+1),i]}function Mt(t,e){for(const n of t){const t=mt(n,e,2);if(!t)continue;let o=[...t.points];t.srcRect&&(o=bt(o,t.srcRect,!0)),t.dstRect&&(o=bt(o,t.dstRect,!1)),o=pt(gt(o)),o=Tt(o,t.srcRect,t.dstRect),t.edge.points=pt(gt(o))}}function Kt(t,e,n,o=!1){if(Y(t,e,xt)){if(e.yn.bottom+xt)return e;if(o){if(t.xn.right+xt)return{x:n.right,y:t.y}}return{x:Math.abs(e.x-n.left)<=Math.abs(e.x-n.right)?n.left:n.right,y:t.y}}if(E(t,e,xt)){if(e.xn.right+xt)return e;if(o){if(t.yn.bottom+xt)return{x:t.x,y:n.bottom}}const r=Math.abs(e.y-n.top)<=Math.abs(e.y-n.bottom);return{x:t.x,y:r?n.top:n.bottom}}return e}function It(t,e,n){const o=t[e];for(let r=e+n;r>=0&&rt.lo)),n=Math.min(...t.map(t=>t.hi));if(!(e>n))return{lo:e,hi:n}}function Ct(t,e){return"left"===e||"right"===e?St(t.top,t.bottom):St(t.left,t.right)}function Lt(t,e,n){const o=t.y>=n.top-xt&&t.y<=n.bottom+xt,r=t.x>=n.left-xt&&t.x<=n.right+xt;if(Y(t,e,xt)&&o){if(Math.abs(t.x-n.left)0?vt(s):void 0}function Rt(t,e,n,o,r){const s=Ot(t,e,n,o,r);if(!s)return;const i=r?t.y:t.x,a=Math.min(s.hi,Math.max(s.lo,i));return Math.abs(a-i)({...t}));for(let a=e;a>=0&&a=n.left-xt&&Math.max(t.x,e.x)<=n.right+xt,r=Math.min(t.y,e.y)>=n.top-xt&&Math.max(t.y,e.y)<=n.bottom+xt;return Math.abs(t.y-n.top)o.bottom+xt;case"left":return Y(e,n,xt)&&n.xo.right+xt}}function Yt(t,e,n){if(t.length<3)return t;if(n){const n=Ft(t[0],t[1],e);return n&&Et(n,t[1],t[2],e)?t.slice(1):t}const o=t.length-1,r=Ft(t[o-1],t[o],e);return r&&Et(r,t[o-1],t[o-2],e)?t.slice(0,o):t}function Xt(t,e,n){let o=t;if(e){const t=It(o,0,1);if(t){const n=Kt(t,o[0],e);n!==o[0]&&(o=[n,...o.slice(1)])}o=Yt(o,e,!0)}if(n){const t=o.length-1,e=It(o,t,-1);if(e){const r=Kt(e,o[t],n,!0);r!==o[t]&&(o=[...o.slice(0,t),r])}o=Yt(o,n,!1)}const r=Tt(o,e,n);return r!==o||2===o.length?r:(e&&(o=Bt(o,e,!0)),n&&(o=Bt(o,n,!1)),o)}function zt(t,e){for(const n of t){const t=mt(n,e,2);if(!t)continue;const o=Xt(H(t.points,xt),t.srcRect,t.dstRect);if(o.length<3){t.edge.points=o;continue}const r=[o[0],{...o[0]},...o.slice(1,-1),o[o.length-1],{...o[o.length-1]}];t.edge.points=r}}function At(t){return new Map(t.map(t=>[t.id,t]))}function Pt(t,e){let n=t.parentId,o=null;for(;n;){const t=e.get(n);if(!t?.isGroup)break;o=t.id,n=t.parentId}return o}function Dt(t,e){let n=0,o=t.parentId;for(;o;){const t=e.get(o);if(!t?.isGroup)break;n++,o=t.parentId}return n}function Gt(t){let e=1/0,n=-1/0,o=1/0,r=-1/0;for(const s of t){const t=s.x,i=s.y;if("number"!=typeof t||"number"!=typeof i)continue;const a=s.width??0,c=s.height??0;e=Math.min(e,t-a/2),n=Math.max(n,t+a/2),o=Math.min(o,i-c/2),r=Math.max(r,i+c/2)}return e===1/0||o===1/0?null:{minX:e,maxX:n,minY:o,maxY:r}}function Ht(t,e){const n=t.padding??20;t.x=(e.minX+e.maxX)/2,t.y=(e.minY+e.maxY)/2,t.width=Math.max(0,e.maxX-e.minX)+n,t.height=Math.max(0,e.maxY-e.minY)+n}function jt(t){const e=At(t),n=t.filter(t=>t.isGroup&&t.parentId).sort((t,n)=>Dt(n,e)-Dt(t,e));for(const o of n){const e=Gt(t.filter(t=>t.parentId===o.id));e&&Ht(o,e)}}function _t(t,e){const n=t.nodes??[],o=t.edges??[],r=n.filter(t=>!t.isGroup);let s=1/0,a=-1/0;for(const i of r){const t=i[e];"number"==typeof t&&(s=Math.min(s,t),a=Math.max(a,t))}if(!Number.isFinite(s)||!Number.isFinite(a))return!1;const c=(0,i.K)(t=>s+a-t,"mirror");for(const i of n){const t=i[e];"number"==typeof t&&(i[e]=c(t));const n=i.groupTitleRect;n&&(i.groupTitleRect="x"===e?{...n,left:c(n.right),right:c(n.left)}:{...n,top:c(n.bottom),bottom:c(n.top)})}for(const i of o)for(const t of i.points??[])t[e]=c(t[e]);return!0}function Vt(t){return!(t.nodes??[]).some(t=>!t.isGroup)||_t(t,"y")}function Wt(t,e="LR"){const n=t.nodes??[],o=t.edges??[],r=n.filter(t=>!t.isGroup);let s=1/0,i=1/0;for(const v of r){const t=v.x??0,e=v.y??0;t0?Math.max(1,d/l):1;for(const v of r){const t=v.x??0,e=((v.y??0)-i)*u+a,n=t-s;v.x=e,v.y=n}for(const v of o)if(v.points)for(const t of v.points){const e=t.x,n=(t.y-i)*u+a,o=e-s;t.x=n,t.y=o}jt(n);const h=n.filter(t=>t.isGroup&&!t.parentId);if(0===h.length)return"RL"===e&&_t(t,"x"),!0;const g=At(n),p=new Map;for(const v of n){if(v.isGroup)continue;const t=Pt(v,g);if(!t)continue;const e=p.get(t)??[];e.push(v),p.set(t,e)}let x=0;for(const v of h){const t=v.padding??0;t>x&&(x=t)}const m=[];let y=1/0,b=-1/0;for(const v of h){const t=Gt(p.get(v.id)??[]);t&&(y=Math.min(y,t.minX),b=Math.max(b,t.maxX),m.push({lane:v,contentTop:t.minY,contentBottom:t.maxY,centerY:(t.minY+t.maxY)/2}))}if(y===1/0||b===-1/0)return!0;const M=Math.max(0,b-y)+2*Math.max(x,10),K=a+M,I=(y+b)/2-M/2-a,S=I+K/2,w=Math.max(x,a);m.sort((t,e)=>t.centerY-e.centerY);for(let v=0;vl.cy?x.bottom:x.top,o=l.cx+n;if(o<=x.left+qt||o>=x.right-qt)continue;e={x:o,y:t},s={x:o,y:i.y},c={x:i.x,y:i.y}}else{const t=u.cx>l.cx?x.right:x.left,o=l.cy+n;if(o<=x.top+qt||o>=x.bottom-qt)continue;e={x:t,y:o},s={x:i.x,y:o},c={x:i.x,y:i.y}}const h=F(e,s,qt),g=F(s,c,qt);if(h&&g)continue;if(!h&&it(e,s,o,[f],1))continue;if(!g&&it(s,c,o,[d],1))continue;const m=!h&&ft(e,s,t,r,{epsilon:qt,skipDegenerateOther:!0}),y=!g&&ft(s,c,t,r,{epsilon:qt,skipDegenerateOther:!0});if(!m&&!y){p=h?[s,c]:g?[e,s]:[e,s,c];break}}p&&(r.points=p)}}function Ut(t,e){const n=.001,{realNodeRects:o,labelNodeRects:r}=ot(e.values());for(const s of t){if(s.isLayoutOnly)continue;const a=s.points;if(!a||a.length<4)continue;const c=H(a,n);if(c.length<4)continue;const f=c.length-1,d=c[f],l=c[f-1],u=c[f-2],h=d.x-l.x,g=d.y-l.y,p=Math.hypot(h,g);if(p>=10||p0;k={x:u.x,y:C},O={x:t?L.right:L.left,y:C}}if(it(k,O,o,I?[I]:[],-2))continue;if(it(k,O,r,[],-2))continue;if(S){const t=e.get(S),n=t?U(t):void 0;if(n&&V(k,n,2))continue}const R=(0,i.K)((t,e)=>`${t.x.toFixed(3)},${t.y.toFixed(3)}|${e.x.toFixed(3)},${e.y.toFixed(3)}`,"ownSegmentKey"),T=new Set;for(let t=0;t{for(const r of t){if(r===s)continue;if(r.isLayoutOnly)continue;const t=r.points;if(t&&!(t.length<2))for(let r=0;r=0){const t=c[f-3];if(it(t,k,o,[S,I].filter(t=>Boolean(t)),-2))continue;if($(t,k))continue}const N=[...c.slice(0,f-2),k,O];s.points=N;const B=s.labelNodeId;if(B){const t=e.get(B);if(t){const e=t.width??0,o=t.height??0;if(e>0&&o>0){let r,s,i=-1;for(let t=0;t=e+2||l&&f>=o+2)&&(f>i&&(i=f,r=(a.x+c.x)/2,s=(a.y+c.y)/2))}void 0!==r&&void 0!==s&&(t.x=r,t.y=s)}}}}}(0,i.K)(Qt,"portSwapToLShape"),(0,i.K)(Ut,"collapseShortTerminalStub");var Zt=.001,te=D,ee=(0,i.K)((t,e)=>E(t,e,Zt)||Y(t,e,Zt),"orthogonallyAligned");function ne(t,e){const n=(0,i.K)((t,e)=>{const n=t.x??0,o=t.y??0,r=e.x-n,s=e.y-o;let i=(t.width??0)/2,a=(t.height??0)/2;return Math.abs(s)*i>Math.abs(r)*a?(s<0&&(a=-a),{x:n+(0===s?0:a*r/s),y:o+a}):(r<0&&(i=-i),{x:n+i,y:o+(0===r?0:i*s/r)})},"rectIntersect"),o=(0,i.K)((t,o)=>{const r=H(t.points??[]);if(r.length<2)return;const s=o?t.start:t.end,i=s?e.get(s):void 0,a=i?U(i):void 0;if(!i||!s||!a)return;const c=o?r[0]:r[r.length-1],f=o?r[1]:r[r.length-2],d=n(i,c);let l=c;return ee(f,d)&&(l=f),E(d,l,Zt)?{edge:t,edgeId:String(t.id??""),nodeId:s,atStart:o,orientation:"V",coord:d.x,min:Math.min(d.y,l.y),max:Math.max(d.y,l.y),boundary:d,railEnd:l,rect:a}:Y(d,l,Zt)?{edge:t,edgeId:String(t.id??""),nodeId:s,atStart:o,orientation:"H",coord:d.y,min:Math.min(d.x,l.x),max:Math.max(d.x,l.x),boundary:d,railEnd:l,rect:a}:void 0},"terminalLaneFor"),r=(0,i.K)((t,e)=>Math.max(0,Math.min(t.max,e.max)-Math.max(t.min,e.min)),"projectedOverlapLength"),s=(0,i.K)((t,e)=>{if(t.nodeId!==e.nodeId||t.orientation!==e.orientation)return!1;if("H"===t.orientation){return(Math.abs(t.boundary.x-t.rect.left)<1||Math.abs(t.boundary.x-t.rect.right)<1)&&E(t.boundary,e.boundary,1)}return(Math.abs(t.boundary.y-t.rect.top)<1||Math.abs(t.boundary.y-t.rect.bottom)<1)&&Y(t.boundary,e.boundary,1)},"sameTerminalFace"),a=(0,i.K)((t,e)=>{if(t.nodeId!==e.nodeId||t.orientation!==e.orientation)return!1;return r(t,e)>=8&&Math.abs(t.coord-e.coord)<.5},"exactTerminalLaneConflict"),c=(0,i.K)((t,e)=>{if(t.nodeId!==e.nodeId||t.orientation!==e.orientation||"H"!==t.orientation||t.atStart===e.atStart)return!1;const n=r(t,e);if(n<8)return!1;const o=t.rect.bottom-t.rect.top;return!(n2*o)&&(s(t,e)&&Math.abs(t.coord-e.coord)<16)},"nearTerminalLaneConflict"),f=(0,i.K)((t,e)=>{const n=H(t.edge.points??[]);if(n.length<2)return;const o="V"===t.orientation?{x:t.boundary.x+e,y:t.boundary.y}:{x:t.boundary.x,y:t.boundary.y+e},r="V"===t.orientation?{x:t.railEnd.x+e,y:t.railEnd.y}:{x:t.railEnd.x,y:t.railEnd.y+e};if(!(0,i.K)(()=>Math.abs(t.boundary.y-t.rect.top)<1||Math.abs(t.boundary.y-t.rect.bottom)<1?Y(o,t.boundary,Zt)&&o.x>=t.rect.left+1&&o.x<=t.rect.right-1:(Math.abs(t.boundary.x-t.rect.left)<1||Math.abs(t.boundary.x-t.rect.right)<1)&&(E(o,t.boundary,Zt)&&o.y>=t.rect.top+1&&o.y<=t.rect.bottom-1),"boundaryStaysOnSameFace")())return;if(t.atStart){const e=n.length>1&&F(n[1],t.railEnd,Zt),s=n.slice(e?2:1),i=s[0];if(i&&!ee(i,r))return;return[o,r,...s]}const s=n.length>1&&F(n[n.length-2],t.railEnd,Zt),a=n.slice(0,s?-2:-1),c=a[a.length-1];return!c||ee(c,r)?[...a,r,o]:void 0},"shiftedCandidate"),d=(0,i.K)(t=>{const n=t.edge,o=H(n.points??[]);if(2!==o.length)return!1;const r=n.start,s=n.end,i=r?e.get(r):void 0,a=s?e.get(s):void 0;if(!i||!a)return!1;const c=i.x??0,f=i.y??0,d=a.x??0,l=a.y??0,[u,h]=o;return Y(u,h,Zt)&&Math.abs(f-l)<1&&Math.abs(c-d)>1||E(u,h,Zt)&&Math.abs(c-d)<1&&Math.abs(f-l)>1},"laneIsStraightCollinearConnector"),l=[-7,7,-14,14,-21,21];for(let i=0;i<8;i++){const e=t.filter(t=>!t.isLayoutOnly).flatMap(t=>[o(t,!0),o(t,!1)]).filter(t=>Boolean(t));let n=!1;for(let t=0;t{const n=d(t),o=d(e);return n!==o?Number(n)-Number(o):Number(!e.atStart)-Number(!t.atStart)});for(const t of h){for(const r of l){const s=f(t,r);if(!s)continue;const i=o({...t.edge,points:s},t.atStart);if(i&&!e.some(e=>e.edge!==t.edge&&(a(i,e)||u&&c(i,e)))){t.edge.points=s,n=!0;break}}if(n)break}}if(!n)return}}function oe(t,e){const{realNodeRects:n,labelNodeRects:o}=ot(e.values()),r=(0,i.K)((e,r)=>{const s=e.start,i=e.end,a=te(r);if(a.length!==r.length-1)return!1;const c=[s,i].filter(t=>Boolean(t));for(const t of a){if(it(t.a,t.b,n,c,-2))return!1;if(it(t.a,t.b,o,[],-2))return!1}for(const n of t){if(n===e||n.isLayoutOnly)continue;const t=n.points;if(t&&!(t.length<2))for(const e of a)for(const n of te(H(t))){if(P(e,n,.5)>=8)return!1;if(dt(e.a,e.b,n.a,n.b,Zt))return!1}}return!0},"candidateIsSafe"),s=(0,i.K)((t,e)=>{if(e+4>=t.length)return;const n=t[e],o=t[e+1],r=t[e+2],s=t[e+3],i=t[e+4],a=X(n,o)&&z(o,r)&&X(r,s)&&z(s,i)&&E(n,s,Zt)&&E(n,i,Zt)&&E(o,r,Zt)&&(o.x-n.x)*(s.x-r.x)<0,c=z(n,o)&&X(o,r)&&z(r,s)&&X(s,i)&&Y(n,s,Zt)&&Y(n,i,Zt)&&Y(o,r,Zt)&&(o.y-n.y)*(s.y-r.y)<0;if(a||c)return H([...t.slice(0,e+1),i,...t.slice(e+5)]);if(e+5>=t.length)return;const f=t[e+5],d=z(n,o)&&X(o,r)&&z(r,s)&&X(s,i)&&z(i,f)&&E(n,i,Zt)&&E(n,f,Zt)&&E(r,s,Zt)&&(r.x-o.x)*(i.x-s.x)<0,l=X(n,o)&&z(o,r)&&X(r,s)&&z(s,i)&&X(i,f)&&Y(n,i,Zt)&&Y(n,f,Zt)&&Y(r,s,Zt)&&(r.y-o.y)*(i.y-s.y)<0;return d||l?H([...t.slice(0,e+1),f,...t.slice(e+6)]):void 0},"withoutDogleg");for(let i=0;i<8;i++){let e=!1;for(const n of t){if(n.isLayoutOnly)continue;const t=H(n.points??[]);for(let o=0;o<=t.length-5;o++){const i=s(t,o);if(i&&r(n,i)){n.points=i,e=!0;break}}if(e)break}if(!e)return}}function re(t,e){const{realNodeRects:n,labelNodeRects:o}=ot(e.values()),r=t.filter(t=>!t.isLayoutOnly),s=(0,i.K)((t,e,n)=>H(t===e?n??[]:t.points??[]),"pointsFor"),a=(0,i.K)((t,e)=>{let n=0;for(let o=0;o{const e=te(t);if(3!==e.length)return;const n=e[1];return e[0].horizontal!==n.horizontal&&e[2].horizontal!==n.horizontal?{index:n.index,horizontal:n.horizontal,vertical:n.vertical,segment:n}:void 0},"middleRail"),f=(0,i.K)((t,e)=>{const o=[t.start,t.end].filter(t=>Boolean(t));return n.filter(t=>{if(o.includes(t.id))return!1;const n=t.rect;if(e.horizontal){return A(e.a.x,e.b.x,n.left,n.right)>=8&&e.a.y>=n.top-2&&e.a.y<=n.bottom+2}return A(e.a.y,e.b.y,n.top,n.bottom)>=8&&e.a.x>=n.left-2&&e.a.x<=n.right+2})},"blockingRectsFor"),d=(0,i.K)((t,e,n)=>{const o=t.map(t=>({...t}));if(e.horizontal)o[e.index].y=n,o[e.index+1].y=n;else{if(!e.vertical)return;o[e.index].x=n,o[e.index+1].x=n}const r=pt(H(o));return te(r).length===r.length-1?r:void 0},"candidateByMovingRail"),l=(0,i.K)((t,e,i)=>{const c=[t.start,t.end].filter(t=>Boolean(t)),f=te(e);if(f.length!==e.length-1)return!1;for(const r of f){if(it(r.a,r.b,n,c,-2))return!1;if(it(r.a,r.b,o,[],-2))return!1}for(const n of r)if(n!==t)for(const t of f)for(const e of te(s(n)))if(P(t,e,.5)>=8)return!1;return a(t,e)<=i},"candidateIsSafe");for(let i=0;i<8;i++){const t=a();let e=!1;for(const n of r){const o=s(n),r=c(o);if(!r)continue;const i=f(n,r.segment);if(0===i.length)continue;const a=r.horizontal?[Math.min(...i.map(t=>t.rect.top))-20,Math.max(...i.map(t=>t.rect.bottom))+20]:[Math.min(...i.map(t=>t.rect.left))-20,Math.max(...i.map(t=>t.rect.right))+20];for(const s of a){const i=d(o,r.segment,s);if(i&&l(n,i,t)){n.points=i,e=!0;break}}if(e)break}if(!e)return}}function se(t,e){const n=(0,i.K)(t=>{const e=t.groupTitleRect;if(e&&"number"==typeof e.left&&"number"==typeof e.right&&"number"==typeof e.top&&"number"==typeof e.bottom&&Number.isFinite(e.left)&&Number.isFinite(e.right)&&Number.isFinite(e.top)&&Number.isFinite(e.bottom)&&!(e.right<=e.left)&&!(e.bottom<=e.top))return{left:e.left,right:e.right,top:e.top,bottom:e.bottom}},"validTitleRect"),o=(0,i.K)(t=>{if(!t.isGroup||t.parentId)return;const e=t.direction,o="string"==typeof e?e.toUpperCase():"";if("LR"===o||"RL"===o||"BT"===o)return;const r=n(t),s=t.y,i=t.height;if(!r||"number"!=typeof s||"number"!=typeof i||!Number.isFinite(s)||!Number.isFinite(i)||i<=0)return;const a=r.right-r.left,c=r.bottom-r.top;return c<=0||a{if(!t.horizontal)return!1;const n=t.a.y;return!(n<=e.top+Zt||n>=e.bottom-Zt)&&A(t.a.x,t.b.x,e.left,e.right)>=8},"horizontalSegmentIntersectsTitle"),s=[...e.values()].map(o).filter(t=>Boolean(t));if(0===s.length)return;let a=0;for(const i of t){if(i.isLayoutOnly)continue;const t=H(i.points??[]);for(const e of te(t))for(const t of s)r(e,t.rect)&&(a=Math.max(a,t.rect.bottom-e.a.y+4))}if(!(a<=Zt))for(const i of s){const t=i.node.y,e=i.node.height;"number"!=typeof t||"number"!=typeof e||!Number.isFinite(t)||!Number.isFinite(e)||e<=0||(i.node.y=t-a/2,i.node.height=e+a,i.node.groupTitleRect={...i.rect,top:i.rect.top-a,bottom:i.rect.bottom-a})}}function ie(t,e){const n=(0,i.K)(t=>{const e=t.groupTitleRect;if(e&&"number"==typeof e.left&&"number"==typeof e.right&&"number"==typeof e.top&&"number"==typeof e.bottom&&Number.isFinite(e.left)&&Number.isFinite(e.right)&&Number.isFinite(e.top)&&Number.isFinite(e.bottom)&&!(e.right<=e.left)&&!(e.bottom<=e.top))return{left:e.left,right:e.right,top:e.top,bottom:e.bottom}},"validTitleRect"),o=(0,i.K)(t=>{if(!t.isGroup||t.parentId)return;if("LR"!==t.direction)return;const e=n(t),o=t.x,r=t.width;if(!e||"number"!=typeof o||"number"!=typeof r||!Number.isFinite(o)||!Number.isFinite(r)||r<=0)return;const s=e.right-e.left,i=e.bottom-e.top;return s<=0||i{if(!t.vertical)return!1;const n=t.a.x;return!(n<=e.left+Zt||n>=e.right-Zt)&&A(t.a.y,t.b.y,e.top,e.bottom)>=8},"verticalSegmentIntersectsTitle"),s=(0,i.K)((t,e)=>{if(!t.horizontal)return!1;const n=t.a.y;return!(n<=e.top+Zt||n>=e.bottom-Zt)&&A(t.a.x,t.b.x,e.left,e.right)>=8},"horizontalSegmentIntersectsTitle"),a=[...e.values()].map(o).filter(t=>Boolean(t));if(0===a.length)return;let c=0;for(const i of t){if(i.isLayoutOnly)continue;const t=H(i.points??[]);for(const e of te(t))for(const t of a)if(r(e,t.rect))c=Math.max(c,t.rect.right-e.a.x+4);else if(s(e,t.rect)){const n=Math.min(e.a.x,e.b.x);c=Math.max(c,t.rect.right-n+4)}}if(!(c<=Zt))for(const i of a){const t=i.node.x,e=i.node.width;"number"!=typeof t||"number"!=typeof e||!Number.isFinite(t)||!Number.isFinite(e)||e<=0||(i.node.x=t-c/2,i.node.width=e+c,i.node.groupTitleRect={...i.rect,left:i.rect.left-c,right:i.rect.right-c})}}function ae(t,e){const{realNodeRects:n}=ot(e.values()),o=t.filter(t=>!t.isLayoutOnly),r=(0,i.K)((t,e=new Map)=>H(e.get(t)??t.points??[]),"replacementPointsFor"),s=(0,i.K)((t=new Map)=>{let e=0;for(let n=0;no.reduce((e,n)=>e+G(r(n,t)),0),"totalBends"),c=(0,i.K)(t=>{const e=r(t);if(e.length<4)return;const n=e[e.length-2],o=e[e.length-1];return X(n,o,Zt)||z(n,o,Zt)?{tailStart:n,terminal:o}:void 0},"terminalTailFor"),f=(0,i.K)((t,e)=>{const n=r(t);if(n.length<3)return;const o=n[0],s=n[1];let i;if(X(o,s,Zt))i={x:s.x,y:e.tailStart.y};else{if(!z(o,s,Zt))return;i={x:e.tailStart.x,y:s.y}}const a=pt(H([o,s,i,e.tailStart,e.terminal]));return te(a).length===a.length-1?a:void 0},"candidateWithDestinationTail"),d=(0,i.K)((t,e)=>{const o=[t.start,t.end].filter(t=>Boolean(t));for(const r of te(e))if(it(r.a,r.b,n,o,-2))return!0;return!1},"pathHasNodeHit"),l=(0,i.K)((t,e,n)=>{for(const s of o)if(s!==t)for(const t of te(e))for(const e of te(r(s,n)))if(P(t,e,.5)>=8)return!0;return!1},"pathHasSharedTrack"),u=(0,i.K)((t,e,n)=>!d(t,e)&&!l(t,e,n),"candidateIsSafe"),h=(0,i.K)(()=>{const t=new Map;for(const n of o){const o=n.end;if(!o||!e.has(o))continue;if(r(n).length<4)continue;const s=t.get(o)??[];s.push(n),t.set(o,s)}return t},"edgesByDestination");for(let i=0;i<4;i++){const t=s();if(0===t)return;let e,n=t,o=a();for(const r of h().values())for(let i=0;i=t||(b>n||b===n&&M>=o||(e=y,n=b,o=M))}if(!e)return;for(const[r,s]of e)r.points=s}}function ce(t,e){const{realNodeRects:n,labelNodeRects:o}=ot(e.values()),r=t.filter(t=>!t.isLayoutOnly),s=(0,i.K)((t,e=new Map)=>H(e.get(t)??t.points??[]),"replacementPointsFor"),a=(0,i.K)((t=new Map)=>{let e=0;for(let n=0;nr.reduce((e,n)=>e+G(s(n,t)),0),"totalBends"),f=(0,i.K)(t=>{const n=t.start,o=t.end,r=n?e.get(n):void 0,s=o?e.get(o):void 0,i=r?U(r):void 0,a=s?U(s):void 0;return i&&a?{src:i,dst:a}:void 0},"endpointRectsFor"),d=(0,i.K)((t,e,n)=>{if(n.index<=0||n.index+1>=e.length-1)return;const o=f(t);if(o){if(n.vertical){const r=n.a.x,s=Math.min(o.src.left,o.dst.left),i=Math.max(o.src.right,o.dst.right),a=ri+Zt?"right":void 0;if(!a)return;return{edge:t,points:e,segmentIndex:n.index,axis:"vertical",side:a,coord:r,min:Math.min(n.a.y,n.b.y),max:Math.max(n.a.y,n.b.y)}}if(n.horizontal){const r=n.a.y,s=Math.min(o.src.top,o.dst.top),i=Math.max(o.src.bottom,o.dst.bottom),a=ri+Zt?"bottom":void 0;if(!a)return;return{edge:t,points:e,segmentIndex:n.index,axis:"horizontal",side:a,coord:r,min:Math.min(n.a.x,n.b.x),max:Math.max(n.a.x,n.b.x)}}}},"externalRailForSegment"),l=(0,i.K)(()=>{const t=[];for(const e of r){const n=s(e);for(const o of te(n)){const r=d(e,n,o);r&&t.push(r)}}return t},"collectExternalRails"),u=(0,i.K)((t,e)=>t.edge!==e.edge&&t.axis===e.axis&&t.side===e.side&&A(t.min,t.max,e.min,e.max)>=8,"railsInteract"),h=(0,i.K)(t=>{const e=[],n=new Set;for(const o of t){if(n.has(o))continue;const r=[o],s=[];for(n.add(o);r.length>0;){const e=r.pop();s.push(e);for(const o of t)!n.has(o)&&u(e,o)&&(n.add(o),r.push(o))}s.length>1&&e.push(s)}return e},"connectedComponents"),g=(0,i.K)(t=>{const e=[];for(const n of t)e.some(t=>Math.abs(t-n.coord){const e=t.map(t=>t.coord),n=g(t),o=[];if(t.length<=6){const r=new Array(n.length).fill(!1),s=[],a=(0,i.K)(()=>{if(s.length!==t.length)for(const[t,e]of n.entries())r[t]||(r[t]=!0,s.push(e),a(),s.pop(),r[t]=!1);else s.some((t,n)=>Math.abs(t-e[n])>=Zt)&&o.push([...s])},"visit");return a(),o}for(let r=0;r{const n=new Map;for(const[r,s]of t.entries()){const t=e[r],o=n.get(s.edge)??s.points.map(t=>({x:t.x,y:t.y}));"vertical"===s.axis?(o[s.segmentIndex].x=t,o[s.segmentIndex+1].x=t):(o[s.segmentIndex].y=t,o[s.segmentIndex+1].y=t),n.set(s.edge,o)}const o=new Map;for(const[r,s]of n){const t=pt(H(s));if(te(t).length!==t.length-1)return;o.set(r,t)}return o},"replacementsForAssignment"),m=(0,i.K)(t=>{for(const[e,r]of t){const t=[e.start,e.end].filter(t=>Boolean(t));for(const e of te(r)){if(it(e.a,e.b,n,t,-2))return!1;if(it(e.a,e.b,o,[],-2))return!1}}for(let e=0;e=8)return!1}}return!0},"candidateIsSafe");for(let i=0;i<4;i++){const t=a();if(0===t)return;let e,n=t,o=c(),r=Number.POSITIVE_INFINITY;for(const s of h(l()))for(const i of p(s)){const f=x(s,i);if(!f||!m(f))continue;const d=a(f);if(d>=t)continue;const l=c(f),u=s.reduce((t,e,n)=>t+Math.abs(i[n]-e.coord),0);d>n||d===n&&(l>o||l===o&&u>=r)||(e=f,n=d,o=l,r=u)}if(!e)return;for(const[s,i]of e)s.points=i}}function fe(t,e){const{realNodeRects:n,labelNodeRects:o}=ot(e.values()),r=t.filter(t=>!t.isLayoutOnly),s=(0,i.K)((t,e,n)=>H(t===e?n??[]:t.points??[]),"pointsFor"),a=(0,i.K)(t=>te(t).reduce((t,e)=>{const n=e.a.x-e.b.x,o=e.a.y-e.b.y;return t+Math.hypot(n,o)},0),"pathLength"),c=(0,i.K)((t,e)=>{let n=0;for(let o=0;o{if(t.horizontal){const n=t.a.y;return(Math.abs(n-e.top)<1||Math.abs(n-e.bottom)<1)&&A(t.a.x,t.b.x,e.left,e.right)>=8}if(t.vertical){const n=t.a.x;return(Math.abs(n-e.left)<1||Math.abs(n-e.right)<1)&&A(t.a.y,t.b.y,e.top,e.bottom)>=8}return!1},"segmentRunsAlongRectBorder"),d=(0,i.K)(t=>{const n=[t.start,t.end].filter(t=>Boolean(t)),o=[];for(const r of n){const t=e.get(r),n=t?U(t):void 0;n&&o.push(n)}return o},"endpointRectsFor"),l=(0,i.K)((t,e)=>{if(e+3>=t.length)return[];const n=t[e],o=t[e+1],r=t[e+2],s=t[e+3],i=X(n,o,Zt)&&z(o,r,Zt)&&X(r,s,Zt),a=z(n,o,Zt)&&X(o,r,Zt)&&z(r,s,Zt);if(!i&&!a)return[];if(!(i?Math.sign(o.x-n.x)!==Math.sign(s.x-r.x):Math.sign(o.y-n.y)!==Math.sign(s.y-r.y)))return[];const c=E(n,s,Zt)||Y(n,s,Zt)?[]:[{x:n.x,y:s.y},{x:s.x,y:n.y}],f=0===c.length?[[...t.slice(0,e+1),...t.slice(e+3)]]:c.map(n=>[...t.slice(0,e+1),n,...t.slice(e+3)]),d=new Set;return f.map(t=>pt(H(t))).filter(t=>{if(te(t).length!==t.length-1)return!1;if(!t.some(t=>F(t,s,Zt)))return!1;const e=t.map(t=>`${t.x.toFixed(3)},${t.y.toFixed(3)}`).join("|");return!d.has(e)&&(d.add(e),!0)})},"shortcutCandidatesAt"),u=(0,i.K)((t,e,i)=>{const a=[t.start,t.end].filter(t=>Boolean(t)),l=d(t);for(const r of te(e)){if(it(r.a,r.b,n,a,-2))return!1;if(it(r.a,r.b,o,[],-2))return!1;if(l.some(t=>f(r,t)))return!1}for(const n of r)if(n!==t)for(const t of te(e))for(const e of te(s(n)))if(P(t,e,.5)>=8)return!1;return c(t,e)<=i},"candidateIsSafe");for(let i=0;i<8;i++){const t=c();let e,n,o=t,i=Number.POSITIVE_INFINITY,f=Number.POSITIVE_INFINITY;for(const d of r){const r=s(d),h=G(r,Zt),g=a(r);for(let s=0;s<=r.length-4;s++)for(const p of l(r,s)){const r=G(p,Zt),s=a(p);if(!(ro||l===o&&(r>i||r===i&&s>=f)||(e=d,n=p,o=l,i=r,f=s)}}if(!e||!n)return;e.points=n}}function de(t,e){const n=20,o=[];for(const i of e.values()){if(i.isGroup||i.isEdgeLabel)continue;const t=i.x??0,e=i.y??0,n=U(i);n&&o.push({id:String(i.id??""),cx:t,cy:e,rect:n})}if(0===o.length)return;const r=new Map(o.map(t=>[t.id,t])),s=o.map(t=>({id:t.id,rect:t.rect})),a=["top","bottom","left","right"],c={top:Math.min(...o.map(t=>t.rect.top))-n,bottom:Math.max(...o.map(t=>t.rect.bottom))+n,left:Math.min(...o.map(t=>t.rect.left))-n,right:Math.max(...o.map(t=>t.rect.right))+n},f=t.filter(t=>!t.isLayoutOnly),d=new Map(f.map((t,e)=>[t,e])),l=(0,i.K)(t=>{const e="left"===t||"top"===t?-1:1,o=[];for(let r=0;r<=2;r++)o.push(c[t]+e*n*r);return o},"outwardTracksForSide"),u=(0,i.K)((t,e=new Map)=>H(e.get(t)??t.points??[]),"replacementPointsFor"),h=(0,i.K)((t,e)=>{let n=0;for(const o of t)for(const t of e)dt(o.a,o.b,t.a,t.b,Zt)&&n++;return n},"crossingCountBetweenSegments"),g=(0,i.K)((t,e)=>h(te(t),te(e)),"crossingCountBetweenPaths"),p=(0,i.K)((t=new Map)=>{let e=0;const n=[],o=new Set,r=[],s=(0,i.K)(t=>{o.has(t)||(o.add(t),r.push(t))},"addEdge");for(let i=0;i0&&(e+=c,n.push({first:o,second:i,count:c}),s(o),s(i))}}return r.sort((t,e)=>(d.get(t)??0)-(d.get(e)??0)),{count:e,pairs:n,edgeSet:o,edges:r}},"crossingSnapshot"),x=(0,i.K)((t,e)=>{const n=new Set(e.keys());if(0===n.size)return t.count;let o=0;for(const s of t.pairs)(n.has(s.first)||n.has(s.second))&&(o+=s.count);let r=0;for(let s=0;s{const e=new Map;for(const r of t.pairs){const t=e.get(r.first)??new Set;t.add(r.second),e.set(r.first,t);const n=e.get(r.second)??new Set;n.add(r.first),e.set(r.second,n)}const n=[],o=new Set;for(const r of t.edges){if(o.has(r))continue;const t=[r],s=[];for(o.add(r);t.length>0;){const n=t.pop();s.push(n);for(const r of e.get(n)??[])o.has(r)||(o.add(r),t.push(r))}s.sort((t,e)=>(d.get(t)??0)-(d.get(e)??0)),s.length>1&&n.push(s)}return n},"crossingComponents"),y=(0,i.K)(t=>[t.start,t.end].filter(t=>Boolean(t)),"endpointIdsFor"),b=(0,i.K)(t=>{const e=[];for(const n of m(t)){const t=new Set(n),o=new Set(n.flatMap(t=>y(t))),r=[...n];for(const e of f)t.has(e)||y(e).some(t=>o.has(t))&&r.push(e);r.sort((t,e)=>(d.get(t)??0)-(d.get(e)??0)),e.push(r)}return e},"pairSearchGroups"),M=(0,i.K)((t,e,n)=>x(t,new Map([[e,n]])),"crossingCountWithSingleReplacement"),K=(0,i.K)(t=>{const e=new Map;for(const n of t.pairs)e.set(n.first,(e.get(n.first)??0)+n.count),e.set(n.second,(e.get(n.second)??0)+n.count);return e},"currentCrossingsByEdge"),I=(0,i.K)(t=>t.slice(1).reduce((e,n,o)=>{const r=t[o];return e+Math.abs(n.x-r.x)+Math.abs(n.y-r.y)},0),"pathLength"),S=(0,i.K)((t=new Map)=>f.reduce((e,n)=>e+G(u(n,t)),0),"totalBends"),w=(0,i.K)((t=new Map)=>f.reduce((e,n)=>e+I(u(n,t)),0),"totalLength"),v=(0,i.K)((t,e,n=new Map)=>{const o=te(e);for(const r of f)if(r!==t)for(const t of o)for(const e of te(u(r,n)))if(P(t,e,.5)>=8)return!0;return!1},"pathHasSegmentConflict"),C=(0,i.K)((t,e)=>{const n=[t.start,t.end].filter(t=>Boolean(t));for(const o of te(e))if(it(o.a,o.b,s,n,-2))return!0;return!1},"pathHitsNode"),L=(0,i.K)((t,e)=>{const n=pt(H(e));te(n).length===n.length-1&&t.push(n)},"pushOrthogonalCandidate"),k=(0,i.K)(t=>"left"===t||"right"===t,"sideIsHorizontal"),O=(0,i.K)((t,e,o)=>{switch(e){case"left":return Math.min(t.x,o.x)-n;case"right":return Math.max(t.x,o.x)+n;case"top":return Math.min(t.y,o.y)-n;case"bottom":return Math.max(t.y,o.y)+n}},"localTrackForSameSide"),R=(0,i.K)((t,e,o,r)=>{const s="left"===o||"top"===o?-1:1,i=[O(e,o,r),c[o]];for(const a of i)for(let i=0;i<=2;i++)L(t,et(e,o,r,a+s*n*i))},"addSameSideCandidates"),T=(0,i.K)((t,e,n,o,r)=>{for(const s of l(n))for(const n of l(r))L(t,[e,{x:s,y:e.y},{x:s,y:n},{x:o.x,y:n},o])},"addHorizontalToVerticalCandidates"),$=(0,i.K)((t,e,n,o,r)=>{for(const s of l(n))for(const n of l(r))L(t,[e,{x:e.x,y:s},{x:n,y:s},{x:n,y:o.y},o])},"addVerticalToHorizontalCandidates"),N=(0,i.K)((t,e,n,o,r)=>{const s=[...l("top"),...l("bottom")];for(const i of l(n))for(const n of l(r))for(const r of s)L(t,[e,{x:i,y:e.y},{x:i,y:r},{x:n,y:r},{x:n,y:o.y},o])},"addHorizontalPairCandidates"),B=(0,i.K)((t,e,n,o,r)=>{const s=[...l("left"),...l("right")];for(const i of l(n))for(const n of l(r))for(const r of s)L(t,[e,{x:e.x,y:i},{x:r,y:i},{x:r,y:n},{x:o.x,y:n},o])},"addVerticalPairCandidates"),F=(0,i.K)(t=>{const e=new Set;return t.map(t=>H(t)).filter(t=>{const n=t.map(t=>`${t.x.toFixed(3)},${t.y.toFixed(3)}`).join("|");return!(e.has(n)||t.length<2)&&(e.add(n),!0)})},"dedupeCandidatePaths"),E=(0,i.K)((t,e,o,r)=>{const s=[],i=tt(t,e,o,r,n,Zt);i&&L(s,i),e===r&&R(s,t,e,o);const a=k(e),c=k(r);return a&&!c?T(s,t,e,o,r):!a&&c?$(s,t,e,o,r):a?N(s,t,e,o,r):B(s,t,e,o,r),F(s)},"buildCandidatesForSides"),Y=(0,i.K)((t,e,n,o)=>{const r=[...l("left"),...l("right")],s=[...l("top"),...l("bottom")];for(const i of a){const a=Z(o,i),c="top"===i||"bottom"===i?l(i):s;for(const o of r){L(t,[e,n,{x:o,y:n.y},{x:o,y:a.y},a]);for(const r of c)L(t,[e,n,{x:o,y:n.y},{x:o,y:r},{x:a.x,y:r},a])}}},"addVerticalDepartureOuterTrackCandidates"),A=(0,i.K)((t,e,n,o)=>{const r=[...l("left"),...l("right")],s=[...l("top"),...l("bottom")];for(const i of a){const a=Z(o,i),c="left"===i||"right"===i?l(i):r;for(const o of s){L(t,[e,n,{x:n.x,y:o},{x:a.x,y:o},a]);for(const r of c)L(t,[e,n,{x:n.x,y:o},{x:r,y:o},{x:r,y:a.y},a])}}},"addHorizontalDepartureOuterTrackCandidates"),D=(0,i.K)(t=>{const e=t.start,n=t.end,o=n?r.get(n):void 0;if(!e||!o)return[];const s=H(t.points??[]);if(s.length<4)return[];const i=s[0],a=s[1],c=[];return z(i,a,Zt)?Y(c,i,a,o):X(i,a,Zt)&&A(c,i,a,o),c},"terminalPreservingOuterTrackCandidates"),j=(0,i.K)(t=>{const e=t.start,n=t.end,o=e?r.get(e):void 0,s=n?r.get(n):void 0;if(!o||!s)return[];const i=[];for(const r of a){const t=Z(o,r);for(const e of a)i.push(...E(t,r,Z(s,e),e))}return i.push(...D(t)),i},"candidatePathsFor"),_=(0,i.K)(()=>new Map(f.map(t=>[t,te(u(t))])),"currentSegmentsByEdge"),V=(0,i.K)((t,e,n)=>{const o=new Set;for(const r of f){if(r===t)continue;const s=n.get(r)??te(u(r));e.some(t=>s.some(e=>P(t,e,.5)>=8))&&o.add(r)}return o},"sharedTrackConflictsFor"),W=(0,i.K)((t,e,n,o)=>{const r=new Set;return j(t).map(t=>pt(H(t))).filter(e=>{if(C(t,e))return!1;const n=e.map(t=>`${t.x.toFixed(3)},${t.y.toFixed(3)}`).join("|");return!(r.has(n)||e.length<2)&&(r.add(n),!0)}).map(r=>{const s=te(r);let i=0;for(const e of f)e!==t&&(i+=h(s,n.get(e)??te(u(e))));return{candidate:r,candidateSegments:s,crossings:e.count-(o.get(t)??0)+i,bends:G(r,Zt),totalBends:G(r),length:I(r)}}).filter(({crossings:t})=>t<=e.count).sort((t,e)=>t.crossings-e.crossings||t.bends-e.bends||t.length-e.length).slice(0,48).map(e=>({path:e.candidate,segments:e.candidateSegments,sharedTrackConflicts:V(t,e.candidateSegments,n),totalBends:e.totalBends,length:e.length}))},"pairCandidatesFor"),q=(0,i.K)((t,e,n,o,r,s)=>{let i=0;for(const c of t.pairs)c.first!==e&&c.second!==e&&c.first!==o&&c.second!==o||(i+=c.count);let a=h(n.segments,r.segments);for(const c of f){if(c===e||c===o)continue;const t=s.get(c)??te(u(c));a+=h(n.segments,t)+h(r.segments,t)}return t.count-i+a},"pairCrossingCount"),J=(0,i.K)((t,e)=>{for(const n of t.sharedTrackConflicts)if(n!==e)return!1;return!0},"conflictsOnlyWith"),Q=(0,i.K)((t,e)=>t.segments.some(t=>e.segments.some(e=>P(t,e,.5)>=8)),"candidatesShareTrack"),nt=(0,i.K)((t,e,n,o)=>J(e,n.edge)&&J(o,t.edge)&&!Q(e,o),"pairCandidatesAreCompatible"),ot=(0,i.K)((t,e,n,o,r)=>{const s=q(t.current,e.edge,n,o.edge,r,t.baseSegments);if(!(s>=t.current.count))return{replacements:new Map([[e.edge,n.path],[o.edge,r.path]]),crossings:s,bends:t.currentBends-(t.baseBendsByEdge.get(e.edge)??0)-(t.baseBendsByEdge.get(o.edge)??0)+n.totalBends+r.totalBends,length:t.currentLength-(t.baseLengthByEdge.get(e.edge)??0)-(t.baseLengthByEdge.get(o.edge)??0)+n.length+r.length}},"scorePairReplacement"),rt=(0,i.K)((t,e)=>t.crossings{let r=o;for(const s of e.candidates)for(const o of n.candidates){if(!nt(e,s,n,o))continue;const i=ot(t,e,s,n,o);i&&rt(i,r)&&(r=i)}return r},"bestScoreForOptionPair"),at=(0,i.K)(t=>{const e=S(),n=w(),o=_(),r=K(t),s=new Map(f.map(t=>[t,G(u(t))])),i=new Map(f.map(t=>[t,I(u(t))])),a=new Map,c=b(t);for(const f of c)for(const e of f){if(a.has(e))continue;const n=W(e,t,o,r);n.length>0&&a.set(e,{edge:e,candidates:n})}let d={replacements:new Map,crossings:t.count,bends:e,length:n};const l={current:t,currentBends:e,currentLength:n,baseBendsByEdge:s,baseLengthByEdge:i,baseSegments:o};for(const f of c){const e=new Set(f.filter(e=>t.edgeSet.has(e))),n=f.map(t=>a.get(t)).filter(t=>Boolean(t));for(let t=0;t0?d.replacements:void 0},"bestPairedReplacement");for(let i=0;i<4;i++){const t=p(),e=t.count;if(0===e)return;let n,o,r=e,s=Number.POSITIVE_INFINITY;for(const a of t.edges){const i=G(u(a),Zt);for(const c of j(a)){const f=C(a,c),d=!f&&v(a,c),l=M(t,a,c),u=G(c,Zt);if(f||d)continue;(lr||l===r&&u>=s||(n=a,o=c,r=l,s=u))}}if(n&&o){n.points=o;continue}const i=at(t);if(!i)return;for(const[a,c]of i)a.points=c}}(0,i.K)(ne,"separateSharedRenderedTerminalLanes"),(0,i.K)(oe,"collapseRedundantRectangularDoglegs"),(0,i.K)(re,"liftObstacleHuggingSameSideRails"),(0,i.K)(se,"liftTopLaneTitleBandsAboveRails"),(0,i.K)(ie,"shiftLeftLaneTitleBandsLeftOfRails"),(0,i.K)(ae,"swapDestinationTerminalTailsToReduceCrossings"),(0,i.K)(ce,"reassignCrossingExternalRailChannels"),(0,i.K)(fe,"shortcutRedundantOrthogonalJogs"),(0,i.K)(de,"resolveRenderedOrthogonalCrossings");var le=.001;function ue(t,e){const{nodeInfoById:n,realNodeRects:o}=nt(e),r=["top","bottom","left","right"],s={top:Math.min(...o.map(t=>t.rect.top))-20,bottom:Math.max(...o.map(t=>t.rect.bottom))+20,left:Math.min(...o.map(t=>t.rect.left))-20,right:Math.max(...o.map(t=>t.rect.right))+20},a=(0,i.K)((t,e,n,o)=>{const r=[],i=tt(t,e,n,o,20,le);return i&&r.push(i),e===o&&r.push(et(t,e,n,s[e])),r},"buildOrthogonalPathCandidates"),c=(0,i.K)((t,e)=>{for(let n=0;n{let r=0;const s=D(e,le),i=n.start,a=n.end;for(const c of t){if(c===n||c.isLayoutOnly)continue;const t=c.start,e=c.end;if(!o&&i&&a&&(t===i||t===a||e===i||e===a))continue;const f=c.points;if(f&&!(f.length<2))for(const n of s)for(const t of D(f,le))(at(n.a,n.b,t.a,t.b,le,le)||P(n,t,le)>=8)&&r++}return r},"pathConflictCount"),d=(0,i.K)((t,e)=>{const n=Math.abs(t.y-e.rect.top),o=Math.abs(t.y-e.rect.bottom),r=Math.abs(t.x-e.rect.left),s=Math.abs(t.x-e.rect.right);let i="top",a=n;return o{const o=l.get(t)??[];o.push({side:e,edgeId:n}),l.set(t,o)},"addFaceClaim");for(const i of t){if(i.isLayoutOnly)continue;const t=i.points??[];if(t.length<1)continue;const e=i.id??"",o=i.start,r=i.end;if(o){const r=n.get(o);r&&u(o,d(t[0],r),e)}if(r){const o=n.get(r);o&&u(r,d(t[t.length-1],o),e)}}const h=(0,i.K)((t,e,n)=>l.get(t)?.some(t=>t.edgeId!==n&&t.side===e)??!1,"faceIsClaimed");for(const i of t){if(i.isLayoutOnly)continue;const t=i.points;if(!t||t.length<2)continue;const e=G(t,le);if(e<4)continue;const o=i.start,s=i.end;if(!o||!s)continue;const g=n.get(o),p=n.get(s);if(!g||!p)continue;const x=i.id??"",m=f(t,i,!0),y=f(t,i);let b,M=m,K=e;for(const n of r){if(h(o,n,x))continue;const t=Z(g,n);for(const e of r){if(h(s,e,x))continue;const r=Z(p,e);for(const d of a(t,n,r,e)){if(c(d,[o,s]))continue;const t=G(d,le);if(m>0){const e=f(d,i,!0);if(e>M||e===M&&t>=K)continue;M=e,K=t,b=d;continue}f(d,i)>y||tt.edgeId!==x));const e=l.get(s);e&&l.set(s,e.filter(t=>t.edgeId!==x)),u(o,d(b[0],g),x),u(s,d(b[b.length-1],p),x)}}}(0,i.K)(ue,"simplifyDetouredEdges");var he=.001;function ge(t,e){const n=e?0:t.length-1,o=e?1:-1,r=t[n],s=t[n+o];if(!r||!s)return;const i=s.x-r.x,a=s.y-r.y;if(!(Math.abs(i)+Math.abs(a)e&&q(t,pe(e)))}function me(t,e){const n=[];for(const i of t){if(i.isLayoutOnly)continue;const t=i.points;if(t&&!(t.length<2))for(let e=0;e{const n=J(e,3);for(const{nodeId:r,rect:s}of o)if(r!==t&&q(n,s))return!0;return!1},"labelOverlapsForeignNode"),a=(0,i.K)((t,e)=>{const o=J(e,3);for(const r of n)if(r.edgeId!==t&&_(r.p1,r.p2,o))return!0;return!1},"labelOverlapsForeignEdge"),c=(0,i.K)((t,e,n)=>s(t,n)||a(e,n),"labelOverlapsAnything"),f=[],d=(0,i.K)(t=>{for(const{id:e,rect:n}of r)if(W(n,t))return e},"findContainingLane"),l=(0,i.K)((t,e)=>f.some(n=>n.labelId!==t&&q(e,n.rect)),"overlapsPlacedLabel");for(const u of t){if(u.isLayoutOnly)continue;const t=u.labelNodeId;if(!t)continue;const n=e.get(t);if(!n)continue;const o=u.points;if(!o||o.length<2)continue;const h=n.width??0,g=n.height??0;if(h<=0||g<=0)continue;const p=[];for(let e=0;e=he&&s>=he||p.push({idx:e,length:r+s,orientation:r>=he?"horizontal":"vertical",midX:(t.x+n.x)/2,midY:(t.y+n.y)/2}))}if(0===p.length)continue;const x=p.length>=3?p.filter(t=>t.idx>0&&t.idx0?x:p,y=h>=g?"horizontal":"vertical",b=(0,i.K)(t=>[...t].sort((t,e)=>{const n=t.orientation===y;if(n!==(e.orientation===y))return n?-1:1;const o=t.length>=("horizontal"===t.orientation?h:g)+2;return o!==e.length>=("horizontal"===e.orientation?h:g)+2?o?-1:1:e.length-t.length}),"rankSegments"),M=p[0],K=p[p.length-1],I=[.5,.25,.75,.05,.95,.15,.85,.1,.9],S=(0,i.K)((t,e)=>{const n=o[t.idx],r=o[t.idx+1];return{midX:n.x+(r.x-n.x)*e,midY:n.y+(r.y-n.y)*e}},"anchorAtT"),w=(0,i.K)((t,e,n)=>Math.min(n,Math.max(e,t)),"clamp"),v=(0,i.K)((t,e)=>t.midX>=e.left-he&&t.midX<=e.right+he&&t.midY>=e.top-he&&t.midY<=e.bottom+he,"pointInsideRectInclusive"),C=(0,i.K)(t=>{const e=Q(t.midX,t.midY,h,g),n=d(e);if(n)return{laneId:n,anchor:t,rect:e};const o=r.find(({rect:e})=>v(t,e));if(!o)return;const s=o.rect.left+h/2+1,i=o.rect.right-h/2-1,a=o.rect.top+g/2+1,c=o.rect.bottom-g/2-1;if(s>i||a>c)return;const f={midX:w(t.midX,s,i),midY:w(t.midY,a,c)},l=Q(f.midX,f.midY,h,g);return v(t,l)?{laneId:o.id,anchor:f,rect:l}:void 0},"placementForAnchor"),L=(0,i.K)((t,e,n)=>"horizontal"===t.orientation?Math.abs(e.midX-n.x):Math.abs(e.midY-n.y),"distanceAlongSegment"),k=(0,i.K)((t,e)=>{const n=("horizontal"===t.orientation?h/2:g/2)+12;if(t===M){const r=o[t.idx];if(L(t,e,r)+he{const n=b(e);for(const r of n)for(const e of I){const n=S(r,e);if(!k(r,n))continue;const s=C(n);if(s&&(!xe(s.rect,o)&&!l(t,s.rect)&&!c(t,u.id,s.rect)))return{laneId:s.laneId,anchor:s.anchor}}},"tryPool"),R=(0,i.K)((e,n,r=!1)=>{const i=b(e);for(const c of i){const e={midX:c.midX,midY:c.midY};if(n&&!k(c,e))continue;const i=C(e);if(i&&!xe(i.rect,o)&&!l(t,i.rect)&&!s(t,i.rect)&&(r||!a(u.id,i.rect)))return{laneId:i.laneId,anchor:i.anchor}}},"findLaneContainingFallback"),T=O(m)??(m.lengthe.labelId===t);o>=0?f[o]={labelId:t,rect:e}:f.push({labelId:t,rect:e})}}}(0,i.K)(ge,"markerClearanceRectFor"),(0,i.K)(pe,"normalizeRect"),(0,i.K)(xe,"labelOverlapsOwnMarker"),(0,i.K)(me,"anchorLabelsToPolyline");var ye=1e-6;function be(t,e){return t{const a=be(n,o);let c=0;const f=(0,i.K)(t=>{if(!t)return;const e=r.get(t);if(!e)return;const n="x"===s?e.w/2:e.h/2;n>c&&(c=n)},"consider");f(e.labelNodeId);for(const r of t){if(r===e)continue;if(r.isLayoutOnly)continue;const t=r.start,n=r.end;t&&n&&(be(t,n)===a&&f(r.labelNodeId))}return c>0?c+3:0},"labelClearanceFor");for(const i of t){if(i.isLayoutOnly)continue;if(!j(i.points,ye))continue;const e=st(i,n,ye);if(!e)continue;const{srcId:r,dstId:a,srcInfo:c,dstInfo:f,collinearX:d,collinearY:l}=e;if(d===l)continue;let u,h;if(d){const t=f.cy>c.cy;u={x:c.cx,y:t?c.rect.bottom:c.rect.top},h={x:f.cx,y:t?f.rect.top:f.rect.bottom}}else{const t=f.cx>c.cx;u={x:t?c.rect.right:c.rect.left,y:c.cy},h={x:t?f.rect.left:f.rect.right,y:f.cy}}if(it(u,h,o,[r,a],1))continue;const g=s(i,r,a,d?"x":"y"),p=g>4?g:4,x=[0,p,-p];for(const n of x){const e={...u},s={...h};if(d){if(e.x+=n,s.x+=n,e.x<=c.rect.left||e.x>=c.rect.right)continue;if(s.x<=f.rect.left||s.x>=f.rect.right)continue}else{if(e.y+=n,s.y+=n,e.y<=c.rect.top||e.y>=c.rect.bottom)continue;if(s.y<=f.rect.top||s.y>=f.rect.bottom)continue}if(!it(e,s,o,[r,a],1)&&!ft(e,s,t,i,{epsilon:ye})){i.points=[e,s];break}}}}function Ke(t,e){const n=.001,{realNodeRects:o,labelNodeRects:r}=ot(e.values()),s=(0,i.K)((t,e)=>D(e,n).map(n=>({...n,edge:t,interior:n.index>=1&&n.index<=e.length-3})),"segmentsFor"),a=(0,i.K)(()=>{const e=[];for(const n of t){if(n.isLayoutOnly)continue;const t=n.points;!t||t.length<2||e.push(...s(n,H(t)))}return e},"allSegments"),c=(0,i.K)((t,e)=>t.horizontal&&e.horizontal?A(t.a.x,t.b.x,e.a.x,e.b.x)>=8&&Math.abs(t.a.y-e.a.y)<7:!(!t.vertical||!e.vertical)&&(A(t.a.y,t.b.y,e.a.y,e.b.y)>=8&&Math.abs(t.a.x-e.a.x)<7),"hasCrowdedParallelTrack"),f=(0,i.K)((e,i)=>{const a=e.start,f=e.end,d=s(e,i);if(d.length!==i.length-1)return!1;const l=[a,f].filter(t=>Boolean(t)),u=e.labelNodeId?[e.labelNodeId]:[];for(const t of d){if(it(t.a,t.b,o,l,-2))return!1;if(it(t.a,t.b,r,u,-2))return!1}for(const o of t){if(o===e||o.isLayoutOnly)continue;const t=o.points;if(t&&!(t.length<2))for(const e of d)for(const r of s(o,H(t))){if(c(e,r))return!1;if(dt(e.a,e.b,r.a,r.b,n))return!1}}return!0},"candidateIsSafe"),d=(0,i.K)((t,e)=>{const n=H(t.edge.points??[]);if(n.length<4||t.index>=n.length-1)return;const o=n.map(t=>({...t}));if(t.horizontal)o[t.index].y+=e,o[t.index+1].y+=e;else{if(!t.vertical)return;o[t.index].x+=e,o[t.index+1].x+=e}return s(t.edge,o).length===o.length-1?o:void 0},"shiftedCandidate"),l=(0,i.K)((t,e)=>({x:t.x??(e.left+e.right)/2,y:t.y??(e.top+e.bottom)/2}),"nodeCenter"),u=(0,i.K)(t=>{const n=t.edge,o=H(n.points??[]);if(4!==o.length||1!==t.index)return;const r=n.start?e.get(n.start):void 0,s=n.end?e.get(n.end):void 0,i=r?U(r):void 0,a=s?U(s):void 0,c=o.slice(t.index+2);return r&&s&&i&&a&&0!==c.length?{sourceCenter:l(r,i),targetCenter:l(s,a),sourceRect:i,tail:c}:void 0},"sourceDetourContextFor"),h=(0,i.K)((t,e,o,r,s,i)=>{const a=r.y>=o.y,c=a?s.bottom:s.top,f=c+(a?20:-20);if(a&&t.b.y<=f+n||!a&&t.b.y>=f-n)return;const d=t.a.x+e;return H([{x:o.x,y:c},{x:o.x,y:f},{x:d,y:f},{x:d,y:t.b.y},...i],n)},"verticalSourceDetour"),g=(0,i.K)((t,e,o,r,s,i)=>{const a=r.x>=o.x,c=a?s.right:s.left,f=c+(a?20:-20);if(a&&t.b.x<=f+n||!a&&t.b.x>=f-n)return;const d=t.a.y+e;return H([{x:c,y:o.y},{x:f,y:o.y},{x:f,y:d},{x:t.b.x,y:d},...i],n)},"horizontalSourceDetour"),p=(0,i.K)((t,e)=>{const n=u(t);if(n)return t.vertical?h(t,e,n.sourceCenter,n.targetCenter,n.sourceRect,n.tail):t.horizontal?g(t,e,n.sourceCenter,n.targetCenter,n.sourceRect,n.tail):void 0},"sourceDetourCandidate"),x=[-7,7,-14,14,-21,21];for(let i=0;i<12;i++){const t=a();let e=!1;for(let n=0;nt.interior);for(const t of i){for(const n of x){const o=d(t,n);if(o&&f(t.edge,o)){t.edge.points=o,e=!0;break}const r=p(t,n);if(r&&f(t.edge,r)){t.edge.points=r,e=!0;break}}if(e)break}}if(!e)return}}function Ie(t,e,n,o){const r=e.x-t.x,s=e.y-t.y,i=o.x-n.x,a=o.y-n.y,c=r*a-s*i;if(Math.abs(c)<1e-10)return!1;const f=n.x-t.x,d=n.y-t.y,l=(f*a-d*i)/c,u=(f*s-d*r)/c,h=.01;return l>h&&l<.99&&u>h&&u<.99}function Se(t){const e=t.nodes??[],n=t.edges??[],o=[];if(!n.length||!e.length)return o;const r=rt(e),i=[];for(const s of n){if(s.isLayoutOnly)continue;const t=s.points;if(!t||t.length<2)continue;const e=s.start,n=s.end,a=s.labelNodeId,c=s.id??`${e}->${n}`;for(const s of r)if(s.nodeId!==e&&s.nodeId!==n&&(!a||s.nodeId!==a))for(let e=0;e0){const t=o.filter(t=>"edge-node-overlap"===t.type).length,e=o.filter(t=>"edge-edge-crossing"===t.type).length;s.R.warn(`[SWIMLANE_VALIDATE] ${o.length} issue(s) detected: ${t} edge-node overlap(s), ${e} edge crossing(s)`);for(const n of o)s.R.warn(`[SWIMLANE_VALIDATE] ${n.type}: ${n.detail}`)}return o}function we(t,e){const n=t.nodes??[],o=t.edges??[],r=n.filter(t=>!t.isGroup);if(("LR"===e||"RL"===e)&&r.length>0&&!Wt(t,e))return;if("BT"===e&&r.length>0&&!Vt(t))return;for(const i of o){if(i.isLayoutOnly)continue;const t=i.points;!t||t.length<2||(i.points=pt(gt(t)))}ue(o,n),Me(o,n),Qt(o,n);const s=new Map;for(const i of n)s.set(String(i.id),i);me(o,s),Mt(o,s),Ut(o,s),Ke(o,s),ne(o,s),oe(o,s),re(o,s),ae(o,s);const a=(0,i.K)(()=>{de(o,s),ce(o,s),fe(o,s),me(o,s),zt(o,s),re(o,s),me(o,s),zt(o,s)},"finalizeRenderedEdges");a(),Ke(o,s),a(),se(o,s),ie(o,s),se(o,s),ie(o,s)}function ve(t){const e=new Map(t.nodeById),n=new Set,o=[];for(const r of t.edges){if(!e.has(r.src)||!e.has(r.dst))continue;const t=`${r.id}:${r.src}->${r.dst}`;n.has(t)||(n.add(t),o.push(r))}return{nodes:[...e.keys()],edges:o,layout:t.layout,nodeById:e}}function Ce(t,e){return t.edges.filter(t=>t.dst===e)}function Le(t){const e=new Map;for(const n of t.nodes)e.set(n,[]);for(const n of t.edges)e.get(n.src).push(n.dst);return e}function ke(t){const e=Le(t);for(const n of e.values())n.sort((t,e)=>t.localeCompare(e));return e}function Oe(t){const e=new Map;for(const n of t.nodes)e.set(n,0);for(const n of t.edges)e.set(n.dst,(e.get(n.dst)??0)+1);return e}function Re(t){return[...t.entries()].filter(([,t])=>0===t).map(([t])=>t).sort((t,e)=>t.localeCompare(e))}function Te(t,e=()=>!0){const n=new Map,o=new Map;for(const r of t.nodes)n.set(r,[]),o.set(r,[]);for(const r of t.edges)e(r)&&(o.get(r.src).push(r.dst),n.get(r.dst).push(r.src));return{preds:n,succs:o}}function $e(t,e,n,o){let r=0;for(const i of t.nodes)o?.skipGroups&&t.nodeById.get(i)?.isGroup||(r=Math.max(r,n[i]??0));const s=Array.from({length:r+1},()=>[]);for(const i of e)o?.skipGroups&&t.nodeById.get(i)?.isGroup||s[Math.max(0,n[i]??0)].push(i);return s}function Ne(t){const e=Oe(t),n=Re(e),o=[],r=ke(t);for(;n.length;){const t=n.shift();o.push(t);for(const o of r.get(t)??[])if(e.set(o,(e.get(o)??0)-1),0===(e.get(o)??0)){let t=0;for(;t{if(r-o<=1)return 0;const s=o+r>>1;let i=n(o,s)+n(s,r),a=o,c=s,f=o;for(;a=r||at.dst===e.dst?t.id.localeCompare(e.id):t.dst.localeCompare(e.dst));const o=Object.create(null);for(const i of e.nodes)o[i]=0;const r=[],s=(0,i.K)(t=>{o[t]=1;for(const e of n.get(t)??[]){const t=e.dst;0===o[t]?s(t):1===o[t]&&r.push(e)}o[t]=2},"dfs"),a=[...e.nodes].sort((t,e)=>t.localeCompare(e));for(const i of a)0===o[i]&&s(i);const c=new Set(r.map(t=>`${t.id}:${t.src}->${t.dst}`)),f=e.edges.map(t=>c.has(`${t.id}:${t.src}->${t.dst}`)?{id:t.id,src:t.dst,dst:t.src,weight:t.weight,ref:t.ref}:t);return{acyclic:{nodes:[...e.nodes],edges:f,layout:e.layout,nodeById:new Map(e.nodeById)},reversed:r}}function Ye(t){const e=new Map,n=(0,i.K)(o=>{if(e.has(o))return e.get(o);const r=t.nodeById.get(o);if(!r)return e.set(o,null),null;const s=r.parentId;if(!s)return e.set(o,null),null;const i=n(s)??s;return e.set(o,i),i},"resolve");for(const o of t.nodes)n(o);return e}function Xe(t){const e=Ye(t);return t=>e.get(t)??null}function ze(t){const e=[];for(const n of t.layout.nodes??[])n.isGroup&&!n.parentId&&e.push(n.id);return[...new Set(e)].reverse()}function Ae(t,e){const n=ze(t);if(!e||0===e.length)return n;const o=new Set(n),r=new Set,s=[];for(const i of e)o.has(i)&&!r.has(i)&&(r.add(i),s.push(i));for(const i of n)r.has(i)||s.push(i);return s}(0,i.K)(be,"pairKey"),(0,i.K)(Me,"straightenCollinearSiblingDetours"),(0,i.K)(Ke,"nudgeSharedInteriorSubpaths"),(0,i.K)(Ie,"segmentsIntersect"),(0,i.K)(Se,"validateSwimlanesLayout"),(0,i.K)(we,"postProcessSwimlaneLayout"),(0,i.K)(ve,"normalizeGraph"),(0,i.K)(Ce,"incoming"),(0,i.K)(Le,"buildSuccessorMap"),(0,i.K)(ke,"buildSortedSuccessorMap"),(0,i.K)(Oe,"buildInDegreeMap"),(0,i.K)(Re,"sortedZeroInDegreeNodes"),(0,i.K)(Te,"buildPredecessorSuccessorMaps"),(0,i.K)($e,"buildLayersFromRanks"),(0,i.K)(Ne,"topoSortIfAcyclic"),(0,i.K)(Be,"buildLayerIndex"),(0,i.K)(Fe,"countInversions"),(0,i.K)(Ee,"removeCycles_DFS"),(0,i.K)(Ye,"buildTopLaneMap"),(0,i.K)(Xe,"createTopLaneResolver"),(0,i.K)(ze,"buildTopLaneOrder"),(0,i.K)(Ae,"resolveTopLaneOrder");var Pe=8,De=4,Ge=!0,He=100,je=40;function _e(t,e){const n=ve(t),o=e?.laneOf??(()=>null),r=e?.rankHint,{preds:s}=Te(n);for(const i of s.values())i.sort((t,e)=>t.localeCompare(e));const a=Ne(n)??[...n.nodes].sort((t,e)=>t.localeCompare(e)),c=new Map;for(const[i,I]of a.entries())c.set(I,i);const f=new Map,d=new Map;for(const i of n.nodes)d.set(i,[]);for(const i of a){const t=(s.get(i)??[]).filter(t=>f.has(t));if(t.length>0){const e=Ve(i,t,{laneOf:o,rankHint:r,topoIndex:c});f.set(i,e),d.get(e).push(i)}else f.has(i)||f.set(i,null)}for(const i of n.nodes)f.has(i)||f.set(i,null);const l=new Set;for(const i of n.nodes)null===(f.get(i)??null)&&l.add(i);const u=[...l].sort((t,e)=>{const n=c.get(t)??0,o=c.get(e)??0;return n===o?t.localeCompare(e):n-o}),h=We(n),g=new Map;for(const[i,I]of h.entries())g.set(i,[...I].sort((t,e)=>t.localeCompare(e)));const p=qe(g),x=Je(g),m=new Map;for(const i of n.nodes)m.set(i,[]);for(const i of x)for(const t of i.nodes){const e=m.get(t);e?e.push(i.id):m.set(t,[i.id])}const y=[],b=[],M=new Set,K=(0,i.K)(t=>{if(!M.has(t)){M.add(t),y.push(t);for(const e of d.get(t)??[])K(e);b.push(t)}},"walk");for(const i of u)K(i);for(const i of a)K(i);return{parent:f,children:d,roots:u,componentOf:p,blocks:x,nodeBlocks:m,adjacency:g,preorder:y,postorder:b,topologicalOrder:a}}function Ve(t,e,n){const o=n.laneOf(t);return[...e].sort((t,e)=>{const r=n.laneOf(t),s=n.laneOf(e),i=null!=r&&r===o;if(i!==(null!=s&&s===o))return i?-1:1;const a=n.rankHint?.[t],c=n.rankHint?.[e];if(null!=a&&null!=c&&a!==c)return c-a;const f=n.topoIndex.get(t)??0,d=n.topoIndex.get(e)??0;return f!==d?f-d:t.localeCompare(e)})[0]}function We(t){const e=new Map;for(const n of t.nodes)e.set(n,new Set);for(const n of t.edges)e.get(n.src).add(n.dst),e.get(n.dst).add(n.src);return e}function qe(t){const e=new Map;let n=0;for(const o of t.keys()){if(e.has(o))continue;const r=[o];for(;r.length>0;){const o=r.pop();if(!e.has(o)){e.set(o,n);for(const n of t.get(o)??[])e.has(n)||r.push(n)}}n++}return e}function Je(t){const e=new Map,n=new Map,o=[],r=[];let s=0;const a=(0,i.K)((i,c)=>{e.set(i,++s),n.set(i,s);for(const f of t.get(i)??[])f!==c&&(e.has(f)?(e.get(f)??0)<(e.get(i)??0)&&(o.push([i,f]),n.set(i,Math.min(n.get(i)??s,e.get(f)??s))):(o.push([i,f]),a(f,i),n.set(i,Math.min(n.get(i)??s,n.get(f)??s)),(n.get(f)??0)>=(e.get(i)??0)&&r.push(Qe(i,f,o,r.length))))},"visit");for(const i of t.keys())e.has(i)||a(i,null);return r}function Qe(t,e,n,o){const r=[],s=new Set;for(;n.length>0;){const o=n.pop();if(r.push(o),s.add(o[0]),s.add(o[1]),o[0]===t&&o[1]===e||o[0]===e&&o[1]===t)break}return{id:o,edges:r,nodes:[...s]}}function Ue(t,e,n){const o=[...t.nodes],r=new Map;for(const[i,b]of o.entries())r.set(b,i);const s=o.length,a=new Array(s).fill(-1),c=new Array(s).fill(0),f=[],d=new Set;for(const i of o){const t=n.parent.get(i)??null,e=r.get(i);null!=e&&(null==t&&(a[e]=-1,c[e]=0,d.has(i)||(d.add(i),f.push(i))))}for(;f.length>0;){const t=f.shift(),e=r.get(t);if(null==e)continue;const o=n.children.get(t)??[];for(const n of o){if(d.has(n))continue;const t=r.get(n);null!=t&&(a[t]=e,c[t]=c[e]+1,d.add(n),f.push(n))}}for(const i of o){if(d.has(i))continue;const t=r.get(i);null!=t&&(a[t]=-1,c[t]=0,d.add(i))}const l=Math.max(1,Math.ceil(Math.log2(Math.max(1,s)))+1),u=Array.from({length:l},()=>new Array(s).fill(-1));for(let i=0;i{if(-1===t||-1===e)return-1;c[t]>o&1&&-1===(t=u[o][t]))return-1;if(t===e)return t;for(let o=l-1;o>=0;o--){const n=u[o][t],r=u[o][e];-1!==n&&-1!==r&&(n!==r&&(t=n,e=r))}return u[0][t]},"lcaIndex"),g=Array.from({length:s},()=>new Map);for(const i of t.edges){let t=i.src,n=i.dst,o=e[t],s=e[n];if(null==o||null==s)continue;if(o>s&&([t,n]=[n,t],[o,s]=[s,o]),null==o||null==s||o===s)continue;const a=r.get(t),c=r.get(n);if(null==a||null==c)continue;const f=h(a,c);if(-1===f)continue;const d=g[f];for(let e=o;e{if(0!==e.size)for(const[n,o]of e)t.set(n,(t.get(n)??0)+o)},"mergeInto"),m=new Set,y=(0,i.K)(t=>{const o=r.get(t);m.add(t);const s=null==o?void 0:g[o],i=s?new Map(s):new Map,a=n.children.get(t)??[];for(const n of a){const o=y(n),r=e[t];if(null!=r){let s=p.get(t);s||(s=new Map,p.set(t,s));let i=o.get(r)??0;const a=e[n];null!=a&&a>r&&(i+=1),s.set(n,i)}x(i,o)}return i},"dfs");for(const i of n.roots)m.has(i)||y(i);for(const i of o)m.has(i)||y(i);return p}function Ze(t,e,n){const o=new Map,r=(0,i.K)(t=>{let s=n[t]??0;const i=[...e.get(t)??[]];i.sort(tn(n));for(const e of i){r(e);const t=o.get(e);null!=t&&(s=Math.min(s,t))}o.set(t,s)},"annotate");for(const s of t)r(s);return o}function tn(t){return(e,n)=>{const o=t[e]??0,r=t[n]??0;return o===r?e.localeCompare(n):o-r}}function en(t,e,n,o){let r=0;for(const i of e){const t=n[i]??0;t>r&&(r=t)}const s=Array.from({length:r+1},()=>[]),a=new Set,c=(0,i.K)(t=>{if(a.has(t))return;a.add(t);const e=n[t]??0;s[e]||(s[e]=[]),s[e].push(t);for(const n of o(t))c(n)},"emit");for(const i of t)c(i);for(const i of e)if(!a.has(i)){const t=n[i]??0;s[t]||(s[t]=[]),s[t].push(i),a.add(i)}return s}function nn(t){const e=[];for(const n of t){const t=new Set,o=[];for(const e of n)t.has(e)||(t.add(e),o.push(e));e.push(o)}return e}function on(t,e,n,o){return r=>{const s=t.get(r)??[];if(0===s.length)return[];const i=e[r]??0,a=[],c=[],f=n.get(r);for(const t of s){const e=o.get(t)??i;e>i?a.push({child:t,min:e}):c.push(t)}return a.sort((t,e)=>t.min===e.min?t.child.localeCompare(e.child):t.min-e.min),c.sort((t,e)=>{const n=f?.get(t)??0,r=f?.get(e)??0;if(n!==r)return n-r;const s=o.get(t)??i,a=o.get(e)??i;return s!==a?s-a:t.localeCompare(e)}),[...a.map(t=>t.child),...c]}}function rn(t,e,n){const o=_e(t,{rankHint:e,laneOf:n}),{children:r,roots:s}=o;for(const d of t.nodes)r.has(d)||r.set(d,[]);const i=Ue(t,e,o),a=[...s].sort(tn(e)),c=on(r,e,i,Ze(a,r,e));let f=en(a,t.nodes,e,c);return f=nn(f),f}function sn(t,e,n){const o=new Set(t),r=new Set(e),s=Be(e),i=[];for(const a of n)o.has(a.src)&&r.has(a.dst)&&i.push(s.get(a.dst));return Fe(i)}function an(t,e,n){const o=[];for(const s of e){const t=n[s.src],e=n[s.dst];if(null==t||null==e||t===e)continue;let r=s.src,i=s.dst,a=t,c=e;t>e&&(r=s.dst,i=s.src,a=e,c=t);for(let n=a;n(n[e]??0)-(n[t]??0));for(const a of i){const i=n[a]??0;if(0===i)continue;let c=0;for(const t of o.get(a)??[])c=Math.max(c,(n[t]??0)+1);if(c>=i)continue;const f=i;n[a]=c;const d=an(rn(t,n,r),t.edges,n);d(e[t]??0)-(e[n]??0)||t.localeCompare(n));for(const r of o){const o=n(r);if(!o)continue;const s=t.edges.filter(t=>t.src===r);if(0===s.length)continue;let i=!1,a=0;for(const t of s){const e=n(t.dst);null==e||e===o?i=!0:a++}if(0===a||i)continue;let c=0,f=!1;for(const e of t.edges){if(e.dst!==r)continue;const t=n(e.src);t&&(t===o?f=!0:c++)}if(c>0||!f)continue;const d=e[r]??0,l=d+a;let u=0;for(const n of t.edges)n.dst===r&&(u=Math.max(u,(e[n.src]??0)+1));const h=Math.max(d,u,l);h!==d&&(e[r]=h)}}function dn(t,e){const n=ve(t),o=Ne(n)??[...n.nodes].sort(),r=e?.compactSingleInput??!1,s=Xe(n);let i=Object.create(null);for(const a of o){const t=Ce(n,a),o=e?.ignoreCrossLaneEdges?t.filter(t=>{const e=s(t.src),n=s(a);return!e||!n||e===n}):t;if(0===o.length)i[a]=0;else if(r&&1===o.length){const t=o[0].src,e=s(t),n=s(a);i[a]=e!==n?i[t]??0:(i[t]??0)+1}else{let t=-1/0;for(const e of o)t=Math.max(t,(i[e.src]??0)+1);i[a]=t===-1/0?0:t}}e?.optimizeRanksByCrossings&&(i=cn(n,i)),e?.ignoreCrossLaneEdges&&fn(n,i);return{layers:rn(n,i,s),rankOf:i,dummy:new Set}}function ln(t,e){const n=ve(t),o={...dn(n,{compactSingleInput:e?.compactSingleInput,ignoreCrossLaneEdges:e?.ignoreCrossLaneEdges,optimizeRanksByCrossings:e?.optimizeRanksByCrossings}).rankOf},r=Xe(n),{preds:s,succs:a}=Te(n,t=>{if(e?.ignoreCrossLaneEdges){const e=r(t.src),n=r(t.dst);if(e&&n&&e!==n)return!1}return!0}),c=Ne(n)??[...n.nodes],f=[...c].reverse(),d=(0,i.K)((t,e)=>{let n=0;for(const a of s.get(t)??[])n=Math.max(n,(o[a]??0)+1);let r=Number.POSITIVE_INFINITY;const i=a.get(t)??[];return i.length>0&&(r=Math.min(...i.map(t=>(o[t]??0)-1))),Number.isFinite(r)||(r=Math.max(n,e)),Math.min(Math.max(e,n),r)},"clampFeasible"),l=Pe,u=(0,i.K)(t=>{let e=!1;for(const n of t){const t=s.get(n)??[],r=a.get(n)??[];if(0===t.length&&0===r.length)continue;const i=t.length>0?t.reduce((t,e)=>t+(o[e]??0)+1,0)/t.length:o[n]??0,c=r.length>0?r.reduce((t,e)=>t+(o[e]??0)-1,0)/r.length:o[n]??0,f=Math.round((i+c)/2),l=d(n,f);l!==o[n]&&(o[n]=l,e=!0)}return e},"relaxOrder");for(let i=0;i0){const e=Math.min(...t.map(t=>(o[t]??0)-1));(o[i]??0)>e&&(o[i]=e)}}return{layers:$e(n,c,o),rankOf:o,dummy:new Set}}function un(t){const e=Oe(t),n=ke(t);let o=Re(e);const r=[];for(;o.length>0;){const t=[];for(const s of o){r.push(s);for(const o of n.get(s)??[])e.set(o,(e.get(o)??0)-1),0===(e.get(o)??0)&&t.push(o)}o=t.sort((t,e)=>t.localeCompare(e))}return r.length===t.nodes.length?r:null}function hn(t,e){const n=ve(t),o="LR"===e?.direction?un(n)??[...n.nodes].sort():Ne(n)??[...n.nodes].sort(),r=Xe(n),s=(0,i.K)(t=>r(t)??t,"laneOf"),a=Object.create(null),c=new Map,f=(0,i.K)((t,n)=>e?.ignoreCrossLaneEdges??!0?s(t)===s(n)?1:0:1,"edgeWeight");for(const i of o){const t=n.nodeById.get(i);if(t?.isGroup)continue;const e=Ce(n,i);let o=0;if(e.length>0)for(const n of e){const t=n.src,e=a[t]??0;o=Math.max(o,e+f(t,i))}const r=s(i),d=c.get(r)??0,l=Math.max(o,d);a[i]=l,c.set(r,l+1)}return{layers:$e(n,o,a,{skipGroups:!0}),rankOf:a,dummy:new Set}}function gn(t,e){const n=ve(e),{rankOf:o}=t,r=t.layers.map(t=>[...t]),s=new Set(t.dummy?[...t.dummy]:[]);let a=0;const c=new Map(n.nodeById),f=(0,i.K)(t=>{const e="placeholder-"+a++,n={id:e,isGroup:!1,isDummy:!0,width:0,height:0};for(c.set(e,n),s.add(e);r.length<=t;)r.push([]);return r[t].push(e),o[e]=t,e},"addDummyAt"),d=[...n.edges].sort((t,e)=>t.id===e.id?t.src===e.src?t.dst.localeCompare(e.dst):t.src.localeCompare(e.src):t.id.localeCompare(e.id)),l=[];for(const i of d){const t=o[i.src]??0,e=o[i.dst]??0;if(e-t<=1){l.push(i);continue}let n=i.src;for(let o=t+1,s=0;o!n.nodes.includes(t))],edges:l,layout:n.layout,nodeById:c};return{layering:{layers:r,rankOf:o,dummy:s},graphWithDummies:u}}function pn(t){const e=t.length;if(0===e)return Number.POSITIVE_INFINITY;const n=[...t].sort((t,e)=>t-e);return e%2==1?n[(e-1)/2]:.5*(n[e/2-1]+n[e/2])}function xn(t){if(0===t.length)return Number.POSITIVE_INFINITY;return t.reduce((t,e)=>t+e,0)/t.length}function mn(t,e,n,o){const r=new Map;for(const s of t)r.set(s,[]);for(const s of n)"down"===o?e.has(s.src)&&r.has(s.dst)&&r.get(s.dst).push(e.get(s.src)):e.has(s.dst)&&r.has(s.src)&&r.get(s.src).push(e.get(s.dst));return r}function yn(t,e,n){const o=n.get(t)??0,r=n.get(e)??0;return o!==r?o-r:t.localeCompare(e)}function bn(t,e,n){const o=new Set(t),r=new Set(e),s=Be(t),i=Be(e),a=[];for(const c of n)o.has(c.src)&&r.has(c.dst)&&a.push({u:s.get(c.src),v:i.get(c.dst)});a.sort((t,e)=>t.u===e.u?t.v-e.v:t.u-e.u);return Fe(a.map(t=>t.v))}function Mn(t,e,n){return[...t].sort((t,o)=>{const r=pn(e.get(t)??[]),s=pn(e.get(o)??[]);return r===s?yn(t,o,n):isFinite(r)?isFinite(s)?r-s:-1:1})}function Kn(t,e,n,o,r,s){const i=Be(t),a=Be(e),c=mn(e,i,n,o);if(!r||!s||0===s.length)return Mn(e,c,a);const f=new Map;for(const u of e){const t=r(u),e=f.get(t)??[];e.push(u),f.set(t,e)}const d=[];for(const u of s){const t=f.get(u);if(!t||0===t.length)continue;const e=Mn(t,c,a);d.push(...e)}const l=f.get(null);if(l&&l.length>0){const t=Mn(l,c,a);for(const e of t){const t=xn(c.get(e)??[]);let n=d.length;if(isFinite(t))for(const[e,o]of d.entries()){if(ta.has(t.src)&&c.has(t.dst)),l=f?n.filter(t=>c.has(t.src)&&f.has(t.dst)):void 0,u=(0,i.K)(e=>{let n=bn(t,e,d);return l&&o&&(n+=bn(e,o,l)),n},"crossingScore"),h=r?new Map:null;if(r&&h)for(const i of e)h.set(i,r(i));let g=!0,p=u(s);for(;g;){g=!1;for(let t=0;t+1[...t]),r=e.edges,s=Xe(e),i=Ae(e,n?.laneOrder);for(let a=0;a<3;a++){for(let t=1;t=0;t--)o[t]=Kn(o[t+1],o[t],r,"up",s,i),o[t]=In(o[t+1],o[t],r,o[t-1],s)}return{layers:o}}function wn(t,e,n){const o=n?.layerGap??He,r=n?.nodeGap??je,s=n?.laneGap??2*r,a=n?.direction??"TB",c="LR"===a||"RL"===a,f=t.layers,d=Object.create(null),l=Object.create(null),u=(0,i.K)(t=>e.nodeById.get(t),"getNode"),h=(0,i.K)(t=>u(t)?.width??0,"getWidth"),g=(0,i.K)(t=>u(t)?.height??0,"getHeight"),p=Xe(e),x=Ae(e,n?.laneOrder),m=f.map(t=>t.reduce((t,e)=>Math.max(t,g(e)),0)),y=[];if(c)for(let i=0;i+1Math.max(t,h(e)),0),e=f[i+1].reduce((t,e)=>Math.max(t,h(e)),0),n=m[i]/2+m[i+1]/2,r=(t+e)/2,s=Math.max(0,r-n-o);y.push(s)}const b=new Set;for(const i of f)for(const t of i)b.add(p(t));const M=b.has(null),K=x.filter(t=>b.has(t)),I=[...M?[null]:[],...K],S=Object.create(null);for(const i of K)S[i]=0;M&&(S.null=0);for(const i of f){const t=Object.create(null),e=[];for(const n of i){const o=p(n);null===o?e.push(n):(t[o]||=[]).push(n)}for(const[n,o]of Object.entries(t)){const t=o.reduce((t,e)=>t+h(e),0)+r*Math.max(0,o.length-1);S[n]=Math.max(S[n]??0,t)}if(M&&e.length){const t=e.reduce((t,e)=>t+h(e),0)+r*Math.max(0,e.length-1);S.null=Math.max(S.null??0,t)}}const w=new Map;{const t=I.map(t=>(null===t?S.null:S[t])??0);let e=-(t.reduce((t,e)=>t+e,0)+s*Math.max(0,I.length-1))/2;for(let n=0;nh(t));let n=s-(e.reduce((t,e)=>t+e,0)+r*(o.length-1))/2;for(const[s,i]of o.entries()){const o=e[s];d[i]=n+o/2,l[i]=v+t/2,n+=o+r}}}v+=t+o+(y[i]??0)}const C=new Map;for(const i of e.edges){const t=i.ref.id;C.has(t)||C.set(t,[]),C.get(t).push(i)}for(const[,i]of C){if(0===i.length)continue;const t=i[0].ref,n=t.start,o=t.end;if(null==n||null==o)continue;const r=Math.round(((d[n]??0)+(d[o]??0))/2),s=new Set;for(const e of i)s.add(e.src),s.add(e.dst);for(const i of s){if(i===n||i===o)continue;const t=e.nodeById.get(i);t?.isDummy&&(d[i]=r)}}return{x:d,y:l}}(0,i.K)(_e,"buildDrivingTree"),(0,i.K)(Ve,"chooseParent"),(0,i.K)(We,"buildAdjacency"),(0,i.K)(qe,"assignComponents"),(0,i.K)(Je,"computeBlocks"),(0,i.K)(Qe,"popBlock"),(0,i.K)(Ue,"computeSubtreeCrossCounts"),(0,i.K)(Ze,"annotateMinimumLayers"),(0,i.K)(tn,"compareByRankThenId"),(0,i.K)(en,"emitNodesInTreeOrder"),(0,i.K)(nn,"deduplicateLayers"),(0,i.K)(on,"createChildOrderer"),(0,i.K)(rn,"buildMultitreeLayerOrder"),(0,i.K)(sn,"countCrossingsBetweenAdjacent"),(0,i.K)(an,"totalCrossings"),(0,i.K)(cn,"optimizeRanksByCrossings"),(0,i.K)(fn,"adjustCrossLaneSources"),(0,i.K)(dn,"assignLayers_LongestPath"),(0,i.K)(ln,"assignLayers_Gravity"),(0,i.K)(un,"topoSortByGenerationIfAcyclic"),(0,i.K)(hn,"assignLayers_LaneAwareCompact"),(0,i.K)(gn,"makeProperLayering"),(0,i.K)(pn,"median"),(0,i.K)(xn,"barycenter"),(0,i.K)(mn,"neighborPositionsFor"),(0,i.K)(yn,"currentOrderTieBreak"),(0,i.K)(bn,"countCrossingsBetweenAdjacent"),(0,i.K)(Mn,"sortByHeuristic"),(0,i.K)(Kn,"reorderLayer"),(0,i.K)(In,"transposeImprove"),(0,i.K)(Sn,"orderLayers"),(0,i.K)(wn,"assignCoordinates");function vn(t){let e=2166136261;for(let n=0;n>>0}function Cn(t){let e=t>>>0;return()=>{e+=1831565813;let t=e;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296}}function Ln(t,e){const n=[...t],o=Cn(e);for(let r=n.length-1;r>0;r--){const t=Math.floor(o()*(r+1));[n[r],n[t]]=[n[t],n[r]]}return n}function kn(t,e){let n=0;for(const[o,r]of t.entries())n+=Math.abs(o-(e.get(r)??o));return n}function On(t,e){const n=new Map;for(const[r,s]of t.entries())n.set(s,r);let o=0;for(const{a:r,b:s,weight:i}of e){const t=n.get(r),e=n.get(s);null!=t&&null!=e&&(o+=i*Math.abs(t-e))}return o}function Rn(t){const e=ze(t);if(e.length<2)return[];const n=new Map(e.map((t,e)=>[t,e])),o=Xe(t),r=new Map;for(const s of t.layout.edges??[]){if(s.isLayoutOnly)continue;const e="string"==typeof s.start?s.start:void 0,i="string"==typeof s.end?s.end:void 0;if(!(e&&i&&t.nodeById.has(e)&&t.nodeById.has(i)))continue;const a=o(e),c=o(i);if(!a||!c||a===c)continue;const f=n.get(a),d=n.get(c);if(null==f||null==d)continue;const[l,u]=f<=d?[a,c]:[c,a],h=`${l}\0${u}`,g=r.get(h);g?g.weight++:r.set(h,{a:l,b:u,weight:1})}return[...r.values()]}function Tn(t,e,n){const o=[...t];let r=On(o,e),s=!0,i=0;const a=Math.max(1,o.length);for(;s&&it.a===e.a?t.b.localeCompare(e.b):t.a.localeCompare(e.a)).map(({a:t,b:e,weight:n})=>`${t}:${e}:${n}`).join("|");return vn(`${t.join("|")}#${o}#${n}`)}function Bn(t,e={}){const n=ze(t);if(n.length<2)return n;const o=Rn(t);if(0===o.length)return n;const r=new Map(n.map((t,e)=>[t,e]));let s=Tn(n,o,r);const i=Math.max(0,e.restarts??8);for(let a=0;aEn&&3*c>=a?i>0?"bottom":"top":a>En?s>0?"right":"left":n}function Pn(t,e){return Math.abs(t.to-e.from)t.isGroup&&!t.parentId);for(const nt of d){const t={id:nt.id},e=(0,i.K)(o=>{a.set(o.id,t),n.filter(t=>t.parentId===o.id).forEach(e)},"assignLane");e(nt)}const l=n.filter(t=>!t.isGroup&&!t.isEdgeLabel).map(t=>{const e=t.width??10,n=t.height??10,o=t.x??0,r=t.y??0;return{nodeId:t.id,minX:o-e/2-8,maxX:o+e/2+8,minY:r-n/2-8,maxY:r+n/2+8,visualXHalfExtent:f?n/2+8:e/2+8}}),u=(0,i.K)((t,e,n,o)=>{let r=c.find(n=>n.orientation===t&&Math.abs(n.coord-e)<1);return r||(r={id:`pipe-${t}-${e.toFixed(0)}`,orientation:t,coord:e,spanMin:n,spanMax:o,tracks:[]},c.push(r)),r.spanMin=Math.min(r.spanMin,n),r.spanMax=Math.max(r.spanMax,o),r},"getOrAddPipe"),h=(0,i.K)((t,e)=>{const n=t.width??10,o=t.height??10,r=t.x??0,s=t.y??0;switch(e){case"top":return{x:r,y:s-o/2};case"bottom":return{x:r,y:s+o/2};case"left":return{x:r-n/2,y:s};case"right":return{x:r+n/2,y:s}}},"portForSide"),g=(0,i.K)((t,e,n)=>h(t,An(t,e,n?"bottom":"top")),"getOrthogonalPort"),p=[],x=[],m=new Set,y=(0,i.K)((t,e,n)=>{if(0===p.length)return 0;const o=Math.abs(e.y-n.y)i||e.from-En<=o&&e.to+En>=o&&(s+=1e3))}else if(r){const o=e.x,r=Math.min(e.y,n.y)-En,i=Math.max(e.y,n.y)+En;if(i<=r)return 0;for(const e of p)e.edgeIndex!==t&&"horizontal"===e.orientation&&(e.pipe.coordi||e.from-En<=o&&e.to+En>=o&&(s+=1e3))}return s},"crossingPenalty"),b=r.map((t,e)=>{if(!t.start||!t.end)return{idx:e,crossLane:0,dx:0,dy:0};const n=s.get(t.start),o=s.get(t.end),r=a.get(t.start),i=a.get(t.end);return{idx:e,crossLane:r&&i&&r.id!==i.id?1:0,dx:n&&o?Math.abs((o.x??0)-(n.x??0)):0,dy:n&&o?Math.abs((o.y??0)-(n.y??0)):0}}).sort((t,e)=>{if(t.crossLane!==e.crossLane)return e.crossLane-t.crossLane;const n=t.dx+t.dy,o=e.dx+e.dy;return Math.abs(n-o)>1?n-o:t.idx-e.idx}).map(t=>t.idx),M=(0,i.K)((t,e,n,o)=>{const r=Math.min(t.x,e.x),s=Math.max(t.x,e.x),i=Math.min(t.y,e.y),a=Math.max(t.y,e.y);return!!l.find(c=>(!n||c.nodeId!==n)&&((!o||c.nodeId!==o)&&(Math.abs(t.x-e.x)>En?c.minYt.y&&c.maxX>r&&c.minXt.x&&c.maxY>i&&c.minYAn(t,e,"bottom"),"determineSide"),w=new Map;for(const[i,nt]of r.entries()){if(!nt.start||!nt.end||nt.start===nt.end)continue;if(nt.points&&nt.points.length>0)continue;const t=s.get(nt.start),e=s.get(nt.end);if(!t||!e)continue;const n=(e.x??0)-(t.x??0),o=(e.y??0)-(t.y??0);w.set(i,{edgeIdx:i,srcId:nt.start,dstId:nt.end,srcSide:S(t,{x:e.x??0,y:e.y??0}),dstSide:S(e,{x:t.x??0,y:t.y??0}),absDx:Math.abs(n),absDy:Math.abs(o),dxSign:Math.sign(n),dySign:Math.sign(o)})}const v=(0,i.K)(t=>"top"===t.srcSide||"bottom"===t.srcSide?0===t.absDx?1/0:t.absDy/t.absDx:0===t.absDy?1/0:t.absDx/t.absDy,"preferenceStrength"),C=(0,i.K)(t=>"top"===t.srcSide||"bottom"===t.srcSide?t.dxSign>=0?"right":"left":t.dySign>=0?"bottom":"top","secondarySide"),L=new Map;for(const i of w.values()){const t=`${i.srcId}:${i.srcSide}`;L.has(t)||L.set(t,[]),L.get(t).push(i)}const k=new Map,O=(0,i.K)((t,e)=>`${t}:${e}`,"loadKey");for(const i of w.values())k.set(O(i.srcId,i.srcSide),(k.get(O(i.srcId,i.srcSide))??0)+1),k.set(O(i.dstId,i.dstSide),(k.get(O(i.dstId,i.dstSide))??0)+1);for(const i of L.values())if(!(i.length<2)){i.sort((t,e)=>{const n=v(t),o=v(e);return Math.abs(n-o)>1e-9?o-n:t.edgeIdx-e.edgeIdx});for(let t=1;t=o||(k.set(O(e.srcId,e.srcSide),o-1),k.set(O(e.srcId,n),r+1),e.srcSide=n)}}const R=(0,i.K)(t=>{const e=t?.shape;return"question"===e||"diamond"===e},"isDiamondNode"),T=new Map;for(const i of w.values())T.has(i.dstId)||T.set(i.dstId,new Set),T.get(i.dstId).add(i.dstSide);for(const i of w.values()){if(!R(s.get(i.srcId)))continue;const t=T.get(i.srcId);if(!t?.has(i.srcSide))continue;const e=C(i);if(t.has(e)||(k.get(O(i.srcId,e))??0)>0)continue;const n=k.get(O(i.srcId,i.srcSide))??0;k.set(O(i.srcId,i.srcSide),Math.max(0,n-1)),k.set(O(i.srcId,e),1),i.srcSide=e}for(const i of w.values()){const{edgeIdx:t,srcId:e,dstId:n,srcSide:o,dstSide:r}=i,a=s.get(e),c=s.get(n),f=`${e}:${o}:src`,d="top"===o||"bottom"===o?c.x??0:c.y??0;K.has(f)||K.set(f,[]),K.get(f).push({edgeIdx:t,oppositeCoord:d});const l=`${n}:${r}:dst`,u="top"===r||"bottom"===r?a.x??0:a.y??0;K.has(l)||K.set(l,[]),K.get(l).push({edgeIdx:t,oppositeCoord:u})}const $=new Map;for(const[i,nt]of K){if(nt.length<2)continue;nt.sort((t,e)=>t.oppositeCoord-e.oppositeCoord);const t=i.split(":"),e=t.slice(0,-2).join(":"),n=t[t.length-2],o=t[t.length-1],r=s.get(e);if(!r)continue;const a="left"===n||"right"===n?r.height??10:r.width??10,c=r.shape,f="question"===c||"diamond"===c?.3*a:a,d=20,l=Math.min(d,Math.max(8,f/(nt.length+1))),u=-(l*(nt.length-1))/2;for(const[s,i]of nt.entries()){const t=u+s*l,e=`${i.edgeIdx}:${o}`;$.set(e,t)}}const N=(0,i.K)(t=>Boolean(r[t]?.labelNodeId),"edgeHasLabelNode"),B=(0,i.K)((t,e)=>!!t&&((K.get(`${t}:${e}:src`)??[]).some(({edgeIdx:t})=>N(t))||(K.get(`${t}:${e}:dst`)??[]).some(({edgeIdx:t})=>N(t))),"faceHasLabelNode"),F=(0,i.K)((t,e,n)=>"top"===e||"bottom"===e?{x:t.x+n,y:t.y}:{x:t.x,y:t.y+n},"applyPortOffset"),E=(0,i.K)((t,e,n)=>{const o=w.get(t),r={x:n.x??0,y:n.y??0},s={x:e.x??0,y:e.y??0},i=o?.srcSide??S(e,r),a=o?.dstSide??S(n,s);let c=o?h(e,o.srcSide):g(e,r,!0),f=o?h(n,o.dstSide):g(n,s,!1);const d=$.get(`${t}:src`),l=$.get(`${t}:dst`);return void 0!==d&&(c=F(c,i,d)),void 0!==l&&(f=F(f,a,l)),{pSrcPort:c,pDstPort:f,srcSide:i,dstSide:a}},"portsForEdge");for(const nt of b){const t=r[nt];if(x[nt]=[],!t.start||!t.end)continue;if(t.points&&t.points.length>0)continue;if(t.start===t.end)continue;const e=s.get(t.start),n=s.get(t.end);if(!e||!n)continue;const{pSrcPort:o,pDstPort:a,srcSide:d,dstSide:h}=E(nt,e,n),g={...o},b={...a},S="top"===d||"bottom"===d,w="top"===h||"bottom"===h;if(S){const t=o.y>(e.y??0);g.y=t?o.y+zn:o.y-zn}else{const t=o.x>(e.x??0);g.x=t?o.x+zn:o.x-zn}if(w){const t=a.y>(n.y??0);b.y=t?a.y+zn:a.y-zn}else{const t=a.x>(n.x??0);b.x=t?a.x+zn:a.x-zn}const v=(0,i.K)((t,e)=>{for(const n of l)if(!e.includes(n.nodeId)&&t.x>n.minX&&t.xn.minY&&t.y{if(r){const r=t.y>(e.y??0);return{x:(n.x??0)>=t.x?o.maxX+Yn:o.minX-Yn,y:r?o.maxY+Xn:o.minY-Xn,leavesPositiveSide:r}}const s=t.x>(e.x??0),i=(n.y??0)>=t.y;return{x:s?o.maxX+Yn:o.minX-Yn,y:i?o.maxY+Xn:o.minY-Xn,leavesPositiveSide:s}},"obstacleDetour");let L=[];const k=[t.start,t.end],O=v(g,k);if(O.inside&&O.obstacle){const t=O.obstacle;if(S){const r=C(o,e,n,t,!0);g.x=r.x,g.y=r.y;const s=r.leavesPositiveSide?Math.min(t.minY-2,o.y+zn):Math.max(t.maxY+2,o.y-zn);L=[{x:o.x,y:s},{x:r.x,y:s},{x:r.x,y:r.y}]}else{const r=C(o,e,n,t,!1),s=r.leavesPositiveSide?Math.min(t.minX-2,o.x+zn):Math.max(t.maxX+2,o.x-zn);g.x=r.x,g.y=r.y,L=[{x:s,y:o.y},{x:s,y:r.y},{x:r.x,y:r.y}]}}let R=[];const T=v(b,k);if(T.inside&&T.obstacle){const t=T.obstacle;if(w){const o=C(a,n,e,t,!0);b.x=o.x,b.y=o.y,R=[{x:o.x,y:o.y},{x:a.x,y:o.y}]}else{const o=C(a,n,e,t,!1);b.x=o.x,b.y=o.y,R=[{x:o.x,y:o.y},{x:o.x,y:a.y}]}}if(0===L.length&&0===R.length){const e=Yn,n=Math.abs(g.x-b.x)1||c>1,l=I.get(t.start??"")??0,u=I.get(t.end??"")??0,x=i>1&&B(t.start,d)||c>1&&B(t.end,h);if((n||r)&&!s&&(!f||f&&!x&&(i<=1||l<=2)&&(c<=1||u<=2))){if(!M(o,a,t.start,t.end)){t.points=[{...o},{...g},{...b},{...a}],m.add(nt);const e=r?"horizontal":"vertical",n=r?o.y:o.x,s=r?Math.min(o.x,a.x):Math.min(o.y,a.y),i=r?Math.max(o.x,a.x):Math.max(o.y,a.y),c={id:`fast-path-${e}-${n.toFixed(0)}-${nt}`,orientation:e,coord:n,spanMin:s,spanMax:i,tracks:[]};p.push({edgeIndex:nt,segmentIndex:0,orientation:e,pipe:c,trackIndex:0,from:s,to:i});continue}}}const N=u("vertical",g.x,g.y,g.y);g.x=N.coord;const F=u("vertical",b.x,b.y,b.y);b.x=F.coord;let Y=Math.min(g.x,b.x)-50,X=Math.max(g.x,b.x)+50,z=Math.min(g.y,b.y)-50,A=Math.max(g.y,b.y)+50;for(const r of l){const t=Math.min(g.x,b.x),e=Math.max(g.x,b.x),n=Math.min(g.y,b.y),o=Math.max(g.y,b.y);r.minXt&&r.minYn&&(Y=Math.min(Y,r.minX-25),X=Math.max(X,r.maxX+25),z=Math.min(z,r.minY-25),A=Math.max(A,r.maxY+25))}for(const r of l){if(r.maxXX||r.maxYA)continue;const t=Yn;u("horizontal",r.minY-t,Y,X),u("horizontal",r.maxY+t,Y,X);const e=Xn;u("vertical",r.minX-e,z,A),u("vertical",r.maxX+e,z,A)}u("horizontal",g.y,Y,X),u("horizontal",b.y,Y,X);const P=c.filter(t=>"horizontal"===t.orientation&&t.coord>=z&&t.coord<=A),D=c.filter(t=>"vertical"===t.orientation&&t.coord>=Y&&t.coord<=X),G=(0,i.K)((t,e)=>`${t.toFixed(1)},${e.toFixed(1)}`,"getKey"),H=G(g.x,g.y),j=G(b.x,b.y),_=new Map,V=new Map,W=new Map,q=new Set,J=[];_.set(H,0),W.set(H,"n"),J.push({key:H,f:Math.hypot(b.x-g.x,b.y-g.y),pt:g}),q.add(H);let Q=[];const U=(0,i.K)((e,n)=>M(e,n,t.start,t.end),"checkSegmentBlocked"),Z={x:b.x,y:g.y},tt=U(g,Z),et=U(Z,b),ot=tt||et,rt={x:g.x,y:b.y},st=U(g,rt),it=U(rt,b);if(ot?st||it||(Q=Math.abs(g.x-b.x)0;){J.sort((t,e)=>t.f-e.f);const e=J.shift();if(q.delete(e.key),e.key===j){let t=j,e=b;for(Q=[e];V.has(t);){const n=V.get(t);Q.unshift(n),e=n,t=G(n.x,n.y)}break}const n=e.pt.x,o=e.pt.y,r=D.sort((t,e)=>t.coord-e.coord),s=r.findIndex(t=>Math.abs(t.coord-n)<1),i=P.sort((t,e)=>t.coord-e.coord),a=i.findIndex(t=>Math.abs(t.coord-o)<1),c=[];s>0&&c.push({x:r[s-1].coord,y:o}),s>=0&&s0&&c.push({x:n,y:i[a-1].coord}),a>=0&&ae.nodeId!==t.start&&e.nodeId!==t.end&&(r!==s?e.minYo&&e.maxX>r&&e.minXn&&e.maxY>i&&e.minY10&&M<-5||x<-10&&M>5)&&(h=100*Math.abs(M)),(p>10&&m<-5||p<-10&&m>5)&&(h+=50*Math.abs(m));let K=0;const I=W.get(e.key)??"n",S=Math.abs(m)>En?"h":"v";"n"!==I&&I!==S&&(K=50);const w=d+u+h+K,v=(_.get(e.key)??1/0)+w,C=Math.abs(b.x-f.x)+Math.abs(b.y-f.y);if(v<(_.get(c)??1/0))if(V.set(c,e.pt),_.set(c,v),W.set(c,S),q.has(c)){const t=J.findIndex(t=>t.key===c);-1!==t&&(J[t].f=v+C)}else J.push({key:c,f:v+C,pt:f}),q.add(c)}}if(0===Q.length&&(Q=[g,{x:g.x,y:b.y},b]),Q.length>4){const t=Q[0],e=Q[Q.length-1];let n=Math.min(t.x,e.x),o=Math.max(t.x,e.x),r=Math.min(t.y,e.y),s=Math.max(t.y,e.y);for(const i of Q)n=Math.min(n,i.x),o=Math.max(o,i.x),r=Math.min(r,i.y),s=Math.max(s,i.y);const a=o>Math.max(t.x,e.x),c=nt.minXn&&t.minYs);if(a.length>0){let n=Math.max(t.x,e.x);for(const t of a){const e=(t.minX+t.maxX)/2;if(void 0===t.visualXHalfExtent||isNaN(t.visualXHalfExtent))continue;const o=e+t.visualXHalfExtent+r;n=Math.max(n,o)}isNaN(n)||(o=n)}}if(c){const o=l.filter(n=>n.minXMath.min(t.y,e.y));if(o.length>0){let s=Math.min(t.x,e.x);for(const t of o){const e=(t.minX+t.maxX)/2-t.visualXHalfExtent-r;s=Math.min(s,e)}n=s}}}const d=(0,i.K)(n=>{const o=e.y>t.y,r=l.filter(n=>{const o=Math.min(t.x,e.x)n.minX,r=Math.min(t.y,e.y)n.minY;return o&&r});let s=r;if(f&&r.length>0){const t=r.filter(t=>t.minXn);t.length>0&&(s=t)}if(0===s.length)return e.y;if(o){const t=Math.max(...s.map(t=>t.maxY))+15;if(tt.minY))-15;if(t>e.y+En)return t}return e.y},"findBestReturnY"),u=(0,i.K)(n=>{const o=d(n),r={x:n,y:t.y},s={x:n,y:o},i={x:e.x,y:o},a=U(t,r),c=U(r,s),f=U(s,i),l=o!==e.y&&U(i,e);return a||c||f||l?null:Math.abs(o-e.y)=3){const t=at[at.length-1],e=at[at.length-2],n=at[at.length-3],o=Math.abs(n.y-e.y)Math.abs(t.x-n.x)&&at.splice(-2,1)}else if(r){const o=Math.sign(e.y-n.y),r=Math.sign(t.y-n.y);0!==o&&o===r&&Math.abs(e.y-n.y)>Math.abs(t.y-n.y)&&at.splice(-2,1)}}const ct=[at[0]];for(let r=1;rt.x!==n.x>e.x){ct.push(e);continue}continue}if(Math.abs(t.x-e.x)t.y!==n.y>e.y){ct.push(e);continue}continue}ct.push(e)}ct.push(at[at.length-1]);for(let r=0;rt.from{const r=!o.segments.some(n=>(n.edgeIndex!==e.edgeIndex||n.segmentIndex!==e.segmentIndex)&&Y(n,t)),s=!n.segments.some(n=>(n.edgeIndex!==t.edgeIndex||n.segmentIndex!==t.segmentIndex)&&Y(n,e));return!(!r||!s)&&(t.trackIndex=o.index,e.trackIndex=n.index,n.segments=[...n.segments.filter(e=>e.edgeIndex!==t.edgeIndex||e.segmentIndex!==t.segmentIndex),{edgeIndex:e.edgeIndex,segmentIndex:e.segmentIndex,from:e.from,to:e.to}],o.segments=[...o.segments.filter(t=>t.edgeIndex!==e.edgeIndex||t.segmentIndex!==e.segmentIndex),{edgeIndex:t.edgeIndex,segmentIndex:t.segmentIndex,from:t.from,to:t.to}],!0)},"trySwapSegmentsAcrossTracks"),z=(0,i.K)(t=>{const e=t.tracks.length;return t.tracks[e]={index:e,coord:t.coord,segments:[]},e},"createNewTrack"),A=(0,i.K)((t,e)=>{const n=t.pipe.tracks[t.trackIndex];n.segments=n.segments.filter(e=>e.edgeIndex!==t.edgeIndex||e.segmentIndex!==t.segmentIndex),t.trackIndex=e;t.pipe.tracks[e].segments.push({edgeIndex:t.edgeIndex,segmentIndex:t.segmentIndex,from:t.from,to:t.to})},"moveSegmentToTrack"),P=(0,i.K)((t,e)=>{const n=x[t.edgeIndex];for(const o of n){const n=p[o];n.pipe===t.pipe&&A(n,e)}},"moveSegmentChainToTrack"),D=(0,i.K)(t=>{const e=x[t.edgeIndex],n=e.indexOf(p.indexOf(t)),o=[];return n>0&&o.push(p[e[n-1]]),n{if(t.orientation===e.orientation)return!1;const n="horizontal"===t.orientation?t:e,o="horizontal"===t.orientation?e:t;return o.pipe.coord>n.from&&o.pipe.coordo.from&&n.pipe.coord{for(const n of t.tracks){if(!n.segments.some(t=>(t.edgeIndex!==e.edgeIndex||t.segmentIndex!==e.segmentIndex)&&Y(t,e)))return n.index}return-1},"findAvailableTrack"),j=(0,i.K)((t,e)=>{if(t.trackIndex===e.trackIndex)return Y(t,e);const n=D(t),o=D(e);return n.some(t=>o.some(e=>G(t,e)))},"segmentsConflict"),_=(0,i.K)((t,e,n)=>{if(X(t,e,t.pipe.tracks[t.trackIndex],e.pipe.tracks[e.trackIndex]))return;const o=H(t.pipe,e);n(e,-1!==o?o:z(t.pipe))},"resolveTrackConflict"),V=(0,i.K)(t=>{let e=0;for(let n=0;n{if(W.has(t))return W.get(t);const e=x[t];if(0===e.length){const e={dest:0,deviation:0,base:0,delta:0};return W.set(t,e),e}const n=p[e[0]].pipe.coord;let o=n;for(let s=1;sMath.abs(r-n)?e:r;break}}const r={dest:o,deviation:Math.abs(o-n),base:n,delta:o-n};return W.set(t,r),r},"getDestInfo"),J=(0,i.K)(()=>{let t=0;const e=new Map;for(const[o,s]of r.entries())0!==x[o].length&&s.start&&(e.has(s.start)||e.set(s.start,[]),e.get(s.start).push(o));const n=(0,i.K)(t=>{const e=r[t];if(!e.start||!e.end)return 0;const n=s.get(e.start),o=s.get(e.end);if(!n||!o)return 0;const i=(o.x??0)-(n.x??0),a=(o.y??0)-(n.y??0);return Math.abs(i)+Math.abs(a)},"getEdgeDistance");for(const o of e.values()){o.sort((t,e)=>{const o=q(t),r=q(e);if(Math.abs(o.deviation-r.deviation)>1)return o.deviation-r.deviation;if(Math.abs(o.dest-r.dest)>1)return o.dest-r.dest;const s=n(t),i=n(e);if(Math.abs(s-i)>1)return i-s;const a=x[t].length,c=x[e].length;if(a!==c)return a-c;if(1===a){const n=x[t][0],o=x[e][0];if(p[n]&&p[o]){const t=p[n],e=p[o],r=Math.abs(t.to-t.from),s=Math.abs(e.to-e.from);if(Math.abs(r-s)>1)return r-s}}return 0});const e=o.map(t=>p[x[t][0]]);t+=V(e)}return t},"fixSourceHandleCrossings"),Q=(0,i.K)(()=>{let t=0;const e=new Map;for(const[n,o]of r.entries()){0!==x[n].length&&(o.end&&(e.has(o.end)||e.set(o.end,[]),e.get(o.end).push(n)))}for(const n of e.values()){n.sort((t,e)=>{const n=(0,i.K)(t=>{const e=x[t];if(e.length<2)return 0;const n=p[e[e.length-2]];return Math.abs(n.to-n.from)},"getDist"),o=n(t),r=n(e);return Math.abs(o-r)>.1?o-r:t-e});const e=n.map(t=>p[x[t][x[t].length-1]]);t+=V(e)}return t},"fixTargetHandleCrossings"),U=(0,i.K)(()=>{let t=0;for(const e of c){const n=[];for(const t of e.tracks)for(const e of t.segments){const t=x[e.edgeIndex].find(t=>p[t].segmentIndex===e.segmentIndex);void 0!==t&&n.push(p[t])}n.sort((t,e)=>t.edgeIndex-e.edgeIndex||t.segmentIndex-e.segmentIndex);for(let e=0;e{e.segments.forEach(n=>{t.push({edgeIndex:n.edgeIndex,segmentIndex:n.segmentIndex,trackIndex:e.index,from:n.from,to:n.to})})}),t.sort((t,e)=>t.from-e.from);const e=[];if(t.length>0){let n=[t[0]],o=t[0].to;for(let r=1;rt.add(e.trackIndex));const e=new Map;n.forEach(t=>{const n=q(t.edgeIndex);e.set(t.trackIndex,(e.get(t.trackIndex)??0)+n.delta)});const o=[...t].filter(t=>(e.get(t)??0)<-1),r=[...t].filter(t=>(e.get(t)??0)>1),s=[...t].filter(t=>Math.abs(e.get(t)??0)<=1);o.sort((t,n)=>(e.get(n)??0)-(e.get(t)??0)),r.sort((t,n)=>(e.get(t)??0)-(e.get(n)??0));const a=(0,i.K)((t,e)=>{n.filter(e=>e.trackIndex===t).forEach(t=>{const n=m.has(t.edgeIndex)?nt.coord:e;tt.set(`${t.edgeIndex}-${t.segmentIndex}`,n)})},"assignCoord");let c=0;for(const n of o)c++,a(n,nt.coord-10*c);if(0===s.length&&t.size>0){const n=[...t].sort((t,n)=>Math.abs(e.get(t)??0)-Math.abs(e.get(n)??0))[0],i=o.indexOf(n);-1!==i&&o.splice(i,1);const a=r.indexOf(n);-1!==a&&r.splice(a,1),s.push(n)}let f=0;for(const n of s){if(0===f)a(n,nt.coord);else{const t=f%2==1?1:-1,e=Math.ceil(f/2);a(n,nt.coord+t*e*10*.5)}f++}let d=0;for(const n of r)d++,a(n,nt.coord+10*d)}}for(const[i,nt]of r.entries()){const t=x[i]??[];if(0===t.length)continue;const e=[],n=s.get(nt.start),o=s.get(nt.end),{pSrcPort:r,pDstPort:a}=E(i,n,o),c=t.map(t=>{const e=p[t],n=tt.get(`${e.edgeIndex}-${e.segmentIndex}`)??e.pipe.coord;return{orient:e.orientation,coord:n,from:e.from,to:e.to}});e.push(r);for(let s=0;sEn&&e.push(Dn(t,o)),a&&i.orient===t.orient)if(Math.abs(t.coord-i.coord)>En){const n="vertical"===t.orient?(o+i.from)/2:Pn(t,i);e.push(Dn(t,n),Dn(i,n))}else 0!==s&&s!==c.length-2||e.push(Dn(t,Pn(t,i)));else if(a)e.push(Dn(t,i.coord));else{const n=Math.abs(t.from-o)En||Math.abs(f.y-a.y)>En)&&e.push(a);const d=[];e.length>0&&d.push(e[0]);for(let s=1;sEn||Math.abs(t.y-n.y)>En)&&d.push(t)}nt.points=d}for(const i of r){const t=i.__originalEdge;t&&i.points&&(t.points=i.points)}t.edges=(t.edges??[]).filter(t=>!t.isLayoutOnly);const et=(0,i.K)((t,e)=>{const n=e.x??0,o=e.y??0,r=e.width??0,s=e.height??0;if(r<=0||s<=0)return t;const i=n-r/2,a=n+r/2,c=o-s/2,f=o+s/2;if(t.xa||t.yf)return t;const d=t.x-i,l=a-t.x,u=t.y-c,h=f-t.y,g=Math.min(d,l,u,h);return g===d?{x:i,y:t.y}:g===l?{x:a,y:t.y}:g===u?{x:t.x,y:c}:{x:t.x,y:f}},"nodeBoundaryClamp");for(const i of t.edges){const t=i.points;if(!t||t.length<2)continue;const e=i.start,n=i.end,o=e?s.get(e):void 0,r=n?s.get(n):void 0;o&&(t[0]=et(t[0],o)),r&&(t[t.length-1]=et(t[t.length-1],r))}return t}function Hn(t){return t.direction??"TB"}function jn(t){const e=O(t),n=t.config.flowchart?.nodeSpacing??40,o=t.config.flowchart?.rankSpacing??100,r=t.config.swimlane?.ignoreCrossLaneEdges??!0,s=t.config.swimlane?.optimizeRanksByCrossings??!0,i=t.config.swimlane?.automaticLaneOrdering??!1,a=Hn(t),{ordered:c,coordinates:f}=Fn(e,{nodeGap:n,layerGap:o,ignoreCrossLaneEdges:r,optimizeRanksByCrossings:s,automaticLaneOrdering:i,direction:a});R(e,c,f,{nodeGap:n,layerGap:o});for(const d of t.edges??[])delete d.points;Gn(t,a);for(const d of t.edges??[])d.curve&&"basis"!==d.curve||(d.curve="rounded");return we(t,a),Se(t),a}function _n(t){k(t);const e=T(t);t.nodes=e.nodes,t.edges=e.edges}(0,i.K)(An,"chooseOrthogonalSide"),(0,i.K)(Pn,"sharedLineEndpointCoord"),(0,i.K)(Dn,"pointOnLine"),(0,i.K)(Gn,"routeEdgesOrthogonal"),(0,i.K)(Hn,"getSwimlaneDirection"),(0,i.K)(jn,"runSwimlaneLayoutCore"),(0,i.K)(_n,"prepareSwimlaneLayout");var Vn=(0,o.xY)({prepareLayout:_n,runLayoutCore:jn,afterPaint:w})}}]); \ No newline at end of file diff --git a/assets/js/4985.d2dfaae8.js b/assets/js/4985.d2dfaae8.js new file mode 100644 index 000000000..bb5ccfffb --- /dev/null +++ b/assets/js/4985.d2dfaae8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[4985],{15350(t,e,a){a.d(e,{m:()=>s});var r=a(86827),s=class{constructor(t){this.init=t,this.records=this.init()}static{(0,r.K)(this,"ImperativeState")}reset(){this.records=this.init()}}},338(t,e,a){a.d(e,{CP:()=>h,Ck:()=>E,HT:()=>T,PB:()=>p,aC:()=>l,lC:()=>c,m:()=>d,tk:()=>o});var r=a(76385),s=a(86827),i=a(16750),n=a(70451),o=(0,s.K)((t,e)=>{const a=t.append("rect");if(a.attr("x",e.x),a.attr("y",e.y),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("width",e.width),a.attr("height",e.height),e.name&&a.attr("name",e.name),e.rx&&a.attr("rx",e.rx),e.ry&&a.attr("ry",e.ry),void 0!==e.attrs)for(const r in e.attrs)a.attr(r,e.attrs[r]);return e.class&&a.attr("class",e.class),a},"drawRect"),c=(0,s.K)((t,e)=>{const a={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};o(t,a).lower()},"drawBackgroundRect"),d=(0,s.K)((t,e)=>{const a=e.text.replace(r.H1," "),s=t.append("text");s.attr("x",e.x),s.attr("y",e.y),s.attr("class","legend"),s.style("text-anchor",e.anchor),e.class&&s.attr("class",e.class);const i=s.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.text(a),s},"drawText"),l=(0,s.K)((t,e,a,r)=>{const s=t.append("image");s.attr("x",e),s.attr("y",a);const n=(0,i.J)(r);s.attr("xlink:href",n)},"drawImage"),h=(0,s.K)((t,e,a,r)=>{const s=t.append("use");s.attr("x",e),s.attr("y",a);const n=(0,i.J)(r);s.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),p=(0,s.K)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),T=(0,s.K)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),E=(0,s.K)(()=>{let t=(0,n.Ltv)(".mermaidTooltip");return t.empty()&&(t=(0,n.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip")},24985(t,e,a){a.d(e,{diagram:()=>Wt});var r=a(15350),s=a(841),i=a(338),n=a(16459),o=a(76385),c=a(31293),d=a(86827),l=a(70451),h=a(16750),p=function(){var t=(0,d.K)(function(t,e,a,r){for(a=a||{},r=t.length;r--;a[t[r]]=e);return a},"o"),e=[1,2],a=[1,3],r=[1,4],s=[2,4],i=[1,9],n=[1,11],o=[1,12],c=[1,14],l=[1,15],h=[1,17],p=[1,18],T=[1,19],E=[1,25],g=[1,26],u=[1,27],y=[1,28],_=[1,29],O=[1,30],x=[1,31],b=[1,32],m=[1,33],I=[1,34],f=[1,35],R=[1,36],L=[1,37],w=[1,38],P=[1,39],N=[1,40],D=[1,42],S=[1,43],A=[1,44],k=[1,45],C=[1,46],M=[1,47],v=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],Y=[1,74],B=[1,80],K=[1,81],$=[1,82],V=[1,83],W=[1,84],F=[1,85],H=[1,86],q=[1,87],z=[1,88],j=[1,89],U=[1,90],G=[1,91],X=[1,92],J=[1,93],Z=[1,94],Q=[1,95],tt=[1,96],et=[1,97],at=[1,98],rt=[1,99],st=[1,100],it=[1,101],nt=[1,102],ot=[1,103],ct=[1,104],dt=[1,105],lt=[2,78],ht=[4,5,17,51,53,54],pt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],Tt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],Et=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],gt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],ut=[5,52],yt=[70,71,72,73],_t=[1,151],Ot={trace:(0,d.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:(0,d.K)(function(t,e,a,r,s,i,n){var o=i.length-1;switch(s){case 3:return r.apply(i[o]),i[o];case 4:case 10:case 8:case 9:case 14:this.$=[];break;case 5:case 11:i[o-1].push(i[o]),this.$=i[o-1];break;case 6:case 7:case 12:case 13:case 67:this.$=i[o];break;case 16:i[o].type="createParticipant",this.$=i[o];break;case 17:i[o-1].unshift({type:"boxStart",boxData:r.parseBoxData(i[o-2])}),i[o-1].push({type:"boxEnd",boxText:i[o-2]}),this.$=i[o-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-2]),sequenceIndexStep:Number(i[o-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:i[o-1].actor};break;case 24:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:i[o-1].actor};break;case 30:r.setDiagramTitle(i[o].substring(6)),this.$=i[o].substring(6);break;case 31:r.setDiagramTitle(i[o].substring(7)),this.$=i[o].substring(7);break;case 32:this.$=i[o].trim(),r.setAccTitle(this.$);break;case 33:case 34:this.$=i[o].trim(),r.setAccDescription(this.$);break;case 35:i[o-1].unshift({type:"loopStart",loopText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.LOOP_START}),i[o-1].push({type:"loopEnd",loopText:i[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=i[o-1];break;case 36:i[o-1].unshift({type:"rectStart",color:r.parseMessage(i[o-2]),signalType:r.LINETYPE.RECT_START}),i[o-1].push({type:"rectEnd",color:r.parseMessage(i[o-2]),signalType:r.LINETYPE.RECT_END}),this.$=i[o-1];break;case 37:i[o-1].unshift({type:"optStart",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.OPT_START}),i[o-1].push({type:"optEnd",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.OPT_END}),this.$=i[o-1];break;case 38:i[o-1].unshift({type:"altStart",altText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.ALT_START}),i[o-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=i[o-1];break;case 39:i[o-1].unshift({type:"parStart",parText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.PAR_START}),i[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=i[o-1];break;case 40:i[o-1].unshift({type:"parStart",parText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.PAR_OVER_START}),i[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=i[o-1];break;case 41:i[o-1].unshift({type:"criticalStart",criticalText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.CRITICAL_START}),i[o-1].push({type:"criticalEnd",signalType:r.LINETYPE.CRITICAL_END}),this.$=i[o-1];break;case 42:i[o-1].unshift({type:"breakStart",breakText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.BREAK_START}),i[o-1].push({type:"breakEnd",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.BREAK_END}),this.$=i[o-1];break;case 44:this.$=i[o-3].concat([{type:"option",optionText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.CRITICAL_OPTION},i[o]]);break;case 46:this.$=i[o-3].concat([{type:"and",parText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.PAR_AND},i[o]]);break;case 48:this.$=i[o-3].concat([{type:"else",altText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.ALT_ELSE},i[o]]);break;case 49:case 54:i[o-3].draw="participant",i[o-3].type="addParticipant",i[o-3].description=r.parseMessage(i[o-1]),this.$=i[o-3];break;case 50:case 55:i[o-1].draw="participant",i[o-1].type="addParticipant",this.$=i[o-1];break;case 51:case 56:i[o-3].draw="actor",i[o-3].type="addParticipant",i[o-3].description=r.parseMessage(i[o-1]),this.$=i[o-3];break;case 52:case 57:i[o-1].draw="actor",i[o-1].type="addParticipant",this.$=i[o-1];break;case 53:i[o-1].type="destroyParticipant",this.$=i[o-1];break;case 58:this.$=[i[o-1],{type:"addNote",placement:i[o-2],actor:i[o-1].actor,text:i[o]}];break;case 59:i[o-2]=[].concat(i[o-1],i[o-1]).slice(0,2),i[o-2][0]=i[o-2][0].actor,i[o-2][1]=i[o-2][1].actor,this.$=[i[o-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:i[o-2].slice(0,2),text:i[o]}];break;case 60:this.$=[i[o-1],{type:"addLinks",actor:i[o-1].actor,text:i[o]}];break;case 61:this.$=[i[o-1],{type:"addALink",actor:i[o-1].actor,text:i[o]}];break;case 62:this.$=[i[o-1],{type:"addProperties",actor:i[o-1].actor,text:i[o]}];break;case 63:this.$=[i[o-1],{type:"addDetails",actor:i[o-1].actor,text:i[o]}];break;case 66:this.$=[i[o-2],i[o]];break;case 68:this.$=r.PLACEMENT.LEFTOF;break;case 69:this.$=r.PLACEMENT.RIGHTOF;break;case 70:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o],activate:!0},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:i[o-1].actor}];break;case 71:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:i[o-4].actor}];break;case 72:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:i[o-1].actor}];break;case 73:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-2],msg:i[o],activate:!1,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:i[o-4].actor}];break;case 74:this.$=[i[o-5],i[o-1],{type:"addMessage",from:i[o-5].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:i[o-1].actor},{type:"centralConnectionReverse",signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:i[o-5].actor}];break;case 75:this.$=[i[o-3],i[o-1],{type:"addMessage",from:i[o-3].actor,to:i[o-1].actor,signalType:i[o-2],msg:i[o]}];break;case 76:this.$={type:"addParticipant",actor:i[o-1],config:i[o]};break;case 77:this.$=i[o-1].trim();break;case 78:this.$={type:"addParticipant",actor:i[o]};break;case 79:this.$=r.LINETYPE.SOLID_OPEN;break;case 80:this.$=r.LINETYPE.DOTTED_OPEN;break;case 81:this.$=r.LINETYPE.SOLID;break;case 82:this.$=r.LINETYPE.SOLID_TOP;break;case 83:this.$=r.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=r.LINETYPE.STICK_TOP;break;case 85:this.$=r.LINETYPE.STICK_BOTTOM;break;case 86:this.$=r.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=r.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=r.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=r.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=r.LINETYPE.DOTTED;break;case 100:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=r.LINETYPE.SOLID_CROSS;break;case 102:this.$=r.LINETYPE.DOTTED_CROSS;break;case 103:this.$=r.LINETYPE.SOLID_POINT;break;case 104:this.$=r.LINETYPE.DOTTED_POINT;break;case 105:this.$=r.parseMessage(i[o].trim().substring(1))}},"anonymous"),table:[{3:1,4:e,5:a,6:r},{1:[3]},{3:5,4:e,5:a,6:r},{3:6,4:e,5:a,6:r},t([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],s,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:n,8:8,9:10,10:o,13:13,14:c,15:l,18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:_,37:O,38:x,39:b,40:m,42:I,44:f,45:R,47:L,51:w,53:P,54:N,56:D,61:S,62:A,63:k,64:C,73:M},t(v,[2,5]),{9:48,13:13,14:c,15:l,18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:_,37:O,38:x,39:b,40:m,42:I,44:f,45:R,47:L,51:w,53:P,54:N,56:D,61:S,62:A,63:k,64:C,73:M},t(v,[2,7]),t(v,[2,8]),t(v,[2,9]),t(v,[2,15]),{13:49,51:w,53:P,54:N},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:M},{23:56,73:M},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},t(v,[2,30]),t(v,[2,31]),{33:[1,62]},{35:[1,63]},t(v,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:Y},{23:75,55:76,73:Y},{23:77,73:M},{69:78,72:[1,79],78:B,79:K,80:$,81:V,82:W,83:F,84:H,85:q,86:z,87:j,88:U,89:G,90:X,91:J,92:Z,93:Q,94:tt,95:et,96:at,97:rt,98:st,99:it,100:nt,101:ot,102:ct,103:dt},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:M},{23:111,73:M},{23:112,73:M},{23:113,73:M},t([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],lt),t(v,[2,6]),t(v,[2,16]),t(ht,[2,10],{11:114}),t(v,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},t(v,[2,22]),{5:[1,118]},{5:[1,119]},t(v,[2,25]),t(v,[2,26]),t(v,[2,27]),t(v,[2,28]),t(v,[2,29]),t(v,[2,32]),t(v,[2,33]),t(pt,s,{7:120}),t(pt,s,{7:121}),t(pt,s,{7:122}),t(Tt,s,{41:123,7:124}),t(Et,s,{43:125,7:126}),t(Et,s,{7:126,43:127}),t(gt,s,{46:128,7:129}),t(pt,s,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},t(ut,lt,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:M},{69:146,78:B,79:K,80:$,81:V,82:W,83:F,84:H,85:q,86:z,87:j,88:U,89:G,90:X,91:J,92:Z,93:Q,94:tt,95:et,96:at,97:rt,98:st,99:it,100:nt,101:ot,102:ct,103:dt},t(yt,[2,79]),t(yt,[2,80]),t(yt,[2,81]),t(yt,[2,82]),t(yt,[2,83]),t(yt,[2,84]),t(yt,[2,85]),t(yt,[2,86]),t(yt,[2,87]),t(yt,[2,88]),t(yt,[2,89]),t(yt,[2,90]),t(yt,[2,91]),t(yt,[2,92]),t(yt,[2,93]),t(yt,[2,94]),t(yt,[2,95]),t(yt,[2,96]),t(yt,[2,97]),t(yt,[2,98]),t(yt,[2,99]),t(yt,[2,100]),t(yt,[2,101]),t(yt,[2,102]),t(yt,[2,103]),t(yt,[2,104]),{23:147,73:M},{23:149,60:148,73:M},{73:[2,68]},{73:[2,69]},{58:150,104:_t},{58:152,104:_t},{58:153,104:_t},{58:154,104:_t},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:w,53:P,54:N},{5:[1,160]},t(v,[2,20]),t(v,[2,21]),t(v,[2,23]),t(v,[2,24]),{4:i,5:n,8:8,9:10,10:o,13:13,14:c,15:l,17:[1,161],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:_,37:O,38:x,39:b,40:m,42:I,44:f,45:R,47:L,51:w,53:P,54:N,56:D,61:S,62:A,63:k,64:C,73:M},{4:i,5:n,8:8,9:10,10:o,13:13,14:c,15:l,17:[1,162],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:_,37:O,38:x,39:b,40:m,42:I,44:f,45:R,47:L,51:w,53:P,54:N,56:D,61:S,62:A,63:k,64:C,73:M},{4:i,5:n,8:8,9:10,10:o,13:13,14:c,15:l,17:[1,163],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:_,37:O,38:x,39:b,40:m,42:I,44:f,45:R,47:L,51:w,53:P,54:N,56:D,61:S,62:A,63:k,64:C,73:M},{17:[1,164]},{4:i,5:n,8:8,9:10,10:o,13:13,14:c,15:l,17:[2,47],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:_,37:O,38:x,39:b,40:m,42:I,44:f,45:R,47:L,50:[1,165],51:w,53:P,54:N,56:D,61:S,62:A,63:k,64:C,73:M},{17:[1,166]},{4:i,5:n,8:8,9:10,10:o,13:13,14:c,15:l,17:[2,45],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:_,37:O,38:x,39:b,40:m,42:I,44:f,45:R,47:L,49:[1,167],51:w,53:P,54:N,56:D,61:S,62:A,63:k,64:C,73:M},{17:[1,168]},{17:[1,169]},{4:i,5:n,8:8,9:10,10:o,13:13,14:c,15:l,17:[2,43],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:_,37:O,38:x,39:b,40:m,42:I,44:f,45:R,47:L,48:[1,170],51:w,53:P,54:N,56:D,61:S,62:A,63:k,64:C,73:M},{4:i,5:n,8:8,9:10,10:o,13:13,14:c,15:l,17:[1,171],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:_,37:O,38:x,39:b,40:m,42:I,44:f,45:R,47:L,51:w,53:P,54:N,56:D,61:S,62:A,63:k,64:C,73:M},{16:[1,172]},t(v,[2,50]),{16:[1,173]},t(v,[2,55]),t(ut,[2,76]),{76:[1,174]},{16:[1,175]},t(v,[2,52]),{16:[1,176]},t(v,[2,57]),t(v,[2,53]),{23:177,73:M},{23:178,73:M},{23:179,73:M},{58:180,104:_t},{23:181,72:[1,182],73:M},{58:183,104:_t},{58:184,104:_t},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},t(v,[2,17]),t(ht,[2,11]),{13:186,51:w,53:P,54:N},t(ht,[2,13]),t(ht,[2,14]),t(v,[2,19]),t(v,[2,35]),t(v,[2,36]),t(v,[2,37]),t(v,[2,38]),{16:[1,187]},t(v,[2,39]),{16:[1,188]},t(v,[2,40]),t(v,[2,41]),{16:[1,189]},t(v,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:_t},{58:196,104:_t},{58:197,104:_t},{5:[2,75]},{58:198,104:_t},{23:199,73:M},{5:[2,58]},{5:[2,59]},{23:200,73:M},t(ht,[2,12]),t(Tt,s,{7:124,41:201}),t(Et,s,{7:126,43:202}),t(gt,s,{7:129,46:203}),t(v,[2,49]),t(v,[2,54]),t(ut,[2,77]),t(v,[2,51]),t(v,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:_t},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:(0,d.K)(function(t,e){if(!e.recoverable){var a=new Error(t);throw a.hash=e,a}this.trace(t)},"parseError"),parse:(0,d.K)(function(t){var e=this,a=[0],r=[],s=[null],i=[],n=this.table,o="",c=0,l=0,h=0,p=i.slice.call(arguments,1),T=Object.create(this.lexer),E={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(E.yy[g]=this.yy[g]);T.setInput(t,E.yy),E.yy.lexer=T,E.yy.parser=this,void 0===T.yylloc&&(T.yylloc={});var u=T.yylloc;i.push(u);var y=T.options&&T.options.ranges;function _(){var t;return"number"!=typeof(t=r.pop()||T.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof E.yy.parseError?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,d.K)(function(t){a.length=a.length-2*t,s.length=s.length-t,i.length=i.length-t},"popStack"),(0,d.K)(_,"lex");for(var O,x,b,m,I,f,R,L,w,P={};;){if(b=a[a.length-1],this.defaultActions[b]?m=this.defaultActions[b]:(null==O&&(O=_()),m=n[b]&&n[b][O]),void 0===m||!m.length||!m[0]){var N="";for(f in w=[],n[b])this.terminals_[f]&&f>2&&w.push("'"+this.terminals_[f]+"'");N=T.showPosition?"Parse error on line "+(c+1)+":\n"+T.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[O]||O)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==O?"end of input":"'"+(this.terminals_[O]||O)+"'"),this.parseError(N,{text:T.match,token:this.terminals_[O]||O,line:T.yylineno,loc:u,expected:w})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+O);switch(m[0]){case 1:a.push(O),s.push(T.yytext),i.push(T.yylloc),a.push(m[1]),O=null,x?(O=x,x=null):(l=T.yyleng,o=T.yytext,c=T.yylineno,u=T.yylloc,h>0&&h--);break;case 2:if(R=this.productions_[m[1]][1],P.$=s[s.length-R],P._$={first_line:i[i.length-(R||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(R||1)].first_column,last_column:i[i.length-1].last_column},y&&(P._$.range=[i[i.length-(R||1)].range[0],i[i.length-1].range[1]]),void 0!==(I=this.performAction.apply(P,[o,l,c,E.yy,m[1],s,i].concat(p))))return I;R&&(a=a.slice(0,-1*R*2),s=s.slice(0,-1*R),i=i.slice(0,-1*R)),a.push(this.productions_[m[1]][0]),s.push(P.$),i.push(P._$),L=n[a[a.length-2]][a[a.length-1]],a.push(L);break;case 3:return!0}}return!0},"parse")},xt=function(){return{EOF:1,parseError:(0,d.K)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,d.K)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,d.K)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,d.K)(function(t){var e=t.length,a=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===r.length?this.yylloc.first_column:0)+r[r.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,d.K)(function(){return this._more=!0,this},"more"),reject:(0,d.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,d.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,d.K)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,d.K)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,d.K)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,d.K)(function(t,e){var a,r,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var i in s)this[i]=s[i];return!1}return!1},"test_match"),next:(0,d.K)(function(){if(this.done)return this.EOF;var t,e,a,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),i=0;ie[0].length)){if(e=a,r=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,s[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,d.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,d.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,d.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,d.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,d.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,d.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,d.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,d.K)(function(t,e,a,r){switch(a){case 0:case 59:case 92:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 20;case 7:return this.begin("CONFIG"),75;case 8:return 76;case 9:return this.popState(),this.begin("ALIAS"),77;case 10:return this.popState(),this.popState(),77;case 11:case 60:return e.yytext=e.yytext.trim(),73;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),73;case 13:return e.yytext=e.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return e.yytext=e.yytext.trim(),this.popState(),10;case 16:return this.begin("LINE"),15;case 17:return this.begin("ID"),51;case 18:return this.begin("ID"),53;case 19:return 14;case 20:return this.begin("ID"),54;case 21:return this.popState(),this.popState(),this.begin("LINE"),52;case 22:return this.popState(),this.popState(),5;case 23:return this.begin("LINE"),37;case 24:return this.begin("LINE"),38;case 25:return this.begin("LINE"),39;case 26:return this.begin("LINE"),40;case 27:return this.begin("LINE"),50;case 28:return this.begin("LINE"),42;case 29:return this.begin("LINE"),44;case 30:return this.begin("LINE"),49;case 31:return this.begin("LINE"),45;case 32:return this.begin("LINE"),48;case 33:return this.begin("LINE"),47;case 34:return this.popState(),16;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin("ID"),22;case 45:return this.begin("ID"),24;case 46:return 30;case 47:return 31;case 48:return this.begin("acc_title"),32;case 49:return this.popState(),"acc_title_value";case 50:return this.begin("acc_descr"),34;case 51:return this.popState(),"acc_descr_value";case 52:this.begin("acc_descr_multiline");break;case 53:this.popState();break;case 54:return"acc_descr_multiline_value";case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 93:return 10}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,56,57,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,92,93],inclusive:!0}}}}();function bt(){this.yy={}}return Ot.lexer=xt,(0,d.K)(bt,"Parser"),bt.prototype=Ot,Ot.Parser=bt,new bt}();p.parser=p;var T=p,E={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},g={FILLED:0,OPEN:1},u={LEFTOF:0,RIGHTOF:1,OVER:2},y="actor",_="control",O="database",x="entity",b=class{constructor(){this.state=new r.m(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=o.SV,this.setAccDescription=o.EI,this.setDiagramTitle=o.ke,this.getAccTitle=o.iN,this.getAccDescription=o.m7,this.getDiagramTitle=o.ab,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap((0,o.D7)().wrap),this.LINETYPE=E,this.ARROWTYPE=g,this.PLACEMENT=u}static{(0,d.K)(this,"SequenceDB")}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,e,a,r,i){let n,o=this.state.records.currentBox;if(void 0!==i){let t;t=i.includes("\n")?i+"\n":"{\n"+i+"\n}",n=(0,s.H)(t,{schema:s.r})}r=n?.type??r,!n?.alias||a&&a.text!==e||(a={text:n.alias,wrap:a?.wrap,type:r});const c=this.state.records.actors.get(t);if(c){if(this.state.records.currentBox&&c.box&&this.state.records.currentBox!==c.box)throw new Error(`A same participant should only be defined in one Box: ${c.name} can't be in '${c.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(o=c.box?c.box:this.state.records.currentBox,c.box=o,c&&e===c.name&&null==a)return}if(null==a?.text&&(a={text:e,type:r}),null!=r&&null!=a.text||(a={text:e,type:r}),this.state.records.actors.set(t,{box:o,name:e,description:a.text,wrap:a.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:r??"participant"}),this.state.records.prevActor){const e=this.state.records.actors.get(this.state.records.prevActor);e&&(e.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let e,a=0;if(!t)return 0;for(e=0;e>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:a?.text??"",wrap:a?.wrap??this.autoWrap(),type:r,activate:s,centralConnection:i??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(t=>t.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(void 0===t)return{};t=t.trim();const e=null!==/^:?wrap:/.exec(t)||null===/^:?nowrap:/.exec(t)&&void 0;return{cleanedText:(void 0===e?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}}autoWrap(){return void 0!==this.state.records.wrapEnabled?this.state.records.wrapEnabled:(0,o.D7)().sequence?.wrap??!1}clear(){this.state.reset(),(0,o.IU)()}parseMessage(t){const e=t.trim(),{wrap:a,cleanedText:r}=this.extractWrap(e),s={text:r,wrap:a};return c.R.debug(`parseMessage: ${JSON.stringify(s)}`),s}parseBoxData(t){const e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);let a=e?.[1]?e[1].trim():"transparent",r=e?.[2]?e[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",a)||(a="transparent",r=t.trim());else{const e=(new Option).style;e.color=a,e.color!==a&&(a="transparent",r=t.trim())}const{wrap:s,cleanedText:i}=this.extractWrap(r);return{text:i?(0,o.jZ)(i,(0,o.D7)()):void 0,color:a,wrap:s}}addNote(t,e,a){const r={actor:t,placement:e,message:a.text,wrap:a.wrap??this.autoWrap()},s=[].concat(t,t);this.state.records.notes.push(r),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:s[0],to:s[1],message:a.text,wrap:a.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:e})}addLinks(t,e){const a=this.getActor(t);try{let t=(0,o.jZ)(e.text,(0,o.D7)());t=t.replace(/=/g,"="),t=t.replace(/&/g,"&");const r=JSON.parse(t);this.insertLinks(a,r)}catch(r){c.R.error("error while parsing actor link text",r)}}addALink(t,e){const a=this.getActor(t);try{const t={};let r=(0,o.jZ)(e.text,(0,o.D7)());const s=r.indexOf("@");r=r.replace(/=/g,"="),r=r.replace(/&/g,"&");const i=r.slice(0,s-1).trim(),n=r.slice(s+1).trim();t[i]=n,this.insertLinks(a,t)}catch(r){c.R.error("error while parsing actor link text",r)}}insertLinks(t,e){if(null==t.links)t.links=e;else for(const a in e)t.links[a]=e[a]}addProperties(t,e){const a=this.getActor(t);try{const t=(0,o.jZ)(e.text,(0,o.D7)()),r=JSON.parse(t);this.insertProperties(a,r)}catch(r){c.R.error("error while parsing actor properties text",r)}}insertProperties(t,e){if(null==t.properties)t.properties=e;else for(const a in e)t.properties[a]=e[a]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,e){const a=this.getActor(t),r=document.getElementById(e.text);try{const t=r.innerHTML,e=JSON.parse(t);e.properties&&this.insertProperties(a,e.properties),e.links&&this.insertLinks(a,e.links)}catch(s){c.R.error("error while parsing actor details text",s)}}getActorProperty(t,e){if(void 0!==t?.properties)return t.properties[e]}apply(t){if(Array.isArray(t))t.forEach(t=>{this.apply(t)});else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw,t.config);break;case"createParticipant":if(this.state.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=t.actor,this.addActor(t.actor,t.actor,t.description,t.draw,t.config),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":case"centralConnection":case"centralConnectionReverse":case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated){if(t.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(t.to!==this.state.records.lastDestroyed&&t.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(t.from,t.to,t.msg,t.signalType,t.activate,t.centralConnection);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":(0,o.SV)(t.text);break;case"parStart":case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType)}}getConfig(){return(0,o.D7)().sequence}},m=(0,d.K)(t=>{const e=t.dropShadow??"none",{look:a}=(0,o.D7)();return`.actor {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n stroke-width: ${t.strokeWidth??1};\n }\n\n rect.actor.outer-path[data-look="neo"] {\n filter: ${e};\n }\n\n rect.note[data-look="neo"] {\n stroke:${t.noteBorderColor};\n fill:${t.noteBkgColor};\n filter: ${e};\n }\n\n text.actor > tspan {\n fill: ${t.actorTextColor};\n stroke: none;\n }\n\n .actor-line {\n stroke: ${t.actorLineColor};\n }\n\n .innerArc {\n stroke-width: 1.5;\n stroke-dasharray: none;\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ${t.signalColor};\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ${t.signalColor};\n }\n\n [id$="-arrowhead"] path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .sequenceNumber {\n fill: ${t.sequenceNumberColor};\n }\n\n [id$="-sequencenumber"] {\n fill: ${t.signalColor};\n }\n\n [id$="-crosshead"] path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .messageText {\n fill: ${t.signalTextColor};\n stroke: none;\n }\n\n .labelBox {\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBkgColor};\n filter: ${"neo"===a?e:"none"};\n }\n\n .labelText, .labelText > tspan {\n fill: ${t.labelTextColor};\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ${t.loopTextColor};\n stroke: none;\n }\n\n .sectionTitle, .sectionTitle > tspan {\n fill: ${t.loopTextColor};\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBorderColor};\n }\n\n .note {\n //stroke: #decc93;\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n }\n\n .noteText, .noteText > tspan {\n fill: ${t.noteTextColor};\n stroke: none;\n ${t.noteFontWeight?`font-weight: ${t.noteFontWeight};`:""}\n }\n\n .activation0 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation1 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation2 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .actorPopupMenu {\n position: absolute;\n }\n\n .actorPopupMenuPanel {\n position: absolute;\n fill: ${t.actorBkg};\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n .actor-man circle, line {\n fill: ${t.actorBkg};\n stroke-width: 2px;\n }\n\n g rect.rect {\n filter: ${e};\n stroke: ${t.nodeBorder};\n }\n`},"getStyles"),I="actor-top",f="actor-bottom",R="actor-box",L="actor-man",w=new Set(["redux-color","redux-dark-color"]),P=(0,d.K)(function(t,e){const a=(0,i.tk)(t,e);return"neo"===(0,o.zj)().look&&a.attr("data-look","neo"),a},"drawRect"),N=(0,d.K)(function(t,e,a,r,s){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};const i=e.links,n=e.actorCnt,o=e.rectData;var c="none";s&&(c="block !important");const d=t.append("g");d.attr("id","actor"+n+"_popup"),d.attr("class","actorPopupMenu"),d.attr("display",c);var l="";void 0!==o.class&&(l=" "+o.class);let p=o.width>a?o.width:a;const T=d.append("rect");if(T.attr("class","actorPopupMenuPanel"+l),T.attr("x",o.x),T.attr("y",o.height),T.attr("fill",o.fill),T.attr("stroke",o.stroke),T.attr("width",p),T.attr("height",o.height),T.attr("rx",o.rx),T.attr("ry",o.ry),null!=i){var E=20;for(let t in i){var g=d.append("a"),u=(0,h.J)(i[t]);g.attr("xlink:href",u),g.attr("target","_blank"),ot(r)(t,g,o.x+10,o.height+E,p,20,{class:"actor"},r),E+=30}}return T.attr("height",E),{height:o.height+E,width:p}},"drawPopup"),D=(0,d.K)(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),S=(0,d.K)(async function(t,e,a=null){let r=t.append("foreignObject");const s=await(0,o.dj)(e.text,(0,o.zj)()),i=r.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(s).node().getBoundingClientRect();if(r.attr("height",Math.round(i.height)).attr("width",Math.round(i.width)),"noteText"===e.class){const a=t.node().firstChild;a.setAttribute("height",i.height+2*e.textMargin);const s=a.getBBox();r.attr("x",Math.round(s.x+s.width/2-i.width/2)).attr("y",Math.round(s.y+s.height/2-i.height/2))}else if(a){let{startx:t,stopx:s,starty:n}=a;if(t>s){const e=t;t=s,s=e}r.attr("x",Math.round(t+Math.abs(t-s)/2-i.width/2)),"loopText"===e.class?r.attr("y",Math.round(n)):r.attr("y",Math.round(n-i.height))}return[r]},"drawKatex"),A=(0,d.K)(function(t,e){let a=0,r=0;const s=e.text.split(o.Y2.lineBreakRegex),[i,c]=(0,n.I5)(e.fontSize);let l=[],h=0,p=(0,d.K)(()=>e.y,"yfunc");if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":p=(0,d.K)(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":p=(0,d.K)(()=>Math.round(e.y+(a+r+e.textMargin)/2),"yfunc");break;case"bottom":case"end":p=(0,d.K)(()=>Math.round(e.y+(a+r+2*e.textMargin)-e.textMargin),"yfunc")}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle"}for(let[o,d]of s.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==i&&(h=o*i);const s=t.append("text");s.attr("x",e.x),s.attr("y",p()),void 0!==e.anchor&&s.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&s.style("font-family",e.fontFamily),void 0!==c&&s.style("font-size",c),void 0!==e.fontWeight&&s.style("font-weight",e.fontWeight),void 0!==e.fill&&s.attr("fill",e.fill),void 0!==e.class&&s.attr("class",e.class),void 0!==e.dy?s.attr("dy",e.dy):0!==h&&s.attr("dy",h);const T=d||n.pe;if(e.tspan){const t=s.append("tspan");t.attr("x",e.x),void 0!==e.fill&&t.attr("fill",e.fill),t.text(T)}else s.text(T);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(r+=(s._groups||s)[0][0].getBBox().height,a=r),l.push(s)}return l},"drawText"),k=(0,d.K)(function(t,e){function a(t,e,a,r,s){return t+","+e+" "+(t+a)+","+e+" "+(t+a)+","+(e+r-s)+" "+(t+a-1.2*s)+","+(e+r)+" "+t+","+(e+r)}(0,d.K)(a,"genPoints");const r=t.append("polygon");return r.attr("points",a(e.x,e.y,e.width,e.height,7)),r.attr("class","labelBox"),e.y=e.y+e.height/2,A(t,e),r},"drawLabel"),C=-1,M=(0,d.K)((t,e,a,r)=>{t.select&&a.forEach(a=>{const s=e.get(a),i=t.select("#actor"+s.actorCnt);!r.mirrorActors&&s.stopy?i.attr("y2",s.stopy+s.height/2):r.mirrorActors&&i.attr("y2",s.stopy)})},"fixLifeLineHeights"),v=(0,d.K)(function(t,e,a,r,s){const n=r?e.stopy:e.starty,c=e.x+e.width/2,d=n+e.height,{look:l,theme:h,themeVariables:p}=a,{bkgColorArray:T,borderColorArray:E}=p,g=t.append("g").lower();var u=g;r||(C++,Object.keys(e.links||{}).length&&!a.forceMenus&&u.attr("onclick",D(`actor${C}_popup`)).attr("cursor","pointer"),u.append("line").attr("id","actor"+C).attr("x1",c).attr("y1",d).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),u=g.append("g"),e.actorCnt=C,null!=e.links&&u.attr("id","root-"+C),"neo"===l&&u.attr("data-look","neo"));const y=(0,i.PB)();var _="actor";e.properties?.class?_=e.properties.class:y.fill="#eaeaea",_+=r?` ${f}`:` ${I}`,y.x=e.x,y.y=n,y.width=e.width,y.height=e.height,y.class=_,y.rx=3,y.ry=3,y.name=e.name,"neo"===l&&(y.rx=6,y.ry=6);const O=P(u,y),x=s.get(e.name)??0;if(w.has(h)&&(O.style("stroke",E[x%E.length]),O.style("fill",T[x%E.length])),"neo"===l&&O.attr("filter","url(#drop-shadow)"),e.rectData=y,e.properties?.icon){const t=e.properties.icon.trim();"@"===t.charAt(0)?(0,i.CP)(u,y.x+y.width-20,y.y+10,t.substr(1)):(0,i.aC)(u,y.x+y.width-20,y.y+10,t)}r||(u.attr("data-et","participant"),u.attr("data-type","participant"),u.attr("data-id",e.name)),nt(a,(0,o.Wi)(e.description))(e.description,u,y.x,y.y,y.width,y.height,{class:`actor ${R}`},a);let b=e.height;if(O.node){const t=O.node().getBBox();e.height=t.height,b=t.height}return b},"drawActorTypeParticipant"),Y=(0,d.K)(function(t,e,a,r,s){const n=r?e.stopy:e.starty,c=e.x+e.width/2,d=n+e.height,{look:l,theme:h,themeVariables:p}=a,{bkgColorArray:T,borderColorArray:E}=p,g=t.append("g").lower();var u=g;r||(C++,Object.keys(e.links||{}).length&&!a.forceMenus&&u.attr("onclick",D(`actor${C}_popup`)).attr("cursor","pointer"),u.append("line").attr("id","actor"+C).attr("x1",c).attr("y1",d).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),u=g.append("g"),e.actorCnt=C,null!=e.links&&u.attr("id","root-"+C),"neo"===l&&u.attr("data-look","neo"));const y=(0,i.PB)();var _="actor";e.properties?.class?_=e.properties.class:y.fill="#eaeaea",_+=r?` ${f}`:` ${I}`,y.x=e.x,y.y=n,y.width=e.width,y.height=e.height,y.class=_,y.name=e.name;const O={...y,x:y.x+-6,y:y.y+6,class:"actor"},x=P(u,y),b=P(u,O);e.rectData=y,"neo"===l&&u.attr("filter","url(#drop-shadow)");const m=s.get(e.name)??0;if(w.has(h)&&(x.style("stroke",E[m%E.length]),x.style("fill",T[m%E.length]),b.style("stroke",E[m%E.length]),b.style("fill",T[m%E.length])),e.properties?.icon){const t=e.properties.icon.trim();"@"===t.charAt(0)?(0,i.CP)(u,y.x+y.width-20,y.y+10,t.substr(1)):(0,i.aC)(u,y.x+y.width-20,y.y+10,t)}nt(a,(0,o.Wi)(e.description))(e.description,u,y.x-6,y.y+6,y.width,y.height,{class:`actor ${R}`},a);let L=e.height;if(x.node){const t=x.node().getBBox();e.height=t.height,L=t.height}return r||(u.attr("data-et","participant"),u.attr("data-type","collections"),u.attr("data-id",e.name)),L},"drawActorTypeCollections"),B=(0,d.K)(function(t,e,a,r,s){const n=r?e.stopy:e.starty,c=e.x+e.width/2,d=n+e.height,{look:l,theme:h,themeVariables:p}=a,{bkgColorArray:T,borderColorArray:E}=p,g=t.append("g").lower();let u=g;r||(C++,Object.keys(e.links||{}).length&&!a.forceMenus&&u.attr("onclick",D(`actor${C}_popup`)).attr("cursor","pointer"),u.append("line").attr("id","actor"+C).attr("x1",c).attr("y1",d).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),u=g.append("g"),e.actorCnt=C,null!=e.links&&u.attr("id","root-"+C),"neo"===l&&u.attr("data-look","neo"));const y=(0,i.PB)();let _="actor";e.properties?.class?_=e.properties.class:y.fill="#eaeaea",_+=r?` ${f}`:` ${I}`,u.attr("class",_),y.x=e.x,y.y=n,y.width=e.width,y.height=e.height,y.name=e.name;const O=y.height/2,x=O/(2.5+y.height/50),b=u.append("g"),m=u.append("g"),L=`M ${y.x},${y.y+O}\n a ${x},${O} 0 0 0 0,${y.height}\n h ${y.width-2*x}\n a ${x},${O} 0 0 0 0,-${y.height}\n Z\n `;b.append("path").attr("d",L),m.append("path").attr("d",`M ${y.x},${y.y+O}\n a ${x},${O} 0 0 0 0,${y.height}`),b.attr("transform",`translate(${x}, ${-y.height/2})`),m.attr("transform",`translate(${y.width-x}, ${-y.height/2})`),e.rectData=y,"neo"===l&&b.attr("filter","url(#drop-shadow)");const P=s.get(e.name)??0;if(w.has(h)&&(b.style("stroke",E[P%E.length]),b.style("fill",T[P%E.length]),m.style("stroke",E[P%E.length]),m.style("fill",T[P%E.length])),e.properties?.icon){const t=e.properties.icon.trim(),a=y.x+y.width-20,r=y.y+10;"@"===t.charAt(0)?(0,i.CP)(u,a,r,t.substr(1)):(0,i.aC)(u,a,r,t)}nt(a,(0,o.Wi)(e.description))(e.description,u,y.x,y.y,y.width,y.height,{class:`actor ${R}`},a);let N=e.height;const S=b.select("path:last-child");if(S.node()){const t=S.node().getBBox();e.height=t.height,N=t.height}return r||(u.attr("data-et","participant"),u.attr("data-type","queue"),u.attr("data-id",e.name)),N},"drawActorTypeQueue"),K=(0,d.K)(function(t,e,a,r,s,n){const c=r?e.stopy:e.starty,d=e.x+e.width/2,l=c+75,{look:h,theme:p,themeVariables:T}=a,{bkgColorArray:E,borderColorArray:g,actorBorder:u,actorBkg:y}=T,_=t.append("g").lower();r||(C++,_.append("line").attr("id","actor"+C).attr("x1",d).attr("y1",l).attr("x2",d).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=C);const O=t.append("g");let x=L;x+=r?` ${f}`:` ${I}`,O.attr("class",x),O.attr("name",e.name);const b=(0,i.PB)();b.x=e.x,b.y=c,b.fill="#eaeaea",b.width=e.width,b.height=e.height,b.class="actor";const m=e.x+e.width/2,R=c+32;O.append("defs").append("marker").attr("id",s+"-filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").attr("stroke-width",1.2).append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),O.append("circle").attr("cx",m).attr("cy",R).attr("r",22).attr("filter",""+("neo"===h?"url(#drop-shadow)":"")),O.append("line").attr("marker-end","url(#"+s+"-filled-head-control)").attr("transform",`translate(${m}, ${R-22})`);const P=n.get(e.name)??0;w.has(p)?(O.style("stroke",g[P%g.length]),O.style("fill",E[P%g.length])):(O.style("stroke",u),O.style("fill",y));const N=O.node().getBBox();return e.height=N.height+2*(a?.sequence?.labelBoxHeight??0),nt(a,(0,o.Wi)(e.description))(e.description,O,b.x,b.y+22+(r?5:12),b.width,b.height,{class:`actor ${L}`},a),r||(O.attr("data-et","participant"),O.attr("data-type","control"),O.attr("data-id",e.name)),e.height},"drawActorTypeControl"),$=(0,d.K)(function(t,e,a,r,s){const n=r?e.stopy:e.starty,c=e.x+e.width/2,d=n+75,{look:l,theme:h,themeVariables:p}=a,{bkgColorArray:T,borderColorArray:E}=p,g=t.append("g").lower(),u=t.append("g");let y="actor";y+=r?` ${f}`:` ${I}`,u.attr("class",y),u.attr("name",e.name);const _=(0,i.PB)();_.x=e.x,_.y=n,_.fill="#eaeaea",_.width=e.width,_.height=e.height,_.class="actor";const O=e.x+e.width/2,x=n+(r?10:25),b=22;u.append("circle").attr("cx",O).attr("cy",x).attr("r",b).attr("width",e.width).attr("height",e.height),u.append("line").attr("x1",O-b).attr("x2",O+b).attr("y1",x+b).attr("y2",x+b).attr("stroke-width",2),"neo"===l&&u.attr("filter","url(#drop-shadow)");const m=s.get(e.name)??0;w.has(h)&&(u.style("stroke",E[m%E.length]),u.style("fill",T[m%E.length]));const R=u.node().getBBox();return e.height=R.height+(a?.sequence?.labelBoxHeight??0),r||(C++,g.append("line").attr("id","actor"+C).attr("x1",c).attr("y1",d).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=C),nt(a,(0,o.Wi)(e.description))(e.description,u,_.x,_.y+(r?15:30),_.width,_.height,{class:`actor ${L}`},a),r?u.attr("transform","translate(0, 22)"):(u.attr("transform","translate(0, 6)"),u.attr("data-et","participant"),u.attr("data-type","entity"),u.attr("data-id",e.name)),e.height},"drawActorTypeEntity"),V=(0,d.K)(function(t,e,a,r,s){const n=r?e.stopy:e.starty,c=e.x+e.width/2,d=n+e.height+2*a.boxTextMargin,{theme:l,themeVariables:h,look:p}=a,{bkgColorArray:T,borderColorArray:E,actorBorder:g}=h,u=t.append("g").lower();let y=u;r||(C++,Object.keys(e.links||{}).length&&!a.forceMenus&&y.attr("onclick",D(`actor${C}_popup`)).attr("cursor","pointer"),y.append("line").attr("id","actor"+C).attr("x1",c).attr("y1",d).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),y=u.append("g"),e.actorCnt=C,null!=e.links&&y.attr("id","root-"+C),"neo"===p&&y.attr("data-look","neo"));const _=(0,i.PB)();let O="actor";e.properties?.class?O=e.properties.class:_.fill="#eaeaea",O+=r?` ${f}`:` ${I}`,_.x=e.x,_.y=n,_.width=e.width,_.height=e.height,_.class=O,_.name=e.name,_.x=e.x,_.y=n;const x=_.width/3,b=_.width/3,m=x/2,L=m/(2.5+x/50),P=y.append("g");P.attr("class",O);const N=`\n M ${_.x},${_.y+L}\n a ${m},${L} 0 0 0 ${x},0\n a ${m},${L} 0 0 0 -${x},0\n l 0,${b-2*L}\n a ${m},${L} 0 0 0 ${x},0\n l 0,-${b-2*L}\n`;P.append("path").attr("d",N),"neo"===p&&P.attr("filter","url(#drop-shadow)");const S=s.get(e.name)??0;w.has(l)?(P.style("stroke",E[S%E.length]),P.style("fill",T[S%E.length])):P.style("stroke",g),P.attr("transform",`translate(${x}, ${L})`),e.rectData=_,nt(a,(0,o.Wi)(e.description))(e.description,y,_.x,_.y+35,_.width,_.height,{class:`actor ${R}`},a);const A=P.select("path:last-child");if(A.node()){const t=A.node().getBBox();e.height=t.height+(a.sequence.labelBoxHeight??0)}return r||(y.attr("data-et","participant"),y.attr("data-type","database"),y.attr("data-id",e.name)),e.height},"drawActorTypeDatabase"),W=(0,d.K)(function(t,e,a,r,s){const n=r?e.stopy:e.starty,c=e.x+e.width/2,d=n+80,l=t.append("g").lower(),{look:h,theme:p,themeVariables:T}=a,{bkgColorArray:E,borderColorArray:g,actorBorder:u}=T;r||(C++,l.append("line").attr("id","actor"+C).attr("x1",c).attr("y1",d).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=C);const y=t.append("g");let _=L;_+=r?` ${f}`:` ${I}`,y.attr("class",_),y.attr("name",e.name);const O=(0,i.PB)();O.x=e.x,O.y=n,O.fill="#eaeaea",O.width=e.width,O.height=e.height,O.class="actor",y.append("line").attr("id","actor-man-torso"+C).attr("x1",e.x+e.width/2-55).attr("y1",n+12).attr("x2",e.x+e.width/2-15).attr("y2",n+12),y.append("line").attr("id","actor-man-arms"+C).attr("x1",e.x+e.width/2-55).attr("y1",n+2).attr("x2",e.x+e.width/2-55).attr("y2",n+22),y.append("circle").attr("cx",e.x+e.width/2).attr("cy",n+12).attr("r",22),"neo"===h&&y.attr("filter","url(#drop-shadow)");const x=s.get(e.name)??0;w.has(p)?(y.style("stroke",g[x%g.length]),y.style("fill",E[x%g.length])):y.style("stroke",u);const b=y.node().getBBox();return e.height=b.height+(a.sequence.labelBoxHeight??0),nt(a,(0,o.Wi)(e.description))(e.description,y,O.x,O.y+15,O.width,O.height,{class:`actor ${L}`},a),y.attr("transform","translate(0,21)"),r||(y.attr("data-et","participant"),y.attr("data-type","boundary"),y.attr("data-id",e.name)),e.height},"drawActorTypeBoundary"),F=(0,d.K)(function(t,e,a,r,s){const n=r?e.stopy:e.starty,c=e.x+e.width/2,d=n+80,{look:l,theme:h,themeVariables:p}=a,{bkgColorArray:T,borderColorArray:E,actorBorder:g}=p,u=t.append("g").lower();r||(C++,u.append("line").attr("id","actor"+C).attr("x1",c).attr("y1",d).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=C);const y=t.append("g");let _=L;_+=r?` ${f}`:` ${I}`,y.attr("class",_),y.attr("name",e.name),r||y.attr("data-et","participant").attr("data-type","actor").attr("data-id",e.name);const O="neo"===l?.5:1,x="neo"===l?n+30*(1-O):n;y.append("line").attr("id","actor-man-torso"+C).attr("x1",c).attr("y1",x+25*O).attr("x2",c).attr("y2",x+45*O),y.append("line").attr("id","actor-man-arms"+C).attr("x1",c-18*O).attr("y1",x+33*O).attr("x2",c+18*O).attr("y2",x+33*O),y.append("line").attr("x1",c-18*O).attr("y1",x+60*O).attr("x2",c).attr("y2",x+45*O),y.append("line").attr("x1",c).attr("y1",x+45*O).attr("x2",c+16*O).attr("y2",x+60*O);const b=y.append("circle");b.attr("cx",e.x+e.width/2),b.attr("cy",x+10*O),b.attr("r",15*O),b.attr("width",e.width*O),b.attr("height",e.height*O);const m=y.node().getBBox();e.height=m.height;const R=(0,i.PB)();R.x=e.x,R.y=x,R.fill="#eaeaea",R.width=e.width,R.height=e.height/O,R.class="actor",R.rx=3,R.ry=3;const P=s.get(e.name)??0;return w.has(h)?(y.style("stroke",E[P%E.length]),y.style("fill",T[P%E.length])):y.style("stroke",g),nt(a,(0,o.Wi)(e.description))(e.description,y,R.x,x+35*O-("neo"===l?10:0),R.width,R.height,{class:`actor ${L}`},a),e.height},"drawActorTypeActor"),H=(0,d.K)(async function(t,e,a,r,s,i,n){const o=n??new Map([...i.db.getActors().values()].map((t,e)=>[t.name,e]));switch(e.type){case"actor":return await F(t,e,a,r,o);case"participant":return await v(t,e,a,r,o);case"boundary":return await W(t,e,a,r,o);case"control":return await K(t,e,a,r,s,o);case"entity":return await $(t,e,a,r,o);case"database":return await V(t,e,a,r,o);case"collections":return await Y(t,e,a,r,o);case"queue":return await B(t,e,a,r,o)}},"drawActor"),q=(0,d.K)(function(t,e,a){const r=t.append("g");G(r,e),e.name&&nt(a)(e.name,r,e.x,e.y+a.boxTextMargin+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},a),r.lower()},"drawBox"),z=(0,d.K)(function(t){return t.append("g")},"anchorElement"),j=(0,d.K)(function(t,e,a,r,s,n,o){const{theme:c,themeVariables:d}=r,{bkgColorArray:l,borderColorArray:h,mainBkg:p}=d,T=(0,i.PB)(),E=e.anchored,g=e.actor;T.x=e.startx,T.y=e.starty,T.class="activation"+s%3,T.width=e.stopx-e.startx,T.height=a-e.starty;const u=P(E,T),y=(o??new Map([...n.db.getActors().values()].map((t,e)=>[t.name,e]))).get(g)??0;w.has(c)&&(u.style("stroke",h[y%h.length]),u.style("fill",l[y%h.length]??p))},"drawActivation"),U=(0,d.K)(async function(t,e,a,r,s){const{boxMargin:n,boxTextMargin:c,labelBoxHeight:l,labelBoxWidth:h,messageFontFamily:p,messageFontSize:T,messageFontWeight:E}=r,g=t.append("g").attr("data-et","control-structure").attr("data-id","i"+s.id),u=(0,d.K)(function(t,e,a,r){return g.append("line").attr("x1",t).attr("y1",e).attr("x2",a).attr("y2",r).attr("class","loopLine")},"drawLoopLine");u(e.startx,e.starty,e.stopx,e.starty),u(e.stopx,e.starty,e.stopx,e.stopy),u(e.startx,e.stopy,e.stopx,e.stopy),u(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach(function(t){u(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")});let y=(0,i.HT)();y.text=a,y.x=e.startx,y.y=e.starty,y.fontFamily=p,y.fontSize=T,y.fontWeight=E,y.anchor="middle",y.valign="middle",y.tspan=!1,y.width=Math.max(h??0,50),y.height=l+("neo"===r.look?15:0)||20,y.textMargin=c,y.class="labelText",k(g,y),y=st(),y.text=e.title,y.x=e.startx+h/2+(e.stopx-e.startx)/2,y.y=e.starty+n+c,y.anchor="middle",y.valign="middle",y.textMargin=c,y.class="loopText",y.fontFamily=p,y.fontSize=T,y.fontWeight=E,y.wrap=!0;let _=(0,o.Wi)(y.text)?await S(g,y,e):A(g,y);if(void 0!==e.sectionTitles)for(const[i,d]of Object.entries(e.sectionTitles))if(d.message){y.text=d.message,y.x=e.startx+(e.stopx-e.startx)/2,y.y=e.sections[i].y+n+c,y.class="sectionTitle",y.anchor="middle",y.valign="middle",y.tspan=!1,y.fontFamily=p,y.fontSize=T,y.fontWeight=E,y.wrap=e.wrap,(0,o.Wi)(y.text)?(e.starty=e.sections[i].y,await S(g,y,e)):A(g,y);let t=Math.round(_.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));e.sections[i].height+=t-(n+c)}return e.height=Math.round(e.stopy-e.starty),g},"drawLoop"),G=(0,d.K)(function(t,e){(0,i.lC)(t,e)},"drawBackgroundRect"),X=(0,d.K)(function(t,e){t.append("defs").append("symbol").attr("id",e+"-database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),J=(0,d.K)(function(t,e){t.append("defs").append("symbol").attr("id",e+"-computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),Z=(0,d.K)(function(t,e){t.append("defs").append("symbol").attr("id",e+"-clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),Q=(0,d.K)(function(t,e){t.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),tt=(0,d.K)(function(t,e){t.append("defs").append("marker").attr("id",e+"-filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),et=(0,d.K)(function(t,e){t.append("defs").append("marker").attr("id",e+"-sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),at=(0,d.K)(function(t,e){t.append("defs").append("marker").attr("id",e+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),rt=(0,d.K)(function(t,e){const{theme:a}=e;t.append("defs").append("filter").attr("id","drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",""+("redux"===a||"redux-color"===a?"#000000":"#FFFFFF"))},"insertDropShadow"),st=(0,d.K)(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),it=(0,d.K)(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),nt=function(){function t(t,e,a,r,i,n,o){s(e.append("text").attr("x",a+i/2).attr("y",r+n/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,a,r,i,c,d,l){const{actorFontSize:h,actorFontFamily:p,actorFontWeight:T}=l,[E,g]=(0,n.I5)(h),u=t.split(o.Y2.lineBreakRegex);for(let n=0;nt.height||0))+(0===this.loops.length?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.messages.length?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.notes.length?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},"getHeight"),clear:(0,d.K)(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:(0,d.K)(function(t){this.boxes.push(t)},"addBox"),addActor:(0,d.K)(function(t){this.actors.push(t)},"addActor"),addLoop:(0,d.K)(function(t){this.loops.push(t)},"addLoop"),addMessage:(0,d.K)(function(t){this.messages.push(t)},"addMessage"),addNote:(0,d.K)(function(t){this.notes.push(t)},"addNote"),lastActor:(0,d.K)(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:(0,d.K)(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:(0,d.K)(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:(0,d.K)(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:(0,d.K)(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,Rt((0,o.D7)())},"init"),updateVal:(0,d.K)(function(t,e,a,r){void 0===t[e]?t[e]=a:t[e]=r(a,t[e])},"updateVal"),updateBounds:(0,d.K)(function(t,e,a,r){const s=this;let i=0;function n(n){return(0,d.K)(function(o){i++;const c=s.sequenceItems.length-i+1;s.updateVal(o,"starty",e-c*Tt.boxMargin,Math.min),s.updateVal(o,"stopy",r+c*Tt.boxMargin,Math.max),s.updateVal(Et.data,"startx",t-c*Tt.boxMargin,Math.min),s.updateVal(Et.data,"stopx",a+c*Tt.boxMargin,Math.max),"activation"!==n&&(s.updateVal(o,"startx",t-c*Tt.boxMargin,Math.min),s.updateVal(o,"stopx",a+c*Tt.boxMargin,Math.max),s.updateVal(Et.data,"starty",e-c*Tt.boxMargin,Math.min),s.updateVal(Et.data,"stopy",r+c*Tt.boxMargin,Math.max))},"updateItemBounds")}(0,d.K)(n,"updateFn"),this.sequenceItems.forEach(n()),this.activations.forEach(n("activation"))},"updateBounds"),insert:(0,d.K)(function(t,e,a,r){const s=o.Y2.getMin(t,a),i=o.Y2.getMax(t,a),n=o.Y2.getMin(e,r),c=o.Y2.getMax(e,r);this.updateVal(Et.data,"startx",s,Math.min),this.updateVal(Et.data,"starty",n,Math.min),this.updateVal(Et.data,"stopx",i,Math.max),this.updateVal(Et.data,"stopy",c,Math.max),this.updateBounds(s,n,i,c)},"insert"),newActivation:(0,d.K)(function(t,e,a){const r=a.get(t.from),s=Lt(t.from).length||0,i=r.x+r.width/2+(s-1)*Tt.activationWidth/2;this.activations.push({startx:i,starty:this.verticalPos+2,stopx:i+Tt.activationWidth,stopy:void 0,actor:t.from,anchored:pt.anchorElement(e)})},"newActivation"),endActivation:(0,d.K)(function(t){const e=this.activations.map(function(t){return t.actor}).lastIndexOf(t.from);return this.activations.splice(e,1)[0]},"endActivation"),createLoop:(0,d.K)(function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},"createLoop"),newLoop:(0,d.K)(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:(0,d.K)(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:(0,d.K)(function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap},"isLoopOverlap"),addSectionToLoop:(0,d.K)(function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:Et.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:(0,d.K)(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:(0,d.K)(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:(0,d.K)(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=o.Y2.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:(0,d.K)(function(){return this.verticalPos},"getVerticalPos"),getBounds:(0,d.K)(function(){return{bounds:this.data,models:this.models}},"getBounds")},gt=(0,d.K)(async function(t,e,a){Et.bumpVerticalPos(Tt.boxMargin),e.height=Tt.boxMargin,e.starty=Et.getVerticalPos();const r=(0,i.PB)();r.x=e.startx,r.y=e.starty,r.width=e.width||Tt.width,r.class="note";const s=t.append("g");s.attr("data-et","note"),s.attr("data-id","i"+a);const n=pt.drawRect(s,r),c=(0,i.HT)();c.x=e.startx,c.y=e.starty,c.width=r.width,c.dy="1em",c.text=e.message,c.class="noteText",c.fontFamily=Tt.noteFontFamily,c.fontSize=Tt.noteFontSize,c.fontWeight=Tt.noteFontWeight,c.anchor=Tt.noteAlign,c.textMargin=Tt.noteMargin,c.valign="center";const d=(0,o.Wi)(c.text)?await S(s,c):A(s,c),l=Math.round(d.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));n.attr("height",l+2*Tt.noteMargin),e.height+=l+2*Tt.noteMargin,Et.bumpVerticalPos(l+2*Tt.noteMargin),e.stopy=e.starty+l+2*Tt.noteMargin,e.stopx=e.startx+r.width,Et.insert(e.startx,e.starty,e.stopx,e.stopy),Et.models.addNote(e)},"drawNote"),ut=(0,d.K)(function(t,e,a,r,s,i,n){const o=r.db.getActors(),c=o.get(e.from),l=o.get(e.to),h=a.sequenceVisible;let p=c.x+c.width/2,T=l.x+l.width/2;const E=p<=T,g=Yt(e,r),u=t.append("g"),y=(0,d.K)((t,e)=>{const a=t?16.5:-16.5;return e?-a:a},"getCircleOffset"),_=(0,d.K)(t=>{u.append("circle").attr("cx",t).attr("cy",n).attr("r",5).attr("width",10).attr("height",10)},"drawCircle"),{CENTRAL_CONNECTION:O,CENTRAL_CONNECTION_REVERSE:x,CENTRAL_CONNECTION_DUAL:b}=r.db.LINETYPE;if(h)switch(e.centralConnection){case O:g&&(T+=y(E,!0));break;case x:g||(p+=y(E,!1));break;case b:g?T+=y(E,!0):p+=y(E,!1)}switch(e.centralConnection){case O:_(T);break;case x:_(p);break;case b:_(p),_(T)}},"drawCentralConnection"),yt=(0,d.K)(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),_t=(0,d.K)(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),Ot=(0,d.K)(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont");async function xt(t,e){Et.bumpVerticalPos(10);const{startx:a,stopx:r,message:s}=e,i=o.Y2.splitBreaks(s).length,c=(0,o.Wi)(s),d=c?await(0,o.Dl)(s,(0,o.D7)()):n._K.calculateTextDimensions(s,yt(Tt));if(!c){const t=d.height/i;e.height+=t,Et.bumpVerticalPos(t)}let l,h=d.height-10;const p=d.width;if(a===r){l=Et.getVerticalPos()+h,Tt.rightAngles||(h+=Tt.boxMargin,l=Et.getVerticalPos()+h),h+=30;const t=o.Y2.getMax(p/2,Tt.width/2);Et.insert(a-t,Et.getVerticalPos()-10+h,r+t,Et.getVerticalPos()+30+h)}else h+=Tt.boxMargin,l=Et.getVerticalPos()+h,Et.insert(a,l-10,r,l);return Et.bumpVerticalPos(h),e.height+=h,e.stopy=e.starty+e.height,Et.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),l}(0,d.K)(xt,"boundMessage");var bt=(0,d.K)(async function(t,e,a,r,s,c){const{startx:d,stopx:l,starty:h,message:p,type:T,sequenceIndex:E,sequenceVisible:g}=e,u=n._K.calculateTextDimensions(p,yt(Tt)),y=(0,i.HT)();y.x=Math.min(d,l),y.y=h+10,y.width=Math.abs(l-d),y.class="messageText",y.dy="1em",y.text=p,y.fontFamily=Tt.messageFontFamily,y.fontSize=Tt.messageFontSize,y.fontWeight=Tt.messageFontWeight,y.anchor=Tt.messageAlign,y.valign="center",y.textMargin=Tt.wrapPadding,y.tspan=!1,(0,o.Wi)(y.text)?await S(t,y,{startx:d,stopx:l,starty:a}):A(t,y);const _=u.width;let O;if(d===l){const i=g||Tt.showSequenceNumbers,n=Yt(s,r),c=Bt(s,r),h=d+(i&&(n||c)?10:0);O=Tt.rightAngles?t.append("path").attr("d",`M ${h},${a} H ${d+o.Y2.getMax(Tt.width/2,_/2)} V ${a+25} H ${d}`):t.append("path").attr("d","M "+h+","+a+" C "+(h+60)+","+(a-10)+" "+(d+60)+","+(a+30)+" "+d+","+(a+20)),Mt(s,r)&&ut(t,s,e,r,d,l,a)}else O=t.append("line"),O.attr("x1",d),O.attr("y1",a),O.attr("x2",l),O.attr("y2",a),Mt(s,r)&&ut(t,s,e,r,d,l,a);T===r.db.LINETYPE.DOTTED||T===r.db.LINETYPE.DOTTED_CROSS||T===r.db.LINETYPE.DOTTED_POINT||T===r.db.LINETYPE.DOTTED_OPEN||T===r.db.LINETYPE.BIDIRECTIONAL_DOTTED||T===r.db.LINETYPE.SOLID_TOP_DOTTED||T===r.db.LINETYPE.SOLID_BOTTOM_DOTTED||T===r.db.LINETYPE.STICK_TOP_DOTTED||T===r.db.LINETYPE.STICK_BOTTOM_DOTTED||T===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||T===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||T===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||T===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(O.style("stroke-dasharray","3, 3"),O.attr("class","messageLine1")):O.attr("class","messageLine0"),O.attr("data-et","message"),O.attr("data-id","i"+e.id),O.attr("data-from",e.from),O.attr("data-to",e.to);let x="";if(Tt.arrowMarkerAbsolute&&(x=(0,o.ID)(!0)),O.attr("stroke-width",2),O.attr("stroke","none"),O.style("fill","none"),T!==r.db.LINETYPE.SOLID_TOP&&T!==r.db.LINETYPE.SOLID_TOP_DOTTED||O.attr("marker-end","url("+x+"#"+c+"-solidTopArrowHead)"),T!==r.db.LINETYPE.SOLID_BOTTOM&&T!==r.db.LINETYPE.SOLID_BOTTOM_DOTTED||O.attr("marker-end","url("+x+"#"+c+"-solidBottomArrowHead)"),T!==r.db.LINETYPE.STICK_TOP&&T!==r.db.LINETYPE.STICK_TOP_DOTTED||O.attr("marker-end","url("+x+"#"+c+"-stickTopArrowHead)"),T!==r.db.LINETYPE.STICK_BOTTOM&&T!==r.db.LINETYPE.STICK_BOTTOM_DOTTED||O.attr("marker-end","url("+x+"#"+c+"-stickBottomArrowHead)"),T!==r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE&&T!==r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||O.attr("marker-start","url("+x+"#"+c+"-solidBottomArrowHead)"),T!==r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE&&T!==r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||O.attr("marker-start","url("+x+"#"+c+"-solidTopArrowHead)"),T!==r.db.LINETYPE.STICK_ARROW_TOP_REVERSE&&T!==r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||O.attr("marker-start","url("+x+"#"+c+"-stickBottomArrowHead)"),T!==r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE&&T!==r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED||O.attr("marker-start","url("+x+"#"+c+"-stickTopArrowHead)"),T!==r.db.LINETYPE.SOLID&&T!==r.db.LINETYPE.DOTTED||O.attr("marker-end","url("+x+"#"+c+"-arrowhead)"),T!==r.db.LINETYPE.BIDIRECTIONAL_SOLID&&T!==r.db.LINETYPE.BIDIRECTIONAL_DOTTED||(O.attr("marker-start","url("+x+"#"+c+"-arrowhead)"),O.attr("marker-end","url("+x+"#"+c+"-arrowhead)")),T!==r.db.LINETYPE.SOLID_POINT&&T!==r.db.LINETYPE.DOTTED_POINT||O.attr("marker-end","url("+x+"#"+c+"-filled-head)"),T!==r.db.LINETYPE.SOLID_CROSS&&T!==r.db.LINETYPE.DOTTED_CROSS||O.attr("marker-end","url("+x+"#"+c+"-crosshead)"),g||Tt.showSequenceNumbers){const i=T===r.db.LINETYPE.BIDIRECTIONAL_SOLID||T===r.db.LINETYPE.BIDIRECTIONAL_DOTTED,n=T===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||T===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||T===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||T===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||T===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE||T===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||T===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||T===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,o=6,h=Mt(s,r);let p=d,g=l;i?(dd?g=l-2*o:(g=l-o,p+=s?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_DUAL||s?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),g+=h?15:0,O.attr("x2",g),O.attr("x1",p)):O.attr("x1",d+o);let u=0;const y=d<=l;u=d===l?e.fromBounds+1:n?y?e.toBounds-1:e.fromBounds+1:y?e.fromBounds+1:e.toBounds-1;let _="12px";const b=E.toString().length;b>5?_="7px":b>3&&(_="9px"),t.append("line").attr("x1",u).attr("y1",a).attr("x2",u).attr("y2",a).attr("stroke-width",0).attr("marker-start","url("+x+"#"+c+"-sequencenumber)"),t.append("text").attr("x",u).attr("y",a+4).attr("font-family","sans-serif").attr("font-size",_).attr("text-anchor","middle").attr("class","sequenceNumber").text(E)}},"drawMessage"),mt=(0,d.K)(function(t,e,a,r,s,i,n){let c,d=0,l=0,h=0;for(const p of r){const t=e.get(p),r=t.box;c&&c!=r&&(n||Et.models.addBox(c),l+=Tt.boxMargin+c.margin),r&&r!=c&&(n||(r.x=d+l,r.y=s),l+=r.margin),t.width=o.Y2.getMax(t.width||Tt.width,Tt.width),t.height=o.Y2.getMax(t.height||Tt.height,Tt.height),t.margin=t.margin||Tt.actorMargin,h=o.Y2.getMax(h,t.height),a.get(t.name)&&(l+=t.width/2),t.x=d+l,t.starty=Et.getVerticalPos(),Et.insert(t.x,s,t.x+t.width,t.height),d+=t.width+l,t.box&&(t.box.width=d+r.margin-t.box.x),l=t.margin,c=t.box,Et.models.addActor(t)}c&&!n&&Et.models.addBox(c),Et.bumpVerticalPos(h)},"addActorRenderingData"),It=(0,d.K)(async function(t,e,a,r,s,i,n){if(r){let r=0;Et.bumpVerticalPos(2*Tt.boxMargin);for(const c of a){const a=e.get(c);a.stopy||(a.stopy=Et.getVerticalPos());const d=await pt.drawActor(t,a,Tt,!0,s,i,n);r=o.Y2.getMax(r,d)}Et.bumpVerticalPos(r+Tt.boxMargin)}else for(const o of a){const a=e.get(o);await pt.drawActor(t,a,Tt,!1,s,i,n)}},"drawActors"),ft=(0,d.K)(function(t,e,a,r){let s=0,i=0;for(const n of a){const a=e.get(n),o=At(a),c=pt.drawPopup(t,a,o,Tt,Tt.forceMenus,r);c.height>s&&(s=c.height),c.width+a.x>i&&(i=c.width+a.x)}return{maxHeight:s,maxWidth:i}},"drawActorsPopup"),Rt=(0,d.K)(function(t){(0,o.hH)(Tt,t),t.fontFamily&&(Tt.actorFontFamily=Tt.noteFontFamily=Tt.messageFontFamily=t.fontFamily),t.fontSize&&(Tt.actorFontSize=Tt.noteFontSize=Tt.messageFontSize=t.fontSize),t.fontWeight&&(Tt.actorFontWeight=Tt.noteFontWeight=Tt.messageFontWeight=t.fontWeight)},"setConf"),Lt=(0,d.K)(function(t){return Et.activations.filter(function(e){return e.actor===t})},"actorActivations"),wt=(0,d.K)(function(t,e){const a=e.get(t),r=Lt(t);return[r.reduce(function(t,e){return o.Y2.getMin(t,e.startx)},a.x+a.width/2-1),r.reduce(function(t,e){return o.Y2.getMax(t,e.stopx)},a.x+a.width/2+1)]},"activationBounds");function Pt(t,e,a,r,s){Et.bumpVerticalPos(a);let i=r;if(e.id&&e.message&&t[e.id]){const a=t[e.id].width,s=yt(Tt);e.message=n._K.wrapLabel(`[${e.message}]`,a-2*Tt.wrapPadding,s),e.width=a,e.wrap=!0;const d=n._K.calculateTextDimensions(e.message,s),l=o.Y2.getMax(d.height,Tt.labelBoxHeight);i=r+l,c.R.debug(`${l} - ${e.message}`)}s(e),Et.bumpVerticalPos(i)}function Nt(t,e,a,r,s,i,n){function o(a,r){a.x{t.add(e.from),t.add(e.to)}),x=x.filter(e=>t.has(e))}const L=new Map(x.map((t,e)=>[u.get(t)?.name??t,e]));mt(g,u,y,x,0,b,!1);const w=await $t(b,u,R,r);function P(t,e){const a=Et.endActivation(t);a.starty+18>e&&(a.starty=e-6,e+=12),pt.drawActivation(g,a,e,Tt,Lt(t.from).length,r,L),Et.insert(a.startx,e-10,a.stopx,e)}pt.insertArrowHead(g,e),pt.insertArrowCrossHead(g,e),pt.insertArrowFilledHead(g,e),pt.insertSequenceNumber(g,e),pt.insertSolidTopArrowHead(g,e),pt.insertSolidBottomArrowHead(g,e),pt.insertStickTopArrowHead(g,e),pt.insertStickBottomArrowHead(g,e),"neo"===n&&pt.insertDropShadow(g,Tt),(0,d.K)(P,"activeEnd");let N=1,D=1;const S=[],A=[];let k=0;for(const o of b){let t,e,a;switch(o.type){case r.db.LINETYPE.NOTE:Et.resetVerticalPos(),e=o.noteModel,await gt(g,e,o.id);break;case r.db.LINETYPE.ACTIVE_START:case r.db.LINETYPE.CENTRAL_CONNECTION:case r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:Et.newActivation(o,g,u);break;case r.db.LINETYPE.ACTIVE_END:P(o,Et.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:Pt(w,o,Tt.boxMargin,Tt.boxMargin+Tt.boxTextMargin,t=>Et.newLoop(t));break;case r.db.LINETYPE.LOOP_END:t=Et.endLoop(),await pt.drawLoop(g,t,"loop",Tt,o),Et.bumpVerticalPos(t.stopy-Et.getVerticalPos()),Et.models.addLoop(t);break;case r.db.LINETYPE.RECT_START:Pt(w,o,Tt.boxMargin,Tt.boxMargin,t=>{let e=t.message;e||(e=h?.rectBkgColor||h?.actorBkg||"rgba(128, 128, 128, 0.5)"),Et.newLoop(void 0,e)});break;case r.db.LINETYPE.RECT_END:t=Et.endLoop(),A.push(t),Et.models.addLoop(t),Et.bumpVerticalPos(t.stopy-Et.getVerticalPos());break;case r.db.LINETYPE.OPT_START:Pt(w,o,Tt.boxMargin,Tt.boxMargin+Tt.boxTextMargin,t=>Et.newLoop(t));break;case r.db.LINETYPE.OPT_END:t=Et.endLoop(),await pt.drawLoop(g,t,"opt",Tt,o),Et.bumpVerticalPos(t.stopy-Et.getVerticalPos()),Et.models.addLoop(t);break;case r.db.LINETYPE.ALT_START:Pt(w,o,Tt.boxMargin,Tt.boxMargin+Tt.boxTextMargin,t=>Et.newLoop(t));break;case r.db.LINETYPE.ALT_ELSE:Pt(w,o,Tt.boxMargin+Tt.boxTextMargin,Tt.boxMargin,t=>Et.addSectionToLoop(t));break;case r.db.LINETYPE.ALT_END:t=Et.endLoop(),await pt.drawLoop(g,t,"alt",Tt,o),Et.bumpVerticalPos(t.stopy-Et.getVerticalPos()),Et.models.addLoop(t);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:Pt(w,o,Tt.boxMargin,Tt.boxMargin+Tt.boxTextMargin,t=>Et.newLoop(t)),Et.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:Pt(w,o,Tt.boxMargin+Tt.boxTextMargin,Tt.boxMargin,t=>Et.addSectionToLoop(t));break;case r.db.LINETYPE.PAR_END:t=Et.endLoop(),await pt.drawLoop(g,t,"par",Tt,o),Et.bumpVerticalPos(t.stopy-Et.getVerticalPos()),Et.models.addLoop(t);break;case r.db.LINETYPE.AUTONUMBER:N=o.message.start||N,D=o.message.step||D,o.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:Pt(w,o,Tt.boxMargin,Tt.boxMargin+Tt.boxTextMargin,t=>Et.newLoop(t));break;case r.db.LINETYPE.CRITICAL_OPTION:Pt(w,o,Tt.boxMargin+Tt.boxTextMargin,Tt.boxMargin,t=>Et.addSectionToLoop(t));break;case r.db.LINETYPE.CRITICAL_END:t=Et.endLoop(),await pt.drawLoop(g,t,"critical",Tt,o),Et.bumpVerticalPos(t.stopy-Et.getVerticalPos()),Et.models.addLoop(t);break;case r.db.LINETYPE.BREAK_START:Pt(w,o,Tt.boxMargin,Tt.boxMargin+Tt.boxTextMargin,t=>Et.newLoop(t));break;case r.db.LINETYPE.BREAK_END:t=Et.endLoop(),await pt.drawLoop(g,t,"break",Tt,o),Et.bumpVerticalPos(t.stopy-Et.getVerticalPos()),Et.models.addLoop(t);break;default:try{a=o.msgModel,a.starty=Et.getVerticalPos(),a.sequenceIndex=N,a.sequenceVisible=r.db.showSequenceNumbers(),a.id=o.id,a.from=o.from,a.to=o.to;const t=await xt(0,a);Nt(o,a,t,k,u,y,_),S.push({messageModel:a,lineStartY:t,msg:o}),Et.models.addMessage(a)}catch(F){c.R.error("error while drawing message",F)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.SOLID_TOP,r.db.LINETYPE.SOLID_BOTTOM,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.SOLID_TOP_DOTTED,r.db.LINETYPE.SOLID_BOTTOM_DOTTED,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(o.type)&&(N=Math.round(100*(N+D))/100),k++}c.R.debug("createdActors",y),c.R.debug("destroyedActors",_),await It(g,u,x,!1,e,r,L);for(const o of S)await bt(g,o.messageModel,o.lineStartY,r,o.msg,e);Tt.mirrorActors&&await It(g,u,x,!0,e,r,L),A.forEach(t=>pt.drawBackgroundRect(g,t)),M(g,u,x,Tt);for(const o of Et.models.boxes){o.height=Et.getVerticalPos()-o.y,Et.insert(o.x,o.y,o.x+o.width,o.height);const t=2*Tt.boxMargin;o.startx=o.x-t,o.starty=o.y-.25*t,o.stopx=o.startx+o.width+2*t,o.stopy=o.starty+o.height+.75*t,o.stroke="rgb(0,0,0, 0.5)",pt.drawBox(g,o,Tt)}I&&Et.bumpVerticalPos(Tt.boxMargin);const C=ft(g,u,x,E),{bounds:v}=Et.getBounds();void 0===v.startx&&(v.startx=0),void 0===v.starty&&(v.starty=0),void 0===v.stopx&&(v.stopx=0),void 0===v.stopy&&(v.stopy=0);let Y=v.stopy-v.starty;Y{const a=yt(Tt);let r=e.actorKeys.reduce((e,a)=>e+(t.get(a).width+(t.get(a).margin||0)),0);r+=8*Tt.boxMargin,r-=2*Tt.boxTextMargin,e.wrap&&(e.name=n._K.wrapLabel(e.name,r-2*Tt.wrapPadding,a));const i=n._K.calculateTextDimensions(e.name,a);s=o.Y2.getMax(i.height,s);const c=o.Y2.getMax(r,i.width+2*Tt.wrapPadding);if(e.margin=Tt.boxTextMargin,rt.textMaxHeight=s),o.Y2.getMax(r,Tt.height)}(0,d.K)(kt,"calculateActorMargins");var Ct=(0,d.K)(async function(t,e,a){const r=e.get(t.from),s=e.get(t.to),i=r.x,d=s.x,l=t.wrap&&t.message;let h=(0,o.Wi)(t.message)?await(0,o.Dl)(t.message,(0,o.D7)()):n._K.calculateTextDimensions(l?n._K.wrapLabel(t.message,Tt.width,_t(Tt)):t.message,_t(Tt));const p={width:l?Tt.width:o.Y2.getMax(Tt.width,h.width+2*Tt.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===a.db.PLACEMENT.RIGHTOF?(p.width=l?o.Y2.getMax(Tt.width,h.width):o.Y2.getMax(r.width/2+s.width/2,h.width+2*Tt.noteMargin),p.startx=i+(r.width+Tt.actorMargin)/2):t.placement===a.db.PLACEMENT.LEFTOF?(p.width=l?o.Y2.getMax(Tt.width,h.width+2*Tt.noteMargin):o.Y2.getMax(r.width/2+s.width/2,h.width+2*Tt.noteMargin),p.startx=i-p.width+(r.width-Tt.actorMargin)/2):t.to===t.from?(h=n._K.calculateTextDimensions(l?n._K.wrapLabel(t.message,o.Y2.getMax(Tt.width,r.width),_t(Tt)):t.message,_t(Tt)),p.width=l?o.Y2.getMax(Tt.width,r.width):o.Y2.getMax(r.width,Tt.width,h.width+2*Tt.noteMargin),p.startx=i+(r.width-p.width)/2):(p.width=Math.abs(i+r.width/2-(d+s.width/2))+Tt.actorMargin,p.startx=i2,g=(0,d.K)(t=>h?-t:t,"adjustValue");t.from===t.to?T=p:(t.activate&&!E&&(T+=g(Tt.activationWidth/2-1)),[a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.STICK_TOP,a.db.LINETYPE.STICK_BOTTOM,a.db.LINETYPE.STICK_TOP_DOTTED,a.db.LINETYPE.STICK_BOTTOM_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(t.type)||(T+=g(3)),[a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(t.type)&&(p-=g(3)));const u=[s,i,c,l],y=Math.abs(p-T);t.wrap&&t.message&&(t.message=n._K.wrapLabel(t.message,o.Y2.getMax(y+2*Tt.wrapPadding,Tt.width),yt(Tt)));const _=n._K.calculateTextDimensions(t.message,yt(Tt));return{width:o.Y2.getMax(t.wrap?0:_.width+2*Tt.wrapPadding,y+2*Tt.wrapPadding,Tt.width),height:0,startx:p,stopx:T,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,u),toBounds:Math.max.apply(null,u)}},"buildMessageModel"),$t=(0,d.K)(async function(t,e,a,r){const s={},i=[];let n,d,l;for(const c of t){switch(c.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:i.push({id:c.id,msg:c.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:c.message&&(n=i.pop(),s[n.id]=n,s[c.id]=n,i.push(n));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:n=i.pop(),s[n.id]=n;break;case r.db.LINETYPE.ACTIVE_START:{const t=e.get(c.from?c.from:c.to.actor),a=Lt(c.from?c.from:c.to.actor).length,r=t.x+t.width/2+(a-1)*Tt.activationWidth/2,s={startx:r,stopx:r+Tt.activationWidth,actor:c.from,enabled:!0};Et.activations.push(s)}break;case r.db.LINETYPE.ACTIVE_END:{const t=Et.activations.map(t=>t.actor).lastIndexOf(c.from);Et.activations.splice(t,1).splice(0,1)}}void 0!==c.placement?(d=await Ct(c,e,r),c.noteModel=d,i.forEach(t=>{n=t,n.from=o.Y2.getMin(n.from,d.startx),n.to=o.Y2.getMax(n.to,d.startx+d.width),n.width=o.Y2.getMax(n.width,Math.abs(n.from-n.to))-Tt.labelBoxWidth})):(l=Kt(c,e,r),c.msgModel=l,l.startx&&l.stopx&&i.length>0&&i.forEach(t=>{if(n=t,l.startx===l.stopx){const t=e.get(c.from),a=e.get(c.to);n.from=o.Y2.getMin(t.x-l.width/2,t.x-t.width/2,n.from),n.to=o.Y2.getMax(a.x+l.width/2,a.x+t.width/2,n.to),n.width=o.Y2.getMax(n.width,Math.abs(n.to-n.from))-Tt.labelBoxWidth}else n.from=o.Y2.getMin(l.startx,n.from),n.to=o.Y2.getMax(l.stopx,n.to),n.width=o.Y2.getMax(n.width,l.width)-Tt.labelBoxWidth}))}return Et.activations=[],c.R.debug("Loop type widths:",s),s},"calculateLoopBounds"),Vt={bounds:Et,drawActors:It,drawActorsPopup:ft,setConf:Rt,draw:Dt},Wt={parser:T,get db(){return new b},renderer:Vt,styles:m,init:(0,d.K)(t=>{t.sequence||(t.sequence={}),t.wrap&&(t.sequence.wrap=t.wrap,(0,o.XV)({sequence:{wrap:t.wrap}}))},"init")}}}]); \ No newline at end of file diff --git a/assets/js/4b8a4e95.3a04d2f1.js b/assets/js/4b8a4e95.3a04d2f1.js new file mode 100644 index 000000000..0b410ad52 --- /dev/null +++ b/assets/js/4b8a4e95.3a04d2f1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[2187],{27638(e,n,t){t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>h,frontMatter:()=>a,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"develop/tools-and-features/manifests","title":"Manifests","description":"Guide for using manifests to organize and address multiple files as a single unit in Swarm.","source":"@site/docs/develop/tools-and-features/manifests.md","sourceDirName":"develop/tools-and-features","slug":"/develop/tools-and-features/manifests","permalink":"/docs/develop/tools-and-features/manifests","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/develop/tools-and-features/manifests.md","tags":[],"version":"current","frontMatter":{"title":"Manifests","id":"manifests","description":"Guide for using manifests to organize and address multiple files as a single unit in Swarm."},"sidebar":"develop","previous":{"title":"Feeds","permalink":"/docs/develop/tools-and-features/feeds"},"next":{"title":"PSS Messaging","permalink":"/docs/develop/tools-and-features/pss"}}');var i=t(74848),r=t(28453);const a={title:"Manifests",id:"manifests",description:"Guide for using manifests to organize and address multiple files as a single unit in Swarm."},o=void 0,d={},l=[{value:"Why Manifests Matter",id:"why-manifests-matter",level:2},{value:"When Manifests Are Created",id:"when-manifests-are-created",level:2},{value:"Index and Error Document Options",id:"index-and-error-document-options",level:2},{value:"How Manifests Are Structured",id:"how-manifests-are-structured",level:2},{value:"Key Concepts",id:"key-concepts",level:3},{value:"Immutability",id:"immutability",level:2},{value:"Serving Files From a Manifest",id:"serving-files-from-a-manifest",level:2},{value:"When to Modify the Manifest",id:"when-to-modify-the-manifest",level:2},{value:"Websites",id:"websites",level:3},{value:"Directory Uploads",id:"directory-uploads",level:3},{value:"Putting It All Together",id:"putting-it-all-together",level:2}];function c(e){const n={a:"a",admonition:"admonition",br:"br",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:["Manifests define how files and folders are organized in Swarm. Instead of a flat list of uploaded files, Bee encodes directory structure as a compact prefix ",(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Trie",children:"trie"}),". This allows URLs like ",(0,i.jsx)(n.code,{children:"/images/logo.png"}),", ",(0,i.jsx)(n.code,{children:"/docs/readme.txt"}),", or ",(0,i.jsx)(n.code,{children:"/"})," to resolve efficiently to the correct Swarm references. Whenever you upload a directory \u2014 via ",(0,i.jsx)(n.code,{children:"/bzz"}),", ",(0,i.jsx)(n.code,{children:"bee-js"}),", or ",(0,i.jsx)(n.code,{children:"swarm-cli"})," \u2014 Bee automatically creates and uploads a manifest that enables a filesystem-like layer inside Swarm. The manifest reference itself is the root reference for your uploaded directory."]}),"\n",(0,i.jsx)(n.p,{children:"Manifests provide:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Filesystem-style path lookup (",(0,i.jsx)(n.code,{children:"/foo/bar.txt"}),")"]}),"\n",(0,i.jsx)(n.li,{children:"Hierarchical directory structure"}),"\n",(0,i.jsx)(n.li,{children:"Metadata attached to files or folders (e.g., Content-Type)"}),"\n",(0,i.jsx)(n.li,{children:"Optional custom routing behavior for websites (via manifest configuration)"}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"They allow structured collections of files \u2014 including websites \u2014 to exist naturally on Swarm."}),"\n",(0,i.jsx)(n.h2,{id:"why-manifests-matter",children:"Why Manifests Matter"}),"\n",(0,i.jsx)(n.p,{children:"Raw content hashes identify data immutably, but they don\u2019t express relationships between files. A manifest adds this missing structure: it groups related files, assigns paths, stores metadata, and exposes the entire folder tree through URL-like navigation. Without manifests, every application on Swarm would need its own indexing and routing logic."}),"\n",(0,i.jsx)(n.h2,{id:"when-manifests-are-created",children:"When Manifests Are Created"}),"\n",(0,i.jsxs)(n.p,{children:["Manifests are created whenever you upload a directory via the ",(0,i.jsx)(n.code,{children:"/bzz"})," endpoint, which is used internally by ",(0,i.jsx)(n.code,{children:"swarm-cli"})," and ",(0,i.jsx)(n.code,{children:"bee-js"})," for directory uploads. Bee scans the folder, builds the trie, and produces a manifest reference representing the entire directory tree."]}),"\n",(0,i.jsx)(n.p,{children:"By contrast:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"/bytes"})," and ",(0,i.jsx)(n.code,{children:"/chunks"})," upload raw binary data only"]}),"\n",(0,i.jsx)(n.li,{children:"They do not create manifests"}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"index-and-error-document-options",children:"Index and Error Document Options"}),"\n",(0,i.jsxs)(n.p,{children:["Directory uploads in ",(0,i.jsx)(n.code,{children:"bee-js"})," support two optional helpers:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",children:'{\n indexDocument: "index.html",\n errorDocument: "404.html"\n}\n'})}),"\n",(0,i.jsxs)(n.p,{children:["These specify which file Bee should serve for the manifest root (",(0,i.jsx)(n.code,{children:"/"}),") and for invalid paths. These options can be used with normal directory uploads, not only websites \u2014 and any file type can be used \u2014 not only HTML."]}),"\n",(0,i.jsx)(n.h2,{id:"how-manifests-are-structured",children:"How Manifests Are Structured"}),"\n",(0,i.jsxs)(n.p,{children:["A manifest is structured as a trie: nodes are connected by forks, and each fork is labelled with a path segment. The path to a node is the concatenation of the segments you follow from the root. If a node\u2019s ",(0,i.jsx)(n.code,{children:"target"})," is non-zero, the path represented by that node refers to a file and the target points to its Swarm content. If the ",(0,i.jsx)(n.code,{children:"target"})," is zero, the node behaves like a directory or intermediate prefix."]}),"\n",(0,i.jsxs)(n.p,{children:["The printed output below shows a decoded Mantaray manifest (using the ",(0,i.jsxs)(n.a,{href:"https://github.com/ethersphere/examples/blob/main/utils/manifestToJson.js",children:[(0,i.jsx)(n.code,{children:"manifestToJson.js"})," script"]})," from the examples repo). It represents a simple folder tree containing a root file and a nested subfolder."]}),"\n",(0,i.jsx)(n.admonition,{title:'About the Term "Mantaray"',type:"info",children:(0,i.jsxs)(n.p,{children:['"Mantaray" was originally a standalone Swarm library for working with manifests. It has since been integrated into ',(0,i.jsx)(n.code,{children:"bee-js"})," and is no longer maintained as a standalone library. Its name is still used in ",(0,i.jsx)(n.code,{children:"bee-js"})," for the manifest-related classes (",(0,i.jsx)(n.code,{children:"MantarayNode"}),", etc.)."]})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "path": "/",\n "target": "0x0000000000000000000000000000000000000000000000000000000000000000",\n "metadata": null,\n "forks": {\n "folder/": {\n "path": "folder/",\n "target": "0x0000000000000000000000000000000000000000000000000000000000000000",\n "metadata": null,\n "forks": {\n "nested.txt": {\n "path": "nested.txt",\n "target": "0x9442e445c0d58adea58e0a8afcdcc28ed7642d7a4ff9a253e8f1595faafbb808",\n "metadata": {\n "Content-Type": "text/plain; charset=utf-8",\n "Filename": "nested.txt"\n },\n "forks": {}\n },\n "subfolder/deep.txt": {\n "path": "subfolder/deep.txt",\n "target": "0x6aa935879ad2a547e57ea6350338bd04ad758977b542e86b31c159f31834b8fc",\n "metadata": {\n "Content-Type": "text/plain; charset=utf-8",\n "Filename": "deep.txt"\n },\n "forks": {}\n }\n }\n },\n "root.txt": {\n "path": "root.txt",\n "target": "0x98e63f7e826a01634881874246fc873cdf06bb5409ff5f9ec61d1e2de1dd3bf6",\n "metadata": {\n "Content-Type": "text/plain; charset=utf-8",\n "Filename": "root.txt"\n },\n "forks": {}\n }\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"key-concepts",children:"Key Concepts"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Node"})," \u2014 Represents either a directory or a file inside the manifest."]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Directories have a zero target and may contain child nodes."}),"\n",(0,i.jsx)(n.li,{children:"Files have a non-zero target pointing to their Swarm content."}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Fork"})," \u2014 A mapping from a path segment to a child node.",(0,i.jsx)(n.br,{}),"\n","In the JSON representation, the fork is the key (for example ",(0,i.jsx)(n.code,{children:'"folder/"'})," or ",(0,i.jsx)(n.code,{children:'"root.txt"'}),"), and the value is the child node for that segment."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Path"})," \u2014 The path segment label stored on a node (the same string used as the fork key from its parent). It may be a single segment such as ",(0,i.jsx)(n.code,{children:"folder/"})," or ",(0,i.jsx)(n.code,{children:"nested.txt"}),", or a remainder of the full path such as ",(0,i.jsx)(n.code,{children:"subfolder/deep.txt"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Target"})," \u2014 The Swarm reference for a file\u2019s content. Directories use a zero target."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Metadata"})," \u2014 Attributes stored with a node (for example ",(0,i.jsx)(n.code,{children:"Content-Type"}),", filename, etc.)."]}),"\n",(0,i.jsx)(n.h2,{id:"immutability",children:"Immutability"}),"\n",(0,i.jsx)(n.p,{children:"Manifests are immutable. When you add, remove, or move a file, Bee writes new manifest nodes rather than modifying existing ones. Each update produces a new manifest reference, and older versions remain accessible."}),"\n",(0,i.jsx)(n.p,{children:"To provide a stable entry point even as the manifest changes, you can combine manifests with feeds. A feed acts as an updateable pointer: publish each new manifest reference to the feed, and users access the feed hash instead of individual manifest hashes."}),"\n",(0,i.jsxs)(n.p,{children:["You can find examples of this in the ",(0,i.jsx)(n.a,{href:"/docs/develop/introduction",children:"Building on Swarm"})," page."]}),"\n",(0,i.jsx)(n.h2,{id:"serving-files-from-a-manifest",children:"Serving Files From a Manifest"}),"\n",(0,i.jsx)(n.p,{children:"A manifest reference acts like the root of a filesystem. Requests such as:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"/ \u2192 index document\n/docs/readme.txt \u2192 file content\n"})}),"\n",(0,i.jsx)(n.p,{children:"are resolved by walking the trie until the correct file target is found. Bee handles this automatically under:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"/bzz//\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Paths to directories such as ",(0,i.jsx)(n.code,{children:"/docs/"})," or even ",(0,i.jsx)(n.code,{children:"/"})," will result in a 404 error by default unless the manifest is modified (or by specifying an ",(0,i.jsx)(n.code,{children:"indexDocument"})," for ",(0,i.jsx)(n.code,{children:"/"}),"):"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"/docs/ \u2192 404\n"})}),"\n",(0,i.jsxs)(n.p,{children:["You can specify which file or webpage you would like paths such as ",(0,i.jsx)(n.code,{children:"/docs/"})," (which do not get entries in the manifest by default) to resolve to by manipulating the manifest. See the ",(0,i.jsx)(n.a,{href:"/docs/develop/files",children:'"Filesystem"'})," and ",(0,i.jsx)(n.a,{href:"/docs/develop/routing",children:"Routing"})," guides for more information and examples."]}),"\n",(0,i.jsxs)(n.admonition,{type:"caution",children:[(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"target"})," values inside a manifest should not be accessed directly. They cannot be reliably fetched via endpoints such as ",(0,i.jsx)(n.code,{children:"/bzz/"})," or tools like ",(0,i.jsx)(n.code,{children:"swarm-cli download"}),"."]}),(0,i.jsx)(n.p,{children:"To retrieve a file, always access it through the manifest, for example:"}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"curl http://localhost:1633/bzz//root.txt -o ./root.txt\n"})}),(0,i.jsx)(n.p,{children:"or"}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"swarm-cli download c8275d246e8a14ccd6f680ea0ecae543ebc0734e52676a5468a9a30db156be64/disc.jpg\n"})}),(0,i.jsx)(n.p,{children:"Bee resolves the underlying content automatically and returns the file correctly."})]}),"\n",(0,i.jsx)(n.h2,{id:"when-to-modify-the-manifest",children:"When to Modify the Manifest"}),"\n",(0,i.jsx)(n.p,{children:'Most Swarm users never need to manually inspect or modify a manifest. When you upload a directory, Bee creates one automatically and it "just works" for many common cases. You only need to modify the manifest when you want to change how paths resolve after the upload.'}),"\n",(0,i.jsx)(n.h3,{id:"websites",children:"Websites"}),"\n",(0,i.jsxs)(n.p,{children:["For simple single-page sites, no manual changes are required \u2014 setting ",(0,i.jsx)(n.code,{children:"indexDocument"})," and ",(0,i.jsx)(n.code,{children:"errorDocument"})," during upload is enough."]}),"\n",(0,i.jsx)(n.p,{children:"You need to modify the manifest when you want to change routing behavior, such as:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Removing ",(0,i.jsx)(n.code,{children:".html"})," extensions for clean URLs"]}),"\n",(0,i.jsx)(n.li,{children:"Adding, changing, or deleting routes"}),"\n",(0,i.jsx)(n.li,{children:"Redirecting paths or restructuring the site"}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["See the ",(0,i.jsx)(n.a,{href:"/docs/develop/routing",children:"Routing"})," guide for details."]}),"\n",(0,i.jsx)(n.h3,{id:"directory-uploads",children:"Directory Uploads"}),"\n",(0,i.jsx)(n.p,{children:"For one-time directory uploads that you don\u2019t plan to change, you typically don\u2019t need to touch the manifest. However, if you later want to add files, remove files, rename paths, or point new paths at existing content, the manifest must be updated."}),"\n",(0,i.jsxs)(n.p,{children:["See the ",(0,i.jsx)(n.a,{href:"/docs/develop/files",children:'"Filesystem"'})," guide for examples."]}),"\n",(0,i.jsx)(n.h2,{id:"putting-it-all-together",children:"Putting It All Together"}),"\n",(0,i.jsx)(n.p,{children:"A manifest turns a set of immutable chunks into a structured, navigable collection of files. It enables folder trees, static assets, multi-file application bundles, websites, and data archives to exist on Swarm in a coherent, accessible way. Whether you're uploading a small directory or a full site, the manifest is what ties everything together."})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},28453(e,n,t){t.d(n,{R:()=>a,x:()=>o});var s=t(96540);const i={},r=s.createContext(i);function a(e){const n=s.useContext(r);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4cb53170.a52430b7.js b/assets/js/4cb53170.a52430b7.js new file mode 100644 index 000000000..c49851798 --- /dev/null +++ b/assets/js/4cb53170.a52430b7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[4590],{66475(e,o,t){t.r(o),t.d(o,{assets:()=>d,contentTitle:()=>c,default:()=>u,frontMatter:()=>s,metadata:()=>n,toc:()=>l});const n=JSON.parse('{"id":"develop/contribute/introduction","title":"Contribute to Bee Development","description":"Overview of how to contribute to Bee development including code standards and contribution process.","source":"@site/docs/develop/contribute/introduction.md","sourceDirName":"develop/contribute","slug":"/develop/contribute/introduction","permalink":"/docs/develop/contribute/introduction","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/develop/contribute/introduction.md","tags":[],"version":"current","frontMatter":{"title":"Contribute to Bee Development","id":"introduction","sidebar_label":"Overview","description":"Overview of how to contribute to Bee development including code standards and contribution process."},"sidebar":"develop","previous":{"title":"Starting a Private Network","permalink":"/docs/develop/tools-and-features/starting-a-test-network"},"next":{"title":"Protocols","permalink":"/docs/develop/contribute/protocols"}}');var r=t(74848),i=t(28453);const s={title:"Contribute to Bee Development",id:"introduction",sidebar_label:"Overview",description:"Overview of how to contribute to Bee development including code standards and contribution process."},c=void 0,d={},l=[{value:"Testing a connection with PingPong protocol",id:"testing-a-connection-with-pingpong-protocol",level:2},{value:"Generating protobuf",id:"generating-protobuf",level:2}];function a(e){const o={a:"a",code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.p,{children:"Bee is developed in the open on GitHub, and contributions are welcome via pull request. We love PRs! \ud83d\udc1d"}),"\n",(0,r.jsxs)(o.p,{children:["We would love you to get involved with our ",(0,r.jsx)(o.a,{href:"https://github.com/ethersphere/bee",children:"Github repo"}),"."]}),"\n",(0,r.jsxs)(o.p,{children:["Connect with other Bee developers over at the official ",(0,r.jsx)(o.a,{href:"https://discord.gg/kHRyMNpw7t",children:"Discord Server"}),". Sign up and get involved with our buzzing hive of daily dev chat."]}),"\n",(0,r.jsxs)(o.ul,{children:["\n",(0,r.jsxs)(o.li,{children:["\n",(0,r.jsxs)(o.p,{children:["If you would like to contribute, please read the ",(0,r.jsx)(o.a,{href:"https://github.com/ethersphere/bee/blob/master/CODING.md",children:"coding guidelines"})," before you get started."]}),"\n"]}),"\n",(0,r.jsxs)(o.li,{children:["\n",(0,r.jsxs)(o.p,{children:["Installation from source is described in the ",(0,r.jsx)(o.a,{href:"/docs/bee/installation/build-from-source",children:"Installation"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(o.li,{children:["\n",(0,r.jsxs)(o.p,{children:["Contribute to Swarm\u2019s evolution by proposing your own Swarm Improvement Proposal (SWIP) ",(0,r.jsx)(o.a,{href:"https://github.com/ethersphere/SWIPs",children:"here"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(o.h2,{id:"testing-a-connection-with-pingpong-protocol",children:"Testing a connection with PingPong protocol"}),"\n",(0,r.jsx)(o.p,{children:"To check if two nodes are connected and to see the round trip time for message exchange between them, get the overlay address from one node, for example local node 2:"}),"\n",(0,r.jsx)(o.pre,{children:(0,r.jsx)(o.code,{className:"language-bash",children:"curl localhost:1833/addresses\n"})}),"\n",(0,r.jsx)(o.p,{children:"Make sure addresses are configured as in examples above."}),"\n",(0,r.jsx)(o.p,{children:"And use that address in the API call on another node, for example, local node 1:"}),"\n",(0,r.jsx)(o.pre,{children:(0,r.jsx)(o.code,{className:"language-bash",children:"curl -X POST localhost:1735/pingpong/d4440baf2d79e481c3c6fd93a2014d2e6fe0386418829439f26d13a8253d04f1\n"})}),"\n",(0,r.jsx)(o.h2,{id:"generating-protobuf",children:"Generating protobuf"}),"\n",(0,r.jsx)(o.p,{children:"To process protocol buffer files and generate the Go code from it two tools are needed:"}),"\n",(0,r.jsxs)(o.ul,{children:["\n",(0,r.jsx)(o.li,{children:(0,r.jsx)(o.a,{href:"https://github.com/protocolbuffers/protobuf/releases",children:"protoc"})}),"\n",(0,r.jsx)(o.li,{children:(0,r.jsx)(o.a,{href:"https://github.com/gogo/protobuf",children:"protoc-gen-gogofaster"})}),"\n"]}),"\n",(0,r.jsxs)(o.p,{children:["Makefile rule ",(0,r.jsx)(o.code,{children:"protobuf"})," can be used to automate ",(0,r.jsx)(o.code,{children:"protoc-gen-gogofaster"})," installation and code generation:"]}),"\n",(0,r.jsx)(o.pre,{children:(0,r.jsx)(o.code,{className:"language-bash",children:"make protobuf\n"})})]})}function u(e={}){const{wrapper:o}={...(0,i.R)(),...e.components};return o?(0,r.jsx)(o,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},28453(e,o,t){t.d(o,{R:()=>s,x:()=>c});var n=t(96540);const r={},i=n.createContext(r);function s(e){const o=n.useContext(i);return n.useMemo(function(){return"function"==typeof e?e(o):{...o,...e}},[o,e])}function c(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),n.createElement(i.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4d578846.369be7ce.js b/assets/js/4d578846.369be7ce.js new file mode 100644 index 000000000..c2f0e84eb --- /dev/null +++ b/assets/js/4d578846.369be7ce.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[5957],{21559(e,t,s){s.r(t),s.d(t,{assets:()=>i,contentTitle:()=>r,default:()=>l,frontMatter:()=>d,metadata:()=>o,toc:()=>p});const o=JSON.parse('{"id":"desktop/upload-content","title":"Upload Content","description":"Upload files and directories to Swarm from the Swarm Desktop app and get a shareable Swarm reference.","source":"@site/docs/desktop/upload-content.md","sourceDirName":"desktop","slug":"/desktop/upload-content","permalink":"/docs/desktop/upload-content","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/desktop/upload-content.md","tags":[],"version":"current","frontMatter":{"title":"Upload Content","id":"upload-content","description":"Upload files and directories to Swarm from the Swarm Desktop app and get a shareable Swarm reference."},"sidebar":"desktop","previous":{"title":"Postage Stamps","permalink":"/docs/desktop/postage-stamps"},"next":{"title":"Backup and Restore","permalink":"/docs/desktop/backup-restore"}}');var a=s(74848),n=s(28453);const d={title:"Upload Content",id:"upload-content",description:"Upload files and directories to Swarm from the Swarm Desktop app and get a shareable Swarm reference."},r=void 0,i={},p=[];function c(e){const t={a:"a",img:"img",p:"p",...(0,n.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(t.p,{children:["After ",(0,a.jsx)(t.a,{href:"/docs/desktop/postage-stamps",children:"purchasing a batch of postage stamps"})," you will be able to upload files. First go to the \u201cFiles\u201d tab. Here you can choose between three options, depending on what you want to upload: a single file, a folder or a website. After choosing your option you\u2019ll need to add a postage stamp."]}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{src:s(61047).A+"",width:"1400",height:"710"})}),"\n",(0,a.jsx)(t.p,{children:"Click \u201cAdd postage stamp\u201d and choose a postage stamp."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{src:s(2940).A+"",width:"1400",height:"710"})}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{src:s(85829).A+"",width:"1400",height:"710"})}),"\n",(0,a.jsx)(t.p,{children:"Click \u201cProceed with the selected stamp\u201d and upload your data."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{src:s(18954).A+"",width:"1400",height:"710"})}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{src:s(57811).A+"",width:"1400",height:"710"})}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{src:s(12056).A+"",width:"1400",height:"710"})}),"\n",(0,a.jsx)(t.p,{children:"Once your file is uploaded a Swarm hash and Swarm Gateway link will be displayed (which you can use to share the file with others) along with other pertinent information."})]})}function l(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(c,{...e})}):c(e)}},61047(e,t,s){s.d(t,{A:()=>o});const o=s.p+"assets/images/upload1-ea91ec2583ef126e9b253c8339d65e73.png"},2940(e,t,s){s.d(t,{A:()=>o});const o=s.p+"assets/images/upload2-876d3d092beb0b2241317ff04786d071.png"},85829(e,t,s){s.d(t,{A:()=>o});const o=s.p+"assets/images/upload3-5f139db5f40bf16502ecb1209a49cb77.png"},18954(e,t,s){s.d(t,{A:()=>o});const o=s.p+"assets/images/upload4-80175a47a1a5b3024b0c74e004a8bd8d.png"},57811(e,t,s){s.d(t,{A:()=>o});const o=s.p+"assets/images/upload5-f8e009edeea78972957e25edfce9bd6d.png"},12056(e,t,s){s.d(t,{A:()=>o});const o=s.p+"assets/images/upload6-0f731ba127f67e5494b79ab5fbba02e9.png"},28453(e,t,s){s.d(t,{R:()=>d,x:()=>r});var o=s(96540);const a={},n=o.createContext(a);function d(e){const t=o.useContext(n);return o.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:d(e.components),o.createElement(n.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/51e16090.e9dae48b.js b/assets/js/51e16090.e9dae48b.js new file mode 100644 index 000000000..b2ca8b30d --- /dev/null +++ b/assets/js/51e16090.e9dae48b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[2074],{74632(e){e.exports={}}}]); \ No newline at end of file diff --git a/assets/js/5292c32b.e6bea3b1.js b/assets/js/5292c32b.e6bea3b1.js new file mode 100644 index 000000000..ff1f5e00e --- /dev/null +++ b/assets/js/5292c32b.e6bea3b1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[593],{97273(e,t,n){n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>u,frontMatter:()=>r,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"develop/tools-and-features/introduction","title":"Hosting Your Dapps & Storing Their Data","description":"Swarm\'s developer tools and features for hosting dapps and storing their data, including feeds, stamps, encryption, and messaging.","source":"@site/docs/develop/tools-and-features/introduction.md","sourceDirName":"develop/tools-and-features","slug":"/develop/tools-and-features/introduction","permalink":"/docs/develop/tools-and-features/introduction","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/develop/tools-and-features/introduction.md","tags":[],"version":"current","frontMatter":{"title":"Hosting Your Dapps & Storing Their Data","id":"introduction","sidebar_label":"Overview","description":"Swarm\'s developer tools and features for hosting dapps and storing their data, including feeds, stamps, encryption, and messaging."},"sidebar":"develop","previous":{"title":"Developer Resources","permalink":"/docs/develop/resources"},"next":{"title":"AI Agent Skills","permalink":"/docs/develop/tools-and-features/ai-agent-skills"}}');var o=n(74848),a=n(28453);const r={title:"Hosting Your Dapps & Storing Their Data",id:"introduction",sidebar_label:"Overview",description:"Swarm's developer tools and features for hosting dapps and storing their data, including feeds, stamps, encryption, and messaging."},i=void 0,d={},l=[{value:"Tools and Features",id:"tools-and-features",level:2},{value:"AI Agent Skills",id:"ai-agent-skills",level:3},{value:"Bee JS",id:"bee-js",level:3},{value:"Chunk Types",id:"chunk-types",level:3},{value:"Feeds",id:"feeds",level:3},{value:"PSS",id:"pss",level:3},{value:"Gateway Proxy",id:"gateway-proxy",level:3},{value:"Local Development with bee-factory",id:"local-development-with-bee-factory",level:3},{value:"Starting a Test Network",id:"starting-a-test-network",level:3}];function c(e){const t={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",...(0,a.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.p,{children:"Swarm is hugely versatile, but at a very basic level you can think of it as storage for your dapps data that is too big for blockchain, but still needs to live in our totally decentralised universe.\nSwarm is perfect for storing your NFT meta-data and images in a web3 way that won't break the bank and can live forever!"}),"\n",(0,o.jsx)(t.h2,{id:"tools-and-features",children:"Tools and Features"}),"\n",(0,o.jsx)(t.p,{children:"Swarm is designed with decentralised applications in mind, and much time has been devoted to designing tools and features to support their prototyping and development."}),"\n",(0,o.jsx)(t.h3,{id:"ai-agent-skills",children:"AI Agent Skills"}),"\n",(0,o.jsxs)(t.p,{children:["In a hurry? The ",(0,o.jsx)(t.a,{href:"/docs/develop/tools-and-features/ai-agent-skills",children:"Swarm Quickstart Skills"})," run inside Claude Code and walk you through setting up a Bee node and building on Swarm \u2014 just type ",(0,o.jsx)(t.code,{children:"/swarm"})," and follow the guided steps."]}),"\n",(0,o.jsx)(t.h3,{id:"bee-js",children:"Bee JS"}),"\n",(0,o.jsxs)(t.p,{children:["Our maverick JavaScript team, the Bee-Gees (\ud83d\udd7a), have been working hard in the last few months to build some impressive tools for all you budding dapp developer Bees to get stuck into! Find out how to use the ",(0,o.jsx)(t.a,{href:"/docs/develop/tools-and-features/bee-js",children:"bee-js"})," JavaScript library to start creating your own that live and work on Swarm!"]}),"\n",(0,o.jsx)(t.h3,{id:"chunk-types",children:"Chunk Types"}),"\n",(0,o.jsxs)(t.p,{children:["Swarm contains 3 types of chunks which enable us to build novel\nstructures of how data can be stored in the swarm - in a completely\ndecentralised way. Learn more about\n",(0,o.jsx)(t.a,{href:"/docs/develop/tools-and-features/chunk-types",children:"chunk types"}),"\nto change the way you deal with data in your dapps forever!"]}),"\n",(0,o.jsx)(t.h3,{id:"feeds",children:"Feeds"}),"\n",(0,o.jsxs)(t.p,{children:["Swarm's single owner chunks have been cleverly combined to create user\ngenerated ",(0,o.jsx)(t.a,{href:"/docs/develop/tools-and-features/feeds",children:"feeds"})," in the swarm, see this\nexample of how chunks are combined into a useful data structure you\ncan use to build amazing applications."]}),"\n",(0,o.jsx)(t.h3,{id:"pss",children:"PSS"}),"\n",(0,o.jsxs)(t.p,{children:["Hey there! Pss! \ud83e\udd2b Swarm's trojan chunks are implemented in Bee to\ndeliver ",(0,o.jsx)(t.a,{href:"/docs/develop/tools-and-features/pss",children:"Postal Service on Swarm"})," - a\npub-sub system that provides a totally leak-proof messaging system\nover the swarm."]}),"\n",(0,o.jsx)(t.h3,{id:"gateway-proxy",children:"Gateway Proxy"}),"\n",(0,o.jsxs)(t.p,{children:["If you want your users to be able to access Swarm without running\ntheir own Bee node, for the time being you will need to make use of the ",(0,o.jsx)(t.a,{href:"https://github.com/ethersphere/gateway-proxy",children:"Gateway Proxy tool"}),". Join us in the\n",(0,o.jsx)(t.a,{href:"https://discord.gg/8SMCfvm3kw",children:"#builders"})," room in our\n",(0,o.jsx)(t.a,{href:"https://discord.gg/kHRyMNpw7t",children:"Discord Server"})," for more information on how to make your Swarm based applications accessible to everyone."]}),"\n",(0,o.jsx)(t.h3,{id:"local-development-with-bee-factory",children:"Local Development with bee-factory"}),"\n",(0,o.jsxs)(t.p,{children:["If you want to test Swarm-based applications without spending real xBZZ, ",(0,o.jsx)(t.a,{href:"/docs/develop/tools-and-features/bee-dev-mode",children:"bee-factory"})," is the recommended tool.\nIt starts a full local stack \u2014 5 Bee nodes plus a local Anvil blockchain \u2014 with a single command.\nThe ",(0,o.jsx)(t.code,{children:"bee dev"})," mode was removed in Bee v2.8.1; use bee-factory instead."]}),"\n",(0,o.jsx)(t.h3,{id:"starting-a-test-network",children:"Starting a Test Network"}),"\n",(0,o.jsxs)(t.p,{children:["While bee-factory already runs multiple nodes locally, setting up a ",(0,o.jsx)(t.a,{href:"/docs/develop/tools-and-features/starting-a-test-network",children:"test network"})," gives you even greater control over simulating interactions between nodes in a more customised environment."]})]})}function u(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},28453(e,t,n){n.d(t,{R:()=>r,x:()=>i});var s=n(96540);const o={},a=s.createContext(o);function r(e){const t=s.useContext(a);return s.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),s.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5315.d44bf092.js b/assets/js/5315.d44bf092.js new file mode 100644 index 000000000..dca85c3e0 --- /dev/null +++ b/assets/js/5315.d44bf092.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[5315],{64918(t,e,n){n.d(e,{o:()=>i});var i=(0,n(86827).K)(()=>"\n /* Font Awesome icon styling - consolidated */\n .label-icon {\n display: inline-block;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n }\n \n .node .label-icon path {\n fill: currentColor;\n stroke: revert;\n stroke-width: revert;\n }\n","getIconStyles")},35315(t,e,n){n.d(e,{diagram:()=>C});var i=n(5637),s=n(64918),r=n(841),o=n(78771),a=n(717),c=(n(79515),n(44505),n(72379),n(58962),n(16459),n(76385)),l=n(31293),h=n(86827),u=n(3219),g=n(78041),d=n(75263),p=function(){var t=(0,h.K)(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[1,4],n=[1,13],i=[1,12],s=[1,15],r=[1,16],o=[1,20],a=[1,19],c=[6,7,8],l=[1,26],u=[1,24],g=[1,25],d=[6,7,11],p=[1,31],y=[6,7,11,24],f=[1,6,13,16,17,20,23],m=[1,35],b=[1,36],_=[1,6,7,11,13,16,17,20,23],k=[1,38],E={trace:(0,h.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:(0,h.K)(function(t,e,n,i,s,r,o){var a=r.length-1;switch(s){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",r[a-1].id),i.addNode(r[a-2].length,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 16:i.getLogger().info("Node: ",r[a].id),i.addNode(r[a-1].length,r[a].id,r[a].descr,r[a].type);break;case 17:i.getLogger().trace("Icon: ",r[a]),i.decorateNode({icon:r[a]});break;case 18:case 23:i.decorateNode({class:r[a]});break;case 19:i.getLogger().trace("SPACELIST");break;case 20:i.getLogger().trace("Node: ",r[a-1].id),i.addNode(0,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 21:i.getLogger().trace("Node: ",r[a].id),i.addNode(0,r[a].id,r[a].descr,r[a].type);break;case 22:i.decorateNode({icon:r[a]});break;case 27:i.getLogger().trace("node found ..",r[a-2]),this.$={id:r[a-1],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 28:this.$={id:r[a],descr:r[a],type:0};break;case 29:i.getLogger().trace("node found ..",r[a-3]),this.$={id:r[a-3],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 30:this.$=r[a-1]+r[a];break;case 31:this.$=r[a]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:n,7:[1,10],9:9,12:11,13:i,14:14,16:s,17:r,18:17,19:18,20:o,23:a},t(c,[2,3]),{1:[2,2]},t(c,[2,4]),t(c,[2,5]),{1:[2,6],6:n,12:21,13:i,14:14,16:s,17:r,18:17,19:18,20:o,23:a},{6:n,9:22,12:11,13:i,14:14,16:s,17:r,18:17,19:18,20:o,23:a},{6:l,7:u,10:23,11:g},t(d,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:o,23:a}),t(d,[2,19]),t(d,[2,21],{15:30,24:p}),t(d,[2,22]),t(d,[2,23]),t(y,[2,25]),t(y,[2,26]),t(y,[2,28],{20:[1,32]}),{21:[1,33]},{6:l,7:u,10:34,11:g},{1:[2,7],6:n,12:21,13:i,14:14,16:s,17:r,18:17,19:18,20:o,23:a},t(f,[2,14],{7:m,11:b}),t(_,[2,8]),t(_,[2,9]),t(_,[2,10]),t(d,[2,16],{15:37,24:p}),t(d,[2,17]),t(d,[2,18]),t(d,[2,20],{24:k}),t(y,[2,31]),{21:[1,39]},{22:[1,40]},t(f,[2,13],{7:m,11:b}),t(_,[2,11]),t(_,[2,12]),t(d,[2,15],{24:k}),t(y,[2,30]),{22:[1,41]},t(y,[2,27]),t(y,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,h.K)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,h.K)(function(t){var e=this,n=[0],i=[],s=[null],r=[],o=this.table,a="",c=0,l=0,u=0,g=r.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p.yy[y]=this.yy[y]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var f=d.yylloc;r.push(f);var m=d.options&&d.options.ranges;function b(){var t;return"number"!=typeof(t=i.pop()||d.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,h.K)(function(t){n.length=n.length-2*t,s.length=s.length-t,r.length=r.length-t},"popStack"),(0,h.K)(b,"lex");for(var _,k,E,S,N,x,D,L,I,v={};;){if(E=n[n.length-1],this.defaultActions[E]?S=this.defaultActions[E]:(null==_&&(_=b()),S=o[E]&&o[E][_]),void 0===S||!S.length||!S[0]){var C="";for(x in I=[],o[E])this.terminals_[x]&&x>2&&I.push("'"+this.terminals_[x]+"'");C=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+I.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(C,{text:d.match,token:this.terminals_[_]||_,line:d.yylineno,loc:f,expected:I})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+_);switch(S[0]){case 1:n.push(_),s.push(d.yytext),r.push(d.yylloc),n.push(S[1]),_=null,k?(_=k,k=null):(l=d.yyleng,a=d.yytext,c=d.yylineno,f=d.yylloc,u>0&&u--);break;case 2:if(D=this.productions_[S[1]][1],v.$=s[s.length-D],v._$={first_line:r[r.length-(D||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(D||1)].first_column,last_column:r[r.length-1].last_column},m&&(v._$.range=[r[r.length-(D||1)].range[0],r[r.length-1].range[1]]),void 0!==(N=this.performAction.apply(v,[a,l,c,p.yy,S[1],s,r].concat(g))))return N;D&&(n=n.slice(0,-1*D*2),s=s.slice(0,-1*D),r=r.slice(0,-1*D)),n.push(this.productions_[S[1]][0]),s.push(v.$),r.push(v._$),L=o[n[n.length-2]][n[n.length-1]],n.push(L);break;case 3:return!0}}return!0},"parse")},S=function(){return{EOF:1,parseError:(0,h.K)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,h.K)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,h.K)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,h.K)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,h.K)(function(){return this._more=!0,this},"more"),reject:(0,h.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,h.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,h.K)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,h.K)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,h.K)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,h.K)(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},"test_match"),next:(0,h.K)(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,h.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,h.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,h.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,h.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,h.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,h.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,h.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,h.K)(function(t,e,n,i){switch(n){case 0:return this.pushState("shapeData"),e.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const n=/\n\s*/g;return e.yytext=e.yytext.replace(n,"
    "),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return t.getLogger().trace("Found comment",e.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return t.getLogger().trace("Long description:",e.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}}();function N(){this.yy={}}return E.lexer=S,(0,h.K)(N,"Parser"),N.prototype=E,E.Parser=N,new N}();p.parser=p;var y=p,f=[],m=[],b=0,_={},k=(0,h.K)(()=>{f=[],m=[],b=0,_={}},"clear"),E=(0,h.K)(t=>{if(0===f.length)return null;const e=f[0].level;let n=null;for(let i=f.length-1;i>=0;i--)if(f[i].level!==e||n||(n=f[i]),f[i].levelt.parentId===i.id);for(const r of s){const e={id:r.id,parentId:i.id,label:(0,c.jZ)(r.label??"",n),labelType:"markdown",isGroup:!1,ticket:r?.ticket,priority:r?.priority,assigned:r?.assigned,icon:r?.icon,shape:"kanbanItem",level:r.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(e)}}return{nodes:t,edges:[],other:{},config:(0,c.D7)()}},"getData"),x=(0,h.K)((t,e,n,i,s)=>{const o=(0,c.D7)();let a=o.mindmap?.padding??c.UI.mindmap.padding;switch(i){case D.ROUNDED_RECT:case D.RECT:case D.HEXAGON:a*=2}const l={id:(0,c.jZ)(e,o)||"kbn"+b++,level:t,label:(0,c.jZ)(n,o),width:o.mindmap?.maxNodeWidth??c.UI.mindmap.maxNodeWidth,padding:a,isGroup:!1};if(void 0!==s){let t;t=s.includes("\n")?s+"\n":"{\n"+s+"\n}";const e=(0,r.H)(t,{schema:r.r});if(e.shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw new Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);e?.shape&&"kanbanItem"===e.shape&&(l.shape=e?.shape),e?.label&&(l.label=e?.label),e?.icon&&(l.icon=e?.icon.toString()),e?.assigned&&(l.assigned=e?.assigned.toString()),e?.ticket&&(l.ticket=e?.ticket.toString()),e?.priority&&(l.priority=e?.priority)}const h=E(t);h?l.parentId=h.id||"kbn"+b++:m.push(l),f.push(l)},"addNode"),D={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},L={clear:k,addNode:x,getSections:S,getData:N,nodeType:D,getType:(0,h.K)((t,e)=>{switch(l.R.debug("In get type",t,e),t){case"[":return D.RECT;case"(":return")"===e?D.ROUNDED_RECT:D.CLOUD;case"((":return D.CIRCLE;case")":return D.CLOUD;case"))":return D.BANG;case"{{":return D.HEXAGON;default:return D.DEFAULT}},"getType"),setElementForId:(0,h.K)((t,e)=>{_[t]=e},"setElementForId"),decorateNode:(0,h.K)(t=>{if(!t)return;const e=(0,c.D7)(),n=f[f.length-1];t.icon&&(n.icon=(0,c.jZ)(t.icon,e)),t.class&&(n.cssClasses=(0,c.jZ)(t.class,e))},"decorateNode"),type2Str:(0,h.K)(t=>{switch(t){case D.DEFAULT:return"no-border";case D.RECT:return"rect";case D.ROUNDED_RECT:return"rounded-rect";case D.CIRCLE:return"circle";case D.CLOUD:return"cloud";case D.BANG:return"bang";case D.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),getLogger:(0,h.K)(()=>l.R,"getLogger"),getElementById:(0,h.K)(t=>_[t],"getElementById")},I={draw:(0,h.K)(async(t,e,n,s)=>{l.R.debug("Rendering kanban diagram\n"+t);const r=s.db.getData(),h=(0,c.D7)();h.htmlLabels=!1;const u=(0,i.D)(e);for(const i of r.nodes)i.domId=`${e}-${i.id}`;const g=u.append("g");g.attr("class","sections");const d=u.append("g");d.attr("class","items");const p=r.nodes.filter(t=>t.isGroup);let y=0;const f=[];let m=25;for(const i of p){const t=h?.kanban?.sectionWidth||200;y+=1,i.x=t*y+10*(y-1)/2,i.width=t,i.y=0,i.height=3*t,i.rx=5,i.ry=5,i.cssClasses=i.cssClasses+" section-"+y;const e=await(0,o.U)(g,i);m=Math.max(m,e?.labelBBox?.height),f.push(e)}let b=0;for(const i of p){const t=f[b];b+=1;const e=h?.kanban?.sectionWidth||200,n=3*-e/2+m;let s=n;const o=r.nodes.filter(t=>t.parentId===i.id);for(const r of o){if(r.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");r.x=i.x,r.width=e-15;const t=(await(0,a.on)(d,r,{config:h})).node().getBBox();r.y=s+t.height/2,await(0,a.U_)(r),s=r.y+t.height/2+5}const c=t.cluster.select("rect"),l=Math.max(s-n+30,50)+(m-25);c.attr("height",l)}(0,c.ot)(void 0,u,h.mindmap?.padding??c.UI.kanban.padding,h.mindmap?.useMaxWidth??c.UI.kanban.useMaxWidth)},"draw")},v=(0,h.K)(t=>{let e="";for(let i=0;it.darkMode?(0,d.A)(e,n):(0,g.A)(e,n),"adjuster");for(let i=0;i`\n .edge {\n stroke-width: 3;\n }\n ${v(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .cluster-label, .label {\n color: ${t.textColor};\n fill: ${t.textColor};\n }\n .kanban-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n ${(0,s.o)()}\n`,"getStyles")}}}]); \ No newline at end of file diff --git a/assets/js/5332.f7f5c9df.js b/assets/js/5332.f7f5c9df.js new file mode 100644 index 000000000..e5d7c41e7 --- /dev/null +++ b/assets/js/5332.f7f5c9df.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[5332],{75332(e,r,t){t.d(r,{diagram:()=>u});var s=t(74806),a=(t(96755),t(1672),t(9417),t(338),t(78771),t(46853),t(717),t(79515),t(44505),t(72379),t(58962),t(16459),t(76385),t(31293),t(86827)),u={parser:s.Zk,get db(){return new s.u4(2)},renderer:s.q7,styles:s.tM,init:(0,a.K)(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}}]); \ No newline at end of file diff --git a/assets/js/5672.e9acfa9d.js b/assets/js/5672.e9acfa9d.js new file mode 100644 index 000000000..df6ce1eb5 --- /dev/null +++ b/assets/js/5672.e9acfa9d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[5672],{1672(e,t,n){n.d(t,{P:()=>r});var i=n(76385),s=n(31293),o=n(86827),r=(0,o.K)((e,t,n,o)=>{e.attr("class",n);const{width:r,height:l,x:h,y:d}=a(e,t);(0,i.a$)(e,l,r,o);const g=c(h,d,r,l,t);e.attr("viewBox",g),s.R.debug(`viewBox configured: ${g} with padding: ${t}`)},"setupViewPortForSVG"),a=(0,o.K)((e,t)=>{const n=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:n.width+2*t,height:n.height+2*t,x:n.x,y:n.y}},"calculateDimensionsWithPadding"),c=(0,o.K)((e,t,n,i,s)=>`${e-s} ${t-s} ${n} ${i}`,"createViewBox")},96755(e,t,n){n.d(t,{A:()=>o});var i=n(86827),s=n(70451),o=(0,i.K)((e,t)=>{let n;"sandbox"===t&&(n=(0,s.Ltv)("#i"+e));return("sandbox"===t?(0,s.Ltv)(n.nodes()[0].contentDocument.body):(0,s.Ltv)("body")).select(`[id="${e}"]`)},"getDiagramElement")},25672(e,t,n){n.d(t,{diagram:()=>L});var i=n(96755),s=n(1672),o=n(9417),r=(n(78771),n(46853),n(717),n(79515),n(44505),n(72379),n(58962),n(16459),n(76385)),a=n(31293),c=n(86827);const l=new Uint8Array(16);const h=[];for(let N=0;N<256;++N)h.push((N+256).toString(16).slice(1));function d(e,t=0){return(h[e[t+0]]+h[e[t+1]]+h[e[t+2]]+h[e[t+3]]+"-"+h[e[t+4]]+h[e[t+5]]+"-"+h[e[t+6]]+h[e[t+7]]+"-"+h[e[t+8]]+h[e[t+9]]+"-"+h[e[t+10]]+h[e[t+11]]+h[e[t+12]]+h[e[t+13]]+h[e[t+14]]+h[e[t+15]]).toLowerCase()}const g=function(e,t,n){return t||e||!crypto.randomUUID?function(e,t,n){e=e||{};const i=e.random??e.rng?.()??crypto.getRandomValues(l);if(i.length<16)throw new Error("Random bytes length must be >= 16");if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){if((n=n||0)<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=i[e];return t}return d(i)}(e,t,n):crypto.randomUUID()};var u=n(3219),p=n(78041),y=n(75263),m=function(){var e=(0,c.K)(function(e,t,n,i){for(n=n||{},i=e.length;i--;n[e[i]]=t);return n},"o"),t=[1,4],n=[1,13],i=[1,12],s=[1,15],o=[1,16],r=[1,20],a=[1,19],l=[6,7,8],h=[1,26],d=[1,24],g=[1,25],u=[6,7,11],p=[1,6,13,15,16,19,22],y=[1,33],m=[1,34],f=[1,6,7,11,13,15,16,19,22],b={trace:(0,c.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:(0,c.K)(function(e,t,n,i,s,o,r){var a=o.length-1;switch(s){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",o[a].id),i.addNode(o[a-1].length,o[a].id,o[a].descr,o[a].type);break;case 16:i.getLogger().trace("Icon: ",o[a]),i.decorateNode({icon:o[a]});break;case 17:case 21:i.decorateNode({class:o[a]});break;case 18:i.getLogger().trace("SPACELIST");break;case 19:i.getLogger().trace("Node: ",o[a].id),i.addNode(0,o[a].id,o[a].descr,o[a].type);break;case 20:i.decorateNode({icon:o[a]});break;case 25:i.getLogger().trace("node found ..",o[a-2]),this.$={id:o[a-1],descr:o[a-1],type:i.getType(o[a-2],o[a])};break;case 26:this.$={id:o[a],descr:o[a],type:i.nodeType.DEFAULT};break;case 27:i.getLogger().trace("node found ..",o[a-3]),this.$={id:o[a-3],descr:o[a-1],type:i.getType(o[a-2],o[a])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:n,7:[1,10],9:9,12:11,13:i,14:14,15:s,16:o,17:17,18:18,19:r,22:a},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:n,12:21,13:i,14:14,15:s,16:o,17:17,18:18,19:r,22:a},{6:n,9:22,12:11,13:i,14:14,15:s,16:o,17:17,18:18,19:r,22:a},{6:h,7:d,10:23,11:g},e(u,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:r,22:a}),e(u,[2,18]),e(u,[2,19]),e(u,[2,20]),e(u,[2,21]),e(u,[2,23]),e(u,[2,24]),e(u,[2,26],{19:[1,30]}),{20:[1,31]},{6:h,7:d,10:32,11:g},{1:[2,7],6:n,12:21,13:i,14:14,15:s,16:o,17:17,18:18,19:r,22:a},e(p,[2,14],{7:y,11:m}),e(f,[2,8]),e(f,[2,9]),e(f,[2,10]),e(u,[2,15]),e(u,[2,16]),e(u,[2,17]),{20:[1,35]},{21:[1,36]},e(p,[2,13],{7:y,11:m}),e(f,[2,11]),e(f,[2,12]),{21:[1,37]},e(u,[2,25]),e(u,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,c.K)(function(e,t){if(!t.recoverable){var n=new Error(e);throw n.hash=t,n}this.trace(e)},"parseError"),parse:(0,c.K)(function(e){var t=this,n=[0],i=[],s=[null],o=[],r=this.table,a="",l=0,h=0,d=0,g=o.slice.call(arguments,1),u=Object.create(this.lexer),p={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p.yy[y]=this.yy[y]);u.setInput(e,p.yy),p.yy.lexer=u,p.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var m=u.yylloc;o.push(m);var f=u.options&&u.options.ranges;function b(){var e;return"number"!=typeof(e=i.pop()||u.lex()||1)&&(e instanceof Array&&(e=(i=e).pop()),e=t.symbols_[e]||e),e}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.K)(function(e){n.length=n.length-2*e,s.length=s.length-e,o.length=o.length-e},"popStack"),(0,c.K)(b,"lex");for(var _,k,E,S,x,L,N,D,$,I={};;){if(E=n[n.length-1],this.defaultActions[E]?S=this.defaultActions[E]:(null==_&&(_=b()),S=r[E]&&r[E][_]),void 0===S||!S.length||!S[0]){var v="";for(L in $=[],r[E])this.terminals_[L]&&L>2&&$.push("'"+this.terminals_[L]+"'");v=u.showPosition?"Parse error on line "+(l+1)+":\n"+u.showPosition()+"\nExpecting "+$.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(v,{text:u.match,token:this.terminals_[_]||_,line:u.yylineno,loc:m,expected:$})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+_);switch(S[0]){case 1:n.push(_),s.push(u.yytext),o.push(u.yylloc),n.push(S[1]),_=null,k?(_=k,k=null):(h=u.yyleng,a=u.yytext,l=u.yylineno,m=u.yylloc,d>0&&d--);break;case 2:if(N=this.productions_[S[1]][1],I.$=s[s.length-N],I._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},f&&(I._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),void 0!==(x=this.performAction.apply(I,[a,h,l,p.yy,S[1],s,o].concat(g))))return x;N&&(n=n.slice(0,-1*N*2),s=s.slice(0,-1*N),o=o.slice(0,-1*N)),n.push(this.productions_[S[1]][0]),s.push(I.$),o.push(I._$),D=r[n[n.length-2]][n[n.length-1]],n.push(D);break;case 3:return!0}}return!0},"parse")},_=function(){return{EOF:1,parseError:(0,c.K)(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:(0,c.K)(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,c.K)(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:(0,c.K)(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.K)(function(){return this._more=!0,this},"more"),reject:(0,c.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,c.K)(function(e){this.unput(this.match.slice(e))},"less"),pastInput:(0,c.K)(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.K)(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,c.K)(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},"showPosition"),test_match:(0,c.K)(function(e,t){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in s)this[o]=s[o];return!1}return!1},"test_match"),next:(0,c.K)(function(){if(this.done)return this.EOF;var e,t,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),o=0;ot[0].length)){if(t=n,i=o,this.options.backtrack_lexer){if(!1!==(e=this.test_match(n,s[o])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,s[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,c.K)(function(){var e=this.next();return e||this.lex()},"lex"),begin:(0,c.K)(function(e){this.conditionStack.push(e)},"begin"),popState:(0,c.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,c.K)(function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:(0,c.K)(function(e){this.begin(e)},"pushState"),stateStackSize:(0,c.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,c.K)(function(e,t,n,i){switch(n){case 0:return e.getLogger().trace("Found comment",t.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:e.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return e.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:e.getLogger().trace("end icon"),this.popState();break;case 10:return e.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return e.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return e.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return e.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return e.getLogger().trace("description:",t.yytext),"NODE_DESCR";case 27:return this.popState(),e.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),e.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),e.getLogger().trace("node end ...",t.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return e.getLogger().trace("Long description:",t.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}}}();function k(){this.yy={}}return b.lexer=_,(0,c.K)(k,"Parser"),k.prototype=b,b.Parser=k,new k}();m.parser=m;var f=m,b={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},_=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=b,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{(0,c.K)(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let t=this.nodes.length-1;t>=0;t--)if(this.nodes[t].level0?this.nodes[0]:null}addNode(e,t,n,i){a.R.info("addNode",e,t,n,i);let s=!1;0===this.nodes.length?(this.baseLevel=e,e=0,s=!0):void 0!==this.baseLevel&&(e-=this.baseLevel,s=!1);const o=(0,r.D7)();let c=o.mindmap?.padding??r.UI.mindmap.padding;switch(i){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:c*=2}const l={id:this.count++,nodeId:(0,r.jZ)(t,o),level:e,descr:(0,r.jZ)(n,o),type:i,children:[],width:o.mindmap?.maxNodeWidth??r.UI.mindmap.maxNodeWidth,padding:c,isRoot:s},h=this.getParent(e);if(h)h.children.push(l),this.nodes.push(l);else{if(!s)throw new Error(`There can be only one root. No parent could be found for ("${l.descr}")`);this.nodes.push(l)}}getType(e,t){switch(a.R.debug("In get type",e,t),e){case"[":return this.nodeType.RECT;case"(":return")"===t?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,t){this.elements[e]=t}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;const t=(0,r.D7)(),n=this.nodes[this.nodes.length-1];e.icon&&(n.icon=(0,r.jZ)(e.icon,t)),e.class&&(n.class=(0,r.jZ)(e.class,t))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,t){if(0===e.level?e.section=void 0:e.section=t,e.children)for(const[n,i]of e.children.entries()){const s=0===e.level?n%11:t;this.assignSections(i,s)}}flattenNodes(e,t){const n=(0,r.D7)(),i=["mindmap-node"];!0===e.isRoot?i.push("section-root","section--1"):void 0!==e.section&&i.push(`section-${e.section}`),e.class&&i.push(e.class);const s=i.join(" "),o=(0,c.K)(e=>{const t=(n.theme?.toLowerCase()??"").includes("redux");switch(e){case b.CIRCLE:return"mindmapCircle";case b.RECT:return"rect";case b.ROUNDED_RECT:return"rounded";case b.CLOUD:return"cloud";case b.BANG:return"bang";case b.HEXAGON:return"hexagon";case b.DEFAULT:return t?"rounded":"defaultMindmapNode";default:return"rect"}},"getShapeFromType"),a={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:o(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:s,cssStyles:[],look:n.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(t.push(a),e.children)for(const r of e.children)this.flattenNodes(r,t)}generateEdges(e,t){if(!e.children)return;const n=(0,r.D7)();for(const i of e.children){let s="edge";void 0!==i.section&&(s+=` section-edge-${i.section}`);s+=` edge-depth-${e.level+1}`;const o={id:`edge_${e.id}_${i.id}`,start:e.id.toString(),end:i.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:n.look,classes:s,depth:e.level,section:i.section};t.push(o),this.generateEdges(i,t)}}getData(){const e=this.getMindmap(),t=(0,r.D7)(),n=t;if(void 0!==(0,r.TM)().layout||(n.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:n};a.R.debug("getData: mindmapRoot",e,t),this.assignSections(e);const i=[],s=[];this.flattenNodes(e,i),this.generateEdges(e,s),a.R.debug(`getData: processed ${i.length} nodes and ${s.length} edges`);const o=new Map;for(const r of i)o.set(r.id,{shape:r.shape,width:r.width,height:r.height,padding:r.padding});return{nodes:i,edges:s,config:n,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(o),type:"mindmap",diagramId:"mindmap-"+g()}}getLogger(){return a.R}},k={draw:(0,c.K)(async(e,t,n,c)=>{a.R.debug("Rendering mindmap diagram\n"+e);const l=c.db,h=l.getData(),d=(0,i.A)(t,h.config.securityLevel);h.type=c.type,h.layoutAlgorithm=(0,o.q7)(h.config.layout,{fallback:"cose-bilkent"}),h.diagramId=t;if(!l.getMindmap())return;h.nodes.forEach(e=>{"rounded"===e.shape?(e.radius=15,e.taper=15,e.stroke="none",e.width=0,e.padding=15):"circle"===e.shape?e.padding=10:"rect"===e.shape?(e.width=0,e.padding=10):"hexagon"===e.shape&&(e.width=0,e.height=0)}),await(0,o.XX)(h,d);const{themeVariables:g}=(0,r.zj)(),{useGradient:u,gradientStart:p,gradientStop:y}=g;if(u&&p&&y){const e=d.attr("id"),t=d.append("defs").append("linearGradient").attr("id",`${e}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");t.append("stop").attr("offset","0%").attr("stop-color",p).attr("stop-opacity",1),t.append("stop").attr("offset","100%").attr("stop-color",y).attr("stop-opacity",1)}(0,s.P)(d,h.config.mindmap?.padding??r.UI.mindmap.padding,"mindmapDiagram",h.config.mindmap?.useMaxWidth??r.UI.mindmap.useMaxWidth)},"draw")},E=(0,c.K)(e=>{const{theme:t,look:n}=e;let i="";for(let s=0;s{let i="";for(let s=0;s{const{theme:t}=e,n=e.svgId,i=e.dropShadow?e.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none";return`\n .edge {\n stroke-width: 3;\n }\n ${E(e)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${e.git0};\n }\n .section-root text {\n fill: ${e.gitBranchLabel0};\n }\n .section-root span {\n color: ${t?.includes("redux")?e.nodeBorder:e.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .mindmap-node-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n [data-look="neo"].mindmap-node {\n filter: ${i};\n }\n [data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon {\n fill: ${t?.includes("redux")?e.mainBkg:e.git0};\n }\n [data-look="neo"].mindmap-node.section-root .text-inner-tspan {\n fill: ${t?.includes("redux")?e.nodeBorder:e["cScaleLabel"+("neutral"===t?1:0)]};\n }\n ${e.useGradient&&n&&e.mainBkg?S(e.THEME_COLOR_LIMIT,n,e.mainBkg):""}\n`},"getStyles"),L={get db(){return new _},renderer:k,parser:f,styles:x}}}]); \ No newline at end of file diff --git a/assets/js/5784.879bd023.js b/assets/js/5784.879bd023.js new file mode 100644 index 000000000..7b84e7cde --- /dev/null +++ b/assets/js/5784.879bd023.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[5784],{55784(e,s,c){c.d(s,{createRailroadPegServices:()=>a.P});var a=c(43245);c(4954)}}]); \ No newline at end of file diff --git a/assets/js/583.87506af6.js b/assets/js/583.87506af6.js new file mode 100644 index 000000000..26de3d7ac --- /dev/null +++ b/assets/js/583.87506af6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[583],{15350(e,t,n){n.d(t,{m:()=>o});var i=n(86827),o=class{constructor(e){this.init=e,this.records=this.init()}static{(0,i.K)(this,"ImperativeState")}reset(){this.records=this.init()}}},77454(e,t,n){function i(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}n.d(t,{S:()=>i}),(0,n(86827).K)(i,"populateCommonDb")},30583(e,t,n){n.d(t,{diagram:()=>W});var i=n(15350),o=n(77454),r=n(5637),s=n(58962),c=n(16459),a=n(76385),d=n(31293),l=n(86827),h=n(78731),p=/[\u2500\u2501\u2502\u2503\u2514\u2517\u251c\u2523]/,g=/[\u2514\u2517\u251c\u2523]/,f=/[\u2500\u2501]/,u=/^[\s\u2502\u2503]+$/,w=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,x=/^\s*%%/;function m(e){return e.some(e=>p.test(e))}function b(e){for(const t of e){const e=g.exec(t);if(e?.index&&e.index>0)return e.index}return 4}function y(e,t){return e.replace(/\bline\s+(\d+)\b/gi,(e,n)=>{const i=parseInt(n,10),o=t.get(i);return o?`line ${o}`:e})}function k(e){const t=e.split("\n"),n=new Map;let i=-1;for(const[a,d]of t.entries())if("treeView-beta"===d.trim()){i=a;break}if(-1===i)return{text:e,lineMap:n};const o=[];for(let a=i+1;a({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),v=(0,l.K)(()=>{$.reset(),(0,a.IU)()},"clear"),C=(0,l.K)(()=>$.records.stack[0],"getRoot"),K=(0,l.K)(()=>$.records.cnt,"getCount"),V=a.UI.treeView,B=(0,l.K)(()=>(0,c.$t)(V,(0,a.zj)().treeView),"getConfig"),T={clear:v,addNode:(0,l.K)((e,t,n,i,o,r)=>{for(;e<=$.records.stack[$.records.stack.length-1].level;)$.records.stack.pop();const s={id:$.records.cnt++,level:e,name:t,nodeType:n,icon:o,cssClass:i,description:r,children:[]};$.records.stack[$.records.stack.length-1].children.push(s),$.records.stack.push(s)},"addNode"),getRoot:C,getCount:K,getConfig:B,getAccTitle:a.iN,getAccDescription:a.m7,getDiagramTitle:a.ab,setAccDescription:a.EI,setAccTitle:a.SV,setDiagramTitle:a.ke},I=(0,l.K)(e=>{(0,o.S)(e,T);for(const t of e.nodes){const e="number"==typeof t.indent?t.indent:0;let n=t.name;const i=n.endsWith("/");i&&(n=n.slice(0,-1));const o=i?"directory":"file",r=t.classAnnotation||void 0,s=t.iconAnnotation,c=void 0!==s?s||"none":void 0,d=t.descAnnotation||void 0,l=d?(0,a.jZ)(d,(0,a.zj)()):void 0;T.addNode(e,n,o,r,c,l)}},"populate"),M={parse:(0,l.K)(async e=>{const{text:t,lineMap:n}=k(e);try{const e=await(0,h.qg)("treeView",t);d.R.debug(e),I(e)}catch(i){throw n.size>0&&i instanceof Error&&(i.message=y(i.message,n)),i}},"parse")},D={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:''},file:{body:''}}};function A(e,t){const n=t?.filenameIcons?.[e];if(n)return n;const i=e.lastIndexOf(".");if(i>0){const n=e.substring(i).toLowerCase(),o=t?.extensionIcons;return o?.[n]??o?.[n.slice(1)]}}function E(e,t){return e.includes(":")?e:e in D.icons||!t?`${D.prefix}:${e}`:`${t}:${e}`}function S(e,t){if("none"!==e.icon){if(e.icon)return E(e.icon,t.defaultIconPack);if(t.showIcons){if("file"===e.nodeType){const n=A(e.name,t);if("none"===n)return;if(n)return E(n,t.defaultIconPack)}return`${D.prefix}:${"directory"===e.nodeType?"folder":"file"}`}}}(0,l.K)(A,"detectIcon"),(0,l.K)(E,"qualifyIcon"),(0,l.K)(S,"getNodeIcon"),(0,s.pC)([{name:D.prefix,icons:D}]);var z=(0,l.K)(async(e,t)=>{const n=[],i=(0,l.K)(e=>{const o=S(e,t);o&&n.push({icon:o,node:e}),e.children.forEach(i)},"collect");i(e);const o=await Promise.all(n.map(async({icon:e,node:t})=>({id:t.id,svg:await(0,s.WY)(e,{height:14,width:14})})));return new Map(o.map(({id:e,svg:t})=>[e,t]))},"resolveNodeIcons"),N=(0,l.K)((e,t,n,i,o,r)=>{const s=i.append("g");let c="treeView-node-label";"directory"===n.nodeType&&(c+=" treeView-node-dir"),n.cssClass&&(c+=` ${n.cssClass}`);const a=S(n,o),d=void 0!==a;a&&s.append("g").attr("class","treeView-node-icon").attr("transform",`translate(${e+o.paddingX}, ${t+o.paddingY})`).html(r.get(n.id)??"");const l=s.append("text").text(n.name).attr("dominant-baseline","middle").attr("class",c),{height:h,width:p}=l.node().getBBox(),g=h+2*o.paddingY,f=e+o.paddingX+(d?18:0);l.attr("x",f),l.attr("y",t+g/2);const u=f+p,w=p+2*o.paddingX+(d?18:0);return n.BBox={x:e,y:t,width:w,height:g},n.cssClass?.split(/\s+/).includes("highlight")&&s.insert("rect",":first-child").attr("x",e).attr("y",t+1).attr("width",0).attr("height",g-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:n,nodeGroup:s,labelRightEdge:u,centerY:t+g/2}},"positionLabel"),R=(0,l.K)((e,t,n,i,o,r)=>e.append("line").attr("x1",t).attr("y1",n).attr("x2",i).attr("y2",o).attr("stroke-width",r).attr("class","treeView-node-line"),"positionLine"),X=(0,l.K)((e,t,n,i)=>{let o=0,r=0;const s=[],c=(0,l.K)((e,t,n,c)=>{const a=c*(n.rowIndent+n.paddingX),d=N(a,o,t,e,n,i);s.push(d);const{height:l,width:h}=t.BBox;R(e,a-n.rowIndent,o+l/2,a,o+l/2,n.lineThickness),r=Math.max(r,a+h),o+=l},"drawNode"),a=(0,l.K)((t,i=0)=>{c(e,t,n,i),t.children.forEach(e=>{a(e,i+1)});const{x:o,y:r,height:s}=t.BBox;if(t.children.length){const{y:i,height:c}=t.children[t.children.length-1].BBox;R(e,o+n.paddingX,r+s,o+n.paddingX,i+c/2+n.lineThickness/2,n.lineThickness)}},"processNode");a(t);const d=s.filter(e=>e.node.description);if(d.length>0){const e=Math.max(...s.map(e=>e.labelRightEdge))+16;for(const t of d){const i=t.nodeGroup.append("text").text(t.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",e).attr("y",t.centerY).node().getBBox();r=Math.max(r,e+i.width+n.paddingX)}}for(const l of s)if(l.node.cssClass?.split(/\s+/).includes("highlight")){const e=l.nodeGroup.select(".treeView-highlight-bg");if(!e.empty()){const t=r-l.node.BBox.x+8;e.attr("width",t),r=Math.max(r,l.node.BBox.x+t+2)}}return{totalHeight:o,totalWidth:r}},"drawTree"),L={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},W={db:T,renderer:{draw:(0,l.K)(async(e,t,n,i)=>{d.R.debug("Rendering treeView diagram\n"+e);const o=i.db,s=o.getRoot(),c=o.getConfig(),l=(0,r.D)(t),h=l.append("g");h.attr("class","tree-view");const p=await z(s,c),{totalHeight:g,totalWidth:f}=X(h,s,c,p);l.attr("viewBox",`-${c.lineThickness/2} 0 ${f} ${g}`),(0,a.a$)(l,g,f,c.useMaxWidth)},"draw")},parser:M,styles:(0,l.K)(({treeView:e})=>{const{labelFontSize:t,labelColor:n,lineColor:i,iconColor:o,descriptionColor:r,highlightBg:s,highlightStroke:a}=(0,c.$t)(L,e);return`\n .treeView-node-label {\n font-size: ${t};\n fill: ${n};\n white-space: pre;\n }\n .treeView-node-dir {\n font-weight: bold;\n }\n .treeView-node-line {\n stroke: ${i};\n }\n .treeView-node-icon {\n color: ${o};\n }\n .treeView-node-description {\n font-size: ${t};\n fill: ${r};\n font-style: italic;\n white-space: pre;\n }\n .treeView-highlight-bg {\n fill: ${s};\n stroke: ${a};\n stroke-width: 1;\n }\n `},"styles")}}}]); \ No newline at end of file diff --git a/assets/js/59713e80.0f25dc5f.js b/assets/js/59713e80.0f25dc5f.js new file mode 100644 index 000000000..bc3f03356 --- /dev/null +++ b/assets/js/59713e80.0f25dc5f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[5929],{76820(e,t,n){n.r(t),n.d(t,{assets:()=>h,contentTitle:()=>a,default:()=>d,frontMatter:()=>r,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"develop/contribute/protocols","title":"Protocols","description":"Technical documentation of core Bee protocols and their implementation details for developers.","source":"@site/docs/develop/contribute/protocols.md","sourceDirName":"develop/contribute","slug":"/develop/contribute/protocols","permalink":"/docs/develop/contribute/protocols","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/develop/contribute/protocols.md","tags":[],"version":"current","frontMatter":{"title":"Protocols","id":"protocols","description":"Technical documentation of core Bee protocols and their implementation details for developers."},"sidebar":"develop","previous":{"title":"Overview","permalink":"/docs/develop/contribute/introduction"}}');var i=n(74848),o=n(28453);const r={title:"Protocols",id:"protocols",description:"Technical documentation of core Bee protocols and their implementation details for developers."},a=void 0,h={},l=[{value:"Protocols specifications",id:"protocols-specifications",level:2},{value:"Proposal",id:"proposal",level:2},{value:"Hive",id:"hive",level:2},{value:"Appendix",id:"appendix",level:3},{value:"Kademlia",id:"kademlia",level:2},{value:"Push and pull: chunk retrieval and syncing",id:"push-and-pull-chunk-retrieval-and-syncing",level:2},{value:"Requirements",id:"requirements",level:3},{value:"Incentivisation strategy",id:"incentivisation-strategy",level:3},{value:"Retrieval",id:"retrieval",level:2},{value:"Protocol breach",id:"protocol-breach",level:3},{value:"Request chunk - sequence diagram",id:"request-chunk---sequence-diagram",level:3},{value:"Request chunk - flow diagram",id:"request-chunk---flow-diagram",level:3},{value:"Appendix",id:"appendix-1",level:3},{value:"Pushsync",id:"pushsync",level:2},{value:"Multiplexing",id:"multiplexing",level:3},{value:"Context",id:"context",level:4},{value:"Problem",id:"problem",level:4},{value:"Multiplexing: early replication within neighborhood",id:"multiplexing-early-replication-within-neighborhood",level:4},{value:"Push sync flow",id:"push-sync-flow",level:4},{value:"Appendix",id:"appendix-2",level:3},{value:"Pullsync",id:"pullsync",level:2},{value:"Appendix",id:"appendix-3",level:3},{value:"Peer rating",id:"peer-rating",level:3},{value:"Decision strategy",id:"decision-strategy",level:3},{value:"Transport",id:"transport",level:3}];function c(e){const t={code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",mermaid:"mermaid",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h2,{id:"protocols-specifications",children:"Protocols specifications"}),"\n",(0,i.jsx)(t.p,{children:"An attempt to describe the desired behaviour of the main DISC protocols, which corresponds to the rational choice a node should make in order to maximize its profitability."}),"\n",(0,i.jsx)(t.p,{children:"A communications protocol is a set of formal rules describing how to transmit or exchange data, especially across a network."}),"\n",(0,i.jsx)(t.p,{children:"We'll begin by describing the Hive, Retrieval, PushSync, PullSync communication protocols as well as the Kademlia topology component."}),"\n",(0,i.jsx)(t.h2,{id:"proposal",children:"Proposal"}),"\n",(0,i.jsx)(t.p,{children:"The purpose of this document is to specify these concepts:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"A pattern of exchange of messages which in semantic units corresponds to the high level function of what a node accomplishes in an exchange."}),"\n",(0,i.jsx)(t.li,{children:"Strategies of behaviour that a node should adopt in situations like network disconnects, timeouts, invalid chunks etc."}),"\n",(0,i.jsx)(t.li,{children:"An incentivisation strategy such that constructive behaviour should be rewarded and encouraged while deviating from the protocol rules should result in punishing measures."}),"\n"]}),"\n",(0,i.jsx)(t.h2,{id:"hive",children:"Hive"}),"\n",(0,i.jsx)(t.p,{children:"The Hive protocol defines how nodes exchange information about their peers in order to reach and maintain a saturated Kademlia connectivity."}),"\n",(0,i.jsx)(t.p,{children:"The exchange of this information happens upon connection, however nodes can broadcast newly received peers to their peers during the lifetime of connection."}),"\n",(0,i.jsx)(t.p,{children:"While the simplest approach is to share all known peers (during an exchange) it might be more optimal to narrow down to a useful subset of peers - for instance all the peers up to a certain depth or belonging to a certain bin."}),"\n",(0,i.jsx)(t.p,{children:"The exchanged information includes both overlay and underlay addresses of the known remote peers."}),"\n",(0,i.jsx)(t.p,{children:"The overlay address serves to select peers to achieve the connectivity pattern needed for the desired network topology, while the underlay address is needed to establish the peer connections by dialing selected peers."}),"\n",(0,i.jsx)(t.p,{children:"Upon receiving a peers message, nodes should store the peer information in their address book, i.e., a data structure containing info about peers known to the node that is meant to be persisted across sessions."}),"\n",(0,i.jsx)(t.h3,{id:"appendix",children:"Appendix"}),"\n",(0,i.jsx)(t.p,{children:"The protobuf definitions"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-protobuf",children:'// Copyright 2020 The Swarm Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nsyntax = "proto3";\n\npackage hive;\n\noption go_package = "pb";\n\nmessage Peers {\n repeated BzzAddress peers = 1;\n}\n\nmessage BzzAddress {\n bytes Underlay = 1;\n bytes Signature = 2;\n bytes Overlay = 3;\n bytes Nonce = 4;\n}\n'})}),"\n",(0,i.jsx)(t.h2,{id:"kademlia",children:"Kademlia"}),"\n",(0,i.jsx)(t.p,{children:"Kademlia topology is a specific connectivity pattern used by all DISC protocols and its purpose is to route messages between nodes in a network using overlay addressing."}),"\n",(0,i.jsx)(t.p,{children:"The message routing happens in such a fashion that with every network hop we will get closer to the target node, specifically at half of the distance covered by the previous hop."}),"\n",(0,i.jsx)(t.p,{children:"Swarm uses the recursive/forwarding style of Kademlia."}),"\n",(0,i.jsx)(t.p,{children:"This approach implies that every forwarding node - once it received a request - will keep an in-memory record that captures the request related information (requester, time of the request etc.) until the request is satisfied, rejected or times out."}),"\n",(0,i.jsx)(t.p,{children:"Because a forwarder can not reliably tell how much time the downstream peer will need to satisfy the request - the choice of a reasonable value for waiting period is a point of contention."}),"\n",(0,i.jsx)(t.p,{children:"The choice of a reasonable waiting period is constrained by these factors:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:'keeping the in-memory record for too long means that there\'s going to be a limit on how many concurrent requests a peer can keep "in-flight", because memory is limited.'}),"\n",(0,i.jsx)(t.li,{children:"if the peer decides to time out prematurely (while downstream peers are still processing the request) then the effort of all the downstream peers will be wasted."}),"\n",(0,i.jsx)(t.li,{children:"we should distinguish between unsolicited chunks and chunks that we received from the downstream after we stopped waiting for the response (timed out). After a certain period of time all responses will be treated the same because of the need to free the allocated resources (the in-memory record)."}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:"Conversely the downstream should be informed when the upstream is no longer interested in the previously sent request, so it could free the used resources. This way the downstream won't return the chunk after the request has timed out, risking being punished."}),"\n",(0,i.jsx)(t.h2,{id:"push-and-pull-chunk-retrieval-and-syncing",children:"Push and pull: chunk retrieval and syncing"}),"\n",(0,i.jsx)(t.p,{children:"Swarm involves a direct storage scheme of fixed size where chunks are stored on nodes with address corresponding to the chunk address."}),"\n",(0,i.jsx)(t.p,{children:"The syncing protocols act in such a way that they reach those neighborhoods whenever a request is initiated."}),"\n",(0,i.jsx)(t.p,{children:"Such a route is sure to exist as a result of the Kademlia topology of keep-alive connections between peers."}),"\n",(0,i.jsx)(t.p,{children:"The process of relaying the request from the initiator to the storer is called forwarding and also the process of passing the chunk data along the same path is called backwarding."}),"\n",(0,i.jsx)(t.p,{children:"Conversely - Backwarding and Forwarding are both notions defined on a keep alive network of peers as strategies of reaching certain addresses."}),"\n",(0,i.jsx)(t.p,{children:"If we zoom into a particular node in the forwarding (or backwarding) path we see the following strategy:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Receive a request"}),"\n",(0,i.jsx)(t.li,{children:"Decide who to forward the request to (decision strategy)"}),"\n",(0,i.jsx)(t.li,{children:"Have a way to match the the response to the original request."}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:"The crucial step is the second one - strategy of choosing the peer to forward the request to and how they react to failure like stream closure or nodes dropping offline or closing the protocol connection and whether we proactively initiate several requests to peers."}),"\n",(0,i.jsx)(t.p,{children:"The last step does not apply for the storer nodes, since they do not forward the request but they satisfy it."}),"\n",(0,i.jsx)(t.p,{children:"The key element of these notions is that the decision about the next action is being done on the node level, which will select the next peers(s) and delegate them with handling the request."}),"\n",(0,i.jsx)(t.p,{children:"The simplest representation of this would be a recursive algorithm that with every iteration gets closer to the target address and stops when it runs out of peers or successfully reaches the target node."}),"\n",(0,i.jsx)(t.h3,{id:"requirements",children:"Requirements"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:'We need a way to determine the "best" candidate peer to forward the request to, and if this option fails, continue with the "next-best" candidate until we exhaust available peers. The decision of picking the "best" peer is delegate to an overlay driver that has the best knowledge of this peer\'s past history and performance and topology structure.'}),"\n",(0,i.jsx)(t.li,{children:"We need a strategy of parallelisation of requests that we pass downstream, where appropriate. Parallel requests to different peers allow us increase the chances of successfully syncing the chunk but it comes with the cost of using our bandwidth allowance, so it's imperative to zoom in on an optimal balance between the two."}),"\n",(0,i.jsx)(t.li,{children:"We need a way to ensure that when we issue a syncing request we don\u2019t end up in a situation when this request comes back around to us, wasting network resources."}),"\n",(0,i.jsx)(t.li,{children:'In the case when we are a "forwarder" node, we might consider a decision strategy on whether we want to cache the chunk in the event of a repeated request.'}),"\n",(0,i.jsx)(t.li,{children:"To every forwarding/backwarding exchange we attach an incentivisation action that would take into account variables like the success of the action and the cost of performing the action."}),"\n",(0,i.jsx)(t.li,{children:"We need to design the optimal incentivisation scheme, to determine the optimal payment/settlement frequency and correctness of computation of the payment/charged amount. This also applies to both chunk storage scheme and the relayed request-response scheme."}),"\n",(0,i.jsx)(t.li,{children:"We need to have a sensible strategy when it comes to waiting for a peer to respond to our request; as a forwarder, we want to make our best effort to sync the chunk but without waiting for an excessive amount of time, which would lead to waste of resources."}),"\n",(0,i.jsx)(t.li,{children:"When receiving a response to an expired request - or we are unable to conclude if such a request has ever been issued - punishing measures should be imposed on the upstream peer."}),"\n"]}),"\n",(0,i.jsx)(t.h3,{id:"incentivisation-strategy",children:"Incentivisation strategy"}),"\n",(0,i.jsx)(t.p,{children:"An incentivisation strategy should be put in place in such way that it encourages honest collaboration between nodes."}),"\n",(0,i.jsx)(t.p,{children:"This implies that a given peer will make the best effort to satisfy any request while not allowing any abuse and waste of its resources."}),"\n",(0,i.jsx)(t.p,{children:"Having an accounting component that would keep track of the exchange activity between peers ensures that we do not allow excessive freeloading from the misbehaving peers."}),"\n",(0,i.jsx)(t.p,{children:'Having a granular punishment strategy ensures that the peers who misbehave (perhaps due to network latencies) will not be sanctioned to the same extent as peers who engage in grave protocol breaches, but are given a chance to "clean up their act".'}),"\n",(0,i.jsx)(t.h2,{id:"retrieval",children:"Retrieval"}),"\n",(0,i.jsx)(t.p,{children:"The retrieval of a chunk is a process which fetches a given chunk from the network by its address."}),"\n",(0,i.jsx)(t.p,{children:"Chunk retrieval follows the general semantics of chunk syncing and takes the same network path as the push sync protocol, but in reverse."}),"\n",(0,i.jsx)(t.h3,{id:"protocol-breach",children:"Protocol breach"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Receiving a repeated request for a non-existent chunk should lead to rate limiting in order to discourage resource wasteful actions."}),"\n",(0,i.jsx)(t.li,{children:"Receiving a response in the form of an invalid chunk constitutes a protocol breach and punishing measures are being taken against the peer at fault."}),"\n"]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-markdown",children:"step I\n1) check if this exact request has been received within last N minutes and it is for a non-existent chunk\n2) if such request is found - take punishing measures against the requester (blocklisting)\n3) request a peer from Kademlia\n4) request chunk from the peer\n5) if the peer does not return a valid chunk - go back to step 3\n6) if the chunk is found and valid, log the event details in the local state and return the chunk to the requester\n7) consider caching the chunk in case there might be a repeated request for it\n\nError states\n- if we exhaust the list of peers (candidates) for this action, return a 'failure to get chunk' response to the requester. We might consider increasing our peer connections pool to avoid such situation in the future\n- if we are able to conclude that the chunk is non-existent (TBD) we return 'chunk not found' and consider rate limiting measures against the requester.\n- if we ran out of allowed time while looking for the chunk we return a 'timeout' response to the requester\n- if the chunk is retrieved successfully but does not pass validation, take punishing measures against the peer (blocklisting).\n- if the attempt fails, log the relevant attempt details in the local state and repeat the attempt against a new peer\n- if the peer times out responding to our request we log the attempt details and repeat step II against a new peer\n"})}),"\n",(0,i.jsx)(t.h3,{id:"request-chunk---sequence-diagram",children:"Request chunk - sequence diagram"}),"\n",(0,i.jsx)(t.mermaid,{value:"sequenceDiagram\n Originator->>+Backwarder: Request for chunk\n Backwarder->>+Backwarder: Have I seen this request before\n Backwarder->>-Originator: Reject duplicate request\n Backwarder->>+Backwarder: Request next peer from the Kademlia iterator\n Backwarder->>+Storer: Request for chunk\n Storer->>-Backwarder: Success\n Backwarder->>-Originator: Return chunk"}),"\n",(0,i.jsx)(t.h3,{id:"request-chunk---flow-diagram",children:"Request chunk - flow diagram"}),"\n",(0,i.jsx)(t.mermaid,{value:"flowchart TD\n A[Get next peer from Kademlia] --\x3e H{Any time left?}\n H --\x3e |No| I(Reject request) --\x3e S[STOP]\n H --\x3e |Yes| M{Any peers left}\n M --\x3e |Yes| N(Request the chunk from peer) --\x3e K{Check response}\n M --\x3e |No peers left to try| I\n K --\x3e |Timeout| L(Update peer stats) --\x3e A\n K --\x3e |Invalid chunk| N1(Punish peer) --\x3e A\n K --\x3e |Success| R(Return the chunk to the upstream peer) --\x3e S"}),"\n",(0,i.jsx)(t.h3,{id:"appendix-1",children:"Appendix"}),"\n",(0,i.jsx)(t.p,{children:"The protobuf definitions"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-protobuf",children:'// Copyright 2020 The Swarm Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nsyntax = "proto3";\n\npackage retrieval;\n\noption go_package = "pb";\n\nmessage Request {\n bytes Addr = 1;\n}\n\nmessage Delivery {\n bytes Data = 1;\n bytes Stamp = 2;\n}\n'})}),"\n",(0,i.jsx)(t.h2,{id:"pushsync",children:"Pushsync"}),"\n",(0,i.jsx)(t.p,{children:"Pushsync protocol is responsible for ensuring delivery of the chunk to its prescribed storer after it has been uploaded to any arbitrary node."}),"\n",(0,i.jsx)(t.p,{children:"The Pushsync protocol works in a similar way to the Retrieval protocol: the chunk is passed to the peer whose address is closest to the chunk address, and a custody receipt is received in response."}),"\n",(0,i.jsx)(t.p,{children:'Then the same process is repeated until the chunk eventually reaches the storer node located in a certain "neighborhood".'}),"\n",(0,i.jsx)(t.p,{children:'Since the Pushsync protocol is a "mirror" version of the Retrieval protocol - it ensures that a successfully uploaded chunk is retrievable from the same "neighborhood" by the virtue of the fact that nodes in a neighborhood are connected to each other.'}),"\n",(0,i.jsx)(t.h3,{id:"multiplexing",children:"Multiplexing"}),"\n",(0,i.jsx)(t.p,{children:"Multiplexing is a recommended node strategy for the push sync protocol that involves early replication and opportunistic receipting. Its intention is to reduce the dependence on single closest nodes and to improve on network performance, i.e., push sync success rate, bandwidth overhead and latency."}),"\n",(0,i.jsx)(t.h4,{id:"context",children:"Context"}),"\n",(0,i.jsx)(t.p,{children:"The current implementation of the push sync protocol aims to push a chunk to the closest node in the neighborhood which is then supposed to give out a receipt."}),"\n",(0,i.jsx)(t.p,{children:"Pushing the chunk to the single closest node is motivated by the retrieval protocol, which aims to find the chunk at that closest node."}),"\n",(0,i.jsx)(t.p,{children:"When the closest node hands out a receipt, this node also replicates the chunk to 3 peers in the neighborhood which are further away from the chunk than him."}),"\n",(0,i.jsx)(t.p,{children:"This replication takes place to ensure that the chunk is not lost when the closest node shuts down before the chunk is not pull-sync'ed and to speed up the spreading of the chunk in the neighborhood, in advance of pull sync."}),"\n",(0,i.jsx)(t.h4,{id:"problem",children:"Problem"}),"\n",(0,i.jsx)(t.p,{children:"Treating the closest node as a single target of push sync is fragile. If this peer has a badly-performing blockchain backend, slow or incomplete connectivity or is malicious, it may not spread the chunk and/or does not respond with a receipt."}),"\n",(0,i.jsx)(t.p,{children:"In this case, currently, the originator must retry the entire push-sync operation many times before the other peers within neighborhood recognise the improper behaviour."}),"\n",(0,i.jsx)(t.p,{children:"In-neighborhood retries are ideally avoided because such retries might cause the downstream timeouts to expire."}),"\n",(0,i.jsx)(t.p,{children:"In case of incomplete connectivity, the push sync protocol can end at a different branch of the neighborhood than the retrieval protocol--causing the chunk not to be retrievable."}),"\n",(0,i.jsx)(t.p,{children:"It should be noted that the pull sync protocol (may?) remedies this problem with a small time-delay."}),"\n",(0,i.jsx)(t.h4,{id:"multiplexing-early-replication-within-neighborhood",children:"Multiplexing: early replication within neighborhood"}),"\n",(0,i.jsxs)(t.p,{children:["The first node in the push sync forward chain that falls within the neighborhood acts as ",(0,i.jsx)(t.em,{children:"multiplexer"}),", i.e., it forwards the request to a number of closest nodes and responds with a self-signed receipt."]}),"\n",(0,i.jsx)(t.p,{children:"Thus in achieving retrievability and security via early replication, we do not critically rely on the closest node to be available any more."}),"\n",(0,i.jsx)(t.h4,{id:"push-sync-flow",children:"Push sync flow"}),"\n",(0,i.jsx)(t.p,{children:"We define the different roles peers have as part of the push sync forwarding chain:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"originator -- creator of the request"}),"\n",(0,i.jsx)(t.li,{children:"forwarder -- closer to the chunk than the originator, further away away than the 1-before node."}),"\n",(0,i.jsx)(t.li,{children:"multiplexer -- first node in the forward chain who is in the neighborhood"}),"\n",(0,i.jsxs)(t.li,{children:["closest nodes -- according to the downstream node (usually the multiplexer), within the ",(0,i.jsx)(t.code,{children:"n"})," closest nodes to the chunks (not including self)"]}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:"we describe the envisioned flow of push sync by describing the intended behaviour strategy of the various roles."}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsx)(t.li,{children:"originator sends chunk to a peer closer to the chunk."}),"\n",(0,i.jsx)(t.li,{children:"forwarder(s) forwards chunk that ends up with a node already within the neighborhood that acts as multiplexer"}),"\n",(0,i.jsx)(t.li,{children:"The multiplexer concurrently sends the chunk to 3 closest nodes attaching a multiplexing-list as part of the protocol message. At the same time they respond to their upstream peer with a self-signed receipt (unless the multiplexer is itself the originator)."}),"\n",(0,i.jsx)(t.li,{children:"Non-multiplexing closest nodes, i.e., nodes in the neighborhood that receive the pushsync message from a not-closest neighbour with a multiplexing list included, validate whether, based on their view, the multiplexing list covers all 3 closest nodes (potentially including the peer and/or the upstream peer themselves). If not, the node forwards the chunk to the peers left out. These peers are also added to the multiplexing list received from upstream and the extended list is attached with the chunk pushed."}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["If the multiplexer node does not know a closest peer ",(0,i.jsx)(t.em,{children:"p"})," but several of its chosen closest nodes do, then that node ",(0,i.jsx)(t.em,{children:"p"})," will receive the same pushsynced chunk multiple times"]}),"\n",(0,i.jsx)(t.h3,{id:"appendix-2",children:"Appendix"}),"\n",(0,i.jsx)(t.p,{children:"The protobuf definitions"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-protobuf",children:'// Copyright 2020 The Swarm Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nsyntax = "proto3";\n\npackage pushsync;\n\noption go_package = "pb";\n\nmessage Delivery {\n bytes Address = 1;\n bytes Data = 2;\n bytes Stamp = 3;\n}\n\nmessage Receipt {\n bytes Address = 1;\n bytes Signature = 2;\n bytes Nonce = 3;\n}\n'})}),"\n",(0,i.jsx)(t.h2,{id:"pullsync",children:"Pullsync"}),"\n",(0,i.jsx)(t.p,{children:"While the other described protocols are request scoped, Pullsync is a subscription type protocol."}),"\n",(0,i.jsx)(t.p,{children:"It's worth mentioning that the chunks that are being synchronized between nodes always travel alongside their corresponding postage stamps."}),"\n",(0,i.jsx)(t.p,{children:"Pullsync's role is to help synchronization of the chunks between neighborhood nodes. It bootstraps new nodes by filling up their storage with the chunks in range of their storage radius and also ensures eventual consistency - by making sure that the chunks will gradually migrate to their storer nodes."}),"\n",(0,i.jsx)(t.p,{children:"There are two kinds of syncing:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"historical syncing: catching up with content that arrived to relevant neighborhood before this session started (after an outage or for completely new nodes)."}),"\n",(0,i.jsx)(t.li,{children:"live syncing: fetching the chunks that are received after the session has started."}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:"The chunks are served in batches (ordered by timestamp) and they cover contiguous ranges."}),"\n",(0,i.jsx)(t.p,{children:'The downstream peers coordinate their syncing by requesting ranges from the upstream with the help of the "interval store" - to keep track of which ranges are left to be synchronized.'}),"\n",(0,i.jsx)(t.p,{children:"Because live syncing happens in sessions - it is inevitable that after a session is completed - the downstream peer disconnects and will be missing chunks that arrive later."}),"\n",(0,i.jsx)(t.p,{children:"For this purpose the downstream peer will make a note about the timestamp of the last synced chunk on disconnect."}),"\n",(0,i.jsx)(t.p,{children:"The point of the interval based approach is to cover those gaps that inevitably arise in between syncing sessions."}),"\n",(0,i.jsx)(t.p,{children:"To save bandwidth, before the contents of the chunk is being sent over the wire, the upstream will sent a range of chunk addresses for approval. If the downstream decides that some (or all) addresses are desired - a confirmation message is sent to the upstream, to which it responds with the chunks mentioned in the request."}),"\n",(0,i.jsx)(t.mermaid,{value:"sequenceDiagram\n Downstream->>+Upstream: Get\n Upstream--\x3e>-Downstream: Offer address range\n Downstream->>+Upstream: Want address range\n Upstream--\x3e>-Downstream: Delivery"}),"\n",(0,i.jsx)(t.h3,{id:"appendix-3",children:"Appendix"}),"\n",(0,i.jsx)(t.p,{children:"The protobuf definitions"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-protobuf",children:'// Copyright 2020 The Swarm Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nsyntax = "proto3";\n\npackage pullsync;\n\noption go_package = "pb";\n\nmessage Syn {}\n\nmessage Ack {\n repeated uint64 Cursors = 1;\n}\n\nmessage Get {\n int32 Bin = 1;\n uint64 Start = 2;\n}\n\nmessage Chunk {\n bytes Address = 1;\n bytes BatchID = 2;\n}\n\nmessage Offer {\n uint64 Topmost = 1;\n repeated Chunk Chunks = 2;\n}\n\nmessage Want {\n bytes BitVector = 1;\n}\n\nmessage Delivery {\n bytes Address = 1;\n bytes Data = 2;\n bytes Stamp = 3;\n}\n'})}),"\n",(0,i.jsx)(t.h3,{id:"peer-rating",children:"Peer rating"}),"\n",(0,i.jsx)(t.p,{children:"When choosing a peer in relation to a given address - in addition to the distance between them - the Kademlia component will take into account two other factors:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"the historical performance of the given peer, both in terms of latencies and past occurrences of protocol misalignments."}),"\n",(0,i.jsx)(t.li,{children:"the accounting aspect, peers with whom we have higher credit will be preferred."}),"\n",(0,i.jsx)(t.li,{children:"we should also prioritise those downstream peers that managed to produce responses in a previously computed amount of time (that would take into consideration the average time needed for a hop multiplied by the expected number of hops needed to reach a target neighborhood)."}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:"Kademila should be indexing peers by their proximity order and peers rating in order to prioritize peers based on their expected performance."}),"\n",(0,i.jsx)(t.h3,{id:"decision-strategy",children:"Decision strategy"}),"\n",(0,i.jsx)(t.p,{children:"An optimal decision strategy will take into account both proximity order and peer rating to select (out of all connected peers) the best one to pass down the request."}),"\n",(0,i.jsx)(t.p,{children:'At the implementation level the Kademlia component will offer (in exchange for a given address) a stateful iterator that the client (protocol) will use to get the "next-best" peer.'}),"\n",(0,i.jsx)(t.h3,{id:"transport",children:"Transport"}),"\n",(0,i.jsx)(t.p,{children:"A reliable network transport is required for the proper functionality of DISC protocols."}),"\n",(0,i.jsx)(t.p,{children:"The network transport can be a distinct component responsible for ensuring delivery, retrying on network issues and timeouts, and making optimal use of network resources."}),"\n",(0,i.jsx)(t.p,{children:"One example of usage for such a component could be embedding into the Kademlia driver so that the topology component is only concerned with overlay related operations, abstracting away any low level transport concerns."})]})}function d(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},28453(e,t,n){n.d(t,{R:()=>r,x:()=>a});var s=n(96540);const i={},o=s.createContext(i);function r(e){const t=s.useContext(o);return s.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5bb09754.1540ade7.js b/assets/js/5bb09754.1540ade7.js new file mode 100644 index 000000000..cab277ad5 --- /dev/null +++ b/assets/js/5bb09754.1540ade7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[4179],{8815(e,t,i){i.r(t),i.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>s,metadata:()=>a,toc:()=>d});const a=JSON.parse('{"id":"references/fair-data-society","title":"Fair Data Society","description":"Overview of Fair Data Society initiatives and collaboration with Swarm.","source":"@site/docs/references/fair-data-society.md","sourceDirName":"references","slug":"/references/fair-data-society","permalink":"/docs/references/fair-data-society","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/references/fair-data-society.md","tags":[],"version":"current","frontMatter":{"title":"Fair Data Society","id":"fair-data-society","description":"Overview of Fair Data Society initiatives and collaboration with Swarm."},"sidebar":"References","previous":{"title":"Community","permalink":"/docs/references/community"},"next":{"title":"FAQ","permalink":"/docs/references/faq"}}');var r=i(74848),n=i(28453);const s={title:"Fair Data Society",id:"fair-data-society",description:"Overview of Fair Data Society initiatives and collaboration with Swarm."},o=void 0,c={},d=[{value:"Links",id:"links",level:2}];function l(e){const t={a:"a",admonition:"admonition",h2:"h2",li:"li",ol:"ol",p:"p",ul:"ul",...(0,n.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.a,{href:"https://fairdatasociety.org/",children:"Fair Data Society (FDS)"})," is a coordinated network developing infrastructure and dApps for a fairer data economy and promoting human rights through digital sovereignty. It is a movement and vision aimed at promoting a decentralized, equitable, and sustainable digital ecosystem that respects individual privacy and data ownership. Its core goal is to empower individuals with control over their data, ensuring that data is used ethically and transparently, while fostering a more balanced relationship between individuals, organizations, and governments."]}),"\n",(0,r.jsx)(t.p,{children:"While FDS is an independent organization, it shares Swarm's vision for the future of data and the decentralized web. FDS uses Swarm's technology as the foundation for the software it develops and incubates for the purpose of realizing its goals."}),"\n",(0,r.jsx)(t.p,{children:"The suite of Swarm based FDS software provides a wide range of functionalities for a variety of users and use cases. The suite currently consists of:"}),"\n",(0,r.jsx)(t.admonition,{type:"caution",children:(0,r.jsx)(t.p,{children:"FDS's software is currently in beta or earlier and has no guarantees of file integrity, persistence, or security."})}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://fdp.fairdatasociety.org/",children:"The Fair Data Protocol (FDP)"})," - A data interoperability protocol for dApps that use personal data."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://fairdrive.fairdatasociety.org/",children:"Fairdrive"})," - Decentralised storage on Swarm."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://fairdrop.fairdatasociety.org/",children:"Fairdrop"})," - An easy and secure way to send your files. No central server. No tracking. No backdoors."]}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"links",children:"Links"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"https://www.youtube.com/@fairdatasociety8412",children:"FDS YouTube"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"https://fairdatasociety.org/",children:"FDS Homepage"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"https://discord.com/invite/vw3PmWf2rE",children:"FDS Discord"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"https://twitter.com/fairdatasociety",children:"FDS Twitter"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"https://github.com/fairDataSociety",children:"FDS GitHub"})}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},28453(e,t,i){i.d(t,{R:()=>s,x:()=>o});var a=i(96540);const r={},n=a.createContext(r);function s(e){const t=a.useContext(n);return a.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),a.createElement(n.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5e95c892.f0e07d21.js b/assets/js/5e95c892.f0e07d21.js new file mode 100644 index 000000000..2d388fbf1 --- /dev/null +++ b/assets/js/5e95c892.f0e07d21.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[9647],{7121(e,s,r){r.r(s),r.d(s,{default:()=>l});r(96540);var c=r(34164),u=r(17559),a=r(45500),d=r(22831),n=r(36882),t=r(74848);function l(e){return(0,t.jsx)(a.e3,{className:(0,c.A)(u.G.wrapper.docsPages),children:(0,t.jsx)(n.A,{children:(0,d.v)(e.route.routes)})})}}}]); \ No newline at end of file diff --git a/assets/js/5ee72a4b.0f63f961.js b/assets/js/5ee72a4b.0f63f961.js new file mode 100644 index 000000000..b3eced1bb --- /dev/null +++ b/assets/js/5ee72a4b.0f63f961.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[1628],{5185(e,n,s){s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>a,default:()=>l,frontMatter:()=>r,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"bee/working-with-bee/staking","title":"Staking","description":"Walkthrough of depositing xBZZ to participate in the storage incentives redistribution game and earn network rewards.","source":"@site/docs/bee/working-with-bee/staking.md","sourceDirName":"bee/working-with-bee","slug":"/bee/working-with-bee/staking","permalink":"/docs/bee/working-with-bee/staking","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/bee/working-with-bee/staking.md","tags":[],"version":"current","frontMatter":{"title":"Staking","id":"staking","description":"Walkthrough of depositing xBZZ to participate in the storage incentives redistribution game and earn network rewards."},"sidebar":"bee","previous":{"title":"Swarm CLI","permalink":"/docs/bee/working-with-bee/swarm-cli"},"next":{"title":"Cashing Out","permalink":"/docs/bee/working-with-bee/cashing-out"}}');var t=s(74848),o=s(28453);const r={title:"Staking",id:"staking",description:"Walkthrough of depositing xBZZ to participate in the storage incentives redistribution game and earn network rewards."},a=void 0,d={},c=[{value:"Quickstart Guide",id:"quickstart-guide",level:2},{value:"Prerequisites",id:"prerequisites",level:3},{value:"Step 1: Fund Your Node with xDAI and xBZZ",id:"step-1-fund-your-node-with-xdai-and-xbzz",level:3},{value:"Step 2: Stake xBZZ",id:"step-2-stake-xbzz",level:3},{value:"Step 3: Check Status",id:"step-3-check-status",level:3},{value:"Step 4: Monitor & Maximize Rewards",id:"step-4-monitor--maximize-rewards",level:3},{value:"Staking Overview",id:"staking-overview",level:2},{value:"Requirements",id:"requirements",level:3},{value:"Check Status",id:"check-status",level:3},{value:"Partial Stake Withdrawals",id:"partial-stake-withdrawals",level:2},{value:"Check for withdrawable stake",id:"check-for-withdrawable-stake",level:3},{value:"Withdraw available stake",id:"withdraw-available-stake",level:3},{value:"Reserve Doubling",id:"reserve-doubling",level:2},{value:"Step by Step Guide",id:"step-by-step-guide",level:3},{value:"Step 1: Set reserve-capacity-doubling to 1.",id:"step-1-set-reserve-capacity-doubling-to-1",level:4},{value:"Step 2: Stake at least 20 xBZZ",id:"step-2-stake-at-least-20-xbzz",level:4},{value:"Step 3: Restart node",id:"step-3-restart-node",level:4},{value:"Maximize rewards",id:"maximize-rewards",level:2},{value:"Neighborhood selection",id:"neighborhood-selection",level:3},{value:"Stake density",id:"stake-density",level:3},{value:"Chequebook verification",id:"chequebook-verification",level:3},{value:"Neighborhood Hopping",id:"neighborhood-hopping",level:2},{value:"Checking neighborhood population",id:"checking-neighborhood-population",level:3},{value:"Stake Migration",id:"stake-migration",level:2},{value:"Step 1: Withdraw xBZZ",id:"step-1-withdraw-xbzz",level:3},{value:"Step 2: Stop node",id:"step-2-stop-node",level:3},{value:"Step 3: Update and restart",id:"step-3-update-and-restart",level:3},{value:"Step 4: Re-stake xBZZ",id:"step-4-re-stake-xbzz",level:3},{value:"Troubleshooting",id:"troubleshooting",level:2},{value:"Frozen node",id:"frozen-node",level:3},{value:"Check frozen status",id:"check-frozen-status",level:4},{value:"Diagnosing freezing issues",id:"diagnosing-freezing-issues",level:4},{value:"Repairing corrupt reserve",id:"repairing-corrupt-reserve",level:3},{value:"Node occupies unusually large space on disk",id:"node-occupies-unusually-large-space-on-disk",level:3},{value:"Node not participating in redistribution",id:"node-not-participating-in-redistribution",level:3},{value:"Run sampler process to benchmark performance",id:"run-sampler-process-to-benchmark-performance",level:4}];function h(e){const n={a:"a",admonition:"admonition",annotation:"annotation",br:"br",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",math:"math",mdxAdmonitionTitle:"mdxAdmonitionTitle",mn:"mn",mo:"mo",mrow:"mrow",msup:"msup",mtext:"mtext",ol:"ol",p:"p",pre:"pre",semantics:"semantics",span:"span",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:["Staking locks up xBZZ so your full node can join the ",(0,t.jsx)(n.strong,{children:"redistribution game"})," and earn a share of the network's storage-rent rewards. Staking requires a fully synced full node and a minimum of 10 xBZZ, and the stake is non-refundable."]}),"\n",(0,t.jsx)(n.h2,{id:"quickstart-guide",children:"Quickstart Guide"}),"\n",(0,t.jsxs)(n.p,{children:["This guide will walk you through ",(0,t.jsx)(n.strong,{children:"staking xBZZ"})," and participating in the ",(0,t.jsx)(n.strong,{children:"redistribution game"})," to earn storage incentives."]}),"\n",(0,t.jsx)(n.admonition,{type:"warning",children:(0,t.jsxs)(n.p,{children:["Staking requires a fully synced full node and a minimum of 10 xBZZ. See detailed ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/staking#requirements",children:"staking requirements"})," below."]})}),"\n",(0,t.jsx)(n.h3,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"A small amount of xDAI to pay transaction fees - ~0.01 xDAI is enough to start"}),"\n",(0,t.jsx)(n.li,{children:"At least 10 xBZZ to deposit as non-refundable stake"}),"\n",(0,t.jsx)(n.li,{children:"A fully synced full Bee node"}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.p,{children:["If you don't already have xDAI or xBZZ, you will need to ",(0,t.jsx)(n.a,{href:"/docs/bee/installation/fund-your-node#getting-tokens",children:"get some"}),"."]})}),"\n",(0,t.jsx)(n.h3,{id:"step-1-fund-your-node-with-xdai-and-xbzz",children:"Step 1: Fund Your Node with xDAI and xBZZ"}),"\n",(0,t.jsxs)(n.p,{children:["Your node needs ",(0,t.jsx)(n.strong,{children:"xDAI"})," to pay for transaction fees on Gnosis Chain, and also needs ",(0,t.jsx)(n.strong,{children:"xBZZ"})," to deposit as stake."]}),"\n",(0,t.jsx)(n.p,{children:"First, find your node's address using:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"swarm-cli addresses\n"})}),"\n",(0,t.jsxs)(n.p,{children:["This will print your node's various addresses. The one you need to fund is ",(0,t.jsx)(n.code,{children:"Ethereum"})]}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"Ethereum"})," term here refers to an Ethereum style address on Gnosis Chain. Do not send funds to the address on the Ethereum chain itself."]})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"Node Addresses\n------------------------------------------------------------------------------------------------------------------\nEthereum: 9a73f283cd9211b96b5ec63f7a81a0ddc847cd93\n...\n"})}),"\n",(0,t.jsx)(n.p,{children:"Then, use the following command to check how much is required:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"swarm-cli status\n"})}),"\n",(0,t.jsxs)(n.p,{children:["At the bottom of the results printed to the terminal you will find the ",(0,t.jsx)(n.code,{children:"Redistribution"})," section. From there you will see the ",(0,t.jsx)(n.code,{children:"Minimum gas funds"})," item. That value is the minimum amount required to participate in a ",(0,t.jsx)(n.em,{children:"single redistribution round"}),"."]}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.p,{children:["If you plan on operating your node for an extended period, you will want to deposit quite a bit more than the minimum. You can start with ",(0,t.jsx)(n.strong,{children:"0.01 xDAI"})," to cover fees for the next few weeks/months of active staking, and then monitor actual usage and top-up when needed."]})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"Redistribution\nReward: 0.0000000000000000\nHas sufficient funds: true\nFully synced: true\nFrozen: false\nLast selected round: 263526\nLast played round: 0\nLast won round: 0\nMinimum gas funds: 0.000000000326250000\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Finally, send the required xDAI and xBZZ to the address you got from ",(0,t.jsx)(n.code,{children:"swarm-cli addresses"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"You will need to send at least 10 xBZZ to get started staking."}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.p,{children:["Send ",(0,t.jsx)(n.strong,{children:"20 xBZZ"})," if using the ",(0,t.jsx)(n.a,{href:"#reserve-doubling",children:"reserve doubling"})," feature."]})}),"\n",(0,t.jsx)(n.h3,{id:"step-2-stake-xbzz",children:"Step 2: Stake xBZZ"}),"\n",(0,t.jsxs)(n.p,{children:["Once your node has xDAI, stake ",(0,t.jsx)(n.strong,{children:"at least 10 xBZZ"})," (this is non-refundable)."]}),"\n",(0,t.jsxs)(n.p,{children:["You can use the following ",(0,t.jsx)(n.code,{children:"swarm-cli"})," command to stake 10 xBZZ:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"swarm-cli stake deposit --bzz 10\n"})}),"\n",(0,t.jsx)(n.p,{children:"After a moment, the staking transaction will complete. Then you can check that the transaction was successful:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"swarm-cli stake status\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"Staked xBZZ: 10\n"})}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Optional:"})," Stake ",(0,t.jsx)(n.strong,{children:"20 xBZZ"})," if using the ",(0,t.jsx)(n.a,{href:"#reserve-doubling",children:"reserve doubling"})," feature."]})}),"\n",(0,t.jsx)(n.h3,{id:"step-3-check-status",children:"Step 3: Check Status"}),"\n",(0,t.jsxs)(n.p,{children:["After staking you should ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/staking#check-status",children:"check your node's status"})," to make sure it is fully synced, fully funded, and operating properly."]}),"\n",(0,t.jsx)(n.h3,{id:"step-4-monitor--maximize-rewards",children:"Step 4: Monitor & Maximize Rewards"}),"\n",(0,t.jsxs)(n.p,{children:["\u2705 Make sure you are using a stable Gnosis Chain ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/configuration#setting-blockchain-rpc-endpoint",children:"RPC endpoint"}),".",(0,t.jsx)(n.br,{}),"\n","\u2705 ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/staking#check-status",children:"Check your node's status"})," to ensure it's operating properly.\n\u2705 ",(0,t.jsxs)(n.a,{href:"/docs/bee/working-with-bee/bee-api#rchash",children:["Check ",(0,t.jsx)(n.code,{children:"/rchash"})]})," to ensure your node's performance is sufficient."]}),"\n",(0,t.jsx)(n.h2,{id:"staking-overview",children:"Staking Overview"}),"\n",(0,t.jsxs)(n.p,{children:["To earn storage incentives by participating in the ",(0,t.jsx)(n.a,{href:"/docs/concepts/incentives/redistribution-game",children:"redistribution game"}),", full nodes must first deposit a minimum of 10 xBZZ as ",(0,t.jsx)(n.em,{children:(0,t.jsx)(n.strong,{children:"non-refundable"})})," stake. xDAI is also required to pay for ongoing Gnosis Chain transactions related to the redistribution game."]}),"\n",(0,t.jsx)(n.admonition,{type:"danger",children:(0,t.jsx)(n.p,{children:"Only stake your xBZZ if you intend to participate as a full node, as withdrawals are not possible."})}),"\n",(0,t.jsx)(n.h3,{id:"requirements",children:"Requirements"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["A ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/node-types",children:"full node"})," - see full node ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/node-types#full-node-specifications",children:"recommend specs"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["A ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/configuration#setting-blockchain-rpc-endpoint",children:"high-performance RPC endpoint"})," connection to Gnosis Chain."]}),"\n",(0,t.jsxs)(n.li,{children:["A minimum of 10 xBZZ to be used as ",(0,t.jsx)(n.em,{children:(0,t.jsx)(n.strong,{children:"non-refundable"})})," stake (the requirement is increased if ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/staking#reserve-doubling",children:"reserve doubling"})," is used)."]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"check-status",children:"Check Status"}),"\n",(0,t.jsxs)(n.p,{children:["Use the ",(0,t.jsx)("a",{href:"/api/#tag/RedistributionState",target:"_blank",rel:"noopener noreferrer",children:(0,t.jsx)(n.code,{children:"/redistributionstate"})})," endpoint of the API to get more information about the redistribution status of the node."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl -X GET http://localhost:1633/redistributionstate | jq\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'{ \n "minimumFunds": "18750000000000000",\n "hasSufficientFunds": true,\n "isFrozen": false,\n "isFullySynced": true,\n "phase": "commit",\n "round": 176319,\n "lastWonRound": 176024,\n "lastPlayedRound": 176182,\n "lastFrozenRound": 0,\n "block": 26800488,\n "reward": "10479124611072000",\n "fees": "30166618102500000"\n}\n'})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'"minimumFunds": '})," - The minimum xDAI needed to play a single round of the redistribution game (the unit is 1e-18 xDAI)."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'"hasSufficientFunds": '})," - Shows whether the node has enough xDAI balance to submit at least five storage incentives redistribution related transactions. If ",(0,t.jsx)(n.code,{children:"false"})," the node will not be permitted to participate in next round."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'"isFrozen": '})," - Shows node frozen status."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'"isFullySynced": '})," - Shows whether node's localstore has completed full historical syncing with all connected peers."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'"phase": '})," - Current phase of ",(0,t.jsx)(n.a,{href:"/docs/concepts/incentives/redistribution-game",children:"redistribution game"})," (",(0,t.jsx)(n.code,{children:"commit"}),", ",(0,t.jsx)(n.code,{children:"reveal"}),", or ",(0,t.jsx)(n.code,{children:"claim"}),")."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'"round": '}),' - Current round of redistribution game. The round number is determined by dividing the current Gnosis Chain block height by the number of blocks in one round. One round takes 152 blocks, so using the "block" output from the example above we can confirm that the round number is 176319 (block 26800488 / 152 blocks = round 176319).']}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'"lastWonRound": '})," - Number of round last won by this node."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'"lastPlayedRound": '})," - Number of the last round where node's neighborhood was selected to participate in redistribution game."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'"lastFrozenRound": '})," The number the round when node was last frozen."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'"block": '})," - Gnosis block of the current redistribution game."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'"reward": '})," - Record of total reward received in ",(0,t.jsx)(n.a,{href:"/docs/references/glossary#plur",children:"PLUR"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'"fees": '})," - Record of total spent in 1E-18 xDAI on all redistribution related transactions."]}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{type:"warning",children:(0,t.jsxs)(n.p,{children:["Do not shut down or update your node during an active redistribution round as it may cause them to lose out on winnings or become frozen. To see if your node is playing the current round, check if ",(0,t.jsx)(n.code,{children:"lastPlayedRound"})," equals ",(0,t.jsx)(n.code,{children:"round"})," in the output from the ",(0,t.jsxs)(n.a,{href:"/api/#tag/RedistributionState/paths/~1redistributionstate/get",children:[(0,t.jsx)(n.code,{children:"/redistributionstate"})," endpoint"]}),"."]})}),"\n",(0,t.jsxs)(n.p,{children:["You should also check the ",(0,t.jsx)(n.a,{href:"/api/#tag/Node-Status/paths/~1status/get",children:(0,t.jsx)(n.code,{children:"/status"})})," endpoint:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl -s http://localhost:1633/status | jq\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'{\n "peer": "da7e5cc3ed9a46b6e7491d3bf738535d98112641380cbed2e9ddfe4cf4fc01c4",\n "proximity": 0,\n "beeMode": "full",\n "reserveSize": 3747532,\n "pullsyncRate": 0,\n "storageRadius": 10,\n "connectedPeers": 183,\n "neighborhoodSize": 12,\n "batchCommitment": 133828050944,\n "isReachable": true\n}\n'})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Expected values for a healthy staking node:"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:'"beeMode": full'})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:'"pullsyncRate": 0'})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:'"isReachable": true'})}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["If your node is not operating properly such as getting frozen or not participating in any rounds, see the ",(0,t.jsx)(n.a,{href:"#troubleshooting",children:"troubleshooting section"}),"."]})}),"\n",(0,t.jsx)(n.h2,{id:"partial-stake-withdrawals",children:"Partial Stake Withdrawals"}),"\n",(0,t.jsx)(n.p,{children:"If the price of xBZZ rises significantly and provides excess collateral, a partial withdrawal will be allowed down to the minimum required stake:"}),"\n",(0,t.jsx)(n.h3,{id:"check-for-withdrawable-stake",children:"Check for withdrawable stake"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl http://localhost:1633/stake/withdrawable | jq\n"})}),"\n",(0,t.jsx)(n.p,{children:"If there is any stake available for withdrawal, the amount will be displayed in PLUR:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'{\n "withdrawableStake": "18411"\n}\n'})}),"\n",(0,t.jsx)(n.h3,{id:"withdraw-available-stake",children:"Withdraw available stake"}),"\n",(0,t.jsxs)(n.p,{children:["If there is any stake available for withdrawal, you can withdraw it using the ",(0,t.jsx)(n.code,{children:"DELETE"})," method on ",(0,t.jsx)(n.code,{children:"/stake/withdrawable"}),":"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl -X DELETE http://localhost:1633/stake/withdrawable\n"})}),"\n",(0,t.jsx)(n.h2,{id:"reserve-doubling",children:"Reserve Doubling"}),"\n",(0,t.jsx)(n.p,{children:'The reserve doubling feature enables nodes to store chunks from a neighboring "sister" area, effectively increasing their reserve capacity twofold. By maintaining chunks from this sister neighborhood, a node becomes eligible to join the redistribution game whenever the sister neighborhood is chosen, effectively doubling its chances of participating.'}),"\n",(0,t.jsx)(n.p,{children:"Although reserve doubling demands twice the disk storage and increases bandwidth usage for chunk syncing (with no additional bandwidth needed for chunk forwarding), its effect on CPU and RAM consumption remains minimal. This feature provides node operators with greater flexibility to optimize their nodes, aiming to achieve a higher reward-to-resource usage ratio."}),"\n",(0,t.jsx)(n.h3,{id:"step-by-step-guide",children:"Step by Step Guide"}),"\n",(0,t.jsxs)(n.p,{children:["In order to double a node's reserve which has previously been operating without doubling, the ",(0,t.jsx)(n.code,{children:"reserve-capacity-doubling"})," option must be updated from the default of ",(0,t.jsx)(n.code,{children:"0"})," to ",(0,t.jsx)(n.code,{children:"1"})," and restarted. There is also an increase in the xBZZ stake requirement from the minimum of 10 xBZZ to 20 xBZZ."]}),"\n",(0,t.jsxs)(n.h4,{id:"step-1-set-reserve-capacity-doubling-to-1",children:[(0,t.jsx)(n.strong,{children:"Step 1"}),": Set ",(0,t.jsx)(n.code,{children:"reserve-capacity-doubling"})," to ",(0,t.jsx)(n.code,{children:"1"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["The reserve doubling feature can be enabled by setting the new ",(0,t.jsx)(n.code,{children:"reserve-capacity-doubling"})," config option to ",(0,t.jsx)(n.code,{children:"1"})," using the ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/configuration#configuration-methods-and-priority",children:"configuration method"})," of your choice."]}),"\n",(0,t.jsxs)(n.h4,{id:"step-2-stake-at-least-20-xbzz",children:[(0,t.jsx)(n.strong,{children:"Step 2"}),": Stake at least 20 xBZZ"]}),"\n",(0,t.jsx)(n.p,{children:"For doubling the reserve of a node which was previously operating which already has 10 xBZZ staked, simply stake an additional 10 xBZZ for a total of 20 xBZZ stake:"}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsx)(n.p,{children:"As always, ensure you properly convert the stake parameter to PLUR, where 1 PLUR equals 1e-16 xBZZ."})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl -X POST localhost:1633/stake/100000000000000000\n"})}),"\n",(0,t.jsx)(n.p,{children:"Or for a new node with zero staked xBZZ, the entire 20 xBZZ can be staked at once:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl -X POST localhost:1633/stake/200000000000000000\n"})}),"\n",(0,t.jsxs)(n.p,{children:["We can use the ",(0,t.jsx)(n.code,{children:"GET /stake"})," endpoint to confirm the total stake for our node:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl -s http://localhost:1633/stake | jq\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'{\n "stakedAmount": "200000000000000000"\n}\n'})}),"\n",(0,t.jsxs)(n.h4,{id:"step-3-restart-node",children:[(0,t.jsx)(n.strong,{children:"Step 3"}),": Restart node"]}),"\n",(0,t.jsxs)(n.p,{children:["After ensuring the node has at least 20 xBZZ staked and the ",(0,t.jsx)(n.code,{children:"reserve-capacity-doubling"})," option has been set to ",(0,t.jsx)(n.code,{children:"1"}),", restart the node."]}),"\n",(0,t.jsx)(n.p,{children:"After restarting your node, it should then begin syncing chunks from its sister neighborhood."}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"/status/neighborhoods"})," endpoint can be used to confirm that the node has doubled its reserve and is now syncing with its sister neighborhood:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'{\n "neighborhoods": [\n {\n "neighborhood": "01111101011",\n "reserveSizeWithinRadius": 1148351,\n "proximity": 10\n },\n {\n "neighborhood": "01111101010",\n "reserveSizeWithinRadius": 1147423,\n "proximity": 11\n }\n ]\n}\n'})}),"\n",(0,t.jsx)(n.p,{children:"The output should list both your original and sister neighborhood."}),"\n",(0,t.jsxs)(n.p,{children:["We can also check the ",(0,t.jsx)(n.code,{children:"/status"})," endpoint to confirm our node is syncing new chunks:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl -s http://localhost:1633/status | jq\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'{\n "overlay": "be177e61b13b1caa20690311a909bd674a3c1ef5f00d60414f261856a8ad5c30",\n "proximity": 256,\n "beeMode": "full",\n "reserveSize": 4192792,\n "reserveSizeWithinRadius": 2295023,\n "pullsyncRate": 1.3033333333333332,\n "storageRadius": 10,\n "connectedPeers": 18,\n "neighborhoodSize": 1,\n "batchCommitment": 388104192,\n "isReachable": true,\n "lastSyncedBlock": 6982430\n}\n'})}),"\n",(0,t.jsxs)(n.p,{children:["We can see that the ",(0,t.jsx)(n.code,{children:"pullsyncRate"})," value is above zero, meaning that our node is currently syncing chunks, as expected."]}),"\n",(0,t.jsx)(n.h2,{id:"maximize-rewards",children:"Maximize rewards"}),"\n",(0,t.jsxs)(n.p,{children:["There are two main factors which determine the chances for a staking node to win a reward \u2014 neighborhood selection and stake density. Both of these should be considered together before starting up a Bee node for the first time. See the ",(0,t.jsx)(n.a,{href:"/docs/concepts/incentives/redistribution-game",children:"incentives page"})," for more context."]}),"\n",(0,t.jsx)(n.h3,{id:"neighborhood-selection",children:"Neighborhood selection"}),"\n",(0,t.jsxs)(n.p,{children:["By default when running a Bee node for the first time the node will use the ",(0,t.jsx)(n.a,{href:"https://api.swarmscan.io/v1/network/neighborhoods/suggestion",children:"neighborhood suggestion tool"})," from Swarmscan to find an optimal ",(0,t.jsx)(n.a,{href:"/docs/concepts/DISC/neighborhoods",children:"neighborhood"}),". While it is possible to manually choose a neighborhood using the ",(0,t.jsx)(n.code,{children:"target-neighborhood"})," config option, we recommend not to do so as the suggestion tool will pick neighborhoods in order to maximize node earnings and network health. ",(0,t.jsx)(n.a,{href:"/docs/bee/installation/set-target-neighborhood",children:"Learn more"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"stake-density",children:"Stake density"}),"\n",(0,t.jsx)(n.p,{children:"Stake density is defined as:"}),"\n",(0,t.jsx)(n.span,{className:"katex-display",children:(0,t.jsxs)(n.span,{className:"katex",children:[(0,t.jsx)(n.span,{className:"katex-mathml",children:(0,t.jsx)(n.math,{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block",children:(0,t.jsxs)(n.semantics,{children:[(0,t.jsxs)(n.mrow,{children:[(0,t.jsx)(n.mtext,{children:"stake\xa0density"}),(0,t.jsx)(n.mo,{children:"="}),(0,t.jsx)(n.mtext,{children:"staked\xa0xBZZ"}),(0,t.jsx)(n.mo,{children:"\xd7"}),(0,t.jsxs)(n.msup,{children:[(0,t.jsx)(n.mn,{children:"2"}),(0,t.jsx)(n.mtext,{children:"storageDepth"})]})]}),(0,t.jsx)(n.annotation,{encoding:"application/x-tex",children:"\\text{stake density} = \\text{staked xBZZ} \\times {2}^\\text{storageDepth}"})]})})}),(0,t.jsxs)(n.span,{className:"katex-html","aria-hidden":"true",children:[(0,t.jsxs)(n.span,{className:"base",children:[(0,t.jsx)(n.span,{className:"strut",style:{height:"0.8889em",verticalAlign:"-0.1944em"}}),(0,t.jsx)(n.span,{className:"mord text",children:(0,t.jsx)(n.span,{className:"mord",children:"stake\xa0density"})}),(0,t.jsx)(n.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,t.jsx)(n.span,{className:"mrel",children:"="}),(0,t.jsx)(n.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,t.jsxs)(n.span,{className:"base",children:[(0,t.jsx)(n.span,{className:"strut",style:{height:"0.7778em",verticalAlign:"-0.0833em"}}),(0,t.jsx)(n.span,{className:"mord text",children:(0,t.jsx)(n.span,{className:"mord",children:"staked\xa0xBZZ"})}),(0,t.jsx)(n.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,t.jsx)(n.span,{className:"mbin",children:"\xd7"}),(0,t.jsx)(n.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,t.jsxs)(n.span,{className:"base",children:[(0,t.jsx)(n.span,{className:"strut",style:{height:"0.8991em"}}),(0,t.jsxs)(n.span,{className:"mord",children:[(0,t.jsx)(n.span,{className:"mord",children:(0,t.jsx)(n.span,{className:"mord",children:"2"})}),(0,t.jsx)(n.span,{className:"msupsub",children:(0,t.jsx)(n.span,{className:"vlist-t",children:(0,t.jsx)(n.span,{className:"vlist-r",children:(0,t.jsx)(n.span,{className:"vlist",style:{height:"0.8991em"},children:(0,t.jsxs)(n.span,{style:{top:"-3.113em",marginRight:"0.05em"},children:[(0,t.jsx)(n.span,{className:"pstrut",style:{height:"2.7em"}}),(0,t.jsx)(n.span,{className:"sizing reset-size6 size3 mtight",children:(0,t.jsx)(n.span,{className:"mord text mtight",children:(0,t.jsx)(n.span,{className:"mord mtight",children:"storageDepth"})})})]})})})})})]})]})]})]})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsxs)(n.em,{children:["To learn more about stake density and the mechanics of the incentives system, see the ",(0,t.jsx)(n.a,{href:"/docs/concepts/incentives/redistribution-game",children:"incentives page"}),"."]})}),"\n",(0,t.jsx)(n.p,{children:"Stake density determines the weighted chances of nodes within a neighborhood of winning rewards. The chance of winning within a neighborhood corresponds to stake density. Stake density can be increased by depositing more xBZZ as stake (note that stake withdrawals are not currently possible, so any staked xBZZ is not currently recoverable)."}),"\n",(0,t.jsxs)(n.p,{children:["Generally speaking, the minimum required stake of 10 xBZZ is sufficient, and rewards can be better maximized by operating more nodes over a greater range of neighborhoods rather than increasing stake. However this may not be true for all node operators depending on how many different neighborhoods they operate nodes in, and it also may change as network dynamics continue to evolve (join the ",(0,t.jsx)(n.code,{children:"#node-operators"})," ",(0,t.jsx)(n.a,{href:"https://discord.com/channels/799027393297514537/811553590170353685",children:"Discord channel"})," to stay up to date with the latest discussions about staking and network dynamics)."]}),"\n",(0,t.jsx)(n.h3,{id:"chequebook-verification",children:"Chequebook verification"}),"\n",(0,t.jsx)(n.p,{children:"Full node operators can optionally enable chequebook verification to reject incoming peers whose chequebook balance falls below a configurable threshold. This can help filter out poorly funded peers from your node's connections."}),"\n",(0,t.jsxs)(n.p,{children:["Chequebook verification is disabled by default and can be enabled with the ",(0,t.jsx)(n.code,{children:"--chequebook-verification"})," flag. The default minimum balance threshold is 11 BZZ and can be adjusted with ",(0,t.jsx)(n.code,{children:"--chequebook-min-balance"}),". See the ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/configuration#chequebook-verification-optional",children:"configuration page"})," for details."]}),"\n",(0,t.jsx)(n.h2,{id:"neighborhood-hopping",children:"Neighborhood Hopping"}),"\n",(0,t.jsxs)(n.admonition,{type:"warning",children:[(0,t.jsx)(n.mdxAdmonitionTitle,{}),(0,t.jsx)(n.p,{children:"There is a 2 round delay (with 152 Gnosis Chain blocks per redistribution game round) every time a node's neighborhood or stake is changed before it can participate in the redistribution game, moreover a node must fully sync the chunks from its new neighborhood before it can participate in the redistribution game, so hopping too frequently is not advised."})]}),"\n",(0,t.jsxs)(n.p,{children:["You can use the config option ",(0,t.jsx)(n.code,{children:"target-neighborhood"})," to switch your node over to a new neighborhood. You may wish to use this option if your node's neighborhood becomes overpopulated."]}),"\n",(0,t.jsx)(n.h3,{id:"checking-neighborhood-population",children:"Checking neighborhood population"}),"\n",(0,t.jsxs)(n.p,{children:["For a quick check of your node's neighborhood population, we can use the ",(0,t.jsx)(n.code,{children:"/status"})," endpoint:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'curl -s http://localhost:1633/status | jq\n{\n "peer": "e7b5c1aac67693268fdec98d097a8ccee1aabcf58e26c4512ea888256d0e6dff",\n "proximity": 0,\n "beeMode": "full",\n "reserveSize": 1055543,\n "reserveSizeWithinRadius": 1039749,\n "pullsyncRate": 42.67013868148148,\n "storageRadius": 11,\n "connectedPeers": 140,\n "neighborhoodSize": 6,\n "batchCommitment": 74463051776,\n "isReachable": false\n}\n'})}),"\n",(0,t.jsxs)(n.p,{children:["Here we can see that at the current ",(0,t.jsx)(n.code,{children:"storageRadius"})," of 11, our node is in a neighborhood with size 6 from the ",(0,t.jsx)(n.code,{children:"neighborhoodSize"})," value."]}),"\n",(0,t.jsxs)(n.p,{children:["Using the ",(0,t.jsx)(n.a,{href:"https://swarmscan.io/neighborhoods",children:"Swarmscan neighborhoods tool"})," we can see there are many neighborhoods with fewer nodes, so it would benefit us to move to less populated neighborhood:"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:s(81920).A+"",width:"2102",height:"1224"})}),"\n",(0,t.jsx)(n.p,{children:"While you might be tempted to simply pick one of these less populated neighborhoods, it is best practice to use the neighborhood suggester API instead, since it will help to prevent too many node operators rapidly moving to the same underpopulated neighborhoods, and also since the suggester takes a look at the next depth down to make sure that even in case of a neighborhood split, your node will end up in the smaller neighborhood."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl -s https://api.swarmscan.io/v1/network/neighborhoods/suggestion\n"})}),"\n",(0,t.jsx)(n.p,{children:"Copy the binary number returned from the API:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'{"neighborhood":"01100011110"}\n'})}),"\n",(0,t.jsxs)(n.p,{children:["Use the binary number you just copied and set it as a string value for the ",(0,t.jsx)(n.code,{children:"target-neighborhood"})," option in your config."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'# bee.yaml\ntarget-neighborhood: "01100011110"\n'})}),"\n",(0,t.jsx)(n.h2,{id:"stake-migration",children:"Stake Migration"}),"\n",(0,t.jsx)(n.p,{children:"If a new Bee release includes an updated staking contract, then you will be required to migrate your node's stake in order to continue normal operation. The stake migration process consists of the following steps:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:"Withdraw xBZZ"}),"\n",(0,t.jsx)(n.li,{children:"Stop node"}),"\n",(0,t.jsx)(n.li,{children:"Update and restart"}),"\n",(0,t.jsx)(n.li,{children:"Re-stake to the new contract"}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"step-1-withdraw-xbzz",children:"Step 1: Withdraw xBZZ"}),"\n",(0,t.jsx)(n.p,{children:"When a new version of Bee is released with an updated staking contract, the previous staking contract will be disabled, and stake withdrawals will be enabled."}),"\n",(0,t.jsxs)(n.p,{children:["Once the contract is disabled, stake can be withdrawn by calling the ",(0,t.jsx)(n.code,{children:"/stake"})," endpoint with the ",(0,t.jsx)(n.code,{children:"DELETE"})," method:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl -X DELETE http://localhost:1633/stake\n"})}),"\n",(0,t.jsx)(n.p,{children:"This command will withdraw all stake from the node to the node\u2019s Gnosis Chain address."}),"\n",(0,t.jsx)(n.p,{children:"Confirm that the stake was withdrawn:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:" curl -s http://localhost:1633/stake | jq\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The value for ",(0,t.jsx)(n.code,{children:"stakedAmount"})," should now be zero:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:'{\n "stakedAmount": "0"\n}\n'})}),"\n",(0,t.jsx)(n.h3,{id:"step-2-stop-node",children:"Step 2: Stop node"}),"\n",(0,t.jsx)(n.p,{children:"This step will vary depending on how the node was set up:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo systemctl stop bee\n"})}),"\n",(0,t.jsx)(n.p,{children:"or"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"docker compose down\n"})}),"\n",(0,t.jsx)(n.p,{children:"or"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"docker stop \n"})}),"\n",(0,t.jsx)(n.p,{children:"etc."}),"\n",(0,t.jsx)(n.h3,{id:"step-3-update-and-restart",children:"Step 3: Update and restart"}),"\n",(0,t.jsx)(n.admonition,{type:"danger",children:(0,t.jsxs)(n.p,{children:["Before every Bee client upgrade, it is best practice to ALWAYS take a full ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/backups",children:"backup"})," of your node."]})}),"\n",(0,t.jsx)(n.p,{children:"After withdrawing stake and stopping the node, update to the newest version of Bee. After updating, restart the node."}),"\n",(0,t.jsxs)(n.p,{children:["You can use the ",(0,t.jsx)(n.code,{children:"/health"})," endpoint to confirm your current Bee version:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl -s http://localhost:1633/health | jq\n"})}),"\n",(0,t.jsxs)(n.p,{children:["To confirm a successful update, check that the value for the ",(0,t.jsx)(n.code,{children:'"version"'})," field in the results corresponds to the version number of the ",(0,t.jsx)(n.a,{href:"https://github.com/ethersphere/bee/releases/latest",children:"latest"})," Bee release."]}),"\n",(0,t.jsx)(n.p,{children:"For example, if the latest version was 2.8.1, it would look like this:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "status": "ok",\n "version": "2.8.1-7cf53193",\n "apiVersion": "8.1.0"\n}\n'})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsxs)(n.em,{children:["Make sure to check the ",(0,t.jsx)(n.a,{href:"https://github.com/ethersphere/bee/releases/latest",children:"latest"})," version number yourself, as the versions shown in examples in this guide may not always be up to date with the latest."]})}),"\n",(0,t.jsx)(n.h3,{id:"step-4-re-stake-xbzz",children:"Step 4: Re-stake xBZZ"}),"\n",(0,t.jsx)(n.p,{children:"After upgrading to the latest version and restarting, xBZZ should be re-staked into the new staking contract so that the node can continue to participate in the redistribution game."}),"\n",(0,t.jsx)(n.p,{children:"To stake the minimum required 10 xBZZ:"}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.p,{children:["Make sure to modify to the correct staking amount in case your node is using ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/staking#reserve-doubling",children:"reserve doubling"}),"."]})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl -X POST localhost:1633/stake/100000000000000000\n"})}),"\n",(0,t.jsx)(n.p,{children:"Confirm that the staking transaction was successful:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl -s http://localhost:1633/stake | jq\n"})}),"\n",(0,t.jsx)(n.p,{children:"The expected output after staking the minimum of 10 xBZZ:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'{\n "stakedAmount": "100000000000000000"\n}\n'})}),"\n",(0,t.jsx)(n.p,{children:"Congratulations! You have performed a successful stake migration and your node will now continue to operate as normal."}),"\n",(0,t.jsx)(n.h2,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,t.jsxs)(n.p,{children:["In this section we cover several commonly seen issues encountered for staking nodes participating in the redistribution game. If you don't see your issue covered here or require additional guidance, check out the ",(0,t.jsx)(n.code,{children:"#node-operators"})," ",(0,t.jsx)(n.a,{href:"https://discord.com/channels/799027393297514537/811553590170353685",children:"Discord channel"})," where you will find support from other node operators and community members."]}),"\n",(0,t.jsx)(n.h3,{id:"frozen-node",children:"Frozen node"}),"\n",(0,t.jsxs)(n.p,{children:["A node will be frozen when the reserve commitment hash it submits in its ",(0,t.jsxs)(n.a,{href:"/docs/concepts/incentives/redistribution-game",children:[(0,t.jsx)(n.code,{children:"commit"})," transaction"]})," does not match the correct hash. The reserve commitment hash is used as proof that a node is storing the chunks it is responsible for. It will not be able to play in the redistribution game during the freezing period. See the ",(0,t.jsx)(n.a,{href:"/docs/concepts/incentives/redistribution-game",children:"penalties"})," section for more information."]}),"\n",(0,t.jsx)(n.h4,{id:"check-frozen-status",children:"Check frozen status"}),"\n",(0,t.jsxs)(n.p,{children:["You can check your node's frozen status using the ",(0,t.jsx)(n.code,{children:"/redistributionstate"})," endpoint:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl -X GET http://localhost:1633/redistributionstate | jq\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'{ \n "minimumFunds": "18750000000000000",\n "hasSufficientFunds": true,\n "isFrozen": false,\n "isFullySynced": true,\n "phase": "commit",\n "round": 176319,\n "lastWonRound": 176024,\n "lastPlayedRound": 176182,\n "lastFrozenRound": 0,\n "block": 26800488,\n "reward": "10479124611072000",\n "fees": "30166618102500000"\n}\n'})}),"\n",(0,t.jsxs)(n.p,{children:["The relevant fields here are ",(0,t.jsx)(n.code,{children:"isFrozen"})," and ",(0,t.jsx)(n.code,{children:"lastFrozenRound"}),", which respectively indicate whether the node is currently frozen and the last round in which the node was frozen."]}),"\n",(0,t.jsx)(n.h4,{id:"diagnosing-freezing-issues",children:"Diagnosing freezing issues"}),"\n",(0,t.jsxs)(n.p,{children:["In order to diagnose the cause of freezing issues we must compare our own node's status to that of other nodes within the same neighborhood by comparing the results from our own node returned from the ",(0,t.jsx)(n.code,{children:"/status"})," endpoint to the other nodes in the same neighborhood which can be found from the ",(0,t.jsx)(n.code,{children:"/status/peers"})," endpoint."]}),"\n",(0,t.jsx)(n.p,{children:"First we check our own node's status:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:" curl -s localhost:1633/status | jq\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:' {\n "peer": "da7e5cc3ed9a46b6e7491d3bf738535d98112641380cbed2e9ddfe4cf4fc01c4",\n "proximity": 0,\n "beeMode": "full",\n "reserveSize": 3747532,\n "pullsyncRate": 0,\n "storageRadius": 10,\n "connectedPeers": 183,\n "neighborhoodSize": 12,\n "batchCommitment": 133828050944,\n "isReachable": true \n }\n'})}),"\n",(0,t.jsx)(n.p,{children:"And next we will find the status for all the other nodes in the same neighborhood as our own."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:" curl -s localhost:1633/status/peers | jq\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"/status/peers"})," endpoint returns all the peers of our node, but we are only concerned with peers in the same neighborhood as our own node. Nodes whose ",(0,t.jsx)(n.code,{children:"proximity"})," value is equal to or greater than our own node's ",(0,t.jsx)(n.code,{children:"storageRadius"})," value all fall into the same neighborhood as our node, so the rest have been omitted in the example output below:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'{ \n ...\n {\n "peer": "da33f7a504a74094242d3e542475b49847d1d0f375e0c86bac1c9d7f0937acc0",\n "proximity": 9,\n "beeMode": "full",\n "reserveSize": 3782924,\n "pullsyncRate": 0,\n "storageRadius": 10,\n "connectedPeers": 188,\n "neighborhoodSize": 11,\n "batchCommitment": 133828050944,\n "isReachable": true\n },\n {\n "peer": "da4b529cc1aedc62e31849cf7f8ab8c1866d9d86038b857d6cf2f590604387fe",\n "proximity": 10,\n "beeMode": "full",\n "reserveSize": 3719593,\n "pullsyncRate": 0,\n "storageRadius": 10,\n "connectedPeers": 176,\n "neighborhoodSize": 11,\n "batchCommitment": 133828050944,\n "isReachable": true\n },\n {\n "peer": "da5d39a5508fadf66c8665d5e51617f0e9e5fd501e429c38471b861f104c1504",\n "proximity": 10,\n "beeMode": "full",\n "reserveSize": 3777241,\n "pullsyncRate": 0,\n "storageRadius": 10,\n "connectedPeers": 198,\n "neighborhoodSize": 12,\n "batchCommitment": 133828050944,\n "isReachable": true\n },\n {\n "peer": "da4cb0d125bba638def55c0061b00d7c01ed4033fa193d6e53a67183c5488d73",\n "proximity": 10,\n "beeMode": "full",\n "reserveSize": 3849125,\n "pullsyncRate": 0,\n "storageRadius": 10,\n "connectedPeers": 181,\n "neighborhoodSize": 13,\n "batchCommitment": 133828050944,\n "isReachable": true\n },\n {\n "peer": "da4b1cd5d15e061fdd474003b5602ab1cff939b4b9e30d60f8ff693141ede810",\n "proximity": 10,\n "beeMode": "full",\n "reserveSize": 3778452,\n "pullsyncRate": 0,\n "storageRadius": 10,\n "connectedPeers": 183,\n "neighborhoodSize": 12,\n "batchCommitment": 133827002368,\n "isReachable": true\n },\n {\n "peer": "da49e6c6174e3410edad2e0f05d704bbc33e9996bc0ead310d55372677316593",\n "proximity": 10,\n "beeMode": "full",\n "reserveSize": 3779560,\n "pullsyncRate": 0,\n "storageRadius": 10,\n "connectedPeers": 185,\n "neighborhoodSize": 12,\n "batchCommitment": 133828050944,\n "isReachable": true\n },\n {\n "peer": "da4cdab480f323d5791d3ab8d22d99147f110841e44a8991a169f0ab1f47d8e5",\n "proximity": 10,\n "beeMode": "full",\n "reserveSize": 3778518,\n "pullsyncRate": 0,\n "storageRadius": 10,\n "connectedPeers": 189,\n "neighborhoodSize": 11,\n "batchCommitment": 133828050944,\n "isReachable": true\n },\n {\n "peer": "da4ccec79bc34b502c802415b0008c4cee161faf3cee0f572bb019b117c89b2f",\n "proximity": 10,\n "beeMode": "full",\n "reserveSize": 3779003,\n "pullsyncRate": 0,\n "storageRadius": 10,\n "connectedPeers": 179,\n "neighborhoodSize": 10,\n "batchCommitment": 133828050944,\n "isReachable": true\n },\n {\n "peer": "da69d412b79358f84b7928d2f6b7ccdaf165a21313608e16edd317a5355ba250",\n "proximity": 11,\n "beeMode": "full",\n "reserveSize": 3712586,\n "pullsyncRate": 0,\n "storageRadius": 10,\n "connectedPeers": 189,\n "neighborhoodSize": 12,\n "batchCommitment": 133827002368,\n "isReachable": true\n },\n {\n "peer": "da61967b1bd614a69e5e83f73cc98a63a70ebe20454ca9aafea6b57493e00a34",\n "proximity": 11,\n "beeMode": "full",\n "reserveSize": 3780190,\n "pullsyncRate": 0,\n "storageRadius": 10,\n "connectedPeers": 182,\n "neighborhoodSize": 13,\n "batchCommitment": 133828050944,\n "isReachable": true\n },\n {\n "peer": "da7b6a268637cfd6799a9923129347fc3d564496ea79aea119e89c09c5d9efed",\n "proximity": 13,\n "beeMode": "full",\n "reserveSize": 3721494,\n "pullsyncRate": 0,\n "storageRadius": 10,\n "connectedPeers": 188,\n "neighborhoodSize": 14,\n "batchCommitment": 133828050944,\n "isReachable": true\n },\n {\n "peer": "da7a974149543df1b459831286b42b302f22393a20e9b3dd9a7bb5a7aa5af263",\n "proximity": 13,\n "beeMode": "full",\n "reserveSize": 3852986,\n "pullsyncRate": 0,\n "storageRadius": 10,\n "connectedPeers": 186,\n "neighborhoodSize": 12,\n "batchCommitment": 133828050944,\n "isReachable": true\n }\n]\n}\n'})}),"\n",(0,t.jsx)(n.p,{children:"Now that we have the status for our own node and all its neighborhood peers we can begin to diagnose the issue through a series of checks outlined below:"}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsx)(n.p,{children:"If you are able to identify and fix a problem with your node from the checklist below, it's possible that your node's reserve has become corrupted. Therefore, after fixing the problem, stop your node, and repair your node according to the instructions in the section following the checklist."})}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Compare ",(0,t.jsx)(n.code,{children:"reserveSize"})," with peers"]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"reserveSize"})," value is the number of chunks stored by a node in its reserve. The value for ",(0,t.jsx)(n.code,{children:"reserveSize"})," for a healthy node should be around +/- 1% the size of most other nodes in the neighborhood. In our example, for our node's ",(0,t.jsx)(n.code,{children:"reserveSize"})," of 3747532, it falls within that normal range. This does not guarantee our node has no missing or corrupted chunks, but it does indicate that it is generally storing the same chunks as its neighbors. If it falls outside this range, see the next section for instructions on repairing reserves."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Compare ",(0,t.jsx)(n.code,{children:"batchCommitment"})," with peers"]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"batchCommitment"})," value shows how many chunks would be stored if all postage batches were fully utilised. It also represents whether the node has fully synced postage batch data from on-chain. If your node's ",(0,t.jsx)(n.code,{children:"batchCommitment"})," value falls below that of its peers in the same neighborhood, it could indicate an issue with your blockchain RPC endpoint that is preventing it from properly syncing on-chain data. If you are running your own node, check your setup to make sure it is functioning properly, or check with your provider if you are using a 3rd party service for your RPC endpoint."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Check ",(0,t.jsx)(n.code,{children:"pullsyncRate"})]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"pullsyncRate"})," value measures the speed at which a node is syncing chunks from its peers. Once a node is fully synced, ",(0,t.jsx)(n.code,{children:"pullsyncRate"})," should go to zero. If ",(0,t.jsx)(n.code,{children:"pullsyncRate"})," is above zero it indicates that your node is still syncing chunks, so you should wait until it goes to zero before doing any other checks. If ",(0,t.jsx)(n.code,{children:"pullsyncRate"})," is at zero but your node's ",(0,t.jsx)(n.code,{children:"reserveSize"})," does not match its peers, you should check whether your network connection and RPC endpoint are stable and functioning properly. A node should be fully synced after several hours at most."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Check most recent ",(0,t.jsx)(n.code,{children:"block"})," number"]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"block"})," value returned from the ",(0,t.jsx)(n.code,{children:"/redistributionstate"})," endpoint shows the most recent block a node has synced. If this number is far behind the actual more recent block then it indicates an issue with your RPC endpoint or network. If you are running your own node, check your setup to make sure it is functioning properly, or check with your provider if you are using a 3rd party service for your RPC endpoint."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl -X GET http://localhost:1633/redistributionstate | jq\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'{ \n "minimumFunds": "18750000000000000",\n "hasSufficientFunds": true,\n "isFrozen": false,\n "isFullySynced": true,\n "phase": "commit",\n "round": 176319,\n "lastWonRound": 176024,\n "lastPlayedRound": 176182,\n "lastFrozenRound": 0,\n "block": 26800488,\n "reward": "10479124611072000",\n "fees": "30166618102500000"\n}\n'})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Check peer connectivity"}),"\n",(0,t.jsxs)(n.p,{children:["Compare the value of your node's ",(0,t.jsx)(n.code,{children:"neighborhoodSize"})," from the ",(0,t.jsx)(n.code,{children:"/status"})," endpoint and the ",(0,t.jsx)(n.code,{children:"neighborhoodSize"})," of its peers in the same neighborhood from the ",(0,t.jsx)(n.code,{children:"/status/peers"})," endpoint. The figure should be generally the same (although it may fluctuate slightly up or down at any one point in time). If your node's ",(0,t.jsx)(n.code,{children:"neighborhoodSize"})," value is significantly different and remains so over time then your node likely has a connectivity problem. Make sure to ",(0,t.jsx)(n.a,{href:"/docs/bee/installation/connectivity",children:"check your network environment"})," to ensure your node is able to communicate with the network."]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"If no problems are identified during these checks it likely indicates that your node was frozen in error and there are no additional steps you need to take."}),"\n",(0,t.jsx)(n.h3,{id:"repairing-corrupt-reserve",children:"Repairing corrupt reserve"}),"\n",(0,t.jsxs)(n.p,{children:["If you have identified and fixed a problem causing your node to become frozen or have other reason to believe that your node's reserves are corrupted then you should repair your node's reserve using the ",(0,t.jsx)(n.code,{children:"db repair-reserve"})," command."]}),"\n",(0,t.jsx)(n.p,{children:"First stop your node, and then run the following command:"}),"\n",(0,t.jsx)(n.admonition,{type:"caution",children:(0,t.jsxs)(n.p,{children:["Make sure to replace ",(0,t.jsx)(n.code,{children:"/home/bee/.bee"})," with your node\u2019s data directory if it differs from the one shown in the example. Make sure that the directory you specify is the root directory for your node\u2019s data files, not the localstore directory itself. This is the same directory specified using the ",(0,t.jsx)(n.code,{children:"data-dir"})," option in your node\u2019s ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/configuration",children:"configuration"}),"."]})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"bee db repair-reserve --data-dir=/home/bee/.bee\n"})}),"\n",(0,t.jsx)(n.p,{children:"After the command has finished running, you may restart your node."}),"\n",(0,t.jsx)(n.h3,{id:"node-occupies-unusually-large-space-on-disk",children:"Node occupies unusually large space on disk"}),"\n",(0,t.jsxs)(n.p,{children:["During normal operation of a Bee node, it should not take up more than ~30 GB of disk space. In the rare cases when the node's occupied disk space grows larger, you may need to use the compaction ",(0,t.jsx)(n.code,{children:"db compact"})," command."]}),"\n",(0,t.jsx)(n.admonition,{type:"danger",children:(0,t.jsx)(n.p,{children:"To prevent any data loss, operators should run the compaction on a copy of the localstore directory and, if successful, replace the original localstore with the compacted copy."})}),"\n",(0,t.jsxs)(n.p,{children:["The command is available as a sub-command under db as such (make sure to replace the value for ",(0,t.jsx)(n.code,{children:"--data-dir"})," with the correct path to your bee node's data folder if it differs from the path shown in the example):"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"bee db compact --data-dir=/home/bee/.bee\n"})}),"\n",(0,t.jsx)(n.h3,{id:"node-not-participating-in-redistribution",children:"Node not participating in redistribution"}),"\n",(0,t.jsxs)(n.p,{children:["First check that the node is fully synced, is not frozen, and has sufficient funds to participate in staking. To check node sync status, call the ",(0,t.jsx)(n.code,{children:"redistributionstate"})," endpoint:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"curl -X GET http://localhost:1633/redistributionstate | jq\n"})}),"\n",(0,t.jsx)(n.p,{children:"Response:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'{ \n "minimumFunds": "18750000000000000",\n "hasSufficientFunds": true,\n "isFrozen": false,\n "isFullySynced": true,\n "phase": "commit",\n "round": 176319,\n "lastWonRound": 176024,\n "lastPlayedRound": 176182,\n "lastFrozenRound": 0,\n "block": 26800488,\n "reward": "10479124611072000",\n "fees": "30166618102500000"\n}\n'})}),"\n",(0,t.jsxs)(n.p,{children:["Confirm that ",(0,t.jsx)(n.code,{children:"hasSufficientFunds"})," is ",(0,t.jsx)(n.code,{children:"true"}),", and ",(0,t.jsx)(n.code,{children:"isFullySynced"})," is ",(0,t.jsx)(n.code,{children:"true"})," before moving to the next step. If ",(0,t.jsx)(n.code,{children:"hasSufficientFunds"})," is ",(0,t.jsx)(n.code,{children:"false"}),", make sure to add at least the amount of xDAI shown in ",(0,t.jsx)(n.code,{children:"minimumFunds"})," (unit of 1e-18 xDAI). If the node was recently installed and ",(0,t.jsx)(n.code,{children:"isFullySynced"})," is ",(0,t.jsx)(n.code,{children:"false"}),", wait for the node to fully sync before continuing. After confirming the node's status, continue to the next step."]}),"\n",(0,t.jsx)(n.h4,{id:"run-sampler-process-to-benchmark-performance",children:"Run sampler process to benchmark performance"}),"\n",(0,t.jsxs)(n.p,{children:["One of the most common issues affecting staking is the ",(0,t.jsx)(n.code,{children:"sampler"})," process failing.\nThe sampler is a CPU-intensive process which is run by nodes which are selected to take part in redistribution.\nIt does not need much memory, but on a slow processor or a slow disk it may fail or time out; 4 cores are sufficient.\nTo check a node's performance, run ",(0,t.jsx)(n.code,{children:"swarm-cli utility rchash"}),", or call the ",(0,t.jsx)(n.code,{children:"/rchash"})," endpoint of the API directly.\nSee the ",(0,t.jsx)(n.code,{children:"/rchash"})," section of the ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/bee-api#rchash",children:"Bee API page for usage details"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["If you are still experiencing problems, you can find more help in the ",(0,t.jsx)(n.a,{href:"https://discord.gg/kHRyMNpw7t",children:"node-operators"})," Discord channel (for your safety, do not accept advice from anyone sending a private message on Discord)."]})]})}function l(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},81920(e,n,s){s.d(n,{A:()=>i});const i=s.p+"assets/images/staking-swarmscan-7a08f2c5be1d57dbe9c9b64f8fb3c608.png"},28453(e,n,s){s.d(n,{R:()=>r,x:()=>a});var i=s(96540);const t={},o=i.createContext(t);function r(e){const n=i.useContext(o);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5f58f78d.0cdbf84c.js b/assets/js/5f58f78d.0cdbf84c.js new file mode 100644 index 000000000..0d94d95ec --- /dev/null +++ b/assets/js/5f58f78d.0cdbf84c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[4536],{4688(e,n,s){s.r(n),s.d(n,{assets:()=>h,contentTitle:()=>t,default:()=>c,frontMatter:()=>r,metadata:()=>o,toc:()=>a});const o=JSON.parse('{"id":"concepts/DISC/neighborhoods","title":"Neighborhoods","description":"Describes proximity-based node groupings that share storage responsibilities using proximity order to determine neighborhoods.","source":"@site/docs/concepts/DISC/neighborhoods.md","sourceDirName":"concepts/DISC","slug":"/concepts/DISC/neighborhoods","permalink":"/docs/concepts/DISC/neighborhoods","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/concepts/DISC/neighborhoods.md","tags":[],"version":"current","frontMatter":{"title":"Neighborhoods","id":"neighborhoods","description":"Describes proximity-based node groupings that share storage responsibilities using proximity order to determine neighborhoods."},"sidebar":"concepts","previous":{"title":"Kademlia","permalink":"/docs/concepts/DISC/kademlia"},"next":{"title":"Erasure Coding","permalink":"/docs/concepts/DISC/erasure-coding"}}');var i=s(74848),d=s(28453);const r={title:"Neighborhoods",id:"neighborhoods",description:"Describes proximity-based node groupings that share storage responsibilities using proximity order to determine neighborhoods."},t=void 0,h={},a=[{value:"Key Concepts",id:"key-concepts",level:2},{value:"Proximity Order (PO)",id:"proximity-order-po",level:3},{value:"Reserve Depth",id:"reserve-depth",level:3},{value:"Storage Depth",id:"storage-depth",level:3},{value:"Neighborhood Depth",id:"neighborhood-depth",level:3},{value:"Neighborhood",id:"neighborhood",level:3},{value:"Example neighborhood",id:"example-neighborhood",level:2},{value:"Area of Responsibility",id:"area-of-responsibility",level:3},{value:"Neighborhood Doubling",id:"neighborhood-doubling",level:3},{value:"Doubling Implications for Node Operators",id:"doubling-implications-for-node-operators",level:4}];function l(e){const n={a:"a",admonition:"admonition",blockquote:"blockquote",br:"br",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,d.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"In Swarm, a neighborhood refers to an area of responsibility within the network, where nodes in proximity to one another share the task of storing and maintaining data chunks. Nodes within a neighborhood replicate chunks to ensure that if one node goes offline, other nodes in the neighborhood can still retrieve and serve the content."}),"\n",(0,i.jsxs)(n.admonition,{type:"info",children:[(0,i.jsxs)(n.p,{children:["To see current neighborhood populations and the current storage depth / storage radius navigate to the ",(0,i.jsx)(n.a,{href:"https://swarmscan.io/neighborhoods",children:'"Neighborhoods" page of Swarmscan.io'}),"."]}),(0,i.jsx)(n.p,{children:'The terms "depth" and "radius" are often used interchangeably when discussing neighborhoods. Both refer to number of shared leading bits of node and chunk addresses used to determine the nodes and chunks which fall into which neighborhoods.'})]}),"\n",(0,i.jsx)(n.h2,{id:"key-concepts",children:"Key Concepts"}),"\n",(0,i.jsx)(n.h3,{id:"proximity-order-po",children:"Proximity Order (PO)"}),"\n",(0,i.jsx)(n.p,{children:"The PO measures how close a node is to a particular chunk of data or another node. It is defined as the number of shared leading bits between two addresses. Proximity order plays a role in how neighborhoods are defined, as a node\u2019s neighborhood extends up to its storage depth, covering all nodes within that proximity\u200b."}),"\n",(0,i.jsx)(n.h3,{id:"reserve-depth",children:"Reserve Depth"}),"\n",(0,i.jsxs)(n.p,{children:["The reserve depth is the shallowest PO at which neighborhoods are able to store all of the chunks which have been paid for through ",(0,i.jsx)(n.a,{href:"/docs/concepts/incentives/overview#postage-stamps",children:"postage stamp batch"})," purchases."]}),"\n",(0,i.jsx)(n.h3,{id:"storage-depth",children:"Storage Depth"}),"\n",(0,i.jsxs)(n.p,{children:["Storage depth is the shallowest PO at which neighborhoods are able to store all the chunks which have been ",(0,i.jsx)(n.em,{children:"uploaded"}),". If 100% of all all chunks which have been paid for have been stamped and uploaded to the network, then storage depth will equal reserve depth. However, it is common that stamp batches are not always fully utilized, meaning that it is possible for the storage depth to be shallower than the reserve depth."]}),"\n",(0,i.jsx)(n.p,{children:"Storage depth is the proximity order of chunks for which a node must synchronize and store chunks, and it is determined by nodes' reserve sizes in combination with the amount of chunks actually uploaded."}),"\n",(0,i.jsx)(n.h3,{id:"neighborhood-depth",children:"Neighborhood Depth"}),"\n",(0,i.jsxs)(n.p,{children:["Neighborhood depth for a node is the highest (deepest) PO ",(0,i.jsx)(n.em,{children:(0,i.jsx)(n.code,{children:"d"})})," where the node has at least 3 peers which share the same ",(0,i.jsx)(n.em,{children:(0,i.jsx)(n.code,{children:"d"})})," number of leading binary prefix bits in their addresses."]}),"\n",(0,i.jsx)(n.h3,{id:"neighborhood",children:"Neighborhood"}),"\n",(0,i.jsx)(n.p,{children:"A neighborhood is a set of nodes in close proximity to each other based on their proximity order (PO). Each node within a storage-depth-defined neighborhood interacts with other nodes to store and replicate data chunks, ensuring availability and redundancy."}),"\n",(0,i.jsx)(n.h2,{id:"example-neighborhood",children:"Example neighborhood"}),"\n",(0,i.jsx)(n.p,{children:"Let's take a closer look at an example. Below is a neighborhood of six nodes at depth 10. Each node is identified by its Swarm address, which is a 256 bit hexadecimal number derived from the node's Gnosis Chain address, the Swarm network id, and a random nonce."}),"\n",(0,i.jsxs)(n.blockquote,{children:["\n",(0,i.jsx)(n.p,{children:"da4cb0d125bba638def55c0061b00d7c01ed4033fa193d6e53a67183c5488d73\nda5d39a5508fadf66c8665d5e51617f0e9e5fd501e429c38471b861f104c1504\nda7a974149543df1b459831286b42b302f22393a20e9b3dd9a7bb5a7aa5af263\nda76f8fccc3267b589d822f1c601b21b525fdc2598df97856191f9063029d21e\nda7b6439c8d3803286b773a56c4b9a38776b5cd0beb8fd628b6007df235cf35c\nda7fd412b79358f84b7928d2f6b7ccdaf165a21313608e16edd317a5355ba250"}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Since we are only concerned with the leading binary bits close to the neighborhood depth, for the rest of this example we will abbreviate the addresses to the first four prefixed hexadecimal digits only. Below are listed the hex prefixes and their binary representation, with the first ten leading bits underlined:"}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Hex prefix"}),(0,i.jsx)(n.th,{children:"Binary Bits"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"da4c"}),(0,i.jsxs)(n.td,{children:[(0,i.jsx)("u",{children:"1101101001"}),"001100"]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"da5d"}),(0,i.jsxs)(n.td,{children:[(0,i.jsx)("u",{children:"1101101001"}),"011101"]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"da76"}),(0,i.jsxs)(n.td,{children:[(0,i.jsx)("u",{children:"1101101001"}),"110110"]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"da7a"}),(0,i.jsxs)(n.td,{children:[(0,i.jsx)("u",{children:"1101101001"}),"111010"]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"da7b"}),(0,i.jsxs)(n.td,{children:[(0,i.jsx)("u",{children:"1101101001"}),"111011"]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"da7f"}),(0,i.jsxs)(n.td,{children:[(0,i.jsx)("u",{children:"1101101001"}),"111111"]})]})]})]}),"\n",(0,i.jsx)(n.h3,{id:"area-of-responsibility",children:"Area of Responsibility"}),"\n",(0,i.jsx)(n.p,{children:"Storer nodes are responsible for storing chunks with addresses whose leading bits match their own up to the storage depth. Here are two example chunks which fall within our example neighborhood:"}),"\n",(0,i.jsxs)(n.blockquote,{children:["\n",(0,i.jsxs)(n.p,{children:["Chunk A address: ",(0,i.jsx)(n.code,{children:"da49a42926015cd1e2bc552147c567b1ca13e8d4302c9e6026e79a24de328b65"}),(0,i.jsx)(n.br,{}),"\n","Chunk B address: ",(0,i.jsx)(n.code,{children:"da696a3dfb0f7f952872eb33e0e2a1435c61f111ff361e64203b5348cc06dc8a"})]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["As the address of the chunk shown above shares the same ten leading binary bits as the nodes in our example neighborhood, it falls into that neighborhood's ",(0,i.jsx)(n.a,{href:"/docs/references/glossary#2-area-of-responsibility-related-depths",children:"area of responsibility"}),", and all the nodes in that neighborhood are required to store that chunk:"]}),"\n",(0,i.jsxs)(n.blockquote,{children:["\n",(0,i.jsxs)(n.p,{children:["da49 --\x3e ",(0,i.jsx)("u",{children:"1101101001"}),"001001",(0,i.jsx)(n.br,{}),"\n","da69 --\x3e ",(0,i.jsx)("u",{children:"1101101001"}),"101001"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.em,{children:"As with the example for nodes, we've abbreviated the chunk addresses to their leading four hexadecimal digits only and converted them to binary digits."})}),"\n",(0,i.jsx)(n.h3,{id:"neighborhood-doubling",children:"Neighborhood Doubling"}),"\n",(0,i.jsx)(n.p,{children:'As more and more chunks are assigned to neighborhoods, the chunk reserves of the nodes in that neighborhood will begin to fill up. Once the nodes\' reserves in a neighborhood become full and can no longer store additional chunks, that neighborhood will split, with each half of the neighborhood taking responsibility for half of the chunks. This event is referred to as a "doubling", as it results in double the number of neighborhoods. The split is done by increasing the storage depth by one, so that the number of shared leading bits is increased by one. This results in a binary splitting of the neighborhood and associated chunks into two new neighborhoods and respective groups of chunks.'}),"\n",(0,i.jsx)(n.admonition,{type:"info",children:(0,i.jsx)(n.p,{children:'Note that when chunks begin to expire and new chunks are not uploaded to Swarm, it is possible for node\'s reserves to empty out, once they fall below a certain threshold, a "halving" will occur in which the storage depth will be decreased by one and two neighborhoods will merge to make a new one so that they are responsible for a wider set of chunks.'})}),"\n",(0,i.jsx)(n.p,{children:"Using our previous example neighborhood, during a doubling, the storage depth would increase from 10 to 11, and the neighborhood would be split based on the 11th leading bit."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"neighborhood A:"})}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Hex prefix"}),(0,i.jsx)(n.th,{children:"Binary Bits"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"da4c"}),(0,i.jsxs)(n.td,{children:[(0,i.jsx)("u",{children:"11011010010"}),"01100"]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"da5d"}),(0,i.jsxs)(n.td,{children:[(0,i.jsx)("u",{children:"11011010010"}),"11101"]})]})]})]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"neighborhood B:"})}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Hex prefix"}),(0,i.jsx)(n.th,{children:"Binary Bits"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"da76"}),(0,i.jsxs)(n.td,{children:[(0,i.jsx)("u",{children:"11011010011"}),"10110"]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"da7a"}),(0,i.jsxs)(n.td,{children:[(0,i.jsx)("u",{children:"11011010011"}),"11010"]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"da7b"}),(0,i.jsxs)(n.td,{children:[(0,i.jsx)("u",{children:"11011010011"}),"11011"]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"da7f"}),(0,i.jsxs)(n.td,{children:[(0,i.jsx)("u",{children:"11011010011"}),"11111"]})]})]})]}),"\n",(0,i.jsx)(n.p,{children:"Each of our two example chunks will also be split amongst the two new neighborhoods based on their 11th leading bit:"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"neighborhood A:"})}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Hex prefix"}),(0,i.jsx)(n.th,{children:"Binary Bits"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"da4c"}),(0,i.jsxs)(n.td,{children:[(0,i.jsx)("u",{children:"11011010010"}),"01100"]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"da5d"}),(0,i.jsxs)(n.td,{children:[(0,i.jsx)("u",{children:"11011010010"}),"11101"]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"da49 (chunk)"}),(0,i.jsxs)(n.td,{children:[(0,i.jsx)("u",{children:"11011010010"}),"01001"]})]})]})]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"neighborhood B:"})}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Hex prefix"}),(0,i.jsx)(n.th,{children:"Binary Bits"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"da76"}),(0,i.jsxs)(n.td,{children:[(0,i.jsx)("u",{children:"11011010011"}),"10110"]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"da7a"}),(0,i.jsxs)(n.td,{children:[(0,i.jsx)("u",{children:"11011010011"}),"11010"]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"da7b"}),(0,i.jsxs)(n.td,{children:[(0,i.jsx)("u",{children:"11011010011"}),"11011"]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"da7f"}),(0,i.jsxs)(n.td,{children:[(0,i.jsx)("u",{children:"11011010011"}),"11111"]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"da69 (chunk)"}),(0,i.jsxs)(n.td,{children:[(0,i.jsx)("u",{children:"11011010011"}),"01001"]})]})]})]}),"\n",(0,i.jsx)(n.h4,{id:"doubling-implications-for-node-operators",children:"Doubling Implications for Node Operators"}),"\n",(0,i.jsxs)(n.p,{children:["One of the implications of doubling for node operators is that the reward chances for a node depends in part on how many other nodes are in its neighborhood. If it is in a neighborhood with fewer nodes, its chances of winning rewards are greater. Therefore node operators should make certain to place their nodes into less populated neighborhoods, and also should look ahead to neighborhoods at the next depth after a doubling. For more details about how to adjust node placement, see ",(0,i.jsx)(n.a,{href:"/docs/bee/installation/set-target-neighborhood",children:"here"}),"."]})]})}function c(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},28453(e,n,s){s.d(n,{R:()=>r,x:()=>t});var o=s(96540);const i={},d=o.createContext(i);function r(e){const n=o.useContext(d);return o.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),o.createElement(d.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/60fe9a3b.3578fe71.js b/assets/js/60fe9a3b.3578fe71.js new file mode 100644 index 000000000..b7cbbdcee --- /dev/null +++ b/assets/js/60fe9a3b.3578fe71.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[8911],{57981(e,t,s){s.r(t),s.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>h,frontMatter:()=>a,metadata:()=>n,toc:()=>l});const n=JSON.parse('{"id":"develop/tools-and-features/cheatsheets","title":"Swarm Cheatsheet","description":"A dense printable quick-reference for building on Swarm \u2014 what it is, its limits, and curated links to get started.","source":"@site/docs/develop/tools-and-features/cheatsheets.md","sourceDirName":"develop/tools-and-features","slug":"/develop/tools-and-features/cheatsheets","permalink":"/docs/develop/tools-and-features/cheatsheets","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/develop/tools-and-features/cheatsheets.md","tags":[],"version":"current","frontMatter":{"title":"Swarm Cheatsheet","id":"cheatsheets","description":"A dense printable quick-reference for building on Swarm \u2014 what it is, its limits, and curated links to get started.","hide_table_of_contents":true},"sidebar":"develop","previous":{"title":"AI Agent Skills","permalink":"/docs/develop/tools-and-features/ai-agent-skills"},"next":{"title":"Postage Stamp Batches","permalink":"/docs/develop/tools-and-features/buy-a-stamp-batch"}}');var o=s(74848),r=s(28453);const a={title:"Swarm Cheatsheet",id:"cheatsheets",description:"A dense printable quick-reference for building on Swarm \u2014 what it is, its limits, and curated links to get started.",hide_table_of_contents:!0},i=void 0,d={},l=[];function c(e){const t={p:"p",strong:"strong",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.p,{children:"The Swarm Cheatsheet is a dense, two-page quick-reference for building on Swarm."}),"\n",(0,o.jsxs)(t.p,{children:["It's designed to print cleanly to A4, so you can keep it beside you at a hackathon or on your desk \u2014 use the ",(0,o.jsx)(t.strong,{children:"Download PDF"})," link below to grab a copy."]}),"\n",(0,o.jsx)("div",{className:"cheatsheet-embed",style:{overflow:"hidden",margin:"1.5rem -1rem"},children:(0,o.jsx)("iframe",{src:"/cheatsheets/overview/",title:"Swarm Cheatsheet",loading:"lazy",onLoad:e=>{const t=e.currentTarget,s=t.parentElement,n=t.contentDocument;if(!n)return;n.documentElement.style.overflow="hidden";const o=()=>{const e=s.clientWidth/794,o=n.body.scrollHeight;t.style.transform="scale("+e+")",t.style.height=o+"px",s.style.height=o*e+"px"};o(),new ResizeObserver(o).observe(n.body),window.addEventListener("resize",o)},style:{width:"794px",border:0,transformOrigin:"top left"}})}),"\n",(0,o.jsx)("a",{className:"button button--primary button--lg",href:"/cheatsheets/swarm-overview-cheatsheet.pdf",download:!0,children:"Download PDF"})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},28453(e,t,s){s.d(t,{R:()=>a,x:()=>i});var n=s(96540);const o={},r=n.createContext(o);function a(e){const t=n.useContext(r);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),n.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6164.de5cd559.js b/assets/js/6164.de5cd559.js new file mode 100644 index 000000000..fd3e48f0d --- /dev/null +++ b/assets/js/6164.de5cd559.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[6164],{77454(e,t,n){function i(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}n.d(t,{S:()=>i}),(0,n(86827).K)(i,"populateCommonDb")},19279(e,t,n){n.d(t,{$:()=>N,U:()=>B,db:()=>f});var i=n(5637),r=n(76385),a=n(31293),o=n(86827),l="",s="",d="",c=[],m=new Map,h=(0,o.K)(e=>(0,r.jZ)(e,(0,r.D7)()),"sanitizeText"),p=(0,o.K)(e=>{switch(e.type){case"terminal":return{...e,value:h(e.value)};case"nonterminal":return{...e,name:h(e.name)};case"sequence":return{...e,elements:e.elements.map(p)};case"choice":return{...e,alternatives:e.alternatives.map(p)};case"optional":return{...e,element:p(e.element)};case"repetition":return{...e,element:p(e.element),separator:e.separator?p(e.separator):void 0};case"special":return{...e,text:h(e.text)}}},"sanitizeAstNode"),u=(0,o.K)(()=>{l="",s="",d="",c.length=0,m.clear(),(0,r.IU)(),a.R.debug("[Railroad] Database cleared")},"clear"),g=(0,o.K)(e=>{l=h(e),a.R.debug("[Railroad] Title set:",e)},"setTitle"),T=(0,o.K)(()=>l,"getTitle"),f={clear:u,setTitle:g,getTitle:T,addRule:(0,o.K)(e=>{const t={...e,name:h(e.name),definition:p(e.definition),comment:e.comment?h(e.comment):void 0};a.R.debug("[Railroad] Adding rule:",t.name),m.has(t.name)&&a.R.warn(`[Railroad] Rule '${t.name}' is already defined. Overwriting.`),c.push(t),m.set(t.name,t)},"addRule"),getRules:(0,o.K)(()=>c,"getRules"),getRule:(0,o.K)(e=>m.get(e),"getRule"),setAccTitle:(0,o.K)(e=>{s=h(e).replace(/^\s+/g,""),a.R.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),getAccTitle:(0,o.K)(()=>s,"getAccTitle"),setAccDescription:(0,o.K)(e=>{d=h(e).replace(/\n\s+/g,"\n"),a.R.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),getAccDescription:(0,o.K)(()=>d,"getAccDescription"),setDiagramTitle:g,getDiagramTitle:T},x={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},w=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,k=/^[\w "',.-]+$/,C=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),F=(0,o.K)(e=>!!e&&Object.keys(e).every(e=>"railroad"===e||C.has(e)),"isRailroadStyleOptions"),S=(0,o.K)(e=>e?"railroad"in e&&e.railroad?e.railroad:F(e)?e:{}:{},"extractRailroadOverrides"),$=(0,o.K)(e=>{if(!e||F(e))return{};const{railroad:t,svgId:n,theme:i,look:r,...a}=e;return a},"extractThemeOverrides"),y=(0,o.K)((e,t)=>{if("string"!=typeof e)return t;const n=e.trim();return w.test(n)?n:t},"sanitizeColorValue"),R=(0,o.K)((e,t)=>{if("string"!=typeof e)return t;const n=e.trim();return k.test(n)?n:t},"sanitizeFontFamilyValue"),b=(0,o.K)((e,t)=>{const n="number"==typeof e?e:"string"==typeof e?Number.parseFloat(e):Number.NaN;return Number.isFinite(n)&&n>=0?n:t},"sanitizeNumberValue"),v=(0,o.K)(e=>{const t="number"==typeof e?e:"string"==typeof e?Number.parseFloat(e):Number.NaN;return Number.isFinite(t)&&t>0?t:void 0},"parseThemeFontSize"),z=(0,o.K)(e=>{const t=R(e.fontFamily,x.fontFamily),n=v(e.fontSize)??x.fontSize;return{...x,fontFamily:t,fontSize:n,terminalFill:y(e.secondBkg??e.secondaryColor,x.terminalFill),terminalStroke:y(e.secondaryBorderColor??e.lineColor,x.terminalStroke),terminalTextColor:y(e.secondaryTextColor??e.textColor,x.terminalTextColor),nonTerminalFill:y(e.mainBkg??e.background,x.nonTerminalFill),nonTerminalStroke:y(e.primaryBorderColor??e.lineColor,x.nonTerminalStroke),nonTerminalTextColor:y(e.primaryTextColor??e.textColor,x.nonTerminalTextColor),lineColor:y(e.lineColor,x.lineColor),markerFill:y(e.lineColor,x.markerFill),commentFill:y(e.labelBackground??e.tertiaryColor,x.commentFill),commentStroke:y(e.tertiaryBorderColor??e.lineColor,x.commentStroke),commentTextColor:y(e.tertiaryTextColor??e.textColor,x.commentTextColor),specialFill:y(e.tertiaryColor??e.secondaryColor,x.specialFill),specialStroke:y(e.tertiaryBorderColor??e.secondaryBorderColor,x.specialStroke),ruleNameColor:y(e.titleColor??e.textColor,x.ruleNameColor)}},"buildThemeDefaults"),K=(0,o.K)(e=>{const t=(0,r.zj)(),n={...(0,r.P$)(),...t.themeVariables??{},...$(e)},i=z(n),a={...t.railroad??{},...S(e)};return{compactMode:a.compactMode??i.compactMode,padding:b(a.padding,i.padding),verticalSeparation:b(a.verticalSeparation,i.verticalSeparation),horizontalSeparation:b(a.horizontalSeparation,i.horizontalSeparation),arcRadius:b(a.arcRadius,i.arcRadius),fontSize:b(a.fontSize,i.fontSize),fontFamily:R(a.fontFamily,i.fontFamily),terminalFill:y(a.terminalFill,i.terminalFill),terminalStroke:y(a.terminalStroke,i.terminalStroke),terminalTextColor:y(a.terminalTextColor,i.terminalTextColor),nonTerminalFill:y(a.nonTerminalFill,i.nonTerminalFill),nonTerminalStroke:y(a.nonTerminalStroke,i.nonTerminalStroke),nonTerminalTextColor:y(a.nonTerminalTextColor,i.nonTerminalTextColor),lineColor:y(a.lineColor,i.lineColor),strokeWidth:b(a.strokeWidth,i.strokeWidth),markerFill:y(a.markerFill,i.markerFill),commentFill:y(a.commentFill,i.commentFill),commentStroke:y(a.commentStroke,i.commentStroke),commentTextColor:y(a.commentTextColor,i.commentTextColor),specialFill:y(a.specialFill,i.specialFill),specialStroke:y(a.specialStroke,i.specialStroke),ruleNameColor:y(a.ruleNameColor,i.ruleNameColor),showMarkers:a.showMarkers??i.showMarkers,markerRadius:b(a.markerRadius,i.markerRadius)}},"buildRailroadStyleOptions"),N=(0,o.K)(e=>{const{fontFamily:t,fontSize:n,terminalFill:i,terminalStroke:r,terminalTextColor:a,nonTerminalFill:o,nonTerminalStroke:l,nonTerminalTextColor:s,lineColor:d,strokeWidth:c,markerFill:m,commentFill:h,commentStroke:p,commentTextColor:u,specialFill:g,specialStroke:T,ruleNameColor:f}=K(e);return`\n .railroad-diagram {\n font-family: ${t};\n font-size: ${n}px;\n }\n\n .railroad-terminal rect {\n fill: ${i};\n stroke: ${r};\n stroke-width: ${c}px;\n }\n\n .railroad-terminal text {\n fill: ${a};\n font-family: ${t};\n font-size: ${n}px;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n .railroad-nonterminal rect {\n fill: ${o};\n stroke: ${l};\n stroke-width: ${c}px;\n }\n\n .railroad-nonterminal text {\n fill: ${s};\n font-family: ${t};\n font-size: ${n}px;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n .railroad-line {\n stroke: ${d};\n stroke-width: ${c}px;\n fill: none;\n }\n\n .railroad-start circle,\n .railroad-end circle {\n fill: ${m};\n }\n\n .railroad-comment ellipse {\n fill: ${h};\n stroke: ${p};\n stroke-width: ${c}px;\n }\n\n .railroad-comment text {\n fill: ${u};\n font-style: italic;\n font-family: ${t};\n font-size: ${n}px;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n .railroad-special rect {\n fill: ${g};\n stroke: ${T};\n stroke-width: ${c}px;\n stroke-dasharray: 5,3;\n }\n\n .railroad-special text {\n fill: ${s};\n font-family: ${t};\n font-size: ${n}px;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n .railroad-rule-name {\n font-weight: bold;\n fill: ${f};\n font-family: ${t};\n font-size: ${n}px;\n }\n\n .railroad-group {\n /* Grouping container, no specific styles */\n }\n`},"getStyles"),M=class{constructor(){this.d=""}static{(0,o.K)(this,"PathBuilder")}moveTo(e,t){return this.d+=`M ${e} ${t} `,this}lineTo(e,t){return this.d+=`L ${e} ${t} `,this}horizontalTo(e){return this.d+=`H ${e} `,this}verticalTo(e){return this.d+=`V ${e} `,this}arcTo(e,t,n,i,r,a,o){return this.d+=`A ${e} ${t} ${n} ${i?1:0} ${r?1:0} ${a} ${o} `,this}build(){return this.d.trim()}},A=class{constructor(e,t=K()){this.textCache=new Map,this.svg=e,this.config=t}static{(0,o.K)(this,"RailroadRenderer")}measureText(e){if(this.textCache.has(e))return this.textCache.get(e);const t=this.svg.append("text").attr("font-family",this.config.fontFamily).attr("font-size",this.config.fontSize).text(e),n=t.node().getBBox(),i={width:n.width,height:n.height};return t.remove(),this.textCache.set(e,i),i}renderTerminal(e,t){const n=this.measureText(t),i=n.width+2*this.config.padding,r=n.height+2*this.config.padding,a=e.append("g").attr("class","railroad-terminal");return a.append("rect").attr("x",0).attr("y",0).attr("width",i).attr("height",r).attr("rx",10).attr("ry",10),a.append("text").attr("x",i/2).attr("y",r/2).text(t),{element:a.node(),dimensions:{width:i,height:r,up:r/2,down:r/2}}}renderNonTerminal(e,t){const n=this.measureText(t),i=n.width+2*this.config.padding,r=n.height+2*this.config.padding,a=e.append("g").attr("class","railroad-nonterminal");return a.append("rect").attr("x",0).attr("y",0).attr("width",i).attr("height",r),a.append("text").attr("x",i/2).attr("y",r/2).text(t),{element:a.node(),dimensions:{width:i,height:r,up:r/2,down:r/2}}}renderSequence(e,t){const n=t.map(t=>this.renderExpression(e,t));let i=0,r=0,a=0;for(const s of n)i+=s.dimensions.width,r=Math.max(r,s.dimensions.up),a=Math.max(a,s.dimensions.down);i+=(n.length-1)*this.config.horizontalSeparation;const o=e.append("g").attr("class","railroad-sequence");let l=0;for(let s=0;sthis.renderExpression(e,t));let i=0,r=0;for(const c of n)i=Math.max(i,c.dimensions.width),r+=c.dimensions.height;r+=(n.length-1)*this.config.verticalSeparation;const a=this.config.arcRadius,o=i+4*a,l=e.append("g").attr("class","railroad-choice");let s=0;const d=r/2;for(const c of n){const e=s,t=e+c.dimensions.up,n=2*a+(i-c.dimensions.width)/2;l.node().appendChild(c.element).setAttribute("transform",`translate(${n}, ${e})`);const r=new M,m=t>d;t===d?r.moveTo(0,d).lineTo(n,t):r.moveTo(0,d).arcTo(a,a,0,!1,m,a,d+(m?a:-a)).lineTo(a,t-(m?a:-a)).arcTo(a,a,0,!1,!m,2*a,t).lineTo(n,t),l.append("path").attr("class","railroad-line").attr("d",r.build());const h=new M,p=n+c.dimensions.width,u=o-2*a;t===d?h.moveTo(p,t).lineTo(o,d):h.moveTo(p,t).lineTo(u,t).arcTo(a,a,0,!1,!m,o-a,t+(m?-a:a)).lineTo(o-a,d+(m?a:-a)).arcTo(a,a,0,!1,m,o,d),l.append("path").attr("class","railroad-line").attr("d",h.build()),s+=c.dimensions.height+this.config.verticalSeparation}return{element:l.node(),dimensions:{width:o,height:r,up:d,down:r-d}}}renderOptional(e,t){const n=this.renderExpression(e,t),i=this.config.arcRadius,r=2*i,a=n.dimensions.width+4*i,o=n.dimensions.height+r,l=e.append("g").attr("class","railroad-optional"),s=2*i,d=r;l.node().appendChild(n.element).setAttribute("transform",`translate(${s}, ${d})`);const c=d+n.dimensions.up,m=(new M).moveTo(0,c).lineTo(2*i,c);l.append("path").attr("class","railroad-line").attr("d",m.build());const h=(new M).moveTo(s+n.dimensions.width,c).lineTo(a,c);l.append("path").attr("class","railroad-line").attr("d",h.build());const p=(new M).moveTo(0,c).arcTo(i,i,0,!1,!1,i,c-i).lineTo(i,i).arcTo(i,i,0,!1,!0,2*i,0).lineTo(a-2*i,0).arcTo(i,i,0,!1,!0,a-i,i).lineTo(a-i,c-i).arcTo(i,i,0,!1,!1,a,c);return l.append("path").attr("class","railroad-line").attr("d",p.build()),{element:l.node(),dimensions:{width:a,height:o,up:c,down:o-c}}}renderRepetition(e,t,n){const i=this.renderExpression(e,t),r=this.config.arcRadius,a=2*r,o=i.dimensions.width+4*r,l=0===n,s=i.dimensions.height+a+(l?a:0),d=e.append("g").attr("class","railroad-repetition"),c=2*r,m=l?a:0;d.node().appendChild(i.element).setAttribute("transform",`translate(${c}, ${m})`);const h=m+i.dimensions.up;d.append("path").attr("class","railroad-line").attr("d",(new M).moveTo(0,h).lineTo(2*r,h).build()),d.append("path").attr("class","railroad-line").attr("d",(new M).moveTo(c+i.dimensions.width,h).lineTo(o,h).build());const p=m+i.dimensions.height+r,u=(new M).moveTo(c+i.dimensions.width,h).arcTo(r,r,0,!1,!0,c+i.dimensions.width+r,h+r).lineTo(c+i.dimensions.width+r,p).arcTo(r,r,0,!1,!0,c+i.dimensions.width,p+r).lineTo(2*r,p+r).arcTo(r,r,0,!1,!0,r,p).lineTo(r,h+r).arcTo(r,r,0,!1,!0,2*r,h);if(d.append("path").attr("class","railroad-line").attr("d",u.build()),l){const e=(new M).moveTo(0,h).arcTo(r,r,0,!1,!1,r,h-r).lineTo(r,r).arcTo(r,r,0,!1,!0,2*r,0).lineTo(o-2*r,0).arcTo(r,r,0,!1,!0,o-r,r).lineTo(o-r,h-r).arcTo(r,r,0,!1,!1,o,h);d.append("path").attr("class","railroad-line").attr("d",e.build())}return{element:d.node(),dimensions:{width:o,height:s,up:h,down:s-h}}}renderSpecial(e,t){const n=this.measureText("? "+t+" ?"),i=n.width+2*this.config.padding,r=n.height+2*this.config.padding,a=e.append("g").attr("class","railroad-special");return a.append("rect").attr("x",0).attr("y",0).attr("width",i).attr("height",r),a.append("text").attr("x",i/2).attr("y",r/2).text("? "+t+" ?"),{element:a.node(),dimensions:{width:i,height:r,up:r/2,down:r/2}}}renderExpression(e,t){switch(t.type){case"terminal":return this.renderTerminal(e,t.value);case"nonterminal":return this.renderNonTerminal(e,t.name);case"sequence":return this.renderSequence(e,t.elements);case"choice":return this.renderChoice(e,t.alternatives);case"optional":return this.renderOptional(e,t.element);case"repetition":return this.renderRepetition(e,t.element,t.min);case"special":return this.renderSpecial(e,t.text);default:throw new Error(`Unknown node type: ${t.type}`)}}renderRule(e,t){const n=this.svg.append("g").attr("class","railroad-rule").attr("transform",`translate(0, ${t})`),i=e.name+" =",r=this.measureText(i).width+20,a=r+20,o=n.append("g"),l=this.renderExpression(o,e.definition),s=Math.max(20,l.dimensions.up),d=s-l.dimensions.up;o.attr("transform",`translate(${a}, ${d})`);n.append("g").attr("class","railroad-rule-name-group").append("text").attr("class","railroad-rule-name").attr("x",0).attr("y",s).text(i);n.append("g").attr("class","railroad-start").append("circle").attr("cx",r).attr("cy",s).attr("r",this.config.markerRadius);return n.append("g").attr("class","railroad-end").append("circle").attr("cx",a+l.dimensions.width+10).attr("cy",s).attr("r",this.config.markerRadius),n.append("path").attr("class","railroad-line").attr("d",(new M).moveTo(r+this.config.markerRadius,s).lineTo(a,s).build()),n.append("path").attr("class","railroad-line").attr("d",(new M).moveTo(a+l.dimensions.width,s).lineTo(a+l.dimensions.width+10-this.config.markerRadius,s).build()),{height:Math.max(40,d+l.dimensions.height+2*this.config.padding),width:a+l.dimensions.width+10+this.config.markerRadius}}renderDiagram(e){let t=this.config.padding,n=0;for(const i of e){const e=this.renderRule(i,t);t+=e.height+this.config.verticalSeparation,n=Math.max(n,e.width)}return{width:n+2*this.config.padding,height:t+this.config.padding}}},D=(0,o.K)((e,t,n)=>{(0,r.a$)(e,t.height,t.width,n),e.attr("viewBox",`0 0 ${t.width} ${t.height}`)},"configureRailroadSvgSize"),B={draw:(0,o.K)((e,t,n)=>{a.R.debug("[Railroad] Rendering diagram\n"+e);try{const e=(0,i.D)(t);e.attr("class","railroad-diagram");const n=(0,r.zj)().railroad,o=n?.useMaxWidth??!0,l=f.getRules();if(a.R.debug(`[Railroad] Rendering ${l.length} rules`),0===l.length)return a.R.warn("[Railroad] No rules to render"),void D(e,{height:100,width:200},o);const s=new A(e,K()).renderDiagram(l);D(e,s,o),a.R.debug("[Railroad] Render complete")}catch(o){throw a.R.error("[Railroad] Render error:",o),o}},"draw")}}}]); \ No newline at end of file diff --git a/assets/js/6210.43e0b81a.js b/assets/js/6210.43e0b81a.js new file mode 100644 index 000000000..6e98883a5 --- /dev/null +++ b/assets/js/6210.43e0b81a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[6210],{75937(e,t,s){s.d(t,{A:()=>r});var n=s(72453),i=s(74886);const r=(e,t)=>n.A.lang.round(i.A.parse(e)[t])},83829(e,t,s){s.d(t,{diagram:()=>Se});var n=s(64918),i=s(46853),r=s(717),o=(s(79515),s(44505),s(72379),s(58962),s(16459)),a=s(76385),c=s(31293),l=s(86827),h=s(37110),g=s(99125),u=s(89826);var d=s(19663);function y(e){if((0,h.s)(e))return e;const t=(0,g.b)(e);if(!function(e){switch((0,g.b)(e)){case u.R_:case u.Uw:case u.cT:case u.iq:case u.$V:case u.vC:case u.ri:case u.ML:case u.XZ:case u.i1:case u._u:case u.pj:case u.kj:case u.GX:case u.Av:case u.NA:case u.OG:case u.VP:case u.Qb:case u.q:case u.x6:case u.ZR:return!0;default:return!1}}(e))return{};if(s=e,Array.isArray(s)){const t=Array.from(e);return e.length>0&&"string"==typeof e[0]&&Object.hasOwn(e,"index")&&(t.index=e.index,t.input=e.input),t}var s;if((0,d.i)(e)){const t=e;return new(0,t.constructor)(t.buffer,t.byteOffset,t.length)}if("[object ArrayBuffer]"===t)return new ArrayBuffer(e.byteLength);if("[object DataView]"===t){const t=e,s=t.buffer,n=t.byteOffset,i=t.byteLength,r=new ArrayBuffer(i),o=new Uint8Array(s,n,i);return new Uint8Array(r).set(o),new DataView(r)}if("[object Boolean]"===t||"[object Number]"===t||"[object String]"===t){const s=new(0,e.constructor)(e.valueOf());return"[object String]"===t?function(e,t){const s=t.valueOf().length;for(const n in t)Object.hasOwn(t,n)&&(Number.isNaN(Number(n))||Number(n)>=s)&&(e[n]=t[n])}(s,e):p(s,e),s}if("[object Date]"===t)return new Date(Number(e));if("[object RegExp]"===t){const t=e,s=new RegExp(t.source,t.flags);return s.lastIndex=t.lastIndex,s}if("[object Symbol]"===t)return Object(Symbol.prototype.valueOf.call(e));if("[object Map]"===t){const t=e,s=new Map;return t.forEach((e,t)=>{s.set(t,e)}),s}if("[object Set]"===t){const t=e,s=new Set;return t.forEach(e=>{s.add(e)}),s}if("[object Arguments]"===t){const t=e,s={};return p(s,t),s.length=t.length,s[Symbol.iterator]=t[Symbol.iterator],s}const n={};return function(e,t){const s=Object.getPrototypeOf(t);null!==s&&"function"==typeof t.constructor&&Object.setPrototypeOf(e,s)}(n,e),p(n,e),function(e,t){const s=Object.getOwnPropertySymbols(t);for(let n=0;n2&&I.push("'"+this.terminals_[w]+"'");$=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+I.join(", ")+", got '"+(this.terminals_[S]||S)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==S?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError($,{text:d.match,token:this.terminals_[S]||S,line:d.yylineno,loc:b,expected:I})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+L+", token: "+S);switch(_[0]){case 1:s.push(S),i.push(d.yytext),r.push(d.yylloc),s.push(_[1]),S=null,m?(S=m,m=null):(h=d.yyleng,a=d.yytext,c=d.yylineno,b=d.yylloc,g>0&&g--);break;case 2:if(E=this.productions_[_[1]][1],T.$=i[i.length-E],T._$={first_line:r[r.length-(E||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(E||1)].first_column,last_column:r[r.length-1].last_column},f&&(T._$.range=[r[r.length-(E||1)].range[0],r[r.length-1].range[1]]),void 0!==(k=this.performAction.apply(T,[a,h,c,y.yy,_[1],i,r].concat(u))))return k;E&&(s=s.slice(0,-1*E*2),i=i.slice(0,-1*E),r=r.slice(0,-1*E)),s.push(this.productions_[_[1]][0]),i.push(T.$),r.push(T._$),D=o[s[s.length-2]][s[s.length-1]],s.push(D);break;case 3:return!0}}return!0},"parse")},x=function(){return{EOF:1,parseError:(0,l.K)(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:(0,l.K)(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,l.K)(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:(0,l.K)(function(e){var t=e.length,s=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===n.length?this.yylloc.first_column:0)+n[n.length-s.length].length-s[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.K)(function(){return this._more=!0,this},"more"),reject:(0,l.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,l.K)(function(e){this.unput(this.match.slice(e))},"less"),pastInput:(0,l.K)(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,l.K)(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,l.K)(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},"showPosition"),test_match:(0,l.K)(function(e,t){var s,n,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],s=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in i)this[r]=i[r];return!1}return!1},"test_match"),next:(0,l.K)(function(){if(this.done)return this.EOF;var e,t,s,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),r=0;rt[0].length)){if(t=s,n=r,this.options.backtrack_lexer){if(!1!==(e=this.test_match(s,i[r])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,l.K)(function(){var e=this.next();return e||this.lex()},"lex"),begin:(0,l.K)(function(e){this.conditionStack.push(e)},"begin"),popState:(0,l.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,l.K)(function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:(0,l.K)(function(e){this.begin(e)},"pushState"),stateStackSize:(0,l.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,l.K)(function(e,t,s,n){switch(s){case 0:return e.getLogger().debug("Found block-beta"),10;case 1:return e.getLogger().debug("Found id-block"),29;case 2:return e.getLogger().debug("Found block"),10;case 3:e.getLogger().debug(".",t.yytext);break;case 4:e.getLogger().debug("_",t.yytext);break;case 5:return 5;case 6:return t.yytext=-1,28;case 7:return t.yytext=t.yytext.replace(/columns\s+/,""),e.getLogger().debug("COLUMNS (LEX)",t.yytext),28;case 8:case 76:case 77:case 99:this.pushState("md_string");break;case 9:return"MD_STR";case 10:case 34:case 79:this.popState();break;case 11:this.pushState("string");break;case 12:e.getLogger().debug("LEX: POPPING STR:",t.yytext),this.popState();break;case 13:return e.getLogger().debug("LEX: STR end:",t.yytext),"STR";case 14:return t.yytext=t.yytext.replace(/space\:/,""),e.getLogger().debug("SPACE NUM (LEX)",t.yytext),21;case 15:return t.yytext="1",e.getLogger().debug("COLUMNS (LEX)",t.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:case 38:case 40:case 41:case 44:return this.popState(),e.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),e.getLogger().debug("Lex: ))"),"NODE_DEND";case 42:return this.popState(),e.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),e.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),e.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),e.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),e.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),e.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),e.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),e.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),e.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),e.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return e.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return e.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return e.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:case 59:case 60:case 61:case 64:return e.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return e.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 62:return e.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return e.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 65:case 66:case 67:case 68:case 69:case 70:case 71:return this.pushState("NODE"),35;case 72:return e.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),e.getLogger().debug("LEX ARR START"),37;case 74:return e.getLogger().debug("Lex: NODE_ID",t.yytext),31;case 75:return e.getLogger().debug("Lex: EOF",t.yytext),8;case 78:return"NODE_DESCR";case 80:e.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:e.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return e.getLogger().debug("LEX: NODE_DESCR:",t.yytext),"NODE_DESCR";case 83:e.getLogger().debug("LEX POPPING"),this.popState();break;case 84:e.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (right): dir:",t.yytext),"DIR";case 86:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (left):",t.yytext),"DIR";case 87:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (x):",t.yytext),"DIR";case 88:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (y):",t.yytext),"DIR";case 89:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (up):",t.yytext),"DIR";case 90:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (down):",t.yytext),"DIR";case 91:return t.yytext="]>",e.getLogger().debug("Lex (ARROW_DIR end):",t.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 93:case 94:case 95:return e.getLogger().debug("Lex: LINK",t.yytext),15;case 96:case 97:case 98:return e.getLogger().debug("Lex: START_LINK",t.yytext),this.pushState("LLABEL"),16;case 100:return e.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 102:case 103:return this.popState(),e.getLogger().debug("Lex: LINK",t.yytext),15;case 104:return e.getLogger().debug("Lex: COLON",t.yytext),t.yytext=t.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}}}();function S(){this.yy={}}return f.lexer=x,(0,l.K)(S,"Parser"),S.prototype=f,f.Parser=S,new S}();m.parser=m;var L=m,_=new Map,k=[],w=new Map,E="color",D="fill",I=new Map,T="",$=(0,l.K)(e=>a.Y2.sanitizeText(e,(0,a.D7)()),"sanitizeText"),N=(0,l.K)(function(e,t=""){let s=I.get(e);s||(s={id:e,styles:[],textStyles:[]},I.set(e,s)),null!=t&&t.split(",").forEach(e=>{const t=e.replace(/([^;]*);/,"$1").trim();if(RegExp(E).exec(e)){const e=t.replace(D,"bgFill").replace(E,D);s.textStyles.push(e)}s.styles.push(t)})},"addStyleClass"),O=(0,l.K)(function(e,t=""){const s=_.get(e);null!=t&&(s.styles=t.split(","))},"addStyle2Node"),R=(0,l.K)(function(e,t){e.split(",").forEach(function(e){let s=_.get(e);if(void 0===s){const t=e.trim();s={id:t,type:"na",children:[]},_.set(t,s)}s.classes||(s.classes=[]),s.classes.push(t)})},"setCssClass"),C=(0,l.K)((e,t)=>{const s=e.flat(),n=[],i=s.find(e=>"column-setting"===e?.type),r=i?.columns??-1;for(const o of s)if("number"==typeof r&&r>0&&"column-setting"!==o.type&&"number"==typeof o.widthInColumns&&o.widthInColumns>r&&c.R.warn(`Block ${o.id} width ${o.widthInColumns} exceeds configured column width ${r}`),o.label&&(o.label=$(o.label)),"classDef"!==o.type)if("applyClass"!==o.type)if("applyStyles"!==o.type)if("column-setting"===o.type)t.columns=o.columns??-1;else if("edge"===o.type){const e=(w.get(o.id)??0)+1;w.set(o.id,e),o.id=e+"-"+o.id,k.push(o)}else{o.label||("composite"===o.type?o.label="":o.label=o.id);const e=_.get(o.id);if(void 0===e?_.set(o.id,o):("na"!==o.type&&(e.type=o.type),o.label!==o.id&&(e.label=o.label)),o.children&&C(o.children,o),"space"===o.type){const e=o.width??1;for(let t=0;t{c.R.debug("Clear called"),(0,a.IU)(),A={id:"root",type:"composite",children:[],columns:-1},_=new Map([["root",A]]),z=[],I=new Map,k=[],w=new Map,T=""},"clear");function v(e){switch(c.R.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return c.R.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function B(e){return c.R.debug("typeStr2Type",e),"=="===e?"thick":"normal"}function P(e){switch(e.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}function F(e){switch(e.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}function j(e){return e.includes("==")?"thick":"normal"}function M(e){return e.includes(".-")?"dotted":"solid"}(0,l.K)(v,"typeStr2Type"),(0,l.K)(B,"edgeTypeStr2Type"),(0,l.K)(P,"edgeStrToEdgeData"),(0,l.K)(F,"edgeStrToEdgeStartData"),(0,l.K)(j,"edgeStrToThickness"),(0,l.K)(M,"edgeStrToPattern");var Y=0,X=(0,l.K)(()=>(Y++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Y),"generateId"),W=(0,l.K)(e=>{A.children=e,C(e,A),z=A.children},"setHierarchy"),U=(0,l.K)(e=>{const t=_.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),G=(0,l.K)(()=>[..._.values()],"getBlocksFlat"),H=(0,l.K)(()=>z||[],"getBlocks"),q=(0,l.K)(()=>k,"getEdges"),V=(0,l.K)(e=>_.get(e),"getBlock"),Z=(0,l.K)(e=>{_.set(e.id,e)},"setBlock"),J=(0,l.K)(e=>{T=e},"setDiagramId"),Q=(0,l.K)(()=>T,"getDiagramId"),ee=(0,l.K)(()=>c.R,"getLogger"),te=(0,l.K)(function(){return I},"getClasses"),se={getConfig:(0,l.K)(()=>(0,a.zj)().block,"getConfig"),typeStr2Type:v,edgeTypeStr2Type:B,edgeStrToEdgeData:P,edgeStrToEdgeStartData:F,edgeStrToThickness:j,edgeStrToPattern:M,getLogger:ee,getBlocksFlat:G,getBlocks:H,getEdges:q,setHierarchy:W,getBlock:V,setBlock:Z,getColumns:U,getClasses:te,clear:K,generateId:X,setDiagramId:J,getDiagramId:Q},ne=(0,l.K)((e,t)=>{const s=b.A,n=s(e,"r"),i=s(e,"g"),r=s(e,"b");return f.A(n,i,r,t)},"fade"),ie=(0,l.K)(e=>`.label {\n font-family: ${e.fontFamily};\n color: ${e.nodeTextColor||e.textColor};\n }\n .cluster-label text {\n fill: ${e.titleColor};\n }\n .cluster-label span {\n color: ${e.titleColor};\n }\n\n\n\n .label text,span {\n fill: ${e.nodeTextColor||e.textColor};\n color: ${e.nodeTextColor||e.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${e.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${e.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n /*\n * This is for backward compatibility with existing code that didn't\n * add a \`

    \` around edge labels.\n *\n * TODO: We should probably remove this in a future release.\n */\n p {\n margin: 0;\n padding: 0;\n display: inline;\n }\n rect {\n opacity: 0.5;\n background-color: ${e.edgeLabelBackground};\n fill: ${e.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${e.edgeLabelBackground};\n }\n\n .node .cluster {\n // fill: ${ne(e.mainBkg,.5)};\n fill: ${ne(e.clusterBkg,.5)};\n stroke: ${ne(e.clusterBorder,.2)};\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${e.titleColor};\n }\n\n .cluster span {\n color: ${e.titleColor};\n }\n /* .cluster div {\n color: ${e.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${e.textColor};\n }\n ${(0,n.o)()}\n`,"getStyles");function re(e,t){if(0===e||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(1===e)return{px:0,py:t};return{px:t%e,py:Math.floor(t/e)}}(0,l.K)(re,"calculateBlockPosition");var oe=(0,l.K)(e=>{let t=0,s=0;for(const n of e.children){const{width:e,height:i,x:r,y:o}=n.size??{width:0,height:0,x:0,y:0};if(c.R.debug("getMaxChildSize abc95 child:",n.id,"width:",e,"height:",i,"x:",r,"y:",o,n.type),"space"===n.type)continue;const a=e/(n.widthInColumns??1);a>t&&(t=a),i>s&&(s=i)}return{width:t,height:s}},"getMaxChildSize");function ae(e,t,s=0,n=0,i=8){c.R.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"siblingWidth",s),e?.size?.width||(e.size={width:s,height:n,x:0,y:0});let r=0,o=0;if(e.children?.length>0){for(const s of e.children)ae(s,t,0,0,i);const a=oe(e);r=a.width,o=a.height,c.R.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",r,o);for(const t of e.children)t.size&&(c.R.debug(`abc95 Setting size of children of ${e.id} id=${t.id} ${r} ${o} ${JSON.stringify(t.size)}`),t.size.width=r*(t.widthInColumns??1)+i*((t.widthInColumns??1)-1),t.size.height=o,t.size.x=0,t.size.y=0,c.R.debug(`abc95 updating size of ${e.id} children child:${t.id} maxWidth:${r} maxHeight:${o}`));for(const s of e.children)ae(s,t,r,o,i);const l=e.columns??-1;let h=0;for(const t of e.children)h+=t.widthInColumns??1;let g=e.children.length;l>0&&l0?Math.min(e.children.length,l):e.children.length;if(t>0){const s=(d-t*i-i)/t;c.R.debug("abc95 (growing to fit) width",e.id,d,e.size?.width,s);for(const t of e.children)t.size&&(t.size.width=s)}}e.size={width:d,height:y,x:0,y:0}}c.R.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}function ce(e,t,s=8){c.R.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);const n=e.columns??-1;if(c.R.debug("layoutBlocks columns abc95",e.id,"=>",n,e),e.children&&e.children.length>0){const i=e?.children[0]?.size?.width??0,r=e.children.length*i+(e.children.length-1)*s;c.R.debug("widthOfChildren 88",r,"posX");const o=new Map;{let t=0;for(const s of e.children){if(!s.size)continue;const{py:e}=re(n,t),i=o.get(e)??0;s.size.height>i&&o.set(e,s.size.height);let r=s?.widthInColumns??1;n>0&&(r=Math.min(r,n-t%n)),t+=r}}const a=new Map;{let e=0;const t=[...o.keys()].sort((e,t)=>e-t);for(const n of t)a.set(n,e),e+=(o.get(n)??0)+s}let l=0;c.R.debug("abc91 block?.size?.x",e.id,e?.size?.x);let h=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-s,g=0;for(const u of e.children){const i=e;if(!u.size)continue;const{width:r,height:d}=u.size,{px:y,py:p}=re(n,l);if(p!=g&&(g=p,h=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-s,c.R.debug("New row in layout for block",e.id," and child ",u.id,g)),c.R.debug(`abc89 layout blocks (child) id: ${u.id} Pos: ${l} (px, py) ${y},${p} (${i?.size?.x},${i?.size?.y}) parent: ${i.id} width: ${r}${s}`),i.size){const e=r/2;u.size.x=h+s+e,c.R.debug(`abc91 layout blocks (calc) px, pyid:${u.id} startingPos=X${h} new startingPosX${u.size.x} ${e} padding=${s} width=${r} halfWidth=${e} => x:${u.size.x} y:${u.size.y} ${u.widthInColumns} (width * (child?.w || 1)) / 2 ${r*(u?.widthInColumns??1)/2}`),h=u.size.x+e;const t=a.get(p)??0,n=o.get(p)??d;u.size.y=i.size.y-i.size.height/2+t+n/2+s,c.R.debug(`abc88 layout blocks (calc) px, pyid:${u.id}startingPosX${h}${s}${e}=>x:${u.size.x}y:${u.size.y}${u.widthInColumns}(width * (child?.w || 1)) / 2${r*(u?.widthInColumns??1)/2}`)}u.children&&ce(u,t,s);let b=u?.widthInColumns??1;n>0&&(b=Math.min(b,n-l%n)),l+=b,c.R.debug("abc88 columnsPos",u,l)}}c.R.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}function le(e,{minX:t,minY:s,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&"root"!==e.id){const{x:r,y:o,width:a,height:c}=e.size;r-a/2n&&(n=r+a/2),o+c/2>i&&(i=o+c/2)}if(e.children)for(const r of e.children)({minX:t,minY:s,maxX:n,maxY:i}=le(r,{minX:t,minY:s,maxX:n,maxY:i}));return{minX:t,minY:s,maxX:n,maxY:i}}function he(e){const t=e.getBlock("root");if(!t)return;const s=(0,a.D7)()?.block?.padding??8;ae(t,e,0,0,s),ce(t,e,s),c.R.debug("getBlocks",JSON.stringify(t,null,2));const{minX:n,minY:i,maxX:r,maxY:o}=le(t);return{x:n,y:i,width:r-n,height:o-i}}function ge(e,t,s=!1){const n=e;let i="default";(n?.classes?.length||0)>0&&(i=(n?.classes??[]).join(" ")),i+=" flowchart-label";const r=(n?.classes??[]).flatMap(e=>t.getClasses().get(e)?.styles??[]);let c,l=0,h="rect";switch(n.type){case"round":l=5,h="rect";break;case"composite":l=0,h="composite",c=0;break;case"square":case"group":default:h="rect";break;case"diamond":h="question";break;case"hexagon":h="hexagon";break;case"block_arrow":h="block_arrow";break;case"odd":case"rect_left_inv_arrow":h="rect_left_inv_arrow";break;case"lean_right":h="lean_right";break;case"lean_left":h="lean_left";break;case"trapezoid":h="trapezoid";break;case"inv_trapezoid":h="inv_trapezoid";break;case"circle":h="circle";break;case"ellipse":h="ellipse";break;case"stadium":h="stadium";break;case"subroutine":h="subroutine";break;case"cylinder":h="cylinder";break;case"doublecircle":h="doublecircle"}const g=(0,o.sM)(n?.styles??[]),u=n.label,d=n.size??{width:0,height:0,x:0,y:0},y=t.getDiagramId();return{labelStyle:g.labelStyle,shape:h,label:u,labelText:u,rx:l,ry:l,class:i,cssClasses:i,cssStyles:n?.styles??[],cssCompiledStyles:r,style:g.style,id:n.id,domId:y?`${y}-${n.id}`:n.id,isGroup:!1,directions:n.directions,width:d.width||void 0,height:d.height||void 0,wrappingWidth:d.width||Number.POSITIVE_INFINITY,x:d.x,y:d.y,positioned:s,intersect:void 0,padding:c??(0,a.zj)()?.block?.padding??0,widthInColumns:n.widthInColumns??1}}async function ue(e,t,s){const n=ge(t,s,!1);if("group"===t.type)return;const i=(0,a.zj)(),o=await(0,r.on)(e,n,{config:i}),c=o.node()?.getBBox()??{width:0,height:0},l=s.getBlock(n.id);l.size={width:c.width,height:c.height,x:0,y:0,node:o},s.setBlock(l),o.remove()}async function de(e,t,s){const n=ge(t,s,!0);if("space"!==s.getBlock(n.id).type){const s=(0,a.zj)();await(0,r.on)(e,n,{config:s}),t.intersect=n?.intersect,(0,r.U_)(n)}}async function ye(e,t,s,n){for(const i of t)await n(e,i,s),i.children&&await ye(e,i.children,s,n)}async function pe(e,t,s){await ye(e,t,s,ue)}async function be(e,t,s){await ye(e,t,s,de)}async function fe(e,t,s,n,r){const o=new S.T({multigraph:!0,compound:!0});o.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const i of s)i.size&&o.setNode(i.id,{width:i.size.width,height:i.size.height,intersect:i.intersect});for(const a of t)if(a.start&&a.end){const t=n.getBlock(a.start),s=n.getBlock(a.end);if(t?.size&&s?.size){const n=t.size,c=s.size,l=[{x:n.x,y:n.y},{x:n.x+(c.x-n.x)/2,y:n.y+(c.y-n.y)/2},{x:c.x,y:c.y}],h=r?`${r}-${a.id}`:a.id,g=`${"thick"===a.thickness?"edge-thickness-thick":"edge-thickness-normal"} ${"dotted"===a.pattern?"edge-pattern-dotted":"edge-pattern-solid"} flowchart-link LS-a1 LE-b1`;(0,i.Jo)(e,{...a,id:h,arrowTypeEnd:a.arrowTypeEnd,arrowTypeStart:a.arrowTypeStart,points:l,classes:g},{},"block",o.node(a.start),o.node(a.end),r),a.label&&(await(0,i.jP)(e,{...a,label:a.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:a.arrowTypeEnd,arrowTypeStart:a.arrowTypeStart,points:l,classes:g}),(0,i.T_)({...a,x:l[1].x,y:l[1].y},{originalPath:l}))}}}(0,l.K)(ae,"setBlockSizes"),(0,l.K)(ce,"layoutBlocks"),(0,l.K)(le,"findBounds"),(0,l.K)(he,"layout"),(0,l.K)(ge,"getNodeFromBlock"),(0,l.K)(ue,"calculateBlockSize"),(0,l.K)(de,"insertBlockPositioned"),(0,l.K)(ye,"performOperations"),(0,l.K)(pe,"calculateBlockSizes"),(0,l.K)(be,"insertBlocks"),(0,l.K)(fe,"insertEdges");var xe=(0,l.K)(function(e,t){return t.db.getClasses()},"getClasses"),Se={parser:L,db:se,renderer:{draw:(0,l.K)(async function(e,t,s,n){const{securityLevel:r,block:o}=(0,a.zj)(),l=n.db;let h;l.setDiagramId(t),"sandbox"===r&&(h=(0,x.Ltv)("#i"+t));const g="sandbox"===r?(0,x.Ltv)(h.nodes()[0].contentDocument.body):(0,x.Ltv)("body"),u="sandbox"===r?g.select(`[id="${t}"]`):(0,x.Ltv)(`[id="${t}"]`);(0,i.g0)(u,["point","circle","cross"],n.type,t);const d=l.getBlocks(),y=l.getBlocksFlat(),p=l.getEdges(),b=u.insert("g").attr("class","block");await pe(b,d,l);const f=he(l);await be(b,d,l),await fe(b,p,y,l,t);const S=b.node()?.getBBox(),m=S&&Number.isFinite(S.width)&&Number.isFinite(S.height)?S:f;if(m){const e=Math.max(1,Math.round(m.width/m.height*.125)),t=m.height+e+10,s=m.width+10,{useMaxWidth:n}=o;(0,a.a$)(u,t,s,!!n),c.R.debug("Here Bounds",f,m),u.attr("viewBox",`${m.x-5} ${m.y-5} ${m.width+10} ${m.height+10}`)}},"draw"),getClasses:xe},styles:ie}},64918(e,t,s){s.d(t,{o:()=>n});var n=(0,s(86827).K)(()=>"\n /* Font Awesome icon styling - consolidated */\n .label-icon {\n display: inline-block;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n }\n \n .node .label-icon path {\n fill: currentColor;\n stroke: revert;\n stroke-width: revert;\n }\n","getIconStyles")}}]); \ No newline at end of file diff --git a/assets/js/629.a40f368f.js b/assets/js/629.a40f368f.js new file mode 100644 index 000000000..d1238e3f3 --- /dev/null +++ b/assets/js/629.a40f368f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[629],{77454(t,e,n){function a(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}n.d(e,{S:()=>a}),(0,n(86827).K)(a,"populateCommonDb")},30629(t,e,n){n.d(e,{diagram:()=>A});var a=n(77454),r=n(5637),o=n(16459),i=n(76385),c=n(31293),s=n(86827),l=n(78731),d=(0,s.K)(()=>({domains:new Map,transitions:[]}),"createDefaultData"),f=d(),p={getDomains:(0,s.K)(()=>f.domains,"getDomains"),getTransitions:(0,s.K)(()=>f.transitions,"getTransitions"),setDomains:(0,s.K)(t=>{if(t)for(const e of t){const t=e.domain,n=(e.items??[]).map(t=>({label:t.label}));f.domains.set(t,{name:t,items:n})}},"setDomains"),setTransitions:(0,s.K)(t=>{t&&(f.transitions=t.filter(t=>t.from!==t.to||(c.R.warn(`Cynefin: self-loop transition on domain "${t.from}" is not meaningful and will be skipped.`),!1)).map(t=>({from:t.from,to:t.to,label:t.label||void 0})))},"setTransitions"),getConfig:(0,s.K)(()=>(0,o.$t)({...i.UI.cynefin,...(0,i.zj)().cynefin}),"getConfig"),clear:(0,s.K)(()=>{(0,i.IU)(),f=d()},"clear"),setAccTitle:i.SV,getAccTitle:i.iN,setDiagramTitle:i.ke,getDiagramTitle:i.ab,getAccDescription:i.m7,setAccDescription:i.EI},m=(0,s.K)(t=>{(0,a.S)(t,p),p.setDomains(t.domains),p.setTransitions(t.transitions)},"populate"),y={parse:(0,s.K)(async t=>{const e=await(0,l.qg)("cynefin",t);c.R.debug(e),m(e)},"parse")};function x(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,1|e),e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296}function h(t){let e=0;for(let n=0;n{const n=t/2,a=e/2;return{complex:{cx:n/2,cy:a/2,x:0,y:0,w:n,h:a},complicated:{cx:n+n/2,cy:a/2,x:n,y:0,w:n,h:a},chaotic:{cx:n/2,cy:a+a/2,x:0,y:a,w:n,h:a},clear:{cx:n+n/2,cy:a+a/2,x:n,y:a,w:n,h:a},confusion:{cx:n,cy:a,x:.7*n,y:.7*a,w:.6*n,h:.6*a}}},"getDomainLayouts"),D=(0,s.K)(()=>{const t=(0,i.P$)(),e=(0,i.zj)();return(0,o.$t)(t,e.themeVariables).cynefin},"getCynefinDomainColors"),K={draw:(0,s.K)((t,e,n,a)=>{const o=a.db,s=o.getDomains(),l=o.getTransitions(),d=o.getDiagramTitle(),f=o.getAccTitle(),p=o.getAccDescription(),m=o.getConfig(),y=D();c.R.debug("Rendering Cynefin diagram");const x=m.width,h=m.height,K=m.padding,T=m.showDomainDescriptions,A=m.boundaryAmplitude,B=x+2*K,S=h+2*K,z={complex:y.complexBg,complicated:y.complicatedBg,clear:y.clearBg,chaotic:y.chaoticBg,confusion:y.confusionBg},v=(0,r.D)(e);(0,i.a$)(v,S,B,m.useMaxWidth??!0),v.attr("viewBox",`0 0 ${B} ${S}`),f&&v.append("title").text(f),p&&v.append("desc").text(p);const M=v.append("g").attr("transform",`translate(${K}, ${K})`),I=k(x,h),L=$(m.seed,e),P=M.append("g").attr("class","cynefin-backgrounds"),R=["complex","complicated","chaotic","clear"];for(const r of R){const t=I[r];P.append("rect").attr("class","cynefinDomain").attr("x",t.x).attr("y",t.y).attr("width",t.w).attr("height",t.h).attr("fill",z[r]).attr("fill-opacity",.4).attr("stroke","none")}const F=M.append("g").attr("class","cynefin-boundaries");F.append("path").attr("class","cynefinBoundary").attr("d",g(x,h,L,A)).attr("fill","none"),F.append("path").attr("class","cynefinBoundary").attr("d",u(x,h,L+100,A)).attr("fill","none"),F.append("path").attr("class","cynefinCliff").attr("d",b(x,h)).attr("fill","none");const j=.15*x,W=.15*h;M.append("path").attr("class","cynefinConfusion").attr("d",w(x/2,h/2,j,W)).attr("fill",z.confusion).attr("fill-opacity",.5);const E=M.append("g").attr("class","cynefin-labels");for(const r of R){const t=I[r];E.append("text").attr("class","cynefinDomainLabel").attr("x",t.cx).attr("y",T?t.cy-30:t.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(r.charAt(0).toUpperCase()+r.slice(1))}if(E.append("text").attr("class","cynefinDomainLabel").attr("x",x/2).attr("y",T?h/2-10:h/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),T){const t=M.append("g").attr("class","cynefin-subtitles");for(const e of R){const n=I[e],a=C[e];t.append("text").attr("class","cynefinSubtitle").attr("x",n.cx).attr("y",n.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(a.model),t.append("text").attr("class","cynefinSubtitle").attr("x",n.cx).attr("y",n.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(a.practice)}t.append("text").attr("class","cynefinSubtitle").attr("x",x/2).attr("y",h/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(C.confusion.practice)}const H=M.append("g").attr("class","cynefin-items"),N=26,U=["complex","complicated","chaotic","clear","confusion"];for(const r of U){const t=s.get(r);if(!t||0===t.items.length)continue;const e=I[r],n="confusion"===r;let a,o=t.items,i=0;if(n&&t.items.length>3&&(i=t.items.length-3,o=t.items.slice(0,3)),n){const t=T?22:14;a=e.cy+t}else a=e.cy+(T?25:15);if([...o].forEach((t,n)=>{const o=a+30*n,i=H.append("g"),c=i.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",13).attr("text-anchor","middle").attr("dominant-baseline","central").text(t.label);let s=7*t.label.length;const l=c.node();if(l&&"function"==typeof l.getBBox){const t=l.getBBox();t.width>0&&(s=t.width)}const d=s+20,f=e.cx-d/2;i.attr("transform",`translate(${f}, ${o})`),i.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",d).attr("height",N).attr("rx",4).attr("ry",4).attr("fill",z[r]).attr("fill-opacity",.95),c.attr("x",d/2).attr("y",13)}),i>0){const t=a+30*o.length,n=`+${i} more`,c=H.append("g"),s=c.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",13).attr("text-anchor","middle").attr("dominant-baseline","central").text(n);let l=7*n.length;const d=s.node();if(d&&"function"==typeof d.getBBox){const t=d.getBBox();t.width>0&&(l=t.width)}const f=l+20,p=e.cx-f/2;c.attr("transform",`translate(${p}, ${t})`),c.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",f).attr("height",N).attr("rx",4).attr("ry",4).attr("fill",z[r]).attr("fill-opacity",.6),s.attr("x",f/2).attr("y",13)}}if(l.length>0){const t=v.select("defs").empty()?v.append("defs"):v.select("defs"),n=`cynefin-arrow-${e}`;t.append("marker").attr("id",n).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");const a=M.append("g").attr("class","cynefin-arrows");l.forEach(t=>{const e=I[t.from],r=I[t.to];if(!e||!r)return;if(t.from===t.to)return void c.R.warn(`Cynefin renderer: skipping self-loop on domain "${t.from}"`);const o=e.cx,i=e.cy,s=r.cx,l=r.cy,d=(o+s)/2,f=(i+l)/2,p=s-o,m=l-i,y=Math.sqrt(p*p+m*m),x=.15*y,h=d+-m/y*x,$=f+p/y*x;a.append("path").attr("class","cynefinArrowLine").attr("d",`M${o},${i} Q${h},${$} ${s},${l}`).attr("fill","none").attr("marker-end",`url(#${n})`),t.label&&a.append("text").attr("class","cynefinArrowLabel").attr("x",h).attr("y",$-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(t.label)})}d&&M.append("text").attr("class","cynefinTitle").attr("x",x/2).attr("y",-K/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(d)},"draw")},T=(0,s.K)(()=>{const t=(0,i.P$)(),e=(0,i.zj)();return(0,o.$t)(t,e.themeVariables).cynefin},"getCynefinTheme"),A={parser:y,db:p,renderer:K,styles:(0,s.K)(()=>{const t=T();return`\n\t.cynefinDomain {\n\t\tstroke: none;\n\t}\n\t.cynefinDomainLabel {\n\t\tfont-size: ${t.domainFontSize}px;\n\t\tfont-weight: bold;\n\t\tfill: ${t.labelColor};\n\t}\n\t.cynefinSubtitle {\n\t\tfont-size: ${t.itemFontSize-1}px;\n\t\tfill: ${t.textColor};\n\t\tfont-style: italic;\n\t}\n\t.cynefinItem {\n\t\tfill-opacity: 0.95;\n\t\tstroke: ${t.boundaryColor};\n\t\tstroke-width: 1;\n\t}\n\t.cynefinItemText {\n\t\tfont-size: ${t.itemFontSize}px;\n\t\tfill: ${t.textColor};\n\t}\n\t.cynefinItemOverflow {\n\t\tfill-opacity: 0.6;\n\t\tstroke: ${t.boundaryColor};\n\t\tstroke-width: 1;\n\t\tstroke-dasharray: 3 2;\n\t}\n\t.cynefinBoundary {\n\t\tstroke: ${t.boundaryColor};\n\t\tstroke-width: ${t.boundaryWidth};\n\t\tstroke-dasharray: 6 3;\n\t}\n\t.cynefinCliff {\n\t\tstroke: ${t.cliffColor};\n\t\tstroke-width: ${t.cliffWidth};\n\t}\n\t.cynefinConfusion {\n\t\tstroke: ${t.boundaryColor};\n\t\tstroke-width: 1.5;\n\t\tstroke-dasharray: 4 2;\n\t}\n\t.cynefinArrowLine {\n\t\tstroke: ${t.arrowColor};\n\t\tstroke-width: ${t.arrowWidth};\n\t\tfill: none;\n\t}\n\t.cynefinArrowHead {\n\t\tfill: ${t.arrowColor};\n\t\tstroke: none;\n\t}\n\t.cynefinArrowLabel {\n\t\tfont-size: ${t.itemFontSize-1}px;\n\t\tfill: ${t.textColor};\n\t}\n\t.cynefinTitle {\n\t\tfont-size: ${t.domainFontSize+2}px;\n\t\tfont-weight: bold;\n\t\tfill: ${t.labelColor};\n\t}\n\t`},"styles")}}}]); \ No newline at end of file diff --git a/assets/js/6344.29be75ac.js b/assets/js/6344.29be75ac.js new file mode 100644 index 000000000..4855180b2 --- /dev/null +++ b/assets/js/6344.29be75ac.js @@ -0,0 +1 @@ +(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[6344],{26527(t,e,i){var n;n=function(t){return(()=>{"use strict";var e={658:t=>{t.exports=null!=Object.assign?Object.assign.bind(Object):function(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n{var n=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var i=[],n=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(i.push(s.value),!e||i.length!==e);n=!0);}catch(h){r=!0,o=h}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}return i}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=i(140).layoutBase.LinkedList,o={getTopMostNodes:function(t){for(var e={},i=0;i0&&l.merge(t)});for(var d=0;d1){l=a[0],d=l.connectedEdges().length,a.forEach(function(t){t.connectedEdges().length0&&n.set("dummy"+(n.size+1),u),f},relocateComponent:function(t,e,i){if(!i.fixedNodeConstraint){var r=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;if("draft"==i.quality){var h=!0,l=!1,d=void 0;try{for(var c,g=e.nodeIndexes[Symbol.iterator]();!(h=(c=g.next()).done);h=!0){var u=c.value,f=n(u,2),p=f[0],m=f[1],y=i.cy.getElementById(p);if(y){var v=y.boundingBox(),E=e.xCoords[m]-v.w/2,N=e.xCoords[m]+v.w/2,T=e.yCoords[m]-v.h/2,A=e.yCoords[m]+v.h/2;Eo&&(o=N),Ta&&(a=A)}}}catch(M){l=!0,d=M}finally{try{!h&&g.return&&g.return()}finally{if(l)throw d}}var w=t.x-(o+r)/2,I=t.y-(a+s)/2;e.xCoords=e.xCoords.map(function(t){return t+w}),e.yCoords=e.yCoords.map(function(t){return t+I})}else{Object.keys(e).forEach(function(t){var i=e[t],n=i.getRect().x,h=i.getRect().x+i.getRect().width,l=i.getRect().y,d=i.getRect().y+i.getRect().height;no&&(o=h),la&&(a=d)});var C=t.x-(o+r)/2,L=t.y-(a+s)/2;Object.keys(e).forEach(function(t){var i=e[t];i.setCenter(i.getCenterX()+C,i.getCenterY()+L)})}}},calcBoundingBox:function(t,e,i,n){for(var r=Number.MAX_SAFE_INTEGER,o=Number.MIN_SAFE_INTEGER,s=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER,h=void 0,l=void 0,d=void 0,c=void 0,g=t.descendants().not(":parent"),u=g.length,f=0;f(h=e[n.get(p.id())]-p.width()/2)&&(r=h),o<(l=e[n.get(p.id())]+p.width()/2)&&(o=l),s>(d=i[n.get(p.id())]-p.height()/2)&&(s=d),a<(c=i[n.get(p.id())]+p.height()/2)&&(a=c)}var m={};return m.topLeftX=r,m.topLeftY=s,m.width=o-r,m.height=a-s,m},calcParentsWithoutChildren:function(t,e){var i=t.collection();return e.nodes(":parent").forEach(function(t){var e=!1;t.children().forEach(function(t){"none"!=t.css("display")&&(e=!0)}),e||i.merge(t)}),i}};t.exports=o},816:(t,e,i)=>{var n=i(548),r=i(140).CoSELayout,o=i(140).CoSENode,s=i(140).layoutBase.PointD,a=i(140).layoutBase.DimensionD,h=i(140).layoutBase.LayoutConstants,l=i(140).layoutBase.FDLayoutConstants,d=i(140).CoSEConstants;t.exports={coseLayout:function(t,e){var i=t.cy,c=t.eles,g=c.nodes(),u=c.edges(),f=void 0,p=void 0,m=void 0,y={};t.randomize&&(f=e.nodeIndexes,p=e.xCoords,m=e.yCoords);var v=function(t){return"function"==typeof t},E=function(t,e){return v(t)?t(e):t},N=n.calcParentsWithoutChildren(i,c);null!=t.nestingFactor&&(d.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),null!=t.gravity&&(d.DEFAULT_GRAVITY_STRENGTH=l.DEFAULT_GRAVITY_STRENGTH=t.gravity),null!=t.numIter&&(d.MAX_ITERATIONS=l.MAX_ITERATIONS=t.numIter),null!=t.gravityRange&&(d.DEFAULT_GRAVITY_RANGE_FACTOR=l.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),null!=t.gravityCompound&&(d.DEFAULT_COMPOUND_GRAVITY_STRENGTH=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),null!=t.gravityRangeCompound&&(d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),null!=t.initialEnergyOnIncremental&&(d.DEFAULT_COOLING_FACTOR_INCREMENTAL=l.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),null!=t.tilingCompareBy&&(d.TILING_COMPARE_BY=t.tilingCompareBy),"proof"==t.quality?h.QUALITY=2:h.QUALITY=0,d.NODE_DIMENSIONS_INCLUDE_LABELS=l.NODE_DIMENSIONS_INCLUDE_LABELS=h.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,d.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=h.DEFAULT_INCREMENTAL=!t.randomize,d.ANIMATE=l.ANIMATE=h.ANIMATE=t.animate,d.TILE=t.tile,d.TILING_PADDING_VERTICAL="function"==typeof t.tilingPaddingVertical?t.tilingPaddingVertical.call():t.tilingPaddingVertical,d.TILING_PADDING_HORIZONTAL="function"==typeof t.tilingPaddingHorizontal?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal,d.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=h.DEFAULT_INCREMENTAL=!0,d.PURE_INCREMENTAL=!t.randomize,h.DEFAULT_UNIFORM_LEAF_NODE_SIZES=t.uniformNodeDimensions,"transformed"==t.step&&(d.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,d.ENFORCE_CONSTRAINTS=!1,d.APPLY_LAYOUT=!1),"enforced"==t.step&&(d.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,d.ENFORCE_CONSTRAINTS=!0,d.APPLY_LAYOUT=!1),"cose"==t.step&&(d.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,d.ENFORCE_CONSTRAINTS=!1,d.APPLY_LAYOUT=!0),"all"==t.step&&(t.randomize?d.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:d.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,d.ENFORCE_CONSTRAINTS=!0,d.APPLY_LAYOUT=!0),t.fixedNodeConstraint||t.alignmentConstraint||t.relativePlacementConstraint?d.TREE_REDUCTION_ON_INCREMENTAL=!1:d.TREE_REDUCTION_ON_INCREMENTAL=!0;var T=new r,A=T.newGraphManager();return function t(e,i,r,h){for(var l=i.length,d=0;d0&&t(r.getGraphManager().add(r.newGraph(),u),g,r,h)}}(A.addRoot(),n.getTopMostNodes(g),T,t),function(e,i,n){for(var r=0,o=0,s=0;s0?d.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=r/o:v(t.idealEdgeLength)?d.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=50:d.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=t.idealEdgeLength,d.MIN_REPULSION_DIST=l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,d.DEFAULT_RADIAL_SEPARATION=l.DEFAULT_EDGE_LENGTH)}(T,A,u),function(t,e){e.fixedNodeConstraint&&(t.constraints.fixedNodeConstraint=e.fixedNodeConstraint),e.alignmentConstraint&&(t.constraints.alignmentConstraint=e.alignmentConstraint),e.relativePlacementConstraint&&(t.constraints.relativePlacementConstraint=e.relativePlacementConstraint)}(T,t),T.runLayout(),y}}},212:(t,e,i)=>{var n=function(){function t(t,e){for(var i=0;i0)if(c){var g=o.getTopMostNodes(t.eles.nodes());if((h=o.connectComponents(e,t.eles,g)).forEach(function(t){var e=t.boundingBox();l.push({x:e.x1+e.w/2,y:e.y1+e.h/2})}),t.randomize&&h.forEach(function(e){t.eles=e,n.push(s(t))}),"default"==t.quality||"proof"==t.quality){var u=e.collection();if(t.tile){var f=new Map,p=0,m={nodeIndexes:f,xCoords:[],yCoords:[]},y=[];if(h.forEach(function(t,e){0==t.edges().length&&(t.nodes().forEach(function(e,i){u.merge(t.nodes()[i]),e.isParent()||(m.nodeIndexes.set(t.nodes()[i].id(),p++),m.xCoords.push(t.nodes()[0].position().x),m.yCoords.push(t.nodes()[0].position().y))}),y.push(e))}),u.length>1){var v=u.boundingBox();l.push({x:v.x1+v.w/2,y:v.y1+v.h/2}),h.push(u),n.push(m);for(var E=y.length-1;E>=0;E--)h.splice(y[E],1),n.splice(y[E],1),l.splice(y[E],1)}}h.forEach(function(e,i){t.eles=e,r.push(a(t,n[i])),o.relocateComponent(l[i],r[i],t)})}else h.forEach(function(e,i){o.relocateComponent(l[i],n[i],t)});var N=new Set;if(h.length>1){var T=[],A=i.filter(function(t){return"none"==t.css("display")});h.forEach(function(e,i){var s=void 0;if("draft"==t.quality&&(s=n[i].nodeIndexes),e.nodes().not(A).length>0){var a={edges:[],nodes:[]},h=void 0;e.nodes().not(A).forEach(function(e){if("draft"==t.quality)if(e.isParent()){var l=o.calcBoundingBox(e,n[i].xCoords,n[i].yCoords,s);a.nodes.push({x:l.topLeftX,y:l.topLeftY,width:l.width,height:l.height})}else h=s.get(e.id()),a.nodes.push({x:n[i].xCoords[h]-e.boundingbox().w/2,y:n[i].yCoords[h]-e.boundingbox().h/2,width:e.boundingbox().w,height:e.boundingbox().h});else r[i][e.id()]&&a.nodes.push({x:r[i][e.id()].getLeft(),y:r[i][e.id()].getTop(),width:r[i][e.id()].getWidth(),height:r[i][e.id()].getHeight()})}),e.edges().forEach(function(e){var h=e.source(),l=e.target();if("none"!=h.css("display")&&"none"!=l.css("display"))if("draft"==t.quality){var d=s.get(h.id()),c=s.get(l.id()),g=[],u=[];if(h.isParent()){var f=o.calcBoundingBox(h,n[i].xCoords,n[i].yCoords,s);g.push(f.topLeftX+f.width/2),g.push(f.topLeftY+f.height/2)}else g.push(n[i].xCoords[d]),g.push(n[i].yCoords[d]);if(l.isParent()){var p=o.calcBoundingBox(l,n[i].xCoords,n[i].yCoords,s);u.push(p.topLeftX+p.width/2),u.push(p.topLeftY+p.height/2)}else u.push(n[i].xCoords[c]),u.push(n[i].yCoords[c]);a.edges.push({startX:g[0],startY:g[1],endX:u[0],endY:u[1]})}else r[i][h.id()]&&r[i][l.id()]&&a.edges.push({startX:r[i][h.id()].getCenterX(),startY:r[i][h.id()].getCenterY(),endX:r[i][l.id()].getCenterX(),endY:r[i][l.id()].getCenterY()})}),a.nodes.length>0&&(T.push(a),N.add(i))}});var w=d.packComponents(T,t.randomize).shifts;if("draft"==t.quality)n.forEach(function(t,e){var i=t.xCoords.map(function(t){return t+w[e].dx}),n=t.yCoords.map(function(t){return t+w[e].dy});t.xCoords=i,t.yCoords=n});else{var I=0;N.forEach(function(t){Object.keys(r[t]).forEach(function(e){var i=r[t][e];i.setCenter(i.getCenterX()+w[I].dx,i.getCenterY()+w[I].dy)}),I++})}}}else{var C=t.eles.boundingBox();if(l.push({x:C.x1+C.w/2,y:C.y1+C.h/2}),t.randomize){var L=s(t);n.push(L)}"default"==t.quality||"proof"==t.quality?(r.push(a(t,n[0])),o.relocateComponent(l[0],r[0],t)):o.relocateComponent(l[0],n[0],t)}var M=function(e,i){if("default"==t.quality||"proof"==t.quality){"number"==typeof e&&(e=i);var o=void 0,s=void 0,a=e.data("id");return r.forEach(function(t){a in t&&(o={x:t[a].getRect().getCenterX(),y:t[a].getRect().getCenterY()},s=t[a])}),t.nodeDimensionsIncludeLabels&&(s.labelWidth&&("left"==s.labelPosHorizontal?o.x+=s.labelWidth/2:"right"==s.labelPosHorizontal&&(o.x-=s.labelWidth/2)),s.labelHeight&&("top"==s.labelPosVertical?o.y+=s.labelHeight/2:"bottom"==s.labelPosVertical&&(o.y-=s.labelHeight/2))),null==o&&(o={x:e.position("x"),y:e.position("y")}),{x:o.x,y:o.y}}var h=void 0;return n.forEach(function(t){var i=t.nodeIndexes.get(e.id());null!=i&&(h={x:t.xCoords[i],y:t.yCoords[i]})}),null==h&&(h={x:e.position("x"),y:e.position("y")}),{x:h.x,y:h.y}};if("default"==t.quality||"proof"==t.quality||t.randomize){var _=o.calcParentsWithoutChildren(e,i),x=i.filter(function(t){return"none"==t.css("display")});t.eles=i.not(x),i.nodes().not(":parent").not(x).layoutPositions(this,t,M),_.length>0&&_.forEach(function(t){t.position(M(t))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),t}();t.exports=l},657:(t,e,i)=>{var n=i(548),r=i(140).layoutBase.Matrix,o=i(140).layoutBase.SVD;t.exports={spectralLayout:function(t){var e=t.cy,i=t.eles,s=i.nodes(),a=i.nodes(":parent"),h=new Map,l=new Map,d=new Map,c=[],g=[],u=[],f=[],p=[],m=[],y=[],v=[],E=void 0,N=1e8,T=1e-9,A=t.piTol,w=t.samplingType,I=t.nodeSeparation,C=void 0,L=function(t,e,i){for(var n=[],r=0,o=0,s=0,a=void 0,h=[],d=0,g=1,u=0;u=r;){s=n[r++];for(var f=c[s],y=0;yd&&(d=p[T],g=T)}return g};n.connectComponents(e,i,n.getTopMostNodes(s),h),a.forEach(function(t){n.connectComponents(e,i,n.getTopMostNodes(t.descendants().intersection(i)),h)});for(var M=0,_=0;_0&&(n.isParent()?c[e].push(d.get(n.id())):c[e].push(n.id()))})});var S=function(t){var i=l.get(t),n=void 0;h.get(t).forEach(function(r){n=e.getElementById(r).isParent()?d.get(r):r,c[i].push(n),c[l.get(n)].push(t)})},P=!0,U=!1,Y=void 0;try{for(var k,H=h.keys()[Symbol.iterator]();!(P=(k=H.next()).done);P=!0)S(k.value)}catch(K){U=!0,Y=K}finally{try{!P&&H.return&&H.return()}finally{if(U)throw Y}}var X=void 0;if((E=l.size)>2){C=E=1)break;l=h}for(var f=0;f=1)break;l=h}for(var y=0;y{var n=i(212),r=function(t){t&&t("layout","fcose",n)};"undefined"!=typeof cytoscape&&r(cytoscape),t.exports=r},140:e=>{e.exports=t}},i={},n=function t(n){var r=i[n];if(void 0!==r)return r.exports;var o=i[n]={exports:{}};return e[n](o,o.exports,t),o.exports}(579);return n})()},t.exports=n(i(41709))},41709(t,e,i){var n;n=function(t){return(()=>{"use strict";var e={45:(t,e,i)=>{var n={};n.layoutBase=i(551),n.CoSEConstants=i(806),n.CoSEEdge=i(767),n.CoSEGraph=i(880),n.CoSEGraphManager=i(578),n.CoSELayout=i(765),n.CoSENode=i(991),n.ConstraintHandler=i(902),t.exports=n},806:(t,e,i)=>{var n=i(551).FDLayoutConstants;function r(){}for(var o in n)r[o]=n[o];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=n.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0,r.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,r.TREE_REDUCTION_ON_INCREMENTAL=!0,r.PURE_INCREMENTAL=r.DEFAULT_INCREMENTAL,t.exports=r},767:(t,e,i)=>{var n=i(551).FDLayoutEdge;function r(t,e,i){n.call(this,t,e,i)}for(var o in r.prototype=Object.create(n.prototype),n)r[o]=n[o];t.exports=r},880:(t,e,i)=>{var n=i(551).LGraph;function r(t,e,i){n.call(this,t,e,i)}for(var o in r.prototype=Object.create(n.prototype),n)r[o]=n[o];t.exports=r},578:(t,e,i)=>{var n=i(551).LGraphManager;function r(t){n.call(this,t)}for(var o in r.prototype=Object.create(n.prototype),n)r[o]=n[o];t.exports=r},765:(t,e,i)=>{var n=i(551).FDLayout,r=i(578),o=i(880),s=i(991),a=i(767),h=i(806),l=i(902),d=i(551).FDLayoutConstants,c=i(551).LayoutConstants,g=i(551).Point,u=i(551).PointD,f=i(551).DimensionD,p=i(551).Layout,m=i(551).Integer,y=i(551).IGeometry,v=i(551).LGraph,E=i(551).Transform,N=i(551).LinkedList;function T(){n.call(this),this.toBeTiled={},this.constraints={}}for(var A in T.prototype=Object.create(n.prototype),n)T[A]=n[A];T.prototype.newGraphManager=function(){var t=new r(this);return this.graphManager=t,t},T.prototype.newGraph=function(t){return new o(null,this.graphManager,t)},T.prototype.newNode=function(t){return new s(this.graphManager,t)},T.prototype.newEdge=function(t){return new a(null,null,t)},T.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.isSubLayout||(h.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=h.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},T.prototype.initSpringEmbedder=function(){n.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},T.prototype.layout=function(){return c.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},T.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental)h.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),i=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(i));else{var t=this.getFlatForest();if(t.length>0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),i=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(i),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(l.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),h.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},T.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),h.PURE_INCREMENTAL?this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),h.PURE_INCREMENTAL?this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var i=!this.isTreeGrowing&&!this.isGrowthFinished,n=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(i,n),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},T.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},i=0;i0&&this.updateDisplacements(),e=0;e0&&(n.fixedNodeWeight=o)}if(this.constraints.relativePlacementConstraint){var s=new Map,a=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(e){t.fixedNodesOnHorizontal.add(e),t.fixedNodesOnVertical.add(e)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var l=this.constraints.alignmentConstraint.vertical;for(i=0;i=2*t.length/3;n--)e=Math.floor(Math.random()*(n+1)),i=t[n],t[n]=t[e],t[e]=i;return t},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(e){if(e.left){var i=s.has(e.left)?s.get(e.left):e.left,n=s.has(e.right)?s.get(e.right):e.right;t.nodesInRelativeHorizontal.includes(i)||(t.nodesInRelativeHorizontal.push(i),t.nodeToRelativeConstraintMapHorizontal.set(i,[]),t.dummyToNodeForVerticalAlignment.has(i)?t.nodeToTempPositionMapHorizontal.set(i,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(i)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(i,t.idToNodeMap.get(i).getCenterX())),t.nodesInRelativeHorizontal.includes(n)||(t.nodesInRelativeHorizontal.push(n),t.nodeToRelativeConstraintMapHorizontal.set(n,[]),t.dummyToNodeForVerticalAlignment.has(n)?t.nodeToTempPositionMapHorizontal.set(n,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(n)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(n,t.idToNodeMap.get(n).getCenterX())),t.nodeToRelativeConstraintMapHorizontal.get(i).push({right:n,gap:e.gap}),t.nodeToRelativeConstraintMapHorizontal.get(n).push({left:i,gap:e.gap})}else{var r=a.has(e.top)?a.get(e.top):e.top,o=a.has(e.bottom)?a.get(e.bottom):e.bottom;t.nodesInRelativeVertical.includes(r)||(t.nodesInRelativeVertical.push(r),t.nodeToRelativeConstraintMapVertical.set(r,[]),t.dummyToNodeForHorizontalAlignment.has(r)?t.nodeToTempPositionMapVertical.set(r,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(r)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(r,t.idToNodeMap.get(r).getCenterY())),t.nodesInRelativeVertical.includes(o)||(t.nodesInRelativeVertical.push(o),t.nodeToRelativeConstraintMapVertical.set(o,[]),t.dummyToNodeForHorizontalAlignment.has(o)?t.nodeToTempPositionMapVertical.set(o,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(o)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(o,t.idToNodeMap.get(o).getCenterY())),t.nodeToRelativeConstraintMapVertical.get(r).push({bottom:o,gap:e.gap}),t.nodeToRelativeConstraintMapVertical.get(o).push({top:r,gap:e.gap})}});else{var c=new Map,g=new Map;this.constraints.relativePlacementConstraint.forEach(function(t){if(t.left){var e=s.has(t.left)?s.get(t.left):t.left,i=s.has(t.right)?s.get(t.right):t.right;c.has(e)?c.get(e).push(i):c.set(e,[i]),c.has(i)?c.get(i).push(e):c.set(i,[e])}else{var n=a.has(t.top)?a.get(t.top):t.top,r=a.has(t.bottom)?a.get(t.bottom):t.bottom;g.has(n)?g.get(n).push(r):g.set(n,[r]),g.has(r)?g.get(r).push(n):g.set(r,[n])}});var u=function(t,e){var i=[],n=[],r=new N,o=new Set,s=0;return t.forEach(function(a,h){if(!o.has(h)){i[s]=[],n[s]=!1;var l=h;for(r.push(l),o.add(l),i[s].push(l);0!=r.length;)l=r.shift(),e.has(l)&&(n[s]=!0),t.get(l).forEach(function(t){o.has(t)||(r.push(t),o.add(t),i[s].push(t))});s++}}),{components:i,isFixed:n}},f=u(c,t.fixedNodesOnHorizontal);this.componentsOnHorizontal=f.components,this.fixedComponentsOnHorizontal=f.isFixed;var p=u(g,t.fixedNodesOnVertical);this.componentsOnVertical=p.components,this.fixedComponentsOnVertical=p.isFixed}}},T.prototype.updateDisplacements=function(){var t=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(e){var i=t.idToNodeMap.get(e.nodeId);i.displacementX=0,i.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var e=this.constraints.alignmentConstraint.vertical,i=0;i1)for(a=0;an&&(n=Math.floor(s.y)),o=Math.floor(s.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new u(c.WORLD_CENTER_X-s.x/2,c.WORLD_CENTER_Y-s.y/2))},T.radialLayout=function(t,e,i){var n=Math.max(this.maxDiagonalInTree(t),h.DEFAULT_RADIAL_SEPARATION);T.branchRadialLayout(e,null,0,359,0,n);var r=v.calculateBounds(t),o=new E;o.setDeviceOrgX(r.getMinX()),o.setDeviceOrgY(r.getMinY()),o.setWorldOrgX(i.x),o.setWorldOrgY(i.y);for(var s=0;s1;){var m=p[0];p.splice(0,1);var v=d.indexOf(m);v>=0&&d.splice(v,1),f--,c--}g=null!=e?(d.indexOf(p[0])+1)%f:0;for(var E=Math.abs(n-i)/c,N=g;u!=c;N=++N%f){var A=d[N].getOtherEnd(t);if(A!=e){var w=(i+u*E)%360,I=(w+E)%360;T.branchRadialLayout(A,t,w,I,r+o,o),u++}}},T.maxDiagonalInTree=function(t){for(var e=m.MIN_VALUE,i=0;ie&&(e=n)}return e},T.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},T.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var i=[],n=this.graphManager.getAllNodes(),r=0;r1){var n="DummyCompound_"+i;t.memberGroups[n]=e[i];var r=e[i][0].getParent(),o=new s(t.graphManager);o.id=n,o.paddingLeft=r.paddingLeft||0,o.paddingRight=r.paddingRight||0,o.paddingBottom=r.paddingBottom||0,o.paddingTop=r.paddingTop||0,t.idToDummyNode[n]=o;var a=t.getGraphManager().add(t.newGraph(),o),h=r.getChild();h.add(o);for(var l=0;lr?(n.rect.x-=(n.labelWidth-r)/2,n.setWidth(n.labelWidth),n.labelMarginLeft=(n.labelWidth-r)/2):"right"==n.labelPosHorizontal&&n.setWidth(r+n.labelWidth)),n.labelHeight&&("top"==n.labelPosVertical?(n.rect.y-=n.labelHeight,n.setHeight(o+n.labelHeight),n.labelMarginTop=n.labelHeight):"center"==n.labelPosVertical&&n.labelHeight>o?(n.rect.y-=(n.labelHeight-o)/2,n.setHeight(n.labelHeight),n.labelMarginTop=(n.labelHeight-o)/2):"bottom"==n.labelPosVertical&&n.setHeight(o+n.labelHeight))}})},T.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;t>=0;t--){var e=this.compoundOrder[t],i=e.id,n=e.paddingLeft,r=e.paddingTop,o=e.labelMarginLeft,s=e.labelMarginTop;this.adjustLocations(this.tiledMemberPack[i],e.rect.x,e.rect.y,n,r,o,s)}},T.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach(function(i){var n=t.idToDummyNode[i],r=n.paddingLeft,o=n.paddingTop,s=n.labelMarginLeft,a=n.labelMarginTop;t.adjustLocations(e[i],n.rect.x,n.rect.y,r,o,s,a)})},T.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var i=t.getChild();if(null==i)return this.toBeTiled[e]=!1,!1;for(var n=i.getNodes(),r=0;r0)return this.toBeTiled[e]=!1,!1;if(null!=o.getChild()){if(!this.getToBeTiled(o))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[o.id]=!1}return this.toBeTiled[e]=!0,!0},T.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),i=0,n=0;nd&&(d=g.rect.height)}i+=d+t.verticalPadding}},T.prototype.tileCompoundMembers=function(t,e){var i=this;this.tiledMemberPack=[],Object.keys(t).forEach(function(n){var r=e[n];if(i.tiledMemberPack[n]=i.tileNodes(t[n],r.paddingLeft+r.paddingRight),r.rect.width=i.tiledMemberPack[n].width,r.rect.height=i.tiledMemberPack[n].height,r.setCenter(i.tiledMemberPack[n].centerX,i.tiledMemberPack[n].centerY),r.labelMarginLeft=0,r.labelMarginTop=0,h.NODE_DIMENSIONS_INCLUDE_LABELS){var o=r.rect.width,s=r.rect.height;r.labelWidth&&("left"==r.labelPosHorizontal?(r.rect.x-=r.labelWidth,r.setWidth(o+r.labelWidth),r.labelMarginLeft=r.labelWidth):"center"==r.labelPosHorizontal&&r.labelWidth>o?(r.rect.x-=(r.labelWidth-o)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-o)/2):"right"==r.labelPosHorizontal&&r.setWidth(o+r.labelWidth)),r.labelHeight&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(s+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>s?(r.rect.y-=(r.labelHeight-s)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-s)/2):"bottom"==r.labelPosVertical&&r.setHeight(s+r.labelHeight))}})},T.prototype.tileNodes=function(t,e){var i=this.tileNodesByFavoringDim(t,e,!0),n=this.tileNodesByFavoringDim(t,e,!1),r=this.getOrgRatio(i);return this.getOrgRatio(n)a&&(a=t.getWidth())});var l,d=o/r,c=s/r,g=Math.pow(i-n,2)+4*(d+n)*(c+i)*r,u=(n-i+Math.sqrt(g))/(2*(d+n));e?(l=Math.ceil(u))==u&&l++:l=Math.floor(u);var f=l*(d+n)-n;return a>f&&(f=a),f+=2*n},T.prototype.tileNodesByFavoringDim=function(t,e,i){var n=h.TILING_PADDING_VERTICAL,r=h.TILING_PADDING_HORIZONTAL,o=h.TILING_COMPARE_BY,s={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:n,horizontalPadding:r,centerX:0,centerY:0};o&&(s.idealRowWidth=this.calcIdealRowWidth(t,i));var a=function(t){return t.rect.width*t.rect.height},l=function(t,e){return a(e)-a(t)};t.sort(function(t,e){var i=l;return s.idealRowWidth?(i=o)(t.id,e.id):i(t,e)});for(var d=0,c=0,g=0;g0&&(o+=t.horizontalPadding),t.rowWidth[i]=o,t.width0&&(s+=t.verticalPadding);var a=0;s>t.rowHeight[i]&&(a=t.rowHeight[i],t.rowHeight[i]=s,a=t.rowHeight[i]-a),t.height+=a,t.rows[i].push(e)},T.prototype.getShortestRowIndex=function(t){for(var e=-1,i=Number.MAX_VALUE,n=0;ni&&(e=n,i=t.rowWidth[n]);return e},T.prototype.canAddHorizontal=function(t,e,i){if(t.idealRowWidth){var n=t.rows.length-1;return t.rowWidth[n]+e+t.horizontalPadding<=t.idealRowWidth}var r=this.getShortestRowIndex(t);if(r<0)return!0;var o=t.rowWidth[r];if(o+t.horizontalPadding+e<=t.width)return!0;var s,a,h=0;return t.rowHeight[r]0&&(h=i+t.verticalPadding-t.rowHeight[r]),s=t.width-o>=e+t.horizontalPadding?(t.height+h)/(o+e+t.horizontalPadding):(t.height+h)/t.width,h=i+t.verticalPadding,(a=t.widtho&&e!=i){n.splice(-1,1),t.rows[i].push(r),t.rowWidth[e]=t.rowWidth[e]-o,t.rowWidth[i]=t.rowWidth[i]+o,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=Number.MIN_VALUE,a=0;as&&(s=n[a].height);e>0&&(s+=t.verticalPadding);var h=t.rowHeight[e]+t.rowHeight[i];t.rowHeight[e]=s,t.rowHeight[i]0)for(var c=r;c<=o;c++)l[0]+=this.grid[c][s-1].length+this.grid[c][s].length-1;if(o0)for(c=s;c<=a;c++)l[3]+=this.grid[r-1][c].length+this.grid[r][c].length-1;for(var g,u,f=m.MAX_VALUE,p=0;p{var n=i(551).FDLayoutNode,r=i(551).IMath;function o(t,e,i,r){n.call(this,t,e,i,r)}for(var s in o.prototype=Object.create(n.prototype),n)o[s]=n[s];o.prototype.calculateDisplacement=function(){var t=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*r.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*r.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},o.prototype.propogateDisplacementToChildren=function(t,e){for(var i,n=this.getChild().getNodes(),r=0;r{function n(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e0){var o=0;n.forEach(function(t){"horizontal"==e?(c.set(t,h.has(t)?l[h.get(t)]:r.get(t)),o+=c.get(t)):(c.set(t,h.has(t)?d[h.get(t)]:r.get(t)),o+=c.get(t))}),o/=n.length,t.forEach(function(t){i.has(t)||c.set(t,o)})}else{var s=0;t.forEach(function(t){s+="horizontal"==e?h.has(t)?l[h.get(t)]:r.get(t):h.has(t)?d[h.get(t)]:r.get(t)}),s/=t.length,t.forEach(function(t){c.set(t,s)})}});for(var f=function(){var n=u.shift();t.get(n).forEach(function(t){if(c.get(t.id)s&&(s=v),Ea&&(a=E)}}catch(M){u=!0,f=M}finally{try{!g&&m.return&&m.return()}finally{if(u)throw f}}var N=(n+s)/2-(o+a)/2,T=!0,A=!1,w=void 0;try{for(var I,C=t[Symbol.iterator]();!(T=(I=C.next()).done);T=!0){var L=I.value;c.set(L,c.get(L)+N)}}catch(M){A=!0,w=M}finally{try{!T&&C.return&&C.return()}finally{if(A)throw w}}})}return c},y=function(t){var e=0,i=0,n=0,r=0;if(t.forEach(function(t){t.left?l[h.get(t.left)]-l[h.get(t.right)]>=0?e++:i++:d[h.get(t.top)]-d[h.get(t.bottom)]>=0?n++:r++}),e>i&&n>r)for(var o=0;oi)for(var s=0;sr)for(var a=0;a1)e.fixedNodeConstraint.forEach(function(t,e){T[e]=[t.position.x,t.position.y],A[e]=[l[h.get(t.nodeId)],d[h.get(t.nodeId)]]}),w=!0;else if(e.alignmentConstraint)!function(){var t=0;if(e.alignmentConstraint.vertical){for(var i=e.alignmentConstraint.vertical,r=function(e){var r=new Set;i[e].forEach(function(t){r.add(t)});var o=new Set([].concat(n(r)).filter(function(t){return C.has(t)})),s=void 0;s=o.size>0?l[h.get(o.values().next().value)]:p(r).x,i[e].forEach(function(e){T[t]=[s,d[h.get(e)]],A[t]=[l[h.get(e)],d[h.get(e)]],t++})},o=0;o0?l[h.get(r.values().next().value)]:p(i).y,s[e].forEach(function(e){T[t]=[l[h.get(e)],o],A[t]=[l[h.get(e)],d[h.get(e)]],t++})},c=0;cx&&(x=_[D].length,O=D);if(x0){var $={x:0,y:0};e.fixedNodeConstraint.forEach(function(t,e){var i,n,r={x:l[h.get(t.nodeId)],y:d[h.get(t.nodeId)]},o=t.position,s=(n=r,{x:(i=o).x-n.x,y:i.y-n.y});$.x+=s.x,$.y+=s.y}),$.x/=e.fixedNodeConstraint.length,$.y/=e.fixedNodeConstraint.length,l.forEach(function(t,e){l[e]+=$.x}),d.forEach(function(t,e){d[e]+=$.y}),e.fixedNodeConstraint.forEach(function(t){l[h.get(t.nodeId)]=t.position.x,d[h.get(t.nodeId)]=t.position.y})}if(e.alignmentConstraint){if(e.alignmentConstraint.vertical)for(var j=e.alignmentConstraint.vertical,q=function(t){var e=new Set;j[t].forEach(function(t){e.add(t)});var i=new Set([].concat(n(e)).filter(function(t){return C.has(t)})),r=void 0;r=i.size>0?l[h.get(i.values().next().value)]:p(e).x,e.forEach(function(t){C.has(t)||(l[h.get(t)]=r)})},K=0;K0?d[h.get(i.values().next().value)]:p(e).y,e.forEach(function(t){C.has(t)||(d[h.get(t)]=r)})},J=0;J{e.exports=t}},i={},n=function t(n){var r=i[n];if(void 0!==r)return r.exports;var o=i[n]={exports:{}};return e[n](o,o.exports,t),o.exports}(45);return n})()},t.exports=n(i(1917))},1917(t){var e;e=function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=28)}([function(t,e,i){"use strict";function n(){}n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n},function(t,e,i){"use strict";var n=i(2),r=i(8),o=i(9);function s(t,e,i){n.call(this,i),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=i,this.bendpoints=[],this.source=t,this.target=e}for(var a in s.prototype=Object.create(n.prototype),n)s[a]=n[a];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(t,e){for(var i=this.getOtherEnd(t),n=e.getGraphManager().getRoot();;){if(i.getOwner()==e)return i;if(i.getOwner()==n)break;i=i.getOwner().getParent()}return null},s.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=r.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,i){"use strict";t.exports=function(t){this.vGraphObject=t}},function(t,e,i){"use strict";var n=i(2),r=i(10),o=i(13),s=i(0),a=i(16),h=i(5);function l(t,e,i,s){null==i&&null==s&&(s=e),n.call(this,s),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=r.MIN_VALUE,this.inclusionTreeDepth=r.MAX_VALUE,this.vGraphObject=s,this.edges=[],this.graphManager=t,this.rect=null!=i&&null!=e?new o(e.x,e.y,i.width,i.height):new o}for(var d in l.prototype=Object.create(n.prototype),n)l[d]=n[d];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(t){this.rect.width=t},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(t){this.rect.height=t},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new h(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new h(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.prototype.setRect=function(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},l.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},l.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},l.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},l.prototype.getEdgeListToNode=function(t){var e=[],i=this;return i.edges.forEach(function(n){if(n.target==t){if(n.source!=i)throw"Incorrect edge source!";e.push(n)}}),e},l.prototype.getEdgesBetween=function(t){var e=[],i=this;return i.edges.forEach(function(n){if(n.source!=i&&n.target!=i)throw"Incorrect edge source and/or target";n.target!=t&&n.source!=t||e.push(n)}),e},l.prototype.getNeighborsList=function(){var t=new Set,e=this;return e.edges.forEach(function(i){if(i.source==e)t.add(i.target);else{if(i.target!=e)throw"Incorrect incidency!";t.add(i.source)}}),t},l.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),i=0;ie?(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)):"right"==this.labelPosHorizontal&&this.setWidth(e+this.labelWidth)),this.labelHeight&&("top"==this.labelPosVertical?(this.rect.y-=this.labelHeight,this.setHeight(i+this.labelHeight)):"center"==this.labelPosVertical&&this.labelHeight>i?(this.rect.y-=(this.labelHeight-i)/2,this.setHeight(this.labelHeight)):"bottom"==this.labelPosVertical&&this.setHeight(i+this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==r.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},l.prototype.transform=function(t){var e=this.rect.x;e>s.WORLD_BOUNDARY?e=s.WORLD_BOUNDARY:e<-s.WORLD_BOUNDARY&&(e=-s.WORLD_BOUNDARY);var i=this.rect.y;i>s.WORLD_BOUNDARY?i=s.WORLD_BOUNDARY:i<-s.WORLD_BOUNDARY&&(i=-s.WORLD_BOUNDARY);var n=new h(e,i),r=t.inverseTransformPoint(n);this.setLocation(r.x,r.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=l},function(t,e,i){"use strict";var n=i(0);function r(){}for(var o in n)r[o]=n[o];r.MAX_ITERATIONS=2500,r.DEFAULT_EDGE_LENGTH=50,r.DEFAULT_SPRING_STRENGTH=.45,r.DEFAULT_REPULSION_STRENGTH=4500,r.DEFAULT_GRAVITY_STRENGTH=.4,r.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,r.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,r.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,r.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,r.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,r.COOLING_ADAPTATION_FACTOR=.33,r.ADAPTATION_LOWER_NODE_LIMIT=1e3,r.ADAPTATION_UPPER_NODE_LIMIT=5e3,r.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,r.MAX_NODE_DISPLACEMENT=3*r.MAX_NODE_DISPLACEMENT_INCREMENTAL,r.MIN_REPULSION_DIST=r.DEFAULT_EDGE_LENGTH/10,r.CONVERGENCE_CHECK_PERIOD=100,r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,r.MIN_EDGE_LENGTH=1,r.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=r},function(t,e,i){"use strict";function n(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(t){this.x=t},n.prototype.setY=function(t){this.y=t},n.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=n},function(t,e,i){"use strict";var n=i(2),r=i(10),o=i(0),s=i(7),a=i(3),h=i(1),l=i(13),d=i(12),c=i(11);function g(t,e,i){n.call(this,i),this.estimatedSize=r.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(var u in g.prototype=Object.create(n.prototype),n)g[u]=n[u];g.prototype.getNodes=function(){return this.nodes},g.prototype.getEdges=function(){return this.edges},g.prototype.getGraphManager=function(){return this.graphManager},g.prototype.getParent=function(){return this.parent},g.prototype.getLeft=function(){return this.left},g.prototype.getRight=function(){return this.right},g.prototype.getTop=function(){return this.top},g.prototype.getBottom=function(){return this.bottom},g.prototype.isConnected=function(){return this.isConnected},g.prototype.add=function(t,e,i){if(null==e&&null==i){var n=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(n)>-1)throw"Node already in graph!";return n.owner=this,this.getNodes().push(n),n}var r=t;if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(i)>-1))throw"Source or target not in graph!";if(e.owner!=i.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=i.owner?null:(r.source=e,r.target=i,r.isInterGraph=!1,this.getEdges().push(r),e.edges.push(r),i!=e&&i.edges.push(r),r)},g.prototype.remove=function(t){var e=t;if(t instanceof a){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var i=e.edges.slice(),n=i.length,r=0;r-1&&d>-1))throw"Source and/or target doesn't know this edge!";if(o.source.edges.splice(l,1),o.target!=o.source&&o.target.edges.splice(d,1),-1==(s=o.source.owner.getEdges().indexOf(o)))throw"Not in owner's edge list!";o.source.owner.getEdges().splice(s,1)}},g.prototype.updateLeftTop=function(){for(var t,e,i,n=r.MAX_VALUE,o=r.MAX_VALUE,s=this.getNodes(),a=s.length,h=0;h(t=l.getTop())&&(n=t),o>(e=l.getLeft())&&(o=e)}return n==r.MAX_VALUE?null:(i=null!=s[0].getParent().paddingLeft?s[0].getParent().paddingLeft:this.margin,this.left=o-i,this.top=n-i,new d(this.left,this.top))},g.prototype.updateBounds=function(t){for(var e,i,n,o,s,a=r.MAX_VALUE,h=-r.MAX_VALUE,d=r.MAX_VALUE,c=-r.MAX_VALUE,g=this.nodes,u=g.length,f=0;f(e=p.getLeft())&&(a=e),h<(i=p.getRight())&&(h=i),d>(n=p.getTop())&&(d=n),c<(o=p.getBottom())&&(c=o)}var m=new l(a,d,h-a,c-d);a==r.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),s=null!=g[0].getParent().paddingLeft?g[0].getParent().paddingLeft:this.margin,this.left=m.x-s,this.right=m.x+m.width+s,this.top=m.y-s,this.bottom=m.y+m.height+s},g.calculateBounds=function(t){for(var e,i,n,o,s=r.MAX_VALUE,a=-r.MAX_VALUE,h=r.MAX_VALUE,d=-r.MAX_VALUE,c=t.length,g=0;g(e=u.getLeft())&&(s=e),a<(i=u.getRight())&&(a=i),h>(n=u.getTop())&&(h=n),d<(o=u.getBottom())&&(d=o)}return new l(s,h,a-s,d-h)},g.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},g.prototype.getEstimatedSize=function(){if(this.estimatedSize==r.MIN_VALUE)throw"assert failed";return this.estimatedSize},g.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,i=e.length,n=0;n=this.nodes.length){var h=0;r.forEach(function(e){e.owner==t&&h++}),h==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},t.exports=g},function(t,e,i){"use strict";var n,r=i(1);function o(t){n=i(6),this.layout=t,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),i=this.add(t,e);return this.setRootGraph(i),this.rootGraph},o.prototype.add=function(t,e,i,n,r){if(null==i&&null==n&&null==r){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return t.parent=e,e.child=t,t}r=i,i=t;var o=(n=e).getOwner(),s=r.getOwner();if(null==o||o.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==s||s.getGraphManager()!=this)throw"Target not in this graph mgr!";if(o==s)return i.isInterGraph=!1,o.add(i,n,r);if(i.isInterGraph=!0,i.source=n,i.target=r,this.edges.indexOf(i)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(i),null==i.source||null==i.target)throw"Edge source and/or target is null!";if(-1!=i.source.edges.indexOf(i)||-1!=i.target.edges.indexOf(i))throw"Edge already in source and/or target incidency list!";return i.source.edges.push(i),i.target.edges.push(i),i},o.prototype.remove=function(t){if(t instanceof n){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var i,o=[],s=(o=o.concat(e.getEdges())).length,a=0;a=e.getRight()?i[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(i[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(i[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var o=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(o=1);var s=o*i[0],a=i[1]/o;i[0]s)return i[0]=n,i[1]=h,i[2]=o,i[3]=E,!1;if(ro)return i[0]=a,i[1]=r,i[2]=y,i[3]=s,!1;if(no?(i[0]=d,i[1]=c,w=!0):(i[0]=l,i[1]=h,w=!0):C===M&&(n>o?(i[0]=a,i[1]=h,w=!0):(i[0]=g,i[1]=c,w=!0)),-L===M?o>n?(i[2]=v,i[3]=E,I=!0):(i[2]=y,i[3]=m,I=!0):L===M&&(o>n?(i[2]=p,i[3]=m,I=!0):(i[2]=N,i[3]=E,I=!0)),w&&I)return!1;if(n>o?r>s?(_=this.getCardinalDirection(C,M,4),x=this.getCardinalDirection(L,M,2)):(_=this.getCardinalDirection(-C,M,3),x=this.getCardinalDirection(-L,M,1)):r>s?(_=this.getCardinalDirection(-C,M,1),x=this.getCardinalDirection(-L,M,3)):(_=this.getCardinalDirection(C,M,2),x=this.getCardinalDirection(L,M,4)),!w)switch(_){case 1:D=h,O=n+-f/M,i[0]=O,i[1]=D;break;case 2:O=g,D=r+u*M,i[0]=O,i[1]=D;break;case 3:D=c,O=n+f/M,i[0]=O,i[1]=D;break;case 4:O=d,D=r+-u*M,i[0]=O,i[1]=D}if(!I)switch(x){case 1:b=m,R=o+-A/M,i[2]=R,i[3]=b;break;case 2:R=N,b=s+T*M,i[2]=R,i[3]=b;break;case 3:b=E,R=o+A/M,i[2]=R,i[3]=b;break;case 4:R=v,b=s+-T*M,i[2]=R,i[3]=b}}return!1},r.getCardinalDirection=function(t,e,i){return t>e?i:1+i%4},r.getIntersection=function(t,e,i,r){if(null==r)return this.getIntersection2(t,e,i);var o,s,a,h,l,d,c,g=t.x,u=t.y,f=e.x,p=e.y,m=i.x,y=i.y,v=r.x,E=r.y;return 0===(c=(o=p-u)*(h=m-v)-(s=E-y)*(a=g-f))?null:new n((a*(d=v*y-m*E)-h*(l=f*u-g*p))/c,(s*l-o*d)/c)},r.angleOfVector=function(t,e,i,n){var r=void 0;return t!==i?(r=Math.atan((n-e)/(i-t)),i=0){var d=(-h+Math.sqrt(h*h-4*a*l))/(2*a),c=(-h-Math.sqrt(h*h-4*a*l))/(2*a);return d>=0&&d<=1?[d]:c>=0&&c<=1?[c]:null}return null},r.HALF_PI=.5*Math.PI,r.ONE_AND_HALF_PI=1.5*Math.PI,r.TWO_PI=2*Math.PI,r.THREE_PI=3*Math.PI,t.exports=r},function(t,e,i){"use strict";function n(){}n.sign=function(t){return t>0?1:t<0?-1:0},n.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},n.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=n},function(t,e,i){"use strict";function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n},function(t,e,i){"use strict";var n=function(){function t(t,e){for(var i=0;i0&&e;){for(a.push(l[0]);a.length>0&&e;){var d=a[0];a.splice(0,1),s.add(d);var c=d.getEdges();for(o=0;o-1&&l.splice(p,1)}s=new Set,h=new Map}else t=[]}return t},g.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],i=t.source,n=this.graphManager.calcLowestCommonAncestor(t.source,t.target),r=0;r0){for(var r=this.edgeToDummyNodes.get(i),o=0;o=0&&e.splice(c,1),d.getNeighborsList().forEach(function(t){if(i.indexOf(t)<0){var e=n.get(t)-1;1==e&&h.push(t),n.set(t,e)}})}i=i.concat(h),1!=e.length&&2!=e.length||(r=!0,o=e[0])}return o},g.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=g},function(t,e,i){"use strict";function n(){}n.seed=1,n.x=0,n.nextDouble=function(){return n.x=1e4*Math.sin(n.seed++),n.x-Math.floor(n.x)},t.exports=n},function(t,e,i){"use strict";var n=i(5);function r(t,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}r.prototype.getWorldOrgX=function(){return this.lworldOrgX},r.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},r.prototype.getWorldOrgY=function(){return this.lworldOrgY},r.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},r.prototype.getWorldExtX=function(){return this.lworldExtX},r.prototype.setWorldExtX=function(t){this.lworldExtX=t},r.prototype.getWorldExtY=function(){return this.lworldExtY},r.prototype.setWorldExtY=function(t){this.lworldExtY=t},r.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},r.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},r.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},r.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},r.prototype.getDeviceExtX=function(){return this.ldeviceExtX},r.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},r.prototype.getDeviceExtY=function(){return this.ldeviceExtY},r.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},r.prototype.transformX=function(t){var e=0,i=this.lworldExtX;return 0!=i&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/i),e},r.prototype.transformY=function(t){var e=0,i=this.lworldExtY;return 0!=i&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/i),e},r.prototype.inverseTransformX=function(t){var e=0,i=this.ldeviceExtX;return 0!=i&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/i),e},r.prototype.inverseTransformY=function(t){var e=0,i=this.ldeviceExtY;return 0!=i&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/i),e},r.prototype.inverseTransformPoint=function(t){return new n(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=r},function(t,e,i){"use strict";var n=i(15),r=i(4),o=i(0),s=i(8),a=i(9);function h(){n.call(this),this.useSmartIdealEdgeLengthCalculation=r.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=r.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=r.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=r.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*r.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=r.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=r.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=r.MAX_ITERATIONS}for(var l in h.prototype=Object.create(n.prototype),n)h[l]=n[l];h.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=r.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},h.prototype.calcIdealEdgeLengths=function(){for(var t,e,i,n,s,a,h,l=this.getGraphManager().getAllEdges(),d=0;dr.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*r.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-r.ADAPTATION_LOWER_NODE_LIMIT)/(r.ADAPTATION_UPPER_NODE_LIMIT-r.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-r.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=r.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>r.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(r.COOLING_ADAPTATION_FACTOR,1-(t-r.ADAPTATION_LOWER_NODE_LIMIT)/(r.ADAPTATION_UPPER_NODE_LIMIT-r.ADAPTATION_LOWER_NODE_LIMIT)*(1-r.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=r.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.displacementThresholdPerNode=3*r.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},h.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),i=0;i0&&void 0!==arguments[0])||arguments[0],a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],h=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%r.GRID_CALCULATION_CHECK_PERIOD==1&&s&&this.updateGrid(),o=new Set,t=0;t(h=e.getEstimatedSize()*this.gravityRangeFactor)||a>h)&&(t.gravitationForceX=-this.gravityConstant*r,t.gravitationForceY=-this.gravityConstant*o):(s>(h=e.getEstimatedSize()*this.compoundGravityRangeFactor)||a>h)&&(t.gravitationForceX=-this.gravityConstant*r*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*o*this.compoundGravityConstant)},h.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=a.length||l>=a[0].length))for(var d=0;dt}}]),t}();t.exports=o},function(t,e,i){"use strict";function n(){}n.svd=function(t){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=t.length,this.n=t[0].length;var e=Math.min(this.m,this.n);this.s=function(t){for(var e=[];t-- >0;)e.push(0);return e}(Math.min(this.m+1,this.n)),this.U=function t(e){if(0==e.length)return 0;for(var i=[],n=0;n0;)e.push(0);return e}(this.n),r=function(t){for(var e=[];t-- >0;)e.push(0);return e}(this.m),o=Math.min(this.m-1,this.n),s=Math.max(0,Math.min(this.n-2,this.m)),a=0;a=0;M--)if(0!==this.s[M]){for(var _=M+1;_=0;G--){if(function(t,e){return t&&e}(G0;){var B=void 0,V=void 0;for(B=I-2;B>=-1&&-1!==B;B--)if(Math.abs(i[B])<=z+X*(Math.abs(this.s[B])+Math.abs(this.s[B+1]))){i[B]=0;break}if(B===I-2)V=4;else{var W=void 0;for(W=I-1;W>=B&&W!==B;W--){var $=(W!==I?Math.abs(i[W]):0)+(W!==B+1?Math.abs(i[W-1]):0);if(Math.abs(this.s[W])<=z+X*$){this.s[W]=0;break}}W===B?V=3:W===I-1?V=1:(V=2,B=W)}switch(B++,V){case 1:var j=i[I-2];i[I-2]=0;for(var q=I-2;q>=B;q--){var K=n.hypot(this.s[q],j),Z=this.s[q]/K,Q=j/K;this.s[q]=K,q!==B&&(j=-Q*i[q-1],i[q-1]=Z*i[q-1]);for(var J=0;J=this.s[B+1]);){var It=this.s[B];if(this.s[B]=this.s[B+1],this.s[B+1]=It,BMath.abs(e)?(i=e/t,i=Math.abs(t)*Math.sqrt(1+i*i)):0!=e?(i=t/e,i=Math.abs(e)*Math.sqrt(1+i*i)):i=0,i},t.exports=n},function(t,e,i){"use strict";var n=function(){function t(t,e){for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sequence1=e,this.sequence2=i,this.match_score=n,this.mismatch_penalty=r,this.gap_penalty=o,this.iMax=e.length+1,this.jMax=i.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;i--){var n=this.listeners[i];n.event===t&&n.callback===e&&this.listeners.splice(i,1)}},r.emit=function(t,e){for(var i=0;iet});var n=i(77454),r=i(5637),o=i(72379),s=i(58962),a=i(16459),h=i(76385),l=i(31293),d=i(86827),c=i(78731),g=i(90165),u=i(26527),f=i(70451),p={L:"left",R:"right",T:"top",B:"bottom"},m={L:(0,d.K)(t=>`${t},${t/2} 0,${t} 0,0`,"L"),R:(0,d.K)(t=>`0,${t/2} ${t},0 ${t},${t}`,"R"),T:(0,d.K)(t=>`0,0 ${t},0 ${t/2},${t}`,"T"),B:(0,d.K)(t=>`${t/2},0 ${t},${t} 0,${t}`,"B")},y={L:(0,d.K)((t,e)=>t-e+2,"L"),R:(0,d.K)((t,e)=>t-2,"R"),T:(0,d.K)((t,e)=>t-e+2,"T"),B:(0,d.K)((t,e)=>t-2,"B")},v=(0,d.K)(function(t){return N(t)?"L"===t?"R":"L":"T"===t?"B":"T"},"getOppositeArchitectureDirection"),E=(0,d.K)(function(t){return"L"===t||"R"===t||"T"===t||"B"===t},"isArchitectureDirection"),N=(0,d.K)(function(t){return"L"===t||"R"===t},"isArchitectureDirectionX"),T=(0,d.K)(function(t){return"T"===t||"B"===t},"isArchitectureDirectionY"),A=(0,d.K)(function(t,e){const i=N(t)&&T(e),n=T(t)&&N(e);return i||n},"isArchitectureDirectionXY"),w=(0,d.K)(function(t){const e=t[0],i=t[1],n=N(e)&&T(i),r=T(e)&&N(i);return n||r},"isArchitecturePairXY"),I=(0,d.K)(function(t){return"LL"!==t&&"RR"!==t&&"TT"!==t&&"BB"!==t},"isValidArchitectureDirectionPair"),C=(0,d.K)(function(t,e){const i=`${t}${e}`;return I(i)?i:void 0},"getArchitectureDirectionPair"),L=(0,d.K)(function([t,e],i){const n=i[0],r=i[1];return N(n)?T(r)?[t+("L"===n?-1:1),e+("T"===r?1:-1)]:[t+("L"===n?-1:1),e]:N(r)?[t+("L"===r?1:-1),e+("T"===n?1:-1)]:[t,e+("T"===n?1:-1)]},"shiftPositionByArchitectureDirectionPair"),M=(0,d.K)(function(t){return"LT"===t||"TL"===t?[1,1]:"BL"===t||"LB"===t?[1,-1]:"BR"===t||"RB"===t?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),_=(0,d.K)(function(t,e){return A(t,e)?"bend":N(t)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),x=(0,d.K)(function(t){return"service"===t.type},"isArchitectureService"),O=(0,d.K)(function(t){return"junction"===t.type},"isArchitectureJunction"),D=(0,d.K)((t,e)=>{const[i,n]=[t,e].sort();return`${JSON.stringify(i)}-${JSON.stringify(n)}`},"architectureGroupAlignmentKey"),R=(0,d.K)(t=>t.data(),"edgeData"),b=(0,d.K)(t=>t.data(),"nodeData"),F=h.UI.architecture,G=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=h.SV,this.getAccTitle=h.iN,this.setDiagramTitle=h.ke,this.getDiagramTitle=h.ab,this.getAccDescription=h.m7,this.setAccDescription=h.EI,this.clear()}static{(0,d.K)(this,"ArchitectureDB")}setDiagramId(t){this.diagramId=t}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",(0,h.IU)()}addService({id:t,icon:e,in:i,title:n,iconText:r}){if(this.registeredIds.has(t))throw new Error(`The service id [${t}] is already in use by another ${this.registeredIds.get(t)}`);if(void 0!==i){if(t===i)throw new Error(`The service [${t}] cannot be placed within itself`);if(!this.registeredIds.has(i))throw new Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if("node"===this.registeredIds.get(i))throw new Error(`The service [${t}]'s parent is not a group`)}this.registeredIds.set(t,"node"),this.nodes.set(t,{id:t,type:"service",icon:e,iconText:r,title:n,edges:[],in:i})}getServices(){return[...this.nodes.values()].filter(x)}addJunction({id:t,in:e}){if(this.registeredIds.has(t))throw new Error(`The junction id [${t}] is already in use by another ${this.registeredIds.get(t)}`);if(void 0!==e){if(t===e)throw new Error(`The junction [${t}] cannot be placed within itself`);if(!this.registeredIds.has(e))throw new Error(`The junction [${t}]'s parent does not exist. Please make sure the parent is created before this junction`);if("node"===this.registeredIds.get(e))throw new Error(`The junction [${t}]'s parent is not a group`)}this.registeredIds.set(t,"node"),this.nodes.set(t,{id:t,type:"junction",edges:[],in:e})}getJunctions(){return[...this.nodes.values()].filter(O)}getNodes(){return[...this.nodes.values()]}getNode(t){return this.nodes.get(t)??null}addGroup({id:t,icon:e,in:i,title:n}){if(this.registeredIds.has(t))throw new Error(`The group id [${t}] is already in use by another ${this.registeredIds.get(t)}`);if(void 0!==i){if(t===i)throw new Error(`The group [${t}] cannot be placed within itself`);if(!this.registeredIds.has(i))throw new Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if("node"===this.registeredIds.get(i))throw new Error(`The group [${t}]'s parent is not a group`)}this.registeredIds.set(t,"group"),this.groups.set(t,{id:t,icon:e,title:n,in:i})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:t,rhsId:e,lhsDir:i,rhsDir:n,lhsInto:r,rhsInto:o,lhsGroup:s,rhsGroup:a,title:h}){if(!E(i))throw new Error(`Invalid direction given for left hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${String(i)}`);if(!E(n))throw new Error(`Invalid direction given for right hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${String(n)}`);if(!this.nodes.has(t)&&!this.groups.has(t))throw new Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(e)&&!this.groups.has(e))throw new Error(`The right-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);const l=this.nodes.get(t).in,d=this.nodes.get(e).in;if(s&&l&&d&&l==d)throw new Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(a&&l&&d&&l==d)throw new Error(`The right-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const c={lhsId:t,lhsDir:i,lhsInto:r,lhsGroup:s,rhsId:e,rhsDir:n,rhsInto:o,rhsGroup:a,title:h};this.edges.push(c);const g=this.nodes.get(t),u=this.nodes.get(e);g&&u&&(g.edges.push(this.edges[this.edges.length-1]),u.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(t){if(t.members.length<2)throw new Error(`An align directive requires at least two members; got ${t.members.length}`);const e=new Set;t.members.forEach(i=>{if("node"!==this.registeredIds.get(i))throw new Error(`align ${t.direction} references [${i}], which is not a service or junction`);if(e.has(i))throw new Error(`align ${t.direction} lists [${i}] more than once`);e.add(i)}),this.layoutHints.push(t)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(void 0===this.dataStructures){const t=new Map,e=new Map;for(const[s,a]of this.nodes.entries()){const i=new Map;for(const e of a.edges){const n=this.getNode(e.lhsId)?.in,r=this.getNode(e.rhsId)?.in;if(n&&r&&n!==r){const i=_(e.lhsDir,e.rhsDir);"bend"!==i&&t.set(D(n,r),i)}if(e.lhsId===s){const t=C(e.lhsDir,e.rhsDir);t&&i.set(t,e.rhsId)}else{const t=C(e.rhsDir,e.lhsDir);t&&i.set(t,e.lhsId)}}e.set(s,i)}const i=new Set,n=new Set(e.keys()),r=(0,d.K)(t=>{const r=new Map([[t,[0,0]]]),o=[t];for(;o.length>0;){const t=o.shift();if(t){i.add(t),n.delete(t);const s=e.get(t);if(!s)throw new Error(`BFS error: adjacency list for id ${t} not found. Please report this as a bug.`);const a=r.get(t);if(!a)throw new Error(`BFS error: position for id ${t} not found in spatial map. Please report this as a bug.`);const[h,l]=a;s.forEach((t,e)=>{i.has(t)||(r.set(t,L([h,l],e)),o.push(t))})}}return r},"BFS"),o=[];for(;n.size>0;){const t=n.values().next().value;o.push(r(t))}this.dataStructures={adjList:e,spatialMaps:o,groupAlignments:t}}return this.dataStructures}setElementForId(t,e){this.elements.set(t,e)}getElementById(t){return this.elements.get(t)}getConfig(){return(0,a.$t)({...F,...(0,h.zj)().architecture})}getConfigField(t){return this.getConfig()[t]}},S=(0,d.K)((t,e)=>{(0,n.S)(t,e),t.groups.map(t=>e.addGroup(t)),t.services.map(t=>e.addService({...t,type:"service"})),t.junctions.map(t=>e.addJunction({...t,type:"junction"})),t.edges.map(t=>e.addEdge(t)),t.alignments?.map(t=>e.addLayoutHint({direction:t.direction,members:[...t.members]}))},"populateDb"),P={parser:{yy:void 0},parse:(0,d.K)(async t=>{const e=await(0,c.qg)("architecture",t);l.R.debug(e);const i=P.parser?.yy;if(!(i instanceof G))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");S(e,i)},"parse")},U=(0,d.K)(t=>`\n .edge {\n stroke-width: ${t.archEdgeWidth};\n stroke: ${t.archEdgeColor};\n fill: none;\n }\n\n .arrow {\n fill: ${t.archEdgeArrowColor};\n }\n\n .node-bkg {\n fill: none;\n stroke: ${t.archGroupBorderColor};\n stroke-width: ${t.archGroupBorderWidth};\n stroke-dasharray: 8;\n }\n .node-icon-text {\n display: flex; \n align-items: center;\n }\n \n .node-icon-text > div {\n color: #fff;\n margin: 1px;\n height: fit-content;\n text-align: center;\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n }\n`,"getStyles");function Y(t,e){if(0===t)return e();const i=Math.random;let n=t>>>0;Math.random=function(){n=n+1831565813>>>0;let t=n;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296};try{return e()}finally{Math.random=i}}(0,d.K)(Y,"withSeededRandom");var k=(0,d.K)(t=>`${t}`,"wrapIcon"),H={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:k('')},server:{body:k('')},disk:{body:k('')},internet:{body:k('')},cloud:{body:k('')},unknown:s.Gc,blank:{body:k("")}}},X=(0,d.K)(async function(t,e,i,n){const r=i.getConfigField("padding"),s=i.getConfigField("iconSize"),l=s/2,d=s/6,c=d/2;await Promise.all(e.edges().map(async e=>{const{source:s,sourceDir:g,sourceArrow:u,sourceGroup:f,target:p,targetDir:v,targetArrow:E,targetGroup:I,label:L}=R(e);let{x:_,y:x}=e[0].sourceEndpoint();const{x:O,y:D}=e[0].midpoint();let{x:b,y:F}=e[0].targetEndpoint();const G=r+4;if(f&&(N(g)?_+="L"===g?-G:G:x+="T"===g?-G:G+18),I&&(N(v)?b+="L"===v?-G:G:F+="T"===v?-G:G+18),f||"junction"!==i.getNode(s)?.type||(N(g)?_+="L"===g?l:-l:x+="T"===g?l:-l),I||"junction"!==i.getNode(p)?.type||(N(v)?b+="L"===v?l:-l:F+="T"===v?l:-l),e[0]._private.rscratch){const e=t.insert("g");if(e.insert("path").attr("d",`M ${_},${x} L ${O},${D} L${b},${F} `).attr("class","edge").attr("id",`${n}-${(0,a.rY)(s,p,{prefix:"L"})}`),u){const t=N(g)?y[g](_,d):_-c,i=T(g)?y[g](x,d):x-c;e.insert("polygon").attr("points",m[g](d)).attr("transform",`translate(${t},${i})`).attr("class","arrow")}if(E){const t=N(v)?y[v](b,d):b-c,i=T(v)?y[v](F,d):F-c;e.insert("polygon").attr("points",m[v](d)).attr("transform",`translate(${t},${i})`).attr("class","arrow")}if(L){const t=A(g,v)?"XY":N(g)?"X":"Y";let i=0;i="X"===t?Math.abs(_-b):"Y"===t?Math.abs(x-F)/1.5:Math.abs(_-b)/2;const n=e.append("g");if(await(0,o.GZ)(n,L,{useHtmlLabels:!1,width:i,classes:"architecture-service-label"},(0,h.D7)()),n.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),"X"===t)n.attr("transform","translate("+O+", "+D+")");else if("Y"===t)n.attr("transform","translate("+O+", "+D+") rotate(-90)");else if("XY"===t){const t=C(g,v);if(t&&w(t)){const e=n.node().getBoundingClientRect(),[i,r]=M(t);n.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*i*r*45})`);const o=n.node().getBoundingClientRect();n.attr("transform",`\n translate(${O}, ${D-e.height/2})\n translate(${i*o.width/2}, ${r*o.height/2})\n rotate(${-1*i*r*45}, 0, ${e.height/2})\n `)}}}}}))},"drawEdges"),z=(0,d.K)(async function(t,e,i,n){const r=.75*i.getConfigField("padding"),a=i.getConfigField("fontSize"),l=i.getConfigField("iconSize")/2;await Promise.all(e.nodes().map(async e=>{const d=b(e);if("group"===d.type){const{h:c,w:g,x1:u,y1:f}=e.boundingBox(),p=t.append("rect");p.attr("id",`${n}-group-${d.id}`).attr("x",u+l).attr("y",f+l).attr("width",g).attr("height",c).attr("class","node-bkg");const m=t.append("g");let y=u,v=f;if(d.icon){const t=m.append("g");t.html(`${await(0,s.WY)(d.icon,{height:r,width:r,fallbackPrefix:H.prefix})}`),t.attr("transform","translate("+(y+l+1)+", "+(v+l+1)+")"),y+=r,v+=a/2-1-2}if(d.label){const t=m.append("g");await(0,o.GZ)(t,d.label,{useHtmlLabels:!1,width:g,classes:"architecture-service-label"},(0,h.D7)()),t.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),t.attr("transform","translate("+(y+l+4)+", "+(v+l+2)+")")}i.setElementForId(d.id,p)}}))},"drawGroups"),B=(0,d.K)(async function(t,e,i,n){const r=(0,h.D7)();for(const a of i){const i=e.append("g"),l=t.getConfigField("iconSize");if(a.title){const t=i.append("g");await(0,o.GZ)(t,a.title,{useHtmlLabels:!1,width:1.5*l,classes:"architecture-service-label"},r),t.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),t.attr("transform","translate("+l/2+", "+l+")")}const d=i.append("g");if(a.icon)d.html(`${await(0,s.WY)(a.icon,{height:l,width:l,fallbackPrefix:H.prefix})}`);else if(a.iconText){d.html(`${await(0,s.WY)("blank",{height:l,width:l,fallbackPrefix:H.prefix})}`);const t=d.append("g").append("foreignObject").attr("width",l).attr("height",l).append("div").attr("class","node-icon-text").attr("style",`height: ${l}px;`).append("div").html((0,h.jZ)(a.iconText,r)),e=parseInt(window.getComputedStyle(t.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;t.attr("style",`-webkit-line-clamp: ${Math.floor((l-2)/e)};`)}else d.append("path").attr("class","node-bkg").attr("id",`${n}-node-${a.id}`).attr("d",`M0,${l} V5 Q0,0 5,0 H${l-5} Q${l},0 ${l},5 V${l} Z`);i.attr("id",`${n}-service-${a.id}`).attr("class","architecture-service");const{width:c,height:g}=i.node().getBBox();a.width=c,a.height=g,t.setElementForId(a.id,i)}return 0},"drawServices"),V=(0,d.K)(function(t,e,i,n){i.forEach(i=>{const r=e.append("g"),o=t.getConfigField("iconSize");r.append("g").append("rect").attr("id",`${n}-node-${i.id}`).attr("fill-opacity","0").attr("width",o).attr("height",o),r.attr("class","architecture-junction");const{width:s,height:a}=r._groups[0][0].getBBox();r.width=s,r.height=a,t.setElementForId(i.id,r)})},"drawJunctions");function W(t,e,i){t.forEach(t=>{e.add({group:"nodes",data:{type:"service",id:t.id,icon:t.icon,label:t.title,parent:t.in,width:i.getConfigField("iconSize"),height:i.getConfigField("iconSize")},classes:"node-service"})})}function $(t,e,i){t.forEach(t=>{e.add({group:"nodes",data:{type:"junction",id:t.id,parent:t.in,width:i.getConfigField("iconSize"),height:i.getConfigField("iconSize")},classes:"node-junction"})})}function j(t,e){e.nodes().map(e=>{const i=b(e);if("group"===i.type)return;i.x=e.position().x,i.y=e.position().y;t.getElementById(i.id).attr("transform","translate("+(i.x||0)+","+(i.y||0)+")")})}function q(t,e){t.forEach(t=>{e.add({group:"nodes",data:{type:"group",id:t.id,icon:t.icon,label:t.title,parent:t.in},classes:"node-group"})})}function K(t,e){t.forEach(t=>{const{lhsId:i,rhsId:n,lhsInto:r,lhsGroup:o,rhsInto:s,lhsDir:a,rhsDir:h,rhsGroup:l,title:d}=t,c=A(t.lhsDir,t.rhsDir)?"segments":"straight",g={id:`${i}-${n}`,label:d,source:i,sourceDir:a,sourceArrow:r,sourceGroup:o,sourceEndpoint:"L"===a?"0 50%":"R"===a?"100% 50%":"T"===a?"50% 0":"50% 100%",target:n,targetDir:h,targetArrow:s,targetGroup:l,targetEndpoint:"L"===h?"0 50%":"R"===h?"100% 50%":"T"===h?"50% 0":"50% 100%"};e.add({group:"edges",data:g,classes:c})})}function Z(t,e,i,n=[]){const r=(0,d.K)((t,e)=>{const n=new Map;for(const[r,o]of t.entries()){const t=`${r}`;let s=0;const a=[...o.entries()];if(1!==a.length)for(let r=0;r{const i=new Map,n=new Map;return e.forEach(([e,r],o)=>{const s=t.getNode(o)?.in??"default",a=i.get(r)??new Map;i.has(r)||i.set(r,a);const h=n.get(e)??new Map;n.has(e)||n.set(e,h);for(const t of[a,h]){const e=t.get(s)??[];t.has(s)||t.set(s,e),e.push(o)}}),{horiz:[...r(i,"horizontal").values()].filter(t=>t.length>1),vert:[...r(n,"vertical").values()].filter(t=>t.length>1)}}),[s,a]=o.reduce(([t,e],{horiz:i,vert:n})=>[[...t,...i],[...e,...n]],[[],[]]),h=new Set;n.forEach(t=>t.members.forEach(t=>h.add(t)));const l=(0,d.K)(t=>t.filter(t=>!t.some(t=>h.has(t))),"dropOverlapping"),c=l(s),g=l(a);return n.forEach(t=>{t.members.length<2||("row"===t.direction?c.push([...t.members]):g.push([...t.members]))}),{horizontal:c,vertical:g}}function Q(t,e,i=[]){const n=[],r=e.getConfigField("iconSize"),o=e.getConfigField("idealEdgeLengthMultiplier"),s=o*r,a=new Set;i.forEach(t=>{for(let e=0;e`${t[0]},${t[1]}`,"posToStr"),l=(0,d.K)(t=>t.split(",").map(t=>parseInt(t)),"strToPos");return t.forEach(t=>{const e=new Map([...t.entries()].map(([t,e])=>[h(e),t])),i=[h([0,0])],s={},d={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;i.length>0;){const t=i.shift();if(t){s[t]=1;const c=e.get(t);if(c){const g=l(t);Object.entries(d).forEach(([t,l])=>{const d=h([g[0]+l[0],g[1]+l[1]]),u=e.get(d);if(u&&!s[d]){if(i.push(d),a.has(`${c}|${u}`))return;n.push({[p[t]]:u,[p[v(t)]]:c,gap:o*r})}})}}}}),n}function J(t,e,i,n,r,{spatialMaps:o,groupAlignments:s}){return new Promise(a=>{const h=(0,f.Ltv)("body").append("div").attr("id","cy").attr("style","display:none"),c=(0,g.A)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge[label]",style:{label:"data(label)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${r.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${r.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});h.remove(),q(i,c),W(t,c,r),$(e,c,r),K(n,c);const u=r.getLayoutHints(),p=Z(r,o,s,u),m=Q(o,r,u),y=r.getConfigField("iconSize"),v=r.getConfigField("idealEdgeLengthMultiplier")*y,E=.5*y,N=r.getConfigField("edgeElasticity"),A=r.getConfigField("seed"),w=c.layout({name:"fcose",quality:"proof",randomize:r.getConfigField("randomize"),nodeSeparation:r.getConfigField("nodeSeparation"),numIter:r.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(t){const[e,i]=t.connectedNodes(),{parent:n}=b(e),{parent:r}=b(i);return n===r?v:E},edgeElasticity(t){const[e,i]=t.connectedNodes(),{parent:n}=b(e),{parent:r}=b(i);return n===r?N:.001},alignmentConstraint:p,relativePlacementConstraint:m});w.one("layoutstop",()=>{function t(t,e,i,n){let r,o;const{x:s,y:a}=t,{x:h,y:l}=e;o=(n-a+(s-i)*(a-l)/(s-h))/Math.sqrt(1+Math.pow((a-l)/(s-h),2)),r=Math.sqrt(Math.pow(n-a,2)+Math.pow(i-s,2)-Math.pow(o,2));r/=Math.sqrt(Math.pow(h-s,2)+Math.pow(l-a,2));let d=(h-s)*(n-a)-(l-a)*(i-s);switch(!0){case d>=0:d=1;break;case d<0:d=-1}let c=(h-s)*(i-s)+(l-a)*(n-a);switch(!0){case c>=0:c=1;break;case c<0:c=-1}return o=Math.abs(o)*d,r*=c,{distances:o,weights:r}}(0,d.K)(t,"getSegmentWeights"),c.startBatch();for(const e of Object.values(c.edges()))if(e.data?.()){const{x:i,y:n}=e.source().position(),{x:r,y:o}=e.target().position();if(i!==r&&n!==o){const i=e.sourceEndpoint(),n=e.targetEndpoint(),{sourceDir:r}=R(e),[o,s]=T(r)?[i.x,n.y]:[n.x,i.y],{weights:a,distances:h}=t(i,n,o,s);e.style("segment-distances",h),e.style("segment-weights",a)}}c.endBatch(),Y(A,()=>w.run())});try{Y(A,()=>w.run())}catch(I){if(I instanceof RangeError&&I.message.includes("Invalid array length"))throw new Error("Architecture layout failed: a declared `align row|column` directive likely contradicts the edge directions, or two declared alignments overlap on a shared node. Check that the order of members in each `align` chain is consistent with the edges between them, and that no node appears in two `align` directives along the same axis.");throw I}c.ready(t=>{l.R.info("Ready",t),a(c)})})}(0,s.pC)([{name:H.prefix,icons:H}]),g.A.use(u),(0,d.K)(W,"addServices"),(0,d.K)($,"addJunctions"),(0,d.K)(j,"positionNodes"),(0,d.K)(q,"addGroups"),(0,d.K)(K,"addEdges"),(0,d.K)(Z,"getAlignments"),(0,d.K)(Q,"getRelativeConstraints"),(0,d.K)(J,"layoutArchitecture");var tt={draw:(0,d.K)(async(t,e,i,n)=>{const o=n.db;o.setDiagramId(e);const s=o.getServices(),a=o.getJunctions(),l=o.getGroups(),d=o.getEdges(),c=o.getDataStructures(),g=(0,r.D)(e),u=g.append("g");u.attr("class","architecture-edges");const f=g.append("g");f.attr("class","architecture-services");const p=g.append("g");p.attr("class","architecture-groups"),await B(o,f,s,e),V(o,f,a,e);const m=await J(s,a,l,d,o,c);await X(u,m,o,e),await z(p,m,o,e),j(o,m),(0,h.ot)(void 0,g,o.getConfigField("padding"),o.getConfigField("useMaxWidth"))},"draw")},et={parser:P,get db(){return new G},renderer:tt,styles:U}},77454(t,e,i){"use strict";function n(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}i.d(e,{S:()=>n}),(0,i(86827).K)(n,"populateCommonDb")}}]); \ No newline at end of file diff --git a/assets/js/6445.98641538.js b/assets/js/6445.98641538.js new file mode 100644 index 000000000..178ff6646 --- /dev/null +++ b/assets/js/6445.98641538.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[6445],{6445(e,s,c){c.d(s,{createInfoServices:()=>a.v});var a=c(54614);c(4954)}}]); \ No newline at end of file diff --git a/assets/js/6459.6e82f930.js b/assets/js/6459.6e82f930.js new file mode 100644 index 000000000..c537a7ab1 --- /dev/null +++ b/assets/js/6459.6e82f930.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[6459],{66459(e,t,s){s.d(t,{diagram:()=>a});var n=s(96506),r=(s(64918),s(96755),s(1672),s(841),s(9417),s(338),s(78771),s(46853),s(717),s(79515),s(44505),s(72379),s(58962),s(16459),s(76385),s(31293),(0,s(86827).K)(e=>`${(0,n.tM)(e)}\n .swimlane.cluster rect {\n stroke: ${e.clusterBorder} !important;\n }\n [data-look="neo"].cluster rect {\n filter: none;\n }\n`,"getStyles")),a=(0,n.ur)({defaultLayout:"swimlane",styles:r})}}]); \ No newline at end of file diff --git a/assets/js/6480.1ea4271b.js b/assets/js/6480.1ea4271b.js new file mode 100644 index 000000000..1f2ea845e --- /dev/null +++ b/assets/js/6480.1ea4271b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[6480],{6480(e,s,c){c.d(s,{createRailroadAbnfServices:()=>a.s});var a=c(89096);c(4954)}}]); \ No newline at end of file diff --git a/assets/js/6488.e389ed4d.js b/assets/js/6488.e389ed4d.js new file mode 100644 index 000000000..acd41b60b --- /dev/null +++ b/assets/js/6488.e389ed4d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[1726,4107,6488],{16488(e,s,a){a.d(s,{diagram:()=>c.AC});var c=a(96506);a(64918),a(96755),a(1672),a(841),a(9417),a(338),a(78771),a(46853),a(717),a(79515),a(44505),a(72379),a(58962),a(16459),a(76385),a(31293),a(86827)}}]); \ No newline at end of file diff --git a/assets/js/6506.2dda0369.js b/assets/js/6506.2dda0369.js new file mode 100644 index 000000000..0e4d8cf9b --- /dev/null +++ b/assets/js/6506.2dda0369.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[6506],{75937(t,e,s){s.d(e,{A:()=>r});var i=s(72453),n=s(74886);const r=(t,e)=>i.A.lang.round(n.A.parse(t)[e])},64918(t,e,s){s.d(e,{o:()=>i});var i=(0,s(86827).K)(()=>"\n /* Font Awesome icon styling - consolidated */\n .label-icon {\n display: inline-block;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n }\n \n .node .label-icon path {\n fill: currentColor;\n stroke: revert;\n stroke-width: revert;\n }\n","getIconStyles")},338(t,e,s){s.d(e,{CP:()=>h,Ck:()=>g,HT:()=>p,PB:()=>d,aC:()=>c,lC:()=>o,m:()=>l,tk:()=>u});var i=s(76385),n=s(86827),r=s(16750),a=s(70451),u=(0,n.K)((t,e)=>{const s=t.append("rect");if(s.attr("x",e.x),s.attr("y",e.y),s.attr("fill",e.fill),s.attr("stroke",e.stroke),s.attr("width",e.width),s.attr("height",e.height),e.name&&s.attr("name",e.name),e.rx&&s.attr("rx",e.rx),e.ry&&s.attr("ry",e.ry),void 0!==e.attrs)for(const i in e.attrs)s.attr(i,e.attrs[i]);return e.class&&s.attr("class",e.class),s},"drawRect"),o=(0,n.K)((t,e)=>{const s={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};u(t,s).lower()},"drawBackgroundRect"),l=(0,n.K)((t,e)=>{const s=e.text.replace(i.H1," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),e.class&&n.attr("class",e.class);const r=n.append("tspan");return r.attr("x",e.x+2*e.textMargin),r.text(s),n},"drawText"),c=(0,n.K)((t,e,s,i)=>{const n=t.append("image");n.attr("x",e),n.attr("y",s);const a=(0,r.J)(i);n.attr("xlink:href",a)},"drawImage"),h=(0,n.K)((t,e,s,i)=>{const n=t.append("use");n.attr("x",e),n.attr("y",s);const a=(0,r.J)(i);n.attr("xlink:href",`#${a}`)},"drawEmbeddedImage"),d=(0,n.K)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),p=(0,n.K)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),g=(0,n.K)(()=>{let t=(0,a.Ltv)(".mermaidTooltip");return t.empty()&&(t=(0,a.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip")},1672(t,e,s){s.d(e,{P:()=>a});var i=s(76385),n=s(31293),r=s(86827),a=(0,r.K)((t,e,s,r)=>{t.attr("class",s);const{width:a,height:l,x:c,y:h}=u(t,e);(0,i.a$)(t,l,a,r);const d=o(c,h,a,l,e);t.attr("viewBox",d),n.R.debug(`viewBox configured: ${d} with padding: ${e}`)},"setupViewPortForSVG"),u=(0,r.K)((t,e)=>{const s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}},"calculateDimensionsWithPadding"),o=(0,r.K)((t,e,s,i,n)=>`${t-n} ${e-n} ${s} ${i}`,"createViewBox")},96506(t,e,s){s.d(e,{AC:()=>S,tM:()=>T,ur:()=>F});var i=s(64918),n=s(96755),r=s(1672),a=s(841),u=s(9417),o=s(338),l=s(79515),c=s(16459),h=s(76385),d=s(31293),p=s(86827),g=s(70451),y=s(99418),A=s(25582),b=s(75937),k=class{constructor(){this.vertexCounter=0,this.config=(0,h.D7)(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=h.SV,this.setAccDescription=h.EI,this.setDiagramTitle=h.ke,this.getAccTitle=h.iN,this.getAccDescription=h.m7,this.getDiagramTitle=h.ab,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{(0,p.K)(this,"FlowDB")}sanitizeText(t){return h.Y2.sanitizeText(t,this.config)}sanitizeNodeLabelType(t){switch(t){case"markdown":case"string":case"text":return t;default:return"markdown"}}setDiagramId(t){this.diagramId=t}lookUpDomId(t){for(const e of this.vertices.values())if(e.id===t)return this.diagramId?`${this.diagramId}-${e.domId}`:e.domId;return this.diagramId?`${this.diagramId}-${t}`:t}addVertex(t,e,s,i,n,r,u={},o){if(!t||0===t.trim().length)return;let c;if(void 0!==o){let t;t=o.includes("\n")?o+"\n":"{\n"+o+"\n}",c=(0,a.H)(t,{schema:a.r})}const p=this.subGraphLookup.get(t);if(p&&c)return void(p.metadata={...p.metadata,...c});const g=this.edges.find(e=>e.id===t);if(g){const t=c;return void 0!==t?.animate&&(g.animate=t.animate),void 0!==t?.animation&&(g.animation=t.animation),void(void 0!==t?.curve&&(g.interpolate=t.curve))}let y,A=this.vertices.get(t);if(void 0===A&&(void 0===e&&void 0===s&&null!=i&&d.R.warn(`Style applied to unknown node "${t}". This may indicate a typo. The node will be created automatically.`),A={id:t,labelType:"text",domId:"flowchart-"+t+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(t,A)),this.vertexCounter++,void 0!==e?(this.config=(0,h.D7)(),y=this.sanitizeText(e.text.trim()),A.labelType=e.type,y.startsWith('"')&&y.endsWith('"')&&(y=y.substring(1,y.length-1)),A.text=y):void 0===A.text&&(A.text=t),void 0!==s&&(A.type=s),null!=i&&i.forEach(t=>{A.styles.push(t)}),null!=n&&n.forEach(t=>{A.classes.push(t)}),void 0!==r&&(A.dir=r),void 0===A.props?A.props=u:void 0!==u&&Object.assign(A.props,u),void 0!==c){if(c.shape){if(c.shape!==c.shape.toLowerCase()||c.shape.includes("_"))throw new Error(`No such shape: ${c.shape}. Shape names should be lowercase.`);if(!(0,l.aP)(c.shape))throw new Error(`No such shape: ${c.shape}.`);A.type=c?.shape}c?.label&&(A.text=c?.label,A.labelType=this.sanitizeNodeLabelType(c?.labelType)),c?.icon&&(A.icon=c?.icon,c.label?.trim()||A.text!==t||(A.text="")),c?.form&&(A.form=c?.form),c?.pos&&(A.pos=c?.pos),c?.img&&(A.img=c?.img,c.label?.trim()||A.text!==t||(A.text="")),c?.constraint&&(A.constraint=c.constraint),c.w&&(A.assetWidth=Number(c.w)),c.h&&(A.assetHeight=Number(c.h))}}addSingleLink(t,e,s,i){const n={start:t,end:e,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};d.R.info("abc78 Got edge...",n);const r=s.text;if(void 0!==r&&(n.text=this.sanitizeText(r.text.trim()),n.text.startsWith('"')&&n.text.endsWith('"')&&(n.text=n.text.substring(1,n.text.length-1)),n.labelType=this.sanitizeNodeLabelType(r.type)),void 0!==s&&(n.type=s.type,n.stroke=s.stroke,n.length=s.length>10?10:s.length),i&&!this.edges.some(t=>t.id===i))n.id=i,n.isUserDefinedId=!0;else{const t=this.edges.filter(t=>t.start===n.start&&t.end===n.end);0===t.length?n.id=(0,c.rY)(n.start,n.end,{counter:0,prefix:"L"}):n.id=(0,c.rY)(n.start,n.end,{counter:t.length+1,prefix:"L"})}if(!(this.edges.length<(this.config.maxEdges??500)))throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.\n\nInitialize mermaid with maxEdges set to a higher number to allow more edges.\nYou cannot set this config via configuration inside the diagram as it is a secure config.\nYou have to call mermaid.initialize.`);d.R.info("Pushing edge..."),this.edges.push(n)}isLinkData(t){return null!==t&&"object"==typeof t&&"id"in t&&"string"==typeof t.id}addLink(t,e,s){const i=this.isLinkData(s)?s.id.replace("@",""):void 0;d.R.info("addLink",t,e,i);for(const n of t)for(const r of e){const a=n===t[t.length-1],u=r===e[0];a&&u?this.addSingleLink(n,r,s,i):this.addSingleLink(n,r,s,void 0)}}updateLinkInterpolate(t,e){t.forEach(t=>{"default"===t?this.edges.defaultInterpolate=e:this.edges[t].interpolate=e})}updateLink(t,e){t.forEach(t=>{if("number"==typeof t&&t>=this.edges.length)throw new Error(`The index ${t} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);"default"===t?this.edges.defaultStyle=e:(this.edges[t].style=e,(this.edges[t]?.style?.length??0)>0&&!this.edges[t]?.style?.some(t=>t?.startsWith("fill"))&&this.edges[t]?.style?.push("fill:none"))})}addClass(t,e){const s=e.join().replace(/\\,/g,"\xa7\xa7\xa7").replace(/,/g,";").replace(/\xa7\xa7\xa7/g,",").split(";");t.split(",").forEach(t=>{let e=this.classes.get(t);void 0===e&&(e={id:t,styles:[],textStyles:[]},this.classes.set(t,e)),null!=s&&s.forEach(t=>{if(/color/.exec(t)){const s=t.replace("fill","bgFill");e.textStyles.push(s)}e.styles.push(t)})})}setDirection(t){this.direction=t.trim(),/.*/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),"TD"===this.direction&&(this.direction="TB")}setClass(t,e){for(const s of t.split(",")){const t=this.vertices.get(s);t&&t.classes.push(e);const i=this.edges.find(t=>t.id===s);i&&i.classes.push(e);const n=this.subGraphLookup.get(s);n&&n.classes.push(e)}}setTooltip(t,e){if(void 0!==e){e=this.sanitizeText(e);for(const s of t.split(","))this.tooltips.set("gen-1"===this.version?this.lookUpDomId(s):s,e)}}setClickFun(t,e,s){if("loose"!==(0,h.D7)().securityLevel)return;if(void 0===e)return;let i=[];if("string"==typeof s){i=s.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t{const s=this.lookUpDomId(t),n=document.querySelector(`[id="${s}"]`);null!==n&&n.addEventListener("click",()=>{c._K.runFunc(e,...i)},!1)}))}setLink(t,e,s){t.split(",").forEach(t=>{const i=this.vertices.get(t);void 0!==i&&(i.link=c._K.formatUrl(e,this.config),i.linkTarget=s)}),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,e,s){t.split(",").forEach(t=>{this.setClickFun(t,e,s)}),this.setClass(t,"clickable")}bindFunctions(t){this.funs.forEach(e=>{e(t)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(t){const e=(0,o.Ck)();(0,g.Ltv)(t).select("svg").selectAll("g.node").on("mouseover",t=>{const s=(0,g.Ltv)(t.currentTarget),i=s.attr("title");if(null===i)return;const n=t.currentTarget?.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(s.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.bottom+"px"),e.html(y.A.sanitize(i)),s.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0);(0,g.Ltv)(t.currentTarget).classed("hover",!1)})}clear(t="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.diagramId="",this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=t,this.config=(0,h.D7)(),(0,h.IU)()}setGen(t){this.version=t||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(t,e,s){let i=t.text.trim(),n=s.text;t===s&&/\s/.exec(s.text)&&(i=void 0);const r=(0,p.K)(t=>{const e={boolean:{},number:{},string:{}},s=[];let i;return{nodeList:t.filter(function(t){const n=typeof t;return t.stmt&&"dir"===t.stmt?(i=t.value,!1):""!==t.trim()&&(n in e?!e[n].hasOwnProperty(t)&&(e[n][t]=!0):!s.includes(t)&&s.push(t))}),dir:i}},"uniq")(e.flat()),a=r.nodeList;let u=r.dir;const o=(0,h.D7)().flowchart??{};if(u=u??(o.inheritDir?this.getDirection()??(0,h.D7)().direction??void 0:void 0),"gen-1"===this.version)for(let c=0;c2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=e,this.subGraphs[e].id===t)return{result:!0,count:0};let i=0,n=1;for(;i=0){const s=this.indexNodes2(t,e);if(s.result)return{result:!0,count:n+s.count};n+=s.count}i+=1}return{result:!1,count:n}}getDepthFirstPos(t){return this.posCrossRef[t]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return!!this.firstGraphFlag&&(this.firstGraphFlag=!1,!0)}destructStartLink(t){let e=t.trim(),s="arrow_open";switch(e[0]){case"<":s="arrow_point",e=e.slice(1);break;case"x":s="arrow_cross",e=e.slice(1);break;case"o":s="arrow_circle",e=e.slice(1)}let i="normal";return e.includes("=")&&(i="thick"),e.includes(".")&&(i="dotted"),{type:s,stroke:i}}countChar(t,e){const s=e.length;let i=0;for(let n=0;n":i="arrow_point",e.startsWith("<")&&(i="double_"+i,s=s.slice(1));break;case"o":i="arrow_circle",e.startsWith("o")&&(i="double_"+i,s=s.slice(1))}let n="normal",r=s.length-1;s.startsWith("=")&&(n="thick"),s.startsWith("~")&&(n="invisible");const a=this.countChar(".",s);return a&&(n="dotted",r=a),{type:i,stroke:n,length:r}}destructLink(t,e){const s=this.destructEndLink(t);let i;if(e){if(i=this.destructStartLink(e),i.stroke!==s.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===i.type)i.type=s.type;else{if(i.type!==s.type)return{type:"INVALID",stroke:"INVALID"};i.type="double_"+i.type}return"double_arrow"===i.type&&(i.type="double_arrow_point"),i.length=s.length,i}return s}exists(t,e){for(const s of t)if(s.nodes.includes(e))return!0;return!1}makeUniq(t,e){const s=[];return t.nodes.forEach((i,n)=>{this.exists(e,i)||s.push(t.nodes[n])}),{nodes:s}}getTypeFromVertex(t){if(t.img)return"imageSquare";if(t.icon)return"circle"===t.form?"iconCircle":"square"===t.form?"iconSquare":"rounded"===t.form?"iconRounded":"icon";switch(t.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return t.type}}findNode(t,e){return t.find(t=>t.id===e)}destructEdgeType(t){let e="none",s="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":s=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":e=t.replace("double_",""),s=e}return{arrowTypeStart:e,arrowTypeEnd:s}}addNodeFromVertex(t,e,s,i,n,r){const a=s.get(t.id),u=i.get(t.id)??!1,o=this.findNode(e,t.id);if(o)o.cssStyles=t.styles,o.cssCompiledStyles=this.getCompiledStyles(t.classes),o.cssClasses=t.classes.join(" ");else{const s={id:t.id,label:t.text,labelType:t.labelType,labelStyle:"",parentId:a,padding:n.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:r,link:t.link,linkTarget:t.linkTarget,tooltip:this.getTooltip(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint};u?e.push({...s,isGroup:!0,shape:"rect"}):e.push({...s,isGroup:!1,shape:this.getTypeFromVertex(t)})}}getCompiledStyles(t){let e=[];for(const s of t){const t=this.classes.get(s);t?.styles&&(e=[...e,...t.styles??[]].map(t=>t.trim())),t?.textStyles&&(e=[...e,...t.textStyles??[]].map(t=>t.trim()))}return e}getData(){const t=(0,h.D7)(),e=[],s=[],i=this.getSubGraphs(),n=new Map,r=new Map,a=new Map;for(const c of i)for(const t of c.nodes)this.subGraphLookup.has(t)&&a.set(t,c.id);const u=(0,p.K)(t=>"collapsed"===this.subGraphLookup.get(t)?.metadata?.view,"isCollapsed"),o=(0,p.K)(t=>{let e;const s=new Set;let i=t;for(;void 0!==i&&!s.has(i);)s.add(i),u(i)&&(e=i),i=a.get(i);return e},"outermostCollapsed"),l=new Set,d=new Map;for(const c of i){const t=o(c.id);if(void 0!==t){c.id!==t&&(l.add(c.id),d.set(c.id,t));for(const e of c.nodes)e!==t&&(l.add(e),d.set(e,t))}}for(let c=i.length-1;c>=0;c--){const t=i[c];if(!l.has(t.id)){t.nodes.length>0&&r.set(t.id,!0);for(const e of t.nodes)n.set(e,t.id)}}for(let c=i.length-1;c>=0;c--){const s=i[c];l.has(s.id)||("collapsed"===s.metadata?.view?e.push({id:s.id,label:s.title,labelStyle:"",labelType:s.labelType,parentId:n.get(s.id),padding:8,cssCompiledStyles:this.getCompiledStyles(s.classes),cssClasses:s.classes.join(" "),shape:"collapsedGroup",dir:s.dir,isGroup:!1,look:t.look}):e.push({id:s.id,label:s.title,labelStyle:"",labelType:s.labelType,parentId:n.get(s.id),padding:8,cssCompiledStyles:this.getCompiledStyles(s.classes),cssClasses:s.classes.join(" "),shape:"rect",dir:s.dir,isGroup:!0,look:t.look}))}this.getVertices().forEach(s=>{l.has(s.id)||this.addNodeFromVertex(s,e,n,r,t,t.look||"classic")});const g=this.getEdges();return g.forEach((e,i)=>{const{arrowTypeStart:n,arrowTypeEnd:r}=this.destructEdgeType(e.type),a=[...g.defaultStyle??[]],u=d.get(e.start)??e.start,o=d.get(e.end)??e.end;if(u===o&&(d.has(e.start)||d.has(e.end)))return;e.style&&a.push(...e.style);const l={id:(0,c.rY)(u,o,{counter:i,prefix:"L"},e.id),isUserDefinedId:e.isUserDefinedId,start:u,end:o,type:e.type??"normal",label:e.text,labelType:e.labelType,labelpos:"c",thickness:e.stroke,minlen:e.length,classes:"invisible"===e?.stroke?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:"invisible"===e?.stroke||"arrow_open"===e?.type?"none":n,arrowTypeEnd:"invisible"===e?.stroke||"arrow_open"===e?.type?"none":r,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(e.classes),labelStyle:a,style:a,pattern:e.stroke,look:t.look,animate:e.animate,animation:e.animation,curve:e.interpolate||this.edges.defaultInterpolate||t.flowchart?.curve};s.push(l)}),{nodes:e,edges:s,other:{},config:t}}defaultConfig(){return h.ME.flowchart}},f={getClasses:(0,p.K)(function(t,e){return e.db.getClasses()},"getClasses"),draw:(0,p.K)(async function(t,e,s,i){d.R.info("REF0:"),d.R.info("Drawing state diagram (v2)",e);const{securityLevel:a,flowchart:o,layout:l}=(0,h.D7)();i.db.setDiagramId(e),d.R.debug("Before getData: ");const p=i.db.getData();d.R.debug("Data: ",p);const g=(0,n.A)(e,a),y=i.db.getDirection();p.type=i.type,p.layoutAlgorithm=(0,u.q7)(l),"dagre"===p.layoutAlgorithm&&"elk"===l&&d.R.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),p.direction=y,p.nodeSpacing=o?.nodeSpacing||50,p.rankSpacing=o?.rankSpacing||50,p.markers=["point","circle","cross"],p.diagramId=e,d.R.debug("REF1:",p),await(0,u.XX)(p,g);const A=p.config.flowchart?.diagramPadding??8;c._K.insertTitle(g,"flowchartTitleText",o?.titleTopMargin||0,i.db.getDiagramTitle()),(0,r.P)(g,A,"flowchart",o?.useMaxWidth||!1)},"draw")},m=function(){var t=(0,p.K)(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[1,4],s=[1,3],i=[1,5],n=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],r=[2,2],a=[1,13],u=[1,14],o=[1,15],l=[1,16],c=[1,23],h=[1,25],d=[1,26],g=[1,27],y=[1,50],A=[1,49],b=[1,29],k=[1,30],f=[1,31],m=[1,32],x=[1,33],E=[1,45],C=[1,47],D=[1,43],T=[1,48],F=[1,44],S=[1,51],v=[1,46],_=[1,52],B=[1,53],w=[1,34],L=[1,35],$=[1,36],I=[1,37],R=[1,38],N=[1,58],K=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],P=[1,62],G=[1,61],O=[1,63],M=[8,9,11,75,77,78],V=[1,79],U=[1,92],W=[1,97],z=[1,96],j=[1,93],Y=[1,89],H=[1,95],X=[1,91],q=[1,98],Q=[1,94],J=[1,99],Z=[1,90],tt=[8,9,10,11,40,75,77,78],et=[8,9,10,11,40,46,75,77,78],st=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],it=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],nt=[44,60,89,102,105,106,109,111,114,115,116],rt=[1,122],at=[1,123],ut=[1,125],ot=[1,124],lt=[44,60,62,74,89,102,105,106,109,111,114,115,116],ct=[1,134],ht=[1,148],dt=[1,149],pt=[1,150],gt=[1,151],yt=[1,136],At=[1,138],bt=[1,142],kt=[1,143],ft=[1,144],mt=[1,145],xt=[1,146],Et=[1,147],Ct=[1,152],Dt=[1,153],Tt=[1,132],Ft=[1,133],St=[1,140],vt=[1,135],_t=[1,139],Bt=[1,137],wt=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],Lt=[1,155],$t=[1,157],It=[8,9,11],Rt=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],Nt=[1,177],Kt=[1,173],Pt=[1,174],Gt=[1,178],Ot=[1,175],Mt=[1,176],Vt=[77,116,119],Ut=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],Wt=[10,106],zt=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],jt=[1,248],Yt=[1,246],Ht=[1,250],Xt=[1,244],qt=[1,245],Qt=[1,247],Jt=[1,249],Zt=[1,251],te=[1,269],ee=[8,9,11,106],se=[8,9,10,11,60,84,105,106,109,110,111,112],ie={trace:(0,p.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,direction_td:125,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr",125:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1],[33,1]],performAction:(0,p.K)(function(t,e,s,i,n,r,a){var u=r.length-1;switch(n){case 2:case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 3:(!Array.isArray(r[u])||r[u].length>0)&&r[u-1].push(r[u]),this.$=r[u-1];break;case 4:case 183:case 44:case 54:case 76:case 181:this.$=r[u];break;case 11:i.setDirection("TB"),this.$="TB";break;case 12:i.setDirection(r[u-1]),this.$=r[u-1];break;case 27:this.$=r[u-1].nodes;break;case 33:this.$=i.addSubGraph(r[u-6],r[u-1],r[u-4]);break;case 34:this.$=i.addSubGraph(r[u-3],r[u-1],r[u-3]);break;case 35:this.$=i.addSubGraph(void 0,r[u-1],void 0);break;case 37:this.$=r[u].trim(),i.setAccTitle(this.$);break;case 38:case 39:this.$=r[u].trim(),i.setAccDescription(this.$);break;case 43:case 133:this.$=r[u-1]+r[u];break;case 45:i.addVertex(r[u-1][r[u-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,r[u]),i.addLink(r[u-3].stmt,r[u-1],r[u-2]),this.$={stmt:r[u-1],nodes:r[u-1].concat(r[u-3].nodes)};break;case 46:i.addLink(r[u-2].stmt,r[u],r[u-1]),this.$={stmt:r[u],nodes:r[u].concat(r[u-2].nodes)};break;case 47:i.addLink(r[u-3].stmt,r[u-1],r[u-2]),this.$={stmt:r[u-1],nodes:r[u-1].concat(r[u-3].nodes)};break;case 48:this.$={stmt:r[u-1],nodes:r[u-1]};break;case 49:i.addVertex(r[u-1][r[u-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,r[u]),this.$={stmt:r[u-1],nodes:r[u-1],shapeData:r[u]};break;case 50:this.$={stmt:r[u],nodes:r[u]};break;case 51:case 128:case 130:this.$=[r[u]];break;case 52:i.addVertex(r[u-5][r[u-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,r[u-4]),this.$=r[u-5].concat(r[u]);break;case 53:this.$=r[u-4].concat(r[u]);break;case 55:this.$=r[u-2],i.setClass(r[u-2],r[u]);break;case 56:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"square");break;case 57:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"doublecircle");break;case 58:this.$=r[u-5],i.addVertex(r[u-5],r[u-2],"circle");break;case 59:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"ellipse");break;case 60:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"stadium");break;case 61:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"subroutine");break;case 62:this.$=r[u-7],i.addVertex(r[u-7],r[u-1],"rect",void 0,void 0,void 0,Object.fromEntries([[r[u-5],r[u-3]]]));break;case 63:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"cylinder");break;case 64:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"round");break;case 65:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"diamond");break;case 66:this.$=r[u-5],i.addVertex(r[u-5],r[u-2],"hexagon");break;case 67:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"odd");break;case 68:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"trapezoid");break;case 69:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"inv_trapezoid");break;case 70:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"lean_right");break;case 71:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"lean_left");break;case 72:this.$=r[u],i.addVertex(r[u]);break;case 73:r[u-1].text=r[u],this.$=r[u-1];break;case 74:case 75:r[u-2].text=r[u-1],this.$=r[u-2];break;case 77:var o=i.destructLink(r[u],r[u-2]);this.$={type:o.type,stroke:o.stroke,length:o.length,text:r[u-1]};break;case 78:o=i.destructLink(r[u],r[u-2]);this.$={type:o.type,stroke:o.stroke,length:o.length,text:r[u-1],id:r[u-3]};break;case 79:case 86:case 101:case 103:this.$={text:r[u],type:"text"};break;case 80:case 87:case 102:this.$={text:r[u-1].text+""+r[u],type:r[u-1].type};break;case 81:case 88:this.$={text:r[u],type:"string"};break;case 82:case 89:case 104:this.$={text:r[u],type:"markdown"};break;case 83:o=i.destructLink(r[u]);this.$={type:o.type,stroke:o.stroke,length:o.length};break;case 84:o=i.destructLink(r[u]);this.$={type:o.type,stroke:o.stroke,length:o.length,id:r[u-1]};break;case 85:this.$=r[u-1];break;case 105:this.$=r[u-4],i.addClass(r[u-2],r[u]);break;case 106:this.$=r[u-4],i.setClass(r[u-2],r[u]);break;case 107:case 115:this.$=r[u-1],i.setClickEvent(r[u-1],r[u]);break;case 108:case 116:this.$=r[u-3],i.setClickEvent(r[u-3],r[u-2]),i.setTooltip(r[u-3],r[u]);break;case 109:this.$=r[u-2],i.setClickEvent(r[u-2],r[u-1],r[u]);break;case 110:this.$=r[u-4],i.setClickEvent(r[u-4],r[u-3],r[u-2]),i.setTooltip(r[u-4],r[u]);break;case 111:this.$=r[u-2],i.setLink(r[u-2],r[u]);break;case 112:this.$=r[u-4],i.setLink(r[u-4],r[u-2]),i.setTooltip(r[u-4],r[u]);break;case 113:this.$=r[u-4],i.setLink(r[u-4],r[u-2],r[u]);break;case 114:this.$=r[u-6],i.setLink(r[u-6],r[u-4],r[u]),i.setTooltip(r[u-6],r[u-2]);break;case 117:this.$=r[u-1],i.setLink(r[u-1],r[u]);break;case 118:this.$=r[u-3],i.setLink(r[u-3],r[u-2]),i.setTooltip(r[u-3],r[u]);break;case 119:this.$=r[u-3],i.setLink(r[u-3],r[u-2],r[u]);break;case 120:this.$=r[u-5],i.setLink(r[u-5],r[u-4],r[u]),i.setTooltip(r[u-5],r[u-2]);break;case 121:this.$=r[u-4],i.addVertex(r[u-2],void 0,void 0,r[u]);break;case 122:this.$=r[u-4],i.updateLink([r[u-2]],r[u]);break;case 123:this.$=r[u-4],i.updateLink(r[u-2],r[u]);break;case 124:this.$=r[u-8],i.updateLinkInterpolate([r[u-6]],r[u-2]),i.updateLink([r[u-6]],r[u]);break;case 125:this.$=r[u-8],i.updateLinkInterpolate(r[u-6],r[u-2]),i.updateLink(r[u-6],r[u]);break;case 126:this.$=r[u-6],i.updateLinkInterpolate([r[u-4]],r[u]);break;case 127:this.$=r[u-6],i.updateLinkInterpolate(r[u-4],r[u]);break;case 129:case 131:r[u-2].push(r[u]),this.$=r[u-2];break;case 182:case 184:this.$=r[u-1]+""+r[u];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"};break;case 189:this.$={stmt:"dir",value:"TD"}}},"anonymous"),table:[{3:1,4:2,9:e,10:s,12:i},{1:[3]},t(n,r,{5:6}),{4:7,9:e,10:s,12:i},{4:8,9:e,10:s,12:i},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:a,9:u,10:o,11:l,20:17,22:18,23:19,24:20,25:21,26:22,27:c,33:24,34:h,36:d,38:g,42:28,43:39,44:y,45:40,47:41,60:A,84:b,85:k,86:f,87:m,88:x,89:E,102:C,105:D,106:T,109:F,111:S,113:42,114:v,115:_,116:B,121:w,122:L,123:$,124:I,125:R},t(n,[2,9]),t(n,[2,10]),t(n,[2,11]),{8:[1,55],9:[1,56],10:N,15:54,18:57},t(K,[2,3]),t(K,[2,4]),t(K,[2,5]),t(K,[2,6]),t(K,[2,7]),t(K,[2,8]),{8:P,9:G,11:O,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:P,9:G,11:O,21:68},{8:P,9:G,11:O,21:69},{8:P,9:G,11:O,21:70},{8:P,9:G,11:O,21:71},{8:P,9:G,11:O,21:72},{8:P,9:G,10:[1,73],11:O,21:74},t(K,[2,36]),{35:[1,75]},{37:[1,76]},t(K,[2,39]),t(M,[2,50],{18:77,39:78,10:N,40:V}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:U,44:W,60:z,80:[1,87],89:j,95:[1,84],97:[1,85],101:86,105:Y,106:H,109:X,111:q,114:Q,115:J,116:Z,120:88},t(K,[2,185]),t(K,[2,186]),t(K,[2,187]),t(K,[2,188]),t(K,[2,189]),t(tt,[2,51]),t(tt,[2,54],{46:[1,100]}),t(et,[2,72],{113:113,29:[1,101],44:y,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:A,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:E,102:C,105:D,106:T,109:F,111:S,114:v,115:_,116:B}),t(st,[2,181]),t(st,[2,142]),t(st,[2,143]),t(st,[2,144]),t(st,[2,145]),t(st,[2,146]),t(st,[2,147]),t(st,[2,148]),t(st,[2,149]),t(st,[2,150]),t(st,[2,151]),t(st,[2,152]),t(n,[2,12]),t(n,[2,18]),t(n,[2,19]),{9:[1,114]},t(it,[2,26],{18:115,10:N}),t(K,[2,27]),{42:116,43:39,44:y,45:40,47:41,60:A,89:E,102:C,105:D,106:T,109:F,111:S,113:42,114:v,115:_,116:B},t(K,[2,40]),t(K,[2,41]),t(K,[2,42]),t(nt,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:rt,81:at,116:ut,119:ot},{75:[1,126],77:[1,127]},t(lt,[2,83]),t(K,[2,28]),t(K,[2,29]),t(K,[2,30]),t(K,[2,31]),t(K,[2,32]),{10:ct,12:ht,14:dt,27:pt,28:128,32:gt,44:yt,60:At,75:bt,80:[1,130],81:[1,131],83:141,84:kt,85:ft,86:mt,87:xt,88:Et,89:Ct,90:Dt,91:129,105:Tt,109:Ft,111:St,114:vt,115:_t,116:Bt},t(wt,r,{5:154}),t(K,[2,37]),t(K,[2,38]),t(M,[2,48],{44:Lt}),t(M,[2,49],{18:156,10:N,40:$t}),t(tt,[2,44]),{44:y,47:158,60:A,89:E,102:C,105:D,106:T,109:F,111:S,113:42,114:v,115:_,116:B},{102:[1,159],103:160,105:[1,161]},{44:y,47:162,60:A,89:E,102:C,105:D,106:T,109:F,111:S,113:42,114:v,115:_,116:B},{44:y,47:163,60:A,89:E,102:C,105:D,106:T,109:F,111:S,113:42,114:v,115:_,116:B},t(It,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},t(It,[2,115],{120:168,10:[1,167],14:U,44:W,60:z,89:j,105:Y,106:H,109:X,111:q,114:Q,115:J,116:Z}),t(It,[2,117],{10:[1,169]}),t(Rt,[2,183]),t(Rt,[2,170]),t(Rt,[2,171]),t(Rt,[2,172]),t(Rt,[2,173]),t(Rt,[2,174]),t(Rt,[2,175]),t(Rt,[2,176]),t(Rt,[2,177]),t(Rt,[2,178]),t(Rt,[2,179]),t(Rt,[2,180]),{44:y,47:170,60:A,89:E,102:C,105:D,106:T,109:F,111:S,113:42,114:v,115:_,116:B},{30:171,67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},{30:179,67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},{30:181,50:[1,180],67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},{30:182,67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},{30:183,67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},{30:184,67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},{109:[1,185]},{30:186,67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},{30:187,65:[1,188],67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},{30:189,67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},{30:190,67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},{30:191,67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},t(st,[2,182]),t(n,[2,20]),t(it,[2,25]),t(M,[2,46],{39:192,18:193,10:N,40:V}),t(nt,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},{77:[1,197],79:198,116:ut,119:ot},t(Vt,[2,79]),t(Vt,[2,81]),t(Vt,[2,82]),t(Vt,[2,168]),t(Vt,[2,169]),{76:199,79:121,80:rt,81:at,116:ut,119:ot},t(lt,[2,84]),{8:P,9:G,10:ct,11:O,12:ht,14:dt,21:201,27:pt,29:[1,200],32:gt,44:yt,60:At,75:bt,83:141,84:kt,85:ft,86:mt,87:xt,88:Et,89:Ct,90:Dt,91:202,105:Tt,109:Ft,111:St,114:vt,115:_t,116:Bt},t(Ut,[2,101]),t(Ut,[2,103]),t(Ut,[2,104]),t(Ut,[2,157]),t(Ut,[2,158]),t(Ut,[2,159]),t(Ut,[2,160]),t(Ut,[2,161]),t(Ut,[2,162]),t(Ut,[2,163]),t(Ut,[2,164]),t(Ut,[2,165]),t(Ut,[2,166]),t(Ut,[2,167]),t(Ut,[2,90]),t(Ut,[2,91]),t(Ut,[2,92]),t(Ut,[2,93]),t(Ut,[2,94]),t(Ut,[2,95]),t(Ut,[2,96]),t(Ut,[2,97]),t(Ut,[2,98]),t(Ut,[2,99]),t(Ut,[2,100]),{6:11,7:12,8:a,9:u,10:o,11:l,20:17,22:18,23:19,24:20,25:21,26:22,27:c,32:[1,203],33:24,34:h,36:d,38:g,42:28,43:39,44:y,45:40,47:41,60:A,84:b,85:k,86:f,87:m,88:x,89:E,102:C,105:D,106:T,109:F,111:S,113:42,114:v,115:_,116:B,121:w,122:L,123:$,124:I,125:R},{10:N,18:204},{44:[1,205]},t(tt,[2,43]),{10:[1,206],44:y,60:A,89:E,102:C,105:D,106:T,109:F,111:S,113:113,114:v,115:_,116:B},{10:[1,207]},{10:[1,208],106:[1,209]},t(Wt,[2,128]),{10:[1,210],44:y,60:A,89:E,102:C,105:D,106:T,109:F,111:S,113:113,114:v,115:_,116:B},{10:[1,211],44:y,60:A,89:E,102:C,105:D,106:T,109:F,111:S,113:113,114:v,115:_,116:B},{80:[1,212]},t(It,[2,109],{10:[1,213]}),t(It,[2,111],{10:[1,214]}),{80:[1,215]},t(Rt,[2,184]),{80:[1,216],98:[1,217]},t(tt,[2,55],{113:113,44:y,60:A,89:E,102:C,105:D,106:T,109:F,111:S,114:v,115:_,116:B}),{31:[1,218],67:Nt,82:219,116:Gt,117:Ot,118:Mt},t(zt,[2,86]),t(zt,[2,88]),t(zt,[2,89]),t(zt,[2,153]),t(zt,[2,154]),t(zt,[2,155]),t(zt,[2,156]),{49:[1,220],67:Nt,82:219,116:Gt,117:Ot,118:Mt},{30:221,67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},{51:[1,222],67:Nt,82:219,116:Gt,117:Ot,118:Mt},{53:[1,223],67:Nt,82:219,116:Gt,117:Ot,118:Mt},{55:[1,224],67:Nt,82:219,116:Gt,117:Ot,118:Mt},{57:[1,225],67:Nt,82:219,116:Gt,117:Ot,118:Mt},{60:[1,226]},{64:[1,227],67:Nt,82:219,116:Gt,117:Ot,118:Mt},{66:[1,228],67:Nt,82:219,116:Gt,117:Ot,118:Mt},{30:229,67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},{31:[1,230],67:Nt,82:219,116:Gt,117:Ot,118:Mt},{67:Nt,69:[1,231],71:[1,232],82:219,116:Gt,117:Ot,118:Mt},{67:Nt,69:[1,234],71:[1,233],82:219,116:Gt,117:Ot,118:Mt},t(M,[2,45],{18:156,10:N,40:$t}),t(M,[2,47],{44:Lt}),t(nt,[2,75]),t(nt,[2,74]),{62:[1,235],67:Nt,82:219,116:Gt,117:Ot,118:Mt},t(nt,[2,77]),t(Vt,[2,80]),{77:[1,236],79:198,116:ut,119:ot},{30:237,67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},t(wt,r,{5:238}),t(Ut,[2,102]),t(K,[2,35]),{43:239,44:y,45:40,47:41,60:A,89:E,102:C,105:D,106:T,109:F,111:S,113:42,114:v,115:_,116:B},{10:N,18:240},{10:jt,60:Yt,84:Ht,92:241,105:Xt,107:242,108:243,109:qt,110:Qt,111:Jt,112:Zt},{10:jt,60:Yt,84:Ht,92:252,104:[1,253],105:Xt,107:242,108:243,109:qt,110:Qt,111:Jt,112:Zt},{10:jt,60:Yt,84:Ht,92:254,104:[1,255],105:Xt,107:242,108:243,109:qt,110:Qt,111:Jt,112:Zt},{105:[1,256]},{10:jt,60:Yt,84:Ht,92:257,105:Xt,107:242,108:243,109:qt,110:Qt,111:Jt,112:Zt},{44:y,47:258,60:A,89:E,102:C,105:D,106:T,109:F,111:S,113:42,114:v,115:_,116:B},t(It,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},t(It,[2,116]),t(It,[2,118],{10:[1,262]}),t(It,[2,119]),t(et,[2,56]),t(zt,[2,87]),t(et,[2,57]),{51:[1,263],67:Nt,82:219,116:Gt,117:Ot,118:Mt},t(et,[2,64]),t(et,[2,59]),t(et,[2,60]),t(et,[2,61]),{109:[1,264]},t(et,[2,63]),t(et,[2,65]),{66:[1,265],67:Nt,82:219,116:Gt,117:Ot,118:Mt},t(et,[2,67]),t(et,[2,68]),t(et,[2,70]),t(et,[2,69]),t(et,[2,71]),t([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),t(nt,[2,78]),{31:[1,266],67:Nt,82:219,116:Gt,117:Ot,118:Mt},{6:11,7:12,8:a,9:u,10:o,11:l,20:17,22:18,23:19,24:20,25:21,26:22,27:c,32:[1,267],33:24,34:h,36:d,38:g,42:28,43:39,44:y,45:40,47:41,60:A,84:b,85:k,86:f,87:m,88:x,89:E,102:C,105:D,106:T,109:F,111:S,113:42,114:v,115:_,116:B,121:w,122:L,123:$,124:I,125:R},t(tt,[2,53]),{43:268,44:y,45:40,47:41,60:A,89:E,102:C,105:D,106:T,109:F,111:S,113:42,114:v,115:_,116:B},t(It,[2,121],{106:te}),t(ee,[2,130],{108:270,10:jt,60:Yt,84:Ht,105:Xt,109:qt,110:Qt,111:Jt,112:Zt}),t(se,[2,132]),t(se,[2,134]),t(se,[2,135]),t(se,[2,136]),t(se,[2,137]),t(se,[2,138]),t(se,[2,139]),t(se,[2,140]),t(se,[2,141]),t(It,[2,122],{106:te}),{10:[1,271]},t(It,[2,123],{106:te}),{10:[1,272]},t(Wt,[2,129]),t(It,[2,105],{106:te}),t(It,[2,106],{113:113,44:y,60:A,89:E,102:C,105:D,106:T,109:F,111:S,114:v,115:_,116:B}),t(It,[2,110]),t(It,[2,112],{10:[1,273]}),t(It,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:P,9:G,11:O,21:278},t(K,[2,34]),t(tt,[2,52]),{10:jt,60:Yt,84:Ht,105:Xt,107:279,108:243,109:qt,110:Qt,111:Jt,112:Zt},t(se,[2,133]),{14:U,44:W,60:z,89:j,101:280,105:Y,106:H,109:X,111:q,114:Q,115:J,116:Z,120:88},{14:U,44:W,60:z,89:j,101:281,105:Y,106:H,109:X,111:q,114:Q,115:J,116:Z,120:88},{98:[1,282]},t(It,[2,120]),t(et,[2,58]),{30:283,67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},t(et,[2,66]),t(wt,r,{5:284}),t(ee,[2,131],{108:270,10:jt,60:Yt,84:Ht,105:Xt,109:qt,110:Qt,111:Jt,112:Zt}),t(It,[2,126],{120:168,10:[1,285],14:U,44:W,60:z,89:j,105:Y,106:H,109:X,111:q,114:Q,115:J,116:Z}),t(It,[2,127],{120:168,10:[1,286],14:U,44:W,60:z,89:j,105:Y,106:H,109:X,111:q,114:Q,115:J,116:Z}),t(It,[2,114]),{31:[1,287],67:Nt,82:219,116:Gt,117:Ot,118:Mt},{6:11,7:12,8:a,9:u,10:o,11:l,20:17,22:18,23:19,24:20,25:21,26:22,27:c,32:[1,288],33:24,34:h,36:d,38:g,42:28,43:39,44:y,45:40,47:41,60:A,84:b,85:k,86:f,87:m,88:x,89:E,102:C,105:D,106:T,109:F,111:S,113:42,114:v,115:_,116:B,121:w,122:L,123:$,124:I,125:R},{10:jt,60:Yt,84:Ht,92:289,105:Xt,107:242,108:243,109:qt,110:Qt,111:Jt,112:Zt},{10:jt,60:Yt,84:Ht,92:290,105:Xt,107:242,108:243,109:qt,110:Qt,111:Jt,112:Zt},t(et,[2,62]),t(K,[2,33]),t(It,[2,124],{106:te}),t(It,[2,125],{106:te})],defaultActions:{},parseError:(0,p.K)(function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},"parseError"),parse:(0,p.K)(function(t){var e=this,s=[0],i=[],n=[null],r=[],a=this.table,u="",o=0,l=0,c=0,h=r.slice.call(arguments,1),d=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);d.setInput(t,g.yy),g.yy.lexer=d,g.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var A=d.yylloc;r.push(A);var b=d.options&&d.options.ranges;function k(){var t;return"number"!=typeof(t=i.pop()||d.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,p.K)(function(t){s.length=s.length-2*t,n.length=n.length-t,r.length=r.length-t},"popStack"),(0,p.K)(k,"lex");for(var f,m,x,E,C,D,T,F,S,v={};;){if(x=s[s.length-1],this.defaultActions[x]?E=this.defaultActions[x]:(null==f&&(f=k()),E=a[x]&&a[x][f]),void 0===E||!E.length||!E[0]){var _="";for(D in S=[],a[x])this.terminals_[D]&&D>2&&S.push("'"+this.terminals_[D]+"'");_=d.showPosition?"Parse error on line "+(o+1)+":\n"+d.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(_,{text:d.match,token:this.terminals_[f]||f,line:d.yylineno,loc:A,expected:S})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+f);switch(E[0]){case 1:s.push(f),n.push(d.yytext),r.push(d.yylloc),s.push(E[1]),f=null,m?(f=m,m=null):(l=d.yyleng,u=d.yytext,o=d.yylineno,A=d.yylloc,c>0&&c--);break;case 2:if(T=this.productions_[E[1]][1],v.$=n[n.length-T],v._$={first_line:r[r.length-(T||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(T||1)].first_column,last_column:r[r.length-1].last_column},b&&(v._$.range=[r[r.length-(T||1)].range[0],r[r.length-1].range[1]]),void 0!==(C=this.performAction.apply(v,[u,l,o,g.yy,E[1],n,r].concat(h))))return C;T&&(s=s.slice(0,-1*T*2),n=n.slice(0,-1*T),r=r.slice(0,-1*T)),s.push(this.productions_[E[1]][0]),n.push(v.$),r.push(v._$),F=a[s[s.length-2]][s[s.length-1]],s.push(F);break;case 3:return!0}}return!0},"parse")},ne=function(){return{EOF:1,parseError:(0,p.K)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,p.K)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,p.K)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,p.K)(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,p.K)(function(){return this._more=!0,this},"more"),reject:(0,p.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,p.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,p.K)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,p.K)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,p.K)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,p.K)(function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},"test_match"),next:(0,p.K)(function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;re[0].length)){if(e=s,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,p.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,p.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,p.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,p.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,p.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,p.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,p.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,p.K)(function(t,e,s,i){switch(s){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:case 12:case 14:case 17:case 20:case 23:case 33:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),e.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:const s=/\n\s*/g;return e.yytext=e.yytext.replace(s,"
    "),40;case 11:return 40;case 13:this.begin("callbackname");break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 18:return 96;case 19:return"MD_STR";case 21:this.begin("md_string");break;case 22:return"STR";case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 34:return 88;case 35:case 36:case 37:case 38:return t.lex.firstGraph()&&this.begin("dir"),12;case 39:return 27;case 40:return 32;case 41:case 42:case 43:case 44:return 98;case 45:return this.popState(),13;case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:return this.popState(),14;case 56:return 121;case 57:return 122;case 58:return 123;case 59:return 124;case 60:return 125;case 61:return 78;case 62:return 105;case 63:case 104:return 111;case 64:return 46;case 65:return 60;case 66:case 105:return 44;case 67:return 8;case 68:return 106;case 69:case 103:return 115;case 70:case 73:case 76:return this.popState(),77;case 71:return this.pushState("edgeText"),75;case 72:case 75:case 78:return 119;case 74:return this.pushState("thickEdgeText"),75;case 77:return this.pushState("dottedEdgeText"),75;case 79:return 77;case 80:return this.popState(),53;case 81:case 117:return"TEXT";case 82:return this.pushState("ellipseText"),52;case 83:return this.popState(),55;case 84:return this.pushState("text"),54;case 85:return this.popState(),57;case 86:return this.pushState("text"),56;case 87:return 58;case 88:return this.pushState("text"),67;case 89:return this.popState(),64;case 90:return this.pushState("text"),63;case 91:return this.popState(),49;case 92:return this.pushState("text"),48;case 93:return this.popState(),69;case 94:return this.popState(),71;case 95:return 117;case 96:return this.pushState("trapText"),68;case 97:return this.pushState("trapText"),70;case 98:return 118;case 99:return 67;case 100:return 90;case 101:return"SEP";case 102:return 89;case 106:return 109;case 107:return 114;case 108:return 116;case 109:return this.popState(),62;case 110:return this.pushState("text"),62;case 111:return this.popState(),51;case 112:return this.pushState("text"),50;case 113:return this.popState(),31;case 114:return this.pushState("text"),29;case 115:return this.popState(),66;case 116:return this.pushState("text"),65;case 118:return"QUOTE";case 119:return 9;case 120:return 10;case 121:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:swimlane-beta\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:.*direction\s+TD[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\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]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\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\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-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\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\u0D60\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-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\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\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\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\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeData:{rules:[8,11,12,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackargs:{rules:[17,18,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackname:{rules:[14,15,16,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},href:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},click:{rules:[21,24,33,34,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dottedEdgeText:{rules:[21,24,76,78,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},thickEdgeText:{rules:[21,24,73,75,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},edgeText:{rules:[21,24,70,72,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},trapText:{rules:[21,24,79,82,84,86,90,92,93,94,95,96,97,110,112,114,116],inclusive:!1},ellipseText:{rules:[21,24,79,80,81,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},text:{rules:[21,24,79,82,83,84,85,86,89,90,91,92,96,97,109,110,111,112,113,114,115,116,117],inclusive:!1},vertex:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dir:{rules:[21,24,45,46,47,48,49,50,51,52,53,54,55,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr:{rules:[3,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_title:{rules:[1,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},md_string:{rules:[19,20,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},string:{rules:[21,22,23,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,44,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,73,74,76,77,79,82,84,86,87,88,90,92,96,97,98,99,100,101,102,103,104,105,106,107,108,110,112,114,116,118,119,120,121],inclusive:!0}}}}();function re(){this.yy={}}return ie.lexer=ne,(0,p.K)(re,"Parser"),re.prototype=ie,ie.Parser=re,new re}();m.parser=m;var x=m,E=Object.assign({},x);E.parse=t=>{const e=t.replace(/}\s*\n/g,"}\n");return x.parse(e)};var C=E,D=(0,p.K)((t,e)=>{const s=b.A,i=s(t,"r"),n=s(t,"g"),r=s(t,"b");return A.A(i,n,r,e)},"fade"),T=(0,p.K)(t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span {\n color: ${t.titleColor};\n }\n .cluster-label span p {\n background-color: transparent;\n }\n\n .label text,span {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: ${t.strokeWidth??1}px;\n }\n .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {\n text-anchor: middle;\n }\n\n .node .katex path {\n fill: #000;\n stroke: #000;\n stroke-width: 1px;\n }\n\n .rough-node .label,.node .label, .image-shape .label, .icon-shape .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n\n .root .anchor path {\n fill: ${t.lineColor} !important;\n stroke-width: 0;\n stroke: ${t.lineColor};\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: ${t.strokeWidth??2}px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${D(t.edgeLabelBackground,.5)};\n // background-color:\n }\n\n .cluster rect {\n fill: ${t.clusterBkg};\n stroke: ${t.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span {\n color: ${t.titleColor};\n }\n /* .cluster div {\n color: ${t.titleColor};\n } */\n\n /* Collapsed subgraph node (@{ view: collapsed }) */\n .node .collapsed-indicator {\n fill: ${t.clusterBorder};\n stroke: none;\n opacity: 0.6;\n }\n\n .node .collapsed-separator {\n stroke: ${t.clusterBorder};\n stroke-width: 0.75px;\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n\n rect.text {\n fill: none;\n stroke-width: 0;\n }\n\n .icon-shape, .image-shape {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n padding: 2px;\n }\n .label rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n ${(0,i.o)()}\n`,"getStyles"),F=(0,p.K)(({defaultLayout:t,styles:e=T}={})=>({parser:C,get db(){return new k},renderer:f,styles:e,init:(0,p.K)(e=>{e.flowchart||(e.flowchart={});const s=(0,h.TM)().layout??t??e.layout;s&&(0,h.XV)({layout:s}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,(0,h.XV)({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}})},"init")}),"createFlowDiagram"),S=F()},96755(t,e,s){s.d(e,{A:()=>r});var i=s(86827),n=s(70451),r=(0,i.K)((t,e)=>{let s;"sandbox"===e&&(s=(0,n.Ltv)("#i"+t));return("sandbox"===e?(0,n.Ltv)(s.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement")}}]); \ No newline at end of file diff --git a/assets/js/6535.a5548fc8.js b/assets/js/6535.a5548fc8.js new file mode 100644 index 000000000..1a05ee024 --- /dev/null +++ b/assets/js/6535.a5548fc8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[6535],{1672(e,t,s){s.d(t,{P:()=>a});var i=s(76385),n=s(31293),r=s(86827),a=(0,r.K)((e,t,s,r)=>{e.attr("class",s);const{width:a,height:c,x:h,y:u}=l(e,t);(0,i.a$)(e,c,a,r);const y=o(h,u,a,c,t);e.attr("viewBox",y),n.R.debug(`viewBox configured: ${y} with padding: ${t}`)},"setupViewPortForSVG"),l=(0,r.K)((e,t)=>{const s=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*t,height:s.height+2*t,x:s.x,y:s.y}},"calculateDimensionsWithPadding"),o=(0,r.K)((e,t,s,i,n)=>`${e-n} ${t-n} ${s} ${i}`,"createViewBox")},96755(e,t,s){s.d(t,{A:()=>r});var i=s(86827),n=s(70451),r=(0,i.K)((e,t)=>{let s;"sandbox"===t&&(s=(0,n.Ltv)("#i"+e));return("sandbox"===t?(0,n.Ltv)(s.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id="${e}"]`)},"getDiagramElement")},56535(e,t,s){s.d(t,{diagram:()=>R});var i=s(96755),n=s(1672),r=s(9417),a=(s(78771),s(46853),s(717),s(79515),s(44505),s(72379),s(58962),s(16459)),l=s(76385),o=s(31293),c=s(86827),h=function(){var e=(0,c.K)(function(e,t,s,i){for(s=s||{},i=e.length;i--;s[e[i]]=t);return s},"o"),t=[1,3],s=[1,4],i=[1,5],n=[1,6],r=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],a=[1,22],l=[2,7],o=[1,26],h=[1,27],u=[1,28],y=[1,29],d=[1,33],m=[1,34],E=[1,35],p=[1,36],R=[1,37],g=[1,38],f=[1,24],_=[1,31],S=[1,32],b=[1,30],I=[1,39],T=[1,40],k=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],N=[1,61],q=[89,90],C=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],A=[27,29],L=[1,70],$=[1,71],v=[1,72],x=[1,73],w=[1,74],O=[1,75],D=[1,76],M=[1,83],F=[1,80],K=[1,84],P=[1,85],V=[1,86],U=[1,87],B=[1,88],Y=[1,89],Q=[1,90],H=[1,91],W=[1,92],j=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],z=[63,64],G=[1,101],X=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],J=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Z=[1,110],ee=[1,106],te=[1,107],se=[1,108],ie=[1,109],ne=[1,111],re=[1,116],ae=[1,117],le=[1,114],oe=[1,115],ce={trace:(0,c.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:(0,c.K)(function(e,t,s,i,n,r,a){var l=r.length-1;switch(n){case 4:this.$=r[l].trim(),i.setAccTitle(this.$);break;case 5:case 6:this.$=r[l].trim(),i.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:i.setDirection("TB");break;case 18:i.setDirection("BT");break;case 19:i.setDirection("RL");break;case 20:i.setDirection("LR");break;case 21:i.addRequirement(r[l-3],r[l-4]);break;case 22:i.addRequirement(r[l-5],r[l-6]),i.setClass([r[l-5]],r[l-3]);break;case 23:i.setNewReqId(r[l-2]);break;case 24:i.setNewReqText(r[l-2]);break;case 25:i.setNewReqRisk(r[l-2]);break;case 26:i.setNewReqVerifyMethod(r[l-2]);break;case 29:this.$=i.RequirementType.REQUIREMENT;break;case 30:this.$=i.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=i.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=i.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=i.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=i.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=i.RiskLevel.LOW_RISK;break;case 36:this.$=i.RiskLevel.MED_RISK;break;case 37:this.$=i.RiskLevel.HIGH_RISK;break;case 38:this.$=i.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=i.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=i.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=i.VerifyType.VERIFY_TEST;break;case 42:i.addElement(r[l-3]);break;case 43:i.addElement(r[l-5]),i.setClass([r[l-5]],r[l-3]);break;case 44:i.setNewElementType(r[l-2]);break;case 45:i.setNewElementDocRef(r[l-2]);break;case 48:i.addRelationship(r[l-2],r[l],r[l-4]);break;case 49:i.addRelationship(r[l-2],r[l-4],r[l]);break;case 50:this.$=i.Relationships.CONTAINS;break;case 51:this.$=i.Relationships.COPIES;break;case 52:this.$=i.Relationships.DERIVES;break;case 53:this.$=i.Relationships.SATISFIES;break;case 54:this.$=i.Relationships.VERIFIES;break;case 55:this.$=i.Relationships.REFINES;break;case 56:this.$=i.Relationships.TRACES;break;case 57:this.$=r[l-2],i.defineClass(r[l-1],r[l]);break;case 58:i.setClass(r[l-1],r[l]);break;case 59:i.setClass([r[l-2]],r[l]);break;case 60:case 62:case 65:this.$=[r[l]];break;case 61:case 63:this.$=r[l-2].concat([r[l]]);break;case 64:this.$=r[l-2],i.setCssStyle(r[l-1],r[l]);break;case 66:r[l-2].push(r[l]),this.$=r[l-2];break;case 68:this.$=r[l-1]+r[l]}},"anonymous"),table:[{3:1,4:2,6:t,9:s,11:i,13:n},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:s,11:i,13:n},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(r,[2,6]),{3:12,4:2,6:t,9:s,11:i,13:n},{1:[2,2]},{4:17,5:a,7:13,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:d,42:m,43:E,44:p,45:R,46:g,54:f,72:_,74:S,77:b,89:I,90:T},e(r,[2,4]),e(r,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:a,7:42,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:d,42:m,43:E,44:p,45:R,46:g,54:f,72:_,74:S,77:b,89:I,90:T},{4:17,5:a,7:43,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:d,42:m,43:E,44:p,45:R,46:g,54:f,72:_,74:S,77:b,89:I,90:T},{4:17,5:a,7:44,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:d,42:m,43:E,44:p,45:R,46:g,54:f,72:_,74:S,77:b,89:I,90:T},{4:17,5:a,7:45,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:d,42:m,43:E,44:p,45:R,46:g,54:f,72:_,74:S,77:b,89:I,90:T},{4:17,5:a,7:46,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:d,42:m,43:E,44:p,45:R,46:g,54:f,72:_,74:S,77:b,89:I,90:T},{4:17,5:a,7:47,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:d,42:m,43:E,44:p,45:R,46:g,54:f,72:_,74:S,77:b,89:I,90:T},{4:17,5:a,7:48,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:d,42:m,43:E,44:p,45:R,46:g,54:f,72:_,74:S,77:b,89:I,90:T},{4:17,5:a,7:49,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:d,42:m,43:E,44:p,45:R,46:g,54:f,72:_,74:S,77:b,89:I,90:T},{4:17,5:a,7:50,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:d,42:m,43:E,44:p,45:R,46:g,54:f,72:_,74:S,77:b,89:I,90:T},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(k,[2,17]),e(k,[2,18]),e(k,[2,19]),e(k,[2,20]),{30:60,33:62,75:N,89:I,90:T},{30:63,33:62,75:N,89:I,90:T},{30:64,33:62,75:N,89:I,90:T},e(q,[2,29]),e(q,[2,30]),e(q,[2,31]),e(q,[2,32]),e(q,[2,33]),e(q,[2,34]),e(C,[2,81]),e(C,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(A,[2,79]),e(A,[2,80]),{27:[1,67],29:[1,68]},e(A,[2,85]),e(A,[2,86]),{62:69,65:L,66:$,67:v,68:x,69:w,70:O,71:D},{62:77,65:L,66:$,67:v,68:x,69:w,70:O,71:D},{30:78,33:62,75:N,89:I,90:T},{73:79,75:M,76:F,78:81,79:82,80:K,81:P,82:V,83:U,84:B,85:Y,86:Q,87:H,88:W},e(j,[2,60]),e(j,[2,62]),{73:93,75:M,76:F,78:81,79:82,80:K,81:P,82:V,83:U,84:B,85:Y,86:Q,87:H,88:W},{30:94,33:62,75:N,76:F,89:I,90:T},{5:[1,95]},{30:96,33:62,75:N,89:I,90:T},{5:[1,97]},{30:98,33:62,75:N,89:I,90:T},{63:[1,99]},e(z,[2,50]),e(z,[2,51]),e(z,[2,52]),e(z,[2,53]),e(z,[2,54]),e(z,[2,55]),e(z,[2,56]),{64:[1,100]},e(k,[2,59],{76:F}),e(k,[2,64],{76:G}),{33:103,75:[1,102],89:I,90:T},e(X,[2,65],{79:104,75:M,80:K,81:P,82:V,83:U,84:B,85:Y,86:Q,87:H,88:W}),e(J,[2,67]),e(J,[2,69]),e(J,[2,70]),e(J,[2,71]),e(J,[2,72]),e(J,[2,73]),e(J,[2,74]),e(J,[2,75]),e(J,[2,76]),e(J,[2,77]),e(J,[2,78]),e(k,[2,57],{76:G}),e(k,[2,58],{76:F}),{5:Z,28:105,31:ee,34:te,36:se,38:ie,40:ne},{27:[1,112],76:F},{5:re,40:ae,56:113,57:le,59:oe},{27:[1,118],76:F},{33:119,89:I,90:T},{33:120,89:I,90:T},{75:M,78:121,79:82,80:K,81:P,82:V,83:U,84:B,85:Y,86:Q,87:H,88:W},e(j,[2,61]),e(j,[2,63]),e(J,[2,68]),e(k,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:Z,28:126,31:ee,34:te,36:se,38:ie,40:ne},e(k,[2,28]),{5:[1,127]},e(k,[2,42]),{32:[1,128]},{32:[1,129]},{5:re,40:ae,56:130,57:le,59:oe},e(k,[2,47]),{5:[1,131]},e(k,[2,48]),e(k,[2,49]),e(X,[2,66],{79:104,75:M,80:K,81:P,82:V,83:U,84:B,85:Y,86:Q,87:H,88:W}),{33:132,89:I,90:T},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(k,[2,27]),{5:Z,28:145,31:ee,34:te,36:se,38:ie,40:ne},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(k,[2,46]),{5:re,40:ae,56:152,57:le,59:oe},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(k,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(k,[2,43]),{5:Z,28:159,31:ee,34:te,36:se,38:ie,40:ne},{5:Z,28:160,31:ee,34:te,36:se,38:ie,40:ne},{5:Z,28:161,31:ee,34:te,36:se,38:ie,40:ne},{5:Z,28:162,31:ee,34:te,36:se,38:ie,40:ne},{5:re,40:ae,56:163,57:le,59:oe},{5:re,40:ae,56:164,57:le,59:oe},e(k,[2,23]),e(k,[2,24]),e(k,[2,25]),e(k,[2,26]),e(k,[2,44]),e(k,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:(0,c.K)(function(e,t){if(!t.recoverable){var s=new Error(e);throw s.hash=t,s}this.trace(e)},"parseError"),parse:(0,c.K)(function(e){var t=this,s=[0],i=[],n=[null],r=[],a=this.table,l="",o=0,h=0,u=0,y=r.slice.call(arguments,1),d=Object.create(this.lexer),m={yy:{}};for(var E in this.yy)Object.prototype.hasOwnProperty.call(this.yy,E)&&(m.yy[E]=this.yy[E]);d.setInput(e,m.yy),m.yy.lexer=d,m.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var p=d.yylloc;r.push(p);var R=d.options&&d.options.ranges;function g(){var e;return"number"!=typeof(e=i.pop()||d.lex()||1)&&(e instanceof Array&&(e=(i=e).pop()),e=t.symbols_[e]||e),e}"function"==typeof m.yy.parseError?this.parseError=m.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.K)(function(e){s.length=s.length-2*e,n.length=n.length-e,r.length=r.length-e},"popStack"),(0,c.K)(g,"lex");for(var f,_,S,b,I,T,k,N,q,C={};;){if(S=s[s.length-1],this.defaultActions[S]?b=this.defaultActions[S]:(null==f&&(f=g()),b=a[S]&&a[S][f]),void 0===b||!b.length||!b[0]){var A="";for(T in q=[],a[S])this.terminals_[T]&&T>2&&q.push("'"+this.terminals_[T]+"'");A=d.showPosition?"Parse error on line "+(o+1)+":\n"+d.showPosition()+"\nExpecting "+q.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(A,{text:d.match,token:this.terminals_[f]||f,line:d.yylineno,loc:p,expected:q})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+S+", token: "+f);switch(b[0]){case 1:s.push(f),n.push(d.yytext),r.push(d.yylloc),s.push(b[1]),f=null,_?(f=_,_=null):(h=d.yyleng,l=d.yytext,o=d.yylineno,p=d.yylloc,u>0&&u--);break;case 2:if(k=this.productions_[b[1]][1],C.$=n[n.length-k],C._$={first_line:r[r.length-(k||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(k||1)].first_column,last_column:r[r.length-1].last_column},R&&(C._$.range=[r[r.length-(k||1)].range[0],r[r.length-1].range[1]]),void 0!==(I=this.performAction.apply(C,[l,h,o,m.yy,b[1],n,r].concat(y))))return I;k&&(s=s.slice(0,-1*k*2),n=n.slice(0,-1*k),r=r.slice(0,-1*k)),s.push(this.productions_[b[1]][0]),n.push(C.$),r.push(C._$),N=a[s[s.length-2]][s[s.length-1]],s.push(N);break;case 3:return!0}}return!0},"parse")},he=function(){return{EOF:1,parseError:(0,c.K)(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:(0,c.K)(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,c.K)(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:(0,c.K)(function(e){var t=e.length,s=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.K)(function(){return this._more=!0,this},"more"),reject:(0,c.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,c.K)(function(e){this.unput(this.match.slice(e))},"less"),pastInput:(0,c.K)(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.K)(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,c.K)(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},"showPosition"),test_match:(0,c.K)(function(e,t){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],s=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},"test_match"),next:(0,c.K)(function(){if(this.done)return this.EOF;var e,t,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;rt[0].length)){if(t=s,i=r,this.options.backtrack_lexer){if(!1!==(e=this.test_match(s,n[r])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,c.K)(function(){var e=this.next();return e||this.lex()},"lex"),begin:(0,c.K)(function(e){this.conditionStack.push(e)},"begin"),popState:(0,c.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,c.K)(function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:(0,c.K)(function(e){this.begin(e)},"pushState"),stateStackSize:(0,c.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,c.K)(function(e,t,s,i){switch(s){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 58:case 65:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:case 14:case 15:case 56:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;case 50:case 68:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 57:case 64:this.begin("string");break;case 59:return this.begin("style"),72;case 60:return this.begin("style"),74;case 61:return 61;case 62:return 64;case 63:return 63;case 66:return"qString";case 67:return t.yytext=t.yytext.trim(),89;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,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,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}}}();function ue(){this.yy={}}return ce.lexer=he,(0,c.K)(ue,"Parser"),ue.prototype=ce,ce.Parser=ue,new ue}();h.parser=h;var u=h,y=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=l.SV,this.getAccTitle=l.iN,this.setAccDescription=l.EI,this.getAccDescription=l.m7,this.setDiagramTitle=l.ke,this.getDiagramTitle=l.ab,this.getConfig=(0,c.K)(()=>(0,l.D7)().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{(0,c.K)(this,"RequirementDB")}getDirection(){return this.direction}setDirection(e){this.direction=e}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(e,t){return this.requirements.has(e)||this.requirements.set(e,{name:e,type:t,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(e)}getRequirements(){return this.requirements}setNewReqId(e){void 0!==this.latestRequirement&&(this.latestRequirement.requirementId=e)}setNewReqText(e){void 0!==this.latestRequirement&&(this.latestRequirement.text=e)}setNewReqRisk(e){void 0!==this.latestRequirement&&(this.latestRequirement.risk=e)}setNewReqVerifyMethod(e){void 0!==this.latestRequirement&&(this.latestRequirement.verifyMethod=e)}addElement(e){return this.elements.has(e)||(this.elements.set(e,{name:e,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),o.R.info("Added new element: ",e)),this.resetLatestElement(),this.elements.get(e)}getElements(){return this.elements}setNewElementType(e){void 0!==this.latestElement&&(this.latestElement.type=e)}setNewElementDocRef(e){void 0!==this.latestElement&&(this.latestElement.docRef=e)}addRelationship(e,t,s){this.relations.push({type:e,src:t,dst:s})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,(0,l.IU)()}setCssStyle(e,t){for(const s of e){const e=this.requirements.get(s)??this.elements.get(s);if(!t||!e)return;for(const s of t)s.includes(",")?e.cssStyles.push(...s.split(",")):e.cssStyles.push(s)}}setClass(e,t){for(const s of e){const e=this.requirements.get(s)??this.elements.get(s);if(e)for(const s of t){e.classes.push(s);const t=this.classes.get(s)?.styles;t&&e.cssStyles.push(...t)}}}defineClass(e,t){for(const s of e){let e=this.classes.get(s);void 0===e&&(e={id:s,styles:[],textStyles:[]},this.classes.set(s,e)),t&&t.forEach(function(t){if(/color/.exec(t)){const s=t.replace("fill","bgFill");e.textStyles.push(s)}e.styles.push(t)}),this.requirements.forEach(e=>{e.classes.includes(s)&&e.cssStyles.push(...t.flatMap(e=>e.split(",")))}),this.elements.forEach(e=>{e.classes.includes(s)&&e.cssStyles.push(...t.flatMap(e=>e.split(",")))})}}getClasses(){return this.classes}getData(){const e=(0,l.D7)(),t=[],s=[];for(const n of this.requirements.values()){const s=n;s.id=n.name,s.cssStyles=n.cssStyles,s.cssClasses=n.classes.join(" "),s.shape="requirementBox",s.look=e.look,s.colorIndex=t.length,t.push(s)}for(const n of this.elements.values()){const s=n;s.shape="requirementBox",s.look=e.look,s.id=n.name,s.cssStyles=n.cssStyles,s.cssClasses=n.classes.join(" "),s.colorIndex=t.length,t.push(s)}let i=0;for(const n of this.relations){const t=n.type===this.Relationships.CONTAINS,r={id:`${n.src}-${n.dst}-${i++}`,start:this.requirements.get(n.src)?.name??this.elements.get(n.src)?.name,end:this.requirements.get(n.dst)?.name??this.elements.get(n.dst)?.name,label:`<<${n.type}>>`,classes:"relationshipLine",style:["fill:none",t?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:t?"normal":"dashed",arrowTypeStart:t?"requirement_contains":"",arrowTypeEnd:t?"":"requirement_arrow",look:e.look,labelType:"markdown"};s.push(r)}return{nodes:t,edges:s,other:{},config:e,direction:this.getDirection()}}},d=(0,c.K)(e=>{const t=(0,l.zj)(),{themeVariables:s,look:i}=t,{bkgColorArray:n,borderColorArray:r}=s;if(!r?.length)return"";let a="";for(let l=0;l{const t=(0,l.zj)(),{look:s,themeVariables:i}=t,{requirementEdgeLabelBackground:n}=i;return`\n ${d(e)}\n marker {\n fill: ${e.relationColor};\n stroke: ${e.relationColor};\n }\n\n marker.cross {\n stroke: ${e.lineColor};\n }\n\n svg {\n font-family: ${e.fontFamily};\n font-size: ${e.fontSize};\n }\n\n .reqBox {\n fill: ${e.requirementBackground};\n fill-opacity: 1.0;\n stroke: ${e.requirementBorderColor};\n stroke-width: ${e.requirementBorderSize};\n }\n \n .reqTitle, .reqLabel{\n fill: ${e.requirementTextColor};\n }\n .reqLabelBox {\n fill: ${e.relationLabelBackground};\n fill-opacity: 1.0;\n }\n\n .req-title-line {\n stroke: ${e.requirementBorderColor};\n stroke-width: ${e.requirementBorderSize};\n }\n .relationshipLine {\n stroke: ${e.relationColor};\n stroke-width: ${"neo"===s?e.strokeWidth:"1px"};\n }\n .relationshipLabel {\n fill: ${e.relationLabelColor};\n }\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n }\n .edgeLabel .label rect {\n fill: ${e.edgeLabelBackground};\n }\n .edgeLabel .label text {\n fill: ${e.relationLabelColor};\n }\n .divider {\n stroke: ${e.nodeBorder};\n stroke-width: 1;\n }\n .label {\n font-family: ${e.fontFamily};\n color: ${e.nodeTextColor||e.textColor};\n }\n .label text,span {\n fill: ${e.nodeTextColor||e.textColor};\n color: ${e.nodeTextColor||e.textColor};\n }\n .labelBkg {\n background-color: ${n??e.edgeLabelBackground};\n }\n\n`},"getStyles"),E={};(0,c.V)(E,{draw:()=>p});var p=(0,c.K)(async function(e,t,s,c){o.R.info("REF0:"),o.R.info("Drawing requirement diagram (unified)",t);const{securityLevel:h,state:u,layout:y,look:d}=(0,l.D7)(),m=c.db.getData(),E=(0,i.A)(t,h);m.type=c.type,m.layoutAlgorithm=(0,r.q7)(y),m.nodeSpacing=u?.nodeSpacing??50,m.rankSpacing=u?.rankSpacing??50,m.markers="neo"===d?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],m.diagramId=t,await(0,r.XX)(m,E);a._K.insertTitle(E,"requirementDiagramTitleText",u?.titleTopMargin??25,c.db.getDiagramTitle()),(0,n.P)(E,8,"requirementDiagram",u?.useMaxWidth??!0)},"draw"),R={parser:u,get db(){return new y},renderer:E,styles:m}}}]); \ No newline at end of file diff --git a/assets/js/6571.832f3810.js b/assets/js/6571.832f3810.js new file mode 100644 index 000000000..a9e8d4506 --- /dev/null +++ b/assets/js/6571.832f3810.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[6571],{77454(t,e,a){function r(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}a.d(e,{S:()=>r}),(0,a(86827).K)(r,"populateCommonDb")},76571(t,e,a){a.d(e,{diagram:()=>z});var r=a(77454),n=a(5637),i=a(16459),s=a(76385),o=a(31293),c=a(86827),l=a(78731),d={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},g={axes:[],curves:[],options:d},u=structuredClone(g),p=s.UI.radar,h=(0,c.K)(()=>(0,i.$t)({...p,...(0,s.zj)().radar}),"getConfig"),x=(0,c.K)(()=>u.axes,"getAxes"),m=(0,c.K)(()=>u.curves,"getCurves"),$=(0,c.K)(()=>u.options,"getOptions"),f=(0,c.K)(t=>{u.axes=t.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),v=(0,c.K)(t=>{u.curves=t.map(t=>({name:t.name,label:t.label??t.name,entries:y(t.entries)}))},"setCurves"),y=(0,c.K)(t=>{if(null==t[0].axis)return t.map(t=>t.value);const e=x();if(0===e.length)throw new Error("Axes must be populated before curves for reference entries");return e.map(e=>{const a=t.find(t=>t.axis?.$refText===e.name);if(void 0===a)throw new Error("Missing entry for axis "+e.label);return a.value})},"computeCurveEntries"),w={getAxes:x,getCurves:m,getOptions:$,setAxes:f,setCurves:v,setOptions:(0,c.K)(t=>{const e=t.reduce((t,e)=>(t[e.name]=e,t),{});u.options={showLegend:e.showLegend?.value??d.showLegend,ticks:e.ticks?.value??d.ticks,max:e.max?.value??d.max,min:e.min?.value??d.min,graticule:e.graticule?.value??d.graticule},u.options.ticks>32&&(o.R.warn(`Radar diagram ticks (${u.options.ticks}) exceeds maximum allowed (32). Using 32 instead.`),u.options.ticks=32)},"setOptions"),getConfig:h,clear:(0,c.K)(()=>{(0,s.IU)(),u=structuredClone(g)},"clear"),setAccTitle:s.SV,getAccTitle:s.iN,setDiagramTitle:s.ke,getDiagramTitle:s.ab,getAccDescription:s.m7,setAccDescription:s.EI},b=(0,c.K)(t=>{(0,r.S)(t,w);const{axes:e,curves:a,options:n}=t;w.setAxes(e),w.setCurves(a),w.setOptions(n)},"populate"),C={parse:(0,c.K)(async t=>{const e=await(0,l.qg)("radar",t);o.R.debug(e),b(e)},"parse")},k=(0,c.K)((t,e,a,r)=>{const i=r.db,s=i.getAxes(),o=i.getCurves(),c=i.getOptions(),l=i.getConfig(),d=i.getDiagramTitle(),g=(0,n.D)(e),u=K(g,l),p=c.max??Math.max(...o.map(t=>Math.max(...t.entries))),h=c.min,x=Math.min(l.width,l.height)/2;M(u,s,x,c.ticks,c.graticule),L(u,s,x,l),T(u,s,o,h,p,c.graticule,l),S(u,o,c.showLegend,l),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-l.height/2-l.marginTop)},"draw"),K=(0,c.K)((t,e)=>{const a=e.width+e.marginLeft+e.marginRight,r=e.height+e.marginTop+e.marginBottom,n=e.marginLeft+e.width/2,i=e.marginTop+e.height/2;return(0,s.a$)(t,r,a,e.useMaxWidth??!0),t.attr("viewBox",`0 0 ${a} ${r}`).attr("overflow","visible"),t.append("g").attr("transform",`translate(${n}, ${i})`)},"drawFrame"),M=(0,c.K)((t,e,a,r,n)=>{if("circle"===n)for(let i=0;i{const a=2*e*Math.PI/n-Math.PI/2;return`${s*Math.cos(a)},${s*Math.sin(a)}`}).join(" ");t.append("polygon").attr("points",o).attr("class","radarGraticule")}}},"drawGraticule"),L=(0,c.K)((t,e,a,r)=>{const n=e.length;for(let i=0;i.01?"start":c<-.01?"end":"middle",g=l>.01?"hanging":l<-.01?"auto":"central",u=4;t.append("text").text(s).attr("x",a*r.axisLabelFactor*c+u*c).attr("y",a*r.axisLabelFactor*l+u*l).attr("text-anchor",d).attr("dominant-baseline",g).attr("class","radarAxisLabel")}},"drawAxes");function T(t,e,a,r,n,i,s){const o=e.length,c=Math.min(s.width,s.height)/2;a.forEach((e,a)=>{if(e.entries.length!==o)return;const l=e.entries.map((t,e)=>{const a=2*Math.PI*e/o-Math.PI/2,i=A(t,r,n,c);return{x:i*Math.cos(a),y:i*Math.sin(a)}});"circle"===i?t.append("path").attr("d",O(l,s.curveTension)).attr("class",`radarCurve-${a}`):"polygon"===i&&t.append("polygon").attr("points",l.map(t=>`${t.x},${t.y}`).join(" ")).attr("class",`radarCurve-${a}`)})}function A(t,e,a,r){return r*(Math.min(Math.max(t,e),a)-e)/(a-e)}function O(t,e){const a=t.length;let r=`M${t[0].x},${t[0].y}`;for(let n=0;n{const r=t.append("g").attr("transform",`translate(${n}, ${i+20*a})`);r.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${a}`),r.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(e.label)})}(0,c.K)(T,"drawCurves"),(0,c.K)(A,"relativeRadius"),(0,c.K)(O,"closedRoundCurve"),(0,c.K)(S,"drawLegend");var I={draw:k},D=(0,c.K)((t,e)=>{let a="";for(let r=0;r{const e=(0,s.P$)(),a=(0,s.zj)(),r=(0,i.$t)(e,a.themeVariables);return{themeVariables:r,radarOptions:(0,i.$t)(r.radar,t)}},"buildRadarStyleOptions"),z={parser:C,db:w,renderer:I,styles:(0,c.K)(({radar:t}={})=>{const{themeVariables:e,radarOptions:a}=R(t);return`\n\t.radarTitle {\n\t\tfont-size: ${e.fontSize};\n\t\tcolor: ${e.titleColor};\n\t\tdominant-baseline: hanging;\n\t\ttext-anchor: middle;\n\t}\n\t.radarAxisLine {\n\t\tstroke: ${a.axisColor};\n\t\tstroke-width: ${a.axisStrokeWidth};\n\t}\n\t.radarAxisLabel {\n\t\tfont-size: ${a.axisLabelFontSize}px;\n\t\tcolor: ${a.axisColor};\n\t}\n\t.radarGraticule {\n\t\tfill: ${a.graticuleColor};\n\t\tfill-opacity: ${a.graticuleOpacity};\n\t\tstroke: ${a.graticuleColor};\n\t\tstroke-width: ${a.graticuleStrokeWidth};\n\t}\n\t.radarLegendText {\n\t\ttext-anchor: start;\n\t\tfont-size: ${a.legendFontSize}px;\n\t\tdominant-baseline: hanging;\n\t}\n\t${D(e,a)}\n\t`},"styles")}}}]); \ No newline at end of file diff --git a/assets/js/6789.d49f557e.js b/assets/js/6789.d49f557e.js new file mode 100644 index 000000000..e510e7eac --- /dev/null +++ b/assets/js/6789.d49f557e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[6789],{15350(t,r,e){e.d(r,{m:()=>n});var o=e(86827),n=class{constructor(t){this.init=t,this.records=this.init()}static{(0,o.K)(this,"ImperativeState")}reset(){this.records=this.init()}}},77454(t,r,e){function o(t,r){t.accDescr&&r.setAccDescription?.(t.accDescr),t.accTitle&&r.setAccTitle?.(t.accTitle),t.title&&r.setDiagramTitle?.(t.title)}e.d(r,{S:()=>o}),(0,e(86827).K)(o,"populateCommonDb")},46789(t,r,e){e.d(r,{diagram:()=>vt});var o=e(15350),n=e(77454),a=e(16459),i=e(76385),s=e(31293),c=e(86827),d=e(78731),h=e(70451),$={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},m=i.UI.gitGraph,l=(0,c.K)(()=>(0,a.$t)({...m,...(0,i.zj)().gitGraph}),"getConfig"),g=new o.m(()=>{const t=l(),r=t.mainBranchName,e=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:e}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function p(){return(0,a.yT)({length:7})}function y(t,r){const e=Object.create(null);return t.reduce((t,o)=>{const n=r(o);return e[n]||(e[n]=!0,t.push(o)),t},[])}(0,c.K)(p,"getID"),(0,c.K)(y,"uniqBy");var f=(0,c.K)(function(t){g.records.direction=t},"setDirection"),x=(0,c.K)(function(t){s.R.debug("options str",t),t=t?.trim(),t=t||"{}";try{g.records.options=JSON.parse(t)}catch(r){s.R.error("error while parsing gitGraph options",r.message)}},"setOptions"),u=(0,c.K)(function(){return g.records.options},"getOptions"),b=(0,c.K)(function(t){let r=t.msg,e=t.id;const o=t.type;let n=t.tags;s.R.info("commit",r,e,o,n),s.R.debug("Entering commit:",r,e,o,n);const a=l();e=i.Y2.sanitizeText(e,a),r=i.Y2.sanitizeText(r,a),n=n?.map(t=>i.Y2.sanitizeText(t,a));const c={id:e||g.records.seq+"-"+p(),message:r,seq:g.records.seq++,type:o??$.NORMAL,tags:n??[],parents:null==g.records.head?[]:[g.records.head.id],branch:g.records.currBranch};g.records.head=c,s.R.info("main branch",a.mainBranchName),g.records.commits.has(c.id)&&s.R.warn(`Commit ID ${c.id} already exists`),g.records.commits.set(c.id,c),g.records.branches.set(g.records.currBranch,c.id),s.R.debug("in pushCommit "+c.id)},"commit"),w=(0,c.K)(function(t){let r=t.name;const e=t.order;if(r=i.Y2.sanitizeText(r,l()),g.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);g.records.branches.set(r,null!=g.records.head?g.records.head.id:null),g.records.branchConfig.set(r,{name:r,order:e}),E(r),s.R.debug("in createBranch")},"branch"),k=(0,c.K)(t=>{let r=t.branch,e=t.id;const o=t.type,n=t.tags,a=l();r=i.Y2.sanitizeText(r,a),e&&(e=i.Y2.sanitizeText(e,a));const c=g.records.branches.get(g.records.currBranch),d=g.records.branches.get(r),h=c?g.records.commits.get(c):void 0,m=d?g.records.commits.get(d):void 0;if(h&&m&&h.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(g.records.currBranch===r){const t=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},t}if(void 0===h||!h){const t=new Error(`Incorrect usage of "merge". Current branch (${g.records.currBranch})has no commits`);throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},t}if(!g.records.branches.has(r)){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},t}if(void 0===m||!m){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},t}if(h===m){const t=new Error('Incorrect usage of "merge". Both branches have same head');throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},t}if(e&&g.records.commits.has(e)){const t=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom id");throw t.hash={text:`merge ${r} ${e} ${o} ${n?.join(" ")}`,token:`merge ${r} ${e} ${o} ${n?.join(" ")}`,expected:[`merge ${r} ${e}_UNIQUE ${o} ${n?.join(" ")}`]},t}const y=d||"",f={id:e||`${g.records.seq}-${p()}`,message:`merged branch ${r} into ${g.records.currBranch}`,seq:g.records.seq++,parents:null==g.records.head?[]:[g.records.head.id,y],branch:g.records.currBranch,type:$.MERGE,customType:o,customId:!!e,tags:n??[]};g.records.head=f,g.records.commits.set(f.id,f),g.records.branches.set(g.records.currBranch,f.id),s.R.debug(g.records.branches),s.R.debug("in mergeBranch")},"merge"),B=(0,c.K)(function(t){let r=t.id,e=t.targetId,o=t.tags,n=t.parent;s.R.debug("Entering cherryPick:",r,e,o);const a=l();if(r=i.Y2.sanitizeText(r,a),e=i.Y2.sanitizeText(e,a),o=o?.map(t=>i.Y2.sanitizeText(t,a)),n=i.Y2.sanitizeText(n,a),!r||!g.records.commits.has(r)){const t=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const c=g.records.commits.get(r);if(void 0===c||!c)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(n&&(!Array.isArray(c.parents)||!c.parents.includes(n))){throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.")}const d=c.branch;if(c.type===$.MERGE&&!n){throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.")}if(!e||!g.records.commits.has(e)){if(d===g.records.currBranch){const t=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const t=g.records.branches.get(g.records.currBranch);if(void 0===t||!t){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${g.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const a=g.records.commits.get(t);if(void 0===a||!a){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${g.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const i={id:g.records.seq+"-"+p(),message:`cherry-picked ${c?.message} into ${g.records.currBranch}`,seq:g.records.seq++,parents:null==g.records.head?[]:[g.records.head.id,c.id],branch:g.records.currBranch,type:$.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${c.id}${c.type===$.MERGE?`|parent:${n}`:""}`]};g.records.head=i,g.records.commits.set(i.id,i),g.records.branches.set(g.records.currBranch,i.id),s.R.debug(g.records.branches),s.R.debug("in cherryPick")}},"cherryPick"),E=(0,c.K)(function(t){if(t=i.Y2.sanitizeText(t,l()),!g.records.branches.has(t)){const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}{g.records.currBranch=t;const r=g.records.branches.get(g.records.currBranch);g.records.head=void 0!==r&&r?g.records.commits.get(r)??null:null}},"checkout");function C(t,r,e){const o=t.indexOf(r);-1===o?t.push(e):t.splice(o,1,e)}function T(t){const r=t.reduce((t,r)=>t.seq>r.seq?t:r,t[0]);let e="";t.forEach(function(t){e+=t===r?"\t*":"\t|"});const o=[e,r.id,r.seq];for(const n in g.records.branches)g.records.branches.get(n)===r.id&&o.push(n);if(s.R.debug(o.join(" ")),r.parents&&2==r.parents.length&&r.parents[0]&&r.parents[1]){const e=g.records.commits.get(r.parents[0]);C(t,r,e),r.parents[1]&&t.push(g.records.commits.get(r.parents[1]))}else{if(0==r.parents.length)return;if(r.parents[0]){const e=g.records.commits.get(r.parents[0]);C(t,r,e)}}T(t=y(t,t=>t.id))}(0,c.K)(C,"upsert"),(0,c.K)(T,"prettyPrintCommitHistory");var L=(0,c.K)(function(){s.R.debug(g.records.commits);T([I()[0]])},"prettyPrint"),K=(0,c.K)(function(){g.reset(),(0,i.IU)()},"clear"),M=(0,c.K)(function(){return[...g.records.branchConfig.values()].map((t,r)=>null!==t.order&&void 0!==t.order?t:{...t,order:parseFloat(`0.${r}`)}).sort((t,r)=>(t.order??0)-(r.order??0)).map(({name:t})=>({name:t}))},"getBranchesAsObjArray"),R=(0,c.K)(function(){return g.records.branches},"getBranches"),v=(0,c.K)(function(){return g.records.commits},"getCommits"),I=(0,c.K)(function(){const t=[...g.records.commits.values()];return t.forEach(function(t){s.R.debug(t.id)}),t.sort((t,r)=>t.seq-r.seq),t},"getCommitsArray"),P={commitType:$,getConfig:l,setDirection:f,setOptions:x,getOptions:u,commit:b,branch:w,merge:k,cherryPick:B,checkout:E,prettyPrint:L,clear:K,getBranchesAsObjArray:M,getBranches:R,getCommits:v,getCommitsArray:I,getCurrentBranch:(0,c.K)(function(){return g.records.currBranch},"getCurrentBranch"),getDirection:(0,c.K)(function(){return g.records.direction},"getDirection"),getHead:(0,c.K)(function(){return g.records.head},"getHead"),setAccTitle:i.SV,getAccTitle:i.iN,getAccDescription:i.m7,setAccDescription:i.EI,setDiagramTitle:i.ke,getDiagramTitle:i.ab},O=(0,c.K)((t,r)=>{(0,n.S)(t,r),t.dir&&r.setDirection(t.dir);for(const e of t.statements)A(e,r)},"populate"),A=(0,c.K)((t,r)=>{const e={Commit:(0,c.K)(t=>r.commit(G(t)),"Commit"),Branch:(0,c.K)(t=>r.branch(S(t)),"Branch"),Merge:(0,c.K)(t=>r.merge(D(t)),"Merge"),Checkout:(0,c.K)(t=>r.checkout(H(t)),"Checkout"),CherryPicking:(0,c.K)(t=>r.cherryPick(W(t)),"CherryPicking")}[t.$type];e?e(t):s.R.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),G=(0,c.K)(t=>({id:t.id,msg:t.message??"",type:void 0!==t.type?$[t.type]:$.NORMAL,tags:t.tags??void 0}),"parseCommit"),S=(0,c.K)(t=>({name:t.name,order:t.order??0}),"parseBranch"),D=(0,c.K)(t=>({branch:t.branch,id:t.id??"",type:void 0!==t.type?$[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),H=(0,c.K)(t=>t.branch,"parseCheckout"),W=(0,c.K)(t=>({id:t.id,targetId:"",tags:0===t.tags?.length?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),q={parse:(0,c.K)(async t=>{const r=await(0,d.qg)("gitGraph",t);s.R.debug(r),O(r,P)},"parse")};var z=10,_=40,Y=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),j=new Set(["redux-color","redux-dark-color"]),N=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),F=(0,c.K)((t,r,e=!1)=>e&&t>0?(t-1)%(r-1)+1:t%r,"calcColorIndex"),V=new Map,U=new Map,J=new Map,Q=[],X=0,Z="LR",tt=(0,c.K)(()=>{V.clear(),U.clear(),J.clear(),X=0,Q=[],Z="LR"},"clear"),rt=(0,c.K)(t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof t?t.split(/\\n|\n|/gi):t).forEach(t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=t.trim(),r.appendChild(e)}),r},"drawText"),et=(0,c.K)(t=>{let r,e,o;return"BT"===Z?(e=(0,c.K)((t,r)=>t<=r,"comparisonFunc"),o=1/0):(e=(0,c.K)((t,r)=>t>=r,"comparisonFunc"),o=0),t.forEach(t=>{const n="TB"===Z||"BT"==Z?U.get(t)?.y:U.get(t)?.x;void 0!==n&&e(n,o)&&(r=t,o=n)}),r},"findClosestParent"),ot=(0,c.K)(t=>{let r="",e=1/0;return t.forEach(t=>{const o=U.get(t).y;o<=e&&(r=t,e=o)}),r||void 0},"findClosestParentBT"),nt=(0,c.K)((t,r,e)=>{let o=e,n=e;const a=[];t.forEach(t=>{const e=r.get(t);if(!e)throw new Error(`Commit not found for key ${t}`);e.parents.length?(o=it(e),n=Math.max(o,n)):a.push(e),st(e,o)}),o=n,a.forEach(t=>{ct(t,o,e)}),t.forEach(t=>{const e=r.get(t);if(e?.parents.length){const t=ot(e.parents);o=U.get(t).y-_,o<=n&&(n=o);const r=V.get(e.branch).pos,a=o-z;U.set(e.id,{x:r,y:a})}})},"setParallelBTPos"),at=(0,c.K)(t=>{const r=et(t.parents.filter(t=>null!==t));if(!r)throw new Error(`Closest parent not found for commit ${t.id}`);const e=U.get(r)?.y;if(void 0===e)throw new Error(`Closest parent position not found for commit ${t.id}`);return e},"findClosestParentPos"),it=(0,c.K)(t=>at(t)+_,"calculateCommitPosition"),st=(0,c.K)((t,r)=>{const e=V.get(t.branch);if(!e)throw new Error(`Branch not found for commit ${t.id}`);const o=e.pos,n=r+z;return U.set(t.id,{x:o,y:n}),{x:o,y:n}},"setCommitPosition"),ct=(0,c.K)((t,r,e)=>{const o=V.get(t.branch);if(!o)throw new Error(`Branch not found for commit ${t.id}`);const n=r+e,a=o.pos;U.set(t.id,{x:a,y:n})},"setRootPosition"),dt=(0,c.K)((t,r,e,o,n,a)=>{const{theme:s}=(0,i.D7)(),c=Y.has(s??""),d=j.has(s??""),h=N.has(s??"");if(a===$.HIGHLIGHT)t.append("rect").attr("x",e.x-10+(c?3:0)).attr("y",e.y-10+(c?3:0)).attr("width",c?14:20).attr("height",c?14:20).attr("class",`commit ${r.id} commit-highlight${F(n,8,d)} ${o}-outer`),t.append("rect").attr("x",e.x-6+(c?2:0)).attr("y",e.y-6+(c?2:0)).attr("width",c?8:12).attr("height",c?8:12).attr("class",`commit ${r.id} commit${F(n,8,d)} ${o}-inner`);else if(a===$.CHERRY_PICK)t.append("circle").attr("cx",e.x).attr("cy",e.y).attr("r",c?7:10).attr("class",`commit ${r.id} ${o}`),t.append("circle").attr("cx",e.x-3).attr("cy",e.y+2).attr("r",c?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),t.append("circle").attr("cx",e.x+3).attr("cy",e.y+2).attr("r",c?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),t.append("line").attr("x1",e.x+3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),t.append("line").attr("x1",e.x-3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`);else{const i=t.append("circle");if(i.attr("cx",e.x),i.attr("cy",e.y),i.attr("r",c?7:10),i.attr("class",`commit ${r.id} commit${F(n,8,d)}`),a===$.MERGE){const a=t.append("circle");a.attr("cx",e.x),a.attr("cy",e.y),a.attr("r",c?5:6),a.attr("class",`commit ${o} ${r.id} commit${F(n,8,d)}`)}if(a===$.REVERSE){const a=c?4:5;t.append("path").attr("d",`M ${e.x-a},${e.y-a}L${e.x+a},${e.y+a}M${e.x-a},${e.y+a}L${e.x+a},${e.y-a}`).attr("class",`commit ${o} ${r.id} commit${F(n,8,d)}`)}}},"drawCommitBullet"),ht=(0,c.K)((t,r,e,o,n)=>{if(r.type!==$.CHERRY_PICK&&(r.customId&&r.type===$.MERGE||r.type!==$.MERGE)&&n.showCommitLabel){const a=t.append("g"),i=a.insert("rect").attr("class","commit-label-bkg"),s=a.append("text").attr("x",o).attr("y",e.y+25).attr("class","commit-label").text(r.id),c=s.node()?.getBBox();if(c&&(i.attr("x",e.posWithOffset-c.width/2-2).attr("y",e.y+13.5).attr("width",c.width+4).attr("height",c.height+4),"TB"===Z||"BT"===Z?(i.attr("x",e.x-(c.width+16+5)).attr("y",e.y-12),s.attr("x",e.x-(c.width+16)).attr("y",e.y+c.height-12)):s.attr("x",e.posWithOffset-c.width/2),n.rotateCommitLabel))if("TB"===Z||"BT"===Z)s.attr("transform","rotate(-45, "+e.x+", "+e.y+")"),i.attr("transform","rotate(-45, "+e.x+", "+e.y+")");else{const t=-7.5-(c.width+10)/25*9.5,r=10+c.width/25*8.5;a.attr("transform","translate("+t+", "+r+") rotate(-45, "+o+", "+e.y+")")}}},"drawCommitLabel"),$t=(0,c.K)((t,r,e,o)=>{if(r.tags.length>0){let n=0,a=0,i=0;const s=[];for(const o of r.tags.reverse()){const r=t.insert("polygon"),c=t.append("circle"),d=t.append("text").attr("y",e.y-16-n).attr("class","tag-label").text(o),h=d.node()?.getBBox();if(!h)throw new Error("Tag bbox not found");a=Math.max(a,h.width),i=Math.max(i,h.height),d.attr("x",e.posWithOffset-h.width/2),s.push({tag:d,hole:c,rect:r,yOffset:n}),n+=20}for(const{tag:t,hole:r,rect:c,yOffset:d}of s){const n=i/2,s=e.y-19.2-d;if(c.attr("class","tag-label-bkg").attr("points",`\n ${o-a/2-2},${s+2} \n ${o-a/2-2},${s-2}\n ${e.posWithOffset-a/2-4},${s-n-2}\n ${e.posWithOffset+a/2+4},${s-n-2}\n ${e.posWithOffset+a/2+4},${s+n+2}\n ${e.posWithOffset-a/2-4},${s+n+2}`),r.attr("cy",s).attr("cx",o-a/2+2).attr("r",1.5).attr("class","tag-hole"),"TB"===Z||"BT"===Z){const i=o+d;c.attr("class","tag-label-bkg").attr("points",`\n ${e.x},${i+2}\n ${e.x},${i-2}\n ${e.x+z},${i-n-2}\n ${e.x+z+a+4},${i-n-2}\n ${e.x+z+a+4},${i+n+2}\n ${e.x+z},${i+n+2}`).attr("transform","translate(12,12) rotate(45, "+e.x+","+o+")"),r.attr("cx",e.x+2).attr("cy",i).attr("transform","translate(12,12) rotate(45, "+e.x+","+o+")"),t.attr("x",e.x+5).attr("y",i+3).attr("transform","translate(14,14) rotate(45, "+e.x+","+o+")")}}}},"drawCommitTags"),mt=(0,c.K)(t=>{switch(t.customType??t.type){case $.NORMAL:return"commit-normal";case $.REVERSE:return"commit-reverse";case $.HIGHLIGHT:return"commit-highlight";case $.MERGE:return"commit-merge";case $.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),lt=(0,c.K)((t,r,e,o)=>{const n={x:0,y:0};if(!(t.parents.length>0)){if("TB"===r)return 30;if("BT"===r){return(o.get(t.id)??n).y-_}return 0}{const e=et(t.parents);if(e){const a=o.get(e)??n;if("TB"===r)return a.y+_;if("BT"===r){return(o.get(t.id)??n).y-_}return a.x+_}}return 0},"calculatePosition"),gt=(0,c.K)((t,r,e)=>{const o="BT"===Z&&e?r:r+z,n=V.get(t.branch)?.pos,a="TB"===Z||"BT"===Z?V.get(t.branch)?.pos:o;if(void 0===a||void 0===n)throw new Error(`Position were undefined for commit ${t.id}`);const s=Y.has((0,i.D7)().theme??"");return{x:a,y:"TB"===Z||"BT"===Z?o:n+(s?7:-2),posWithOffset:o}},"getCommitPosition"),pt=(0,c.K)((t,r,e,o)=>{const n=t.append("g").attr("class","commit-bullets"),a=t.append("g").attr("class","commit-labels");let i="TB"===Z||"BT"===Z?30:0;const s=[...r.keys()],d=o.parallelCommits??!1,h=(0,c.K)((t,e)=>{const o=r.get(t)?.seq,n=r.get(e)?.seq;return void 0!==o&&void 0!==n?o-n:0},"sortKeys");let $=s.sort(h);"BT"===Z&&(d&&nt($,r,i),$=$.reverse()),$.forEach(t=>{const s=r.get(t);if(!s)throw new Error(`Commit not found for key ${t}`);d&&(i=lt(s,Z,i,U));const c=gt(s,i,d);if(e){const t=mt(s),r=s.customType??s.type,e=V.get(s.branch)?.index??0;dt(n,s,c,t,e,r),ht(a,s,c,i,o),$t(a,s,c,i)}"TB"===Z||"BT"===Z?U.set(s.id,{x:c.x,y:c.posWithOffset}):U.set(s.id,{x:c.posWithOffset,y:c.y}),i="BT"===Z&&d?i+_:i+_+z,i>X&&(X=i)})},"drawCommits"),yt=(0,c.K)((t,r,e,o,n)=>{const a=("TB"===Z||"BT"===Z?e.xt.branch===a,"isOnBranchToGetCurve"),s=(0,c.K)(e=>e.seq>t.seq&&e.seqs(t)&&i(t))},"shouldRerouteArrow"),ft=(0,c.K)((t,r,e=0)=>{const o=t+Math.abs(t-r)/2;if(e>5)return o;if(Q.every(t=>Math.abs(t-o)>=10))return Q.push(o),o;const n=Math.abs(t-r);return ft(t,r-n/5,e+1)},"findLane"),xt=(0,c.K)((t,r,e,o)=>{const{theme:n}=(0,i.D7)(),a=j.has(n??""),s=U.get(r.id),c=U.get(e.id);if(void 0===s||void 0===c)throw new Error(`Commit positions not found for commits ${r.id} and ${e.id}`);const d=yt(r,e,s,c,o);let h,m="",l="",g=0,p=0,y=V.get(e.branch)?.index;if(e.type===$.MERGE&&r.id!==e.parents[0]&&(y=V.get(r.branch)?.index),d){m="A 10 10, 0, 0, 0,",l="A 10 10, 0, 0, 1,",g=10,p=10;const t=s.yc.x&&(m="A 20 20, 0, 0, 0,",l="A 20 20, 0, 0, 1,",g=20,p=20,h=e.type===$.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${c.y-g} ${l} ${s.x-p} ${c.y} L ${c.x} ${c.y}`:`M ${s.x} ${s.y} L ${c.x+g} ${s.y} ${m} ${c.x} ${s.y+p} L ${c.x} ${c.y}`),s.x===c.x&&(h=`M ${s.x} ${s.y} L ${c.x} ${c.y}`)):"BT"===Z?(s.xc.x&&(m="A 20 20, 0, 0, 0,",l="A 20 20, 0, 0, 1,",g=20,p=20,h=e.type===$.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${c.y+g} ${m} ${s.x-p} ${c.y} L ${c.x} ${c.y}`:`M ${s.x} ${s.y} L ${c.x+g} ${s.y} ${l} ${c.x} ${s.y-p} L ${c.x} ${c.y}`),s.x===c.x&&(h=`M ${s.x} ${s.y} L ${c.x} ${c.y}`)):(s.yc.y&&(h=e.type===$.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${c.x-g} ${s.y} ${m} ${c.x} ${s.y-p} L ${c.x} ${c.y}`:`M ${s.x} ${s.y} L ${s.x} ${c.y+g} ${l} ${s.x+p} ${c.y} L ${c.x} ${c.y}`),s.y===c.y&&(h=`M ${s.x} ${s.y} L ${c.x} ${c.y}`));if(void 0===h)throw new Error("Line definition not found");t.append("path").attr("d",h).attr("class","arrow arrow"+F(y,8,a))},"drawArrow"),ut=(0,c.K)((t,r)=>{const e=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach(t=>{const o=r.get(t);o.parents&&o.parents.length>0&&o.parents.forEach(t=>{xt(e,r.get(t),o,r)})})},"drawArrows"),bt=(0,c.K)((t,r,e,o)=>{const{look:n,theme:a,themeVariables:s}=(0,i.D7)(),{dropShadow:c,THEME_COLOR_LIMIT:d}=s,h=Y.has(a??""),$=j.has(a??""),m=t.append("g");r.forEach((t,r)=>{const a=F(r,h?d:8,$),i=V.get(t.name)?.pos;if(void 0===i)throw new Error(`Position not found for branch ${t.name}`);const s="TB"===Z||"BT"===Z?i:h?i+6+1:i-2,l=m.append("line");l.attr("x1",0),l.attr("y1",s),l.attr("x2",X),l.attr("y2",s),l.attr("class","branch branch"+a),"TB"===Z?(l.attr("y1",30),l.attr("x1",i),l.attr("y2",X),l.attr("x2",i)):"BT"===Z&&(l.attr("y1",X),l.attr("x1",i),l.attr("y2",30),l.attr("x2",i)),Q.push(s);const g=t.name,p=rt(g),y=m.insert("rect"),f=m.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+a);f.node().appendChild(p);const x=p.getBBox(),u=h?0:4,b=h?16:0,w=h?12:0;"neo"===n&&y.attr("data-look","neo"),y.attr("class","branchLabelBkg label"+a).attr("style","neo"===n?`filter:${h?`url(#${o}-drop-shadow)`:c}`:"").attr("rx",u).attr("ry",u).attr("x",-x.width-4-(!0===e.rotateCommitLabel?30:0)).attr("y",-x.height/2+10).attr("width",x.width+18+b).attr("height",x.height+4+w),f.attr("transform","translate("+(-x.width-14-(!0===e.rotateCommitLabel?30:0)+b/2)+", "+(s-x.height/2-2)+")"),"TB"===Z?(y.attr("x",i-x.width/2-10).attr("y",0),f.attr("transform","translate("+(i-x.width/2-5)+", 0)"),h&&(y.attr("transform",`translate(${-b/2-3}, ${-w-10})`),f.attr("transform","translate("+(i-x.width/2-5)+", "+(2*-w+7)+")"))):"BT"===Z?(y.attr("x",i-x.width/2-10).attr("y",X),f.attr("transform","translate("+(i-x.width/2-5)+", "+X+")"),h&&(y.attr("transform",`translate(${-b/2-3}, ${w+10})`),f.attr("transform","translate("+(i-x.width/2-5)+", "+(X+2*w+4)+")"))):y.attr("transform","translate(-19, "+(s-12-w/2)+")")})},"drawBranches"),wt=(0,c.K)(function(t,r,e,o,n){return V.set(t,{pos:r,index:e}),r+=50+(n?40:0)+("TB"===Z||"BT"===Z?o.width/2:0)},"setBranchPosition"),kt={draw:(0,c.K)(function(t,r,e,o){tt(),s.R.debug("in gitgraph renderer",t+"\n","id:",r,e);const n=o.db;if(!n.getConfig)return void s.R.error("getConfig method is not available on db");const c=n.getConfig(),d=c.rotateCommitLabel??!1;J=n.getCommits();const $=n.getBranchesAsObjArray();Z=n.getDirection();const m=(0,h.Ltv)(`[id="${r}"]`),{look:l,theme:g,themeVariables:p}=(0,i.D7)(),{useGradient:y,gradientStart:f,gradientStop:x,filterColor:u}=p;if(y){const t=m.append("defs").append("linearGradient").attr("id",r+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");t.append("stop").attr("offset","0%").attr("stop-color",f).attr("stop-opacity",1),t.append("stop").attr("offset","100%").attr("stop-color",x).attr("stop-opacity",1)}"neo"===l&&Y.has(g??"")&&m.append("defs").append("filter").attr("id",r+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",u);let b=0;$.forEach((t,r)=>{const e=rt(t.name),o=m.append("g"),n=o.insert("g").attr("class","branchLabel"),a=n.insert("g").attr("class","label branch-label");a.node()?.appendChild(e);const i=e.getBBox();b=wt(t.name,b,r,i,d),a.remove(),n.remove(),o.remove()}),pt(m,J,!1,c),c.showBranches&&bt(m,$,c,r),ut(m,J),pt(m,J,!0,c),a._K.insertTitle(m,"gitTitleText",c.titleTopMargin??0,n.getDiagramTitle()),(0,i.mj)(void 0,m,c.diagramPadding,c.useMaxWidth)},"draw")};var Bt=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),Et=new Set(["redux-color","redux-dark-color"]),Ct=new Set(["neo","neo-dark"]),Tt=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),Lt=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),Kt=(0,c.K)(t=>{const{svgId:r}=t;let e="";if(t.useGradient&&r)for(let o=0;o{const r=(0,i.zj)(),{theme:e,themeVariables:o}=r,{borderColorArray:n}=o,a=Bt.has(e);if(Ct.has(e)){let r="";for(let e=0;e`${Array.from({length:t.THEME_COLOR_LIMIT},(t,r)=>r).map(r=>{const e=r%8;return`\n .branch-label${r} { fill: ${t["gitBranchLabel"+e]}; }\n .commit${r} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; }\n .commit-highlight${r} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; }\n .label${r} { fill: ${t["git"+e]}; }\n .arrow${r} { stroke: ${t["git"+e]}; }\n `}).join("\n")}`,"normalTheme"),vt={parser:q,db:P,renderer:kt,styles:(0,c.K)(t=>{const r=(0,i.zj)(),{theme:e}=r,o=Lt.has(e);return`\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n \n ${o?Mt(t):Rt(t)}\n\n .branch {\n stroke-width: ${t.strokeWidth};\n stroke: ${t.commitLineColor??t.lineColor};\n stroke-dasharray: ${o?"4 2":"2"};\n }\n .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${o?t.nodeBorder:t.commitLabelColor}; ${o?`font-weight:${t.noteFontWeight};`:""}}\n .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${o?"transparent":t.commitLabelBackground}; opacity: ${o?"":.5}; }\n .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}\n .tag-label-bkg { fill: ${o?t.mainBkg:t.tagLabelBackground}; stroke: ${o?t.nodeBorder:t.tagLabelBorder}; ${o?`filter:${t.dropShadow}`:""} }\n .tag-hole { fill: ${t.textColor}; }\n\n .commit-merge {\n stroke: ${o?t.mainBkg:t.primaryColor};\n fill: ${o?t.mainBkg:t.primaryColor};\n }\n .commit-reverse {\n stroke: ${o?t.mainBkg:t.primaryColor};\n fill: ${o?t.mainBkg:t.primaryColor};\n stroke-width: ${o?t.strokeWidth:3};\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ${o?t.mainBkg:t.primaryColor};\n fill: ${o?t.mainBkg:t.primaryColor};\n }\n\n .arrow {\n /* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */\n stroke-width: ${Bt.has(e)?t.strokeWidth:8};\n stroke-linecap: round;\n fill: none\n }\n .gitTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n`},"getStyles")}}}]); \ No newline at end of file diff --git a/assets/js/6803.bd1bf9d8.js b/assets/js/6803.bd1bf9d8.js new file mode 100644 index 000000000..70282fb6d --- /dev/null +++ b/assets/js/6803.bd1bf9d8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[6803],{66803(t,e,i){i.d(e,{diagram:()=>C});var n=i(5637),s=i(16459),a=i(76385),r=(i(31293),i(86827)),h=i(52274),o=function(){var t=(0,r.K)(function(t,e,i,n){for(i=i||{},n=t.length;n--;i[t[n]]=e);return i},"o"),e=[1,4],i=[1,14],n=[1,12],s=[1,13],a=[6,7,8],h=[1,20],o=[1,18],l=[1,19],c=[6,7,11],u=[1,6,13,14],d=[1,23],y=[1,24],p=[1,6,7,11,13,14],g={trace:(0,r.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:(0,r.K)(function(t,e,i,n,s,a,r){var h=a.length-1;switch(s){case 6:case 7:return n;case 15:n.addNode(a[h-1].length,a[h].trim());break;case 16:n.addNode(0,a[h].trim())}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:i,7:[1,10],9:9,12:11,13:n,14:s},t(a,[2,3]),{1:[2,2]},t(a,[2,4]),t(a,[2,5]),{1:[2,6],6:i,12:15,13:n,14:s},{6:i,9:16,12:11,13:n,14:s},{6:h,7:o,10:17,11:l},t(c,[2,18],{14:[1,21]}),t(c,[2,16]),t(c,[2,17]),{6:h,7:o,10:22,11:l},{1:[2,7],6:i,12:15,13:n,14:s},t(u,[2,14],{7:d,11:y}),t(p,[2,8]),t(p,[2,9]),t(p,[2,10]),t(c,[2,15]),t(u,[2,13],{7:d,11:y}),t(p,[2,11]),t(p,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,r.K)(function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},"parseError"),parse:(0,r.K)(function(t){var e=this,i=[0],n=[],s=[null],a=[],h=this.table,o="",l=0,c=0,u=0,d=a.slice.call(arguments,1),y=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);y.setInput(t,p.yy),p.yy.lexer=y,p.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var f=y.yylloc;a.push(f);var k=y.options&&y.options.ranges;function m(){var t;return"number"!=typeof(t=n.pop()||y.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,r.K)(function(t){i.length=i.length-2*t,s.length=s.length-t,a.length=a.length-t},"popStack"),(0,r.K)(m,"lex");for(var w,x,b,_,v,S,K,$,I,E={};;){if(b=i[i.length-1],this.defaultActions[b]?_=this.defaultActions[b]:(null==w&&(w=m()),_=h[b]&&h[b][w]),void 0===_||!_.length||!_[0]){var A="";for(S in I=[],h[b])this.terminals_[S]&&S>2&&I.push("'"+this.terminals_[S]+"'");A=y.showPosition?"Parse error on line "+(l+1)+":\n"+y.showPosition()+"\nExpecting "+I.join(", ")+", got '"+(this.terminals_[w]||w)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==w?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(A,{text:y.match,token:this.terminals_[w]||w,line:y.yylineno,loc:f,expected:I})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+w);switch(_[0]){case 1:i.push(w),s.push(y.yytext),a.push(y.yylloc),i.push(_[1]),w=null,x?(w=x,x=null):(c=y.yyleng,o=y.yytext,l=y.yylineno,f=y.yylloc,u>0&&u--);break;case 2:if(K=this.productions_[_[1]][1],E.$=s[s.length-K],E._$={first_line:a[a.length-(K||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(K||1)].first_column,last_column:a[a.length-1].last_column},k&&(E._$.range=[a[a.length-(K||1)].range[0],a[a.length-1].range[1]]),void 0!==(v=this.performAction.apply(E,[o,c,l,p.yy,_[1],s,a].concat(d))))return v;K&&(i=i.slice(0,-1*K*2),s=s.slice(0,-1*K),a=a.slice(0,-1*K)),i.push(this.productions_[_[1]][0]),s.push(E.$),a.push(E._$),$=h[i[i.length-2]][i[i.length-1]],i.push($);break;case 3:return!0}}return!0},"parse")},f=function(){return{EOF:1,parseError:(0,r.K)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,r.K)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,r.K)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,r.K)(function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,r.K)(function(){return this._more=!0,this},"more"),reject:(0,r.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,r.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,r.K)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,r.K)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,r.K)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,r.K)(function(t,e){var i,n,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var a in s)this[a]=s[a];return!1}return!1},"test_match"),next:(0,r.K)(function(){if(this.done)return this.EOF;var t,e,i,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),a=0;ae[0].length)){if(e=i,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,s[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,r.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,r.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,r.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,r.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,r.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,r.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,r.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,r.K)(function(t,e,i,n){switch(i){case 0:case 3:return 6;case 1:case 2:return 8;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}}();function k(){this.yy={}}return g.lexer=f,(0,r.K)(k,"Parser"),k.prototype=g,g.Parser=k,new k}();o.parser=o;var l=o,c=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{(0,r.K)(this,"IshikawaDB")}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,(0,a.IU)()}getRoot(){return this.root}addNode(t,e){const i=a.Y2.sanitizeText(e,(0,a.D7)());if(!this.root)return this.root={text:i,children:[]},this.stack=[{level:0,node:this.root}],void(0,a.ke)(i);this.baseLevel??=t;let n=t-this.baseLevel+1;for(n<=0&&(n=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=n;)this.stack.pop();const s={text:i,children:[]};this.stack[this.stack.length-1].node.children.push(s),this.stack.push({level:n,node:s})}getAccTitle(){return(0,a.iN)()}setAccTitle(t){(0,a.SV)(t)}getAccDescription(){return(0,a.m7)()}setAccDescription(t){(0,a.EI)(t)}getDiagramTitle(){return(0,a.ab)()}setDiagramTitle(t){(0,a.ke)(t)}},u=250,d=82*Math.PI/180,y=Math.cos(d),p=Math.sin(d),g=(0,r.K)((t,e,i)=>{const n=t.node().getBBox(),s=n.width+2*e,r=n.height+2*e;(0,a.a$)(t,r,s,i),t.attr("viewBox",`${n.x-e} ${n.y-e} ${s} ${r}`)},"applyPaddedViewBox"),f=(0,r.K)((t,e,i,r)=>{const o=r.db.getRoot();if(!o)return;const l=(0,a.D7)(),{look:c,handDrawnSeed:d,themeVariables:y}=l,p=(0,s.I5)(l.fontSize)[0]??14,f="handDrawn"===c,w=o.children??[],x=l.ishikawa?.diagramPadding??20,b=l.ishikawa?.useMaxWidth??!1,v=(0,n.D)(e),S=v.append("g").attr("class","ishikawa"),K=f?h.A.svg(v.node()):void 0,$=K?{roughSvg:K,seed:d??0,lineColor:y?.lineColor??"#333",fillColor:y?.mainBkg??"#fff"}:void 0,E=`ishikawa-arrow-${e}`;f||S.append("defs").append("marker").attr("id",E).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let A=0,C=u;const L=f?void 0:I(S,A,C,A,C,"ishikawa-spine");if(m(S,A,C,o.text,p,$),!w.length)return f&&I(S,A,C,A,C,"ishikawa-spine",$),void g(v,x,b);A-=20;const M=w.filter((t,e)=>e%2==0),P=w.filter((t,e)=>e%2==1),T=k(M),B=k(P),D=T.total+B.total;let N=u,O=u;if(D>0){const t=500,e=75;N=Math.max(e,t*(T.total/D)),O=Math.max(e,t*(B.total/D))}const W=2*p;N=Math.max(N,T.max*W),O=Math.max(O,B.max*W),C=Math.max(N,u),L&&L.attr("y1",C).attr("y2",C),S.select(".ishikawa-head-group").attr("transform",`translate(0,${C})`);const j=Math.ceil(w.length/2);for(let n=0;nMath.min(t,e.getBBox().x),1/0)}if(f)I(S,A,C,0,C,"ishikawa-spine",$);else{L.attr("x1",A);const t=`url(#${E})`;S.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",t)}g(v,x,b)},"draw"),k=(0,r.K)(t=>{const e=(0,r.K)(t=>t.children.reduce((t,i)=>t+1+e(i),0),"countDescendants");return t.reduce((t,i)=>{const n=e(i);return t.total+=n,t.max=Math.max(t.max,n),t},{total:0,max:0})},"sideStats"),m=(0,r.K)((t,e,i,n,s,a)=>{const r=Math.max(6,Math.floor(110/(.6*s))),h=t.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${e},${i})`),o=K(h,S(n,r),0,0,"ishikawa-head-label","start",s),l=o.node().getBBox(),c=Math.max(60,l.width+6),u=Math.max(40,2*l.height+40),d=`M 0 ${-u/2} L 0 ${u/2} Q ${2.4*c} 0 0 ${-u/2} Z`;if(a){const t=a.roughSvg.path(d,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});h.insert(()=>t,":first-child").attr("class","ishikawa-head")}else h.insert("path",":first-child").attr("class","ishikawa-head").attr("d",d);o.attr("transform",`translate(${(c-l.width)/2-l.x+3},${-l.y-l.height/2})`)},"drawHead"),w=(0,r.K)((t,e)=>{const i=[],n=[],s=(0,r.K)((t,a,r)=>{const h=-1===e?[...t].reverse():t;for(const e of h){const t=i.length,h=e.children??[];i.push({depth:r,text:S(e.text,15),parentIndex:a,childCount:h.length}),r%2==0?(n.push(t),h.length&&s(h,t,r+1)):(h.length&&s(h,t,r+1),n.push(t))}},"walk");return s(t,-1,2),{entries:i,yOrder:n}},"flattenTree"),x=(0,r.K)((t,e,i,n,s,a,r)=>{const h=t.append("g").attr("class","ishikawa-label-group"),o=K(h,e,i,n+11*s,"ishikawa-label cause","middle",a).node().getBBox();if(r){const t=r.roughSvg.rectangle(o.x-20,o.y-2,o.width+40,o.height+4,{roughness:1.5,seed:r.seed,fill:r.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:r.lineColor,strokeWidth:2});h.insert(()=>t,":first-child").attr("class","ishikawa-label-box")}else h.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",o.x-20).attr("y",o.y-2).attr("width",o.width+40).attr("height",o.height+4)},"drawCauseLabel"),b=(0,r.K)((t,e,i,n,s,a)=>{const r=Math.sqrt(n*n+s*s);if(0===r)return;const h=n/r,o=s/r,l=6*-o,c=6*h,u=`M ${e} ${i} L ${e-6*h*2+l} ${i-6*o*2+c} L ${e-6*h*2-l} ${i-6*o*2-c} Z`,d=a.roughSvg.path(u,{roughness:1,seed:a.seed,fill:a.lineColor,fillStyle:"solid",stroke:a.lineColor,strokeWidth:1});t.append(()=>d)},"drawArrowMarker"),_=(0,r.K)((t,e,i,n,s,a,r,h)=>{const o=e.children??[],l=a*(o.length?1:.2),c=p*l*s,u=i+-y*l,d=n+c;if(I(t,i,n,u,d,"ishikawa-branch",h),h&&b(t,i,n,i-u,n-d,h),x(t,e.text,u,d,s,r,h),!o.length)return;const{entries:g,yOrder:f}=w(o,s),k=g.length,m=new Array(k);for(const[y,p]of f.entries())m[p]=n+c*((y+1)/(k+1));const _=new Map;_.set(-1,{x0:i,y0:n,x1:u,y1:d,childCount:o.length,childrenDrawn:0});const v=-y,S=p*s,E=s<0?"ishikawa-label up":"ishikawa-label down";for(const[y,p]of g.entries()){const e=m[y],i=_.get(p.parentIndex),n=t.append("g").attr("class","ishikawa-sub-group");let s=0,a=0,o=0;if(p.depth%2==0){const t=i.y1-i.y0;s=$(i.x0,i.x1,t?(e-i.y0)/t:.5),a=e,o=s-(p.childCount>0?60+5*p.childCount:30),I(n,s,e,o,e,"ishikawa-sub-branch",h),h&&b(n,s,e,1,0,h),K(n,p.text,o,e,"ishikawa-label align","end",r)}else{const t=i.childrenDrawn++;s=$(i.x0,i.x1,(i.childCount-t)/(i.childCount+1)),a=i.y0,o=s+v*((e-a)/S),I(n,s,a,o,e,"ishikawa-sub-branch",h),h&&b(n,s,a,s-o,a-e,h),K(n,p.text,o,e,E,"end",r)}p.childCount>0&&_.set(y,{x0:s,y0:a,x1:o,y1:e,childCount:p.childCount,childrenDrawn:0})}},"drawBranch"),v=(0,r.K)(t=>t.split(/|\n/),"splitLines"),S=(0,r.K)((t,e)=>{if(t.length<=e)return t;const i=[];for(const n of t.split(/\s+/)){const t=i.length-1;t>=0&&i[t].length+1+n.length<=e?i[t]+=" "+n:i.push(n)}return i.join("\n")},"wrapText"),K=(0,r.K)((t,e,i,n,s,a,r)=>{const h=v(e),o=1.05*r,l=t.append("text").attr("class",s).attr("text-anchor",a).attr("x",i).attr("y",n-(h.length-1)*o/2);for(const[c,u]of h.entries())l.append("tspan").attr("x",i).attr("dy",0===c?0:o).text(u);return l},"drawMultilineText"),$=(0,r.K)((t,e,i)=>t+(e-t)*i,"lerp"),I=(0,r.K)((t,e,i,n,s,a,r)=>{if(r){const h=r.roughSvg.line(e,i,n,s,{roughness:1.5,seed:r.seed,stroke:r.lineColor,strokeWidth:2});return void t.append(()=>h).attr("class",a)}return t.append("line").attr("class",a).attr("x1",e).attr("y1",i).attr("x2",n).attr("y2",s)},"drawLine"),E={draw:f},A=(0,r.K)(t=>`\n.ishikawa .ishikawa-spine,\n.ishikawa .ishikawa-branch,\n.ishikawa .ishikawa-sub-branch {\n stroke: ${t.lineColor};\n stroke-width: 2;\n fill: none;\n}\n\n.ishikawa .ishikawa-sub-branch {\n stroke-width: 1;\n}\n\n.ishikawa .ishikawa-arrow {\n fill: ${t.lineColor};\n}\n\n.ishikawa .ishikawa-head {\n fill: ${t.mainBkg};\n stroke: ${t.lineColor};\n stroke-width: 2;\n}\n\n.ishikawa .ishikawa-label-box {\n fill: ${t.mainBkg};\n stroke: ${t.lineColor};\n stroke-width: 2;\n}\n\n.ishikawa text {\n font-family: ${t.fontFamily};\n font-size: ${t.fontSize};\n fill: ${t.textColor};\n}\n\n.ishikawa .ishikawa-head-label {\n font-weight: 600;\n text-anchor: middle;\n dominant-baseline: middle;\n font-size: 14px;\n}\n\n.ishikawa .ishikawa-label {\n text-anchor: end;\n}\n\n.ishikawa .ishikawa-label.cause {\n text-anchor: middle;\n dominant-baseline: middle;\n}\n\n.ishikawa .ishikawa-label.align {\n text-anchor: end;\n dominant-baseline: middle;\n}\n\n.ishikawa .ishikawa-label.up {\n dominant-baseline: baseline;\n}\n\n.ishikawa .ishikawa-label.down {\n dominant-baseline: hanging;\n}\n`,"getStyles"),C={parser:l,get db(){return new c},renderer:E,styles:A}}}]); \ No newline at end of file diff --git a/assets/js/6806.81862f5a.js b/assets/js/6806.81862f5a.js new file mode 100644 index 000000000..5baf77b56 --- /dev/null +++ b/assets/js/6806.81862f5a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[6806],{77454(e,t,a){function i(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}a.d(t,{S:()=>i}),(0,a(86827).K)(i,"populateCommonDb")},76806(e,t,a){a.d(t,{diagram:()=>k});var i=a(77454),n=a(5637),l=a(16459),r=a(76385),s=a(31293),o=a(86827),c=a(78731),d=a(70451),p=r.UI.pie,h={sections:new Map,showData:!1,config:p},g=h.sections,u=h.showData,f=structuredClone(p),m=(0,o.K)(()=>structuredClone(f),"getConfig"),w=(0,o.K)(()=>{g=new Map,u=h.showData,(0,r.IU)()},"clear"),S=(0,o.K)(({label:e,value:t})=>{if(t<0)throw new Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);g.has(e)||(g.set(e,t),s.R.debug(`added new section: ${e}, with value: ${t}`))},"addSection"),$=(0,o.K)(()=>g,"getSections"),b=(0,o.K)(e=>{u=e},"setShowData"),x=(0,o.K)(()=>u,"getShowData"),D={getConfig:m,clear:w,setDiagramTitle:r.ke,getDiagramTitle:r.ab,setAccTitle:r.SV,getAccTitle:r.iN,setAccDescription:r.EI,getAccDescription:r.m7,addSection:S,getSections:$,setShowData:b,getShowData:x},v=(0,o.K)((e,t)=>{(0,i.S)(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},"populateDb"),y={parse:(0,o.K)(async e=>{const t=await(0,c.qg)("pie",e);s.R.debug(t),v(t,D)},"parse")},C=(0,o.K)(e=>`\n .pieCircle{\n stroke: ${e.pieStrokeColor};\n stroke-width : ${e.pieStrokeWidth};\n opacity : ${e.pieOpacity};\n }\n .pieCircle.highlighted{\n scale: 1.05;\n opacity: 1;\n }\n .pieCircle.highlightedOnHover:hover{\n transition-duration: 250ms;\n scale: 1.05;\n opacity: 1;\n }\n .pieOuterCircle{\n stroke: ${e.pieOuterStrokeColor};\n stroke-width: ${e.pieOuterStrokeWidth};\n fill: none;\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${e.pieTitleTextSize};\n fill: ${e.pieTitleTextColor};\n font-family: ${e.fontFamily};\n }\n .slice {\n font-family: ${e.fontFamily};\n fill: ${e.pieSectionTextColor};\n font-size:${e.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${e.pieLegendTextColor};\n font-family: ${e.fontFamily};\n font-size: ${e.pieLegendTextSize};\n }\n`,"getStyles"),T=(0,o.K)(e=>{const t=[...e.values()].reduce((e,t)=>e+t,0),a=[...e.entries()].map(([e,t])=>({label:e,value:t})).filter(e=>e.value/t*100>=1);return(0,d.rLf)().value(e=>e.value).sort(null)(a)},"createPieArcs"),k={parser:y,db:D,renderer:{draw:(0,o.K)((e,t,a,i)=>{s.R.debug("rendering pie chart\n"+e);const o=i.db,c=(0,r.D7)(),p=(0,l.$t)(o.getConfig(),c.pie),h=18,g=450,u=g,f=(0,n.D)(t),m=f.append("g");m.attr("transform","translate(225,225)");const{themeVariables:w}=c;let[S]=(0,l.I5)(w.pieOuterStrokeWidth);S??=2;const $=p.legendPosition,b=p.textPosition,x=p.donutHole>0&&p.donutHole<=.9?p.donutHole:0,D=Math.min(u,g)/2-40,v=(0,d.JLW)().innerRadius(x*D).outerRadius(D),y=(0,d.JLW)().innerRadius(D*b).outerRadius(D*b),C=m.append("g");C.append("circle").attr("cx",0).attr("cy",0).attr("r",D+S/2).attr("class","pieOuterCircle");const k=o.getSections(),A=T(k),K=[w.pie1,w.pie2,w.pie3,w.pie4,w.pie5,w.pie6,w.pie7,w.pie8,w.pie9,w.pie10,w.pie11,w.pie12];let R=0;k.forEach(e=>{R+=e});const M=A.filter(e=>"0"!==(e.data.value/R*100).toFixed(0)),O=(0,d.UMr)(K).domain([...k.keys()]);C.selectAll("mySlices").data(M).enter().append("path").attr("d",v).attr("fill",e=>O(e.data.label)).attr("class",e=>{let t="pieCircle";return"hover"===p.highlightSlice?t+=" highlightedOnHover":p.highlightSlice===e.data.label&&(t+=" highlighted"),t}),C.selectAll("mySlices").data(M).enter().append("text").text(e=>(e.data.value/R*100).toFixed(0)+"%").attr("transform",e=>"translate("+y.centroid(e)+")").style("text-anchor","middle").attr("class","slice");const z=m.append("text").text(o.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText"),W=[...k.entries()].map(([e,t])=>({label:e,value:t})),F=m.selectAll(".legend").data(W).enter().append("g").attr("class","legend");F.append("rect").attr("width",h).attr("height",h).style("fill",e=>O(e.label)).style("stroke",e=>O(e.label)),F.append("text").attr("x",22).attr("y",14).text(e=>o.getShowData()?`${e.label} [${e.value}]`:e.label);const H=Math.max(...F.selectAll("text").nodes().map(e=>e?.getBoundingClientRect().width??0));let L=g,I=490;const B=22,E=W.length*B;switch($){case"center":F.attr("transform",(e,t)=>{const a=B*W.length/2;return"translate("+(-H/2-22)+","+(t*B-a)+")"});break;case"top":L+=E,F.attr("transform",(e,t)=>`translate(${-H/2-22}, ${t*B-D})`),C.attr("transform",()=>`translate(0, ${E+B})`);break;case"bottom":L+=E,F.attr("transform",(e,t)=>"translate("+(-H/2-22)+","+(t*B-(-D-B))+")");break;case"left":I+=22+H,F.attr("transform",(e,t)=>{const a=B*W.length/2;return"translate("+(-D-22)+","+(t*B-a)+")"}),C.attr("transform",()=>`translate(${H+h+4}, 0)`);break;default:I+=22+H,F.attr("transform",(e,t)=>{const a=B*W.length/2;return"translate(216,"+(t*B-a)+")"})}const P=z.node()?.getBoundingClientRect().width??0,U=225-P/2,J=225+P/2,N=Math.min(0,U),V=Math.max(I,J)-N;f.attr("viewBox",`${N} 0 ${V} ${L}`),(0,r.a$)(f,L,V,p.useMaxWidth)},"draw")},styles:C}}}]); \ No newline at end of file diff --git a/assets/js/6ba57622.dad109ac.js b/assets/js/6ba57622.dad109ac.js new file mode 100644 index 000000000..45f6f94d7 --- /dev/null +++ b/assets/js/6ba57622.dad109ac.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[9130],{21258(e){e.exports=JSON.parse('{"name":"docusaurus-plugin-redoc","id":"plugin-redoc-0"}')}}]); \ No newline at end of file diff --git a/assets/js/6bac647a.6c34a752.js b/assets/js/6bac647a.6c34a752.js new file mode 100644 index 000000000..ceb60049a --- /dev/null +++ b/assets/js/6bac647a.6c34a752.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[877],{70185(e,t,n){n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>p,frontMatter:()=>s,metadata:()=>a,toc:()=>c});const a=JSON.parse('{"id":"develop/tools-and-features/gateway-proxy","title":"Gateway Proxy","description":"Tool for proxying and protecting Bee API endpoints with additional security and filtering.","source":"@site/docs/develop/tools-and-features/gateway-proxy.md","sourceDirName":"develop/tools-and-features","slug":"/develop/tools-and-features/gateway-proxy","permalink":"/docs/develop/tools-and-features/gateway-proxy","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/develop/tools-and-features/gateway-proxy.md","tags":[],"version":"current","frontMatter":{"title":"Gateway Proxy","id":"gateway-proxy","description":"Tool for proxying and protecting Bee API endpoints with additional security and filtering."},"sidebar":"develop","previous":{"title":"Bee JS","permalink":"/docs/develop/tools-and-features/bee-js"},"next":{"title":"Chunk Types","permalink":"/docs/develop/tools-and-features/chunk-types"}}');var o=n(74848),i=n(28453);const s={title:"Gateway Proxy",id:"gateway-proxy",description:"Tool for proxying and protecting Bee API endpoints with additional security and filtering."},r=void 0,l={},c=[{value:"Public Access to Swarm",id:"public-access-to-swarm",level:2},{value:"Authentication, Access Control, and Policy",id:"authentication-access-control-and-policy",level:2},{value:"Stamp Management",id:"stamp-management",level:2},{value:"Setting up a Gateway",id:"setting-up-a-gateway",level:2}];function d(e){const t={a:"a",admonition:"admonition",h2:"h2",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.a,{href:"https://github.com/ethersphere/swarm-gateway",children:"Swarm Gateway"})," is the standard way to expose a Bee node over HTTP."]}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsxs)(t.p,{children:["Another tool which is currently popular for running Bee in gateway mode is ",(0,o.jsx)(t.a,{href:"https://github.com/ethersphere/gateway-proxy",children:"Gateway Proxy"}),". It offers several features not yet included in Swarm Gateway. However, since it is set for deprecation, unless you have a specific need, it is recommended to use Swarm Gateway instead."]})}),"\n",(0,o.jsx)(t.p,{children:"It acts as a reverse proxy that runs in front of a Bee node, allowing you to expose your node publicly. It proxies the Bee HTTP API and content endpoints, while optionally adding access control, postage batch auto-buy, and other optional features."}),"\n",(0,o.jsx)(t.h2,{id:"public-access-to-swarm",children:"Public Access to Swarm"}),"\n",(0,o.jsx)(t.p,{children:"A gateway can be used to run a public endpoint that allows users to:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"Access content stored on Swarm using standard HTTP URLs"}),"\n",(0,o.jsx)(t.li,{children:"Browse websites hosted on Swarm"}),"\n",(0,o.jsx)(t.li,{children:"Interact with Swarm through a familiar web interface"}),"\n"]}),"\n",(0,o.jsx)(t.p,{children:"This makes Swarm content accessible to any web client, even if the user is not running a Bee node locally."}),"\n",(0,o.jsx)(t.h2,{id:"authentication-access-control-and-policy",children:"Authentication, Access Control, and Policy"}),"\n",(0,o.jsx)(t.p,{children:"The Swarm Gateway also acts as an access control and content moderation layer in front of a Bee node."}),"\n",(0,o.jsx)(t.p,{children:"Rather than exposing a Bee node directly to the public internet, the gateway allows operators to place a managed HTTP interface in front of it. Through this interface, the gateway can:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"Expose a Bee node through a single public HTTP endpoint"}),"\n",(0,o.jsx)(t.li,{children:"Restrict or control uploads and other sensitive operations"}),"\n",(0,o.jsx)(t.li,{children:"Require authentication for selected endpoints or request types"}),"\n",(0,o.jsx)(t.li,{children:"Apply basic access control and usage policies before requests reach the Bee node"}),"\n"]}),"\n",(0,o.jsx)(t.p,{children:"This makes it possible to run public, private, or semi-public gateways while retaining control over how the underlying Bee node is used."}),"\n",(0,o.jsx)(t.p,{children:"For production deployments, the gateway is typically run behind an HTTPS reverse proxy to ensure encrypted connections."}),"\n",(0,o.jsx)(t.h2,{id:"stamp-management",children:"Stamp Management"}),"\n",(0,o.jsx)(t.p,{children:"The Swarm Gateway can optionally manage postage stamps on behalf of the operator, including:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"Automatically buying new batches"}),"\n",(0,o.jsx)(t.li,{children:"Monitoring batch usage and expiration"}),"\n",(0,o.jsx)(t.li,{children:"Keeping batches alive based on specified TTL"}),"\n"]}),"\n",(0,o.jsx)(t.p,{children:"This is especially useful for gateways that accept uploads from users or applications."}),"\n",(0,o.jsx)(t.h2,{id:"setting-up-a-gateway",children:"Setting up a Gateway"}),"\n",(0,o.jsxs)(t.p,{children:["For a step by step guide on setting up a gateway yourself, refer to the ",(0,o.jsx)(t.a,{href:"/docs/develop/gateway-proxy",children:"guide in the Develop on Swarm section"}),"."]})]})}function p(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},28453(e,t,n){n.d(t,{R:()=>s,x:()=>r});var a=n(96540);const o={},i=a.createContext(o);function s(e){const t=a.useContext(i);return a.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),a.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6f20431d.4ccf6e25.js b/assets/js/6f20431d.4ccf6e25.js new file mode 100644 index 000000000..362911b78 --- /dev/null +++ b/assets/js/6f20431d.4ccf6e25.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[7121],{33035(s,e,a){a.r(e),a.d(e,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>r,metadata:()=>t,toc:()=>o});const t=JSON.parse('{"id":"concepts/incentives/redistribution-game","title":"Redistribution Game","description":"Explains game-theoretic system distributing xBZZ from postage stamps to full nodes that honestly store data.","source":"@site/docs/concepts/incentives/redistribution-game.md","sourceDirName":"concepts/incentives","slug":"/concepts/incentives/redistribution-game","permalink":"/docs/concepts/incentives/redistribution-game","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/concepts/incentives/redistribution-game.md","tags":[],"version":"current","frontMatter":{"title":"Redistribution Game","id":"redistribution-game","description":"Explains game-theoretic system distributing xBZZ from postage stamps to full nodes that honestly store data."},"sidebar":"concepts","previous":{"title":"Incentives Overview","permalink":"/docs/concepts/incentives/overview"},"next":{"title":"Postage Stamps","permalink":"/docs/concepts/incentives/postage-stamps"}}');var n=a(74848),i=a(28453);const r={title:"Redistribution Game",id:"redistribution-game",description:"Explains game-theoretic system distributing xBZZ from postage stamps to full nodes that honestly store data."},c=void 0,l={},o=[{value:"How does the redistribution game work?",id:"redistribution-game-details",level:2},{value:"What penalties apply for dishonest nodes?",id:"penalties",level:2}];function m(s){const e={a:"a",annotation:"annotation",code:"code",em:"em",h2:"h2",math:"math",mn:"mn",mo:"mo",mrow:"mrow",msup:"msup",mtext:"mtext",p:"p",semantics:"semantics",span:"span",strong:"strong",...(0,i.R)(),...s.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(e.p,{children:["The redistribution game distributes xBZZ collected from ",(0,n.jsx)(e.a,{href:"/docs/concepts/incentives/postage-stamps",children:"postage stamp"})," purchases, rewarding nodes for providing storage. Redistribution rewards incentivize nodes to continue providing storage to the network. The game is designed so that the most profitable strategy for participants is to store their assigned data honestly."]}),"\n",(0,n.jsx)(e.h2,{id:"redistribution-game-details",children:"How does the redistribution game work?"}),"\n",(0,n.jsxs)(e.p,{children:["Uploading data to Swarm requires purchasing postage stamp batches with xBZZ. The collected xBZZ is later redistributed as rewards to storage nodes. Every 152 Gnosis Chain blocks ",(0,n.jsx)(e.em,{children:(0,n.jsxs)(e.strong,{children:["a single ",(0,n.jsx)(e.a,{href:"/docs/concepts/DISC/neighborhoods",children:"neighborhood"})]})})," is selected to play the redistribution game. For each round of the game, one node from the selected neighborhood will have the chance to win a reward which is paid out from the accumulated xBZZ."]}),"\n",(0,n.jsxs)(e.p,{children:["The game has 3 phases, ",(0,n.jsx)(e.code,{children:"commit"}),", ",(0,n.jsx)(e.code,{children:"reveal"}),", and ",(0,n.jsx)(e.code,{children:"claim"}),". In the ",(0,n.jsx)(e.code,{children:"reveal"}),' phase of a previous game, an "anchor" address is randomly generated and used to determine the neighborhood for the current round.']}),"\n",(0,n.jsxs)(e.p,{children:["In the ",(0,n.jsx)(e.code,{children:"commit"}),' phase, nodes issue an on-chain transaction including an encrypted hash of the data they are storing (the unencrypted hash is known as the "reserve commitment") along with the ',(0,n.jsx)(e.a,{href:"/docs/references/glossary#2-area-of-responsibility-related-depths",children:"depth"})," for which they are reporting. This serves as an attestation of the data they are storing without revealing any other information."]}),"\n",(0,n.jsxs)(e.p,{children:["In the ",(0,n.jsx)(e.code,{children:"reveal"})," phase, each node reveals the decryption key for their encrypted hashes thereby publishing the hash. The winner is chosen at random among the honest nodes, but it is weighted in proportion to each node's stake density. Stake density is calculated as so:"]}),"\n",(0,n.jsx)(e.span,{className:"katex-display",children:(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsxs)(e.mrow,{children:[(0,n.jsx)(e.mtext,{children:"stake\xa0density"}),(0,n.jsx)(e.mo,{children:"="}),(0,n.jsx)(e.mtext,{children:"stake(xBZZ)"}),(0,n.jsx)(e.mo,{children:"\xd7"}),(0,n.jsxs)(e.msup,{children:[(0,n.jsx)(e.mn,{children:"2"}),(0,n.jsx)(e.mtext,{children:"storage\xa0depth"})]})]}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"\\text{stake density} = \\text{stake(xBZZ)} \\times {2}^\\text{storage depth}"})]})})}),(0,n.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.8889em",verticalAlign:"-0.1944em"}}),(0,n.jsx)(e.span,{className:"mord text",children:(0,n.jsx)(e.span,{className:"mord",children:"stake\xa0density"})}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,n.jsx)(e.span,{className:"mrel",children:"="}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"1em",verticalAlign:"-0.25em"}}),(0,n.jsx)(e.span,{className:"mord text",children:(0,n.jsx)(e.span,{className:"mord",children:"stake(xBZZ)"})}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,n.jsx)(e.span,{className:"mbin",children:"\xd7"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.8991em"}}),(0,n.jsxs)(e.span,{className:"mord",children:[(0,n.jsx)(e.span,{className:"mord",children:(0,n.jsx)(e.span,{className:"mord",children:"2"})}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsx)(e.span,{className:"vlist-t",children:(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.8991em"},children:(0,n.jsxs)(e.span,{style:{top:"-3.113em",marginRight:"0.05em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,n.jsx)(e.span,{className:"mord text mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:"storage\xa0depth"})})})]})})})})})]})]})]})]})}),"\n",(0,n.jsx)(e.h2,{id:"penalties",children:"What penalties apply for dishonest nodes?"}),"\n",(0,n.jsxs)(e.p,{children:["During the ",(0,n.jsx)(e.code,{children:"reveal"})," phase if a nodes' revealed hash does not match the honest nodes' hash, that node will be temporarily frozen and will not be able to participate in a number of upcoming rounds. Currently the freeze period is defined in the ",(0,n.jsx)(e.a,{href:"https://github.com/ethersphere/storage-incentives/blob/master/src/Redistribution.sol#L536C1-L536C100",children:"redistribution smart contract"})," as:"]}),"\n",(0,n.jsx)(e.span,{className:"katex-display",children:(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsxs)(e.mrow,{children:[(0,n.jsx)(e.mn,{children:"152"}),(0,n.jsx)(e.mo,{children:"\xd7"}),(0,n.jsxs)(e.msup,{children:[(0,n.jsx)(e.mn,{children:"2"}),(0,n.jsx)(e.mtext,{children:"storage\xa0radius"})]}),(0,n.jsx)(e.mtext,{children:"\xa0blocks\xa0(at\xa05s\xa0per\xa0block)"})]}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"152 \\times 2^\\text{storage radius} \\text{ blocks (at 5s per block)}"})]})})}),(0,n.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.7278em",verticalAlign:"-0.0833em"}}),(0,n.jsx)(e.span,{className:"mord",children:"152"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,n.jsx)(e.span,{className:"mbin",children:"\xd7"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"1.1491em",verticalAlign:"-0.25em"}}),(0,n.jsxs)(e.span,{className:"mord",children:[(0,n.jsx)(e.span,{className:"mord",children:"2"}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsx)(e.span,{className:"vlist-t",children:(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.8991em"},children:(0,n.jsxs)(e.span,{style:{top:"-3.113em",marginRight:"0.05em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,n.jsx)(e.span,{className:"mord text mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:"storage\xa0radius"})})})]})})})})})]}),(0,n.jsx)(e.span,{className:"mord text",children:(0,n.jsx)(e.span,{className:"mord",children:"\xa0blocks\xa0(at\xa05s\xa0per\xa0block)"})})]})]})]})}),"\n",(0,n.jsx)(e.p,{children:"So for example at a storage radius of 10:"}),"\n",(0,n.jsx)(e.span,{className:"katex-display",children:(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsxs)(e.mrow,{children:[(0,n.jsx)(e.mn,{children:"152"}),(0,n.jsx)(e.mo,{children:"\xd7"}),(0,n.jsxs)(e.msup,{children:[(0,n.jsx)(e.mn,{children:"2"}),(0,n.jsx)(e.mn,{children:"10"})]}),(0,n.jsx)(e.mtext,{children:"\xa0blocks\xa0(at\xa05s\xa0per\xa0block)"}),(0,n.jsx)(e.mo,{children:"\u2248"}),(0,n.jsx)(e.mtext,{children:"\xa09\xa0days"})]}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"152 \\times 2^{10} \\text{ blocks (at 5s per block)} \u2248 \\text{ 9 days}"})]})})}),(0,n.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.7278em",verticalAlign:"-0.0833em"}}),(0,n.jsx)(e.span,{className:"mord",children:"152"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,n.jsx)(e.span,{className:"mbin",children:"\xd7"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"1.1141em",verticalAlign:"-0.25em"}}),(0,n.jsxs)(e.span,{className:"mord",children:[(0,n.jsx)(e.span,{className:"mord",children:"2"}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsx)(e.span,{className:"vlist-t",children:(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.8641em"},children:(0,n.jsxs)(e.span,{style:{top:"-3.113em",marginRight:"0.05em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:"10"})})})]})})})})})]}),(0,n.jsx)(e.span,{className:"mord text",children:(0,n.jsx)(e.span,{className:"mord",children:"\xa0blocks\xa0(at\xa05s\xa0per\xa0block)"})}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,n.jsx)(e.span,{className:"mrel",children:"\u2248"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.8889em",verticalAlign:"-0.1944em"}}),(0,n.jsx)(e.span,{className:"mord text",children:(0,n.jsx)(e.span,{className:"mord",children:"\xa09\xa0days"})})]})]})]})})]})}function h(s={}){const{wrapper:e}={...(0,i.R)(),...s.components};return e?(0,n.jsx)(e,{...s,children:(0,n.jsx)(m,{...s})}):m(s)}},28453(s,e,a){a.d(e,{R:()=>r,x:()=>c});var t=a(96540);const n={},i=t.createContext(n);function r(s){const e=t.useContext(i);return t.useMemo(function(){return"function"==typeof s?s(e):{...e,...s}},[e,s])}function c(s){let e;return e=s.disableParentContext?"function"==typeof s.components?s.components(n):s.components||n:r(s.components),t.createElement(i.Provider,{value:e},s.children)}}}]); \ No newline at end of file diff --git a/assets/js/7089.6c89e8f7.js b/assets/js/7089.6c89e8f7.js new file mode 100644 index 000000000..4401d3094 --- /dev/null +++ b/assets/js/7089.6c89e8f7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[7089],{37089(e,c,s){s.d(c,{createArchitectureServices:()=>r.S});var r=s(45796);s(4954)}}]); \ No newline at end of file diff --git a/assets/js/727.52d95a05.js b/assets/js/727.52d95a05.js new file mode 100644 index 000000000..08449c062 --- /dev/null +++ b/assets/js/727.52d95a05.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[727],{727(e,t,r){r.r(t),r.d(t,{applyDagreLayoutResult:()=>C,getEdgesToRender:()=>b,measureDagreLayout:()=>v,prepareLayoutForDagre:()=>T,render:()=>I,runDagreLayoutCore:()=>K});var a=r(35167),n=r(78771),o=r(46853),i=r(717),d=r(79515),s=(r(44505),r(72379),r(58962),r(16459),r(76385)),g=r(31293),l=r(86827),h=r(73765),p=r(697),c=(0,l.K)((e,t,r)=>Math.max(t,Math.min(r,e)),"clamp"),u=(0,l.K)((e="TB")=>{switch(e){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";default:return"top"}},"getDefaultSelfLoopSide"),f=(0,l.K)(e=>"flowchart"===e||"flowchart-v2"===e||"stateDiagram"===e||"er"===e||"classDiagram"===e,"shouldMergeSelfLoopSegments"),y=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],m=(0,l.K)((e,t,r,a,n)=>{const o=[],i=new Set;if(r.forEach(({start:e,end:t})=>{e!==a&&i.add(e),t!==a&&i.add(t)}),i.forEach(t=>{const r=e.node(t);"number"==typeof r?.x&&"number"==typeof r?.y&&o.push(r)}),0===o.length&&r.forEach(({edge:e})=>{(e.points??[]).forEach(e=>{"number"==typeof e?.x&&"number"==typeof e?.y&&o.push(e)})}),0===o.length)return u(n);const d=o.reduce((e,t)=>({x:e.x+t.x/o.length,y:e.y+t.y/o.length}),{x:0,y:0}),s=d.x-t.x,g=d.y-t.y;return Math.abs(s)>Math.abs(g)?s>0?"right":"left":Math.abs(g)>0?g>0?"bottom":"top":u(n)},"getSelfLoopSide"),L=(0,l.K)((e,t="top",r=0,a=0)=>{const n=e.x,o=e.y-r,i=e.width/2,d=e.height/2,s=Math.max(36,Math.min(100,.8*e.width)),g=c(Math.max(a,.35*e.width),36,s),l=c(.45*Math.min(e.width,e.height),24,48);switch(t){case"bottom":{const e=o+d;return[{x:n-g/2,y:e},{x:n-g/2,y:e+l},{x:n+g/2,y:e+l},{x:n+g/2,y:e}]}case"right":{const e=n+i;return[{x:e,y:o-g/2},{x:e+l,y:o-g/2},{x:e+l,y:o+g/2},{x:e,y:o+g/2}]}case"left":{const e=n-i;return[{x:e,y:o-g/2},{x:e-l,y:o-g/2},{x:e-l,y:o+g/2},{x:e,y:o+g/2}]}default:{const e=o-d;return[{x:n-g/2,y:e},{x:n-g/2,y:e-l},{x:n+g/2,y:e-l},{x:n+g/2,y:e}]}}},"getSelfLoopPoints"),w=(0,l.K)((e,t,r="top",a=0,n={})=>{const o=e.x,i=e.y-a,d=n.width??0,s=n.height??0;switch(r){case"bottom":return{x:o,y:Math.max(...t.map(e=>e.y))+s/2+4};case"right":return{x:Math.max(...t.map(e=>e.x))+d/2+4,y:i};case"left":return{x:Math.min(...t.map(e=>e.x))-d/2-4,y:i};default:return{x:o,y:Math.min(...t.map(e=>e.y))-s/2-4}}},"getSelfLoopLabelPosition"),b=(0,l.K)((e,t=0,{mergeSelfLoops:r=!0}={})=>{const a=new Map,n=[],o=e.graph()?.rankdir;return e.edges().forEach(t=>{const o=e.edge(t);if(r&&o.selfLoop){const e=o.selfLoop.id;a.has(e)||a.set(e,[]),a.get(e).push({edge:o,start:t.v,end:t.w})}else n.push({edge:o,start:t.v,end:t.w})}),a.forEach(r=>{if(3!==r.length)return void r.forEach(e=>n.push(e));r.sort((e,t)=>e.edge.selfLoop.order-t.edge.selfLoop.order);const[a,i,d]=r,s=a.edge.originalEdge??i.edge.originalEdge??d.edge.originalEdge??i.edge,g=e.node(s.start);if(!g)return void r.forEach(e=>n.push(e));const l={width:i.edge.width,height:i.edge.height},h=m(e,g,r,s.start,o),p=L(g,h,t,l.width??0),c=w(g,p,h,t,l),u={...i.edge,...s,id:s.id,points:p,start:s.start,end:s.end,x:c.x,y:c.y,width:l.width,height:l.height,labelStyle:i.edge.labelStyle,fromCluster:a.edge.fromCluster??i.edge.fromCluster??d.edge.fromCluster,toCluster:a.edge.toCluster??i.edge.toCluster??d.edge.toCluster};delete u.selfLoop,delete u.originalEdge,n.push({edge:u,start:u.start,end:u.end})}),n},"getEdgesToRender"),x=(0,l.K)(async({element:e,graph:t,diagramType:r,id:n,parentCluster:s,siteConfig:h})=>{const p=t.graph().rankdir;g.R.trace("Dir in recursive render - dir:",p);const{clusters:c,edgePaths:u,edgeLabels:y,nodes:m,rootGroups:L}=(0,a.B)(e,{edgePathsClass:"edgePaths"});t.nodes()?g.R.info("Recursive render XXX",t.nodes()):g.R.info("No nodes found for",t),t.edges().length>0&&g.R.info("Recursive edges",t.edge(t.edges()[0]));const w=f(r);await Promise.all(t.nodes().map(async function(e){const o=t.node(e);if(void 0!==s){const r=JSON.parse(JSON.stringify(s.clusterData));g.R.trace("Setting data for parent cluster XXX\n Node.id = ",e,"\n data=",r.height,"\nParent cluster",s.height),t.setNode(s.id,r),t.parent(e)||(g.R.trace("Setting parent",e,s.id),t.setParent(e,s.id,r))}if(g.R.info("(Insert) Node XXX"+e+": "+JSON.stringify(t.node(e))),o?.clusterNode){g.R.info("Cluster identified XBX",e,o.width,t.node(e));const{ranksep:a,nodesep:s}=t.graph();o.graph.setGraph({...o.graph.graph(),ranksep:a+25,nodesep:s});const l=await D({element:m,graph:o.graph,diagramType:r,id:n,parentCluster:t.node(e),siteConfig:h}),p=l.elem;(0,d.lC)(o,p),o.diff=l.diff||0,g.R.info("New compound node after recursive render XAX",e,"width",o.width,"height",o.height),(0,i.U7)(p,o)}else t.children(e).length>0?(g.R.trace("Cluster - the non recursive path XBX",e,o.id,o,o.width,"Graph:",t),g.R.trace((0,a.dc)(o.id,t)),a.ju.set(o.id,{id:(0,a.dc)(o.id,t),node:o})):(g.R.trace("Node - the non recursive path XAX",e,m,t.node(e),p),await(0,a.sv)(m,t.node(e),{config:h,dir:p}))}));const b=(0,l.K)(async()=>{const e=t.edges().map(async function(e){const r=t.edge(e.v,e.w,e.name);if(g.R.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),g.R.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(t.edge(e))),g.R.info("Fix",a.ju,"ids:",e.v,e.w,"Translating: ",a.ju.get(e.v),a.ju.get(e.w)),w&&r.selfLoop){if(1!==r.selfLoop.order)return;const e={...r.originalEdge,...r,id:r.selfLoop.id,startLabelLeft:r.originalEdge?.startLabelLeft??r.startLabelLeft,startLabelRight:r.originalEdge?.startLabelRight??r.startLabelRight,endLabelLeft:r.originalEdge?.endLabelLeft??r.endLabelLeft,endLabelRight:r.originalEdge?.endLabelRight??r.endLabelRight};return await(0,o.jP)(y,e),r.width=e.width,r.height=e.height,void(r.labelStyle=e.labelStyle)}await(0,o.jP)(y,r)});await Promise.all(e)},"processEdges");await b();const{subGraphTitleTotalMargin:x}=(0,i.Oi)(h);return{elem:L,graph:t,groups:{clusters:c,edgePaths:u,edgeLabels:y,nodes:m,rootGroups:L},diagramType:r,id:n,mergeSelfLoops:w,subGraphTitleTotalMargin:x}},"measureDagreGraph"),R=(0,l.K)(e=>{g.R.info("############################################# XXX"),g.R.info("### Layout ### XXX"),g.R.info("############################################# XXX"),(0,h.Zp)(e)},"runDagreGraphLayout"),E=(0,l.K)((e,t,r)=>{const a=e.node(t);if(!a)return;const n={...a};return a?.clusterNode?n.y=(a.y??0)+r:e.children(t).length>0?n.height=(a.height??0)+r:n.y=(a.y??0)+r/2,n},"normalizeDagreNode"),S=(0,l.K)((e,t)=>{y.forEach(r=>{void 0!==t[r]&&(e[r]=t[r])})},"applyDagreNodeLayout"),X=(0,l.K)((e,t,r,a)=>({...e,start:e.start??t,end:e.end??r,points:(e.points??[]).map(e=>({...e,y:"number"==typeof e.y?e.y+a:e.y}))}),"normalizeDagreEdge"),C=(0,l.K)((e,t)=>{const{graph:r,mergeSelfLoops:n,subGraphTitleTotalMargin:o=0}=t,i=new Map(e.nodes.map(e=>[e.id,e]));(0,a.sc)(r).forEach(e=>{const t=E(r,e,o);if(!t)return;S(r.node(e),t);const a=i.get(e);a&&S(a,t)});const d=o/2;return e.edges=b(r,d,{mergeSelfLoops:n}).map(({edge:e,start:t,end:r})=>X(e,t,r,d)),e},"applyDagreLayoutResult"),N=(0,l.K)(async({elem:e,graph:t,groups:{clusters:r,edgePaths:d},diagramType:s,id:l,mergeSelfLoops:h,subGraphTitleTotalMargin:p})=>{let c=0;await Promise.all((0,a.sc)(t).map(async function(e){const o=t.node(e);if(g.R.info("Position XBX => "+e+": ("+o.x,","+o.y,") width: ",o.width," height: ",o.height),o?.clusterNode)o.y+=p,g.R.info("A tainted cluster node XBX1",e,o.id,o.width,o.height,o.x,o.y,t.parent(e)),a.ju.get(o.id).node=o,(0,i.U_)(o);else if(t.children(e).length>0){g.R.info("A pure cluster node XBX1",e,o.id,o.x,o.y,o.width,o.height,t.parent(e)),o.height+=p,t.node(o.parentId);const i=o?.padding/2||0,d=o?.labelBBox?.height||0,s=d-i||0;g.R.debug("OffsetY",s,"labelHeight",d,"halfPadding",i),await(0,n.U)(r,o),a.ju.get(o.id).node=o}else{const e=t.node(o.parentId);o.y+=p/2,g.R.info("A regular node XBX1 - using the padding",o.id,"parent",o.parentId,o.width,o.height,o.x,o.y,"offsetY",o.offsetY,"parent",e,e?.offsetY,o),(0,i.U_)(o)}}));const u=p/2;return b(t,u,{mergeSelfLoops:h}).forEach(function({edge:e,start:r,end:n}){g.R.info("Edge "+r+" -> "+n+": "+JSON.stringify(e),e),e.points.forEach(e=>e.y+=u);const i=t.node(r),h=t.node(n),p=(0,o.Jo)(d,e,a.ju,s,i,h,l);(0,o.T_)(e,p)}),t.nodes().forEach(function(e){const r=t.node(e);g.R.info(e,r.type,r.diff),r.isGroup&&(c=r.diff)}),g.R.warn("Returning from recursive render XAX",e,c),{elem:e,diff:c}},"paintDagreLayoutCore"),D=(0,l.K)(async e=>{const t=await x(e);return R(t.graph),await N(t)},"renderDagreSubgraph"),T=(0,l.K)(e=>{const t=new p.T({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.nodeSpacing||e.config?.flowchart?.nodeSpacing,ranksep:e.config?.rankSpacing||e.rankSpacing||e.config?.flowchart?.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return e.nodes.forEach(e=>{t.setNode(e.id,{...e}),e.parentId&&t.setParent(e.id,e.parentId)}),g.R.debug("Edges:",e.edges),e.edges.forEach(e=>{if(e.start===e.end){const r=e.start,a=r+"---"+r+"---1",n=r+"---"+r+"---2",o=t.node(r);t.setNode(a,{domId:a,id:a,parentId:o.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),t.setParent(a,o.parentId),t.setNode(n,{domId:n,id:n,parentId:o.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),t.setParent(n,o.parentId);const i=structuredClone(e),d=structuredClone(e),s=structuredClone(e),g=structuredClone(e);d.originalEdge=i,d.selfLoop={id:i.id,order:0},s.originalEdge=i,s.selfLoop={id:i.id,order:1},g.originalEdge=i,g.selfLoop={id:i.id,order:2},d.label="",d.arrowTypeEnd="none",d.endLabelLeft="",d.endLabelRight="",d.startLabelLeft="",d.id=r+"-cyclic-special-1",s.startLabelRight="",s.startLabelLeft="",s.endLabelLeft="",s.endLabelRight="",s.arrowTypeStart="none",s.arrowTypeEnd="none",s.id=r+"-cyclic-special-mid",g.label="",g.startLabelRight="",g.startLabelLeft="",g.arrowTypeStart="none",o.isGroup&&(d.fromCluster=r,g.toCluster=r),g.id=r+"-cyclic-special-2",g.arrowTypeStart="none",t.setEdge(r,a,d,r+"-cyclic-special-0"),t.setEdge(a,n,s,r+"-cyclic-special-1"),t.setEdge(n,r,g,r+"-cyclic-special-2")}else t.setEdge(e.start,e.end,{...e},e.id)}),(0,a.OS)(t),{graph:t}},"prepareLayoutForDagre"),v=(0,l.K)(async(e,{element:t,preparedLayout:r})=>{const a=r??T(e),n=(0,s.D7)(),o=await x({element:t,graph:a.graph,diagramType:e.type,id:e.diagramId,parentCluster:void 0,siteConfig:n});return a.measuredLayout=o,o},"measureDagreLayout"),K=(0,l.K)((e,t)=>{const r=t.preparedLayout?.measuredLayout;if(!r)throw new Error("runDagreLayoutCore requires measureDagreLayout to run first");return R(r.graph),C(e,r),r},"runDagreLayoutCore"),M=(0,l.K)((e,{measure:t})=>(0,a.sc)(t.graph).map(e=>t.graph.node(e)).filter(Boolean),"getDagrePaintNodes"),P=(0,l.K)((e,t,{measure:r})=>e?r.graph.node(e):void 0,"getDagreEdgeNode"),I=(0,a.xY)({prepareLayout:T,measureLayout:v,runLayoutCore:K,paintOptions:{clusterDb:a.ju,getNodes:M,getEdgeNode:P,skipNode:(0,l.K)((e,{measure:t})=>!t.graph.hasNode(e.id),"skipNode"),isCluster:(0,l.K)((e,{measure:t})=>t.graph.hasNode(e.id)&&(t.graph.children(e.id)??[]).length>0,"isCluster")}})}}]); \ No newline at end of file diff --git a/assets/js/7483.dd954cd3.js b/assets/js/7483.dd954cd3.js new file mode 100644 index 000000000..48368e160 --- /dev/null +++ b/assets/js/7483.dd954cd3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[7483],{77454(t,e,a){function r(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}a.d(e,{S:()=>r}),(0,a(86827).K)(r,"populateCommonDb")},27483(t,e,a){a.d(e,{diagram:()=>B});var r=a(77454),n=a(5637),o=a(16459),i=a(76385),s=a(31293),l=a(86827),d=a(78731),c=(0,l.K)((t,e)=>{const a=t<=1?100*t:t;if(a<0||a>100)throw new Error(`${e} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${t}`);return a},"toPercent"),p=(0,l.K)((t,e,a)=>({x:c(e,`${a} evolution`),y:c(t,`${a} visibility`)}),"toCoordinates"),h=(0,l.K)(t=>{if(t)return"+<>"===t?"bidirectional":"+<"===t?"backward":"+>"===t?"forward":void 0},"getFlowFromPort"),x=(0,l.K)(t=>{if(!t?.startsWith("+"))return{};const e=/^\+'([^']*)'/.exec(t),a=e?.[1];return t.includes("<>")?{flow:"bidirectional",label:a}:t.includes("<")?{flow:"backward",label:a}:t.includes(">")?{flow:"forward",label:a}:{label:a}},"extractFlowFromArrow"),y=(0,l.K)((t,e)=>{if((0,r.S)(t,e),t.size&&e.setSize(t.size.width,t.size.height),t.evolution){const a=t.evolution.stages.map(t=>t.secondName?`${t.name.trim()} / ${t.secondName.trim()}`:t.name.trim()),r=t.evolution.stages.filter(t=>void 0!==t.boundary).map(t=>t.boundary);e.updateAxes({stages:a,stageBoundaries:r})}if(t.anchors.forEach(t=>{const a=p(t.visibility,t.evolution,`Anchor "${t.name}"`);e.addNode(t.name,t.name,a.x,a.y,"anchor")}),t.components.forEach(t=>{const a=p(t.visibility,t.evolution,`Component "${t.name}"`),r=t.label?(t.label.negX?-1:1)*t.label.offsetX:void 0,n=t.label?(t.label.negY?-1:1)*t.label.offsetY:void 0,o=t.decorator?.strategy;e.addNode(t.name,t.name,a.x,a.y,"component",r,n,t.inertia,o)}),t.notes.forEach(t=>{const a=p(t.visibility,t.evolution,`Note "${t.text}"`);e.addNote(t.text,a.x,a.y)}),t.pipelines.forEach(t=>{const a=e.getNode(t.parent);if(!a||"number"!=typeof a.y)throw new Error(`Pipeline "${t.parent}" must reference an existing component with coordinates.`);const r=a.y;e.startPipeline(t.parent),t.components.forEach(a=>{const n=`${t.parent}_${a.name}`,o=a.label?(a.label.negX?-1:1)*a.label.offsetX:void 0,i=a.label?(a.label.negY?-1:1)*a.label.offsetY:void 0,s=c(a.evolution,`Pipeline component "${a.name}" evolution`);e.addNode(n,a.name,s,r,"pipeline-component",o,i),e.addPipelineComponent(t.parent,n)})}),t.links.forEach(t=>{const a=!!t.arrow&&(t.arrow.includes("-.->")||t.arrow.includes(".-."));let r=h(t.fromPort)??h(t.toPort);const{flow:n,label:o}=x(t.arrow);!r&&n&&(r=n);const i=t.linkLabel,s=o??i;e.addLink(e.resolveNodeId(t.from),e.resolveNodeId(t.to),a,s,r)}),t.evolves.forEach(t=>{const a=e.getNode(t.component);if(void 0!==a?.y){const r=c(t.target,`Evolve target for "${t.component}"`);e.addTrend(t.component,r,a.y)}}),t.annotations.length>0){const a=t.annotations[0],r=p(a.x,a.y,"Annotations box");e.setAnnotationsBox(r.x,r.y)}t.annotation.forEach(t=>{const a=p(t.x,t.y,`Annotation ${t.number}`);e.addAnnotation(t.number,[{x:a.x,y:a.y}],t.text)}),t.accelerators.forEach(t=>{const a=p(t.x,t.y,`Accelerator "${t.name}"`);e.addAccelerator(t.name,a.x,a.y)}),t.deaccelerators.forEach(t=>{const a=p(t.x,t.y,`Deaccelerator "${t.name}"`);e.addDeaccelerator(t.name,a.x,a.y)})},"populateDb"),g={parser:{yy:void 0},parse:(0,l.K)(async t=>{const e=await(0,d.qg)("wardley",t);s.R.debug(e);const a=g.parser?.yy;if(!a||"function"!=typeof a.addNode)throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");y(e,a)},"parse")},f=new class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{(0,l.K)(this,"WardleyBuilder")}addNode(t){const e=this.nodes.get(t.id)??{id:t.id,label:t.label},a={...e,...t,className:t.className??e.className,labelOffsetX:t.labelOffsetX??e.labelOffsetX,labelOffsetY:t.labelOffsetY??e.labelOffsetY};this.nodes.set(t.id,a)}addLink(t){this.links.push(t)}addTrend(t){this.trends.set(t.nodeId,t)}startPipeline(t){this.pipelines.set(t,{nodeId:t,componentIds:[]});const e=this.nodes.get(t);e&&(e.isPipelineParent=!0)}addPipelineComponent(t,e){const a=this.pipelines.get(t);a&&a.componentIds.push(e);const r=this.nodes.get(e);r&&(r.inPipeline=!0)}addAnnotation(t){this.annotations.push(t)}addNote(t){this.notes.push(t)}addAccelerator(t){this.accelerators.push(t)}addDeaccelerator(t){this.deaccelerators.push(t)}setAnnotationsBox(t,e){this.annotationsBox={x:t,y:e}}setAxes(t){this.axes={...this.axes,...t}}setSize(t,e){this.size={width:t,height:e}}getNode(t){return this.nodes.get(t)}resolveNodeId(t){if(this.nodes.has(t))return t;for(const[e,a]of this.nodes)if(a.label===t)return e;return t}build(){const t=[];for(const e of this.nodes.values()){if("number"!=typeof e.x||"number"!=typeof e.y)throw new Error(`Node "${e.label}" is missing coordinates`);t.push(e)}return{nodes:t,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}};function u(){return(0,i.D7)()["wardley-beta"]}function w(t,e,a,r,n,o,i,s,l){f.addNode({id:t,label:e,x:a,y:r,className:n,labelOffsetX:o,labelOffsetY:i,inertia:s,sourceStrategy:l})}function m(t,e,a=!1,r,n){f.addLink({source:t,target:e,dashed:a,label:r,flow:n})}function k(t,e,a){f.addTrend({nodeId:t,targetX:e,targetY:a})}function b(t,e,a){f.addAnnotation({number:t,coordinates:e,text:a})}function $(t,e,a){f.addNote({text:t,x:e,y:a})}function S(t,e,a){f.addAccelerator({name:t,x:e,y:a})}function v(t,e,a){f.addDeaccelerator({name:t,x:e,y:a})}function C(t,e){f.setAnnotationsBox(t,e)}function M(t,e){f.setSize(t,e)}function P(t){f.startPipeline(t)}function N(t,e){f.addPipelineComponent(t,e)}function T(t){f.setAxes(t)}function z(t){return f.getNode(t)}function A(t){return f.resolveNodeId(t)}function L(){return f.build()}function I(){f.clear(),(0,i.IU)()}(0,l.K)(u,"getConfig"),(0,l.K)(w,"addNode"),(0,l.K)(m,"addLink"),(0,l.K)(k,"addTrend"),(0,l.K)(b,"addAnnotation"),(0,l.K)($,"addNote"),(0,l.K)(S,"addAccelerator"),(0,l.K)(v,"addDeaccelerator"),(0,l.K)(C,"setAnnotationsBox"),(0,l.K)(M,"setSize"),(0,l.K)(P,"startPipeline"),(0,l.K)(N,"addPipelineComponent"),(0,l.K)(T,"updateAxes"),(0,l.K)(z,"getNode"),(0,l.K)(A,"resolveNodeId"),(0,l.K)(L,"getWardleyData"),(0,l.K)(I,"clear");var E={getConfig:u,addNode:w,addLink:m,addTrend:k,addAnnotation:b,addNote:$,addAccelerator:S,addDeaccelerator:v,setAnnotationsBox:C,setSize:M,startPipeline:P,addPipelineComponent:N,updateAxes:T,getNode:z,resolveNodeId:A,getWardleyData:L,clear:I,setAccTitle:i.SV,getAccTitle:i.iN,setDiagramTitle:i.ke,getDiagramTitle:i.ab,getAccDescription:i.m7,setAccDescription:i.EI},K=["Genesis","Custom Built","Product","Commodity"],R=(0,l.K)(()=>{const{themeVariables:t}=(0,i.D7)();return{backgroundColor:t.wardley?.backgroundColor??t.background??"#fff",axisColor:t.wardley?.axisColor??"#000",axisTextColor:t.wardley?.axisTextColor??t.primaryTextColor??"#222",gridColor:t.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:t.wardley?.componentFill??"#fff",componentStroke:t.wardley?.componentStroke??"#000",componentLabelColor:t.wardley?.componentLabelColor??t.primaryTextColor??"#222",linkStroke:t.wardley?.linkStroke??"#000",evolutionStroke:t.wardley?.evolutionStroke??"#dc3545",annotationStroke:t.wardley?.annotationStroke??"#000",annotationTextColor:t.wardley?.annotationTextColor??t.primaryTextColor??"#222",annotationFill:t.wardley?.annotationFill??t.background??"#fff"}},"getTheme"),D=(0,l.K)(()=>{const t=(0,i.D7)()["wardley-beta"];return{width:t?.width??900,height:t?.height??600,padding:t?.padding??48,nodeRadius:t?.nodeRadius??6,nodeLabelOffset:t?.nodeLabelOffset??8,axisFontSize:t?.axisFontSize??12,labelFontSize:t?.labelFontSize??10,showGrid:t?.showGrid??!1,useMaxWidth:t?.useMaxWidth??!0}},"getConfigValues"),B={parser:g,db:E,renderer:{draw:(0,l.K)((t,e,a,r)=>{s.R.debug("Rendering Wardley map\n"+t);const o=D(),d=R(),c=1.6*o.nodeRadius,p=r.db,h=p.getWardleyData(),x=p.getDiagramTitle(),y=h.size?.width??o.width,g=h.size?.height??o.height,f=(0,n.D)(e);f.selectAll("*").remove(),(0,i.a$)(f,g,y,o.useMaxWidth),f.attr("viewBox",`0 0 ${y} ${g}`);const u=f.append("g").attr("class","wardley-map"),w=f.append("defs");w.append("marker").attr("id",`arrow-${e}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.evolutionStroke).attr("stroke","none"),w.append("marker").attr("id",`link-arrow-end-${e}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),w.append("marker").attr("id",`link-arrow-start-${e}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),u.append("rect").attr("class","wardley-background").attr("width",y).attr("height",g).attr("fill",d.backgroundColor);const m=y-2*o.padding,k=g-2*o.padding;x&&u.append("text").attr("class","wardley-title").attr("x",y/2).attr("y",o.padding/2).attr("fill",d.axisTextColor).attr("font-size",1.05*o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(x);const b=(0,l.K)(t=>o.padding+t/100*m,"projectX"),$=(0,l.K)(t=>g-o.padding-t/100*k,"projectY"),S=u.append("g").attr("class","wardley-axes");S.append("line").attr("x1",o.padding).attr("x2",y-o.padding).attr("y1",g-o.padding).attr("y2",g-o.padding).attr("stroke",d.axisColor).attr("stroke-width",1),S.append("line").attr("x1",o.padding).attr("x2",o.padding).attr("y1",o.padding).attr("y2",g-o.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const v=h.axes.xLabel??"Evolution",C=h.axes.yLabel??"Visibility";S.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",o.padding+m/2).attr("y",g-o.padding/4).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(v),S.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",o.padding/3).attr("y",o.padding+k/2).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${o.padding/3} ${o.padding+k/2})`).text(C);const M=h.axes.stages&&h.axes.stages.length>0?h.axes.stages:K;if(M.length>0){const t=u.append("g").attr("class","wardley-stages"),e=h.axes.stageBoundaries,a=[];if(e&&e.length===M.length){let t=0;e.forEach(e=>{a.push({start:t,end:e}),t=e})}else{const t=1/M.length;M.forEach((e,r)=>{a.push({start:r*t,end:(r+1)*t})})}M.forEach((e,r)=>{const n=a[r],i=o.padding+n.start*m,s=(i+(o.padding+n.end*m))/2;r>0&&t.append("line").attr("x1",i).attr("x2",i).attr("y1",o.padding).attr("y2",g-o.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",s).attr("y",g-o.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize-2).attr("text-anchor","middle").text(e)})}if(o.showGrid){const t=u.append("g").attr("class","wardley-grid");for(let e=1;e<4;e++){const a=e/4,r=o.padding+m*a;t.append("line").attr("x1",r).attr("x2",r).attr("y1",o.padding).attr("y2",g-o.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",o.padding).attr("x2",y-o.padding).attr("y1",g-o.padding-k*a).attr("y2",g-o.padding-k*a).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const P=new Map;if(h.nodes.forEach(t=>{P.set(t.id,{x:b(t.x),y:$(t.y),node:t})}),h.pipelines.length>0){const t=u.append("g").attr("class","wardley-pipelines"),e=u.append("g").attr("class","wardley-pipeline-links");h.pipelines.forEach(a=>{if(0===a.componentIds.length)return;const r=a.componentIds.map(t=>({id:t,pos:P.get(t),node:h.nodes.find(e=>e.id===t)})).filter(t=>t.pos&&t.node).sort((t,e)=>t.node.x-e.node.x);for(let t=0;t{const e=P.get(t);e&&(n=Math.min(n,e.x),i=Math.max(i,e.x),s=e.y)}),n!==1/0&&i!==-1/0){const e=15,r=4*o.nodeRadius,l=s-r/2,p=P.get(a.nodeId);if(p){const t=(n+i)/2;p.x=t,p.y=l-c/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",n-e).attr("y",l).attr("width",i-n+2*e).attr("height",r).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const N=u.append("g").attr("class","wardley-links"),T=new Map;h.pipelines.forEach(t=>{T.set(t.nodeId,new Set(t.componentIds))});const z=h.links.filter(t=>{if(!P.has(t.source)||!P.has(t.target))return!1;const e=T.get(t.target);return!e?.has(t.source)});N.selectAll("line").data(z).enter().append("line").attr("class",t=>"wardley-link"+(t.dashed?" wardley-link--dashed":"")).attr("x1",t=>{const e=P.get(t.source),a=P.get(t.target),r=h.nodes.find(e=>e.id===t.source).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,n=a.x-e.x,i=a.y-e.y,s=Math.sqrt(n*n+i*i);return e.x+n/s*r}).attr("y1",t=>{const e=P.get(t.source),a=P.get(t.target),r=h.nodes.find(e=>e.id===t.source).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,n=a.x-e.x,i=a.y-e.y,s=Math.sqrt(n*n+i*i);return e.y+i/s*r}).attr("x2",t=>{const e=P.get(t.source),a=P.get(t.target),r=h.nodes.find(e=>e.id===t.target).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,n=e.x-a.x,i=e.y-a.y,s=Math.sqrt(n*n+i*i);return a.x+n/s*r}).attr("y2",t=>{const e=P.get(t.source),a=P.get(t.target),r=h.nodes.find(e=>e.id===t.target).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,n=e.x-a.x,i=e.y-a.y,s=Math.sqrt(n*n+i*i);return a.y+i/s*r}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>"forward"===t.flow||"bidirectional"===t.flow?`url(#link-arrow-end-${e})`:null).attr("marker-start",t=>"backward"===t.flow||"bidirectional"===t.flow?`url(#link-arrow-start-${e})`:null),N.selectAll("text").data(z.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const e=P.get(t.source),a=P.get(t.target),r=(e.x+a.x)/2,n=a.y-e.y,o=a.x-e.x;return r+8*(n/Math.sqrt(o*o+n*n))}).attr("y",t=>{const e=P.get(t.source),a=P.get(t.target),r=(e.y+a.y)/2,n=a.x-e.x,o=a.y-e.y;return r+8*(-n/Math.sqrt(n*n+o*o))}).attr("fill",d.axisTextColor).attr("font-size",o.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const e=P.get(t.source),a=P.get(t.target),r=(e.x+a.x)/2,n=(e.y+a.y)/2,o=a.x-e.x,i=a.y-e.y,s=Math.sqrt(o*o+i*i),l=r+8*(i/s),d=n+8*(-o/s);let c=180*Math.atan2(i,o)/Math.PI;return(c>90||c<-90)&&(c+=180),`rotate(${c} ${l} ${d})`}).text(t=>t.label);const A=u.append("g").attr("class","wardley-trends"),L=h.trends.map(t=>{const e=P.get(t.nodeId);if(!e)return null;const a=b(t.targetX),r=$(t.targetY),n=a-e.x,i=r-e.y,s=Math.sqrt(n*n+i*i),l=o.nodeRadius+2;return{origin:e,targetX:a,targetY:r,adjustedX2:s>l?a-n/s*l:a,adjustedY2:s>l?r-i/s*l:r}}).filter(t=>null!==t);A.selectAll("line").data(L).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${e})`);const I=u.append("g").attr("class","wardley-nodes").selectAll("g").data(h.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));I.filter(t=>"outsource"===t.sourceStrategy).append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>P.get(t.id).x).attr("cy",t=>P.get(t.id).y).attr("r",2*o.nodeRadius).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),I.filter(t=>"buy"===t.sourceStrategy).append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>P.get(t.id).x).attr("cy",t=>P.get(t.id).y).attr("r",2*o.nodeRadius).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),I.filter(t=>"build"===t.sourceStrategy).append("circle").attr("class","wardley-build-overlay").attr("cx",t=>P.get(t.id).x).attr("cy",t=>P.get(t.id).y).attr("r",2*o.nodeRadius).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const E=I.filter(t=>"market"===t.sourceStrategy);E.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>P.get(t.id).x).attr("cy",t=>P.get(t.id).y).attr("r",2*o.nodeRadius).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),I.filter(t=>!t.isPipelineParent&&"market"!==t.sourceStrategy&&"anchor"!==t.className).append("circle").attr("cx",t=>P.get(t.id).x).attr("cy",t=>P.get(t.id).y).attr("r",o.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const B=.7*o.nodeRadius,F=1.2*o.nodeRadius;if(E.append("line").attr("class","wardley-market-line").attr("x1",t=>P.get(t.id).x).attr("y1",t=>P.get(t.id).y-F).attr("x2",t=>P.get(t.id).x-F*Math.cos(Math.PI/6)).attr("y2",t=>P.get(t.id).y+F*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),E.append("line").attr("class","wardley-market-line").attr("x1",t=>P.get(t.id).x-F*Math.cos(Math.PI/6)).attr("y1",t=>P.get(t.id).y+F*Math.sin(Math.PI/6)).attr("x2",t=>P.get(t.id).x+F*Math.cos(Math.PI/6)).attr("y2",t=>P.get(t.id).y+F*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),E.append("line").attr("class","wardley-market-line").attr("x1",t=>P.get(t.id).x+F*Math.cos(Math.PI/6)).attr("y1",t=>P.get(t.id).y+F*Math.sin(Math.PI/6)).attr("x2",t=>P.get(t.id).x).attr("y2",t=>P.get(t.id).y-F).attr("stroke",d.componentStroke).attr("stroke-width",1),E.append("circle").attr("class","wardley-market-dot").attr("cx",t=>P.get(t.id).x).attr("cy",t=>P.get(t.id).y-F).attr("r",B).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),E.append("circle").attr("class","wardley-market-dot").attr("cx",t=>P.get(t.id).x-F*Math.cos(Math.PI/6)).attr("cy",t=>P.get(t.id).y+F*Math.sin(Math.PI/6)).attr("r",B).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),E.append("circle").attr("class","wardley-market-dot").attr("cx",t=>P.get(t.id).x+F*Math.cos(Math.PI/6)).attr("cy",t=>P.get(t.id).y+F*Math.sin(Math.PI/6)).attr("r",B).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),I.filter(t=>!0===t.isPipelineParent).append("rect").attr("x",t=>P.get(t.id).x-c/2).attr("y",t=>P.get(t.id).y-c/2).attr("width",c).attr("height",c).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),I.filter(t=>!0===t.inertia).append("line").attr("class","wardley-inertia").attr("x1",t=>{const e=P.get(t.id);let a=t.isPipelineParent?c/2+15:o.nodeRadius+15;return t.sourceStrategy&&(a+=o.nodeRadius+10),e.x+a}).attr("y1",t=>{const e=P.get(t.id),a=t.isPipelineParent?c:2*o.nodeRadius;return e.y-a/2}).attr("x2",t=>{const e=P.get(t.id);let a=t.isPipelineParent?c/2+15:o.nodeRadius+15;return t.sourceStrategy&&(a+=o.nodeRadius+10),e.x+a}).attr("y2",t=>{const e=P.get(t.id),a=t.isPipelineParent?c:2*o.nodeRadius;return e.y+a/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),I.append("text").attr("x",t=>{const e=P.get(t.id);if("anchor"===t.className)return void 0!==t.labelOffsetX?e.x+t.labelOffsetX:e.x;let a=o.nodeLabelOffset;t.sourceStrategy&&void 0===t.labelOffsetX&&(a+=10);const r=t.labelOffsetX??a;return e.x+r}).attr("y",t=>{const e=P.get(t.id);if("anchor"===t.className)return void 0!==t.labelOffsetY?e.y+t.labelOffsetY:e.y-3;let a=-o.nodeLabelOffset;t.sourceStrategy&&void 0===t.labelOffsetY&&(a-=10);const r=t.labelOffsetY??a;return e.y+r}).attr("class","wardley-node-label").attr("fill",t=>"evolved"===t.className?d.evolutionStroke:"anchor"===t.className?"#000":d.componentLabelColor).attr("font-size",o.labelFontSize).attr("font-weight",t=>"anchor"===t.className?"bold":"normal").attr("text-anchor",t=>"anchor"===t.className?"middle":"start").attr("dominant-baseline",t=>"anchor"===t.className?"middle":"auto").text(t=>t.label),h.annotations.length>0){const t=u.append("g").attr("class","wardley-annotations");if(h.annotations.forEach(e=>{const a=e.coordinates.map(t=>({x:b(t.x),y:$(t.y)}));if(a.length>1)for(let r=0;r{const r=t.append("g").attr("class","wardley-annotation");r.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),r.append("text").attr("x",a.x).attr("y",a.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(e.number)})}),h.annotationsBox){let e=b(h.annotationsBox.x),a=$(h.annotationsBox.y);const r=10,n=16,i=11,s=t.append("g").attr("class","wardley-annotations-box"),l=[...h.annotations].filter(t=>t.text).sort((t,e)=>t.number-e.number),c=[];if(l.forEach((t,o)=>{const l=s.append("text").attr("x",e+r).attr("y",a+r+(o+1)*n).attr("font-size",i).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${t.number}. ${t.text}`);c.push(l)}),c.length>0){let t=0,i=0;c.forEach(e=>{const a=e.node(),r=a.getComputedTextLength();t=Math.max(t,r);const n=a.getBBox();i=Math.max(i,n.height)});const p=t+2*r+105,h=l.length*n+2*r+i/2,x=o.padding,f=y-o.padding-p,u=o.padding,w=g-o.padding-h;e=Math.max(x,Math.min(e,f)),a=Math.max(u,Math.min(a,w)),c.forEach((t,o)=>{t.attr("x",e+r).attr("y",a+r+(o+1)*n)}),s.insert("rect","text").attr("x",e).attr("y",a).attr("width",p).attr("height",h).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(h.notes.length>0){const t=u.append("g").attr("class","wardley-notes");h.notes.forEach(e=>{const a=b(e.x),r=$(e.y);t.append("text").attr("x",a).attr("y",r).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(e.text)})}if(h.accelerators.length>0){const t=u.append("g").attr("class","wardley-accelerators");h.accelerators.forEach(e=>{const a=b(e.x),r=$(e.y),n=60,o=`\n M ${a} ${r-15}\n L ${a+n-20} ${r-15}\n L ${a+n-20} ${r-15-8}\n L ${a+n} ${r}\n L ${a+n-20} ${r+15+8}\n L ${a+n-20} ${r+15}\n L ${a} ${r+15}\n Z\n `;t.append("path").attr("d",o).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),t.append("text").attr("x",a+30).attr("y",r+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(e.name)})}if(h.deaccelerators.length>0){const t=u.append("g").attr("class","wardley-deaccelerators");h.deaccelerators.forEach(e=>{const a=b(e.x),r=$(e.y),n=`\n M ${a+60} ${r-15}\n L ${a+20} ${r-15}\n L ${a+20} ${r-15-8}\n L ${a} ${r}\n L ${a+20} ${r+15+8}\n L ${a+20} ${r+15}\n L ${a+60} ${r+15}\n Z\n `;t.append("path").attr("d",n).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),t.append("text").attr("x",a+30).attr("y",r+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(e.name)})}},"draw")},styles:(0,l.K)(({wardley:t}={})=>{const e=(0,i.P$)(),a=(0,i.zj)(),r=(0,o.$t)(e,a.themeVariables),n=(0,o.$t)(r.wardley,t);return`\n .wardley-background {\n fill: ${n.backgroundColor};\n }\n .wardley-axes line, .wardley-axes path {\n stroke: ${n.axisColor};\n }\n .wardley-axis-label {\n fill: ${n.axisTextColor};\n }\n .wardley-stage-label {\n fill: ${n.axisTextColor};\n }\n .wardley-grid line {\n stroke: ${n.gridColor};\n }\n .wardley-node circle {\n fill: ${n.componentFill};\n stroke: ${n.componentStroke};\n }\n .wardley-node-label {\n fill: ${n.componentLabelColor};\n }\n .wardley-link {\n stroke: ${n.linkStroke};\n }\n .wardley-link--dashed {\n stroke-dasharray: 4 4;\n }\n .wardley-link-label {\n fill: ${n.axisTextColor};\n }\n .wardley-trend line {\n stroke: ${n.evolutionStroke};\n }\n .wardley-annotation-line {\n stroke: ${n.annotationStroke};\n }\n .wardley-annotation circle {\n fill: ${n.annotationFill};\n stroke: ${n.annotationStroke};\n }\n .wardley-annotation text {\n fill: ${n.annotationTextColor};\n }\n .wardley-annotations-box rect {\n fill: ${n.annotationFill};\n stroke: ${n.annotationStroke};\n }\n .wardley-annotations-box text {\n fill: ${n.annotationTextColor};\n }\n .wardley-pipeline-box {\n stroke: ${n.componentStroke};\n }\n .wardley-notes text {\n fill: ${n.axisTextColor};\n }\n `},"styles")}}}]); \ No newline at end of file diff --git a/assets/js/7486.790c3a0b.js b/assets/js/7486.790c3a0b.js new file mode 100644 index 000000000..649978f6c --- /dev/null +++ b/assets/js/7486.790c3a0b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[7486],{87486(t,e,i){i.d(e,{diagram:()=>I});var a=i(76385),n=i(31293),s=i(86827),r=i(70451),o=function(){var t=(0,s.K)(function(t,e,i,a){for(i=i||{},a=t.length;a--;i[t[a]]=e);return i},"o"),e=[1,3],i=[1,4],a=[1,5],n=[1,6],r=[1,7],o=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],h=[55,56,57],c=[2,36],d=[1,37],u=[1,36],x=[1,38],g=[1,35],f=[1,43],p=[1,41],y=[1,45],T=[1,14],m=[1,23],q=[1,18],A=[1,19],_=[1,20],b=[1,21],S=[1,22],k=[1,24],F=[1,25],P=[1,26],C=[1,27],L=[1,28],v=[1,29],I=[1,32],E=[1,33],D=[1,34],z=[1,39],w=[1,40],K=[1,42],U=[1,44],N=[1,63],R=[1,62],B=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],W=[1,66],$=[1,67],Q=[1,68],O=[1,69],X=[1,70],H=[1,71],M=[1,72],Y=[1,73],j=[1,74],G=[1,75],V=[1,76],Z=[1,77],J=[4,5,6,7,8,9,10,11,12,13,14,15,18],tt=[1,91],et=[1,92],it=[1,93],at=[1,100],nt=[1,94],st=[1,97],rt=[1,95],ot=[1,96],lt=[1,98],ht=[1,99],ct=[1,103],dt=[10,55,56,57],ut=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],xt={trace:(0,s.K)(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:(0,s.K)(function(t,e,i,a,n,s,r){var o=s.length-1;switch(n){case 23:case 68:this.$=s[o];break;case 24:case 69:this.$=s[o-1]+""+s[o];break;case 26:this.$=s[o-1]+s[o];break;case 27:this.$=[s[o].trim()];break;case 28:s[o-2].push(s[o].trim()),this.$=s[o-2];break;case 29:this.$=s[o-4],a.addClass(s[o-2],s[o]);break;case 37:this.$=[];break;case 42:this.$=s[o].trim(),a.setDiagramTitle(this.$);break;case 43:this.$=s[o].trim(),a.setAccTitle(this.$);break;case 44:case 45:this.$=s[o].trim(),a.setAccDescription(this.$);break;case 46:a.addSection(s[o].substr(8)),this.$=s[o].substr(8);break;case 47:a.addPoint(s[o-3],"",s[o-1],s[o],[]);break;case 48:a.addPoint(s[o-4],s[o-3],s[o-1],s[o],[]);break;case 49:a.addPoint(s[o-4],"",s[o-2],s[o-1],s[o]);break;case 50:a.addPoint(s[o-5],s[o-4],s[o-2],s[o-1],s[o]);break;case 51:a.setXAxisLeftText(s[o-2]),a.setXAxisRightText(s[o]);break;case 52:s[o-1].text+=" \u27f6 ",a.setXAxisLeftText(s[o-1]);break;case 53:a.setXAxisLeftText(s[o]);break;case 54:a.setYAxisBottomText(s[o-2]),a.setYAxisTopText(s[o]);break;case 55:s[o-1].text+=" \u27f6 ",a.setYAxisBottomText(s[o-1]);break;case 56:a.setYAxisBottomText(s[o]);break;case 57:a.setQuadrant1Text(s[o]);break;case 58:a.setQuadrant2Text(s[o]);break;case 59:a.setQuadrant3Text(s[o]);break;case 60:a.setQuadrant4Text(s[o]);break;case 64:case 66:this.$={text:s[o],type:"text"};break;case 65:this.$={text:s[o-1].text+""+s[o],type:s[o-1].type};break;case 67:this.$={text:s[o],type:"markdown"}}},"anonymous"),table:[{18:e,26:1,27:2,28:i,55:a,56:n,57:r},{1:[3]},{18:e,26:8,27:2,28:i,55:a,56:n,57:r},{18:e,26:9,27:2,28:i,55:a,56:n,57:r},t(o,[2,33],{29:10}),t(l,[2,61]),t(l,[2,62]),t(l,[2,63]),{1:[2,30]},{1:[2,31]},t(h,c,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:u,10:x,12:g,13:f,14:p,15:y,18:T,25:m,35:q,37:A,39:_,41:b,42:S,48:k,50:F,51:P,52:C,53:L,54:v,60:I,61:E,63:D,64:z,65:w,66:K,67:U}),t(o,[2,34]),{27:46,55:a,56:n,57:r},t(h,[2,37]),t(h,c,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:d,5:u,10:x,12:g,13:f,14:p,15:y,18:T,25:m,35:q,37:A,39:_,41:b,42:S,48:k,50:F,51:P,52:C,53:L,54:v,60:I,61:E,63:D,64:z,65:w,66:K,67:U}),t(h,[2,39]),t(h,[2,40]),t(h,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(h,[2,45]),t(h,[2,46]),{18:[1,51]},{4:d,5:u,10:x,12:g,13:f,14:p,15:y,43:52,58:31,60:I,61:E,63:D,64:z,65:w,66:K,67:U},{4:d,5:u,10:x,12:g,13:f,14:p,15:y,43:53,58:31,60:I,61:E,63:D,64:z,65:w,66:K,67:U},{4:d,5:u,10:x,12:g,13:f,14:p,15:y,43:54,58:31,60:I,61:E,63:D,64:z,65:w,66:K,67:U},{4:d,5:u,10:x,12:g,13:f,14:p,15:y,43:55,58:31,60:I,61:E,63:D,64:z,65:w,66:K,67:U},{4:d,5:u,10:x,12:g,13:f,14:p,15:y,43:56,58:31,60:I,61:E,63:D,64:z,65:w,66:K,67:U},{4:d,5:u,10:x,12:g,13:f,14:p,15:y,43:57,58:31,60:I,61:E,63:D,64:z,65:w,66:K,67:U},{4:d,5:u,8:N,10:x,12:g,13:f,14:p,15:y,18:R,44:[1,58],47:[1,59],58:61,59:60,63:D,64:z,65:w,66:K,67:U},t(B,[2,64]),t(B,[2,66]),t(B,[2,67]),t(B,[2,70]),t(B,[2,71]),t(B,[2,72]),t(B,[2,73]),t(B,[2,74]),t(B,[2,75]),t(B,[2,76]),t(B,[2,77]),t(B,[2,78]),t(B,[2,79]),t(B,[2,80]),t(B,[2,81]),t(o,[2,35]),t(h,[2,38]),t(h,[2,42]),t(h,[2,43]),t(h,[2,44]),{3:65,4:W,5:$,6:Q,7:O,8:X,9:H,10:M,11:Y,12:j,13:G,14:V,15:Z,21:64},t(h,[2,53],{59:60,58:61,4:d,5:u,8:N,10:x,12:g,13:f,14:p,15:y,18:R,49:[1,78],63:D,64:z,65:w,66:K,67:U}),t(h,[2,56],{59:60,58:61,4:d,5:u,8:N,10:x,12:g,13:f,14:p,15:y,18:R,49:[1,79],63:D,64:z,65:w,66:K,67:U}),t(h,[2,57],{59:60,58:61,4:d,5:u,8:N,10:x,12:g,13:f,14:p,15:y,18:R,63:D,64:z,65:w,66:K,67:U}),t(h,[2,58],{59:60,58:61,4:d,5:u,8:N,10:x,12:g,13:f,14:p,15:y,18:R,63:D,64:z,65:w,66:K,67:U}),t(h,[2,59],{59:60,58:61,4:d,5:u,8:N,10:x,12:g,13:f,14:p,15:y,18:R,63:D,64:z,65:w,66:K,67:U}),t(h,[2,60],{59:60,58:61,4:d,5:u,8:N,10:x,12:g,13:f,14:p,15:y,18:R,63:D,64:z,65:w,66:K,67:U}),{45:[1,80]},{44:[1,81]},t(B,[2,65]),t(B,[2,82]),t(B,[2,83]),t(B,[2,84]),{3:83,4:W,5:$,6:Q,7:O,8:X,9:H,10:M,11:Y,12:j,13:G,14:V,15:Z,18:[1,82]},t(J,[2,23]),t(J,[2,1]),t(J,[2,2]),t(J,[2,3]),t(J,[2,4]),t(J,[2,5]),t(J,[2,6]),t(J,[2,7]),t(J,[2,8]),t(J,[2,9]),t(J,[2,10]),t(J,[2,11]),t(J,[2,12]),t(h,[2,52],{58:31,43:84,4:d,5:u,10:x,12:g,13:f,14:p,15:y,60:I,61:E,63:D,64:z,65:w,66:K,67:U}),t(h,[2,55],{58:31,43:85,4:d,5:u,10:x,12:g,13:f,14:p,15:y,60:I,61:E,63:D,64:z,65:w,66:K,67:U}),{46:[1,86]},{45:[1,87]},{4:tt,5:et,6:it,8:at,11:nt,13:st,16:90,17:rt,18:ot,19:lt,20:ht,22:89,23:88},t(J,[2,24]),t(h,[2,51],{59:60,58:61,4:d,5:u,8:N,10:x,12:g,13:f,14:p,15:y,18:R,63:D,64:z,65:w,66:K,67:U}),t(h,[2,54],{59:60,58:61,4:d,5:u,8:N,10:x,12:g,13:f,14:p,15:y,18:R,63:D,64:z,65:w,66:K,67:U}),t(h,[2,47],{22:89,16:90,23:101,4:tt,5:et,6:it,8:at,11:nt,13:st,17:rt,18:ot,19:lt,20:ht}),{46:[1,102]},t(h,[2,29],{10:ct}),t(dt,[2,27],{16:104,4:tt,5:et,6:it,8:at,11:nt,13:st,17:rt,18:ot,19:lt,20:ht}),t(ut,[2,25]),t(ut,[2,13]),t(ut,[2,14]),t(ut,[2,15]),t(ut,[2,16]),t(ut,[2,17]),t(ut,[2,18]),t(ut,[2,19]),t(ut,[2,20]),t(ut,[2,21]),t(ut,[2,22]),t(h,[2,49],{10:ct}),t(h,[2,48],{22:89,16:90,23:105,4:tt,5:et,6:it,8:at,11:nt,13:st,17:rt,18:ot,19:lt,20:ht}),{4:tt,5:et,6:it,8:at,11:nt,13:st,16:90,17:rt,18:ot,19:lt,20:ht,22:106},t(ut,[2,26]),t(h,[2,50],{10:ct}),t(dt,[2,28],{16:104,4:tt,5:et,6:it,8:at,11:nt,13:st,17:rt,18:ot,19:lt,20:ht})],defaultActions:{8:[2,30],9:[2,31]},parseError:(0,s.K)(function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},"parseError"),parse:(0,s.K)(function(t){var e=this,i=[0],a=[],n=[null],r=[],o=this.table,l="",h=0,c=0,d=0,u=r.slice.call(arguments,1),x=Object.create(this.lexer),g={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(g.yy[f]=this.yy[f]);x.setInput(t,g.yy),g.yy.lexer=x,g.yy.parser=this,void 0===x.yylloc&&(x.yylloc={});var p=x.yylloc;r.push(p);var y=x.options&&x.options.ranges;function T(){var t;return"number"!=typeof(t=a.pop()||x.lex()||1)&&(t instanceof Array&&(t=(a=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K)(function(t){i.length=i.length-2*t,n.length=n.length-t,r.length=r.length-t},"popStack"),(0,s.K)(T,"lex");for(var m,q,A,_,b,S,k,F,P,C={};;){if(A=i[i.length-1],this.defaultActions[A]?_=this.defaultActions[A]:(null==m&&(m=T()),_=o[A]&&o[A][m]),void 0===_||!_.length||!_[0]){var L="";for(S in P=[],o[A])this.terminals_[S]&&S>2&&P.push("'"+this.terminals_[S]+"'");L=x.showPosition?"Parse error on line "+(h+1)+":\n"+x.showPosition()+"\nExpecting "+P.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(L,{text:x.match,token:this.terminals_[m]||m,line:x.yylineno,loc:p,expected:P})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+m);switch(_[0]){case 1:i.push(m),n.push(x.yytext),r.push(x.yylloc),i.push(_[1]),m=null,q?(m=q,q=null):(c=x.yyleng,l=x.yytext,h=x.yylineno,p=x.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[_[1]][1],C.$=n[n.length-k],C._$={first_line:r[r.length-(k||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(k||1)].first_column,last_column:r[r.length-1].last_column},y&&(C._$.range=[r[r.length-(k||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply(C,[l,c,h,g.yy,_[1],n,r].concat(u))))return b;k&&(i=i.slice(0,-1*k*2),n=n.slice(0,-1*k),r=r.slice(0,-1*k)),i.push(this.productions_[_[1]][0]),n.push(C.$),r.push(C._$),F=o[i[i.length-2]][i[i.length-1]],i.push(F);break;case 3:return!0}}return!0},"parse")},gt=function(){return{EOF:1,parseError:(0,s.K)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,s.K)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,s.K)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,s.K)(function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var a=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===a.length?this.yylloc.first_column:0)+a[a.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,s.K)(function(){return this._more=!0,this},"more"),reject:(0,s.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,s.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,s.K)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,s.K)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,s.K)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,s.K)(function(t,e){var i,a,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in n)this[s]=n[s];return!1}return!1},"test_match"),next:(0,s.K)(function(){if(this.done)return this.EOF;var t,e,i,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),s=0;se[0].length)){if(e=i,a=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[a]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,s.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,s.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,s.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,s.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,s.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,s.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,s.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,s.K)(function(t,e,i,a){switch(i){case 0:case 1:case 3:break;case 2:return 55;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 23:case 25:case 31:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 24:this.begin("string");break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 15;case 37:return 11;case 38:return 64;case 39:return 10;case 40:case 41:return 65;case 42:return 14;case 43:return 13;case 44:return 67;case 45:return 66;case 46:return 12;case 47:return 8;case 48:return 5;case 49:return 18;case 50:return 56;case 51:return 63;case 52:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?:[^\x00-\x7F]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}}}();function ft(){this.yy={}}return xt.lexer=gt,(0,s.K)(ft,"Parser"),ft.prototype=xt,xt.Parser=ft,new ft}();o.parser=o;var l=o,h=(0,a.P$)(),c=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{(0,s.K)(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:a.UI.quadrantChart?.chartWidth||500,chartWidth:a.UI.quadrantChart?.chartHeight||500,titlePadding:a.UI.quadrantChart?.titlePadding||10,titleFontSize:a.UI.quadrantChart?.titleFontSize||20,quadrantPadding:a.UI.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:a.UI.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:a.UI.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:a.UI.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:a.UI.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:a.UI.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:a.UI.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:a.UI.quadrantChart?.pointTextPadding||5,pointLabelFontSize:a.UI.quadrantChart?.pointLabelFontSize||12,pointRadius:a.UI.quadrantChart?.pointRadius||5,xAxisPosition:a.UI.quadrantChart?.xAxisPosition||"top",yAxisPosition:a.UI.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:a.UI.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:a.UI.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:h.quadrant1Fill,quadrant2Fill:h.quadrant2Fill,quadrant3Fill:h.quadrant3Fill,quadrant4Fill:h.quadrant4Fill,quadrant1TextFill:h.quadrant1TextFill,quadrant2TextFill:h.quadrant2TextFill,quadrant3TextFill:h.quadrant3TextFill,quadrant4TextFill:h.quadrant4TextFill,quadrantPointFill:h.quadrantPointFill,quadrantPointTextFill:h.quadrantPointTextFill,quadrantXAxisTextFill:h.quadrantXAxisTextFill,quadrantYAxisTextFill:h.quadrantYAxisTextFill,quadrantTitleFill:h.quadrantTitleFill,quadrantInternalBorderStrokeFill:h.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:h.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,n.R.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,e){this.classes.set(t,e)}setConfig(t){n.R.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){n.R.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,e,i,a){const n=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,s={top:"top"===t&&e?n:0,bottom:"bottom"===t&&e?n:0},r=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,o={left:"left"===this.config.yAxisPosition&&i?r:0,right:"right"===this.config.yAxisPosition&&i?r:0},l=this.config.titleFontSize+2*this.config.titlePadding,h={top:a?l:0},c=this.config.quadrantPadding+o.left,d=this.config.quadrantPadding+s.top+h.top,u=this.config.chartWidth-2*this.config.quadrantPadding-o.left-o.right,x=this.config.chartHeight-2*this.config.quadrantPadding-s.top-s.bottom-h.top;return{xAxisSpace:s,yAxisSpace:o,titleSpace:h,quadrantSpace:{quadrantLeft:c,quadrantTop:d,quadrantWidth:u,quadrantHalfWidth:u/2,quadrantHeight:x,quadrantHalfHeight:x/2}}}getAxisLabels(t,e,i,a){const{quadrantSpace:n,titleSpace:s}=a,{quadrantHalfHeight:r,quadrantHeight:o,quadrantLeft:l,quadrantHalfWidth:h,quadrantTop:c,quadrantWidth:d}=n,u=Boolean(this.data.xAxisRightText),x=Boolean(this.data.yAxisTopText),g=[];return this.data.xAxisLeftText&&e&&g.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+(u?h/2:0),y:"top"===t?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+c+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&e&&g.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+h+(u?h/2:0),y:"top"===t?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+c+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&i&&g.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+d+this.config.quadrantPadding,y:c+o-(x?r/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&i&&g.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+d+this.config.quadrantPadding,y:c+r-(x?r/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),g}getQuadrants(t){const{quadrantSpace:e}=t,{quadrantHalfHeight:i,quadrantLeft:a,quadrantHalfWidth:n,quadrantTop:s}=e,r=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+n,y:s,width:n,height:i,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:s,width:n,height:i,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:s+i,width:n,height:i,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+n,y:s+i,width:n,height:i,fill:this.themeConfig.quadrant4Fill}];for(const o of r)o.text.x=o.x+o.width/2,0===this.data.points.length?(o.text.y=o.y+o.height/2,o.text.horizontalPos="middle"):(o.text.y=o.y+this.config.quadrantTextTopPadding,o.text.horizontalPos="top");return r}getQuadrantPoints(t){const{quadrantSpace:e}=t,{quadrantHeight:i,quadrantLeft:a,quadrantTop:n,quadrantWidth:s}=e,o=(0,r.m4Y)().domain([0,1]).range([a,s+a]),l=(0,r.m4Y)().domain([0,1]).range([i+n,n]);return this.data.points.map(t=>{const e=this.classes.get(t.className);e&&(t={...e,...t});return{x:o(t.x),y:l(t.y),fill:t.color??this.themeConfig.quadrantPointFill,radius:t.radius??this.config.pointRadius,text:{text:t.text,fill:this.themeConfig.quadrantPointTextFill,x:o(t.x),y:l(t.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:t.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:t.strokeWidth??"0px"}})}getBorders(t){const e=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:i}=t,{quadrantHalfHeight:a,quadrantHeight:n,quadrantLeft:s,quadrantHalfWidth:r,quadrantTop:o,quadrantWidth:l}=i;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-e,y1:o,x2:s+l+e,y2:o},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s+l,y1:o+e,x2:s+l,y2:o+n-e},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-e,y1:o+n,x2:s+l+e,y2:o+n},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s,y1:o+e,x2:s,y2:o+n-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+r,y1:o+e,x2:s+r,y2:o+n-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+e,y1:o+a,x2:s+l-e,y2:o+a}]}getTitle(t){if(t)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const t=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),e=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),i=this.config.showTitle&&!!this.data.titleText,a=this.data.points.length>0?"bottom":this.config.xAxisPosition,n=this.calculateSpace(a,t,e,i);return{points:this.getQuadrantPoints(n),quadrants:this.getQuadrants(n),axisLabels:this.getAxisLabels(a,t,e,n),borderLines:this.getBorders(n),title:this.getTitle(i)}}},d=class extends Error{static{(0,s.K)(this,"InvalidStyleError")}constructor(t,e,i){super(`value for ${t} ${e} is invalid, please use a valid ${i}`),this.name="InvalidStyleError"}};function u(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}function x(t){return!/^\d+$/.test(t)}function g(t){return!/^\d+px$/.test(t)}function f(t){return(0,a.jZ)(t.trim(),(0,a.D7)())}(0,s.K)(u,"validateHexCode"),(0,s.K)(x,"validateNumber"),(0,s.K)(g,"validateSizeInPixels"),(0,s.K)(f,"textSanitizer");var p=new c;function y(t){p.setData({quadrant1Text:f(t.text)})}function T(t){p.setData({quadrant2Text:f(t.text)})}function m(t){p.setData({quadrant3Text:f(t.text)})}function q(t){p.setData({quadrant4Text:f(t.text)})}function A(t){p.setData({xAxisLeftText:f(t.text)})}function _(t){p.setData({xAxisRightText:f(t.text)})}function b(t){p.setData({yAxisTopText:f(t.text)})}function S(t){p.setData({yAxisBottomText:f(t.text)})}function k(t){const e={};for(const i of t){const[t,a]=i.trim().split(/\s*:\s*/);if("radius"===t){if(x(a))throw new d(t,a,"number");e.radius=parseInt(a)}else if("color"===t){if(u(a))throw new d(t,a,"hex code");e.color=a}else if("stroke-color"===t){if(u(a))throw new d(t,a,"hex code");e.strokeColor=a}else{if("stroke-width"!==t)throw new Error(`style named ${t} is not supported.`);if(g(a))throw new d(t,a,"number of pixels (eg. 10px)");e.strokeWidth=a}}return e}function F(t,e,i,a,n){const s=k(n);p.addPoints([{x:i,y:a,text:f(t.text),className:e,...s}])}function P(t,e){p.addClass(t,k(e))}function C(t){p.setConfig({chartWidth:t})}function L(t){p.setConfig({chartHeight:t})}function v(){const t=(0,a.D7)(),{themeVariables:e,quadrantChart:i}=t;return i&&p.setConfig(i),p.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),p.setData({titleText:(0,a.ab)()}),p.build()}(0,s.K)(y,"setQuadrant1Text"),(0,s.K)(T,"setQuadrant2Text"),(0,s.K)(m,"setQuadrant3Text"),(0,s.K)(q,"setQuadrant4Text"),(0,s.K)(A,"setXAxisLeftText"),(0,s.K)(_,"setXAxisRightText"),(0,s.K)(b,"setYAxisTopText"),(0,s.K)(S,"setYAxisBottomText"),(0,s.K)(k,"parseStyles"),(0,s.K)(F,"addPoint"),(0,s.K)(P,"addClass"),(0,s.K)(C,"setWidth"),(0,s.K)(L,"setHeight"),(0,s.K)(v,"getQuadrantData");var I={parser:l,db:{setWidth:C,setHeight:L,setQuadrant1Text:y,setQuadrant2Text:T,setQuadrant3Text:m,setQuadrant4Text:q,setXAxisLeftText:A,setXAxisRightText:_,setYAxisTopText:b,setYAxisBottomText:S,parseStyles:k,addPoint:F,addClass:P,getQuadrantData:v,clear:(0,s.K)(function(){p.clear(),(0,a.IU)()},"clear"),setAccTitle:a.SV,getAccTitle:a.iN,setDiagramTitle:a.ke,getDiagramTitle:a.ab,getAccDescription:a.m7,setAccDescription:a.EI},renderer:{draw:(0,s.K)((t,e,i,o)=>{function l(t){return"top"===t?"hanging":"middle"}function h(t){return"left"===t?"start":"middle"}function c(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}(0,s.K)(l,"getDominantBaseLine"),(0,s.K)(h,"getTextAnchor"),(0,s.K)(c,"getTransformation");const d=(0,a.D7)();n.R.debug("Rendering quadrant chart\n"+t);const u=d.securityLevel;let x;"sandbox"===u&&(x=(0,r.Ltv)("#i"+e));const g=("sandbox"===u?(0,r.Ltv)(x.nodes()[0].contentDocument.body):(0,r.Ltv)("body")).select(`[id="${e}"]`),f=g.append("g").attr("class","main"),p=d.quadrantChart?.chartWidth??500,y=d.quadrantChart?.chartHeight??500;(0,a.a$)(g,y,p,d.quadrantChart?.useMaxWidth??!0),g.attr("viewBox","0 0 "+p+" "+y),o.db.setHeight(y),o.db.setWidth(p);const T=o.db.getQuadrantData(),m=f.append("g").attr("class","quadrants"),q=f.append("g").attr("class","border"),A=f.append("g").attr("class","data-points"),_=f.append("g").attr("class","labels"),b=f.append("g").attr("class","title");T.title&&b.append("text").attr("x",0).attr("y",0).attr("fill",T.title.fill).attr("font-size",T.title.fontSize).attr("dominant-baseline",l(T.title.horizontalPos)).attr("text-anchor",h(T.title.verticalPos)).attr("transform",c(T.title)).text(T.title.text),T.borderLines&&q.selectAll("line").data(T.borderLines).enter().append("line").attr("x1",t=>t.x1).attr("y1",t=>t.y1).attr("x2",t=>t.x2).attr("y2",t=>t.y2).style("stroke",t=>t.strokeFill).style("stroke-width",t=>t.strokeWidth);const S=m.selectAll("g.quadrant").data(T.quadrants).enter().append("g").attr("class","quadrant");S.append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill),S.append("text").attr("x",0).attr("y",0).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>l(t.text.horizontalPos)).attr("text-anchor",t=>h(t.text.verticalPos)).attr("transform",t=>c(t.text)).text(t=>t.text.text);_.selectAll("g.label").data(T.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(t=>t.text).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>l(t.horizontalPos)).attr("text-anchor",t=>h(t.verticalPos)).attr("transform",t=>c(t));const k=A.selectAll("g.data-point").data(T.points).enter().append("g").attr("class","data-point");k.append("circle").attr("cx",t=>t.x).attr("cy",t=>t.y).attr("r",t=>t.radius).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeColor).attr("stroke-width",t=>t.strokeWidth),k.append("text").attr("x",0).attr("y",0).text(t=>t.text.text).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>l(t.text.horizontalPos)).attr("text-anchor",t=>h(t.text.verticalPos)).attr("transform",t=>c(t.text))},"draw")},styles:(0,s.K)(()=>"","styles")}}}]); \ No newline at end of file diff --git a/assets/js/7632.da31cd7e.js b/assets/js/7632.da31cd7e.js new file mode 100644 index 000000000..e03be11d8 --- /dev/null +++ b/assets/js/7632.da31cd7e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[7632],{37632(e,s,c){c.d(s,{createWardleyServices:()=>a.J});var a=c(9427);c(4954)}}]); \ No newline at end of file diff --git a/assets/js/7636.89ade3c2.js b/assets/js/7636.89ade3c2.js new file mode 100644 index 000000000..6e5b30e20 --- /dev/null +++ b/assets/js/7636.89ade3c2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[7636],{57636(e,s,c){c.d(s,{createCynefinServices:()=>a.t});var a=c(93279);c(4954)}}]); \ No newline at end of file diff --git a/assets/js/78008a53.eaa27ad9.js b/assets/js/78008a53.eaa27ad9.js new file mode 100644 index 000000000..b55b2a471 --- /dev/null +++ b/assets/js/78008a53.eaa27ad9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[6699],{16812(e,n,i){i.r(n),i.d(n,{assets:()=>r,contentTitle:()=>o,default:()=>h,frontMatter:()=>t,metadata:()=>a,toc:()=>d});const a=JSON.parse('{"id":"bee/working-with-bee/uninstalling-bee","title":"Uninstalling Bee","description":"Instructions for cleanly removing Bee installations across different operating systems and package managers.","source":"@site/docs/bee/working-with-bee/uninstalling-bee.md","sourceDirName":"bee/working-with-bee","slug":"/bee/working-with-bee/uninstalling-bee","permalink":"/docs/bee/working-with-bee/uninstalling-bee","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/bee/working-with-bee/uninstalling-bee.md","tags":[],"version":"current","frontMatter":{"title":"Uninstalling Bee","id":"uninstalling-bee","description":"Instructions for cleanly removing Bee installations across different operating systems and package managers."},"sidebar":"bee","previous":{"title":"Upgrading Bee","permalink":"/docs/bee/working-with-bee/upgrading-bee"},"next":{"title":"Bee FAQ","permalink":"/docs/bee/bee-faq"}}');var s=i(74848),l=i(28453);const t={title:"Uninstalling Bee",id:"uninstalling-bee",description:"Instructions for cleanly removing Bee installations across different operating systems and package managers."},o=void 0,r={},d=[{value:"Package Manager",id:"package-manager",level:2},{value:"Debian",id:"debian",level:3},{value:"RPM",id:"rpm",level:3},{value:"Shell Script / Binary Install",id:"shell-script--binary-install",level:2},{value:"Identify Data and Config Locations",id:"identify-data-and-config-locations",level:3},{value:"Remove Configuration Files",id:"remove-configuration-files",level:2},{value:"Check for Configuration Files",id:"check-for-configuration-files",level:3},{value:"Remove Configuration Files",id:"remove-configuration-files-1",level:3},{value:"Verify Removal",id:"verify-removal",level:3},{value:"Remove Data Files",id:"remove-data-files",level:2},{value:"Verify Uninstallation",id:"verify-uninstallation",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",p:"p",pre:"pre",strong:"strong",...(0,l.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"Choose the appropriate uninstallation method based on how Bee was installed:"}),"\n",(0,s.jsx)(n.h2,{id:"package-manager",children:"Package Manager"}),"\n",(0,s.jsxs)(n.p,{children:["This method can be used for package manager based ",(0,s.jsx)(n.a,{href:"/docs/bee/installation/package-manager-install",children:"installs"})," of the official Debian, RPM, and Homebrew packages."]}),"\n",(0,s.jsx)(n.admonition,{type:"danger",children:(0,s.jsxs)(n.p,{children:["Uninstalling Bee will permanently delete your keyfiles and configuration. Ensure you have a ",(0,s.jsx)(n.a,{href:"/docs/bee/working-with-bee/backups",children:"full backup"})," before proceeding."]})}),"\n",(0,s.jsx)(n.h3,{id:"debian",children:"Debian"}),"\n",(0,s.jsx)(n.p,{children:"To uninstall Bee and completely remove all associated files including keys and configuration, run:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"sudo apt-get purge bee\n"})}),"\n",(0,s.jsx)(n.h3,{id:"rpm",children:"RPM"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"sudo yum remove bee\n"})}),"\n",(0,s.jsx)(n.h2,{id:"shell-script--binary-install",children:"Shell Script / Binary Install"}),"\n",(0,s.jsxs)(n.p,{children:["If Bee was installed using the ",(0,s.jsx)(n.a,{href:"/docs/bee/installation/shell-script-install",children:"automated shell script"})," or as a binary by ",(0,s.jsx)(n.a,{href:"/docs/bee/installation/build-from-source",children:"building from source"}),", it can be uninstalled by manually removing the installed binary, configuration files, and data directories."]}),"\n",(0,s.jsx)(n.h3,{id:"identify-data-and-config-locations",children:"Identify Data and Config Locations"}),"\n",(0,s.jsxs)(n.p,{children:["The shell script install method may result in slightly different default data and configuration locations based on your system. The easiest way to find these locations is to check the default configuration using the ",(0,s.jsx)(n.code,{children:"bee printconfig"})," command:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"bee printconfig\n"})}),"\n",(0,s.jsxs)(n.p,{children:["The output from this command contains several dozen default configuration values, however we only include the two we need in the example output below, ",(0,s.jsx)(n.code,{children:"config"})," and ",(0,s.jsx)(n.code,{children:"data-dir"}),". These will reveal the default locations for the configuration files and data directory according to our specific system."]}),"\n",(0,s.jsx)(n.p,{children:"Your output should look similar to this:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"# config file (default is $HOME/.bee.yaml)\nconfig: /home/noah/.bee.yaml\n# data directory\ndata-dir: /home/noah/.bee\n"})}),"\n",(0,s.jsx)(n.h2,{id:"remove-configuration-files",children:"Remove Configuration Files"}),"\n",(0,s.jsxs)(n.p,{children:["Bee does not automatically generate a configuration file, but it looks for one at ",(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"$HOME/.bee.yaml"})})," by default."]}),"\n",(0,s.jsx)(n.h3,{id:"check-for-configuration-files",children:"Check for Configuration Files"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Default location for shell script installs:"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"ls -l $HOME/.bee.yaml\n"})}),"\n",(0,s.jsx)(n.h3,{id:"remove-configuration-files-1",children:"Remove Configuration Files"}),"\n",(0,s.jsx)(n.p,{children:"If the files exist, remove them:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"rm -f $HOME/.bee.yaml\n"})}),"\n",(0,s.jsx)(n.h3,{id:"verify-removal",children:"Verify Removal"}),"\n",(0,s.jsx)(n.p,{children:"Run the following commands to ensure the configuration files have been deleted:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"ls -l $HOME/.bee.yaml\n"})}),"\n",(0,s.jsxs)(n.p,{children:["If the command returns ",(0,s.jsx)(n.strong,{children:'"No such file or directory"'}),", the configuration file has been successfully removed."]}),"\n",(0,s.jsx)(n.admonition,{type:"caution",children:(0,s.jsxs)(n.p,{children:["If you have generated a config file and saved it to a non default location which you specify when starting your node using a command line flag (",(0,s.jsx)(n.code,{children:"--config"}),") or environment variable (",(0,s.jsx)(n.code,{children:"BEE_CONFIG"}),"), then it is up to you to keep track of where you saved it and remove it yourself."]})}),"\n",(0,s.jsx)(n.h2,{id:"remove-data-files",children:"Remove Data Files"}),"\n",(0,s.jsxs)(n.p,{children:["Bee stores its ",(0,s.jsx)(n.strong,{children:"node data, blockchain state, and other persistent files"})," in a data directory. If you want to fully remove Bee, this directory must be deleted. The data directory ",(0,s.jsx)(n.a,{href:"/docs/bee/working-with-bee/configuration#default-data-and-config-directories",children:"default location"})," differs based on install method and system type."]}),"\n",(0,s.jsx)(n.h2,{id:"verify-uninstallation",children:"Verify Uninstallation"}),"\n",(0,s.jsx)(n.p,{children:"To confirm that Bee has been fully uninstalled, run:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"command -v bee\n"})}),"\n",(0,s.jsx)(n.p,{children:"If Bee is still installed, this command will return the binary path (e.g., /usr/bin/bee). If it returns nothing, Bee has been successfully uninstalled."})]})}function h(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},28453(e,n,i){i.d(n,{R:()=>t,x:()=>o});var a=i(96540);const s={},l=a.createContext(s);function t(e){const n=a.useContext(l);return a.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:t(e.components),a.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/80c82b62.5cc0e174.js b/assets/js/80c82b62.5cc0e174.js new file mode 100644 index 000000000..a9ca5d848 --- /dev/null +++ b/assets/js/80c82b62.5cc0e174.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[1870],{78931(e,t,a){a.r(t),a.d(t,{assets:()=>u,contentTitle:()=>h,default:()=>f,frontMatter:()=>c,metadata:()=>n,toc:()=>p});const n=JSON.parse('{"id":"develop/tools-and-features/erasure-coding","title":"Erasure Coding","description":"Guide for using optional erasure coding to add redundancy and protection to uploaded data.","source":"@site/docs/develop/tools-and-features/erasure-coding.md","sourceDirName":"develop/tools-and-features","slug":"/develop/tools-and-features/erasure-coding","permalink":"/docs/develop/tools-and-features/erasure-coding","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/develop/tools-and-features/erasure-coding.md","tags":[],"version":"current","frontMatter":{"title":"Erasure Coding","id":"erasure-coding","description":"Guide for using optional erasure coding to add redundancy and protection to uploaded data."},"sidebar":"develop","previous":{"title":"Pinning","permalink":"/docs/develop/tools-and-features/pinning"},"next":{"title":"Store with Encryption","permalink":"/docs/develop/tools-and-features/store-with-encryption"}}');var r=a(74848),i=a(28453),o=a(96540);const s=[[2,3,3,3,3,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9],[4,5,5,6,6,6,7,7,7,7,8,8,8,8,8,9,9,9,9,9,10,10,10,10,10,10,11,11,11,11,11,11,12,12,12,12,12,12,12,13,13,13,13,13,13,13,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,21,21,21],[5,6,7,8,8,9,9,9,10,10,11,11,11,12,12,12,13,13,13,14,14,14,15,15,15,15,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,21,22,22,22,22,23,23,23,23,23,24,24,24,24,25,25,25,25,25,26,26,26,26,26,27,27,27,27,28,28,28,28,28,29,29,29,29,29,30,30,30,30,30,31,31,31,31,31],[19,23,26,29,31,34,36,38,40,43,45,47,48,50,52,54,56,58,59,61,63,65,66,68,70,71,73,75,76,78,80,81,83,84,86,87,89,90]];const d=[[3,3,4,4,4,4,4,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,9,9],[5,6,6,7,7,8,8,9,9,9,10,10,10,11,11,11,12,12,12,13,13,13,13,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17,18,18,18,18,18,19,19,19,19,20,20,20,20,20,21],[6,8,9,9,10,11,12,12,13,14,14,15,15,16,17,17,18,18,19,19,20,20,21,21,21,22,22,23,23,24,24,25,25,25,26,26,27,27,28,28,28,29,29,30,30,30,31,31],[23,29,34,38,43,47,50,54,58,61,65,68,71,75,78,81,84,87,90]];function l(){const e=(0,o.useState)(""),t=e[0],a=e[1],n=(0,o.useState)([]),i=n[0],l=n[1],c=(0,o.useState)(""),h=c[0],u=c[1],p=(0,o.useState)(""),g=p[0],f=p[1],x=(0,o.useState)(!1),m=x[0],v=x[1],j=(0,o.useState)("chunks"),b=j[0],y=j[1],w=[119,107,97,38],k=[9,21,31,90],S=[59,53,48,19],C={None:"0%",Medium:"1%",Strong:"5%",Insane:"10%",Paranoid:"50%"},T=e=>Math.abs(e)>0&&Math.abs(e)<1e-4?e.toExponential(2):e.toFixed(2),E=e=>Math.round(e).toLocaleString(),N={container:{padding:"20px",fontFamily:"Arial",maxWidth:"650px",margin:"0 auto"},title:{margin:"10px 0"},input:{padding:"8px",margin:"5px 0",width:"50%"},select:{padding:"8px",margin:"5px 0",width:"50%"},button:{padding:"10px 15px",margin:"10px 0",cursor:"pointer"},result:{margin:"10px 0",fontWeight:"bold"},table:{width:"100%",borderCollapse:"collapse"},tdName:{border:"1px solid #ccc",padding:"4px 8px",textAlign:"left"},tdValue:{border:"1px solid #ccc",padding:"4px 8px",textAlign:"right"},bold:{fontWeight:"bold"}};return(0,r.jsxs)("div",{style:N.container,children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{style:N.title,children:"Data Size:"}),(0,r.jsx)("input",{placeholder:"Enter data size",type:"number",value:h,onChange:e=>{u(e.target.value)},style:N.input}),(0,r.jsx)("div",{style:N.title,children:"Data Unit:"}),(0,r.jsxs)("select",{value:b,onChange:e=>{y(e.target.value)},style:N.select,children:[(0,r.jsx)("option",{value:"chunks",children:"Chunks"}),(0,r.jsx)("option",{value:"kb",children:"KB"}),(0,r.jsx)("option",{value:"gb",children:"GB"})]}),(0,r.jsx)("div",{style:N.title,children:"Redundancy Level:"}),(0,r.jsxs)("select",{value:g,onChange:e=>{f(e.target.value)},style:N.select,children:[(0,r.jsx)("option",{value:"",disabled:!0,children:"Select Redundancy Level"}),(0,r.jsx)("option",{value:"None",children:"None"}),(0,r.jsx)("option",{value:"Medium",children:"Medium"}),(0,r.jsx)("option",{value:"Strong",children:"Strong"}),(0,r.jsx)("option",{value:"Insane",children:"Insane"}),(0,r.jsx)("option",{value:"Paranoid",children:"Paranoid"})]}),(0,r.jsxs)("div",{style:N.title,children:[(0,r.jsx)("input",{type:"checkbox",checked:m,onChange:()=>{v(!m)}})," Use Encryption?"]}),t&&(0,r.jsx)("div",{style:{color:"red",marginTop:"10px"},children:t}),(0,r.jsx)("button",{onClick:()=>{if(a(""),l([]),!g)return void a("Please select a redundancy level.");let e,t,n,r=0;if(!h||isNaN(parseFloat(h)))return void a("Please enter a valid data size.");if("kb"===b){const n=parseFloat(h);if(isNaN(n)||n<=0)return void a("Please input a valid KB value above 0.");t=n,e=Math.ceil(1024*n/4096)}else if("gb"===b){const r=parseFloat(h);if(isNaN(r)||r<=0)return void a("Please input a valid GB value above 0.");n=r,t=1024*r*1024,e=Math.ceil(1024*t/4096)}else{const n=parseFloat(h);if(isNaN(n)||n<=1||n%1>0)return void a("Please input an integer greater than 1 for chunk values");e=Math.ceil(n),t=4096*e/1024}const i=m?Math.ceil(e/63):Math.ceil(e/127),o=e+i,c={None:-1,Medium:0,Strong:1,Insane:2,Paranoid:3}[g];let u=0;if(c>=0){const t=m?Math.floor(e/S[c]):Math.floor(e/w[c]),a=m?e%S[c]:e%w[c];let n=0;if(a>0){n=(m?d:s)[c][a-1]||0}u=t*k[c]+n}const p=e+u+i,f=(p-e)/e*100,x=4096*i/1024,v=4096*u/1024,j=x+v;"gb"===b&&(r=v/1048576);const y=[{name:"Source data size",value:"gb"===b?T(n)+" GB":T(t)+" KB"},{name:"PAC overhead",value:"gb"===b?T(x/1048576)+" GB ("+E(i)+" chunks)":T(x)+" KB ("+E(i)+" chunks)"},{name:"Parity data size",value:"gb"===b?T(r)+" GB ("+E(u)+" chunks)":T(v)+" KB ("+E(u)+" chunks)"},{name:"Total overhead",value:"gb"===b?T(j/1048576)+" GB":T(j)+" KB"},{name:"Source data in chunks",value:E(e)},{name:"Source with PAC overhead",value:E(o)},{name:"Total with parity",value:E(p)},{name:"Percent cost increase",value:f.toFixed(2)+"%"},{name:"Selected redundancy level",value:""+g},{name:"Error tolerance",value:C[g]}];l(y)},style:N.button,children:"Calculate"})]}),(0,r.jsx)("div",{style:N.result,children:(0,r.jsx)("table",{style:N.table,children:(0,r.jsx)("tbody",{children:i.map((e,t)=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{style:Object.assign({},N.tdName,N.bold),children:e.name})," ",(0,r.jsx)("td",{style:N.tdValue,children:e.value})]},t))})})})]})}const c={title:"Erasure Coding",id:"erasure-coding",description:"Guide for using optional erasure coding to add redundancy and protection to uploaded data."},h=void 0,u={},p=[{value:"Uploading With Erasure Coding",id:"uploading-with-erasure-coding",level:2},{value:"Cost Calculator Widget",id:"cost-calculator-widget",level:2},{value:"Downloading Erasure Encoded Data",id:"downloading-erasure-encoded-data",level:2},{value:"Default Download Behaviour",id:"default-download-behaviour",level:3},{value:"Options",id:"options",level:3}];function g(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.a,{href:"/docs/concepts/DISC/erasure-coding",children:"Erasure coding"})," is a powerful method for safeguarding data, offering robust protection against partial data loss. This technique involves dividing the original data into multiple fragments and generating extra parity fragments to introduce redundancy. A key advantage of erasure coding is its ability to recover the complete original data even if some fragments are lost. Additionally, it offers the flexibility to customize the level of data loss protection, making it a versatile and reliable choice for preserving data integrity on Swarm. For a more in depth dive into erasure coding on Swarm, see the ",(0,r.jsx)(t.a,{href:"https://papers.ethswarm.org/p/erasure/",children:"erasure coding paper"})," from the Swarm research team."]}),"\n",(0,r.jsx)(t.h2,{id:"uploading-with-erasure-coding",children:"Uploading With Erasure Coding"}),"\n",(0,r.jsxs)(t.p,{children:["Erasure coding is available for the ",(0,r.jsx)(t.a,{href:"/api/#tag/Bytes",children:(0,r.jsx)(t.code,{children:"/bytes"})})," and ",(0,r.jsx)(t.a,{href:"/api/#tag/BZZ",children:(0,r.jsx)(t.code,{children:"/bzz"})})," endpoints, however it is not available for the ",(0,r.jsx)(t.a,{href:"/api/#tag/Chunk",children:(0,r.jsx)(t.code,{children:"/chunks"})})," endpoint which deals with single chunks. Since erasure coding relies on splitting data into chunks and the chunk is the smallest unit of data within Swarm which cannot be further subdivided, erasure coding is not applicable for the ",(0,r.jsx)(t.code,{children:"/chunks"})," endpoint which deals with single chunks."]}),"\n",(0,r.jsxs)(t.p,{children:["To upload data to Swarm using erasure coding, the ",(0,r.jsx)(t.code,{children:"swarm-redundancy-level: "})," header is used:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:' curl \\\n -X POST http://localhost:1633/bzz?name=test.txt \\\n -H "swarm-redundancy-level: 1" \\\n -H "swarm-postage-batch-id: 54ba8e39a4f74ccfc7f903121e4d5d0fc40732b19efef5c8894d1f03bdd0f4c5" \\\n -H "Content-Type: text/plain" \\\n --data-binary @test.txt\n\n {"reference":"c02e7d943fbc0e753540f377853b7181227a83e773870847765143681511c97d"}\n'})}),"\n",(0,r.jsxs)(t.p,{children:["The accepted values for the ",(0,r.jsx)(t.code,{children:"swarm-redundancy-level"})," header range from the default of 0 up to 4. Each level corresponds to a different level of data protection, with erasure coding turned off at 0, and at its maximum at 4. Each increasing level provides increasing amount of data redundancy offering greater protection against data loss."]}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Redundancy Level Value"}),(0,r.jsx)(t.th,{children:"Level Name"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"1"}),(0,r.jsx)(t.td,{children:"Medium"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"2"}),(0,r.jsx)(t.td,{children:"Strong"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"3"}),(0,r.jsx)(t.td,{children:"Insane"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"4"}),(0,r.jsx)(t.td,{children:"Paranoid"})]})]})]}),"\n",(0,r.jsxs)(t.p,{children:["For more details about each level of protection refer to the ",(0,r.jsx)(t.a,{href:"/docs/concepts/DISC/erasure-coding",children:"erasure coding page"})," in the learn section and refer to the ",(0,r.jsx)(t.a,{href:"https://papers.ethswarm.org/p/erasure/",children:"erasure coding paper"})," for an even deeper dive."]}),"\n",(0,r.jsx)(t.h2,{id:"cost-calculator-widget",children:"Cost Calculator Widget"}),"\n",(0,r.jsx)(t.p,{children:"This calculator takes as input an amount of data and an erasure coding redundancy level, and outputs the number of additional parity chunks required to erasure code that amount of data as well as the increase in cost to upload vs. a non-erasure encoded upload:"}),"\n",(0,r.jsx)(l,{}),"\n",(0,r.jsxs)(t.p,{children:["For more details of erasure coding costs, see ",(0,r.jsx)(t.a,{href:"/docs/concepts/DISC/erasure-coding",children:"here"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"downloading-erasure-encoded-data",children:"Downloading Erasure Encoded Data"}),"\n",(0,r.jsxs)(t.p,{children:["For a downloader, the process for downloading a file which has been erasure encoded does not require any changes from the ",(0,r.jsx)(t.a,{href:"/docs/develop/upload-and-download",children:"normal download process"}),". There are several options for adjusting the default behaviour for erasure encoded downloads, however there is no need to adjust them."]}),"\n",(0,r.jsx)(t.h3,{id:"default-download-behaviour",children:"Default Download Behaviour"}),"\n",(0,r.jsx)(t.p,{children:"Erasure coding retrieval for downloads is enabled by default, so there is no need for a downloader to explicitly enable the feature. The default download behaviour is to use the DATA strategy with fallback enabled. With these settings, first an attempt will be made to download the data chunks only. If any of the data chunks are missing, then the retrieval method will fall back to the RACE strategy (PROX is not currently implemented and so will be skipped). With the RACE strategy, an attempt will be made to download all data and parity chunks, and chunks will continue to be downloaded until enough have been retrieved to reconstruct the original data."}),"\n",(0,r.jsx)(t.h3,{id:"options",children:"Options"}),"\n",(0,r.jsx)(t.admonition,{type:"warning",children:(0,r.jsx)(t.p,{children:"Do not adjust these options unless you know exactly what you are doing. The default settings are the best option for almost all cases."})}),"\n",(0,r.jsxs)(t.p,{children:["When downloading erasure encoded data, there are three related headers which may be used: ",(0,r.jsx)(t.code,{children:"swarm-redundancy-strategy"}),", ",(0,r.jsx)(t.code,{children:"swarm-redundancy-fallback-mode: "}),", and ",(0,r.jsx)(t.code,{children:"swarm-chunk-retrieval-timeout"}),"."]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.code,{children:"swarm-redundancy-strategy"}),": This header allows you to set the retrieval strategy for fetching chunks. The accepted values range from 0 to 3. Each number corresponds to a different chunk retrieval strategy. The numbers stand for the NONE, DATA, PROX and RACE strategies respectively which are described in greater detail in ",(0,r.jsx)(t.a,{href:"/api/#tag/BZZ",children:"the API reference"})," (also see ",(0,r.jsx)(t.a,{href:"https://papers.ethswarm.org/p/erasure/",children:"the erasure code paper"})," for even more in-depth descriptions). With each increasing level, there will be a potentially greater bandwidth cost."]}),"\n",(0,r.jsx)(t.admonition,{title:"Retrieval Strategies",type:"info",children:(0,r.jsxs)(t.ol,{start:"0",children:["\n",(0,r.jsx)(t.li,{children:"NONE: This strategy is based on direct retrieval of data chunks without pre-fetching, with parity chunks ignored. No pre-fetching is used (data chunks are fetched sequentially)."}),"\n",(0,r.jsx)(t.li,{children:"DATA: The same as NONE, except that data chunks are pre-fetched (data chunks are fetched in parallel in order to reduce latency)."}),"\n",(0,r.jsxs)(t.li,{children:["PROX: For this strategy, the chunks closest (in Kademlia distance) to the node are retrieved first. ",(0,r.jsx)(t.em,{children:"(Not yet implemented.)"})]}),"\n",(0,r.jsx)(t.li,{children:"RACE: Initiates requests for all data and parity chunks and continues to retrieve chunks until enough chunks are retrieved that the original data can be reconstructed."}),"\n"]})}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.code,{children:"swarm-redundancy-fallback-mode: "}),": Enables the fallback feature for the redundancy strategies so that if one of the retrieval strategies fails, it will fallback to the more intensive strategy until retrieval is successful or retrieval fails. Default is ",(0,r.jsx)(t.code,{children:"true"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.code,{children:"swarm-chunk-retrieval-timeout: "}),": Allows you to specify the timeout time for chunk retrieval with a default value of 30 seconds. ",(0,r.jsx)(t.em,{children:"(This is primarily used by the Bee development team for testing and it's recommended that Bee users do not need to use this option.)"})]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:"An example download request may look something like this:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:' curl -OJL \\\n -H "swarm-redundancy-strategy: 3" \\\n -H "swarm-redundancy-fallback-mode: true" \\\n http://localhost:1633/bzz/c02e7d943fbc0e753540f377853b7181227a83e773870847765143681511c97d/\n\n % Total % Received % Xferd Average Speed Time Time Time Current\n Dload Upload Total Spent Left Speed\n 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\n'})}),"\n",(0,r.jsx)(t.p,{children:"For this request, the redundancy strategy is set to 3 (RACE), which means that it will initiate a request for all data and parity chunks and continue to retrieve chunks until enough have been retrieved to reconstruct the source data. This is in contrast with the default strategy of DATA where only the data chunks will be retrieved."}),"\n",(0,r.jsxs)(t.p,{children:["However, it is recommended to not adjust the default settings for these options, so a typical request would actually look like this (which is the exact same as a ",(0,r.jsx)(t.a,{href:"/docs/develop/upload-and-download",children:"normal download"})," without any additional options set):"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:" curl -OJL http://localhost:1633/bzz/c02e7d943fbc0e753540f377853b7181227a83e773870847765143681511c97d/\n\n % Total % Received % Xferd Average Speed Time Time Time Current\n Dload Upload Total Spent Left Speed\n 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\n"})}),"\n",(0,r.jsx)(t.p,{children:"This means that there is no need to inform downloaders that a file uses erasure coding, as even with the default download behaviour reconstruction of the source file will be attempted if any chunks are missing."})]})}function f(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(g,{...e})}):g(e)}},28453(e,t,a){a.d(t,{R:()=>o,x:()=>s});var n=a(96540);const r={},i=n.createContext(r);function o(e){const t=n.useContext(i);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function s(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),n.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/814f3328.4471c0c0.js b/assets/js/814f3328.4471c0c0.js new file mode 100644 index 000000000..623619af3 --- /dev/null +++ b/assets/js/814f3328.4471c0c0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[7472],{55513(e){e.exports=JSON.parse('{"title":"Recent posts","items":[]}')}}]); \ No newline at end of file diff --git a/assets/js/821.f3ec8500.js b/assets/js/821.f3ec8500.js new file mode 100644 index 000000000..db14d3030 --- /dev/null +++ b/assets/js/821.f3ec8500.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[821],{40821(e,r,s){s.d(r,{diagram:()=>c});var a=s(2824),t=(s(64918),s(96755),s(1672),s(9417),s(338),s(78771),s(46853),s(717),s(79515),s(44505),s(72379),s(58962),s(16459),s(76385),s(31293),s(86827)),c={parser:a._$,get db(){return new a.NM},renderer:a.Lh,styles:a.tM,init:(0,t.K)(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}}]); \ No newline at end of file diff --git a/assets/js/8365.3984740c.js b/assets/js/8365.3984740c.js new file mode 100644 index 000000000..c27885f05 --- /dev/null +++ b/assets/js/8365.3984740c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[8365],{98365(e,s,c){c.d(s,{createRadarServices:()=>a.f});var a=c(25552);c(4954)}}]); \ No newline at end of file diff --git a/assets/js/8497dad5.992c01b3.js b/assets/js/8497dad5.992c01b3.js new file mode 100644 index 000000000..2de7b525e --- /dev/null +++ b/assets/js/8497dad5.992c01b3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[3115],{76526(e,n,s){s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>o,metadata:()=>i,toc:()=>d});const i=JSON.parse('{"id":"bee/installation/build-from-source","title":"Build from Source","description":"Guides developers through compiling Bee directly from source code using Go git and make with step-by-step instructions.","source":"@site/docs/bee/installation/build-from-source.md","sourceDirName":"bee/installation","slug":"/bee/installation/build-from-source","permalink":"/docs/bee/installation/build-from-source","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/bee/installation/build-from-source.md","tags":[],"version":"current","frontMatter":{"title":"Build from Source","id":"build-from-source","description":"Guides developers through compiling Bee directly from source code using Go git and make with step-by-step instructions."},"sidebar":"bee","previous":{"title":"Package Manager Install","permalink":"/docs/bee/installation/package-manager-install"},"next":{"title":"Set Target Neighborhood","permalink":"/docs/bee/installation/set-target-neighborhood"}}');var t=s(74848),r=s(28453);const o={title:"Build from Source",id:"build-from-source",description:"Guides developers through compiling Bee directly from source code using Go git and make with step-by-step instructions."},l=void 0,c={},d=[{value:"Build steps",id:"build-steps",level:2}];function a(e){const n={a:"a",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:["Bee is written using the ",(0,t.jsx)(n.a,{href:"https://go.dev",children:"Go"})," language."]}),"\n",(0,t.jsxs)(n.p,{children:["You may build the Bee client software directly from the ",(0,t.jsx)(n.a,{href:"https://github.com/ethersphere/bee",children:"source"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"Prerequisites for installing directly from source are:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"go"})," - download the latest release from ",(0,t.jsx)(n.a,{href:"https://go.dev/dl",children:"go.dev"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"git"})," - download from ",(0,t.jsx)(n.a,{href:"https://git-scm.com/",children:"git-scm.com"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"make"})," - ",(0,t.jsx)(n.a,{href:"https://www.gnu.org/software/make/",children:"make"})," is usually included by default in most UNIX operating systems, and can be installed and used on almost any other operating system where it is not included by default."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"build-steps",children:"Build steps"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Clone the repository:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"git clone https://github.com/ethersphere/bee\ncd bee\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Use ",(0,t.jsx)(n.code,{children:"git"})," to find the latest release:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"git describe --tags\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Checkout the required version:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"git checkout v2.8.1\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Build the binary:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"make binary\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Check that you are able to run the ",(0,t.jsx)(n.code,{children:"bee"})," command. Success can be verified by running:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"dist/bee version\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"2.8.1\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["(optional) Additionally, you may also like to move the Bee binary to somewhere in your ",(0,t.jsx)(n.code,{children:"$PATH"})]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo cp dist/bee /usr/local/bin/bee\n"})}),"\n"]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(a,{...e})}):a(e)}},28453(e,n,s){s.d(n,{R:()=>o,x:()=>l});var i=s(96540);const t={},r=i.createContext(t);function o(e){const n=i.useContext(r);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8664.4d415834.js b/assets/js/8664.4d415834.js new file mode 100644 index 000000000..cec26c258 --- /dev/null +++ b/assets/js/8664.4d415834.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[8664],{24534(e,r,c){c.d(r,{$1:()=>l,CU:()=>p,IO:()=>C,LU:()=>i,MS:()=>n,Rn:()=>o,Sv:()=>b,XZ:()=>u,YK:()=>t,hx:()=>w,j:()=>s,vd:()=>a,yE:()=>f});var n="-ms-",a="-moz-",s="-webkit-",t="comm",u="rule",i="decl",o="@media",f="@import",l="@supports",p="@namespace",b="@keyframes",C="@layer",w="@scope"},72373(e,r,c){c.d(r,{r1:()=>i,gi:()=>f,MY:()=>o});var n=c(24534),a=c(19735),s=c(40390),t=c(50483);function u(e,r,c){switch((0,a.tW)(e,r)){case 5103:return n.j+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return n.j+e+e;case 4855:return n.j+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return n.vd+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return n.j+e+n.vd+e+n.MS+e+e;case 5936:switch((0,a.wN)(e,r+11)){case 114:return n.j+e+n.MS+(0,a.HC)(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return n.j+e+n.MS+(0,a.HC)(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return n.j+e+n.MS+(0,a.HC)(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return n.j+e+n.MS+e+e;case 6165:return n.j+e+n.MS+"flex-"+e+e;case 5187:return n.j+e+(0,a.HC)(e,/(\w+).+(:[^]+)/,n.j+"box-$1$2"+n.MS+"flex-$1$2")+e;case 5443:return n.j+e+n.MS+"flex-item-"+(0,a.HC)(e,/flex-|-self/g,"")+((0,a.YW)(e,/flex-|baseline/)?"":n.MS+"grid-row-"+(0,a.HC)(e,/flex-|-self/g,""))+e;case 4675:return n.j+e+n.MS+"flex-line-pack"+(0,a.HC)(e,/align-content|flex-|-self/g,"")+e;case 5548:return n.j+e+n.MS+(0,a.HC)(e,"shrink","negative")+e;case 5292:return n.j+e+n.MS+(0,a.HC)(e,"basis","preferred-size")+e;case 6060:return n.j+"box-"+(0,a.HC)(e,"-grow","")+n.j+e+n.MS+(0,a.HC)(e,"grow","positive")+e;case 4554:return n.j+(0,a.HC)(e,/([^-])(transform)/g,"$1"+n.j+"$2")+e;case 6187:return(0,a.HC)((0,a.HC)((0,a.HC)(e,/(zoom-|grab)/,n.j+"$1"),/(image-set)/,n.j+"$1"),e,"")+e;case 5495:case 3959:return(0,a.HC)(e,/(image-set\([^]*)/,n.j+"$1$`$1");case 4968:return(0,a.HC)((0,a.HC)(e,/(.+:)(flex-)?(.*)/,n.j+"box-pack:$3"+n.MS+"flex-pack:$3"),/space-between/,"justify")+n.j+e+e;case 4200:if(!(0,a.YW)(e,/flex-|baseline/))return n.MS+"grid-column-align"+(0,a.c1)(e,r)+e;break;case 2592:case 3360:return n.MS+(0,a.HC)(e,"template-","")+e;case 4384:case 3616:return c&&c.some(function(e,c){return r=c,(0,a.YW)(e.props,/grid-\w+-end/)})?~(0,a.K5)(e+(c=c[r].value),"span",0)?e:n.MS+(0,a.HC)(e,"-start","")+e+n.MS+"grid-row-span:"+(~(0,a.K5)(c,"span",0)?(0,a.YW)(c,/\d+/):+(0,a.YW)(c,/\d+/)-+(0,a.YW)(e,/\d+/))+";":n.MS+(0,a.HC)(e,"-start","")+e;case 4896:case 4128:return c&&c.some(function(e){return(0,a.YW)(e.props,/grid-\w+-start/)})?e:n.MS+(0,a.HC)((0,a.HC)(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return(0,a.HC)(e,/(.+)-inline(.+)/,n.j+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if((0,a.b2)(e)-1-r>6)switch((0,a.wN)(e,r+1)){case 109:if(45!==(0,a.wN)(e,r+4))break;case 102:return(0,a.HC)(e,/(.+:)(.+)-([^]+)/,"$1"+n.j+"$2-$3$1"+n.vd+(108==(0,a.wN)(e,r+3)?"$3":"$2-$3"))+e;case 115:return~(0,a.K5)(e,"stretch",0)?u((0,a.HC)(e,"stretch","fill-available"),r,c)+e:e}break;case 5152:case 5920:return(0,a.HC)(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(r,c,a,s,t,u,i){return n.MS+c+":"+a+i+(s?n.MS+c+"-span:"+(t?u:+u-+a)+i:"")+e});case 4949:if(121===(0,a.wN)(e,r+6))return(0,a.HC)(e,":",":"+n.j)+e;break;case 6444:switch((0,a.wN)(e,45===(0,a.wN)(e,14)?18:11)){case 120:return(0,a.HC)(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+n.j+(45===(0,a.wN)(e,14)?"inline-":"")+"box$3$1"+n.j+"$2$3$1"+n.MS+"$2box$3")+e;case 100:return(0,a.HC)(e,":",":"+n.MS)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return(0,a.HC)(e,"scroll-","scroll-snap-")+e}return e}function i(e){var r=(0,a.FK)(e);return function(c,n,a,s){for(var t="",u=0;u-1&&!e.return)switch(e.type){case n.LU:return void(e.return=u(e.value,e.length,c));case n.Sv:return(0,t.l)([(0,s.C)(e,{value:(0,a.HC)(e.value,"@","@"+n.j)})],i);case n.XZ:if(e.length)return(0,a.kg)(c=e.props,function(r){switch((0,a.YW)(r,i=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":(0,s.yY)((0,s.C)(e,{props:[(0,a.HC)(r,/:(read-\w+)/,":"+n.vd+"$1")]})),(0,s.yY)((0,s.C)(e,{props:[r]})),(0,a.kp)(e,{props:(0,a.pb)(c,i)});break;case"::placeholder":(0,s.yY)((0,s.C)(e,{props:[(0,a.HC)(r,/:(plac\w+)/,":"+n.j+"input-$1")]})),(0,s.yY)((0,s.C)(e,{props:[(0,a.HC)(r,/:(plac\w+)/,":"+n.vd+"$1")]})),(0,s.yY)((0,s.C)(e,{props:[(0,a.HC)(r,/:(plac\w+)/,n.MS+"input-$1")]})),(0,s.yY)((0,s.C)(e,{props:[r]})),(0,a.kp)(e,{props:(0,a.pb)(c,i)})}return""})}}},73716(e,r,c){c.d(r,{wE:()=>t});var n=c(24534),a=c(19735),s=c(40390);function t(e){return(0,s.VF)(u("",null,null,null,[""],e=(0,s.c4)(e),0,[0],e))}function u(e,r,c,n,t,l,p,b,C){for(var w=0,d=0,H=p,h=0,v=0,g=0,k=1,j=1,$=1,S=0,M="",m=t,Y=l,x=n,N=M;j;)switch(g=S,S=(0,s.K2)()){case 40:if(108!=g&&58==(0,a.wN)(N,H-1)){-1!=(0,a.K5)(N+=(0,a.HC)((0,s.Tb)(S),"&","&\f"),"&\f",(0,a.tn)(w?b[w-1]:0))&&($=-1);break}case 34:case 39:case 91:N+=(0,s.Tb)(S);break;case 9:case 10:case 13:case 32:N+=(0,s.mw)(g);break;case 92:N+=(0,s.Nc)((0,s.OW)()-1,7);continue;case 47:switch((0,s.se)()){case 42:case 47:(0,a.BC)(o((0,s.nf)((0,s.K2)(),(0,s.OW)()),r,c,C),C),5!=(0,s.Sh)(g||1)&&5!=(0,s.Sh)((0,s.se)()||1)||!(0,a.b2)(N)||" "===(0,a.c1)(N,-1,void 0)||(N+=" ");break;default:N+="/"}break;case 123*k:b[w++]=(0,a.b2)(N)*$;case 125*k:case 59:case 0:switch(S){case 0:case 125:j=0;case 59+d:-1==$&&(N=(0,a.HC)(N,/\f/g,"")),v>0&&((0,a.b2)(N)-H||0===k&&47===g)&&(0,a.BC)(v>32?f(N+";",n,c,H-1,C):f((0,a.HC)(N," ","")+";",n,c,H-2,C),C);break;case 59:N+=";";default:if((0,a.BC)(x=i(N,r,c,w,d,t,b,M,m=[],Y=[],H,l),l),123===S)if(0===d)u(N,r,x,x,m,l,H,b,Y);else{switch(h){case 99:if(110===(0,a.wN)(N,3))break;case 108:if(97===(0,a.wN)(N,2))break;default:d=0;case 100:case 109:case 115:}d?u(e,x,x,n&&(0,a.BC)(i(e,x,x,0,0,t,b,M,t,m=[],H,Y),Y),t,Y,H,b,n?m:Y):u(N,x,x,x,[""],Y,0,b,Y)}}w=d=v=0,k=$=1,M=N="",H=p;break;case 58:H=1+(0,a.b2)(N),v=g;default:if(k<1)if(123==S)--k;else if(125==S&&0==k++&&125==(0,s.YL)())continue;switch(N+=(0,a.HT)(S),S*k){case 38:$=d>0?1:(N+="\f",-1);break;case 44:b[w++]=((0,a.b2)(N)-1)*$,$=1;break;case 64:45===(0,s.se)()&&(N+=(0,s.Tb)((0,s.K2)())),h=(0,s.se)(),d=H=(0,a.b2)(M=N+=(0,s.Cv)((0,s.OW)())),S++;break;case 45:45===g&&2==(0,a.b2)(N)&&(k=0)}}return l}function i(e,r,c,t,u,i,o,f,l,p,b,C){for(var w=u-1,d=0===u?i:[""],H=(0,a.FK)(d),h=0,v=0,g=0;h0?d[k]+" "+j:(0,a.HC)(j,/&\f/g,d[k])))&&(l[g++]=$);return(0,s.rH)(e,r,c,0===u?n.XZ:f,l,p,b,C)}function o(e,r,c,t){return(0,s.rH)(e,r,c,n.YK,(0,a.HT)((0,s.Tp)()),(0,a.c1)(e,2,-2),0,t)}function f(e,r,c,t,u){return(0,s.rH)(e,r,c,n.LU,(0,a.c1)(e,0,t),(0,a.c1)(e,t+1,-1),t,u)}},50483(e,r,c){c.d(r,{A:()=>t,l:()=>s});var n=c(24534),a=c(19735);function s(e,r){for(var c="",n=0;nl,Cv:()=>Y,K2:()=>w,Nc:()=>S,OW:()=>H,Sh:()=>v,Tb:()=>j,Tp:()=>b,VF:()=>k,YL:()=>C,c4:()=>g,mw:()=>$,nf:()=>m,rH:()=>f,se:()=>d,yY:()=>p});var n=c(19735),a=1,s=1,t=0,u=0,i=0,o="";function f(e,r,c,n,t,u,i,o){return{value:e,root:r,parent:c,type:n,props:t,children:u,line:a,column:s,length:i,return:"",siblings:o}}function l(e,r){return(0,n.kp)(f("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},r)}function p(e){for(;e.root;)e=l(e.root,{children:[e]});(0,n.BC)(e,e.siblings)}function b(){return i}function C(){return i=u>0?(0,n.wN)(o,--u):0,s--,10===i&&(s=1,a--),i}function w(){return i=u2||v(i)>3?"":" "}function S(e,r){for(;--r&&w()&&!(i<48||i>102||i>57&&i<65||i>70&&i<97););return h(e,H()+(r<6&&32==d()&&32==w()))}function M(e){for(;w();)switch(i){case e:return u;case 34:case 39:34!==e&&39!==e&&M(i);break;case 40:41===e&&M(e);break;case 92:w()}return u}function m(e,r){for(;w()&&e+i!==57&&(e+i!==84||47!==d()););return"/*"+h(r,u-1)+"*"+(0,n.HT)(47===e?e:w())}function Y(e){for(;!v(d());)w();return h(e,u)}},19735(e,r,c){c.d(r,{BC:()=>w,Bq:()=>u,FK:()=>C,HC:()=>o,HT:()=>a,K5:()=>f,YW:()=>i,b2:()=>b,c1:()=>p,kg:()=>d,kp:()=>s,pb:()=>H,tW:()=>t,tn:()=>n,wN:()=>l});var n=Math.abs,a=String.fromCharCode,s=Object.assign;function t(e,r){return 45^l(e,0)?(((r<<2^l(e,0))<<2^l(e,1))<<2^l(e,2))<<2^l(e,3):0}function u(e){return e.trim()}function i(e,r){return(e=r.exec(e))?e[0]:e}function o(e,r,c){return e.replace(r,c)}function f(e,r,c){return e.indexOf(r,c)}function l(e,r){return 0|e.charCodeAt(r)}function p(e,r,c){return e.slice(r,c)}function b(e){return e.length}function C(e){return e.length}function w(e,r){return r.push(e),e}function d(e,r){return e.map(r).join("")}function H(e,r){return e.filter(function(e){return!i(e,r)})}}}]); \ No newline at end of file diff --git a/assets/js/8677.feb5f455.js b/assets/js/8677.feb5f455.js new file mode 100644 index 000000000..58d3d5d21 --- /dev/null +++ b/assets/js/8677.feb5f455.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[8677],{77454(e,t,a){function l(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}a.d(t,{S:()=>l}),(0,a(86827).K)(l,"populateCommonDb")},1672(e,t,a){a.d(t,{P:()=>n});var l=a(76385),s=a(31293),r=a(86827),n=(0,r.K)((e,t,a,r)=>{e.attr("class",a);const{width:n,height:c,x:d,y:p}=i(e,t);(0,l.a$)(e,c,n,r);const h=o(d,p,n,c,t);e.attr("viewBox",h),s.R.debug(`viewBox configured: ${h} with padding: ${t}`)},"setupViewPortForSVG"),i=(0,r.K)((e,t)=>{const a=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:a.width+2*t,height:a.height+2*t,x:a.x,y:a.y}},"calculateDimensionsWithPadding"),o=(0,r.K)((e,t,a,l,s)=>`${e-s} ${t-s} ${a} ${l}`,"createViewBox")},88677(e,t,a){a.d(t,{diagram:()=>v});var l=a(77454),s=a(5637),r=a(1672),n=a(44505),i=a(16459),o=a(76385),c=a(31293),d=a(86827),p=a(78731),h=a(70451),m=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=o.SV,this.getAccTitle=o.iN,this.setDiagramTitle=o.ke,this.getDiagramTitle=o.ab,this.getAccDescription=o.m7,this.setAccDescription=o.EI}static{(0,d.K)(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){const e=o.UI,t=(0,o.zj)();return(0,i.$t)({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),0===t&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,t){const a=this.classes.get(e)??{id:e,styles:[],textStyles:[]},l=t.replace(/\\,/g,"\xa7\xa7\xa7").replace(/,/g,";").replace(/\xa7\xa7\xa7/g,",").split(";");l&&l.forEach(e=>{(0,n.KX)(e)&&(a?.textStyles?a.textStyles.push(e):a.textStyles=[e]),a?.styles?a.styles.push(e):a.styles=[e]}),this.classes.set(e,a)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){(0,o.IU)(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function y(e){if(!e.length)return[];const t=[],a=[];return e.forEach(e=>{const l={name:e.name,children:"Leaf"===e.type?void 0:[]};for(l.classSelector=e?.classSelector,e?.cssCompiledStyles&&(l.cssCompiledStyles=e.cssCompiledStyles),"Leaf"===e.type&&void 0!==e.value&&(l.value=e.value);a.length>0&&a[a.length-1].level>=e.level;)a.pop();if(0===a.length)t.push(l);else{const e=a[a.length-1].node;e.children?e.children.push(l):e.children=[l]}"Leaf"!==e.type&&a.push({node:l,level:e.level})}),t}(0,d.K)(y,"buildHierarchy");var f=(0,d.K)((e,t)=>{(0,l.S)(e,t);const a=[];for(const l of e.TreemapRows??[])"ClassDefStatement"===l.$type&&t.addClass(l.className??"",l.styleText??"");for(const l of e.TreemapRows??[]){const e=l.item;if(!e)continue;const s=l.indent?parseInt(l.indent):0,r=u(e),n=e.classSelector?t.getStylesForClass(e.classSelector):[],i=n.length>0?n:void 0,o={level:s,name:r,type:e.$type,value:e.value,classSelector:e.classSelector,cssCompiledStyles:i};a.push(o)}const s=y(a),r=(0,d.K)((e,a)=>{for(const l of e)t.addNode(l,a),l.children&&l.children.length>0&&r(l.children,a+1)},"addNodesRecursively");r(s,0)},"populate"),u=(0,d.K)(e=>e.name?String(e.name):"","getItemName"),S={parser:{yy:void 0},parse:(0,d.K)(async e=>{try{const t=p.qg,a=await t("treemap",e);c.R.debug("Treemap AST:",a);const l=S.parser?.yy;if(!(l instanceof m))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");f(a,l)}catch(t){throw c.R.error("Error parsing treemap:",t),t}},"parse")},g=10,x={draw:(0,d.K)((e,t,a,l)=>{const i=l.db,p=i.getConfig(),m=p.padding??10,y=i.getDiagramTitle(),f=i.getRoot(),{themeVariables:u}=(0,o.zj)();if(!f)return;const S=y?30:0,x=(0,s.D)(t),$=p.nodeWidth?p.nodeWidth*g:960,b=p.nodeHeight?p.nodeHeight*g:500,v=$,C=b+S;let w;x.attr("viewBox",`0 0 ${v} ${C}`),(0,o.a$)(x,C,v,p.useMaxWidth);try{const e=p.valueFormat||",";if("$0,0"===e)w=(0,d.K)(e=>"$"+(0,h.GPZ)(",")(e),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const t=/\.\d+/.exec(e),a=t?t[0]:"";w=(0,d.K)(e=>"$"+(0,h.GPZ)(","+a)(e),"valueFormat")}else if(e.startsWith("$")){const t=e.substring(1);w=(0,d.K)(e=>"$"+(0,h.GPZ)(t||"")(e),"valueFormat")}else w=(0,h.GPZ)(e)}catch(j){c.R.error("Error creating format function:",j),w=(0,h.GPZ)(",")}const L=(0,h.UMr)().range(["transparent",u.cScale0,u.cScale1,u.cScale2,u.cScale3,u.cScale4,u.cScale5,u.cScale6,u.cScale7,u.cScale8,u.cScale9,u.cScale10,u.cScale11]),k=(0,h.UMr)().range(["transparent",u.cScalePeer0,u.cScalePeer1,u.cScalePeer2,u.cScalePeer3,u.cScalePeer4,u.cScalePeer5,u.cScalePeer6,u.cScalePeer7,u.cScalePeer8,u.cScalePeer9,u.cScalePeer10,u.cScalePeer11]),T=(0,h.UMr)().range([u.cScaleLabel0,u.cScaleLabel1,u.cScaleLabel2,u.cScaleLabel3,u.cScaleLabel4,u.cScaleLabel5,u.cScaleLabel6,u.cScaleLabel7,u.cScaleLabel8,u.cScaleLabel9,u.cScaleLabel10,u.cScaleLabel11]);y&&x.append("text").attr("x",v/2).attr("y",S/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(y);const P=x.append("g").attr("transform",`translate(0, ${S})`).attr("class","treemapContainer"),M=(0,h.Sk5)(f).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),z=(0,h.hkb)().size([$,b]).paddingTop(e=>e.children&&e.children.length>0?35:0).paddingInner(m).paddingLeft(e=>e.children&&e.children.length>0?g:0).paddingRight(e=>e.children&&e.children.length>0?g:0).paddingBottom(e=>e.children&&e.children.length>0?g:0).round(!0)(M),F=z.descendants().filter(e=>e.children&&e.children.length>0),K=P.selectAll(".treemapSection").data(F).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);K.append("rect").attr("width",e=>e.x1-e.x0).attr("height",25).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>0===e.depth?"display: none;":""),K.append("clipPath").attr("id",(e,a)=>`clip-section-${t}-${a}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",25),K.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>`treemapSection section${t}`).attr("fill",e=>L(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>k(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(0===e.depth)return"display: none;";const t=(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}),K.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",12.5).attr("dominant-baseline","middle").text(e=>0===e.depth?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,a)=>`url(#clip-section-${t}-${a})`).attr("style",e=>{if(0===e.depth)return"display: none;";return"dominant-baseline: middle; font-size: 12px; fill:"+T(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")}).each(function(e){if(0===e.depth)return;const t=(0,h.Ltv)(this),a=e.data.name;t.text(a);const l=e.x1-e.x0;let s;if(!1!==p.showValues&&e.value){s=l-10-30-10-6}else{s=l-6-6}const r=Math.max(15,s),n=t.node();if(n.getComputedTextLength()>r){const e="...";let l=a;for(;l.length>0;){if(l=a.substring(0,l.length-1),0===l.length){t.text(e),n.getComputedTextLength()>r&&t.text("");break}if(t.text(l+e),n.getComputedTextLength()<=r)break}}}),!1!==p.showValues&&K.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",12.5).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?w(e.value):"").attr("font-style","italic").attr("style",e=>{if(0===e.depth)return"display: none;";return"text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+T(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")});const D=z.leaves(),N=D.length>20,G=N?16:38,V=N?14:28,W=N?4:8,R=N?4:6,A=N?2:4,B=N?8:10,I=N?1:2,X=P.selectAll(".treemapLeafGroup").data(D).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);X.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?L(e.parent.data.name):L(e.data.name)).attr("style",e=>(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?L(e.parent.data.name):L(e.data.name)).attr("stroke-width",3),X.append("clipPath").attr("id",(e,a)=>`clip-${t}-${a}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4));if(X.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>`text-anchor: middle; dominant-baseline: middle; font-size: ${G}px;fill:`+T(e.data.name)+";"+(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(e,a)=>`url(#clip-${t}-${a})`).text(e=>e.data.name).each(function(e){const t=(0,h.Ltv)(this),a=e.x1-e.x0,l=e.y1-e.y0,s=t.node(),r=a-2*A,n=l-2*A;if(rr&&i>W;)i--,t.style("font-size",`${i}px`);let o=Math.max(R,Math.min(V,Math.round(.6*i))),c=i+I+o;for(;c>n&&i>W&&(i--,o=Math.max(R,Math.min(V,Math.round(.6*i))),!(or||i(e.x1-e.x0)/2).attr("y",function(e){return(e.y1-e.y0)/2}).attr("style",e=>`text-anchor: middle; dominant-baseline: hanging; font-size: ${V}px;fill:`+T(e.data.name)+";"+(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(e,a)=>`url(#clip-${t}-${a})`).text(e=>e.value?w(e.value):"").each(function(e){const t=(0,h.Ltv)(this),a=this.parentNode;if(!a)return void t.style("display","none");const l=(0,h.Ltv)(a).select(".treemapLabel");if(l.empty()||"none"===l.style("display"))return void t.style("display","none");const s=parseFloat(l.style("font-size")),r=Math.max(R,Math.min(V,Math.round(.6*s)));t.style("font-size",`${r}px`);const n=(e.y1-e.y0)/2+s/2+I;t.attr("y",n);const i=e.x1-e.x0,o=e.y1-e.y0-4,c=i-2*A;t.node().getComputedTextLength()>c||n+r>o||r{const t=(0,o.P$)(),a=(0,o.zj)(),l=(0,i.$t)(t,a.themeVariables),s=(0,i.$t)($,e),r=s.titleColor??l.titleColor,n=s.labelColor??l.textColor,c=s.valueColor??l.textColor;return`\n .treemapNode.section {\n stroke: ${s.sectionStrokeColor};\n stroke-width: ${s.sectionStrokeWidth};\n fill: ${s.sectionFillColor};\n }\n .treemapNode.leaf {\n stroke: ${s.leafStrokeColor};\n stroke-width: ${s.leafStrokeWidth};\n fill: ${s.leafFillColor};\n }\n .treemapLabel {\n fill: ${n};\n font-size: ${s.labelFontSize};\n }\n .treemapValue {\n fill: ${c};\n font-size: ${s.valueFontSize};\n }\n .treemapTitle {\n fill: ${r};\n font-size: ${s.titleFontSize};\n }\n `},"getStyles"),v={parser:S,get db(){return new m},renderer:x,styles:b}}}]); \ No newline at end of file diff --git a/assets/js/8731.4574f63e.js b/assets/js/8731.4574f63e.js new file mode 100644 index 000000000..7e9281926 --- /dev/null +++ b/assets/js/8731.4574f63e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[8731],{14916(e,t,r){r.d(t,{W:()=>l});var n=r(4954),a=class extends n.mR{static{(0,n.K2)(this,"RailroadEbnfTokenBuilder")}constructor(){super(["railroad-ebnf-beta"])}},i=(0,n.K2)(e=>{const t=e.slice(1,-1);let r="";for(let n=0;nnew a,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new s,"ValueConverter")}};function l(e=n.DD){const t=(0,n.WQ)((0,n.uM)(e),n.sr),r=(0,n.WQ)((0,n.tG)({shared:t}),n.U4,o);return t.ServiceRegistry.register(r),{shared:t,RailroadEbnf:r}}(0,n.K2)(l,"createRailroadEbnfServices")},26041(e,t,r){r.d(t,{f:()=>o});var n=r(4954),a=class extends n.mR{static{(0,n.K2)(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},i=class extends n.dg{static{(0,n.K2)(this,"PieValueConverter")}runCustomConverter(e,t,r){if("PIE_SECTION_LABEL"===e.name)return t.replace(/"/g,"").trim()}},s={parser:{TokenBuilder:(0,n.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new i,"ValueConverter")}};function o(e=n.DD){const t=(0,n.WQ)((0,n.uM)(e),n.sr),r=(0,n.WQ)((0,n.tG)({shared:t}),n.D_,s);return t.ServiceRegistry.register(r),{shared:t,Pie:r}}(0,n.K2)(o,"createPieServices")},54614(e,t,r){r.d(t,{v:()=>s});var n=r(4954),a=class extends n.mR{static{(0,n.K2)(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},i={parser:{TokenBuilder:(0,n.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new n.Tm,"ValueConverter")}};function s(e=n.DD){const t=(0,n.WQ)((0,n.uM)(e),n.sr),r=(0,n.WQ)((0,n.tG)({shared:t}),n.FZ,i);return t.ServiceRegistry.register(r),{shared:t,Info:r}}(0,n.K2)(s,"createInfoServices")},45796(e,t,r){r.d(t,{S:()=>o});var n=r(4954),a=class extends n.mR{static{(0,n.K2)(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},i=class extends n.dg{static{(0,n.K2)(this,"ArchitectureValueConverter")}runCustomConverter(e,t,r){if("ARCH_ICON"===e.name)return t.replace(/[()]/g,"").trim();if("ARCH_TEXT_ICON"===e.name)return t.replace(/["()]/g,"");if("ARCH_TITLE"===e.name){let e=t.replace(/^\[|]$/g,"").trim();return(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))&&(e=e.slice(1,-1),e=e.replace(/\\"/g,'"').replace(/\\'/g,"'")),e.trim()}}},s={parser:{TokenBuilder:(0,n.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new i,"ValueConverter")}};function o(e=n.DD){const t=(0,n.WQ)((0,n.uM)(e),n.sr),r=(0,n.WQ)((0,n.tG)({shared:t}),n.wV,s);return t.ServiceRegistry.register(r),{shared:t,Architecture:r}}(0,n.K2)(o,"createArchitectureServices")},82688(e,t,r){r.d(t,{g:()=>f});var n=r(4954),a=class extends n.mR{static{(0,n.K2)(this,"EventModelingTokenBuilder")}constructor(){super(["eventmodeling"])}},i=new Set(["cmd","command"]),s=new Set(["evt","event"]),o=new Set(["rmo","readmodel"]),l=new Set(["pcr","processor"]),u=new Set(["ui"]);function c(e){const t=e.validation.EventModelingValidator,r=e.validation.ValidationRegistry;if(r){const e={EmTimeFrame:t.checkSourceFrameTypes.bind(t),EmResetFrame:t.checkSourceFrameTypes.bind(t)};r.register(e,t)}}(0,n.K2)(c,"registerValidationChecks");var p=class{static{(0,n.K2)(this,"EventModelingValidator")}checkSourceFrameTypes(e,t){0!==e.sourceFrames.length&&(i.has(e.modelEntityType)?this.validateSources(e,new Set([...u,...l]),"command","ui or processor",t):s.has(e.modelEntityType)?this.validateSources(e,i,"event","command",t):o.has(e.modelEntityType)?this.validateSources(e,s,"read model","event",t):l.has(e.modelEntityType)?this.validateSources(e,o,"processor","read model",t):u.has(e.modelEntityType)&&this.validateSources(e,o,"ui","read model",t))}validateSources(e,t,r,n,a){for(const i of e.sourceFrames){const s=i.ref;void 0===s||t.has(s.modelEntityType)||a("error",`A ${r} can only receive input from a ${n}, not from '${s.modelEntityType}'.`,{node:e,property:"sourceFrames"})}}},d={parser:{TokenBuilder:(0,n.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new n.Tm,"ValueConverter")},validation:{EventModelingValidator:(0,n.K2)(()=>new p,"EventModelingValidator")}};function f(e=n.DD){const t=(0,n.WQ)((0,n.uM)(e),n.sr),r=(0,n.WQ)((0,n.tG)({shared:t}),n.x0,d);return t.ServiceRegistry.register(r),c(r),{shared:t,EventModel:r}}(0,n.K2)(f,"createEventModelingServices")},16527(e,t,r){r.d(t,{d:()=>c});var n=r(4954),a=class extends n.mR{static{(0,n.K2)(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},i=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,s=class extends n.dg{static{(0,n.K2)(this,"TreemapValueConverter")}runCustomConverter(e,t,r){if("NUMBER2"===e.name)return parseFloat(t.replace(/,/g,""));if("SEPARATOR"===e.name)return t.substring(1,t.length-1);if("STRING2"===e.name)return t.substring(1,t.length-1);if("INDENTATION"===e.name)return t.length;if("ClassDef"===e.name){if("string"!=typeof t)return t;const e=i.exec(t);if(e)return{$type:"ClassDefStatement",className:e[1],styleText:e[2]||void 0}}}};function o(e){const t=e.validation.TreemapValidator,r=e.validation.ValidationRegistry;if(r){const e={Treemap:t.checkSingleRoot.bind(t)};r.register(e,t)}}(0,n.K2)(o,"registerValidationChecks");var l=class{static{(0,n.K2)(this,"TreemapValidator")}checkSingleRoot(e,t){let r;for(const n of e.TreemapRows)n.item&&(void 0===r&&void 0===n.indent?r=0:(void 0===n.indent||void 0!==r&&r>=parseInt(n.indent,10))&&t("error","Multiple root nodes are not allowed in a treemap.",{node:n,property:"item"}))}},u={parser:{TokenBuilder:(0,n.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new s,"ValueConverter")},validation:{TreemapValidator:(0,n.K2)(()=>new l,"TreemapValidator")}};function c(e=n.DD){const t=(0,n.WQ)((0,n.uM)(e),n.sr),r=(0,n.WQ)((0,n.tG)({shared:t}),n.XE,u);return t.ServiceRegistry.register(r),o(r),{shared:t,Treemap:r}}(0,n.K2)(c,"createTreemapServices")},93279(e,t,r){r.d(t,{t:()=>s});var n=r(4954),a=class extends n.mR{static{(0,n.K2)(this,"CynefinTokenBuilder")}constructor(){super(["cynefin-beta"])}},i={parser:{TokenBuilder:(0,n.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new n.Tm,"ValueConverter")}};function s(e=n.DD){const t=(0,n.WQ)((0,n.uM)(e),n.sr),r=(0,n.WQ)((0,n.tG)({shared:t}),n.Jn,i);return t.ServiceRegistry.register(r),{shared:t,Cynefin:r}}(0,n.K2)(s,"createCynefinServices")},43245(e,t,r){r.d(t,{P:()=>l});var n=r(4954),a=class extends n.mR{static{(0,n.K2)(this,"RailroadPegTokenBuilder")}constructor(){super(["railroad-peg-beta"])}},i=(0,n.K2)(e=>{const t=e.slice(1,-1);let r="";for(let n=0;nnew a,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new s,"ValueConverter")}};function l(e=n.DD){const t=(0,n.WQ)((0,n.uM)(e),n.sr),r=(0,n.WQ)((0,n.tG)({shared:t}),n.dj,o);return t.ServiceRegistry.register(r),{shared:t,RailroadPeg:r}}(0,n.K2)(l,"createRailroadPegServices")},4954(e,t,r){r.d(t,{Bg:()=>oF,Bi:()=>cF,CZ:()=>fF,DD:()=>yN,D_:()=>sF,F5:()=>ZP,FZ:()=>aF,Jn:()=>tF,K2:()=>Ge,Tm:()=>gF,U4:()=>uF,WQ:()=>rN,XE:()=>dF,Xr:()=>mF,d$:()=>nF,dg:()=>yF,dj:()=>pF,mR:()=>TF,oI:()=>lF,p5:()=>iF,sr:()=>Jj,tG:()=>eN,uM:()=>tN,wV:()=>eF,x0:()=>rF});var n,a,i,s,o,l,u,c,p,d,f,m,h,y,g,T,v,$,R,E,b,A,C,S,k,x,w,N,I,_,P,O,D,L,M,j,F,G,z,K,q,U,B,W,V,H,Y,Q,Z,X,J,ee,te,re,ne,ae,ie,se,oe,le,ue,ce,pe,de,fe,me,he,ye,ge,Te,ve,$e,Re,Ee,be,Ae,Ce,Se,ke,xe,we,Ne,Ie,_e,Pe,Oe=Object.create,De=Object.defineProperty,Le=Object.getOwnPropertyDescriptor,Me=Object.getOwnPropertyNames,je=Object.getPrototypeOf,Fe=Object.prototype.hasOwnProperty,Ge=(e,t)=>De(e,"name",{value:t,configurable:!0}),ze=(e,t)=>function(){return t||(0,e[Me(e)[0]])((t={exports:{}}).exports,t),t.exports},Ke=(e,t)=>{for(var r in t)De(e,r,{get:t[r],enumerable:!0})},qe=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of Me(t))Fe.call(e,a)||a===r||De(e,a,{get:()=>t[a],enumerable:!(n=Le(t,a))||n.enumerable});return e},Ue=(e,t,r)=>(qe(e,t,"default"),r&&qe(r,t,"default")),Be=(e,t,r)=>(r=null!=e?Oe(je(e)):{},qe(!t&&e&&e.__esModule?r:De(r,"default",{value:e,enumerable:!0}),e)),We=e=>qe(De({},"__esModule",{value:!0}),e),Ve={};Ke(Ve,{AnnotatedTextEdit:()=>C,ChangeAnnotation:()=>b,ChangeAnnotationIdentifier:()=>A,CodeAction:()=>le,CodeActionContext:()=>oe,CodeActionKind:()=>ie,CodeActionTriggerKind:()=>se,CodeDescription:()=>v,CodeLens:()=>ue,Color:()=>p,ColorInformation:()=>d,ColorPresentation:()=>f,Command:()=>R,CompletionItem:()=>W,CompletionItemKind:()=>G,CompletionItemLabelDetails:()=>B,CompletionItemTag:()=>K,CompletionList:()=>V,CreateFile:()=>k,DeleteFile:()=>w,Diagnostic:()=>$,DiagnosticRelatedInformation:()=>y,DiagnosticSeverity:()=>g,DiagnosticTag:()=>T,DocumentHighlight:()=>J,DocumentHighlightKind:()=>X,DocumentLink:()=>pe,DocumentSymbol:()=>ae,DocumentUri:()=>n,EOL:()=>Ne,FoldingRange:()=>h,FoldingRangeKind:()=>m,FormattingOptions:()=>ce,Hover:()=>Y,InlayHint:()=>Ee,InlayHintKind:()=>$e,InlayHintLabelPart:()=>Re,InlineCompletionContext:()=>xe,InlineCompletionItem:()=>Ae,InlineCompletionList:()=>Ce,InlineCompletionTriggerKind:()=>Se,InlineValueContext:()=>ve,InlineValueEvaluatableExpression:()=>Te,InlineValueText:()=>ye,InlineValueVariableLookup:()=>ge,InsertReplaceEdit:()=>q,InsertTextFormat:()=>z,InsertTextMode:()=>U,Location:()=>u,LocationLink:()=>c,MarkedString:()=>H,MarkupContent:()=>F,MarkupKind:()=>j,OptionalVersionedTextDocumentIdentifier:()=>L,ParameterInformation:()=>Q,Position:()=>o,Range:()=>l,RenameFile:()=>x,SelectedCompletionInfo:()=>ke,SelectionRange:()=>de,SemanticTokenModifiers:()=>me,SemanticTokenTypes:()=>fe,SemanticTokens:()=>he,SignatureInformation:()=>Z,StringValue:()=>be,SymbolInformation:()=>re,SymbolKind:()=>ee,SymbolTag:()=>te,TextDocument:()=>Ie,TextDocumentEdit:()=>S,TextDocumentIdentifier:()=>O,TextDocumentItem:()=>M,TextEdit:()=>E,URI:()=>a,VersionedTextDocumentIdentifier:()=>D,WorkspaceChange:()=>P,WorkspaceEdit:()=>N,WorkspaceFolder:()=>we,WorkspaceSymbol:()=>ne,integer:()=>i,uinteger:()=>s});var He,Ye,Qe=(He={"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){var e,t,r,Oe,De,Le,Me,je,Fe,ze,Ke,qe,Ue;!function(e){function t(e){return"string"==typeof e}Ge(t,"is"),e.is=t}(n||(n={})),function(e){function t(e){return"string"==typeof e}Ge(t,"is"),e.is=t}(a||(a={})),function(e){function t(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,Ge(t,"is"),e.is=t}(i||(i={})),function(e){function t(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.MIN_VALUE=0,e.MAX_VALUE=2147483647,Ge(t,"is"),e.is=t}(s||(s={})),function(e){function t(e,t){return e===Number.MAX_VALUE&&(e=s.MAX_VALUE),t===Number.MAX_VALUE&&(t=s.MAX_VALUE),{line:e,character:t}}function r(e){let t=e;return Pe.objectLiteral(t)&&Pe.uinteger(t.line)&&Pe.uinteger(t.character)}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(o||(o={})),function(e){function t(e,t,r,n){if(Pe.uinteger(e)&&Pe.uinteger(t)&&Pe.uinteger(r)&&Pe.uinteger(n))return{start:o.create(e,t),end:o.create(r,n)};if(o.is(e)&&o.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${r}, ${n}]`)}function r(e){let t=e;return Pe.objectLiteral(t)&&o.is(t.start)&&o.is(t.end)}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(l||(l={})),function(e){function t(e,t){return{uri:e,range:t}}function r(e){let t=e;return Pe.objectLiteral(t)&&l.is(t.range)&&(Pe.string(t.uri)||Pe.undefined(t.uri))}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(u||(u={})),function(e){function t(e,t,r,n){return{targetUri:e,targetRange:t,targetSelectionRange:r,originSelectionRange:n}}function r(e){let t=e;return Pe.objectLiteral(t)&&l.is(t.targetRange)&&Pe.string(t.targetUri)&&l.is(t.targetSelectionRange)&&(l.is(t.originSelectionRange)||Pe.undefined(t.originSelectionRange))}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(c||(c={})),function(e){function t(e,t,r,n){return{red:e,green:t,blue:r,alpha:n}}function r(e){const t=e;return Pe.objectLiteral(t)&&Pe.numberRange(t.red,0,1)&&Pe.numberRange(t.green,0,1)&&Pe.numberRange(t.blue,0,1)&&Pe.numberRange(t.alpha,0,1)}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(p||(p={})),function(e){function t(e,t){return{range:e,color:t}}function r(e){const t=e;return Pe.objectLiteral(t)&&l.is(t.range)&&p.is(t.color)}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(d||(d={})),function(e){function t(e,t,r){return{label:e,textEdit:t,additionalTextEdits:r}}function r(e){const t=e;return Pe.objectLiteral(t)&&Pe.string(t.label)&&(Pe.undefined(t.textEdit)||E.is(t))&&(Pe.undefined(t.additionalTextEdits)||Pe.typedArray(t.additionalTextEdits,E.is))}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(f||(f={})),(e=m||(m={})).Comment="comment",e.Imports="imports",e.Region="region",function(e){function t(e,t,r,n,a,i){const s={startLine:e,endLine:t};return Pe.defined(r)&&(s.startCharacter=r),Pe.defined(n)&&(s.endCharacter=n),Pe.defined(a)&&(s.kind=a),Pe.defined(i)&&(s.collapsedText=i),s}function r(e){const t=e;return Pe.objectLiteral(t)&&Pe.uinteger(t.startLine)&&Pe.uinteger(t.startLine)&&(Pe.undefined(t.startCharacter)||Pe.uinteger(t.startCharacter))&&(Pe.undefined(t.endCharacter)||Pe.uinteger(t.endCharacter))&&(Pe.undefined(t.kind)||Pe.string(t.kind))}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(h||(h={})),function(e){function t(e,t){return{location:e,message:t}}function r(e){let t=e;return Pe.defined(t)&&u.is(t.location)&&Pe.string(t.message)}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(y||(y={})),(t=g||(g={})).Error=1,t.Warning=2,t.Information=3,t.Hint=4,(r=T||(T={})).Unnecessary=1,r.Deprecated=2,function(e){function t(e){const t=e;return Pe.objectLiteral(t)&&Pe.string(t.href)}Ge(t,"is"),e.is=t}(v||(v={})),function(e){function t(e,t,r,n,a,i){let s={range:e,message:t};return Pe.defined(r)&&(s.severity=r),Pe.defined(n)&&(s.code=n),Pe.defined(a)&&(s.source=a),Pe.defined(i)&&(s.relatedInformation=i),s}function r(e){var t;let r=e;return Pe.defined(r)&&l.is(r.range)&&Pe.string(r.message)&&(Pe.number(r.severity)||Pe.undefined(r.severity))&&(Pe.integer(r.code)||Pe.string(r.code)||Pe.undefined(r.code))&&(Pe.undefined(r.codeDescription)||Pe.string(null===(t=r.codeDescription)||void 0===t?void 0:t.href))&&(Pe.string(r.source)||Pe.undefined(r.source))&&(Pe.undefined(r.relatedInformation)||Pe.typedArray(r.relatedInformation,y.is))}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}($||($={})),function(e){function t(e,t,...r){let n={title:e,command:t};return Pe.defined(r)&&r.length>0&&(n.arguments=r),n}function r(e){let t=e;return Pe.defined(t)&&Pe.string(t.title)&&Pe.string(t.command)}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(R||(R={})),function(e){function t(e,t){return{range:e,newText:t}}function r(e,t){return{range:{start:e,end:e},newText:t}}function n(e){return{range:e,newText:""}}function a(e){const t=e;return Pe.objectLiteral(t)&&Pe.string(t.newText)&&l.is(t.range)}Ge(t,"replace"),e.replace=t,Ge(r,"insert"),e.insert=r,Ge(n,"del"),e.del=n,Ge(a,"is"),e.is=a}(E||(E={})),function(e){function t(e,t,r){const n={label:e};return void 0!==t&&(n.needsConfirmation=t),void 0!==r&&(n.description=r),n}function r(e){const t=e;return Pe.objectLiteral(t)&&Pe.string(t.label)&&(Pe.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Pe.string(t.description)||void 0===t.description)}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(b||(b={})),function(e){function t(e){const t=e;return Pe.string(t)}Ge(t,"is"),e.is=t}(A||(A={})),function(e){function t(e,t,r){return{range:e,newText:t,annotationId:r}}function r(e,t,r){return{range:{start:e,end:e},newText:t,annotationId:r}}function n(e,t){return{range:e,newText:"",annotationId:t}}function a(e){const t=e;return E.is(t)&&(b.is(t.annotationId)||A.is(t.annotationId))}Ge(t,"replace"),e.replace=t,Ge(r,"insert"),e.insert=r,Ge(n,"del"),e.del=n,Ge(a,"is"),e.is=a}(C||(C={})),function(e){function t(e,t){return{textDocument:e,edits:t}}function r(e){let t=e;return Pe.defined(t)&&L.is(t.textDocument)&&Array.isArray(t.edits)}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(S||(S={})),function(e){function t(e,t,r){let n={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(n.options=t),void 0!==r&&(n.annotationId=r),n}function r(e){let t=e;return t&&"create"===t.kind&&Pe.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Pe.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Pe.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||A.is(t.annotationId))}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(k||(k={})),function(e){function t(e,t,r,n){let a={kind:"rename",oldUri:e,newUri:t};return void 0===r||void 0===r.overwrite&&void 0===r.ignoreIfExists||(a.options=r),void 0!==n&&(a.annotationId=n),a}function r(e){let t=e;return t&&"rename"===t.kind&&Pe.string(t.oldUri)&&Pe.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Pe.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Pe.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||A.is(t.annotationId))}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(x||(x={})),function(e){function t(e,t,r){let n={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(n.options=t),void 0!==r&&(n.annotationId=r),n}function r(e){let t=e;return t&&"delete"===t.kind&&Pe.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Pe.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Pe.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||A.is(t.annotationId))}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(w||(w={})),function(e){function t(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every(e=>Pe.string(e.kind)?k.is(e)||x.is(e)||w.is(e):S.is(e)))}Ge(t,"is"),e.is=t}(N||(N={})),I=class{static{Ge(this,"TextEditChangeImpl")}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let n,a;if(void 0===r?n=E.insert(e,t):A.is(r)?(a=r,n=C.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=C.insert(e,t,a)),this.edits.push(n),void 0!==a)return a}replace(e,t,r){let n,a;if(void 0===r?n=E.replace(e,t):A.is(r)?(a=r,n=C.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=C.replace(e,t,a)),this.edits.push(n),void 0!==a)return a}delete(e,t){let r,n;if(void 0===t?r=E.del(e):A.is(t)?(n=t,r=C.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=C.del(e,n)),this.edits.push(r),void 0!==n)return n}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")}},_=class{static{Ge(this,"ChangeAnnotations")}constructor(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let r;if(A.is(e)?r=e:(r=this.nextId(),t=e),void 0!==this._annotations[r])throw new Error(`Id ${r} is already in use.`);if(void 0===t)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},P=class{static{Ge(this,"WorkspaceChange")}constructor(e){this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new _(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(e=>{if(S.is(e)){const t=new I(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}})):e.changes&&Object.keys(e.changes).forEach(t=>{const r=new I(e.changes[t]);this._textEditChanges[t]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(L.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let r=this._textEditChanges[t.uri];if(!r){const e=[],n={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(n),r=new I(e,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}{if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let r=[];this._workspaceEdit.changes[e]=r,t=new I(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new _,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let n,a,i;if(b.is(t)||A.is(t)?n=t:r=t,void 0===n?a=k.create(e,r):(i=A.is(n)?n:this._changeAnnotations.manage(n),a=k.create(e,r,i)),this._workspaceEdit.documentChanges.push(a),void 0!==i)return i}renameFile(e,t,r,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let a,i,s;if(b.is(r)||A.is(r)?a=r:n=r,void 0===a?i=x.create(e,t,n):(s=A.is(a)?a:this._changeAnnotations.manage(a),i=x.create(e,t,n,s)),this._workspaceEdit.documentChanges.push(i),void 0!==s)return s}deleteFile(e,t,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let n,a,i;if(b.is(t)||A.is(t)?n=t:r=t,void 0===n?a=w.create(e,r):(i=A.is(n)?n:this._changeAnnotations.manage(n),a=w.create(e,r,i)),this._workspaceEdit.documentChanges.push(a),void 0!==i)return i}},function(e){function t(e){return{uri:e}}function r(e){let t=e;return Pe.defined(t)&&Pe.string(t.uri)}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(O||(O={})),function(e){function t(e,t){return{uri:e,version:t}}function r(e){let t=e;return Pe.defined(t)&&Pe.string(t.uri)&&Pe.integer(t.version)}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(D||(D={})),function(e){function t(e,t){return{uri:e,version:t}}function r(e){let t=e;return Pe.defined(t)&&Pe.string(t.uri)&&(null===t.version||Pe.integer(t.version))}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(L||(L={})),function(e){function t(e,t,r,n){return{uri:e,languageId:t,version:r,text:n}}function r(e){let t=e;return Pe.defined(t)&&Pe.string(t.uri)&&Pe.string(t.languageId)&&Pe.integer(t.version)&&Pe.string(t.text)}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(M||(M={})),function(e){function t(t){const r=t;return r===e.PlainText||r===e.Markdown}e.PlainText="plaintext",e.Markdown="markdown",Ge(t,"is"),e.is=t}(j||(j={})),function(e){function t(e){const t=e;return Pe.objectLiteral(e)&&j.is(t.kind)&&Pe.string(t.value)}Ge(t,"is"),e.is=t}(F||(F={})),(Oe=G||(G={})).Text=1,Oe.Method=2,Oe.Function=3,Oe.Constructor=4,Oe.Field=5,Oe.Variable=6,Oe.Class=7,Oe.Interface=8,Oe.Module=9,Oe.Property=10,Oe.Unit=11,Oe.Value=12,Oe.Enum=13,Oe.Keyword=14,Oe.Snippet=15,Oe.Color=16,Oe.File=17,Oe.Reference=18,Oe.Folder=19,Oe.EnumMember=20,Oe.Constant=21,Oe.Struct=22,Oe.Event=23,Oe.Operator=24,Oe.TypeParameter=25,(De=z||(z={})).PlainText=1,De.Snippet=2,(K||(K={})).Deprecated=1,function(e){function t(e,t,r){return{newText:e,insert:t,replace:r}}function r(e){const t=e;return t&&Pe.string(t.newText)&&l.is(t.insert)&&l.is(t.replace)}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(q||(q={})),(Le=U||(U={})).asIs=1,Le.adjustIndentation=2,function(e){function t(e){const t=e;return t&&(Pe.string(t.detail)||void 0===t.detail)&&(Pe.string(t.description)||void 0===t.description)}Ge(t,"is"),e.is=t}(B||(B={})),function(e){function t(e){return{label:e}}Ge(t,"create"),e.create=t}(W||(W={})),function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}Ge(t,"create"),e.create=t}(V||(V={})),function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function r(e){const t=e;return Pe.string(t)||Pe.objectLiteral(t)&&Pe.string(t.language)&&Pe.string(t.value)}Ge(t,"fromPlainText"),e.fromPlainText=t,Ge(r,"is"),e.is=r}(H||(H={})),function(e){function t(e){let t=e;return!!t&&Pe.objectLiteral(t)&&(F.is(t.contents)||H.is(t.contents)||Pe.typedArray(t.contents,H.is))&&(void 0===e.range||l.is(e.range))}Ge(t,"is"),e.is=t}(Y||(Y={})),function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}Ge(t,"create"),e.create=t}(Q||(Q={})),function(e){function t(e,t,...r){let n={label:e};return Pe.defined(t)&&(n.documentation=t),Pe.defined(r)?n.parameters=r:n.parameters=[],n}Ge(t,"create"),e.create=t}(Z||(Z={})),(Me=X||(X={})).Text=1,Me.Read=2,Me.Write=3,function(e){function t(e,t){let r={range:e};return Pe.number(t)&&(r.kind=t),r}Ge(t,"create"),e.create=t}(J||(J={})),(je=ee||(ee={})).File=1,je.Module=2,je.Namespace=3,je.Package=4,je.Class=5,je.Method=6,je.Property=7,je.Field=8,je.Constructor=9,je.Enum=10,je.Interface=11,je.Function=12,je.Variable=13,je.Constant=14,je.String=15,je.Number=16,je.Boolean=17,je.Array=18,je.Object=19,je.Key=20,je.Null=21,je.EnumMember=22,je.Struct=23,je.Event=24,je.Operator=25,je.TypeParameter=26,(te||(te={})).Deprecated=1,function(e){function t(e,t,r,n,a){let i={name:e,kind:t,location:{uri:n,range:r}};return a&&(i.containerName=a),i}Ge(t,"create"),e.create=t}(re||(re={})),function(e){function t(e,t,r,n){return void 0!==n?{name:e,kind:t,location:{uri:r,range:n}}:{name:e,kind:t,location:{uri:r}}}Ge(t,"create"),e.create=t}(ne||(ne={})),function(e){function t(e,t,r,n,a,i){let s={name:e,detail:t,kind:r,range:n,selectionRange:a};return void 0!==i&&(s.children=i),s}function r(e){let t=e;return t&&Pe.string(t.name)&&Pe.number(t.kind)&&l.is(t.range)&&l.is(t.selectionRange)&&(void 0===t.detail||Pe.string(t.detail))&&(void 0===t.deprecated||Pe.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(ae||(ae={})),(Fe=ie||(ie={})).Empty="",Fe.QuickFix="quickfix",Fe.Refactor="refactor",Fe.RefactorExtract="refactor.extract",Fe.RefactorInline="refactor.inline",Fe.RefactorRewrite="refactor.rewrite",Fe.Source="source",Fe.SourceOrganizeImports="source.organizeImports",Fe.SourceFixAll="source.fixAll",(ze=se||(se={})).Invoked=1,ze.Automatic=2,function(e){function t(e,t,r){let n={diagnostics:e};return null!=t&&(n.only=t),null!=r&&(n.triggerKind=r),n}function r(e){let t=e;return Pe.defined(t)&&Pe.typedArray(t.diagnostics,$.is)&&(void 0===t.only||Pe.typedArray(t.only,Pe.string))&&(void 0===t.triggerKind||t.triggerKind===se.Invoked||t.triggerKind===se.Automatic)}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(oe||(oe={})),function(e){function t(e,t,r){let n={title:e},a=!0;return"string"==typeof t?(a=!1,n.kind=t):R.is(t)?n.command=t:n.edit=t,a&&void 0!==r&&(n.kind=r),n}function r(e){let t=e;return t&&Pe.string(t.title)&&(void 0===t.diagnostics||Pe.typedArray(t.diagnostics,$.is))&&(void 0===t.kind||Pe.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||R.is(t.command))&&(void 0===t.isPreferred||Pe.boolean(t.isPreferred))&&(void 0===t.edit||N.is(t.edit))}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(le||(le={})),function(e){function t(e,t){let r={range:e};return Pe.defined(t)&&(r.data=t),r}function r(e){let t=e;return Pe.defined(t)&&l.is(t.range)&&(Pe.undefined(t.command)||R.is(t.command))}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(ue||(ue={})),function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}function r(e){let t=e;return Pe.defined(t)&&Pe.uinteger(t.tabSize)&&Pe.boolean(t.insertSpaces)}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(ce||(ce={})),function(e){function t(e,t,r){return{range:e,target:t,data:r}}function r(e){let t=e;return Pe.defined(t)&&l.is(t.range)&&(Pe.undefined(t.target)||Pe.string(t.target))}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(pe||(pe={})),function(e){function t(e,t){return{range:e,parent:t}}function r(t){let r=t;return Pe.objectLiteral(r)&&l.is(r.range)&&(void 0===r.parent||e.is(r.parent))}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(de||(de={})),(Ke=fe||(fe={})).namespace="namespace",Ke.type="type",Ke.class="class",Ke.enum="enum",Ke.interface="interface",Ke.struct="struct",Ke.typeParameter="typeParameter",Ke.parameter="parameter",Ke.variable="variable",Ke.property="property",Ke.enumMember="enumMember",Ke.event="event",Ke.function="function",Ke.method="method",Ke.macro="macro",Ke.keyword="keyword",Ke.modifier="modifier",Ke.comment="comment",Ke.string="string",Ke.number="number",Ke.regexp="regexp",Ke.operator="operator",Ke.decorator="decorator",(qe=me||(me={})).declaration="declaration",qe.definition="definition",qe.readonly="readonly",qe.static="static",qe.deprecated="deprecated",qe.abstract="abstract",qe.async="async",qe.modification="modification",qe.documentation="documentation",qe.defaultLibrary="defaultLibrary",function(e){function t(e){const t=e;return Pe.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}Ge(t,"is"),e.is=t}(he||(he={})),function(e){function t(e,t){return{range:e,text:t}}function r(e){const t=e;return null!=t&&l.is(t.range)&&Pe.string(t.text)}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(ye||(ye={})),function(e){function t(e,t,r){return{range:e,variableName:t,caseSensitiveLookup:r}}function r(e){const t=e;return null!=t&&l.is(t.range)&&Pe.boolean(t.caseSensitiveLookup)&&(Pe.string(t.variableName)||void 0===t.variableName)}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(ge||(ge={})),function(e){function t(e,t){return{range:e,expression:t}}function r(e){const t=e;return null!=t&&l.is(t.range)&&(Pe.string(t.expression)||void 0===t.expression)}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(Te||(Te={})),function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}function r(e){const t=e;return Pe.defined(t)&&l.is(e.stoppedLocation)}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(ve||(ve={})),function(e){function t(e){return 1===e||2===e}e.Type=1,e.Parameter=2,Ge(t,"is"),e.is=t}($e||($e={})),function(e){function t(e){return{value:e}}function r(e){const t=e;return Pe.objectLiteral(t)&&(void 0===t.tooltip||Pe.string(t.tooltip)||F.is(t.tooltip))&&(void 0===t.location||u.is(t.location))&&(void 0===t.command||R.is(t.command))}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(Re||(Re={})),function(e){function t(e,t,r){const n={position:e,label:t};return void 0!==r&&(n.kind=r),n}function r(e){const t=e;return Pe.objectLiteral(t)&&o.is(t.position)&&(Pe.string(t.label)||Pe.typedArray(t.label,Re.is))&&(void 0===t.kind||$e.is(t.kind))&&void 0===t.textEdits||Pe.typedArray(t.textEdits,E.is)&&(void 0===t.tooltip||Pe.string(t.tooltip)||F.is(t.tooltip))&&(void 0===t.paddingLeft||Pe.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Pe.boolean(t.paddingRight))}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r}(Ee||(Ee={})),function(e){function t(e){return{kind:"snippet",value:e}}Ge(t,"createSnippet"),e.createSnippet=t}(be||(be={})),function(e){function t(e,t,r,n){return{insertText:e,filterText:t,range:r,command:n}}Ge(t,"create"),e.create=t}(Ae||(Ae={})),function(e){function t(e){return{items:e}}Ge(t,"create"),e.create=t}(Ce||(Ce={})),(Ue=Se||(Se={})).Invoked=0,Ue.Automatic=1,function(e){function t(e,t){return{range:e,text:t}}Ge(t,"create"),e.create=t}(ke||(ke={})),function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}Ge(t,"create"),e.create=t}(xe||(xe={})),function(e){function t(e){const t=e;return Pe.objectLiteral(t)&&a.is(t.uri)&&Pe.string(t.name)}Ge(t,"is"),e.is=t}(we||(we={})),Ne=["\n","\r\n","\r"],function(e){function t(e,t,r,n){return new _e(e,t,r,n)}function r(e){let t=e;return!!(Pe.defined(t)&&Pe.string(t.uri)&&(Pe.undefined(t.languageId)||Pe.string(t.languageId))&&Pe.uinteger(t.lineCount)&&Pe.func(t.getText)&&Pe.func(t.positionAt)&&Pe.func(t.offsetAt))}function n(e,t){let r=e.getText(),n=a(t,(e,t)=>{let r=e.range.start.line-t.range.start.line;return 0===r?e.range.start.character-t.range.start.character:r}),i=r.length;for(let a=n.length-1;a>=0;a--){let t=n[a],s=e.offsetAt(t.range.start),o=e.offsetAt(t.range.end);if(!(o<=i))throw new Error("Overlapping edit");r=r.substring(0,s)+t.newText+r.substring(o,r.length),i=s}return r}function a(e,t){if(e.length<=1)return e;const r=e.length/2|0,n=e.slice(0,r),i=e.slice(r);a(n,t),a(i,t);let s=0,o=0,l=0;for(;s0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),r=0,n=t.length;if(0===n)return o.create(0,e);for(;re?n=a:r=a+1}let a=r-1;return o.create(a,e-t[a])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let r=t[e.line],n=e.line+1r(e))}Object.defineProperty(e,"__esModule",{value:!0}),e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0,Ge(t,"boolean"),e.boolean=t,Ge(r,"string"),e.string=r,Ge(n,"number"),e.number=n,Ge(a,"error"),e.error=a,Ge(i,"func"),e.func=i,Ge(s,"array"),e.array=s,Ge(o,"stringArray"),e.stringArray=o}}),Je=ze({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/events.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;var t,r=Ze();!function(e){const t={dispose(){}};e.None=function(){return t}}(t||(e.Event=t={}));var n=class{static{Ge(this,"CallbackList")}add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:Ge(()=>this.remove(e,t),"dispose")})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let n=0,a=this._callbacks.length;n{this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,r);const i={dispose:Ge(()=>{this._callbacks&&(this._callbacks.remove(t,r),i.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},"dispose")};return Array.isArray(a)&&a.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};e.Emitter=a,a._noop=function(){}}}),et=ze({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;var t,r=Ze(),n=Xe(),a=Je();!function(e){function t(t){const r=t;return r&&(r===e.None||r===e.Cancelled||n.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:a.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:a.Event.None}),Ge(t,"is"),e.is=t}(t||(e.CancellationToken=t={}));var i=Object.freeze(function(e,t){const n=(0,r.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}),s=class{static{Ge(this,"MutableToken")}constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?i:(this._emitter||(this._emitter=new a.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},o=class{static{Ge(this,"CancellationTokenSource")}get token(){return this._token||(this._token=new s),this._token}cancel(){this._token?this._token.cancel():this._token=t.Cancelled}dispose(){this._token?this._token instanceof s&&this._token.dispose():this._token=t.None}};e.CancellationTokenSource=o}}),tt=ze({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messages.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Message=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType=e.RequestType0=e.AbstractMessageSignature=e.ParameterStructures=e.ResponseError=e.ErrorCodes=void 0;var t,r,n=Xe();(r=t||(e.ErrorCodes=t={})).ParseError=-32700,r.InvalidRequest=-32600,r.MethodNotFound=-32601,r.InvalidParams=-32602,r.InternalError=-32603,r.jsonrpcReservedErrorRangeStart=-32099,r.serverErrorStart=-32099,r.MessageWriteError=-32099,r.MessageReadError=-32098,r.PendingResponseRejected=-32097,r.ConnectionInactive=-32096,r.ServerNotInitialized=-32002,r.UnknownErrorCode=-32001,r.jsonrpcReservedErrorRangeEnd=-32e3,r.serverErrorEnd=-32e3;var a=class e extends Error{static{Ge(this,"ResponseError")}constructor(r,a,i){super(a),this.code=n.number(r)?r:t.UnknownErrorCode,this.data=i,Object.setPrototypeOf(this,e.prototype)}toJson(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),e}};e.ResponseError=a;var i=class e{static{Ge(this,"ParameterStructures")}constructor(e){this.kind=e}static is(t){return t===e.auto||t===e.byName||t===e.byPosition}toString(){return this.kind}};e.ParameterStructures=i,i.auto=new i("auto"),i.byPosition=new i("byPosition"),i.byName=new i("byName");var s=class{static{Ge(this,"AbstractMessageSignature")}constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return i.auto}};e.AbstractMessageSignature=s;var o=class extends s{static{Ge(this,"RequestType0")}constructor(e){super(e,0)}};e.RequestType0=o;var l=class extends s{static{Ge(this,"RequestType")}constructor(e,t=i.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};e.RequestType=l;var u=class extends s{static{Ge(this,"RequestType1")}constructor(e,t=i.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};e.RequestType1=u;var c=class extends s{static{Ge(this,"RequestType2")}constructor(e){super(e,2)}};e.RequestType2=c;var p=class extends s{static{Ge(this,"RequestType3")}constructor(e){super(e,3)}};e.RequestType3=p;var d=class extends s{static{Ge(this,"RequestType4")}constructor(e){super(e,4)}};e.RequestType4=d;var f=class extends s{static{Ge(this,"RequestType5")}constructor(e){super(e,5)}};e.RequestType5=f;var m=class extends s{static{Ge(this,"RequestType6")}constructor(e){super(e,6)}};e.RequestType6=m;var h=class extends s{static{Ge(this,"RequestType7")}constructor(e){super(e,7)}};e.RequestType7=h;var y=class extends s{static{Ge(this,"RequestType8")}constructor(e){super(e,8)}};e.RequestType8=y;var g=class extends s{static{Ge(this,"RequestType9")}constructor(e){super(e,9)}};e.RequestType9=g;var T=class extends s{static{Ge(this,"NotificationType")}constructor(e,t=i.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};e.NotificationType=T;var v=class extends s{static{Ge(this,"NotificationType0")}constructor(e){super(e,0)}};e.NotificationType0=v;var $=class extends s{static{Ge(this,"NotificationType1")}constructor(e,t=i.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};e.NotificationType1=$;var R=class extends s{static{Ge(this,"NotificationType2")}constructor(e){super(e,2)}};e.NotificationType2=R;var E=class extends s{static{Ge(this,"NotificationType3")}constructor(e){super(e,3)}};e.NotificationType3=E;var b=class extends s{static{Ge(this,"NotificationType4")}constructor(e){super(e,4)}};e.NotificationType4=b;var A=class extends s{static{Ge(this,"NotificationType5")}constructor(e){super(e,5)}};e.NotificationType5=A;var C=class extends s{static{Ge(this,"NotificationType6")}constructor(e){super(e,6)}};e.NotificationType6=C;var S=class extends s{static{Ge(this,"NotificationType7")}constructor(e){super(e,7)}};e.NotificationType7=S;var k=class extends s{static{Ge(this,"NotificationType8")}constructor(e){super(e,8)}};e.NotificationType8=k;var x,w=class extends s{static{Ge(this,"NotificationType9")}constructor(e){super(e,9)}};e.NotificationType9=w,function(e){function t(e){const t=e;return t&&n.string(t.method)&&(n.string(t.id)||n.number(t.id))}function r(e){const t=e;return t&&n.string(t.method)&&void 0===e.id}function a(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(n.string(t.id)||n.number(t.id)||null===t.id)}Ge(t,"isRequest"),e.isRequest=t,Ge(r,"isNotification"),e.isNotification=r,Ge(a,"isResponse"),e.isResponse=a}(x||(e.Message=x={}))}}),rt=ze({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(e){var t,r,n;Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=void 0,(n=r||(e.Touch=r={})).None=0,n.First=1,n.AsOld=n.First,n.Last=2,n.AsNew=n.Last;var a=class{static{Ge(this,"LinkedMap")}constructor(){this[t]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=r.None){const n=this._map.get(e);if(n)return t!==r.None&&this.touch(n,t),n.value}set(e,t,n=r.None){let a=this._map.get(e);if(a)a.value=t,n!==r.None&&this.touch(a,n);else{switch(a={key:e,value:t,next:void 0,previous:void 0},n){case r.None:this.addItemLast(a);break;case r.First:this.addItemFirst(a);break;case r.Last:default:this.addItemLast(a)}this._map.set(e,a),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const r=this._state;let n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this._state;let t=this._head;const r={[Symbol.iterator]:()=>r,next:Ge(()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.key,done:!1};return t=t.next,e}return{value:void 0,done:!0}},"next")};return r}values(){const e=this._state;let t=this._head;const r={[Symbol.iterator]:()=>r,next:Ge(()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.value,done:!1};return t=t.next,e}return{value:void 0,done:!0}},"next")};return r}entries(){const e=this._state;let t=this._head;const r={[Symbol.iterator]:()=>r,next:Ge(()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:[t.key,t.value],done:!1};return t=t.next,e}return{value:void 0,done:!0}},"next")};return r}[(t=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,r=this.size;for(;t&&r>e;)this._map.delete(t.key),t=t.next,r--;this._head=t,this._size=r,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===r.First||t===r.Last)if(t===r.First){if(e===this._head)return;const t=e.next,r=e.previous;e===this._tail?(r.next=void 0,this._tail=r):(t.previous=r,r.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===r.Last){if(e===this._tail)return;const t=e.next,r=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=r,r.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach((t,r)=>{e.push([r,t])}),e}fromJSON(e){this.clear();for(const[t,r]of e)this.set(t,r)}};e.LinkedMap=a;var i=class extends a{static{Ge(this,"LRUCache")}constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=r.AsNew){return super.get(e,t)}peek(e){return super.get(e,r.None)}set(e,t){return super.set(e,t,r.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};e.LRUCache=i}}),nt=ze({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/disposable.js"(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.Disposable=void 0,function(e){function t(e){return{dispose:e}}Ge(t,"create"),e.create=t}(t||(e.Disposable=t={}))}}),at=ze({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=void 0;var t,r,n=et();(r=t||(t={})).Continue=0,r.Cancelled=1;var a=class{static{Ge(this,"SharedArraySenderStrategy")}constructor(){this.buffers=new Map}enableCancellation(e){if(null===e.id)return;const r=new SharedArrayBuffer(4);new Int32Array(r,0,1)[0]=t.Continue,this.buffers.set(e.id,r),e.$cancellationData=r}async sendCancellation(e,r){const n=this.buffers.get(r);if(void 0===n)return;const a=new Int32Array(n,0,1);Atomics.store(a,0,t.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};e.SharedArraySenderStrategy=a;var i=class{static{Ge(this,"SharedArrayBufferCancellationToken")}constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===t.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},s=class{static{Ge(this,"SharedArrayBufferCancellationTokenSource")}constructor(e){this.token=new i(e)}cancel(){}dispose(){}},o=class{static{Ge(this,"SharedArrayReceiverStrategy")}constructor(){this.kind="request"}createCancellationTokenSource(e){const t=e.$cancellationData;return void 0===t?new n.CancellationTokenSource:new s(t)}};e.SharedArrayReceiverStrategy=o}}),it=ze({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/semaphore.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Semaphore=void 0;var t=Ze(),r=class{static{Ge(this,"Semaphore")}constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()})}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,t.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then(t=>{this._active--,e.resolve(t),this.runNext()},t=>{this._active--,e.reject(t),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};e.Semaphore=r}}),st=ze({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=void 0;var t,r=Ze(),n=Xe(),a=Je(),i=it();!function(e){function t(e){let t=e;return t&&n.func(t.listen)&&n.func(t.dispose)&&n.func(t.onError)&&n.func(t.onClose)&&n.func(t.onPartialMessage)}Ge(t,"is"),e.is=t}(t||(e.MessageReader=t={}));var s,o=class{static{Ge(this,"AbstractMessageReader")}constructor(){this.errorEmitter=new a.Emitter,this.closeEmitter=new a.Emitter,this.partialMessageEmitter=new a.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${n.string(e.message)?e.message:"unknown"}`)}};e.AbstractMessageReader=o,function(e){function t(e){let t,n;const a=new Map;let i;const s=new Map;if(void 0===e||"string"==typeof e)t=e??"utf-8";else{if(t=e.charset??"utf-8",void 0!==e.contentDecoder&&(n=e.contentDecoder,a.set(n.name,n)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)a.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(i=e.contentTypeDecoder,s.set(i.name,i)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)s.set(t.name,t)}return void 0===i&&(i=(0,r.default)().applicationJson.decoder,s.set(i.name,i)),{charset:t,contentDecoder:n,contentDecoders:a,contentTypeDecoder:i,contentTypeDecoders:s}}Ge(t,"fromOptions"),e.fromOptions=t}(s||(s={}));var l=class extends o{static{Ge(this,"ReadableStreamMessageReader")}constructor(e,t){super(),this.readable=e,this.options=s.fromOptions(t),this.buffer=(0,r.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new i.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;const t=this.readable.onData(e=>{this.onData(e)});return this.readable.onError(e=>this.fireError(e)),this.readable.onClose(()=>this.fireClose()),t}onData(e){try{for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders(!0);if(!e)return;const t=e.get("content-length");if(!t)return void this.fireError(new Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(e))}`));const r=parseInt(t);if(isNaN(r))return void this.fireError(new Error(`Content-Length value must be a number. Got ${t}`));this.nextMessageLength=r}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{const t=void 0!==this.options.contentDecoder?await this.options.contentDecoder.decode(e):e,r=await this.options.contentTypeDecoder.decode(t,this.options);this.callback(r)}).catch(e=>{this.fireError(e)})}}catch(t){this.fireError(t)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,r.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};e.ReadableStreamMessageReader=l}}),ot=ze({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageWriter.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=void 0;var t,r=Ze(),n=Xe(),a=it(),i=Je();!function(e){function t(e){let t=e;return t&&n.func(t.dispose)&&n.func(t.onClose)&&n.func(t.onError)&&n.func(t.write)}Ge(t,"is"),e.is=t}(t||(e.MessageWriter=t={}));var s,o=class{static{Ge(this,"AbstractMessageWriter")}constructor(){this.errorEmitter=new i.Emitter,this.closeEmitter=new i.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,r){this.errorEmitter.fire([this.asError(e),t,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${n.string(e.message)?e.message:"unknown"}`)}};e.AbstractMessageWriter=o,function(e){function t(e){return void 0===e||"string"==typeof e?{charset:e??"utf-8",contentTypeEncoder:(0,r.default)().applicationJson.encoder}:{charset:e.charset??"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,r.default)().applicationJson.encoder}}Ge(t,"fromOptions"),e.fromOptions=t}(s||(s={}));var l=class extends o{static{Ge(this,"WriteableStreamMessageWriter")}constructor(e,t){super(),this.writable=e,this.options=s.fromOptions(t),this.errorCount=0,this.writeSemaphore=new a.Semaphore(1),this.writable.onError(e=>this.fireError(e)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e).then(t=>{const r=[];return r.push("Content-Length: ",t.byteLength.toString(),"\r\n"),r.push("\r\n"),this.doWrite(e,r,t)},e=>{throw this.fireError(e),e}))}async doWrite(e,t,r){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(r)}catch(n){return this.handleError(n,e),Promise.reject(n)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}};e.WriteableStreamMessageWriter=l}}),lt=ze({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMessageBuffer=void 0;var t=class{static{Ge(this,"AbstractMessageBuffer")}constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const t="string"==typeof e?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(0===this._chunks.length)return;let t=0,r=0,n=0,a=0;e:for(;rthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],r=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,r}const t=this.allocNative(e);let r=0;for(;e>0;){const n=this._chunks[0];if(n.byteLength>e){const a=n.slice(0,e);t.set(a,r),r+=e,this._chunks[0]=n.slice(e),this._totalLength-=e,e-=e}else t.set(n,r),r+=n.byteLength,this._chunks.shift(),this._totalLength-=n.byteLength,e-=n.byteLength}return t}};e.AbstractMessageBuffer=t}}),ut=ze({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/connection.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.ConnectionOptions=e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.RequestCancellationReceiverStrategy=e.IdCancellationReceiverStrategy=e.ConnectionStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=e.NullLogger=e.ProgressType=e.ProgressToken=void 0;var t,r,n,a=Ze(),i=Xe(),s=tt(),o=rt(),l=Je(),u=et();(t||(t={})).type=new s.NotificationType("$/cancelRequest"),function(e){function t(e){return"string"==typeof e||"number"==typeof e}Ge(t,"is"),e.is=t}(r||(e.ProgressToken=r={})),(n||(n={})).type=new s.NotificationType("$/progress");var c,p,d,f,m,h,y,g,T,v,$,R=class{static{Ge(this,"ProgressType")}constructor(){}};e.ProgressType=R,function(e){function t(e){return i.func(e)}Ge(t,"is"),e.is=t}(c||(c={})),e.NullLogger=Object.freeze({error:Ge(()=>{},"error"),warn:Ge(()=>{},"warn"),info:Ge(()=>{},"info"),log:Ge(()=>{},"log")}),(d=p||(e.Trace=p={}))[d.Off=0]="Off",d[d.Messages=1]="Messages",d[d.Compact=2]="Compact",d[d.Verbose=3]="Verbose",(m=f||(e.TraceValues=f={})).Off="off",m.Messages="messages",m.Compact="compact",m.Verbose="verbose",function(e){function t(t){if(!i.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose}}function r(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}Ge(t,"fromString"),e.fromString=t,Ge(r,"toString"),e.toString=r}(p||(e.Trace=p={})),(y=h||(e.TraceFormat=h={})).Text="text",y.JSON="json",function(e){function t(t){return i.string(t)&&"json"===(t=t.toLowerCase())?e.JSON:e.Text}Ge(t,"fromString"),e.fromString=t}(h||(e.TraceFormat=h={})),(g||(e.SetTraceNotification=g={})).type=new s.NotificationType("$/setTrace"),(T||(e.LogTraceNotification=T={})).type=new s.NotificationType("$/logTrace"),($=v||(e.ConnectionErrors=v={}))[$.Closed=1]="Closed",$[$.Disposed=2]="Disposed",$[$.AlreadyListening=3]="AlreadyListening";var E,b,A,C,S,k,x,w,N,I,_=class e extends Error{static{Ge(this,"ConnectionError")}constructor(t,r){super(r),this.code=t,Object.setPrototypeOf(this,e.prototype)}};function P(d,f,m,y){const $=void 0!==m?m:e.NullLogger;let R=0,E=0,A=0;const C="2.0";let S;const w=new Map;let I;const P=new Map,O=new Map;let D,L,M=new o.LinkedMap,j=new Map,F=new Set,G=new Map,z=p.Off,K=h.Text,q=N.New;const U=new l.Emitter,B=new l.Emitter,W=new l.Emitter,V=new l.Emitter,H=new l.Emitter,Y=y&&y.cancellationStrategy?y.cancellationStrategy:k.Message;function Q(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function Z(e){return null===e?"res-unknown-"+(++A).toString():"res-"+e.toString()}function X(){return"not-"+(++E).toString()}function J(e,t){s.Message.isRequest(t)?e.set(Q(t.id),t):s.Message.isResponse(t)?e.set(Z(t.id),t):e.set(X(),t)}function ee(e){}function te(){return q===N.Listening}function re(){return q===N.Closed}function ne(){return q===N.Disposed}function ae(){q!==N.New&&q!==N.Listening||(q=N.Closed,B.fire(void 0))}function ie(e){U.fire([e,void 0,void 0])}function se(e){U.fire(e)}function oe(){D||0===M.size||(D=(0,a.default)().timer.setImmediate(()=>{D=void 0,ue()}))}function le(e){s.Message.isRequest(e)?pe(e):s.Message.isNotification(e)?fe(e):s.Message.isResponse(e)?de(e):me(e)}function ue(){if(0===M.size)return;const e=M.shift();try{const t=y?.messageStrategy;x.is(t)?t.handleMessage(e,le):le(e)}finally{oe()}}Ge(Q,"createRequestQueueKey"),Ge(Z,"createResponseQueueKey"),Ge(X,"createNotificationQueueKey"),Ge(J,"addMessageToQueue"),Ge(ee,"cancelUndispatched"),Ge(te,"isListening"),Ge(re,"isClosed"),Ge(ne,"isDisposed"),Ge(ae,"closeHandler"),Ge(ie,"readErrorHandler"),Ge(se,"writeErrorHandler"),d.onClose(ae),d.onError(ie),f.onClose(ae),f.onError(se),Ge(oe,"triggerMessageQueue"),Ge(le,"handleMessage"),Ge(ue,"processMessageQueue");const ce=Ge(e=>{try{if(s.Message.isNotification(e)&&e.method===t.type.method){const t=e.params.id,r=Q(t),n=M.get(r);if(s.Message.isRequest(n)){const a=y?.connectionStrategy,i=a&&a.cancelUndispatched?a.cancelUndispatched(n,ee):void 0;if(i&&(void 0!==i.error||void 0!==i.result))return M.delete(r),G.delete(t),i.id=n.id,Te(i,e.method,Date.now()),void f.write(i).catch(()=>$.error("Sending response for canceled message failed."))}const a=G.get(t);if(void 0!==a)return a.cancel(),void $e(e);F.add(t)}J(M,e)}finally{oe()}},"callback");function pe(e){if(ne())return;function t(t,r,n){const a={jsonrpc:C,id:e.id};t instanceof s.ResponseError?a.error=t.toJson():a.result=void 0===t?null:t,Te(a,r,n),f.write(a).catch(()=>$.error("Sending response failed."))}function r(t,r,n){const a={jsonrpc:C,id:e.id,error:t.toJson()};Te(a,r,n),f.write(a).catch(()=>$.error("Sending response failed."))}function n(t,r,n){void 0===t&&(t=null);const a={jsonrpc:C,id:e.id,result:t};Te(a,r,n),f.write(a).catch(()=>$.error("Sending response failed."))}Ge(t,"reply"),Ge(r,"replyError"),Ge(n,"replySuccess"),ve(e);const a=w.get(e.method);let o,l;a&&(o=a.type,l=a.handler);const u=Date.now();if(l||S){const a=e.id??String(Date.now()),p=b.is(Y.receiver)?Y.receiver.createCancellationTokenSource(a):Y.receiver.createCancellationTokenSource(e);null!==e.id&&F.has(e.id)&&p.cancel(),null!==e.id&&G.set(a,p);try{let c;if(l)if(void 0===e.params){if(void 0!==o&&0!==o.numberOfParams)return void r(new s.ResponseError(s.ErrorCodes.InvalidParams,`Request ${e.method} defines ${o.numberOfParams} params but received none.`),e.method,u);c=l(p.token)}else if(Array.isArray(e.params)){if(void 0!==o&&o.parameterStructures===s.ParameterStructures.byName)return void r(new s.ResponseError(s.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,u);c=l(...e.params,p.token)}else{if(void 0!==o&&o.parameterStructures===s.ParameterStructures.byPosition)return void r(new s.ResponseError(s.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,u);c=l(e.params,p.token)}else S&&(c=S(e.method,e.params,p.token));const d=c;c?d.then?d.then(r=>{G.delete(a),t(r,e.method,u)},t=>{G.delete(a),t instanceof s.ResponseError?r(t,e.method,u):t&&i.string(t.message)?r(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,u):r(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}):(G.delete(a),t(c,e.method,u)):(G.delete(a),n(c,e.method,u))}catch(c){G.delete(a),c instanceof s.ResponseError?t(c,e.method,u):c&&i.string(c.message)?r(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${c.message}`),e.method,u):r(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}}else r(new s.ResponseError(s.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,u)}function de(e){if(!ne())if(null===e.id)e.error?$.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):$.error("Received response message without id. No further error information provided.");else{const r=e.id,n=j.get(r);if(Re(e,n),void 0!==n){j.delete(r);try{if(e.error){const t=e.error;n.reject(new s.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");n.resolve(e.result)}}catch(t){t.message?$.error(`Response handler '${n.method}' failed with message: ${t.message}`):$.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}function fe(e){if(ne())return;let a,i;if(e.method===t.type.method){const t=e.params.id;return F.delete(t),void $e(e)}{const t=P.get(e.method);t&&(i=t.handler,a=t.type)}if(i||I)try{if($e(e),i)if(void 0===e.params)void 0!==a&&0!==a.numberOfParams&&a.parameterStructures!==s.ParameterStructures.byName&&$.error(`Notification ${e.method} defines ${a.numberOfParams} params but received none.`),i();else if(Array.isArray(e.params)){const t=e.params;e.method===n.type.method&&2===t.length&&r.is(t[0])?i({token:t[0],value:t[1]}):(void 0!==a&&(a.parameterStructures===s.ParameterStructures.byName&&$.error(`Notification ${e.method} defines parameters by name but received parameters by position`),a.numberOfParams!==e.params.length&&$.error(`Notification ${e.method} defines ${a.numberOfParams} params but received ${t.length} arguments`)),i(...t))}else void 0!==a&&a.parameterStructures===s.ParameterStructures.byPosition&&$.error(`Notification ${e.method} defines parameters by position but received parameters by name`),i(e.params);else I&&I(e.method,e.params)}catch(o){o.message?$.error(`Notification handler '${e.method}' failed with message: ${o.message}`):$.error(`Notification handler '${e.method}' failed unexpectedly.`)}else W.fire(e)}function me(e){if(!e)return void $.error("Received empty message.");$.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);const t=e;if(i.string(t.id)||i.number(t.id)){const e=t.id,r=j.get(e);r&&r.reject(new Error("The received response has neither a result nor an error property."))}}function he(e){if(null!=e)switch(z){case p.Verbose:return JSON.stringify(e,null,4);case p.Compact:return JSON.stringify(e);default:return}}function ye(e){if(z!==p.Off&&L)if(K===h.Text){let t;z!==p.Verbose&&z!==p.Compact||!e.params||(t=`Params: ${he(e.params)}\n\n`),L.log(`Sending request '${e.method} - (${e.id})'.`,t)}else Ee("send-request",e)}function ge(e){if(z!==p.Off&&L)if(K===h.Text){let t;z!==p.Verbose&&z!==p.Compact||(t=e.params?`Params: ${he(e.params)}\n\n`:"No parameters provided.\n\n"),L.log(`Sending notification '${e.method}'.`,t)}else Ee("send-notification",e)}function Te(e,t,r){if(z!==p.Off&&L)if(K===h.Text){let n;z!==p.Verbose&&z!==p.Compact||(e.error&&e.error.data?n=`Error data: ${he(e.error.data)}\n\n`:e.result?n=`Result: ${he(e.result)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),L.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-r}ms`,n)}else Ee("send-response",e)}function ve(e){if(z!==p.Off&&L)if(K===h.Text){let t;z!==p.Verbose&&z!==p.Compact||!e.params||(t=`Params: ${he(e.params)}\n\n`),L.log(`Received request '${e.method} - (${e.id})'.`,t)}else Ee("receive-request",e)}function $e(e){if(z!==p.Off&&L&&e.method!==T.type.method)if(K===h.Text){let t;z!==p.Verbose&&z!==p.Compact||(t=e.params?`Params: ${he(e.params)}\n\n`:"No parameters provided.\n\n"),L.log(`Received notification '${e.method}'.`,t)}else Ee("receive-notification",e)}function Re(e,t){if(z!==p.Off&&L)if(K===h.Text){let r;if(z!==p.Verbose&&z!==p.Compact||(e.error&&e.error.data?r=`Error data: ${he(e.error.data)}\n\n`:e.result?r=`Result: ${he(e.result)}\n\n`:void 0===e.error&&(r="No result returned.\n\n")),t){const n=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";L.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${n}`,r)}else L.log(`Received response ${e.id} without active response promise.`,r)}else Ee("receive-response",e)}function Ee(e,t){if(!L||z===p.Off)return;const r={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};L.log(r)}function be(){if(re())throw new _(v.Closed,"Connection is closed.");if(ne())throw new _(v.Disposed,"Connection is disposed.")}function Ae(){if(te())throw new _(v.AlreadyListening,"Connection is already listening")}function Ce(){if(!te())throw new Error("Call listen() first.")}function Se(e){return void 0===e?null:e}function ke(e){return null===e?void 0:e}function xe(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function we(e,t){switch(e){case s.ParameterStructures.auto:return xe(t)?ke(t):[Se(t)];case s.ParameterStructures.byName:if(!xe(t))throw new Error("Received parameters by name but param is not an object literal.");return ke(t);case s.ParameterStructures.byPosition:return[Se(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function Ne(e,t){let r;const n=e.numberOfParams;switch(n){case 0:r=void 0;break;case 1:r=we(e.parameterStructures,t[0]);break;default:r=[];for(let e=0;e{let r,n;if(be(),i.string(e)){r=e;const a=t[0];let i=0,o=s.ParameterStructures.auto;s.ParameterStructures.is(a)&&(i=1,o=a);let l=t.length;const u=l-i;switch(u){case 0:n=void 0;break;case 1:n=we(o,t[i]);break;default:if(o===s.ParameterStructures.byName)throw new Error(`Received ${u} parameters for 'by Name' notification parameter structure.`);n=t.slice(i,l).map(e=>Se(e))}}else{const a=t;r=e.method,n=Ne(e,a)}const a={jsonrpc:C,method:r,params:n};return ge(a),f.write(a).catch(e=>{throw $.error("Sending notification failed."),e})},"sendNotification"),onNotification:Ge((e,t)=>{let r;return be(),i.func(e)?I=e:t&&(i.string(e)?(r=e,P.set(e,{type:void 0,handler:t})):(r=e.method,P.set(e.method,{type:e,handler:t}))),{dispose:Ge(()=>{void 0!==r?P.delete(r):I=void 0},"dispose")}},"onNotification"),onProgress:Ge((e,t,r)=>{if(O.has(t))throw new Error(`Progress handler for token ${t} already registered`);return O.set(t,r),{dispose:Ge(()=>{O.delete(t)},"dispose")}},"onProgress"),sendProgress:Ge((e,t,r)=>Ie.sendNotification(n.type,{token:t,value:r}),"sendProgress"),onUnhandledProgress:V.event,sendRequest:Ge((e,...t)=>{let r,n,a;if(be(),Ce(),i.string(e)){r=e;const i=t[0],o=t[t.length-1];let l=0,c=s.ParameterStructures.auto;s.ParameterStructures.is(i)&&(l=1,c=i);let p=t.length;u.CancellationToken.is(o)&&(p-=1,a=o);const d=p-l;switch(d){case 0:n=void 0;break;case 1:n=we(c,t[l]);break;default:if(c===s.ParameterStructures.byName)throw new Error(`Received ${d} parameters for 'by Name' request parameter structure.`);n=t.slice(l,p).map(e=>Se(e))}}else{const i=t;r=e.method,n=Ne(e,i);const s=e.numberOfParams;a=u.CancellationToken.is(i[s])?i[s]:void 0}const o=R++;let l;a&&(l=a.onCancellationRequested(()=>{const e=Y.sender.sendCancellation(Ie,o);return void 0===e?($.log(`Received no promise from cancellation strategy when cancelling id ${o}`),Promise.resolve()):e.catch(()=>{$.log(`Sending cancellation messages for id ${o} failed`)})}));const c={jsonrpc:C,id:o,method:r,params:n};return ye(c),"function"==typeof Y.sender.enableCancellation&&Y.sender.enableCancellation(c),new Promise(async(e,t)=>{const n=Ge(t=>{e(t),Y.sender.cleanup(o),l?.dispose()},"resolveWithCleanup"),a=Ge(e=>{t(e),Y.sender.cleanup(o),l?.dispose()},"rejectWithCleanup"),i={method:r,timerStart:Date.now(),resolve:n,reject:a};try{await f.write(c),j.set(o,i)}catch(u){throw $.error("Sending request failed."),i.reject(new s.ResponseError(s.ErrorCodes.MessageWriteError,u.message?u.message:"Unknown reason")),u}})},"sendRequest"),onRequest:Ge((e,t)=>{be();let r=null;return c.is(e)?(r=void 0,S=e):i.string(e)?(r=null,void 0!==t&&(r=e,w.set(e,{handler:t,type:void 0}))):void 0!==t&&(r=e.method,w.set(e.method,{type:e,handler:t})),{dispose:Ge(()=>{null!==r&&(void 0!==r?w.delete(r):S=void 0)},"dispose")}},"onRequest"),hasPendingResponse:Ge(()=>j.size>0,"hasPendingResponse"),trace:Ge(async(e,t,r)=>{let n=!1,a=h.Text;void 0!==r&&(i.boolean(r)?n=r:(n=r.sendNotification||!1,a=r.traceFormat||h.Text)),z=e,K=a,L=z===p.Off?void 0:t,!n||re()||ne()||await Ie.sendNotification(g.type,{value:p.toString(e)})},"trace"),onError:U.event,onClose:B.event,onUnhandledNotification:W.event,onDispose:H.event,end:Ge(()=>{f.end()},"end"),dispose:Ge(()=>{if(ne())return;q=N.Disposed,H.fire(void 0);const e=new s.ResponseError(s.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const t of j.values())t.reject(e);j=new Map,G=new Map,F=new Set,M=new o.LinkedMap,i.func(f.dispose)&&f.dispose(),i.func(d.dispose)&&d.dispose()},"dispose"),listen:Ge(()=>{be(),Ae(),q=N.Listening,d.listen(ce)},"listen"),inspect:Ge(()=>{(0,a.default)().console.log("inspect")},"inspect")};return Ie.onNotification(T.type,e=>{if(z===p.Off||!L)return;const t=z===p.Verbose||z===p.Compact;L.log(e.message,t?e.verbose:void 0)}),Ie.onNotification(n.type,e=>{const t=O.get(e.token);t?t(e.value):V.fire(e)}),Ie}e.ConnectionError=_,function(e){function t(e){const t=e;return t&&i.func(t.cancelUndispatched)}Ge(t,"is"),e.is=t}(E||(e.ConnectionStrategy=E={})),function(e){function t(e){const t=e;return t&&(void 0===t.kind||"id"===t.kind)&&i.func(t.createCancellationTokenSource)&&(void 0===t.dispose||i.func(t.dispose))}Ge(t,"is"),e.is=t}(b||(e.IdCancellationReceiverStrategy=b={})),function(e){function t(e){const t=e;return t&&"request"===t.kind&&i.func(t.createCancellationTokenSource)&&(void 0===t.dispose||i.func(t.dispose))}Ge(t,"is"),e.is=t}(A||(e.RequestCancellationReceiverStrategy=A={})),function(e){function t(e){return b.is(e)||A.is(e)}e.Message=Object.freeze({createCancellationTokenSource:e=>new u.CancellationTokenSource}),Ge(t,"is"),e.is=t}(C||(e.CancellationReceiverStrategy=C={})),function(e){function r(e){const t=e;return t&&i.func(t.sendCancellation)&&i.func(t.cleanup)}e.Message=Object.freeze({sendCancellation:(e,r)=>e.sendNotification(t.type,{id:r}),cleanup(e){}}),Ge(r,"is"),e.is=r}(S||(e.CancellationSenderStrategy=S={})),function(e){function t(e){const t=e;return t&&C.is(t.receiver)&&S.is(t.sender)}e.Message=Object.freeze({receiver:C.Message,sender:S.Message}),Ge(t,"is"),e.is=t}(k||(e.CancellationStrategy=k={})),function(e){function t(e){const t=e;return t&&i.func(t.handleMessage)}Ge(t,"is"),e.is=t}(x||(e.MessageStrategy=x={})),function(e){function t(e){const t=e;return t&&(k.is(t.cancellationStrategy)||E.is(t.connectionStrategy)||x.is(t.messageStrategy))}Ge(t,"is"),e.is=t}(w||(e.ConnectionOptions=w={})),(I=N||(N={}))[I.New=1]="New",I[I.Listening=2]="Listening",I[I.Closed=3]="Closed",I[I.Disposed=4]="Disposed",Ge(P,"createMessageConnection"),e.createMessageConnection=P}}),ct=ze({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/api.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressType=e.ProgressToken=e.createMessageConnection=e.NullLogger=e.ConnectionOptions=e.ConnectionStrategy=e.AbstractMessageBuffer=e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=e.CancellationToken=e.CancellationTokenSource=e.Emitter=e.Event=e.Disposable=e.LRUCache=e.Touch=e.LinkedMap=e.ParameterStructures=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.ErrorCodes=e.ResponseError=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType0=e.RequestType=e.Message=e.RAL=void 0,e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=void 0;var t=tt();Object.defineProperty(e,"Message",{enumerable:!0,get:Ge(function(){return t.Message},"get")}),Object.defineProperty(e,"RequestType",{enumerable:!0,get:Ge(function(){return t.RequestType},"get")}),Object.defineProperty(e,"RequestType0",{enumerable:!0,get:Ge(function(){return t.RequestType0},"get")}),Object.defineProperty(e,"RequestType1",{enumerable:!0,get:Ge(function(){return t.RequestType1},"get")}),Object.defineProperty(e,"RequestType2",{enumerable:!0,get:Ge(function(){return t.RequestType2},"get")}),Object.defineProperty(e,"RequestType3",{enumerable:!0,get:Ge(function(){return t.RequestType3},"get")}),Object.defineProperty(e,"RequestType4",{enumerable:!0,get:Ge(function(){return t.RequestType4},"get")}),Object.defineProperty(e,"RequestType5",{enumerable:!0,get:Ge(function(){return t.RequestType5},"get")}),Object.defineProperty(e,"RequestType6",{enumerable:!0,get:Ge(function(){return t.RequestType6},"get")}),Object.defineProperty(e,"RequestType7",{enumerable:!0,get:Ge(function(){return t.RequestType7},"get")}),Object.defineProperty(e,"RequestType8",{enumerable:!0,get:Ge(function(){return t.RequestType8},"get")}),Object.defineProperty(e,"RequestType9",{enumerable:!0,get:Ge(function(){return t.RequestType9},"get")}),Object.defineProperty(e,"ResponseError",{enumerable:!0,get:Ge(function(){return t.ResponseError},"get")}),Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:Ge(function(){return t.ErrorCodes},"get")}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:Ge(function(){return t.NotificationType},"get")}),Object.defineProperty(e,"NotificationType0",{enumerable:!0,get:Ge(function(){return t.NotificationType0},"get")}),Object.defineProperty(e,"NotificationType1",{enumerable:!0,get:Ge(function(){return t.NotificationType1},"get")}),Object.defineProperty(e,"NotificationType2",{enumerable:!0,get:Ge(function(){return t.NotificationType2},"get")}),Object.defineProperty(e,"NotificationType3",{enumerable:!0,get:Ge(function(){return t.NotificationType3},"get")}),Object.defineProperty(e,"NotificationType4",{enumerable:!0,get:Ge(function(){return t.NotificationType4},"get")}),Object.defineProperty(e,"NotificationType5",{enumerable:!0,get:Ge(function(){return t.NotificationType5},"get")}),Object.defineProperty(e,"NotificationType6",{enumerable:!0,get:Ge(function(){return t.NotificationType6},"get")}),Object.defineProperty(e,"NotificationType7",{enumerable:!0,get:Ge(function(){return t.NotificationType7},"get")}),Object.defineProperty(e,"NotificationType8",{enumerable:!0,get:Ge(function(){return t.NotificationType8},"get")}),Object.defineProperty(e,"NotificationType9",{enumerable:!0,get:Ge(function(){return t.NotificationType9},"get")}),Object.defineProperty(e,"ParameterStructures",{enumerable:!0,get:Ge(function(){return t.ParameterStructures},"get")});var r=rt();Object.defineProperty(e,"LinkedMap",{enumerable:!0,get:Ge(function(){return r.LinkedMap},"get")}),Object.defineProperty(e,"LRUCache",{enumerable:!0,get:Ge(function(){return r.LRUCache},"get")}),Object.defineProperty(e,"Touch",{enumerable:!0,get:Ge(function(){return r.Touch},"get")});var n=nt();Object.defineProperty(e,"Disposable",{enumerable:!0,get:Ge(function(){return n.Disposable},"get")});var a=Je();Object.defineProperty(e,"Event",{enumerable:!0,get:Ge(function(){return a.Event},"get")}),Object.defineProperty(e,"Emitter",{enumerable:!0,get:Ge(function(){return a.Emitter},"get")});var i=et();Object.defineProperty(e,"CancellationTokenSource",{enumerable:!0,get:Ge(function(){return i.CancellationTokenSource},"get")}),Object.defineProperty(e,"CancellationToken",{enumerable:!0,get:Ge(function(){return i.CancellationToken},"get")});var s=at();Object.defineProperty(e,"SharedArraySenderStrategy",{enumerable:!0,get:Ge(function(){return s.SharedArraySenderStrategy},"get")}),Object.defineProperty(e,"SharedArrayReceiverStrategy",{enumerable:!0,get:Ge(function(){return s.SharedArrayReceiverStrategy},"get")});var o=st();Object.defineProperty(e,"MessageReader",{enumerable:!0,get:Ge(function(){return o.MessageReader},"get")}),Object.defineProperty(e,"AbstractMessageReader",{enumerable:!0,get:Ge(function(){return o.AbstractMessageReader},"get")}),Object.defineProperty(e,"ReadableStreamMessageReader",{enumerable:!0,get:Ge(function(){return o.ReadableStreamMessageReader},"get")});var l=ot();Object.defineProperty(e,"MessageWriter",{enumerable:!0,get:Ge(function(){return l.MessageWriter},"get")}),Object.defineProperty(e,"AbstractMessageWriter",{enumerable:!0,get:Ge(function(){return l.AbstractMessageWriter},"get")}),Object.defineProperty(e,"WriteableStreamMessageWriter",{enumerable:!0,get:Ge(function(){return l.WriteableStreamMessageWriter},"get")});var u=lt();Object.defineProperty(e,"AbstractMessageBuffer",{enumerable:!0,get:Ge(function(){return u.AbstractMessageBuffer},"get")});var c=ut();Object.defineProperty(e,"ConnectionStrategy",{enumerable:!0,get:Ge(function(){return c.ConnectionStrategy},"get")}),Object.defineProperty(e,"ConnectionOptions",{enumerable:!0,get:Ge(function(){return c.ConnectionOptions},"get")}),Object.defineProperty(e,"NullLogger",{enumerable:!0,get:Ge(function(){return c.NullLogger},"get")}),Object.defineProperty(e,"createMessageConnection",{enumerable:!0,get:Ge(function(){return c.createMessageConnection},"get")}),Object.defineProperty(e,"ProgressToken",{enumerable:!0,get:Ge(function(){return c.ProgressToken},"get")}),Object.defineProperty(e,"ProgressType",{enumerable:!0,get:Ge(function(){return c.ProgressType},"get")}),Object.defineProperty(e,"Trace",{enumerable:!0,get:Ge(function(){return c.Trace},"get")}),Object.defineProperty(e,"TraceValues",{enumerable:!0,get:Ge(function(){return c.TraceValues},"get")}),Object.defineProperty(e,"TraceFormat",{enumerable:!0,get:Ge(function(){return c.TraceFormat},"get")}),Object.defineProperty(e,"SetTraceNotification",{enumerable:!0,get:Ge(function(){return c.SetTraceNotification},"get")}),Object.defineProperty(e,"LogTraceNotification",{enumerable:!0,get:Ge(function(){return c.LogTraceNotification},"get")}),Object.defineProperty(e,"ConnectionErrors",{enumerable:!0,get:Ge(function(){return c.ConnectionErrors},"get")}),Object.defineProperty(e,"ConnectionError",{enumerable:!0,get:Ge(function(){return c.ConnectionError},"get")}),Object.defineProperty(e,"CancellationReceiverStrategy",{enumerable:!0,get:Ge(function(){return c.CancellationReceiverStrategy},"get")}),Object.defineProperty(e,"CancellationSenderStrategy",{enumerable:!0,get:Ge(function(){return c.CancellationSenderStrategy},"get")}),Object.defineProperty(e,"CancellationStrategy",{enumerable:!0,get:Ge(function(){return c.CancellationStrategy},"get")}),Object.defineProperty(e,"MessageStrategy",{enumerable:!0,get:Ge(function(){return c.MessageStrategy},"get")});var p=Ze();e.RAL=p.default}}),pt=ze({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/ril.js"(e){Object.defineProperty(e,"__esModule",{value:!0});var t=ct(),r=class e extends t.AbstractMessageBuffer{static{Ge(this,"MessageBuffer")}constructor(e="utf-8"){super(e),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return e.emptyBuffer}fromString(e,t){return(new TextEncoder).encode(e)}toString(e,t){return"ascii"===t?this.asciiDecoder.decode(e):new TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e:e.slice(0,t)}allocNative(e){return new Uint8Array(e)}};r.emptyBuffer=new Uint8Array(0);var n=class{static{Ge(this,"ReadableStreamWrapper")}constructor(e){this.socket=e,this._onData=new t.Emitter,this._messageListener=e=>{e.data.arrayBuffer().then(e=>{this._onData.fire(new Uint8Array(e))},()=>{(0,t.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(e){return this.socket.addEventListener("close",e),t.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),t.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),t.Disposable.create(()=>this.socket.removeEventListener("end",e))}onData(e){return this._onData.event(e)}},a=class{static{Ge(this,"WritableStreamWrapper")}constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener("close",e),t.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),t.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),t.Disposable.create(()=>this.socket.removeEventListener("end",e))}write(e,t){if("string"==typeof e){if(void 0!==t&&"utf-8"!==t)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t}`);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}},i=new TextEncoder,s=Object.freeze({messageBuffer:Object.freeze({create:Ge(e=>new r(e),"create")}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:Ge((e,t)=>{if("utf-8"!==t.charset)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t.charset}`);return Promise.resolve(i.encode(JSON.stringify(e,void 0,0)))},"encode")}),decoder:Object.freeze({name:"application/json",decode:Ge((e,t)=>{if(!(e instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))},"decode")})}),stream:Object.freeze({asReadableStream:Ge(e=>new n(e),"asReadableStream"),asWritableStream:Ge(e=>new a(e),"asWritableStream")}),console:console,timer:Object.freeze({setTimeout(e,t,...r){const n=setTimeout(e,t,...r);return{dispose:Ge(()=>clearTimeout(n),"dispose")}},setImmediate(e,...t){const r=setTimeout(e,0,...t);return{dispose:Ge(()=>clearTimeout(r),"dispose")}},setInterval(e,t,...r){const n=setInterval(e,t,...r);return{dispose:Ge(()=>clearInterval(n),"dispose")}}})});function o(){return s}Ge(o,"RIL"),function(e){function r(){t.RAL.install(s)}Ge(r,"install"),e.install=r}(o||(o={})),e.default=o}}),dt=ze({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/main.js"(e){var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:Ge(function(){return t[r]},"get")}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.BrowserMessageWriter=e.BrowserMessageReader=void 0,pt().default.install();var n=ct();r(ct(),e);var a=class extends n.AbstractMessageReader{static{Ge(this,"BrowserMessageReader")}constructor(e){super(),this._onData=new n.Emitter,this._messageListener=e=>{this._onData.fire(e.data)},e.addEventListener("error",e=>this.fireError(e)),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}};e.BrowserMessageReader=a;var i=class extends n.AbstractMessageWriter{static{Ge(this,"BrowserMessageWriter")}constructor(e){super(),this.port=e,this.errorCount=0,e.addEventListener("error",e=>this.fireError(e))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}};function s(e,t,r,a){return void 0===r&&(r=n.NullLogger),n.ConnectionStrategy.is(a)&&(a={connectionStrategy:a}),(0,n.createMessageConnection)(e,t,r,a)}e.BrowserMessageWriter=i,Ge(s,"createMessageConnection"),e.createMessageConnection=s}}),ft=ze({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/browser.js"(e,t){t.exports=dt()}}),mt=ze({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/messages.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProtocolNotificationType=e.ProtocolNotificationType0=e.ProtocolRequestType=e.ProtocolRequestType0=e.RegistrationType=e.MessageDirection=void 0;var t,r,n=dt();(r=t||(e.MessageDirection=t={})).clientToServer="clientToServer",r.serverToClient="serverToClient",r.both="both";var a=class{static{Ge(this,"RegistrationType")}constructor(e){this.method=e}};e.RegistrationType=a;var i=class extends n.RequestType0{static{Ge(this,"ProtocolRequestType0")}constructor(e){super(e)}};e.ProtocolRequestType0=i;var s=class extends n.RequestType{static{Ge(this,"ProtocolRequestType")}constructor(e){super(e,n.ParameterStructures.byName)}};e.ProtocolRequestType=s;var o=class extends n.NotificationType0{static{Ge(this,"ProtocolNotificationType0")}constructor(e){super(e)}};e.ProtocolNotificationType0=o;var l=class extends n.NotificationType{static{Ge(this,"ProtocolNotificationType")}constructor(e){super(e,n.ParameterStructures.byName)}};e.ProtocolNotificationType=l}}),ht=ze({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js"(e){function t(e){return!0===e||!1===e}function r(e){return"string"==typeof e||e instanceof String}function n(e){return"number"==typeof e||e instanceof Number}function a(e){return e instanceof Error}function i(e){return"function"==typeof e}function s(e){return Array.isArray(e)}function o(e){return s(e)&&e.every(e=>r(e))}function l(e,t){return Array.isArray(e)&&e.every(t)}function u(e){return null!==e&&"object"==typeof e}Object.defineProperty(e,"__esModule",{value:!0}),e.objectLiteral=e.typedArray=e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0,Ge(t,"boolean"),e.boolean=t,Ge(r,"string"),e.string=r,Ge(n,"number"),e.number=n,Ge(a,"error"),e.error=a,Ge(i,"func"),e.func=i,Ge(s,"array"),e.array=s,Ge(o,"stringArray"),e.stringArray=o,Ge(l,"typedArray"),e.typedArray=l,Ge(u,"objectLiteral"),e.objectLiteral=u}}),yt=ze({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationRequest=void 0;var t,r,n=mt();(r=t||(e.ImplementationRequest=t={})).method="textDocument/implementation",r.messageDirection=n.MessageDirection.clientToServer,r.type=new n.ProtocolRequestType(r.method)}}),gt=ze({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TypeDefinitionRequest=void 0;var t,r,n=mt();(r=t||(e.TypeDefinitionRequest=t={})).method="textDocument/typeDefinition",r.messageDirection=n.MessageDirection.clientToServer,r.type=new n.ProtocolRequestType(r.method)}}),Tt=ze({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=void 0;var t,r,n,a,i=mt();(r=t||(e.WorkspaceFoldersRequest=t={})).method="workspace/workspaceFolders",r.messageDirection=i.MessageDirection.serverToClient,r.type=new i.ProtocolRequestType0(r.method),(a=n||(e.DidChangeWorkspaceFoldersNotification=n={})).method="workspace/didChangeWorkspaceFolders",a.messageDirection=i.MessageDirection.clientToServer,a.type=new i.ProtocolNotificationType(a.method)}}),vt=ze({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationRequest=void 0;var t,r,n=mt();(r=t||(e.ConfigurationRequest=t={})).method="workspace/configuration",r.messageDirection=n.MessageDirection.serverToClient,r.type=new n.ProtocolRequestType(r.method)}}),$t=ze({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPresentationRequest=e.DocumentColorRequest=void 0;var t,r,n,a,i=mt();(r=t||(e.DocumentColorRequest=t={})).method="textDocument/documentColor",r.messageDirection=i.MessageDirection.clientToServer,r.type=new i.ProtocolRequestType(r.method),(a=n||(e.ColorPresentationRequest=n={})).method="textDocument/colorPresentation",a.messageDirection=i.MessageDirection.clientToServer,a.type=new i.ProtocolRequestType(a.method)}}),Rt=ze({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=void 0;var t,r,n,a,i=mt();(r=t||(e.FoldingRangeRequest=t={})).method="textDocument/foldingRange",r.messageDirection=i.MessageDirection.clientToServer,r.type=new i.ProtocolRequestType(r.method),(a=n||(e.FoldingRangeRefreshRequest=n={})).method="workspace/foldingRange/refresh",a.messageDirection=i.MessageDirection.serverToClient,a.type=new i.ProtocolRequestType0(a.method)}}),Et=ze({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeclarationRequest=void 0;var t,r,n=mt();(r=t||(e.DeclarationRequest=t={})).method="textDocument/declaration",r.messageDirection=n.MessageDirection.clientToServer,r.type=new n.ProtocolRequestType(r.method)}}),bt=ze({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionRangeRequest=void 0;var t,r,n=mt();(r=t||(e.SelectionRangeRequest=t={})).method="textDocument/selectionRange",r.messageDirection=n.MessageDirection.clientToServer,r.type=new n.ProtocolRequestType(r.method)}}),At=ze({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=void 0;var t,r,n,a,i,s=dt(),o=mt();!function(e){function t(t){return t===e.type}e.type=new s.ProgressType,Ge(t,"is"),e.is=t}(t||(e.WorkDoneProgress=t={})),(n=r||(e.WorkDoneProgressCreateRequest=r={})).method="window/workDoneProgress/create",n.messageDirection=o.MessageDirection.serverToClient,n.type=new o.ProtocolRequestType(n.method),(i=a||(e.WorkDoneProgressCancelNotification=a={})).method="window/workDoneProgress/cancel",i.messageDirection=o.MessageDirection.clientToServer,i.type=new o.ProtocolNotificationType(i.method)}}),Ct=ze({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.CallHierarchyPrepareRequest=void 0;var t,r,n,a,i,s,o=mt();(r=t||(e.CallHierarchyPrepareRequest=t={})).method="textDocument/prepareCallHierarchy",r.messageDirection=o.MessageDirection.clientToServer,r.type=new o.ProtocolRequestType(r.method),(a=n||(e.CallHierarchyIncomingCallsRequest=n={})).method="callHierarchy/incomingCalls",a.messageDirection=o.MessageDirection.clientToServer,a.type=new o.ProtocolRequestType(a.method),(s=i||(e.CallHierarchyOutgoingCallsRequest=i={})).method="callHierarchy/outgoingCalls",s.messageDirection=o.MessageDirection.clientToServer,s.type=new o.ProtocolRequestType(s.method)}}),St=ze({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.SemanticTokensRegistrationType=e.TokenFormat=void 0;var t,r,n,a,i,s,o,l,u,c,p,d=mt();(t||(e.TokenFormat=t={})).Relative="relative",(n=r||(e.SemanticTokensRegistrationType=r={})).method="textDocument/semanticTokens",n.type=new d.RegistrationType(n.method),(i=a||(e.SemanticTokensRequest=a={})).method="textDocument/semanticTokens/full",i.messageDirection=d.MessageDirection.clientToServer,i.type=new d.ProtocolRequestType(i.method),i.registrationMethod=r.method,(o=s||(e.SemanticTokensDeltaRequest=s={})).method="textDocument/semanticTokens/full/delta",o.messageDirection=d.MessageDirection.clientToServer,o.type=new d.ProtocolRequestType(o.method),o.registrationMethod=r.method,(u=l||(e.SemanticTokensRangeRequest=l={})).method="textDocument/semanticTokens/range",u.messageDirection=d.MessageDirection.clientToServer,u.type=new d.ProtocolRequestType(u.method),u.registrationMethod=r.method,(p=c||(e.SemanticTokensRefreshRequest=c={})).method="workspace/semanticTokens/refresh",p.messageDirection=d.MessageDirection.serverToClient,p.type=new d.ProtocolRequestType0(p.method)}}),kt=ze({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ShowDocumentRequest=void 0;var t,r,n=mt();(r=t||(e.ShowDocumentRequest=t={})).method="window/showDocument",r.messageDirection=n.MessageDirection.serverToClient,r.type=new n.ProtocolRequestType(r.method)}}),xt=ze({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedEditingRangeRequest=void 0;var t,r,n=mt();(r=t||(e.LinkedEditingRangeRequest=t={})).method="textDocument/linkedEditingRange",r.messageDirection=n.MessageDirection.clientToServer,r.type=new n.ProtocolRequestType(r.method)}}),wt=ze({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.DidRenameFilesNotification=e.WillRenameFilesRequest=e.DidCreateFilesNotification=e.WillCreateFilesRequest=e.FileOperationPatternKind=void 0;var t,r,n,a,i,s,o,l,u,c,p,d,f,m,h=mt();(r=t||(e.FileOperationPatternKind=t={})).file="file",r.folder="folder",(a=n||(e.WillCreateFilesRequest=n={})).method="workspace/willCreateFiles",a.messageDirection=h.MessageDirection.clientToServer,a.type=new h.ProtocolRequestType(a.method),(s=i||(e.DidCreateFilesNotification=i={})).method="workspace/didCreateFiles",s.messageDirection=h.MessageDirection.clientToServer,s.type=new h.ProtocolNotificationType(s.method),(l=o||(e.WillRenameFilesRequest=o={})).method="workspace/willRenameFiles",l.messageDirection=h.MessageDirection.clientToServer,l.type=new h.ProtocolRequestType(l.method),(c=u||(e.DidRenameFilesNotification=u={})).method="workspace/didRenameFiles",c.messageDirection=h.MessageDirection.clientToServer,c.type=new h.ProtocolNotificationType(c.method),(d=p||(e.DidDeleteFilesNotification=p={})).method="workspace/didDeleteFiles",d.messageDirection=h.MessageDirection.clientToServer,d.type=new h.ProtocolNotificationType(d.method),(m=f||(e.WillDeleteFilesRequest=f={})).method="workspace/willDeleteFiles",m.messageDirection=h.MessageDirection.clientToServer,m.type=new h.ProtocolRequestType(m.method)}}),Nt=ze({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=void 0;var t,r,n,a,i,s,o=mt();(r=t||(e.UniquenessLevel=t={})).document="document",r.project="project",r.group="group",r.scheme="scheme",r.global="global",(a=n||(e.MonikerKind=n={})).$import="import",a.$export="export",a.local="local",(s=i||(e.MonikerRequest=i={})).method="textDocument/moniker",s.messageDirection=o.MessageDirection.clientToServer,s.type=new o.ProtocolRequestType(s.method)}}),It=ze({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchySubtypesRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchyPrepareRequest=void 0;var t,r,n,a,i,s,o=mt();(r=t||(e.TypeHierarchyPrepareRequest=t={})).method="textDocument/prepareTypeHierarchy",r.messageDirection=o.MessageDirection.clientToServer,r.type=new o.ProtocolRequestType(r.method),(a=n||(e.TypeHierarchySupertypesRequest=n={})).method="typeHierarchy/supertypes",a.messageDirection=o.MessageDirection.clientToServer,a.type=new o.ProtocolRequestType(a.method),(s=i||(e.TypeHierarchySubtypesRequest=i={})).method="typeHierarchy/subtypes",s.messageDirection=o.MessageDirection.clientToServer,s.type=new o.ProtocolRequestType(s.method)}}),_t=ze({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InlineValueRefreshRequest=e.InlineValueRequest=void 0;var t,r,n,a,i=mt();(r=t||(e.InlineValueRequest=t={})).method="textDocument/inlineValue",r.messageDirection=i.MessageDirection.clientToServer,r.type=new i.ProtocolRequestType(r.method),(a=n||(e.InlineValueRefreshRequest=n={})).method="workspace/inlineValue/refresh",a.messageDirection=i.MessageDirection.serverToClient,a.type=new i.ProtocolRequestType0(a.method)}}),Pt=ze({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=void 0;var t,r,n,a,i,s,o=mt();(r=t||(e.InlayHintRequest=t={})).method="textDocument/inlayHint",r.messageDirection=o.MessageDirection.clientToServer,r.type=new o.ProtocolRequestType(r.method),(a=n||(e.InlayHintResolveRequest=n={})).method="inlayHint/resolve",a.messageDirection=o.MessageDirection.clientToServer,a.type=new o.ProtocolRequestType(a.method),(s=i||(e.InlayHintRefreshRequest=i={})).method="workspace/inlayHint/refresh",s.messageDirection=o.MessageDirection.serverToClient,s.type=new o.ProtocolRequestType0(s.method)}}),Ot=ze({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=void 0;var t,r,n,a,i,s,o,l,u,c=dt(),p=ht(),d=mt();!function(e){function t(e){const t=e;return t&&p.boolean(t.retriggerRequest)}Ge(t,"is"),e.is=t}(t||(e.DiagnosticServerCancellationData=t={})),(n=r||(e.DocumentDiagnosticReportKind=r={})).Full="full",n.Unchanged="unchanged",(i=a||(e.DocumentDiagnosticRequest=a={})).method="textDocument/diagnostic",i.messageDirection=d.MessageDirection.clientToServer,i.type=new d.ProtocolRequestType(i.method),i.partialResult=new c.ProgressType,(o=s||(e.WorkspaceDiagnosticRequest=s={})).method="workspace/diagnostic",o.messageDirection=d.MessageDirection.clientToServer,o.type=new d.ProtocolRequestType(o.method),o.partialResult=new c.ProgressType,(u=l||(e.DiagnosticRefreshRequest=l={})).method="workspace/diagnostic/refresh",u.messageDirection=d.MessageDirection.serverToClient,u.type=new d.ProtocolRequestType0(u.method)}}),Dt=ze({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=void 0;var t,r,n,a,i,s,o,l,u,c,p,d,f,m,h,y=(Qe(),We(Ve)),g=ht(),T=mt();!function(e){function t(e){return 1===e||2===e}e.Markup=1,e.Code=2,Ge(t,"is"),e.is=t}(t||(e.NotebookCellKind=t={})),function(e){function t(e,t){const r={executionOrder:e};return!0!==t&&!1!==t||(r.success=t),r}function r(e){const t=e;return g.objectLiteral(t)&&y.uinteger.is(t.executionOrder)&&(void 0===t.success||g.boolean(t.success))}function n(e,t){return e===t||null!=e&&null!=t&&(e.executionOrder===t.executionOrder&&e.success===t.success)}Ge(t,"create"),e.create=t,Ge(r,"is"),e.is=r,Ge(n,"equals"),e.equals=n}(r||(e.ExecutionSummary=r={})),function(e){function n(e,t){return{kind:e,document:t}}function a(e){const r=e;return g.objectLiteral(r)&&t.is(r.kind)&&y.DocumentUri.is(r.document)&&(void 0===r.metadata||g.objectLiteral(r.metadata))}function i(e,t){const n=new Set;return e.document!==t.document&&n.add("document"),e.kind!==t.kind&&n.add("kind"),e.executionSummary!==t.executionSummary&&n.add("executionSummary"),void 0===e.metadata&&void 0===t.metadata||s(e.metadata,t.metadata)||n.add("metadata"),void 0===e.executionSummary&&void 0===t.executionSummary||r.equals(e.executionSummary,t.executionSummary)||n.add("executionSummary"),n}function s(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;const r=Array.isArray(e),n=Array.isArray(t);if(r!==n)return!1;if(r&&n){if(e.length!==t.length)return!1;for(let r=0;r0}Ge(t,"hasId"),e.hasId=t}(j||(e.StaticRegistrationOptions=j={})),function(e){function t(e){const t=e;return t&&(null===t.documentSelector||k.is(t.documentSelector))}Ge(t,"is"),e.is=t}(F||(e.TextDocumentRegistrationOptions=F={})),function(e){function t(e){const t=e;return n.objectLiteral(t)&&(void 0===t.workDoneProgress||n.boolean(t.workDoneProgress))}function r(e){const t=e;return t&&n.boolean(t.workDoneProgress)}Ge(t,"is"),e.is=t,Ge(r,"hasWorkDoneProgress"),e.hasWorkDoneProgress=r}(G||(e.WorkDoneProgressOptions=G={})),(K=z||(e.InitializeRequest=z={})).method="initialize",K.messageDirection=t.MessageDirection.clientToServer,K.type=new t.ProtocolRequestType(K.method),(q||(e.InitializeErrorCodes=q={})).unknownProtocolVersion=1,(B=U||(e.InitializedNotification=U={})).method="initialized",B.messageDirection=t.MessageDirection.clientToServer,B.type=new t.ProtocolNotificationType(B.method),(V=W||(e.ShutdownRequest=W={})).method="shutdown",V.messageDirection=t.MessageDirection.clientToServer,V.type=new t.ProtocolRequestType0(V.method),(Y=H||(e.ExitNotification=H={})).method="exit",Y.messageDirection=t.MessageDirection.clientToServer,Y.type=new t.ProtocolNotificationType0(Y.method),(Z=Q||(e.DidChangeConfigurationNotification=Q={})).method="workspace/didChangeConfiguration",Z.messageDirection=t.MessageDirection.clientToServer,Z.type=new t.ProtocolNotificationType(Z.method),(J=X||(e.MessageType=X={})).Error=1,J.Warning=2,J.Info=3,J.Log=4,J.Debug=5,(te=ee||(e.ShowMessageNotification=ee={})).method="window/showMessage",te.messageDirection=t.MessageDirection.serverToClient,te.type=new t.ProtocolNotificationType(te.method),(ne=re||(e.ShowMessageRequest=re={})).method="window/showMessageRequest",ne.messageDirection=t.MessageDirection.serverToClient,ne.type=new t.ProtocolRequestType(ne.method),(ie=ae||(e.LogMessageNotification=ae={})).method="window/logMessage",ie.messageDirection=t.MessageDirection.serverToClient,ie.type=new t.ProtocolNotificationType(ie.method),(oe=se||(e.TelemetryEventNotification=se={})).method="telemetry/event",oe.messageDirection=t.MessageDirection.serverToClient,oe.type=new t.ProtocolNotificationType(oe.method),(ue=le||(e.TextDocumentSyncKind=le={})).None=0,ue.Full=1,ue.Incremental=2,(pe=ce||(e.DidOpenTextDocumentNotification=ce={})).method="textDocument/didOpen",pe.messageDirection=t.MessageDirection.clientToServer,pe.type=new t.ProtocolNotificationType(pe.method),function(e){function t(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}function r(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}Ge(t,"isIncremental"),e.isIncremental=t,Ge(r,"isFull"),e.isFull=r}(de||(e.TextDocumentContentChangeEvent=de={})),(me=fe||(e.DidChangeTextDocumentNotification=fe={})).method="textDocument/didChange",me.messageDirection=t.MessageDirection.clientToServer,me.type=new t.ProtocolNotificationType(me.method),(ye=he||(e.DidCloseTextDocumentNotification=he={})).method="textDocument/didClose",ye.messageDirection=t.MessageDirection.clientToServer,ye.type=new t.ProtocolNotificationType(ye.method),(Te=ge||(e.DidSaveTextDocumentNotification=ge={})).method="textDocument/didSave",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolNotificationType(Te.method),($e=ve||(e.TextDocumentSaveReason=ve={})).Manual=1,$e.AfterDelay=2,$e.FocusOut=3,(Ee=Re||(e.WillSaveTextDocumentNotification=Re={})).method="textDocument/willSave",Ee.messageDirection=t.MessageDirection.clientToServer,Ee.type=new t.ProtocolNotificationType(Ee.method),(Ae=be||(e.WillSaveTextDocumentWaitUntilRequest=be={})).method="textDocument/willSaveWaitUntil",Ae.messageDirection=t.MessageDirection.clientToServer,Ae.type=new t.ProtocolRequestType(Ae.method),(Se=Ce||(e.DidChangeWatchedFilesNotification=Ce={})).method="workspace/didChangeWatchedFiles",Se.messageDirection=t.MessageDirection.clientToServer,Se.type=new t.ProtocolNotificationType(Se.method),(xe=ke||(e.FileChangeType=ke={})).Created=1,xe.Changed=2,xe.Deleted=3,function(e){function t(e){const t=e;return n.objectLiteral(t)&&(r.URI.is(t.baseUri)||r.WorkspaceFolder.is(t.baseUri))&&n.string(t.pattern)}Ge(t,"is"),e.is=t}(we||(e.RelativePattern=we={})),(Ie=Ne||(e.WatchKind=Ne={})).Create=1,Ie.Change=2,Ie.Delete=4,(Pe=_e||(e.PublishDiagnosticsNotification=_e={})).method="textDocument/publishDiagnostics",Pe.messageDirection=t.MessageDirection.serverToClient,Pe.type=new t.ProtocolNotificationType(Pe.method),(De=Oe||(e.CompletionTriggerKind=Oe={})).Invoked=1,De.TriggerCharacter=2,De.TriggerForIncompleteCompletions=3,(Me=Le||(e.CompletionRequest=Le={})).method="textDocument/completion",Me.messageDirection=t.MessageDirection.clientToServer,Me.type=new t.ProtocolRequestType(Me.method),(Fe=je||(e.CompletionResolveRequest=je={})).method="completionItem/resolve",Fe.messageDirection=t.MessageDirection.clientToServer,Fe.type=new t.ProtocolRequestType(Fe.method),(Ke=ze||(e.HoverRequest=ze={})).method="textDocument/hover",Ke.messageDirection=t.MessageDirection.clientToServer,Ke.type=new t.ProtocolRequestType(Ke.method),(Ue=qe||(e.SignatureHelpTriggerKind=qe={})).Invoked=1,Ue.TriggerCharacter=2,Ue.ContentChange=3,(He=Be||(e.SignatureHelpRequest=Be={})).method="textDocument/signatureHelp",He.messageDirection=t.MessageDirection.clientToServer,He.type=new t.ProtocolRequestType(He.method),(Ze=Ye||(e.DefinitionRequest=Ye={})).method="textDocument/definition",Ze.messageDirection=t.MessageDirection.clientToServer,Ze.type=new t.ProtocolRequestType(Ze.method),(Je=Xe||(e.ReferencesRequest=Xe={})).method="textDocument/references",Je.messageDirection=t.MessageDirection.clientToServer,Je.type=new t.ProtocolRequestType(Je.method),(tt=et||(e.DocumentHighlightRequest=et={})).method="textDocument/documentHighlight",tt.messageDirection=t.MessageDirection.clientToServer,tt.type=new t.ProtocolRequestType(tt.method),(nt=rt||(e.DocumentSymbolRequest=rt={})).method="textDocument/documentSymbol",nt.messageDirection=t.MessageDirection.clientToServer,nt.type=new t.ProtocolRequestType(nt.method),(it=at||(e.CodeActionRequest=at={})).method="textDocument/codeAction",it.messageDirection=t.MessageDirection.clientToServer,it.type=new t.ProtocolRequestType(it.method),(ot=st||(e.CodeActionResolveRequest=st={})).method="codeAction/resolve",ot.messageDirection=t.MessageDirection.clientToServer,ot.type=new t.ProtocolRequestType(ot.method),(ut=lt||(e.WorkspaceSymbolRequest=lt={})).method="workspace/symbol",ut.messageDirection=t.MessageDirection.clientToServer,ut.type=new t.ProtocolRequestType(ut.method),(pt=ct||(e.WorkspaceSymbolResolveRequest=ct={})).method="workspaceSymbol/resolve",pt.messageDirection=t.MessageDirection.clientToServer,pt.type=new t.ProtocolRequestType(pt.method),(ft=dt||(e.CodeLensRequest=dt={})).method="textDocument/codeLens",ft.messageDirection=t.MessageDirection.clientToServer,ft.type=new t.ProtocolRequestType(ft.method),(jt=Mt||(e.CodeLensResolveRequest=Mt={})).method="codeLens/resolve",jt.messageDirection=t.MessageDirection.clientToServer,jt.type=new t.ProtocolRequestType(jt.method),(Gt=Ft||(e.CodeLensRefreshRequest=Ft={})).method="workspace/codeLens/refresh",Gt.messageDirection=t.MessageDirection.serverToClient,Gt.type=new t.ProtocolRequestType0(Gt.method),(Kt=zt||(e.DocumentLinkRequest=zt={})).method="textDocument/documentLink",Kt.messageDirection=t.MessageDirection.clientToServer,Kt.type=new t.ProtocolRequestType(Kt.method),(Ut=qt||(e.DocumentLinkResolveRequest=qt={})).method="documentLink/resolve",Ut.messageDirection=t.MessageDirection.clientToServer,Ut.type=new t.ProtocolRequestType(Ut.method),(Wt=Bt||(e.DocumentFormattingRequest=Bt={})).method="textDocument/formatting",Wt.messageDirection=t.MessageDirection.clientToServer,Wt.type=new t.ProtocolRequestType(Wt.method),(Ht=Vt||(e.DocumentRangeFormattingRequest=Vt={})).method="textDocument/rangeFormatting",Ht.messageDirection=t.MessageDirection.clientToServer,Ht.type=new t.ProtocolRequestType(Ht.method),(Qt=Yt||(e.DocumentRangesFormattingRequest=Yt={})).method="textDocument/rangesFormatting",Qt.messageDirection=t.MessageDirection.clientToServer,Qt.type=new t.ProtocolRequestType(Qt.method),(Xt=Zt||(e.DocumentOnTypeFormattingRequest=Zt={})).method="textDocument/onTypeFormatting",Xt.messageDirection=t.MessageDirection.clientToServer,Xt.type=new t.ProtocolRequestType(Xt.method),(Jt||(e.PrepareSupportDefaultBehavior=Jt={})).Identifier=1,(tr=er||(e.RenameRequest=er={})).method="textDocument/rename",tr.messageDirection=t.MessageDirection.clientToServer,tr.type=new t.ProtocolRequestType(tr.method),(nr=rr||(e.PrepareRenameRequest=rr={})).method="textDocument/prepareRename",nr.messageDirection=t.MessageDirection.clientToServer,nr.type=new t.ProtocolRequestType(nr.method),(ir=ar||(e.ExecuteCommandRequest=ar={})).method="workspace/executeCommand",ir.messageDirection=t.MessageDirection.clientToServer,ir.type=new t.ProtocolRequestType(ir.method),(or=sr||(e.ApplyWorkspaceEditRequest=sr={})).method="workspace/applyEdit",or.messageDirection=t.MessageDirection.serverToClient,or.type=new t.ProtocolRequestType("workspace/applyEdit")}}),jt=ze({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/connection.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var t=dt();function r(e,r,n,a){return t.ConnectionStrategy.is(a)&&(a={connectionStrategy:a}),(0,t.createMessageConnection)(e,r,n,a)}Ge(r,"createProtocolConnection"),e.createProtocolConnection=r}}),Ft=ze({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/api.js"(e){var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:Ge(function(){return t[r]},"get")}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.LSPErrorCodes=e.createProtocolConnection=void 0,r(dt(),e),r((Qe(),We(Ve)),e),r(mt(),e),r(Mt(),e);var n,a,i=jt();Object.defineProperty(e,"createProtocolConnection",{enumerable:!0,get:Ge(function(){return i.createProtocolConnection},"get")}),(a=n||(e.LSPErrorCodes=n={})).lspReservedErrorRangeStart=-32899,a.RequestFailed=-32803,a.ServerCancelled=-32802,a.ContentModified=-32801,a.RequestCancelled=-32800,a.lspReservedErrorRangeEnd=-32800}}),Gt=ze({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/browser/main.js"(e){var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:Ge(function(){return t[r]},"get")}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var n=ft();function a(e,t,r,a){return(0,n.createMessageConnection)(e,t,r,a)}r(ft(),e),r(Ft(),e),Ge(a,"createProtocolConnection"),e.createProtocolConnection=a}}),zt={};Ke(zt,{AbstractAstReflection:()=>Ht,AbstractCstNode:()=>dk,AbstractLangiumParser:()=>$k,AbstractParserErrorMessageProvider:()=>Ek,AbstractThreadedAsyncParser:()=>Qw,AstUtils:()=>sr,BiMap:()=>Nx,Cancellation:()=>Xk,CompositeCstNodeImpl:()=>mk,ContextCache:()=>jx,CstNodeBuilder:()=>pk,CstUtils:()=>Kt,DEFAULT_TOKENIZE_OPTIONS:()=>mw,DONE_RESULT:()=>rr,DatatypeSymbol:()=>gk,DefaultAstNodeDescriptionProvider:()=>nw,DefaultAstNodeLocator:()=>iw,DefaultAsyncParser:()=>Yw,DefaultCommentProvider:()=>Hw,DefaultConfigurationProvider:()=>lw,DefaultDocumentBuilder:()=>cw,DefaultDocumentValidator:()=>Jx,DefaultHydrator:()=>Jw,DefaultIndexManager:()=>pw,DefaultJsonSerializer:()=>Wx,DefaultLangiumDocumentFactory:()=>Ex,DefaultLangiumDocuments:()=>bx,DefaultLangiumProfiler:()=>LN,DefaultLexer:()=>hw,DefaultLexerErrorMessageProvider:()=>fw,DefaultLinker:()=>Cx,DefaultNameProvider:()=>kx,DefaultReferenceDescriptionProvider:()=>aw,DefaultReferences:()=>xx,DefaultScopeComputation:()=>Ix,DefaultScopeProvider:()=>zx,DefaultServiceRegistry:()=>Vx,DefaultTokenBuilder:()=>Qk,DefaultValueConverter:()=>Zk,DefaultWorkspaceLock:()=>Xw,DefaultWorkspaceManager:()=>dw,Deferred:()=>ux,Disposable:()=>ow,DisposableCache:()=>Lx,DocumentCache:()=>Fx,DocumentState:()=>vx,DocumentValidator:()=>Yx,EMPTY_SCOPE:()=>Dx,EMPTY_STREAM:()=>tr,EmptyFileSystem:()=>yN,EmptyFileSystemProvider:()=>hN,ErrorWithLocation:()=>Ua,GrammarAST:()=>Rr,GrammarUtils:()=>qa,IndentationAwareLexer:()=>fN,IndentationAwareTokenBuilder:()=>dN,JSDocDocumentationProvider:()=>Vw,LangiumCompletionParser:()=>Ak,LangiumParser:()=>Rk,LangiumParserErrorMessageProvider:()=>bk,LeafCstNodeImpl:()=>fk,LexingMode:()=>uN,MapScope:()=>Px,Module:()=>Ww,MultiMap:()=>wx,MultiMapScope:()=>Ox,OperationCancelled:()=>ax,ParserWorker:()=>Zw,ProfilingTask:()=>MN,Reduction:()=>ar,RefResolving:()=>Ax,RegExpUtils:()=>Va,RootCstNodeImpl:()=>yk,SimpleCache:()=>Mx,StreamImpl:()=>Xt,StreamScope:()=>_x,TextDocument:()=>ox,TreeStreamImpl:()=>ir,URI:()=>gx,UriTrie:()=>Rx,UriUtils:()=>yx,VALIDATE_EACH_NODE:()=>Xx,ValidationCategory:()=>Ux,ValidationRegistry:()=>Zx,ValueConverter:()=>Yk,WorkspaceCache:()=>Gx,assertCondition:()=>Wa,assertUnreachable:()=>Ba,createCompletionParser:()=>Wk,createDefaultCoreModule:()=>eN,createDefaultSharedCoreModule:()=>tN,createGrammarConfig:()=>as,createLangiumParser:()=>Vk,createParser:()=>xk,delayNextTick:()=>Jk,diagnosticData:()=>Hx,eagerLoad:()=>aN,getDiagnosticRange:()=>ew,indentationBuilderDefaultOptions:()=>pN,inject:()=>rN,interruptAndCheck:()=>sx,isAstNode:()=>qt,isAstNodeDescription:()=>Wt,isAstNodeWithComment:()=>Kx,isCompositeCstNode:()=>Yt,isIMultiModeLexerDefinition:()=>gw,isJSDoc:()=>$w,isLeafCstNode:()=>Qt,isLinkingError:()=>Vt,isMultiReference:()=>Bt,isNamed:()=>Sx,isOperationCancelled:()=>ix,isReference:()=>Ut,isRootCstNode:()=>Zt,isTokenTypeArray:()=>yw,isTokenTypeDictionary:()=>Tw,loadGrammarFromJson:()=>$N,parseJSDoc:()=>vw,prepareLangiumParser:()=>Hk,setInterruptionPeriod:()=>nx,startCancelableOperation:()=>rx,stream:()=>nr,toDiagnosticData:()=>rw,toDiagnosticSeverity:()=>tw});var Kt={};function qt(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$type}function Ut(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$refText&&"ref"in e}function Bt(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$refText&&"items"in e}function Wt(e){return"object"==typeof e&&null!==e&&"string"==typeof e.name&&"string"==typeof e.type&&"string"==typeof e.path}function Vt(e){return"object"==typeof e&&null!==e&&"object"==typeof e.info&&"string"==typeof e.message}Ke(Kt,{DefaultNameRegexp:()=>Na,RangeComparison:()=>Ta,compareRange:()=>xa,findCommentNode:()=>_a,findDeclarationNodeAtOffset:()=>Ia,findLeafNodeAtOffset:()=>Oa,findLeafNodeBeforeOffset:()=>Da,flattenCst:()=>Aa,getDatatypeNode:()=>Ea,getInteriorNodes:()=>Ga,getNextNode:()=>ja,getPreviousNode:()=>Ma,getStartlineNode:()=>Fa,inRange:()=>wa,isChildNode:()=>Ca,isCommentNode:()=>Pa,streamCst:()=>ba,toDocumentSegment:()=>ka,tokenToRange:()=>Sa}),Ge(qt,"isAstNode"),Ge(Ut,"isReference"),Ge(Bt,"isMultiReference"),Ge(Wt,"isAstNodeDescription"),Ge(Vt,"isLinkingError");var Ht=class{static{Ge(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){const t=this.types[e.container.$type];if(!t)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const r=t.properties[e.property]?.referenceType;if(!r)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return r}getTypeMetaData(e){const t=this.types[e];return t||{name:e,properties:{},superTypes:[]}}isInstance(e,t){return qt(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let r=this.subtypes[e];r||(r=this.subtypes[e]={});const n=r[t];if(void 0!==n)return n;{const n=this.types[e],a=!!n&&n.superTypes.some(e=>this.isSubtype(e,t));return r[t]=a,a}}getAllSubTypes(e){const t=this.allSubtypes[e];if(t)return t;{const t=this.getAllTypes(),r=[];for(const n of t)this.isSubtype(n,e)&&r.push(n);return this.allSubtypes[e]=r,r}}};function Yt(e){return"object"==typeof e&&null!==e&&Array.isArray(e.content)}function Qt(e){return"object"==typeof e&&null!==e&&"object"==typeof e.tokenType}function Zt(e){return Yt(e)&&"string"==typeof e.fullText}Ge(Yt,"isCompositeCstNode"),Ge(Qt,"isLeafCstNode"),Ge(Zt,"isRootCstNode");var Xt=class e{static{Ge(this,"StreamImpl")}constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){const e={state:this.startFn(),next:Ge(()=>this.nextFn(e.state),"next"),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){const e=this.iterator();return Boolean(e.next().done)}count(){const e=this.iterator();let t=0,r=e.next();for(;!r.done;)t++,r=e.next();return t}toArray(){const e=[],t=this.iterator();let r;do{r=t.next(),void 0!==r.value&&e.push(r.value)}while(!r.done);return e}toSet(){return new Set(this)}toMap(e,t){const r=this.map(r=>[e?e(r):r,t?t(r):r]);return new Map(r)}toString(){return this.join()}concat(t){return new e(()=>({first:this.startFn(),firstDone:!1,iterator:t[Symbol.iterator]()}),e=>{let t;if(!e.firstDone){do{if(t=this.nextFn(e.first),!t.done)return t}while(!t.done);e.firstDone=!0}do{if(t=e.iterator.next(),!t.done)return t}while(!t.done);return rr})}join(e=","){const t=this.iterator();let r,n="",a=!1;do{r=t.next(),r.done||(a&&(n+=e),n+=Jt(r.value)),a=!0}while(!r.done);return n}indexOf(e,t=0){const r=this.iterator();let n=0,a=r.next();for(;!a.done;){if(n>=t&&a.value===e)return n;a=r.next(),n++}return-1}every(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(!e(r.value))return!1;r=t.next()}return!0}some(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(e(r.value))return!0;r=t.next()}return!1}forEach(e){const t=this.iterator();let r=0,n=t.next();for(;!n.done;)e(n.value,r),n=t.next(),r++}map(t){return new e(this.startFn,e=>{const{done:r,value:n}=this.nextFn(e);return r?rr:{done:!1,value:t(n)}})}filter(t){return new e(this.startFn,e=>{let r;do{if(r=this.nextFn(e),!r.done&&t(r.value))return r}while(!r.done);return rr})}nonNullable(){return this.filter(e=>null!=e)}reduce(e,t){const r=this.iterator();let n=t,a=r.next();for(;!a.done;)n=void 0===n?a.value:e(n,a.value),a=r.next();return n}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,r){const n=e.next();if(n.done)return r;const a=this.recursiveReduce(e,t,r);return void 0===a?n.value:t(a,n.value)}find(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(e(r.value))return r.value;r=t.next()}}findIndex(e){const t=this.iterator();let r=0,n=t.next();for(;!n.done;){if(e(n.value))return r;n=t.next(),r++}return-1}includes(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(r.value===e)return!0;r=t.next()}return!1}flatMap(t){return new e(()=>({this:this.startFn()}),e=>{do{if(e.iterator){const t=e.iterator.next();if(!t.done)return t;e.iterator=void 0}const{done:r,value:n}=this.nextFn(e.this);if(!r){const r=t(n);if(!er(r))return{done:!1,value:r};e.iterator=r[Symbol.iterator]()}}while(e.iterator);return rr})}flat(t){if(void 0===t&&(t=1),t<=0)return this;const r=t>1?this.flat(t-1):this;return new e(()=>({this:r.startFn()}),e=>{do{if(e.iterator){const t=e.iterator.next();if(!t.done)return t;e.iterator=void 0}const{done:t,value:n}=r.nextFn(e.this);if(!t){if(!er(n))return{done:!1,value:n};e.iterator=n[Symbol.iterator]()}}while(e.iterator);return rr})}head(){const e=this.iterator().next();if(!e.done)return e.value}tail(t=1){return new e(()=>{const e=this.startFn();for(let r=0;r({size:0,state:this.startFn()}),e=>(e.size++,e.size>t?rr:this.nextFn(e.state)))}distinct(t){return new e(()=>({set:new Set,internalState:this.startFn()}),e=>{let r;do{if(r=this.nextFn(e.internalState),!r.done){const n=t?t(r.value):r.value;if(!e.set.has(n))return e.set.add(n),r}}while(!r.done);return rr})}exclude(e,t){const r=new Set;for(const n of e){const e=t?t(n):n;r.add(e)}return this.filter(e=>{const n=t?t(e):e;return!r.has(n)})}};function Jt(e){return"string"==typeof e?e:void 0===e?"undefined":"function"==typeof e.toString?e.toString():Object.prototype.toString.call(e)}function er(e){return!!e&&"function"==typeof e[Symbol.iterator]}Ge(Jt,"toString"),Ge(er,"isIterable");var tr=new Xt(()=>{},()=>rr),rr=Object.freeze({done:!0,value:void 0});function nr(...e){if(1===e.length){const t=e[0];if(t instanceof Xt)return t;if(er(t))return new Xt(()=>t[Symbol.iterator](),e=>e.next());if("number"==typeof t.length)return new Xt(()=>({index:0}),e=>e.index1?new Xt(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex({iterators:r?.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),e=>{for(e.pruned&&(e.iterators.pop(),e.pruned=!1);e.iterators.length>0;){const r=e.iterators[e.iterators.length-1].next();if(!r.done)return e.iterators.push(t(r.value)[Symbol.iterator]()),r;e.iterators.pop()}return rr})}iterator(){const e={state:this.startFn(),next:Ge(()=>this.nextFn(e.state),"next"),prune:Ge(()=>{e.state.pruned=!0},"prune"),[Symbol.iterator]:()=>e};return e}};!function(e){function t(e){return e.reduce((e,t)=>e+t,0)}function r(e){return e.reduce((e,t)=>e*t,0)}function n(e){return e.reduce((e,t)=>Math.min(e,t))}function a(e){return e.reduce((e,t)=>Math.max(e,t))}Ge(t,"sum"),e.sum=t,Ge(r,"product"),e.product=r,Ge(n,"min"),e.min=n,Ge(a,"max"),e.max=a}(ar||(ar={}));var sr={};function or(e,t={}){for(const[r,n]of Object.entries(e))r.startsWith("$")||(Array.isArray(n)?n.forEach((n,a)=>{qt(n)&&(n.$container=e,n.$containerProperty=r,n.$containerIndex=a,t.deep&&or(n,t))}):qt(n)&&(n.$container=e,n.$containerProperty=r,t.deep&&or(n,t)))}function lr(e,t){let r=e;for(;r;){if(t(r))return r;r=r.$container}}function ur(e,t){let r=e;for(;r;){if(t(r))return!0;r=r.$container}return!1}function cr(e){const t=pr(e).$document;if(!t)throw new Error("AST node has no document.");return t}function pr(e){for(;e.$container;)e=e.$container;return e}function dr(e){return Ut(e)?e.ref?[e.ref]:[]:Bt(e)?e.items.map(e=>e.ref):[]}function fr(e,t){if(!e)throw new Error("Node must be an AstNode.");const r=t?.range;return new Xt(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndexfr(e,t))}function hr(e,t){if(!e)throw new Error("Root node must be an AstNode.");return t?.range&&!yr(e,t.range)?new ir(e,()=>[]):new ir(e,e=>fr(e,t),{includeRoot:!0})}function yr(e,t){if(!t)return!0;const r=e.$cstNode?.range;return!!r&&wa(r,t)}function gr(e){return new Xt(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndexTr,copyAstNode:()=>$r,findRootNode:()=>pr,getContainerOfType:()=>lr,getDocument:()=>cr,getReferenceNodes:()=>dr,hasContainerOfType:()=>ur,linkContentToContainer:()=>or,streamAllContents:()=>mr,streamAst:()=>hr,streamContents:()=>fr,streamReferences:()=>gr}),Ge(or,"linkContentToContainer"),Ge(lr,"getContainerOfType"),Ge(ur,"hasContainerOfType"),Ge(cr,"getDocument"),Ge(pr,"findRootNode"),Ge(dr,"getReferenceNodes"),Ge(fr,"streamContents"),Ge(mr,"streamAllContents"),Ge(hr,"streamAst"),Ge(yr,"isAstNodeInRange"),Ge(gr,"streamReferences"),Ge(Tr,"assignMandatoryProperties"),Ge(vr,"copyDefaultValue"),Ge($r,"copyAstNode");var Rr={};Ke(Rr,{AbstractElement:()=>br,AbstractParserRule:()=>Cr,AbstractRule:()=>kr,AbstractType:()=>wr,Action:()=>Ir,Alternatives:()=>Pr,ArrayLiteral:()=>Dr,ArrayType:()=>Mr,Assignment:()=>Fr,BooleanLiteral:()=>zr,CharacterRange:()=>qr,Condition:()=>Br,Conjunction:()=>Vr,CrossReference:()=>Yr,Disjunction:()=>Zr,EndOfFile:()=>Jr,Grammar:()=>tn,GrammarImport:()=>nn,Group:()=>sn,InferredType:()=>ln,InfixRule:()=>cn,InfixRuleOperatorList:()=>dn,InfixRuleOperators:()=>mn,Interface:()=>yn,Keyword:()=>Tn,LangiumGrammarAstReflection:()=>$a,LangiumGrammarTerminals:()=>Er,NamedArgument:()=>$n,NegatedToken:()=>En,Negation:()=>An,NumberLiteral:()=>Sn,Parameter:()=>xn,ParameterReference:()=>Nn,ParserRule:()=>_n,ReferenceType:()=>On,RegexToken:()=>Ln,ReturnType:()=>jn,RuleCall:()=>Gn,SimpleType:()=>Kn,StringLiteral:()=>Un,TerminalAlternatives:()=>Wn,TerminalElement:()=>Hn,TerminalGroup:()=>Qn,TerminalRule:()=>Xn,TerminalRuleCall:()=>ea,Type:()=>ra,TypeAttribute:()=>aa,TypeDefinition:()=>sa,UnionType:()=>la,UnorderedGroup:()=>ca,UntilToken:()=>da,ValueLiteral:()=>ma,Wildcard:()=>ya,isAbstractElement:()=>Ar,isAbstractParserRule:()=>Sr,isAbstractRule:()=>xr,isAbstractType:()=>Nr,isAction:()=>_r,isAlternatives:()=>Or,isArrayLiteral:()=>Lr,isArrayType:()=>jr,isAssignment:()=>Gr,isBooleanLiteral:()=>Kr,isCharacterRange:()=>Ur,isCondition:()=>Wr,isConjunction:()=>Hr,isCrossReference:()=>Qr,isDisjunction:()=>Xr,isEndOfFile:()=>en,isGrammar:()=>rn,isGrammarImport:()=>an,isGroup:()=>on,isInferredType:()=>un,isInfixRule:()=>pn,isInfixRuleOperatorList:()=>fn,isInfixRuleOperators:()=>hn,isInterface:()=>gn,isKeyword:()=>vn,isNamedArgument:()=>Rn,isNegatedToken:()=>bn,isNegation:()=>Cn,isNumberLiteral:()=>kn,isParameter:()=>wn,isParameterReference:()=>In,isParserRule:()=>Pn,isReferenceType:()=>Dn,isRegexToken:()=>Mn,isReturnType:()=>Fn,isRuleCall:()=>zn,isSimpleType:()=>qn,isStringLiteral:()=>Bn,isTerminalAlternatives:()=>Vn,isTerminalElement:()=>Yn,isTerminalGroup:()=>Zn,isTerminalRule:()=>Jn,isTerminalRuleCall:()=>ta,isType:()=>na,isTypeAttribute:()=>ia,isTypeDefinition:()=>oa,isUnionType:()=>ua,isUnorderedGroup:()=>pa,isUntilToken:()=>fa,isValueLiteral:()=>ha,isWildcard:()=>ga,reflection:()=>Ra});var Er={ID:/\^?[_a-zA-Z][\w_]*/,STRING:/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/,NUMBER:/NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity)/,RegexLiteral:/\/(?![*+?])(?:[^\r\n\[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*\])+\/[a-z]*/,WS:/\s+/,ML_COMMENT:/\/\*[\s\S]*?\*\//,SL_COMMENT:/\/\/[^\n\r]*/},br={$type:"AbstractElement",cardinality:"cardinality"};function Ar(e){return Ra.isInstance(e,br.$type)}Ge(Ar,"isAbstractElement");var Cr={$type:"AbstractParserRule"};function Sr(e){return Ra.isInstance(e,Cr.$type)}Ge(Sr,"isAbstractParserRule");var kr={$type:"AbstractRule"};function xr(e){return Ra.isInstance(e,kr.$type)}Ge(xr,"isAbstractRule");var wr={$type:"AbstractType"};function Nr(e){return Ra.isInstance(e,wr.$type)}Ge(Nr,"isAbstractType");var Ir={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function _r(e){return Ra.isInstance(e,Ir.$type)}Ge(_r,"isAction");var Pr={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function Or(e){return Ra.isInstance(e,Pr.$type)}Ge(Or,"isAlternatives");var Dr={$type:"ArrayLiteral",elements:"elements"};function Lr(e){return Ra.isInstance(e,Dr.$type)}Ge(Lr,"isArrayLiteral");var Mr={$type:"ArrayType",elementType:"elementType"};function jr(e){return Ra.isInstance(e,Mr.$type)}Ge(jr,"isArrayType");var Fr={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function Gr(e){return Ra.isInstance(e,Fr.$type)}Ge(Gr,"isAssignment");var zr={$type:"BooleanLiteral",true:"true"};function Kr(e){return Ra.isInstance(e,zr.$type)}Ge(Kr,"isBooleanLiteral");var qr={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function Ur(e){return Ra.isInstance(e,qr.$type)}Ge(Ur,"isCharacterRange");var Br={$type:"Condition"};function Wr(e){return Ra.isInstance(e,Br.$type)}Ge(Wr,"isCondition");var Vr={$type:"Conjunction",left:"left",right:"right"};function Hr(e){return Ra.isInstance(e,Vr.$type)}Ge(Hr,"isConjunction");var Yr={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function Qr(e){return Ra.isInstance(e,Yr.$type)}Ge(Qr,"isCrossReference");var Zr={$type:"Disjunction",left:"left",right:"right"};function Xr(e){return Ra.isInstance(e,Zr.$type)}Ge(Xr,"isDisjunction");var Jr={$type:"EndOfFile",cardinality:"cardinality"};function en(e){return Ra.isInstance(e,Jr.$type)}Ge(en,"isEndOfFile");var tn={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"};function rn(e){return Ra.isInstance(e,tn.$type)}Ge(rn,"isGrammar");var nn={$type:"GrammarImport",path:"path"};function an(e){return Ra.isInstance(e,nn.$type)}Ge(an,"isGrammarImport");var sn={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function on(e){return Ra.isInstance(e,sn.$type)}Ge(on,"isGroup");var ln={$type:"InferredType",name:"name"};function un(e){return Ra.isInstance(e,ln.$type)}Ge(un,"isInferredType");var cn={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function pn(e){return Ra.isInstance(e,cn.$type)}Ge(pn,"isInfixRule");var dn={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"};function fn(e){return Ra.isInstance(e,dn.$type)}Ge(fn,"isInfixRuleOperatorList");var mn={$type:"InfixRuleOperators",precedences:"precedences"};function hn(e){return Ra.isInstance(e,mn.$type)}Ge(hn,"isInfixRuleOperators");var yn={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function gn(e){return Ra.isInstance(e,yn.$type)}Ge(gn,"isInterface");var Tn={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function vn(e){return Ra.isInstance(e,Tn.$type)}Ge(vn,"isKeyword");var $n={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"};function Rn(e){return Ra.isInstance(e,$n.$type)}Ge(Rn,"isNamedArgument");var En={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function bn(e){return Ra.isInstance(e,En.$type)}Ge(bn,"isNegatedToken");var An={$type:"Negation",value:"value"};function Cn(e){return Ra.isInstance(e,An.$type)}Ge(Cn,"isNegation");var Sn={$type:"NumberLiteral",value:"value"};function kn(e){return Ra.isInstance(e,Sn.$type)}Ge(kn,"isNumberLiteral");var xn={$type:"Parameter",name:"name"};function wn(e){return Ra.isInstance(e,xn.$type)}Ge(wn,"isParameter");var Nn={$type:"ParameterReference",parameter:"parameter"};function In(e){return Ra.isInstance(e,Nn.$type)}Ge(In,"isParameterReference");var _n={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function Pn(e){return Ra.isInstance(e,_n.$type)}Ge(Pn,"isParserRule");var On={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"};function Dn(e){return Ra.isInstance(e,On.$type)}Ge(Dn,"isReferenceType");var Ln={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function Mn(e){return Ra.isInstance(e,Ln.$type)}Ge(Mn,"isRegexToken");var jn={$type:"ReturnType",name:"name"};function Fn(e){return Ra.isInstance(e,jn.$type)}Ge(Fn,"isReturnType");var Gn={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function zn(e){return Ra.isInstance(e,Gn.$type)}Ge(zn,"isRuleCall");var Kn={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function qn(e){return Ra.isInstance(e,Kn.$type)}Ge(qn,"isSimpleType");var Un={$type:"StringLiteral",value:"value"};function Bn(e){return Ra.isInstance(e,Un.$type)}Ge(Bn,"isStringLiteral");var Wn={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Vn(e){return Ra.isInstance(e,Wn.$type)}Ge(Vn,"isTerminalAlternatives");var Hn={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function Yn(e){return Ra.isInstance(e,Hn.$type)}Ge(Yn,"isTerminalElement");var Qn={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Zn(e){return Ra.isInstance(e,Qn.$type)}Ge(Zn,"isTerminalGroup");var Xn={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function Jn(e){return Ra.isInstance(e,Xn.$type)}Ge(Jn,"isTerminalRule");var ea={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function ta(e){return Ra.isInstance(e,ea.$type)}Ge(ta,"isTerminalRuleCall");var ra={$type:"Type",name:"name",type:"type"};function na(e){return Ra.isInstance(e,ra.$type)}Ge(na,"isType");var aa={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"};function ia(e){return Ra.isInstance(e,aa.$type)}Ge(ia,"isTypeAttribute");var sa={$type:"TypeDefinition"};function oa(e){return Ra.isInstance(e,sa.$type)}Ge(oa,"isTypeDefinition");var la={$type:"UnionType",types:"types"};function ua(e){return Ra.isInstance(e,la.$type)}Ge(ua,"isUnionType");var ca={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function pa(e){return Ra.isInstance(e,ca.$type)}Ge(pa,"isUnorderedGroup");var da={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function fa(e){return Ra.isInstance(e,da.$type)}Ge(fa,"isUntilToken");var ma={$type:"ValueLiteral"};function ha(e){return Ra.isInstance(e,ma.$type)}Ge(ha,"isValueLiteral");var ya={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function ga(e){return Ra.isInstance(e,ya.$type)}Ge(ga,"isWildcard");var Ta,va,$a=class extends Ht{static{Ge(this,"LangiumGrammarAstReflection")}constructor(){super(...arguments),this.types={AbstractElement:{name:br.$type,properties:{cardinality:{name:br.cardinality}},superTypes:[]},AbstractParserRule:{name:Cr.$type,properties:{},superTypes:[kr.$type,wr.$type]},AbstractRule:{name:kr.$type,properties:{},superTypes:[]},AbstractType:{name:wr.$type,properties:{},superTypes:[]},Action:{name:Ir.$type,properties:{cardinality:{name:Ir.cardinality},feature:{name:Ir.feature},inferredType:{name:Ir.inferredType},operator:{name:Ir.operator},type:{name:Ir.type,referenceType:wr.$type}},superTypes:[br.$type]},Alternatives:{name:Pr.$type,properties:{cardinality:{name:Pr.cardinality},elements:{name:Pr.elements,defaultValue:[]}},superTypes:[br.$type]},ArrayLiteral:{name:Dr.$type,properties:{elements:{name:Dr.elements,defaultValue:[]}},superTypes:[ma.$type]},ArrayType:{name:Mr.$type,properties:{elementType:{name:Mr.elementType}},superTypes:[sa.$type]},Assignment:{name:Fr.$type,properties:{cardinality:{name:Fr.cardinality},feature:{name:Fr.feature},operator:{name:Fr.operator},predicate:{name:Fr.predicate},terminal:{name:Fr.terminal}},superTypes:[br.$type]},BooleanLiteral:{name:zr.$type,properties:{true:{name:zr.true,defaultValue:!1}},superTypes:[Br.$type,ma.$type]},CharacterRange:{name:qr.$type,properties:{cardinality:{name:qr.cardinality},left:{name:qr.left},lookahead:{name:qr.lookahead},parenthesized:{name:qr.parenthesized,defaultValue:!1},right:{name:qr.right}},superTypes:[Hn.$type]},Condition:{name:Br.$type,properties:{},superTypes:[]},Conjunction:{name:Vr.$type,properties:{left:{name:Vr.left},right:{name:Vr.right}},superTypes:[Br.$type]},CrossReference:{name:Yr.$type,properties:{cardinality:{name:Yr.cardinality},deprecatedSyntax:{name:Yr.deprecatedSyntax,defaultValue:!1},isMulti:{name:Yr.isMulti,defaultValue:!1},terminal:{name:Yr.terminal},type:{name:Yr.type,referenceType:wr.$type}},superTypes:[br.$type]},Disjunction:{name:Zr.$type,properties:{left:{name:Zr.left},right:{name:Zr.right}},superTypes:[Br.$type]},EndOfFile:{name:Jr.$type,properties:{cardinality:{name:Jr.cardinality}},superTypes:[br.$type]},Grammar:{name:tn.$type,properties:{imports:{name:tn.imports,defaultValue:[]},interfaces:{name:tn.interfaces,defaultValue:[]},isDeclared:{name:tn.isDeclared,defaultValue:!1},name:{name:tn.name},rules:{name:tn.rules,defaultValue:[]},types:{name:tn.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:nn.$type,properties:{path:{name:nn.path}},superTypes:[]},Group:{name:sn.$type,properties:{cardinality:{name:sn.cardinality},elements:{name:sn.elements,defaultValue:[]},guardCondition:{name:sn.guardCondition},predicate:{name:sn.predicate}},superTypes:[br.$type]},InferredType:{name:ln.$type,properties:{name:{name:ln.name}},superTypes:[wr.$type]},InfixRule:{name:cn.$type,properties:{call:{name:cn.call},dataType:{name:cn.dataType},inferredType:{name:cn.inferredType},name:{name:cn.name},operators:{name:cn.operators},parameters:{name:cn.parameters,defaultValue:[]},returnType:{name:cn.returnType,referenceType:wr.$type}},superTypes:[Cr.$type]},InfixRuleOperatorList:{name:dn.$type,properties:{associativity:{name:dn.associativity},operators:{name:dn.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:mn.$type,properties:{precedences:{name:mn.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:yn.$type,properties:{attributes:{name:yn.attributes,defaultValue:[]},name:{name:yn.name},superTypes:{name:yn.superTypes,defaultValue:[],referenceType:wr.$type}},superTypes:[wr.$type]},Keyword:{name:Tn.$type,properties:{cardinality:{name:Tn.cardinality},predicate:{name:Tn.predicate},value:{name:Tn.value}},superTypes:[br.$type]},NamedArgument:{name:$n.$type,properties:{calledByName:{name:$n.calledByName,defaultValue:!1},parameter:{name:$n.parameter,referenceType:xn.$type},value:{name:$n.value}},superTypes:[]},NegatedToken:{name:En.$type,properties:{cardinality:{name:En.cardinality},lookahead:{name:En.lookahead},parenthesized:{name:En.parenthesized,defaultValue:!1},terminal:{name:En.terminal}},superTypes:[Hn.$type]},Negation:{name:An.$type,properties:{value:{name:An.value}},superTypes:[Br.$type]},NumberLiteral:{name:Sn.$type,properties:{value:{name:Sn.value}},superTypes:[ma.$type]},Parameter:{name:xn.$type,properties:{name:{name:xn.name}},superTypes:[]},ParameterReference:{name:Nn.$type,properties:{parameter:{name:Nn.parameter,referenceType:xn.$type}},superTypes:[Br.$type]},ParserRule:{name:_n.$type,properties:{dataType:{name:_n.dataType},definition:{name:_n.definition},entry:{name:_n.entry,defaultValue:!1},fragment:{name:_n.fragment,defaultValue:!1},inferredType:{name:_n.inferredType},name:{name:_n.name},parameters:{name:_n.parameters,defaultValue:[]},returnType:{name:_n.returnType,referenceType:wr.$type}},superTypes:[Cr.$type]},ReferenceType:{name:On.$type,properties:{isMulti:{name:On.isMulti,defaultValue:!1},referenceType:{name:On.referenceType}},superTypes:[sa.$type]},RegexToken:{name:Ln.$type,properties:{cardinality:{name:Ln.cardinality},lookahead:{name:Ln.lookahead},parenthesized:{name:Ln.parenthesized,defaultValue:!1},regex:{name:Ln.regex}},superTypes:[Hn.$type]},ReturnType:{name:jn.$type,properties:{name:{name:jn.name}},superTypes:[]},RuleCall:{name:Gn.$type,properties:{arguments:{name:Gn.arguments,defaultValue:[]},cardinality:{name:Gn.cardinality},predicate:{name:Gn.predicate},rule:{name:Gn.rule,referenceType:kr.$type}},superTypes:[br.$type]},SimpleType:{name:Kn.$type,properties:{primitiveType:{name:Kn.primitiveType},stringType:{name:Kn.stringType},typeRef:{name:Kn.typeRef,referenceType:wr.$type}},superTypes:[sa.$type]},StringLiteral:{name:Un.$type,properties:{value:{name:Un.value}},superTypes:[ma.$type]},TerminalAlternatives:{name:Wn.$type,properties:{cardinality:{name:Wn.cardinality},elements:{name:Wn.elements,defaultValue:[]},lookahead:{name:Wn.lookahead},parenthesized:{name:Wn.parenthesized,defaultValue:!1}},superTypes:[Hn.$type]},TerminalElement:{name:Hn.$type,properties:{cardinality:{name:Hn.cardinality},lookahead:{name:Hn.lookahead},parenthesized:{name:Hn.parenthesized,defaultValue:!1}},superTypes:[br.$type]},TerminalGroup:{name:Qn.$type,properties:{cardinality:{name:Qn.cardinality},elements:{name:Qn.elements,defaultValue:[]},lookahead:{name:Qn.lookahead},parenthesized:{name:Qn.parenthesized,defaultValue:!1}},superTypes:[Hn.$type]},TerminalRule:{name:Xn.$type,properties:{definition:{name:Xn.definition},fragment:{name:Xn.fragment,defaultValue:!1},hidden:{name:Xn.hidden,defaultValue:!1},name:{name:Xn.name},type:{name:Xn.type}},superTypes:[kr.$type]},TerminalRuleCall:{name:ea.$type,properties:{cardinality:{name:ea.cardinality},lookahead:{name:ea.lookahead},parenthesized:{name:ea.parenthesized,defaultValue:!1},rule:{name:ea.rule,referenceType:Xn.$type}},superTypes:[Hn.$type]},Type:{name:ra.$type,properties:{name:{name:ra.name},type:{name:ra.type}},superTypes:[wr.$type]},TypeAttribute:{name:aa.$type,properties:{defaultValue:{name:aa.defaultValue},isOptional:{name:aa.isOptional,defaultValue:!1},name:{name:aa.name},type:{name:aa.type}},superTypes:[]},TypeDefinition:{name:sa.$type,properties:{},superTypes:[]},UnionType:{name:la.$type,properties:{types:{name:la.types,defaultValue:[]}},superTypes:[sa.$type]},UnorderedGroup:{name:ca.$type,properties:{cardinality:{name:ca.cardinality},elements:{name:ca.elements,defaultValue:[]}},superTypes:[br.$type]},UntilToken:{name:da.$type,properties:{cardinality:{name:da.cardinality},lookahead:{name:da.lookahead},parenthesized:{name:da.parenthesized,defaultValue:!1},terminal:{name:da.terminal}},superTypes:[Hn.$type]},ValueLiteral:{name:ma.$type,properties:{},superTypes:[]},Wildcard:{name:ya.$type,properties:{cardinality:{name:ya.cardinality},lookahead:{name:ya.lookahead},parenthesized:{name:ya.parenthesized,defaultValue:!1}},superTypes:[Hn.$type]}}}},Ra=new $a;function Ea(e){let t=e,r=!1;for(;t;){const e=lr(t.grammarSource,Pn);if(!e||!e.dataType)return r?t:void 0;t=t.container,r=!0}}function ba(e){return new ir(e,e=>Yt(e)?e.content:[],{includeRoot:!0})}function Aa(e){return ba(e).filter(Qt)}function Ca(e,t){for(;e.container;)if((e=e.container)===t)return!0;return!1}function Sa(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function ka(e){if(!e)return;const{offset:t,end:r,range:n}=e;return{range:n,offset:t,end:r,length:r-t}}function xa(e,t){if(e.end.linet.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return Ta.After;const r=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,n=e.end.lineTa.After}Ge(Ea,"getDatatypeNode"),Ge(ba,"streamCst"),Ge(Aa,"flattenCst"),Ge(Ca,"isChildNode"),Ge(Sa,"tokenToRange"),Ge(ka,"toDocumentSegment"),(va=Ta||(Ta={}))[va.Before=0]="Before",va[va.After=1]="After",va[va.OverlapFront=2]="OverlapFront",va[va.OverlapBack=3]="OverlapBack",va[va.Inside=4]="Inside",va[va.Outside=5]="Outside",Ge(xa,"compareRange"),Ge(wa,"inRange");var Na=/^[\w\p{L}]$/u;function Ia(e,t,r=Na){if(e){if(t>0){const n=t-e.offset,a=e.text.charAt(n);r.test(a)||t--}return Oa(e,t)}}function _a(e,t){if(e){const r=Ma(e,!0);if(r&&Pa(r,t))return r;if(Zt(e)){for(let r=e.content.findIndex(e=>!e.hidden)-1;r>=0;r--){const n=e.content[r];if(Pa(n,t))return n}}}}function Pa(e,t){return Qt(e)&&t.includes(e.tokenType.name)}function Oa(e,t){if(Qt(e))return e;if(Yt(e)){const r=La(e,t,!1);if(r)return Oa(r,t)}}function Da(e,t){if(Qt(e))return e;if(Yt(e)){const r=La(e,t,!0);if(r)return Da(r,t)}}function La(e,t,r){let n,a=0,i=e.content.length-1;for(;a<=i;){const s=Math.floor((a+i)/2),o=e.content[s];if(o.offset<=t&&o.end>t)return o;o.end<=t?(n=r?o:void 0,a=s+1):i=s-1}return n}function Ma(e,t=!0){for(;e.container;){const r=e.container;let n=r.content.indexOf(e);for(;n>0;){n--;const e=r.content[n];if(t||!e.hidden)return e}e=r}}function ja(e,t=!0){for(;e.container;){const r=e.container;let n=r.content.indexOf(e);const a=r.content.length-1;for(;n_i,findNameAssignment:()=>Pi,findNodeForKeyword:()=>Ni,findNodeForProperty:()=>ki,findNodesForKeyword:()=>wi,findNodesForKeywordInternal:()=>Ii,findNodesForProperty:()=>Si,getActionAtElement:()=>Di,getActionType:()=>Bi,getAllReachableRules:()=>Ri,getAllRulesUsedForCrossReferences:()=>bi,getCrossReferenceTerminal:()=>Ai,getEntryRule:()=>vi,getExplicitRuleType:()=>qi,getHiddenRules:()=>$i,getRuleType:()=>Vi,getRuleTypeName:()=>Wi,getTypeName:()=>Ui,isArrayCardinality:()=>Mi,isArrayOperator:()=>ji,isCommentTerminal:()=>Ci,isDataType:()=>zi,isDataTypeRule:()=>Fi,isOptionalCardinality:()=>Li,terminalRegex:()=>Hi});var Ua=class extends Error{static{Ge(this,"ErrorWithLocation")}constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}};function Ba(e,t="Error: Got unexpected value."){throw new Error(t)}function Wa(e,t="Error: Condition is violated."){if(!e)throw new Error(t)}Ge(Ba,"assertUnreachable"),Ge(Wa,"assertCondition");var Va={};function Ha(e){return e.charCodeAt(0)}function Ya(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}function Qa(e,t){if(!0===e[t])throw"duplicate flag "+t;e[t];e[t]=!0}function Za(e){if(void 0===e)throw Error("Internal Error - Should never get here!");return!0}function Xa(){throw Error("Internal Error - Should never get here!")}function Ja(e){return"Character"===e.type}Ke(Va,{NEWLINE_REGEXP:()=>li,escapeRegExp:()=>yi,getTerminalParts:()=>di,isMultilineComment:()=>fi,isWhitespace:()=>hi,partialMatches:()=>gi,partialRegExp:()=>Ti,whitespaceCharacters:()=>mi}),Ge(Ha,"cc"),Ge(Ya,"insertToSet"),Ge(Qa,"addFlag"),Ge(Za,"ASSERT_EXISTS"),Ge(Xa,"ASSERT_NEVER_REACH_HERE"),Ge(Ja,"isCharacter");var ei=[];for(let vF=Ha("0");vF<=Ha("9");vF++)ei.push(vF);var ti=[Ha("_")].concat(ei);for(let vF=Ha("a");vF<=Ha("z");vF++)ti.push(vF);for(let vF=Ha("A");vF<=Ha("Z");vF++)ti.push(vF);var ri=[Ha(" "),Ha("\f"),Ha("\n"),Ha("\r"),Ha("\t"),Ha("\v"),Ha("\t"),Ha("\xa0"),Ha("\u1680"),Ha("\u2000"),Ha("\u2001"),Ha("\u2002"),Ha("\u2003"),Ha("\u2004"),Ha("\u2005"),Ha("\u2006"),Ha("\u2007"),Ha("\u2008"),Ha("\u2009"),Ha("\u200a"),Ha("\u2028"),Ha("\u2029"),Ha("\u202f"),Ha("\u205f"),Ha("\u3000"),Ha("\ufeff")],ni=/[0-9a-fA-F]/,ai=/[0-9]/,ii=/[1-9]/,si=class{static{Ge(this,"RegExpParser")}constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");const t=this.disjunction();this.consumeChar("/");const r={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Qa(r,"global");break;case"i":Qa(r,"ignoreCase");break;case"m":Qa(r,"multiLine");break;case"u":Qa(r,"unicode");break;case"y":Qa(r,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:t,loc:this.loc(0)}}disjunction(){const e=[],t=this.idx;for(e.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(t)}}alternative(){const e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":let t;switch(this.consumeChar("?"),this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead";break;case"<":switch(this.popChar()){case"=":t="Lookbehind";break;case"!":t="NegativeLookbehind"}}Za(t);const r=this.disjunction();return this.consumeChar(")"),{type:t,value:r,loc:this.loc(e)}}return Xa()}quantifier(e=!1){let t;const r=this.idx;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":const r=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:r,atMost:r};break;case",":let e;this.isDigit()?(e=this.integerIncludingZero(),t={atLeast:r,atMost:e}):t={atLeast:r,atMost:1/0},this.consumeChar("}")}if(!0===e&&void 0===t)return;Za(t)}if(!0!==e||void 0!==t)return Za(t)?("?"===this.peekChar(0)?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t.loc=this.loc(r),t):void 0}atom(){let e;const t=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group()}return void 0===e&&this.isPatternCharacter()&&(e=this.patternCharacter()),Za(e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):Xa()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[Ha("\n"),Ha("\r"),Ha("\u2028"),Ha("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case"d":e=ei;break;case"D":e=ei,t=!0;break;case"s":e=ri;break;case"S":e=ri,t=!0;break;case"w":e=ti;break;case"W":e=ti,t=!0}return Za(e)?{type:"Set",value:e,complement:t}:Xa()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=Ha("\f");break;case"n":e=Ha("\n");break;case"r":e=Ha("\r");break;case"t":e=Ha("\t");break;case"v":e=Ha("\v")}return Za(e)?{type:"Character",value:e}:Xa()}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(!1===/[a-zA-Z]/.test(e))throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:Ha("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:Ha(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case"\n":case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:Ha(this.popChar())}}}characterClass(){const e=[];let t=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),t=!0);this.isClassAtom();){const t=this.classAtom();t.type;if(Ja(t)&&this.isRangeDash()){this.consumeChar("-");const r=this.classAtom();r.type;if(Ja(r)){if(r.value=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}},oi=class{static{Ge(this,"BaseRegExpVisitor")}visitChildren(e){for(const t in e){const r=e[t];e.hasOwnProperty(t)&&(void 0!==r.type?this.visit(r):Array.isArray(r)&&r.forEach(e=>{this.visit(e)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Lookbehind":this.visitLookbehind(e);break;case"NegativeLookbehind":this.visitNegativeLookbehind(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e)}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitLookbehind(e){}visitNegativeLookbehind(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}},li=/\r?\n/gm,ui=new si,ci=class extends oi{static{Ge(this,"TerminalRegExpVisitor")}constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){const t=String.fromCharCode(e.value);if(this.multiline||"\n"!==t||(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const e=yi(t);this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e)}}visitSet(e){if(!this.multiline){const t=this.regex.substring(e.loc.begin,e.loc.end),r=new RegExp(t);this.multiline=Boolean("\n".match(r))}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitChildren(e){if("Group"===e.type){if(e.quantifier)return}super.visitChildren(e)}},pi=new ci;function di(e){try{"string"!=typeof e&&(e=e.source),e=`/${e}/`;const t=ui.pattern(e),r=[];for(const n of t.value.value)pi.reset(e),pi.visit(n),r.push({start:pi.startRegexp,end:pi.endRegex});return r}catch{return[]}}function fi(e){try{return"string"==typeof e&&(e=new RegExp(e)),e=e.toString(),pi.reset(e),pi.visit(ui.pattern(e)),pi.multiline}catch{return!1}}Ge(di,"getTerminalParts"),Ge(fi,"isMultilineComment");var mi="\f\n\r\t\v \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000\ufeff".split("");function hi(e){const t="string"==typeof e?new RegExp(e):e;return mi.some(e=>t.test(e))}function yi(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function gi(e,t){const r=Ti(e),n=t.match(r);return!!n&&n[0].length>0}function Ti(e){"string"==typeof e&&(e=new RegExp(e));const t=e,r=e.source;let n=0;function a(){let e,i="";function s(e){i+=r.substr(n,e),n+=e}function o(e){i+="(?:"+r.substr(n,e)+"|$)",n+=e}for(Ge(s,"appendRaw"),Ge(o,"appendOptional");n",n)-n+1);break;default:o(2)}break;case"[":e=/\[(?:\\.|.)*?\]/g,e.lastIndex=n,e=e.exec(r)||[],o(e[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":s(1);break;case"{":e=/\{\d+,?\d*\}/g,e.lastIndex=n,e=e.exec(r),e?s(e[0].length):o(1);break;case"(":if("?"===r[n+1])switch(r[n+2]){case":":i+="(?:",n+=3,i+=a()+"|$)";break;case"=":i+="(?=",n+=3,i+=a()+")";break;case"!":e=n,n+=3,a(),i+=r.substr(e,n-e);break;case"<":switch(r[n+3]){case"=":case"!":e=n,n+=4,a(),i+=r.substr(e,n-e);break;default:s(r.indexOf(">",n)-n+1),i+=a()+"|$)"}}else s(1),i+=a()+"|$)";break;case")":return++n,i;default:o(1)}return i}return Ge(a,"process"),new RegExp(a(),e.flags)}function vi(e){return e.rules.find(e=>Pn(e)&&e.entry)}function $i(e){return e.rules.filter(e=>Jn(e)&&e.hidden)}function Ri(e,t){const r=new Set,n=vi(e);if(!n)return new Set(e.rules);const a=[n].concat($i(e));for(const s of a)Ei(s,r,t);const i=new Set;for(const s of e.rules)(r.has(s.name)||Jn(s)&&s.hidden)&&i.add(s);return i}function Ei(e,t,r){t.add(e.name),mr(e).forEach(e=>{if(zn(e)||r&&ta(e)){const n=e.rule.ref;n&&!t.has(n.name)&&Ei(n,t,r)}})}function bi(e){const t=new Set;return mr(e).forEach(e=>{Qr(e)&&(Pn(e.type.ref)&&t.add(e.type.ref),un(e.type.ref)&&Pn(e.type.ref.$container)&&t.add(e.type.ref.$container))}),t}function Ai(e){if(e.terminal)return e.terminal;if(e.type.ref){const t=Pi(e.type.ref);return t?.terminal}}function Ci(e){return e.hidden&&!hi(Hi(e))}function Si(e,t){return e&&t?xi(e,t,e.astNode,!0):[]}function ki(e,t,r){if(!e||!t)return;const n=xi(e,t,e.astNode,!0);return 0!==n.length?n[r=void 0!==r?Math.max(0,Math.min(r,n.length-1)):0]:void 0}function xi(e,t,r,n){if(!n){const r=lr(e.grammarSource,Gr);if(r&&r.feature===t)return[e]}return Yt(e)&&e.astNode===r?e.content.flatMap(e=>xi(e,t,r,!1)):[]}function wi(e,t){return e?Ii(e,t,e?.astNode):[]}function Ni(e,t,r){if(!e)return;const n=Ii(e,t,e?.astNode);return 0!==n.length?n[r=void 0!==r?Math.max(0,Math.min(r,n.length-1)):0]:void 0}function Ii(e,t,r){if(e.astNode!==r)return[];if(vn(e.grammarSource)&&e.grammarSource.value===t)return[e];const n=ba(e).iterator();let a;const i=[];do{if(a=n.next(),!a.done){const e=a.value;e.astNode===r?vn(e.grammarSource)&&e.grammarSource.value===t&&i.push(e):n.prune()}}while(!a.done);return i}function _i(e){const t=e.astNode;for(;t===e.container?.astNode;){const t=lr(e.grammarSource,Gr);if(t)return t;e=e.container}}function Pi(e){let t=e;return un(t)&&(_r(t.$container)?t=t.$container.$container:Sr(t.$container)?t=t.$container:Ba(t.$container)),Oi(e,t,new Map)}function Oi(e,t,r){function n(t,n){let a;return lr(t,Gr)||(a=Oi(n,n,r)),r.set(e,a),a}if(Ge(n,"go"),r.has(e))return r.get(e);r.set(e,void 0);for(const a of mr(t)){if(Gr(a)&&"name"===a.feature.toLowerCase())return r.set(e,a),a;if(zn(a)&&Pn(a.rule.ref))return n(a,a.rule.ref);if(qn(a)&&a.typeRef?.ref)return n(a,a.typeRef.ref)}}function Di(e){const t=e.$container;if(on(t)){const r=t.elements;for(let t=r.indexOf(e)-1;t>=0;t--){const e=r[t];if(_r(e))return e;{const e=mr(r[t]).find(_r);if(e)return e}}}return Ar(t)?Di(t):void 0}function Li(e,t){return"?"===e||"*"===e||on(t)&&Boolean(t.guardCondition)}function Mi(e){return"*"===e||"+"===e}function ji(e){return"+="===e}function Fi(e){return Gi(e,new Set)}function Gi(e,t){if(t.has(e))return!0;t.add(e);for(const r of mr(e))if(zn(r)){if(!r.rule.ref)return!1;if(Pn(r.rule.ref)&&!Gi(r.rule.ref,t))return!1;if(pn(r.rule.ref))return!1}else{if(Gr(r))return!1;if(_r(r))return!1}return Boolean(e.definition)}function zi(e){return Ki(e.type,new Set)}function Ki(e,t){if(t.has(e))return!0;if(t.add(e),jr(e))return!1;if(Dn(e))return!1;if(ua(e))return e.types.every(e=>Ki(e,t));if(qn(e)){if(void 0!==e.primitiveType)return!0;if(void 0!==e.stringType)return!0;if(void 0!==e.typeRef){const r=e.typeRef.ref;return!!na(r)&&Ki(r.type,t)}return!1}return!1}function qi(e){if(!Jn(e)){if(e.inferredType)return e.inferredType.name;if(e.dataType)return e.dataType;if(e.returnType){const t=e.returnType.ref;if(t)return t.name}}}function Ui(e){if(Sr(e))return Pn(e)&&Fi(e)?e.name:qi(e)??e.name;if(gn(e)||na(e)||Fn(e))return e.name;if(_r(e)){const t=Bi(e);if(t)return t}else if(un(e))return e.name;throw new Error("Cannot get name of Unknown Type")}function Bi(e){return e.inferredType?e.inferredType.name:e.type?.ref?Ui(e.type.ref):void 0}function Wi(e){return Jn(e)?e.type?.name??"string":Pn(e)&&Fi(e)?e.name:qi(e)??e.name}function Vi(e){return Jn(e)?e.type?.name??"string":qi(e)??e.name}function Hi(e){const t={s:!1,i:!1,u:!1},r=Qi(e.definition,t),n=Object.entries(t).filter(([,e])=>e).map(([e])=>e).join("");return new RegExp(r,n)}Ge(hi,"isWhitespace"),Ge(yi,"escapeRegExp"),Ge(gi,"partialMatches"),Ge(Ti,"partialRegExp"),Ge(vi,"getEntryRule"),Ge($i,"getHiddenRules"),Ge(Ri,"getAllReachableRules"),Ge(Ei,"ruleDfs"),Ge(bi,"getAllRulesUsedForCrossReferences"),Ge(Ai,"getCrossReferenceTerminal"),Ge(Ci,"isCommentTerminal"),Ge(Si,"findNodesForProperty"),Ge(ki,"findNodeForProperty"),Ge(xi,"findNodesForPropertyInternal"),Ge(wi,"findNodesForKeyword"),Ge(Ni,"findNodeForKeyword"),Ge(Ii,"findNodesForKeywordInternal"),Ge(_i,"findAssignment"),Ge(Pi,"findNameAssignment"),Ge(Oi,"findNameAssignmentInternal"),Ge(Di,"getActionAtElement"),Ge(Li,"isOptionalCardinality"),Ge(Mi,"isArrayCardinality"),Ge(ji,"isArrayOperator"),Ge(Fi,"isDataTypeRule"),Ge(Gi,"isDataTypeRuleInternal"),Ge(zi,"isDataType"),Ge(Ki,"isDataTypeInternal"),Ge(qi,"getExplicitRuleType"),Ge(Ui,"getTypeName"),Ge(Bi,"getActionType"),Ge(Wi,"getRuleTypeName"),Ge(Vi,"getRuleType"),Ge(Hi,"terminalRegex");var Yi=/[\s\S]/.source;function Qi(e,t){if(Vn(e))return Zi(e);if(Zn(e))return Xi(e);if(Ur(e))return ts(e);if(ta(e)){const t=e.rule.ref;if(!t)throw new Error("Missing rule reference.");return ns(Qi(t.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}if(bn(e))return es(e);if(fa(e))return Ji(e);if(Mn(e)){const r=e.regex.lastIndexOf("/"),n=e.regex.substring(1,r),a=e.regex.substring(r+1);return t&&(t.i=a.includes("i"),t.s=a.includes("s"),t.u=a.includes("u")),ns(n,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}if(ga(e))return ns(Yi,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});throw new Error(`Invalid terminal element: ${e?.$type}, ${e?.$cstNode?.text}`)}function Zi(e){return ns(e.elements.map(e=>Qi(e)).join("|"),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function Xi(e){return ns(e.elements.map(e=>Qi(e)).join(""),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function Ji(e){return ns(`${Yi}*?${Qi(e.terminal)}`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function es(e){return ns(`(?!${Qi(e.terminal)})${Yi}*?`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function ts(e){return e.right?ns(`[${rs(e.left)}-${rs(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1}):ns(rs(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function rs(e){return yi(e.value)}function ns(e,t){if(t.parenthesized||t.lookahead||!1!==t.wrap){e=`(${t.lookahead??(t.parenthesized?"":"?:")}${e})`}return t.cardinality?`${e}${t.cardinality}`:e}function as(e){const t=[],r=e.Grammar;for(const n of r.rules)Jn(n)&&Ci(n)&&fi(Hi(n))&&t.push(n.name);return{multilineCommentRules:t,nameRegexp:Na}}Ge(Qi,"abstractElementToRegex"),Ge(Zi,"terminalAlternativesToRegex"),Ge(Xi,"terminalGroupToRegex"),Ge(Ji,"untilTokenToRegex"),Ge(es,"negateTokenToRegex"),Ge(ts,"characterRangeToRegex"),Ge(rs,"keywordToRegex"),Ge(ns,"withCardinality"),Ge(as,"createGrammarConfig");var is="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,ss="object"==typeof self&&self&&self.Object===Object&&self,os=is||ss||Function("return this")(),ls=os.Symbol,us=Object.prototype,cs=us.hasOwnProperty,ps=us.toString,ds=ls?ls.toStringTag:void 0;function fs(e){var t=cs.call(e,ds),r=e[ds];try{e[ds]=void 0;var n=!0}catch(i){}var a=ps.call(e);return n&&(t?e[ds]=r:delete e[ds]),a}Ge(fs,"getRawTag");var ms=fs,hs=Object.prototype.toString;function ys(e){return hs.call(e)}Ge(ys,"objectToString");var gs=ys,Ts=ls?ls.toStringTag:void 0;function vs(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Ts&&Ts in Object(e)?ms(e):gs(e)}Ge(vs,"baseGetTag");var $s=vs;function Rs(e){return null!=e&&"object"==typeof e}Ge(Rs,"isObjectLike");var Es=Rs;function bs(e){return"symbol"==typeof e||Es(e)&&"[object Symbol]"==$s(e)}Ge(bs,"isSymbol");var As=bs;function Cs(e,t){for(var r=-1,n=null==e?0:e.length,a=Array(n);++r0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}Ge(_o,"shortOut");var Po=_o;function Oo(e){return function(){return e}}Ge(Oo,"constant");var Do=Oo,Lo=function(){try{var e=Ro(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),Mo=Po(Lo?function(e,t){return Lo(e,"toString",{configurable:!0,enumerable:!1,value:Do(t),writable:!0})}:Xs);function jo(e,t){for(var r=-1,n=null==e?0:e.length;++r-1}Ge(Ho,"arrayIncludes");var Yo=Ho,Qo=/^(?:0|[1-9]\d*)$/;function Zo(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&Qo.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}Ge(fl,"isLength");var ml=fl;function hl(e){return null!=e&&ml(e.length)&&!to(e)}Ge(hl,"isArrayLike");var yl=hl;function gl(e,t,r){if(!Fs(r))return!1;var n=typeof t;return!!("number"==n?yl(r)&&Xo(t,r.length):"string"==n&&t in r)&&rl(r[t],e)}Ge(gl,"isIterateeCall");var Tl=gl;function vl(e){return dl(function(t,r){var n=-1,a=r.length,i=a>1?r[a-1]:void 0,s=a>2?r[2]:void 0;for(i=e.length>3&&"function"==typeof i?(a--,i):void 0,s&&Tl(r[0],r[1],s)&&(i=a<3?void 0:i,a=1),t=Object(t);++n-1}Ge(Uu,"listCacheHas");var Bu=Uu;function Wu(e,t){var r=this.__data__,n=ju(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}Ge(Wu,"listCacheSet");var Vu=Wu;function Hu(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t0&&r(o)?t>1?Oc(o,t-1,r,n,a):Nc(a,o):n||(a[a.length]=o)}return a}Ge(Oc,"baseFlatten");var Dc=Oc;function Lc(e){return(null==e?0:e.length)?Dc(e,1):[]}Ge(Lc,"flatten");var Mc=Lc,jc=eu(Object.getPrototypeOf,Object);function Fc(e,t,r){var n=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(r=r>a?a:r)<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(a);++no))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var p=-1,d=!0,f=2&r?new Od:void 0;for(i.set(e,t),i.set(t,e);++p2?t[2]:void 0;for(a&&Tl(t[0],t[1],a)&&(n=1);++r=200&&(i=jd,s=!1,t=new Od(t));e:for(;++a-1?a[i?t[s]:s]:void 0}}Ge(Rm,"createFind");var Em=Rm,bm=Math.max;function Am(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var a=null==r?0:Qs(r);return a<0&&(a=bm(n+a,0)),zo(e,_f(t,3),a)}Ge(Am,"findIndex");var Cm=Em(Am);function Sm(e){return e&&e.length?e[0]:void 0}Ge(Sm,"head");var km=Sm;function xm(e,t){var r=-1,n=yl(e)?Array(e.length):[];return Gf(e,function(e,a,i){n[++r]=t(e,a,i)}),n}Ge(xm,"baseMap");var wm=xm;function Nm(e,t){return(ks(e)?Ss:wm)(e,_f(t,3))}Ge(Nm,"map");var Im=Nm;function _m(e,t){return Dc(Im(e,t),1)}Ge(_m,"flatMap");var Pm=_m,Om=Object.prototype.hasOwnProperty,Dm=Uf(function(e,t,r){Om.call(e,r)?e[r].push(t):el(e,r,[t])}),Lm=Object.prototype.hasOwnProperty;function Mm(e,t){return null!=e&&Lm.call(e,t)}Ge(Mm,"baseHas");var jm=Mm;function Fm(e,t){return null!=e&&$f(e,t,jm)}Ge(Fm,"has");var Gm=Fm;function zm(e){return"string"==typeof e||!ks(e)&&Es(e)&&"[object String]"==$s(e)}Ge(zm,"isString");var Km=zm;function qm(e,t){return Ss(t,function(t){return e[t]})}Ge(qm,"baseValues");var Um=qm;function Bm(e){return null==e?[]:Um(e,su(e))}Ge(Bm,"values");var Wm=Bm,Vm=Math.max;function Hm(e,t,r,n){e=yl(e)?e:Wm(e),r=r&&!n?Qs(r):0;var a=e.length;return r<0&&(r=Vm(a+r,0)),Km(e)?r<=a&&e.indexOf(t,r)>-1:!!a&&Vo(e,t,r)>-1}Ge(Hm,"includes");var Ym=Hm,Qm=Math.max;function Zm(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var a=null==r?0:Qs(r);return a<0&&(a=Qm(n+a,0)),Vo(e,t,a)}Ge(Zm,"indexOf");var Xm=Zm,Jm=Object.prototype.hasOwnProperty;function eh(e){if(null==e)return!0;if(yl(e)&&(ks(e)||"string"==typeof e||"function"==typeof e.splice||jl(e)||Yl(e)||_l(e)))return!e.length;var t=qp(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(bl(e))return!au(e).length;for(var r in e)if(Jm.call(e,r))return!1;return!0}Ge(eh,"isEmpty");var th=eh;function rh(e){return Es(e)&&"[object RegExp]"==$s(e)}Ge(rh,"baseIsRegExp");var nh=rh,ah=Vl&&Vl.isRegExp,ih=ah?ql(ah):nh;function sh(e){return void 0===e}Ge(sh,"isUndefined");var oh=sh;function lh(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ge(lh,"negate");var uh=lh;function ch(e,t,r,n){if(!Fs(e))return e;for(var a=-1,i=(t=Ec(t,e)).length,s=i-1,o=e;null!=o&&++a=200){var u=t?null:Sh(e);if(u)return Ud(u);s=!1,a=jd,l=new Od}else l=t?[]:o;e:for(;++n{t.accept(e)})}},jh=class extends Mh{static{Ge(this,"NonTerminal")}constructor(e){super([]),this.idx=1,lu(this,hh(e,e=>void 0!==e))}set definition(e){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(e){e.visit(this)}},Fh=class extends Mh{static{Ge(this,"Rule")}constructor(e){super(e.definition),this.orgText="",lu(this,hh(e,e=>void 0!==e))}},Gh=class extends Mh{static{Ge(this,"Alternative")}constructor(e){super(e.definition),this.ignoreAmbiguities=!1,lu(this,hh(e,e=>void 0!==e))}},zh=class extends Mh{static{Ge(this,"Option")}constructor(e){super(e.definition),this.idx=1,lu(this,hh(e,e=>void 0!==e))}},Kh=class extends Mh{static{Ge(this,"RepetitionMandatory")}constructor(e){super(e.definition),this.idx=1,lu(this,hh(e,e=>void 0!==e))}},qh=class extends Mh{static{Ge(this,"RepetitionMandatoryWithSeparator")}constructor(e){super(e.definition),this.idx=1,lu(this,hh(e,e=>void 0!==e))}},Uh=class extends Mh{static{Ge(this,"Repetition")}constructor(e){super(e.definition),this.idx=1,lu(this,hh(e,e=>void 0!==e))}},Bh=class extends Mh{static{Ge(this,"RepetitionWithSeparator")}constructor(e){super(e.definition),this.idx=1,lu(this,hh(e,e=>void 0!==e))}},Wh=class extends Mh{static{Ge(this,"Alternation")}get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,lu(this,hh(e,e=>void 0!==e))}},Vh=class{static{Ge(this,"Terminal")}constructor(e){this.idx=1,lu(this,hh(e,e=>void 0!==e))}accept(e){e.visit(this)}};function Hh(e){return Im(e,Yh)}function Yh(e){function t(e){return Im(e,Yh)}if(Ge(t,"convertDefinition"),e instanceof jh){const t={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return Km(e.label)&&(t.label=e.label),t}if(e instanceof Gh)return{type:"Alternative",definition:t(e.definition)};if(e instanceof zh)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof Kh)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof qh)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:Yh(new Vh({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof Bh)return{type:"RepetitionWithSeparator",idx:e.idx,separator:Yh(new Vh({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof Uh)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof Wh)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof Vh){const t={type:"Terminal",name:e.terminalType.name,label:Dh(e.terminalType),idx:e.idx};Km(e.label)&&(t.terminalLabel=e.label);const r=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(t.pattern=ih(r)?r.source:r),t}if(e instanceof Fh)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}Ge(Hh,"serializeGrammar"),Ge(Yh,"serializeProduction");var Qh=class{static{Ge(this,"GAstVisitor")}visit(e){const t=e;switch(t.constructor){case jh:return this.visitNonTerminal(t);case Gh:return this.visitAlternative(t);case zh:return this.visitOption(t);case Kh:return this.visitRepetitionMandatory(t);case qh:return this.visitRepetitionMandatoryWithSeparator(t);case Bh:return this.visitRepetitionWithSeparator(t);case Uh:return this.visitRepetition(t);case Wh:return this.visitAlternation(t);case Vh:return this.visitTerminal(t);case Fh:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}};function Zh(e){return e instanceof Gh||e instanceof zh||e instanceof Uh||e instanceof Kh||e instanceof qh||e instanceof Bh||e instanceof Vh||e instanceof Fh}function Xh(e,t=[]){return!!(e instanceof zh||e instanceof Uh||e instanceof Bh)||(e instanceof Wh?Ch(e.definition,e=>Xh(e,t)):!(e instanceof jh&&Ym(t,e))&&(e instanceof Mh&&(e instanceof jh&&t.push(e),ym(e.definition,e=>Xh(e,t)))))}function Jh(e){return e instanceof Wh}function ey(e){if(e instanceof jh)return"SUBRULE";if(e instanceof zh)return"OPTION";if(e instanceof Wh)return"OR";if(e instanceof Kh)return"AT_LEAST_ONE";if(e instanceof qh)return"AT_LEAST_ONE_SEP";if(e instanceof Bh)return"MANY_SEP";if(e instanceof Uh)return"MANY";if(e instanceof Vh)return"CONSUME";throw Error("non exhaustive match")}Ge(Zh,"isSequenceProd"),Ge(Xh,"isOptionalProd"),Ge(Jh,"isBranchingProd"),Ge(ey,"getProductionDslName");var ty=class{static{Ge(this,"RestWalker")}walk(e,t=[]){cm(e.definition,(r,n)=>{const a=am(e.definition,n+1);if(r instanceof jh)this.walkProdRef(r,a,t);else if(r instanceof Vh)this.walkTerminal(r,a,t);else if(r instanceof Gh)this.walkFlat(r,a,t);else if(r instanceof zh)this.walkOption(r,a,t);else if(r instanceof Kh)this.walkAtLeastOne(r,a,t);else if(r instanceof qh)this.walkAtLeastOneSep(r,a,t);else if(r instanceof Bh)this.walkManySep(r,a,t);else if(r instanceof Uh)this.walkMany(r,a,t);else{if(!(r instanceof Wh))throw Error("non exhaustive match");this.walkOr(r,a,t)}})}walkTerminal(e,t,r){}walkProdRef(e,t,r){}walkFlat(e,t,r){const n=t.concat(r);this.walk(e,n)}walkOption(e,t,r){const n=t.concat(r);this.walk(e,n)}walkAtLeastOne(e,t,r){const n=[new zh({definition:e.definition})].concat(t,r);this.walk(e,n)}walkAtLeastOneSep(e,t,r){const n=ry(e,t,r);this.walk(e,n)}walkMany(e,t,r){const n=[new zh({definition:e.definition})].concat(t,r);this.walk(e,n)}walkManySep(e,t,r){const n=ry(e,t,r);this.walk(e,n)}walkOr(e,t,r){const n=t.concat(r);cm(e.definition,e=>{const t=new Gh({definition:[e]});this.walk(t,n)})}};function ry(e,t,r){return[new zh({definition:[new Vh({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}function ny(e){if(e instanceof jh)return ny(e.referencedRule);if(e instanceof Vh)return sy(e);if(Zh(e))return ay(e);if(Jh(e))return iy(e);throw Error("non exhaustive match")}function ay(e){let t=[];const r=e.definition;let n,a=0,i=r.length>a,s=!0;for(;i&&s;)n=r[a],s=Xh(n),t=t.concat(ny(n)),a+=1,i=r.length>a;return Nh(t)}function iy(e){const t=Im(e.definition,e=>ny(e));return Nh(Mc(t))}function sy(e){return[e.terminalType]}Ge(ry,"restForRepetitionWithSeparator"),Ge(ny,"first"),Ge(ay,"firstForSequence"),Ge(iy,"firstForBranching"),Ge(sy,"firstForTerminal");var oy="_~IN~_",ly=class extends ty{static{Ge(this,"ResyncFollowsWalker")}constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,r){}walkProdRef(e,t,r){const n=cy(e.referencedRule,e.idx)+this.topProd.name,a=t.concat(r),i=ny(new Gh({definition:a}));this.follows[n]=i}};function uy(e){const t={};return cm(e,e=>{const r=new ly(e).startWalking();lu(t,r)}),t}function cy(e,t){return e.name+t+oy}Ge(uy,"computeAllProdsFollows"),Ge(cy,"buildBetweenProdsFollowPrefix");var py={},dy=new si;function fy(e){const t=e.toString();if(py.hasOwnProperty(t))return py[t];{const e=dy.pattern(t);return py[t]=e,e}}function my(){py={}}Ge(fy,"getRegExpAst"),Ge(my,"clearRegExpParserCache");var hy="Complement Sets are not supported for first char optimization",yy='Unable to use "first char" lexer optimizations:\n';function gy(e,t=!1){try{const t=fy(e);return Ty(t.value,{},t.flags.ignoreCase)}catch(r){if(r.message===hy)t&&_h(`${yy}\tUnable to optimize: < ${e.toString()} >\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let r="";t&&(r="\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),Ih(`${yy}\n\tFailed parsing: < ${e.toString()} >\n\tUsing the @chevrotain/regexp-to-ast library\n\tPlease open an issue at: https://github.com/chevrotain/chevrotain/issues`+r)}}return[]}function Ty(e,t,r){switch(e.type){case"Disjunction":for(let a=0;a{if("number"==typeof e)vy(e,t,r);else{const n=e;if(!0===r)for(let e=n.from;e<=n.to;e++)vy(e,t,r);else{for(let e=n.from;e<=n.to&&e=ng){const e=n.from>=ng?n.from:ng,r=n.to,a=ig(e),i=ig(r);for(let n=a;n<=i;n++)t[n]=n}}}});break;case"Group":Ty(i.value,t,r);break;default:throw Error("Non Exhaustive Match")}const s=void 0!==i.quantifier&&0===i.quantifier.atLeast;if("Group"===i.type&&!1===Ey(i)||"Group"!==i.type&&!1===s)break}break;default:throw Error("non exhaustive match!")}return Wm(t)}function vy(e,t,r){const n=ig(e);t[n]=n,!0===r&&$y(e,t)}function $y(e,t){const r=String.fromCharCode(e),n=r.toUpperCase();if(n!==r){const e=ig(n.charCodeAt(0));t[e]=e}else{const e=r.toLowerCase();if(e!==r){const r=ig(e.charCodeAt(0));t[r]=r}}}function Ry(e,t){return Cm(e.value,e=>{if("number"==typeof e)return Ym(t,e);{const r=e;return void 0!==Cm(t,e=>r.from<=e&&e<=r.to)}})}function Ey(e){const t=e.quantifier;return!(!t||0!==t.atLeast)||!!e.value&&(ks(e.value)?ym(e.value,Ey):Ey(e.value))}Ge(gy,"getOptimizedStartCodesIndices"),Ge(Ty,"firstCharOptimizedIndices"),Ge(vy,"addOptimizedIdxToResult"),Ge($y,"handleIgnoreCase"),Ge(Ry,"findCode"),Ge(Ey,"isWholeOptional");var by=class extends oi{static{Ge(this,"CharCodeFinder")}constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(!0!==this.found){switch(e.type){case"Lookahead":return void this.visitLookahead(e);case"NegativeLookahead":return void this.visitNegativeLookahead(e);case"Lookbehind":return void this.visitLookbehind(e);case"NegativeLookbehind":return void this.visitNegativeLookbehind(e)}super.visitChildren(e)}}visitCharacter(e){Ym(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?void 0===Ry(e,this.targetCharCodes)&&(this.found=!0):void 0!==Ry(e,this.targetCharCodes)&&(this.found=!0)}};function Ay(e,t){if(t instanceof RegExp){const r=fy(t),n=new by(e);return n.visit(r),n.found}return void 0!==Cm(t,t=>Ym(e,t.charCodeAt(0)))}Ge(Ay,"canMatchCharCode");var Cy="PATTERN",Sy="defaultMode",ky="modes";function xy(e,t){const r=(t=Vf(t,{debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:Ge((e,t)=>t(),"tracer")})).tracer;let n;r("initCharCodeToOptimizedIndexMap",()=>{sg()}),r("Reject Lexer.NA",()=>{n=Rh(e,e=>e[Cy]===Sg.NA)});let a,i,s,o,l,u,c,p,d,f,m,h=!1;r("Transform Patterns",()=>{h=!1,a=Im(n,e=>{const t=e[Cy];if(ih(t)){const e=t.source;return 1!==e.length||"^"===e||"$"===e||"."===e||t.ignoreCase?2!==e.length||"\\"!==e[0]||Ym(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],e[1])?Wy(t):e[1]:e}if(to(t))return h=!0,{exec:t};if("object"==typeof t)return h=!0,t;if("string"==typeof t){if(1===t.length)return t;{const e=t.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&");return Wy(new RegExp(e))}}throw Error("non exhaustive match")})}),r("misc mapping",()=>{i=Im(n,e=>e.tokenTypeIdx),s=Im(n,e=>{const t=e.GROUP;if(t!==Sg.SKIPPED){if(Km(t))return t;if(oh(t))return!1;throw Error("non exhaustive match")}}),o=Im(n,e=>{const t=e.LONGER_ALT;if(t){return ks(t)?Im(t,e=>Xm(n,e)):[Xm(n,t)]}}),l=Im(n,e=>e.PUSH_MODE),u=Im(n,e=>Gm(e,"POP_MODE"))}),r("Line Terminator Handling",()=>{const e=tg(t.lineTerminatorCharacters);c=Im(n,e=>!1),"onlyOffset"!==t.positionTracking&&(c=Im(n,t=>Gm(t,"LINE_BREAKS")?!!t.LINE_BREAKS:!1===Jy(t,e)&&Ay(e,t.PATTERN)))}),r("Misc Mapping #2",()=>{p=Im(n,Qy),d=Im(a,Zy),f=vh(n,(e,t)=>{const r=t.GROUP;return Km(r)&&r!==Sg.SKIPPED&&(e[r]=[]),e},{}),m=Im(a,(e,t)=>({pattern:a[t],longerAlt:o[t],canLineTerminator:c[t],isCustom:p[t],short:d[t],group:s[t],push:l[t],pop:u[t],tokenTypeIdx:i[t],tokenType:n[t]}))});let y=!0,g=[];return t.safeMode||r("First Char Optimization",()=>{g=vh(n,(e,r,n)=>{if("string"==typeof r.PATTERN){const t=ig(r.PATTERN.charCodeAt(0));rg(e,t,m[n])}else if(ks(r.START_CHARS_HINT)){let t;cm(r.START_CHARS_HINT,r=>{const a=ig("string"==typeof r?r.charCodeAt(0):r);t!==a&&(t=a,rg(e,a,m[n]))})}else if(ih(r.PATTERN))if(r.PATTERN.unicode)y=!1,t.ensureOptimizations&&Ih(`${yy}\tUnable to analyze < ${r.PATTERN.toString()} > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{const a=gy(r.PATTERN,t.ensureOptimizations);th(a)&&(y=!1),cm(a,t=>{rg(e,t,m[n])})}else t.ensureOptimizations&&Ih(`${yy}\tTokenType: <${r.name}> is using a custom token pattern without providing parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),y=!1;return e},[])}),{emptyGroups:f,patternIdxToConfig:m,charCodeToPatternIdxToConfig:g,hasCustom:h,canBeOptimized:y}}function wy(e,t){let r=[];const n=Iy(e);r=r.concat(n.errors);const a=_y(n.valid),i=a.valid;return r=r.concat(a.errors),r=r.concat(Ny(i)),r=r.concat(Gy(i)),r=r.concat(zy(i,t)),r=r.concat(Ky(i)),r}function Ny(e){let t=[];const r=$m(e,e=>ih(e[Cy]));return t=t.concat(Oy(r)),t=t.concat(My(r)),t=t.concat(jy(r)),t=t.concat(Fy(r)),t=t.concat(Dy(r)),t}function Iy(e){const t=$m(e,e=>!Gm(e,Cy));return{errors:Im(t,e=>({message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:Eg.MISSING_PATTERN,tokenTypes:[e]})),valid:em(e,t)}}function _y(e){const t=$m(e,e=>{const t=e[Cy];return!(ih(t)||to(t)||Gm(t,"exec")||Km(t))});return{errors:Im(t,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Eg.INVALID_PATTERN,tokenTypes:[e]})),valid:em(e,t)}}Ge(xy,"analyzeTokenTypes"),Ge(wy,"validatePatterns"),Ge(Ny,"validateRegExpPattern"),Ge(Iy,"findMissingPatterns"),Ge(_y,"findInvalidPatterns");var Py=/[^\\][$]/;function Oy(e){class t extends oi{static{Ge(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(e){this.found=!0}}const r=$m(e,e=>{const r=e.PATTERN;try{const e=fy(r),n=new t;return n.visit(e),n.found}catch(n){return Py.test(r.source)}});return Im(r,e=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:Eg.EOI_ANCHOR_FOUND,tokenTypes:[e]}))}function Dy(e){const t=$m(e,e=>e.PATTERN.test(""));return Im(t,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:Eg.EMPTY_MATCH_PATTERN,tokenTypes:[e]}))}Ge(Oy,"findEndOfInputAnchor"),Ge(Dy,"findEmptyMatchRegExps");var Ly=/[^\\[][\^]|^\^/;function My(e){class t extends oi{static{Ge(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}}const r=$m(e,e=>{const r=e.PATTERN;try{const e=fy(r),n=new t;return n.visit(e),n.found}catch(n){return Ly.test(r.source)}});return Im(r,e=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:Eg.SOI_ANCHOR_FOUND,tokenTypes:[e]}))}function jy(e){const t=$m(e,e=>{const t=e[Cy];return t instanceof RegExp&&(t.multiline||t.global)});return Im(t,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Eg.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}))}function Fy(e){const t=[];let r=Im(e,r=>vh(e,(e,n)=>(r.PATTERN.source!==n.PATTERN.source||Ym(t,n)||n.PATTERN===Sg.NA||(t.push(n),e.push(n)),e),[]));r=xd(r);const n=$m(r,e=>e.length>1);return Im(n,e=>{const t=Im(e,e=>e.name);return{message:`The same RegExp pattern ->${km(e).PATTERN}<-has been used in all of the following Token Types: ${t.join(", ")} <-`,type:Eg.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}})}function Gy(e){const t=$m(e,e=>{if(!Gm(e,"GROUP"))return!1;const t=e.GROUP;return t!==Sg.SKIPPED&&t!==Sg.NA&&!Km(t)});return Im(t,e=>({message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Eg.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}))}function zy(e,t){const r=$m(e,e=>void 0!==e.PUSH_MODE&&!Ym(t,e.PUSH_MODE));return Im(r,e=>({message:`Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-which does not exist`,type:Eg.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}))}function Ky(e){const t=[],r=vh(e,(e,t,r)=>{const n=t.PATTERN;return n===Sg.NA||(Km(n)?e.push({str:n,idx:r,tokenType:t}):ih(n)&&Uy(n)&&e.push({str:n.source,idx:r,tokenType:t})),e},[]);return cm(e,(e,n)=>{cm(r,({str:r,idx:a,tokenType:i})=>{if(n${i.name}<- can never be matched.\nBecause it appears AFTER the Token Type ->${e.name}<-in the lexer's definition.\nSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:r,type:Eg.UNREACHABLE_PATTERN,tokenTypes:[e,i]})}})}),t}function qy(e,t){if(ih(t)){if(By(t))return!1;const r=t.exec(e);return null!==r&&0===r.index}if(to(t))return t(e,0,[],{});if(Gm(t,"exec"))return t.exec(e,0,[],{});if("string"==typeof t)return t===e;throw Error("non exhaustive match")}function Uy(e){return void 0===Cm([".","\\","[","]","|","^","$","(",")","?","*","+","{"],t=>-1!==e.source.indexOf(t))}function By(e){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\? property in its definition\n",type:Eg.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Gm(e,ky)||n.push({message:"A MultiMode Lexer cannot be initialized without a property in its definition\n",type:Eg.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Gm(e,ky)&&Gm(e,Sy)&&!Gm(e.modes,e.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${Sy}: <${e.defaultMode}>which does not exist\n`,type:Eg.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Gm(e,ky)&&cm(e.modes,(e,t)=>{cm(e,(r,a)=>{if(oh(r))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${t}> at index: <${a}>\n`,type:Eg.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(Gm(r,"LONGER_ALT")){const a=ks(r.LONGER_ALT)?r.LONGER_ALT:[r.LONGER_ALT];cm(a,a=>{oh(a)||Ym(e,a)||n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${a.name}> on token <${r.name}> outside of mode <${t}>\n`,type:Eg.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}function Hy(e,t,r){const n=[];let a=!1;const i=xd(Mc(Wm(e.modes))),s=Rh(i,e=>e[Cy]===Sg.NA),o=tg(r);return t&&cm(s,e=>{const t=Jy(e,o);if(!1!==t){const r={message:eg(e,t),type:t.issue,tokenType:e};n.push(r)}else Gm(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(a=!0):Ay(o,e.PATTERN)&&(a=!0)}),t&&!a&&n.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:Eg.NO_LINE_BREAKS_FLAGS}),n}function Yy(e){const t={},r=su(e);return cm(r,r=>{const n=e[r];if(!ks(n))throw Error("non exhaustive match");t[r]=[]}),t}function Qy(e){const t=e.PATTERN;if(ih(t))return!1;if(to(t))return!0;if(Gm(t,"exec"))return!0;if(Km(t))return!1;throw Error("non exhaustive match")}function Zy(e){return!(!Km(e)||1!==e.length)&&e.charCodeAt(0)}Ge(My,"findStartOfInputAnchor"),Ge(jy,"findUnsupportedFlags"),Ge(Fy,"findDuplicatePatterns"),Ge(Gy,"findInvalidGroupType"),Ge(zy,"findModesThatDoNotExist"),Ge(Ky,"findUnreachablePatterns"),Ge(qy,"tryToMatchStrToPattern"),Ge(Uy,"noMetaChar"),Ge(By,"usesLookAheadOrBehind"),Ge(Wy,"addStickyFlag"),Ge(Vy,"performRuntimeChecks"),Ge(Hy,"performWarningRuntimeChecks"),Ge(Yy,"cloneEmptyGroups"),Ge(Qy,"isCustomPattern"),Ge(Zy,"isShortPattern");var Xy={test:Ge(function(e){const t=e.length;for(let r=this.lastIndex;r Token Type\n\t Root cause: ${t.errMsg}.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===Eg.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option.\n\tThe problem is in the <${e.name}> Token Type\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function tg(e){return Im(e,e=>Km(e)?e.charCodeAt(0):e)}function rg(e,t,r){void 0===e[t]?e[t]=[r]:e[t].push(r)}Ge(Jy,"checkLineBreaksIssues"),Ge(eg,"buildLineBreakIssueMessage"),Ge(tg,"getCharCodes"),Ge(rg,"addToMapOfArrays");var ng=256,ag=[];function ig(e){return e255?255+~~(e/255):e}}function og(e,t){const r=e.tokenTypeIdx;return r===t.tokenTypeIdx||!0===t.isParent&&!0===t.categoryMatchesMap[r]}function lg(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}Ge(ig,"charCodeToOptimizedIndex"),Ge(sg,"initCharCodeToOptimizedIndexMap"),Ge(og,"tokenStructuredMatcher"),Ge(lg,"tokenStructuredMatcherNoCategories");var ug=1,cg={};function pg(e){const t=dg(e);fg(t),hg(t),mg(t),cm(t,e=>{e.isParent=e.categoryMatches.length>0})}function dg(e){let t=Sd(e),r=e,n=!0;for(;n;){r=xd(Mc(Im(r,e=>e.CATEGORIES)));const e=em(r,t);t=t.concat(e),th(e)?n=!1:r=e}return t}function fg(e){cm(e,e=>{gg(e)||(cg[ug]=e,e.tokenTypeIdx=ug++),Tg(e)&&!ks(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),Tg(e)||(e.CATEGORIES=[]),vg(e)||(e.categoryMatches=[]),$g(e)||(e.categoryMatchesMap={})})}function mg(e){cm(e,e=>{e.categoryMatches=[],cm(e.categoryMatchesMap,(t,r)=>{e.categoryMatches.push(cg[r].tokenTypeIdx)})})}function hg(e){cm(e,e=>{yg([],e)})}function yg(e,t){cm(e,e=>{t.categoryMatchesMap[e.tokenTypeIdx]=!0}),cm(t.CATEGORIES,r=>{const n=e.concat(t);Ym(n,r)||yg(n,r)})}function gg(e){return Gm(e,"tokenTypeIdx")}function Tg(e){return Gm(e,"CATEGORIES")}function vg(e){return Gm(e,"categoryMatches")}function $g(e){return Gm(e,"categoryMatchesMap")}function Rg(e){return Gm(e,"tokenTypeIdx")}Ge(pg,"augmentTokenTypes"),Ge(dg,"expandCategories"),Ge(fg,"assignTokenDefaultProps"),Ge(mg,"assignCategoriesTokensProp"),Ge(hg,"assignCategoriesMapProp"),Ge(yg,"singleAssignCategoriesToksMap"),Ge(gg,"hasShortKeyProperty"),Ge(Tg,"hasCategoriesProperty"),Ge(vg,"hasExtendingTokensTypesProperty"),Ge($g,"hasExtendingTokensTypesMapProperty"),Ge(Rg,"isTokenType");var Eg,bg,Ag={buildUnableToPopLexerModeMessage:e=>`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`,buildUnexpectedCharactersMessage:(e,t,r,n,a,i)=>`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${r} characters.`};(bg=Eg||(Eg={}))[bg.MISSING_PATTERN=0]="MISSING_PATTERN",bg[bg.INVALID_PATTERN=1]="INVALID_PATTERN",bg[bg.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",bg[bg.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",bg[bg.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",bg[bg.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",bg[bg.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",bg[bg.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",bg[bg.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",bg[bg.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",bg[bg.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",bg[bg.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",bg[bg.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",bg[bg.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",bg[bg.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",bg[bg.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",bg[bg.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",bg[bg.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE";var Cg={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Ag,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Cg);var Sg=class{static{Ge(this,"Lexer")}constructor(e,t=Cg){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(e,t)=>{if(!0===this.traceInitPerf){this.traceInitIndent++;const r=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent`);const{time:n,value:a}=Ph(t),i=n>10?console.warn:console.log;return this.traceInitIndent time: ${n}ms`),this.traceInitIndent--,a}return t()},"boolean"==typeof t)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=lu({},Cg,t);const r=this.config.traceInitPerf;!0===r?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof r&&(this.traceInitMaxIdent=r,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let r,n=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===Cg.lineTerminatorsPattern)this.config.lineTerminatorsPattern=Xy;else if(this.config.lineTerminatorCharacters===Cg.lineTerminatorCharacters)throw Error("Error: Missing property on the Lexer config.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),ks(e)?r={modes:{defaultMode:Sd(e)},defaultMode:Sy}:(n=!1,r=Sd(e))}),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Vy(r,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(Hy(r,this.trackStartLines,this.config.lineTerminatorCharacters))})),r.modes=r.modes?r.modes:{},cm(r.modes,(e,t)=>{r.modes[t]=Rh(e,e=>oh(e))});const a=su(r.modes);if(cm(r.modes,(e,r)=>{this.TRACE_INIT(`Mode: <${r}> processing`,()=>{if(this.modes.push(r),!1===this.config.skipValidations&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(wy(e,a))}),th(this.lexerDefinitionErrors)){let n;pg(e),this.TRACE_INIT("analyzeTokenTypes",()=>{n=xy(e,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[r]=n.patternIdxToConfig,this.charCodeToPatternIdxToConfig[r]=n.charCodeToPatternIdxToConfig,this.emptyGroups=lu({},this.emptyGroups,n.emptyGroups),this.hasCustom=n.hasCustom||this.hasCustom,this.canModeBeOptimized[r]=n.canBeOptimized}})}),this.defaultMode=r.defaultMode,!th(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const e=Im(this.lexerDefinitionErrors,e=>e.message).join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+e)}cm(this.lexerDefinitionWarning,e=>{_h(e.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(n&&(this.handleModes=xo),!1===this.trackStartLines&&(this.computeNewColumn=Xs),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=xo),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else{if(!/onlyOffset/i.test(this.config.positionTracking))throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.createTokenInstance=this.createOffsetOnlyToken}this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{const e=vh(this.canModeBeOptimized,(e,t,r)=>(!1===t&&e.push(r),e),[]);if(t.ensureOptimizations&&!th(e))throw Error(`Lexer Modes: < ${e.join(", ")} > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{my()}),this.TRACE_INIT("toFastProperties",()=>{Oh(this)})})}tokenize(e,t=this.defaultMode){if(!th(this.lexerDefinitionErrors)){const e=Im(this.lexerDefinitionErrors,e=>e.message).join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+e)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let r,n,a,i,s,o,l,u,c,p,d,f,m,h,y;const g=e,T=g.length;let v=0,$=0;const R=this.hasCustom?0:Math.floor(e.length/10),E=new Array(R),b=[];let A=this.trackStartLines?1:void 0,C=this.trackStartLines?1:void 0;const S=Yy(this.emptyGroups),k=this.trackStartLines,x=this.config.lineTerminatorsPattern;let w=0,N=[],I=[];const _=[],P=[];Object.freeze(P);let O=!1;const D=Ge(e=>{if(1===_.length&&void 0===e.tokenType.PUSH_MODE){const t=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);b.push({offset:e.startOffset,line:e.startLine,column:e.startColumn,length:e.image.length,message:t})}else{_.pop();const e=rm(_);N=this.patternIdxToConfig[e],I=this.charCodeToPatternIdxToConfig[e],w=N.length;const t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;O=!(!I||!t)}},"pop_mode");function L(e){_.push(e),I=this.charCodeToPatternIdxToConfig[e],N=this.patternIdxToConfig[e],w=N.length,w=N.length;const t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;O=!(!I||!t)}let M;Ge(L,"push_mode"),L.call(this,t);const j=this.config.recoveryEnabled;for(;vo.length){o=i,c=i.length,l=u,M=t;break}}}break}}if(-1!==c){if(p=M.group,void 0!==p&&(o=null!==o?o:e.substring(v,v+c),d=M.tokenTypeIdx,f=this.createTokenInstance(o,v,d,M.tokenType,A,C,c),this.handlePayload(f,l),!1===p?$=this.addToken(E,$,f):S[p].push(f)),!0===k&&!0===M.canLineTerminator){let t,r,n=0;x.lastIndex=0;do{o=null!==o?o:e.substring(v,v+c),t=x.test(o),!0===t&&(r=x.lastIndex-1,n++)}while(!0===t);0!==n?(A+=n,C=c-r,this.updateTokenEndLineColumnLocation(f,p,r,n,A,C,c)):C=this.computeNewColumn(C,c)}else C=this.computeNewColumn(C,c);v+=c,this.handleModes(M,D,L,f)}else{const t=v,r=A,a=C;let i=!1===j;for(;!1===i&&v`Expecting ${xg(e)?`--\x3e ${kg(e)} <--`:`token of type --\x3e ${e.name} <--`} but found --\x3e '${t.image}' <--`,buildNotAllInputParsedMessage:({firstRedundant:e,ruleName:t})=>"Redundant input, expecting EOF but found: "+e.image,buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:r,customUserDescription:n,ruleName:a}){const i="Expecting: ",s="\nbut found: '"+km(t).image+"'";if(n)return i+n+s;{const t=vh(e,(e,t)=>e.concat(t),[]),r=Im(t,e=>`[${Im(e,e=>kg(e)).join(", ")}]`);return i+`one of these possible Token sequences:\n${Im(r,(e,t)=>` ${t+1}. ${e}`).join("\n")}`+s}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:r,ruleName:n}){const a="Expecting: ",i="\nbut found: '"+km(t).image+"'";if(r)return a+r+i;return a+`expecting at least one iteration which starts with one of these possible Token sequences::\n <${Im(e,e=>`[${Im(e,e=>kg(e)).join(",")}]`).join(" ,")}>`+i}};Object.freeze(Kg);var qg={buildRuleNotFoundError:(e,t)=>"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+"<-\ninside top level rule: ->"+e.name+"<-"},Ug={buildDuplicateFoundError(e,t){function r(e){return e instanceof Vh?e.terminalType.name:e instanceof jh?e.nonTerminalName:""}Ge(r,"getExtraProductionArgument");const n=e.name,a=km(t),i=a.idx,s=ey(a),o=r(a);let l=`->${s}${i>0?i:""}<- ${o?`with argument: ->${o}<-`:""}\n appears more than once (${t.length} times) in the top level rule: ->${n}<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n `;return l=l.replace(/[ \t]+/g," "),l=l.replace(/\s\s+/g,"\n"),l},buildNamespaceConflictError:e=>`Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter.`,buildAlternationPrefixAmbiguityError(e){const t=Im(e.prefixPath,e=>kg(e)).join(", "),r=0===e.alternation.idx?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix\nin inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\nSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details.`},buildAlternationAmbiguityError(e){const t=0===e.alternation.idx?"":e.alternation.idx,r=0===e.prefixPath.length;let n=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in inside <${e.topLevelRule.name}> Rule,\n`;if(r)n+="These alternatives are all empty (match no tokens), making them indistinguishable.\nOnly the last alternative may be empty.\n";else{n+=`<${Im(e.prefixPath,e=>kg(e)).join(", ")}> may appears as a prefix path in all these alternatives.\n`}return n+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",n},buildEmptyRepetitionError(e){let t=ey(e.repetition);0!==e.repetition.idx&&(t+=e.repetition.idx);return`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.\nThis could lead to an infinite loop.`},buildTokenNameError:e=>"deprecated",buildEmptyAlternationError:e=>`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in inside <${e.topLevelRule.name}> Rule.\nOnly the last alternative may be an empty alternative.`,buildTooManyAlternativesError:e=>`An Alternation cannot have more than 256 alternatives:\n inside <${e.topLevelRule.name}> Rule.\n has ${e.alternation.definition.length+1} alternatives.`,buildLeftRecursionError(e){const t=e.topLevelRule.name;return`Left Recursion found in grammar.\nrule: <${t}> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n ${`${t} --\x3e ${Im(e.leftRecursionPath,e=>e.name).concat([t]).join(" --\x3e ")}`}\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError:e=>"deprecated",buildDuplicateRuleNameError(e){let t;t=e.topLevelRule instanceof Fh?e.topLevelRule.name:e.topLevelRule;return`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};function Bg(e,t){const r=new Hg(e,t);return r.resolveRefs(),r.errors}Ge(Bg,"resolveGrammar");var Wg,Vg,Hg=class extends Qh{static{Ge(this,"GastRefResolverVisitor")}constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){cm(Wm(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){const t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{const t=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:t,type:Wv.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}},Yg=class extends ty{static{Ge(this,"AbstractNextPossibleTokensWalker")}constructor(e,t){super(),this.topProd=e,this.path=t,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=Sd(this.path.ruleStack).reverse(),this.occurrenceStack=Sd(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,t=[]){this.found||super.walk(e,t)}walkProdRef(e,t,r){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){const n=t.concat(r);this.updateExpectedNext(),this.walk(e.referencedRule,n)}}updateExpectedNext(){th(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},Qg=class extends Yg{static{Ge(this,"NextAfterTokenWalker")}constructor(e,t){super(e,t),this.path=t,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,r){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){const e=t.concat(r),n=new Gh({definition:e});this.possibleTokTypes=ny(n),this.found=!0}}},Zg=class extends ty{static{Ge(this,"AbstractNextTerminalAfterProductionWalker")}constructor(e,t){super(),this.topRule=e,this.occurrence=t,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},Xg=class extends Zg{static{Ge(this,"NextTerminalAfterManyWalker")}walkMany(e,t,r){if(e.idx===this.occurrence){const e=km(t.concat(r));this.result.isEndOfRule=void 0===e,e instanceof Vh&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkMany(e,t,r)}},Jg=class extends Zg{static{Ge(this,"NextTerminalAfterManySepWalker")}walkManySep(e,t,r){if(e.idx===this.occurrence){const e=km(t.concat(r));this.result.isEndOfRule=void 0===e,e instanceof Vh&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkManySep(e,t,r)}},eT=class extends Zg{static{Ge(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(e,t,r){if(e.idx===this.occurrence){const e=km(t.concat(r));this.result.isEndOfRule=void 0===e,e instanceof Vh&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOne(e,t,r)}},tT=class extends Zg{static{Ge(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(e,t,r){if(e.idx===this.occurrence){const e=km(t.concat(r));this.result.isEndOfRule=void 0===e,e instanceof Vh&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOneSep(e,t,r)}};function rT(e,t,r=[]){r=Sd(r);let n=[],a=0;function i(t){return t.concat(am(e,a+1))}function s(e){const a=rT(i(e),t,r);return n.concat(a)}for(Ge(i,"remainingPathWith"),Ge(s,"getAlternativesForProd");r.length{!1===th(e.definition)&&(n=s(e.definition))}),n;if(!(t instanceof Vh))throw Error("non exhaustive match");r.push(t.terminalType)}}a++}return n.push({partialPath:r,suffixDef:am(e,a)}),n}function nT(e,t,r,n){const a="EXIT_NONE_TERMINAL",i=[a],s="EXIT_ALTERNATIVE";let o=!1;const l=t.length,u=l-n-1,c=[],p=[];for(p.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!th(p);){const e=p.pop();if(e===s){o&&rm(p).idx<=u&&p.pop();continue}const n=e.def,d=e.idx,f=e.ruleStack,m=e.occurrenceStack;if(th(n))continue;const h=n[0];if(h===a){const e={idx:d,def:am(n),ruleStack:sm(f),occurrenceStack:sm(m)};p.push(e)}else if(h instanceof Vh)if(d=0;t--){const e={idx:d,def:h.definition[t].definition.concat(am(n)),ruleStack:f,occurrenceStack:m};p.push(e),p.push(s)}else if(h instanceof Gh)p.push({idx:d,def:h.definition.concat(am(n)),ruleStack:f,occurrenceStack:m});else{if(!(h instanceof Fh))throw Error("non exhaustive match");p.push(aT(h,d,f,m))}}return c}function aT(e,t,r,n){const a=Sd(r);a.push(e.name);const i=Sd(n);return i.push(1),{idx:t,def:e.definition,ruleStack:a,occurrenceStack:i}}function iT(e){if(e instanceof zh||"Option"===e)return Wg.OPTION;if(e instanceof Uh||"Repetition"===e)return Wg.REPETITION;if(e instanceof Kh||"RepetitionMandatory"===e)return Wg.REPETITION_MANDATORY;if(e instanceof qh||"RepetitionMandatoryWithSeparator"===e)return Wg.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof Bh||"RepetitionWithSeparator"===e)return Wg.REPETITION_WITH_SEPARATOR;if(e instanceof Wh||"Alternation"===e)return Wg.ALTERNATION;throw Error("non exhaustive match")}function sT(e){const{occurrence:t,rule:r,prodType:n,maxLookahead:a}=e,i=iT(n);return i===Wg.ALTERNATION?gT(t,r,a):TT(t,r,i,a)}function oT(e,t,r,n,a,i){const s=gT(e,t,r);return i(s,n,RT(s)?lg:og,a)}function lT(e,t,r,n,a,i){const s=TT(e,t,a,r),o=RT(s)?lg:og;return i(s[0],o,n)}function uT(e,t,r,n){const a=e.length,i=ym(e,e=>ym(e,e=>1===e.length));if(t)return function(t){const n=Im(t,e=>e.GATE);for(let i=0;iMc(e)),r=vh(t,(e,t,r)=>(cm(t,t=>{Gm(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=r),cm(t.categoryMatches,t=>{Gm(e,t)||(e[t]=r)})}),e),{});return function(){const e=this.LA(1);return r[e.tokenTypeIdx]}}return function(){for(let t=0;t1===e.length),a=e.length;if(n&&!r){const t=Mc(e);if(1===t.length&&th(t[0].categoryMatches)){const e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{const e=vh(t,(e,t,r)=>(e[t.tokenTypeIdx]=!0,cm(t.categoryMatches,t=>{e[t]=!0}),e),[]);return function(){const t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}return function(){e:for(let r=0;rrT([e],1)),n=fT(r.length),a=Im(r,e=>{const t={};return cm(e,e=>{const r=mT(e.partialPath);cm(r,e=>{t[e]=!0})}),t});let i=r;for(let s=1;s<=t;s++){const e=i;i=fT(e.length);for(let r=0;r{const t=mT(e.partialPath);cm(t,e=>{a[r][e]=!0})})}}}}return n}function gT(e,t,r,n){const a=new dT(e,Wg.ALTERNATION,n);return t.accept(a),yT(a.result,r)}function TT(e,t,r,n){const a=new dT(e,r);t.accept(a);const i=a.result,s=new pT(t,e,r).startWalking();return yT([new Gh({definition:i}),new Gh({definition:s})],n)}function vT(e,t){e:for(let r=0;r{const n=t[r];return e===n||n.categoryMatchesMap[e.tokenTypeIdx]})}function RT(e){return ym(e,e=>ym(e,e=>ym(e,e=>th(e.categoryMatches))))}function ET(e){const t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return Im(t,e=>Object.assign({type:Wv.CUSTOM_LOOKAHEAD_VALIDATION},e))}function bT(e,t,r,n){const a=Pm(e,e=>AT(e,r)),i=GT(e,t,r),s=Pm(e,e=>LT(e,r)),o=Pm(e,t=>xT(t,e,n,r));return a.concat(i,s,o)}function AT(e,t){const r=new kT;e.accept(r);const n=r.allProductions,a=Dm(n,CT),i=hh(a,e=>e.length>1);return Im(Wm(i),r=>{const n=km(r),a=t.buildDuplicateFoundError(e,r),i=ey(n),s={message:a,type:Wv.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:i,occurrence:n.idx},o=ST(n);return o&&(s.parameter=o),s})}function CT(e){return`${ey(e)}_#_${e.idx}_#_${ST(e)}`}function ST(e){return e instanceof Vh?e.terminalType.name:e instanceof jh?e.nonTerminalName:""}Ge(fT,"initializeArrayOfArrays"),Ge(mT,"pathToHashKeys"),Ge(hT,"isUniquePrefixHash"),Ge(yT,"lookAheadSequenceFromAlternatives"),Ge(gT,"getLookaheadPathsForOr"),Ge(TT,"getLookaheadPathsForOptionalProd"),Ge(vT,"containsPath"),Ge($T,"isStrictPrefixOfPath"),Ge(RT,"areTokenCategoriesNotUsed"),Ge(ET,"validateLookahead"),Ge(bT,"validateGrammar"),Ge(AT,"validateDuplicateProductions"),Ge(CT,"identifyProductionForDuplicates"),Ge(ST,"getExtraProductionArgument");var kT=class extends Qh{static{Ge(this,"OccurrenceValidationCollector")}constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}};function xT(e,t,r,n){const a=[];if(vh(t,(t,r)=>r.name===e.name?t+1:t,0)>1){const t=n.buildDuplicateRuleNameError({topLevelRule:e,grammarName:r});a.push({message:t,type:Wv.DUPLICATE_RULE_NAME,ruleName:e.name})}return a}function wT(e,t,r){const n=[];let a;return Ym(t,e)||(a=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:a,type:Wv.INVALID_RULE_OVERRIDE,ruleName:e})),n}function NT(e,t,r,n=[]){const a=[],i=IT(t.definition);if(th(i))return[];{const t=e.name;Ym(i,e)&&a.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:n}),type:Wv.LEFT_RECURSION,ruleName:t});const s=em(i,n.concat([e])),o=Pm(s,t=>{const a=Sd(n);return a.push(t),NT(e,t,r,a)});return a.concat(o)}}function IT(e){let t=[];if(th(e))return t;const r=km(e);if(r instanceof jh)t.push(r.referencedRule);else if(r instanceof Gh||r instanceof zh||r instanceof Kh||r instanceof qh||r instanceof Bh||r instanceof Uh)t=t.concat(IT(r.definition));else if(r instanceof Wh)t=Mc(Im(r.definition,e=>IT(e.definition)));else if(!(r instanceof Vh))throw Error("non exhaustive match");const n=Xh(r),a=e.length>1;if(n&&a){const r=am(e);return t.concat(IT(r))}return t}Ge(xT,"validateRuleDoesNotAlreadyExist"),Ge(wT,"validateRuleIsOverridden"),Ge(NT,"validateNoLeftRecursion"),Ge(IT,"getFirstNoneTerminal");var _T=class extends Qh{static{Ge(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};function PT(e,t){const r=new _T;e.accept(r);const n=r.alternations;return Pm(n,r=>{const n=sm(r.definition);return Pm(n,(n,a)=>{const i=nT([n],[],og,1);return th(i)?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:r,emptyChoiceIdx:a}),type:Wv.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:r.idx,alternative:a+1}]:[]})})}function OT(e,t,r){const n=new _T;e.accept(n);let a=n.alternations;a=Rh(a,e=>!0===e.ignoreAmbiguities);return Pm(a,n=>{const a=n.idx,i=n.maxLookahead||t,s=gT(a,e,i,n),o=jT(s,n,e,r),l=FT(s,n,e,r);return o.concat(l)})}Ge(PT,"validateEmptyOrAlternative"),Ge(OT,"validateAmbiguousAlternationAlternatives");var DT=class extends Qh{static{Ge(this,"RepetitionCollector")}constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}};function LT(e,t){const r=new _T;e.accept(r);const n=r.alternations;return Pm(n,r=>r.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:r}),type:Wv.TOO_MANY_ALTS,ruleName:e.name,occurrence:r.idx}]:[])}function MT(e,t,r){const n=[];return cm(e,e=>{const a=new DT;e.accept(a);const i=a.allProductions;cm(i,a=>{const i=iT(a),s=a.maxLookahead||t,o=TT(a.idx,e,i,s)[0];if(th(Mc(o))){const t=r.buildEmptyRepetitionError({topLevelRule:e,repetition:a});n.push({message:t,type:Wv.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}})}),n}function jT(e,t,r,n){const a=[],i=vh(e,(r,n,i)=>(!0===t.definition[i].ignoreAmbiguities||cm(n,n=>{const s=[i];cm(e,(e,r)=>{i!==r&&vT(e,n)&&!0!==t.definition[r].ignoreAmbiguities&&s.push(r)}),s.length>1&&!vT(a,n)&&(a.push(n),r.push({alts:s,path:n}))}),r),[]);return Im(i,e=>{const a=Im(e.alts,e=>e+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:a,prefixPath:e.path}),type:Wv.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:t.idx,alternatives:e.alts}})}function FT(e,t,r,n){const a=vh(e,(e,t,r)=>{const n=Im(t,e=>({idx:r,path:e}));return e.concat(n)},[]);return xd(Pm(a,e=>{if(!0===t.definition[e.idx].ignoreAmbiguities)return[];const i=e.idx,s=e.path,o=$m(a,e=>!0!==t.definition[e.idx].ignoreAmbiguities&&e.idx{const a=[e.idx+1,i+1],s=0===t.idx?"":t.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:a,prefixPath:e.path}),type:Wv.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:s,alternatives:a}})}))}function GT(e,t,r){const n=[],a=Im(t,e=>e.name);return cm(e,e=>{const t=e.name;if(Ym(a,t)){const a=r.buildNamespaceConflictError(e);n.push({message:a,type:Wv.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}}),n}function zT(e){const t=Vf(e,{errMsgProvider:qg}),r={};return cm(e.rules,e=>{r[e.name]=e}),Bg(r,t.errMsgProvider)}function KT(e){return bT((e=Vf(e,{errMsgProvider:Ug})).rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}Ge(LT,"validateTooManyAlts"),Ge(MT,"validateSomeNonEmptyLookaheadPath"),Ge(jT,"checkAlternativesAmbiguities"),Ge(FT,"checkPrefixAlternativesAmbiguities"),Ge(GT,"checkTerminalAndNoneTerminalsNameSpace"),Ge(zT,"resolveGrammar"),Ge(KT,"validateGrammar");var qT="MismatchedTokenException",UT="NoViableAltException",BT="EarlyExitException",WT="NotAllInputParsedException",VT=[qT,UT,BT,WT];function HT(e){return Ym(VT,e.name)}Object.freeze(VT),Ge(HT,"isRecognitionException");var YT=class extends Error{static{Ge(this,"RecognitionException")}constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},QT=class extends YT{static{Ge(this,"MismatchedTokenException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=qT}},ZT=class extends YT{static{Ge(this,"NoViableAltException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=UT}},XT=class extends YT{static{Ge(this,"NotAllInputParsedException")}constructor(e,t){super(e,t),this.name=WT}},JT=class extends YT{static{Ge(this,"EarlyExitException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=BT}},ev={},tv="InRuleRecoveryException",rv=class extends Error{static{Ge(this,"InRuleRecoveryException")}constructor(e){super(e),this.name=tv}},nv=class{static{Ge(this,"Recoverable")}initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Gm(e,"recoveryEnabled")?e.recoveryEnabled:Hv.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=av)}getTokenToInsert(e){const t=Gg(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,r,n){const a=this.findReSyncTokenType(),i=this.exportLexerState(),s=[];let o=!1;const l=this.LA(1);let u=this.LA(1);const c=Ge(()=>{const e=this.LA(0),t=this.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:l,previous:e,ruleName:this.getCurrRuleFullName()}),r=new QT(t,l,this.LA(0));r.resyncedTokens=sm(s),this.SAVE_ERROR(r)},"generateErrorMessage");for(;!o;){if(this.tokenMatcher(u,n))return void c();if(r.call(this))return c(),void e.apply(this,t);this.tokenMatcher(u,a)?o=!0:(u=this.SKIP_TOKEN(),this.addToResyncTokens(u,s))}this.importLexerState(i)}shouldInRepetitionRecoveryBeTried(e,t,r){return!1!==r&&(!this.tokenMatcher(this.LA(1),e)&&(!this.isBackTracking()&&!this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t))))}getFollowsForInRuleRecovery(e,t){const r=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(r)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t)){return this.getTokenToInsert(e)}if(this.canRecoverWithSingleTokenDeletion(e)){const e=this.SKIP_TOKEN();return this.consumeToken(),e}throw new rv("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e))return!1;if(th(t))return!1;const r=this.LA(1);return void 0!==Cm(t,e=>this.tokenMatcher(r,e))}canRecoverWithSingleTokenDeletion(e){if(!this.canTokenTypeBeDeletedInRecovery(e))return!1;return this.tokenMatcher(this.LA(2),e)}isInCurrentRuleReSyncSet(e){const t=this.getCurrFollowKey(),r=this.getFollowSetFromFollowKey(t);return Ym(r,e)}findReSyncTokenType(){const e=this.flattenFollowSet();let t=this.LA(1),r=2;for(;;){const n=Cm(e,e=>zg(t,e));if(void 0!==n)return n;t=this.LA(r),r++}}getCurrFollowKey(){if(1===this.RULE_STACK.length)return ev;const e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(r)}}buildFullFollowKeyStack(){const e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK;return Im(e,(r,n)=>0===n?ev:{ruleName:this.shortRuleNameToFullName(r),idxInCallingRule:t[n],inRule:this.shortRuleNameToFullName(e[n-1])})}flattenFollowSet(){const e=Im(this.buildFullFollowKeyStack(),e=>this.getFollowSetFromFollowKey(e));return Mc(e)}getFollowSetFromFollowKey(e){if(e===ev)return[Fg];const t=e.ruleName+e.idxInCallingRule+oy+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,Fg)||t.push(e),t}reSyncTo(e){const t=[];let r=this.LA(1);for(;!1===this.tokenMatcher(r,e);)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,t);return sm(t)}attemptInRepetitionRecovery(e,t,r,n,a,i,s){}getCurrentGrammarPath(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:Sd(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return Im(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}};function av(e,t,r,n,a,i,s){const o=this.getKeyForAutomaticLookahead(n,a);let l=this.firstAfterRepMap[o];if(void 0===l){const e=this.getCurrRuleFullName();l=new i(this.getGAstProductions()[e],a).startWalking(),this.firstAfterRepMap[o]=l}let u=l.token,c=l.occurrence;const p=l.isEndOfRule;1===this.RULE_STACK.length&&p&&void 0===u&&(u=Fg,c=1),void 0!==u&&void 0!==c&&this.shouldInRepetitionRecoveryBeTried(u,c,s)&&this.tryInRepetitionRecovery(e,t,r,u)}Ge(av,"attemptInRepetitionRecovery");var iv=1024,sv=1280,ov=1536;function lv(e,t,r){return r|t|e}Ge(lv,"getKeyForAutomaticLookahead");var uv=class{static{Ge(this,"LLkLookaheadStrategy")}constructor(e){var t;this.maxLookahead=null!==(t=null==e?void 0:e.maxLookahead)&&void 0!==t?t:Hv.maxLookahead}validate(e){const t=this.validateNoLeftRecursion(e.rules);if(th(t)){const r=this.validateEmptyOrAlternatives(e.rules),n=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),a=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...t,...r,...n,...a]}return t}validateNoLeftRecursion(e){return Pm(e,e=>NT(e,e,Ug))}validateEmptyOrAlternatives(e){return Pm(e,e=>PT(e,Ug))}validateAmbiguousAlternationAlternatives(e,t){return Pm(e,e=>OT(e,t,Ug))}validateSomeNonEmptyLookaheadPath(e,t){return MT(e,t,Ug)}buildLookaheadForAlternation(e){return oT(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,uT)}buildLookaheadForOptional(e){return lT(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,iT(e.prodType),cT)}},cv=class{static{Ge(this,"LooksAhead")}initLooksAhead(e){this.dynamicTokensEnabled=Gm(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Hv.dynamicTokensEnabled,this.maxLookahead=Gm(e,"maxLookahead")?e.maxLookahead:Hv.maxLookahead,this.lookaheadStrategy=Gm(e,"lookaheadStrategy")?e.lookaheadStrategy:new uv({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){cm(e,e=>{this.TRACE_INIT(`${e.name} Rule Lookahead`,()=>{const{alternation:t,repetition:r,option:n,repetitionMandatory:a,repetitionMandatoryWithSeparator:i,repetitionWithSeparator:s}=fv(e);cm(t,t=>{const r=0===t.idx?"":t.idx;this.TRACE_INIT(`${ey(t)}${r}`,()=>{const r=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:t.idx,rule:e,maxLookahead:t.maxLookahead||this.maxLookahead,hasPredicates:t.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),n=lv(this.fullRuleNameToShort[e.name],256,t.idx);this.setLaFuncCache(n,r)})}),cm(r,t=>{this.computeLookaheadFunc(e,t.idx,768,"Repetition",t.maxLookahead,ey(t))}),cm(n,t=>{this.computeLookaheadFunc(e,t.idx,512,"Option",t.maxLookahead,ey(t))}),cm(a,t=>{this.computeLookaheadFunc(e,t.idx,iv,"RepetitionMandatory",t.maxLookahead,ey(t))}),cm(i,t=>{this.computeLookaheadFunc(e,t.idx,ov,"RepetitionMandatoryWithSeparator",t.maxLookahead,ey(t))}),cm(s,t=>{this.computeLookaheadFunc(e,t.idx,sv,"RepetitionWithSeparator",t.maxLookahead,ey(t))})})})}computeLookaheadFunc(e,t,r,n,a,i){this.TRACE_INIT(`${i}${0===t?"":t}`,()=>{const i=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:a||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:n}),s=lv(this.fullRuleNameToShort[e.name],r,t);this.setLaFuncCache(s,i)})}getKeyForAutomaticLookahead(e,t){return lv(this.getLastExplicitRuleShortName(),e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},pv=class extends Qh{static{Ge(this,"DslMethodsCollectorVisitor")}constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}},dv=new pv;function fv(e){dv.reset(),e.accept(dv);const t=dv.dslMethods;return dv.reset(),t}function mv(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffsete.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:\n\t${t.join("\n\n").replace(/\n/g,"\n\t")}`)}},"validateVisitor")};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=t,r}function bv(e,t,r){const n=Ge(function(){},"derivedConstructor");$v(n,e+"BaseSemanticsWithDefaults");const a=Object.create(r.prototype);return cm(t,e=>{a[e]=Rv}),n.prototype=a,n.prototype.constructor=n,n}function Av(e,t){return Cv(e,t)}function Cv(e,t){const r=$m(t,t=>!1===to(e[t])),n=Im(r,t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:Tv.MISSING_METHOD,methodName:t}));return xd(n)}Ge($v,"defineNameProp"),Ge(Rv,"defaultVisit"),Ge(Ev,"createBaseSemanticVisitorConstructor"),Ge(bv,"createBaseVisitorConstructorWithDefaults"),(vv=Tv||(Tv={}))[vv.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",vv[vv.MISSING_METHOD=1]="MISSING_METHOD",Ge(Av,"validateVisitor"),Ge(Cv,"validateMissingCstMethods");var Sv=class{static{Ge(this,"TreeBuilder")}initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=Gm(e,"nodeLocationTracking")?e.nodeLocationTracking:Hv.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=hv,this.setNodeLocationFromNode=hv,this.cstPostRule=xo,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=xo,this.setNodeLocationFromNode=xo,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=mv,this.setNodeLocationFromNode=mv,this.cstPostRule=xo,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=xo,this.setNodeLocationFromNode=xo,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid config option: "${e.nodeLocationTracking}"`);this.setNodeLocationFromToken=xo,this.setNodeLocationFromNode=xo,this.cstPostRule=xo,this.setInitialNodeLocation=xo}else this.cstInvocationStateUpdate=xo,this.cstFinallyStateUpdate=xo,this.cstPostTerminal=xo,this.cstPostNonTerminal=xo,this.cstPostRule=xo}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){const t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){const t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){const t=this.LA(0),r=e.location;r.startOffset<=t.startOffset==!0?(r.endOffset=t.endOffset,r.endLine=t.endLine,r.endColumn=t.endColumn):(r.startOffset=NaN,r.startLine=NaN,r.startColumn=NaN)}cstPostRuleOnlyOffset(e){const t=this.LA(0),r=e.location;r.startOffset<=t.startOffset==!0?r.endOffset=t.endOffset:r.startOffset=NaN}cstPostTerminal(e,t){const r=this.CST_STACK[this.CST_STACK.length-1];yv(r,t,e),this.setNodeLocationFromToken(r.location,t)}cstPostNonTerminal(e,t){const r=this.CST_STACK[this.CST_STACK.length-1];gv(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){if(oh(this.baseCstVisitorConstructor)){const e=Ev(this.className,su(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(oh(this.baseCstVisitorWithDefaultsConstructor)){const e=bv(this.className,su(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){const e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}},kv=class{static{Ge(this,"LexerAdapter")}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(!0!==this.selfAnalysisDone)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Bv}LA(e){const t=this.currIdx+e;return t<0||this.tokVectorLength<=t?Bv:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}},xv=class{static{Ge(this,"RecognizerApi")}ACTION(e){return e.call(this)}consume(e,t,r){return this.consumeInternal(t,e,r)}subrule(e,t,r){return this.subruleInternal(t,e,r)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,r=Yv){if(Ym(this.definedRulesNames,e)){const t={message:Ug.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:Wv.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(t)}this.definedRulesNames.push(e);const n=this.defineRule(e,t,r);return this[e]=n,n}OVERRIDE_RULE(e,t,r=Yv){const n=wT(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(n);const a=this.defineRule(e,t,r);return this[e]=a,a}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);const r=this.saveRecogState();try{return e.apply(this,t),!0}catch(n){if(HT(n))return!1;throw n}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return Hh(Wm(this.gastProductionsCache))}},wv=class{static{Ge(this,"RecognizerEngine")}initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=lg,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},Gm(t,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a property.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details.");if(ks(e)){if(th(e))throw Error("A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0).");if("number"==typeof e[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details.")}if(ks(e))this.tokensMap=vh(e,(e,t)=>(e[t.name]=t,e),{});else if(Gm(e,"modes")&&ym(Mc(Wm(e.modes)),Rg)){const t=Mc(Wm(e.modes)),r=Nh(t);this.tokensMap=vh(r,(e,t)=>(e[t.name]=t,e),{})}else{if(!Fs(e))throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=Sd(e)}this.tokensMap.EOF=Fg;const r=Gm(e,"modes")?Mc(Wm(e.modes)):Wm(e),n=ym(r,e=>th(e.categoryMatches));this.tokenMatcher=n?lg:og,pg(Wm(this.tokensMap))}defineRule(e,t,r){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const n=Gm(r,"resyncEnabled")?r.resyncEnabled:Yv.resyncEnabled,a=Gm(r,"recoveryValueFunc")?r.recoveryValueFunc:Yv.recoveryValueFunc,i=this.ruleShortNameIdx<<12;let s;this.ruleShortNameIdx++,this.shortRuleNameToFull[i]=e,this.fullRuleNameToShort[e]=i,s=!0===this.outputCst?Ge(function(...r){try{this.ruleInvocationStateUpdate(i,e,this.subruleIdx),t.apply(this,r);const n=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(n),n}catch(s){return this.invokeRuleCatch(s,n,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry"):Ge(function(...r){try{return this.ruleInvocationStateUpdate(i,e,this.subruleIdx),t.apply(this,r)}catch(s){return this.invokeRuleCatch(s,n,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst");return Object.assign(s,{ruleName:e,originalGrammarAction:t})}invokeRuleCatch(e,t,r){const n=1===this.RULE_STACK.length,a=t&&!this.isBackTracking()&&this.recoveryEnabled;if(HT(e)){const t=e;if(a){const n=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(n)){if(t.resyncedTokens=this.reSyncTo(n),this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];return e.recoveredNode=!0,e}return r(e)}if(this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];e.recoveredNode=!0,t.partialCstResult=e}throw t}if(n)return this.moveToTerminatedState(),r(e);throw t}throw e}optionInternal(e,t){const r=this.getKeyForAutomaticLookahead(512,t);return this.optionInternalLogic(e,t,r)}optionInternalLogic(e,t,r){let n,a=this.getLaFuncFromCache(r);if("function"!=typeof e){n=e.DEF;const t=e.GATE;if(void 0!==t){const e=a;a=Ge(()=>t.call(this)&&e.call(this),"lookAheadFunc")}}else n=e;if(!0===a.call(this))return n.call(this)}atLeastOneInternal(e,t){const r=this.getKeyForAutomaticLookahead(iv,e);return this.atLeastOneInternalLogic(e,t,r)}atLeastOneInternalLogic(e,t,r){let n,a=this.getLaFuncFromCache(r);if("function"!=typeof t){n=t.DEF;const e=t.GATE;if(void 0!==e){const t=a;a=Ge(()=>e.call(this)&&t.call(this),"lookAheadFunc")}}else n=t;if(!0!==a.call(this))throw this.raiseEarlyExitException(e,Wg.REPETITION_MANDATORY,t.ERR_MSG);{let e=this.doSingleRepetition(n);for(;!0===a.call(this)&&!0===e;)e=this.doSingleRepetition(n)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],a,iv,e,eT)}atLeastOneSepFirstInternal(e,t){const r=this.getKeyForAutomaticLookahead(ov,e);this.atLeastOneSepFirstInternalLogic(e,t,r)}atLeastOneSepFirstInternalLogic(e,t,r){const n=t.DEF,a=t.SEP;if(!0!==this.getLaFuncFromCache(r).call(this))throw this.raiseEarlyExitException(e,Wg.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG);{n.call(this);const t=Ge(()=>this.tokenMatcher(this.LA(1),a),"separatorLookAheadFunc");for(;!0===this.tokenMatcher(this.LA(1),a);)this.CONSUME(a),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,a,t,n,tT],t,ov,e,tT)}}manyInternal(e,t){const r=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,t,r)}manyInternalLogic(e,t,r){let n,a=this.getLaFuncFromCache(r);if("function"!=typeof t){n=t.DEF;const e=t.GATE;if(void 0!==e){const t=a;a=Ge(()=>e.call(this)&&t.call(this),"lookaheadFunction")}}else n=t;let i=!0;for(;!0===a.call(this)&&!0===i;)i=this.doSingleRepetition(n);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],a,768,e,Xg,i)}manySepFirstInternal(e,t){const r=this.getKeyForAutomaticLookahead(sv,e);this.manySepFirstInternalLogic(e,t,r)}manySepFirstInternalLogic(e,t,r){const n=t.DEF,a=t.SEP;if(!0===this.getLaFuncFromCache(r).call(this)){n.call(this);const t=Ge(()=>this.tokenMatcher(this.LA(1),a),"separatorLookAheadFunc");for(;!0===this.tokenMatcher(this.LA(1),a);)this.CONSUME(a),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,a,t,n,Jg],t,sv,e,Jg)}}repetitionSepSecondInternal(e,t,r,n,a){for(;r();)this.CONSUME(t),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,n,a],r,ov,e,a)}doSingleRepetition(e){const t=this.getLexerPosition();e.call(this);return this.getLexerPosition()>t}orInternal(e,t){const r=this.getKeyForAutomaticLookahead(256,t),n=ks(e)?e:e.DEF,a=this.getLaFuncFromCache(r).call(this,n);if(void 0!==a){return n[a].ALT.call(this)}this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()){const e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new XT(t,e))}}subruleInternal(e,t,r){let n;try{const a=void 0!==r?r.ARGS:void 0;return this.subruleIdx=t,n=e.apply(this,a),this.cstPostNonTerminal(n,void 0!==r&&void 0!==r.LABEL?r.LABEL:e.ruleName),n}catch(a){throw this.subruleInternalError(a,r,e.ruleName)}}subruleInternalError(e,t,r){throw HT(e)&&void 0!==e.partialCstResult&&(this.cstPostNonTerminal(e.partialCstResult,void 0!==t&&void 0!==t.LABEL?t.LABEL:r),delete e.partialCstResult),e}consumeInternal(e,t,r){let n;try{const t=this.LA(1);!0===this.tokenMatcher(t,e)?(this.consumeToken(),n=t):this.consumeInternalError(e,t,r)}catch(a){n=this.consumeInternalRecovery(e,t,a)}return this.cstPostTerminal(void 0!==r&&void 0!==r.LABEL?r.LABEL:e.name,n),n}consumeInternalError(e,t,r){let n;const a=this.LA(0);throw n=void 0!==r&&r.ERR_MSG?r.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:a,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new QT(n,t,a))}consumeInternalRecovery(e,t,r){if(!this.recoveryEnabled||"MismatchedTokenException"!==r.name||this.isBackTracking())throw r;{const a=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,a)}catch(n){throw n.name===tv?r:n}}}saveRecogState(){const e=this.errors,t=Sd(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,r){this.RULE_OCCURRENCE_STACK.push(r),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return 0!==this.isBackTrackingStack.length}getCurrRuleFullName(){const e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),Fg)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},Nv=class{static{Ge(this,"ErrorHandler")}initErrorHandler(e){this._errors=[],this.errorMessageProvider=Gm(e,"errorMessageProvider")?e.errorMessageProvider:Hv.errorMessageProvider}SAVE_ERROR(e){if(HT(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Sd(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return Sd(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,r){const n=this.getCurrRuleFullName(),a=TT(e,this.getGAstProductions()[n],t,this.maxLookahead)[0],i=[];for(let o=1;o<=this.maxLookahead;o++)i.push(this.LA(o));const s=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:a,actual:i,previous:this.LA(0),customUserDescription:r,ruleName:n});throw this.SAVE_ERROR(new JT(s,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){const r=this.getCurrRuleFullName(),n=gT(e,this.getGAstProductions()[r],this.maxLookahead),a=[];for(let o=1;o<=this.maxLookahead;o++)a.push(this.LA(o));const i=this.LA(0),s=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:n,actual:a,previous:i,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new ZT(s,this.LA(1),i))}},Iv=class{static{Ge(this,"ContentAssist")}initContentAssist(){}computeContentAssist(e,t){const r=this.gastProductionsCache[e];if(oh(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return nT([r],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const t=km(e.ruleStack),r=this.getGAstProductions()[t];return new Qg(r,e).startWalking()}},_v={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(_v);var Pv=!0,Ov=Math.pow(2,8)-1,Dv=Mg({name:"RECORDING_PHASE_TOKEN",pattern:Sg.NA});pg([Dv]);var Lv=Gg(Dv,"This IToken indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(Lv);var Mv={name:"This CSTNode indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",children:{}},jv=class{static{Ge(this,"GastRecorder")}initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){const t=e>0?e:"";this[`CONSUME${t}`]=function(t,r){return this.consumeInternalRecord(t,e,r)},this[`SUBRULE${t}`]=function(t,r){return this.subruleInternalRecord(t,e,r)},this[`OPTION${t}`]=function(t){return this.optionInternalRecord(t,e)},this[`OR${t}`]=function(t){return this.orInternalRecord(t,e)},this[`MANY${t}`]=function(t){this.manyInternalRecord(e,t)},this[`MANY_SEP${t}`]=function(t){this.manySepFirstInternalRecord(e,t)},this[`AT_LEAST_ONE${t}`]=function(t){this.atLeastOneInternalRecord(e,t)},this[`AT_LEAST_ONE_SEP${t}`]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}}this.consume=function(e,t,r){return this.consumeInternalRecord(t,e,r)},this.subrule=function(e,t,r){return this.subruleInternalRecord(t,e,r)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{const e=this;for(let t=0;t<10;t++){const r=t>0?t:"";delete e[`CONSUME${r}`],delete e[`SUBRULE${r}`],delete e[`OPTION${r}`],delete e[`OR${r}`],delete e[`MANY${r}`],delete e[`MANY_SEP${r}`],delete e[`AT_LEAST_ONE${r}`],delete e[`AT_LEAST_ONE_SEP${r}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return Bv}topLevelRuleRecord(e,t){try{const r=new Fh({definition:[],name:e});return r.name=e,this.recordingProdStack.push(r),t.call(this),this.recordingProdStack.pop(),r}catch(r){if(!0!==r.KNOWN_RECORDER_ERROR)try{r.message=r.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://chevrotain.io/docs/guide/internals.html#grammar-recording'}catch(n){throw r}throw r}}optionInternalRecord(e,t){return Fv.call(this,zh,e,t)}atLeastOneInternalRecord(e,t){Fv.call(this,Kh,t,e)}atLeastOneSepFirstInternalRecord(e,t){Fv.call(this,qh,t,e,Pv)}manyInternalRecord(e,t){Fv.call(this,Uh,t,e)}manySepFirstInternalRecord(e,t){Fv.call(this,Bh,t,e,Pv)}orInternalRecord(e,t){return Gv.call(this,e,t)}subruleInternalRecord(e,t,r){if(Kv(t),!e||!1===Gm(e,"ruleName")){const r=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw r.KNOWN_RECORDER_ERROR=!0,r}const n=rm(this.recordingProdStack),a=e.ruleName,i=new jh({idx:t,nonTerminalName:a,label:null==r?void 0:r.LABEL,referencedRule:void 0});return n.definition.push(i),this.outputCst?Mv:_v}consumeInternalRecord(e,t,r){if(Kv(t),!gg(e)){const r=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw r.KNOWN_RECORDER_ERROR=!0,r}const n=rm(this.recordingProdStack),a=new Vh({idx:t,terminalType:e,label:null==r?void 0:r.LABEL});return n.definition.push(a),Lv}};function Fv(e,t,r,n=!1){Kv(r);const a=rm(this.recordingProdStack),i=to(t)?t:t.DEF,s=new e({definition:[],idx:r});return n&&(s.separator=t.SEP),Gm(t,"MAX_LOOKAHEAD")&&(s.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(s),i.call(this),a.definition.push(s),this.recordingProdStack.pop(),_v}function Gv(e,t){Kv(t);const r=rm(this.recordingProdStack),n=!1===ks(e),a=!1===n?e:e.DEF,i=new Wh({definition:[],idx:t,ignoreAmbiguities:n&&!0===e.IGNORE_AMBIGUITIES});Gm(e,"MAX_LOOKAHEAD")&&(i.maxLookahead=e.MAX_LOOKAHEAD);const s=Ch(a,e=>to(e.GATE));return i.hasPredicates=s,r.definition.push(i),cm(a,e=>{const t=new Gh({definition:[]});i.definition.push(t),Gm(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:Gm(e,"GATE")&&(t.ignoreAmbiguities=!0),this.recordingProdStack.push(t),e.ALT.call(this),this.recordingProdStack.pop()}),_v}function zv(e){return 0===e?"":`${e}`}function Kv(e){if(e<0||e>Ov){const t=new Error(`Invalid DSL Method idx value: <${e}>\n\tIdx value must be a none negative value smaller than ${Ov+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}Ge(Fv,"recordProd"),Ge(Gv,"recordOrProd"),Ge(zv,"getIdxSuffix"),Ge(Kv,"assertMethodIdxIsValid");var qv=class{static{Ge(this,"PerformanceTracer")}initPerformanceTracer(e){if(Gm(e,"traceInitPerf")){const t=e.traceInitPerf,r="number"==typeof t;this.traceInitMaxIdent=r?t:1/0,this.traceInitPerf=r?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=Hv.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(!0===this.traceInitPerf){this.traceInitIndent++;const r=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent`);const{time:n,value:a}=Ph(t),i=n>10?console.warn:console.log;return this.traceInitIndent time: ${n}ms`),this.traceInitIndent--,a}return t()}};function Uv(e,t){t.forEach(t=>{const r=t.prototype;Object.getOwnPropertyNames(r).forEach(n=>{if("constructor"===n)return;const a=Object.getOwnPropertyDescriptor(r,n);a&&(a.get||a.set)?Object.defineProperty(e.prototype,n,a):e.prototype[n]=t.prototype[n]})})}Ge(Uv,"applyMixins");var Bv=Gg(Fg,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Bv);var Wv,Vv,Hv=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Kg,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Yv=Object.freeze({recoveryValueFunc:Ge(()=>{},"recoveryValueFunc"),resyncEnabled:!0});function Qv(e=void 0){return function(){return e}}(Vv=Wv||(Wv={}))[Vv.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",Vv[Vv.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",Vv[Vv.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",Vv[Vv.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",Vv[Vv.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",Vv[Vv.LEFT_RECURSION=5]="LEFT_RECURSION",Vv[Vv.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",Vv[Vv.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",Vv[Vv.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",Vv[Vv.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",Vv[Vv.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",Vv[Vv.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",Vv[Vv.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",Vv[Vv.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION",Ge(Qv,"EMPTY_ALT");var Zv=class e{static{Ge(this,"Parser")}static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let t;this.selfAnalysisDone=!0;const r=this.className;this.TRACE_INIT("toFastProps",()=>{Oh(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),cm(this.definedRulesNames,e=>{const t=this[e].originalGrammarAction;let r;this.TRACE_INIT(`${e} Rule`,()=>{r=this.topLevelRuleRecord(e,t)}),this.gastProductionsCache[e]=r})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=zT({rules:Wm(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(th(n)&&!1===this.skipValidations){const e=KT({rules:Wm(this.gastProductionsCache),tokenTypes:Wm(this.tokensMap),errMsgProvider:Ug,grammarName:r}),t=ET({lookaheadStrategy:this.lookaheadStrategy,rules:Wm(this.gastProductionsCache),tokenTypes:Wm(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(e,t)}}),th(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{const e=uy(Wm(this.gastProductionsCache));this.resyncFollows=e}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var e,t;null===(t=(e=this.lookaheadStrategy).initialize)||void 0===t||t.call(e,{rules:Wm(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Wm(this.gastProductionsCache))})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!th(this.definitionErrors))throw t=Im(this.definitionErrors,e=>e.message),new Error(`Parser Definition Errors detected:\n ${t.join("\n-------------------------------\n")}`)})}constructor(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;const r=this;if(r.initErrorHandler(t),r.initLexerAdapter(),r.initLooksAhead(t),r.initRecognizerEngine(e,t),r.initRecoverable(t),r.initTreeBuilder(t),r.initContentAssist(),r.initGastRecorder(t),r.initPerformanceTracer(t),Gm(t,"ignoredIssues"))throw new Error("The IParserConfig property has been deprecated.\n\tPlease use the flag on the relevant DSL method instead.\n\tSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\n\tFor further details.");this.skipValidations=Gm(t,"skipValidations")?t.skipValidations:Hv.skipValidations}};Zv.DEFER_DEFINITION_ERRORS_HANDLING=!1,Uv(Zv,[nv,cv,Sv,kv,wv,xv,Nv,Iv,jv,qv]);var Xv=class extends Zv{static{Ge(this,"EmbeddedActionsParser")}constructor(e,t=Hv){const r=Sd(t);r.outputCst=!1,super(e,r)}};function Jv(e,t){for(var r=-1,n=null==e?0:e.length,a=Array(n);++r-1}Ge(d$,"listCacheHas");var f$=d$;function m$(e,t){var r=this.__data__,n=s$(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}Ge(m$,"listCacheSet");var h$=m$;function y$(e){var t=-1,r=null==e?0:e.length;for(this.clear();++to))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var p=-1,d=!0,f=2&r?new XR:void 0;for(i.set(e,t),i.set(t,e);++p-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}Ge(WE,"isLength");var VE=WE,HE={};function YE(e){return wE(e)&&VE(e.length)&&!!HE[z$(e)]}HE["[object Float32Array]"]=HE["[object Float64Array]"]=HE["[object Int8Array]"]=HE["[object Int16Array]"]=HE["[object Int32Array]"]=HE["[object Uint8Array]"]=HE["[object Uint8ClampedArray]"]=HE["[object Uint16Array]"]=HE["[object Uint32Array]"]=!0,HE["[object Arguments]"]=HE["[object Array]"]=HE["[object ArrayBuffer]"]=HE["[object Boolean]"]=HE["[object DataView]"]=HE["[object Date]"]=HE["[object Error]"]=HE["[object Function]"]=HE["[object Map]"]=HE["[object Number]"]=HE["[object Object]"]=HE["[object RegExp]"]=HE["[object Set]"]=HE["[object String]"]=HE["[object WeakMap]"]=!1,Ge(YE,"baseIsTypedArray");var QE=YE;function ZE(e){return function(t){return e(t)}}Ge(ZE,"baseUnary");var XE=ZE,JE="object"==typeof exports&&exports&&!exports.nodeType&&exports,eb=JE&&"object"==typeof module&&module&&!module.nodeType&&module,tb=eb&&eb.exports===JE&&S$.process,rb=function(){try{var e=eb&&eb.require&&eb.require("util").types;return e||tb&&tb.binding&&tb.binding("util")}catch(t){}}(),nb=rb&&rb.isTypedArray,ab=nb?XE(nb):QE,ib=Object.prototype.hasOwnProperty;function sb(e,t){var r=yE(e),n=!r&&LE(e),a=!r&&!n&&KE(e),i=!r&&!n&&!a&&ab(e),s=r||n||a||i,o=s?kE(e.length,String):[],l=o.length;for(var u in e)!t&&!ib.call(e,u)||s&&("length"==u||a&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||BE(u,l))||o.push(u);return o}Ge(sb,"arrayLikeKeys");var ob=sb,lb=Object.prototype;function ub(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||lb)}Ge(ub,"isPrototype");var cb=ub;function pb(e,t){return function(r){return e(t(r))}}Ge(pb,"overArg");var db=pb(Object.keys,Object),fb=Object.prototype.hasOwnProperty;function mb(e){if(!cb(e))return db(e);var t=[];for(var r in Object(e))fb.call(e,r)&&"constructor"!=r&&t.push(r);return t}Ge(mb,"baseKeys");var hb=mb;function yb(e){return null!=e&&VE(e.length)&&!B$(e)}Ge(yb,"isArrayLike");var gb=yb;function Tb(e){return gb(e)?ob(e):hb(e)}Ge(Tb,"keys");var vb=Tb;function $b(e){return TE(e,vb,CE)}Ge($b,"getAllKeys");var Rb=$b,Eb=Object.prototype.hasOwnProperty;function bb(e,t,r,n,a,i){var s=1&r,o=Rb(e),l=o.length;if(l!=Rb(t).length&&!s)return!1;for(var u=l;u--;){var c=o[u];if(!(s?c in t:Eb.call(t,c)))return!1}var p=i.get(e),d=i.get(t);if(p&&d)return p==t&&d==e;var f=!0;i.set(e,t),i.set(t,e);for(var m=s;++uyC(e,t,r));return xC(e,t,n,r,...a)}function EC(e,t,r){const n=DC(e,t,r,{type:1});kC(e,n);return SC(e,t,r,xC(e,t,n,r,bC(e,t,r)))}function bC(e,t,r){const n=lC(aC(r.definition,r=>yC(e,t,r)),e=>void 0!==e);return 1===n.length?n[0]:0===n.length?void 0:NC(e,n)}function AC(e,t,r,n,a){const i=n.left,s=n.right,o=DC(e,t,r,{type:11});kC(e,o);const l=DC(e,t,r,{type:12});return i.loopback=o,l.loopback=o,e.decisionMap[uC(t,a?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=o,OC(s,o),void 0===a?(OC(o,i),OC(o,l)):(OC(o,l),OC(o,a.left),OC(a.right,i)),{left:i,right:l}}function CC(e,t,r,n,a){const i=n.left,s=n.right,o=DC(e,t,r,{type:10});kC(e,o);const l=DC(e,t,r,{type:12}),u=DC(e,t,r,{type:9});return o.loopback=u,l.loopback=u,OC(o,i),OC(o,l),OC(s,u),void 0!==a?(OC(u,l),OC(u,a.left),OC(a.right,i)):OC(u,o),e.decisionMap[uC(t,a?"RepetitionWithSeparator":"Repetition",r.idx)]=o,{left:o,right:l}}function SC(e,t,r,n){const a=n.left;return OC(a,n.right),e.decisionMap[uC(t,"Option",r.idx)]=a,n}function kC(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}function xC(e,t,r,n,...a){const i=DC(e,t,n,{type:8,start:r});r.end=i;for(const o of a)void 0!==o?(OC(r,o.left),OC(o.right,i)):OC(r,i);const s={left:r,right:i};return e.decisionMap[uC(t,wC(n),n.idx)]=r,s}function wC(e){if(e instanceof Wh)return"Alternation";if(e instanceof zh)return"Option";if(e instanceof Uh)return"Repetition";if(e instanceof Bh)return"RepetitionWithSeparator";if(e instanceof Kh)return"RepetitionMandatory";if(e instanceof qh)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function NC(e,t){const r=t.length;for(let i=0;ie.alt)}get key(){let e="";for(const t in this.map)e+=t+":";return e}};function GC(e,t=!0){return`${t?`a${e.alt}`:""}s${e.state.stateNumber}:${e.stack.map(e=>e.stateNumber.toString()).join("_")}`}function zC(e,t,r){for(var n=-1,a=e.length;++n0&&r(o)?t>1?QC(o,t-1,r,n,a):hE(a,o):n||(a[a.length]=o)}return a}Ge(QC,"baseFlatten");var ZC=QC;function XC(e,t){return ZC(aC(e,t),1)}Ge(XC,"flatMap");var JC=XC;function eS(e,t,r,n){for(var a=e.length,i=r+(n?1:-1);n?i--:++i-1}Ge(lS,"arrayIncludes");var uS=lS;function cS(e,t,r){for(var n=-1,a=null==e?0:e.length;++n=200){var u=t?null:mS(e);if(u)return uE(u);s=!1,a=rE,l=new XR}else l=t?[]:o;e:for(;++n{const a=n.toString();let i=r[a];return void 0!==i||(i={atnStartState:e,decision:t,states:{}},r[a]=i),i}}Ge(LS,"createDFACache");var MS=class{static{Ge(this,"PredicateSet")}constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e="";const t=this.predicates.length;for(let r=0;rconsole.log(e)}initialize(e){this.atn=mC(e.rules),this.dfas=zS(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){const{prodOccurrence:t,rule:r,hasPredicates:n,dynamicTokensEnabled:a}=e,i=this.dfas,s=this.logging,o=uC(r,"Alternation",t),l=this.atn.decisionMap[o].decision,u=aC(sT({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:r}),e=>aC(e,e=>e[0]));if(GS(u,!1)&&!a){const e=DS(u,(e,t,r)=>(SS(t,t=>{t&&(e[t.tokenTypeIdx]=r,SS(t.categoryMatches,t=>{e[t]=r}))}),e),{});return n?function(t){var r;const n=this.LA(1),a=e[n.tokenTypeIdx];if(void 0!==t&&void 0!==a){const e=null===(r=t[a])||void 0===r?void 0:r.GATE;if(void 0!==e&&!1===e.call(this))return}return a}:function(){const t=this.LA(1);return e[t.tokenTypeIdx]}}return n?function(e){const t=new MS,r=void 0===e?0:e.length;for(let a=0;aaC(e,e=>e[0]));if(GS(u)&&u[0][0]&&!a){const e=u[0],t=$S(e);if(1===t.length&&wS(t[0].categoryMatches)){const e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{const e=DS(t,(e,t)=>(void 0!==t&&(e[t.tokenTypeIdx]=!0,SS(t.categoryMatches,t=>{e[t]=!0})),e),{});return function(){const t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}return function(){const e=KS.call(this,i,l,jS,s);return"object"!=typeof e&&0===e}}};function GS(e,t=!0){const r=new Set;for(const n of e){const e=new Set;for(const a of n){if(void 0===a){if(t)break;return!1}const n=[a.tokenTypeIdx].concat(a.categoryMatches);for(const t of n)if(r.has(t)){if(!e.has(t))return!1}else r.add(t),e.add(t)}}return!0}function zS(e){const t=e.decisionStates.length,r=Array(t);for(let n=0;nkg(e)).join(", "),r=0===e.production.idx?"":e.production.idx;let n=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${VS(e.production)}${r}> inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\n`;return n+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",n}function VS(e){if(e instanceof jh)return"SUBRULE";if(e instanceof zh)return"OPTION";if(e instanceof Wh)return"OR";if(e instanceof Kh)return"AT_LEAST_ONE";if(e instanceof qh)return"AT_LEAST_ONE_SEP";if(e instanceof Bh)return"MANY_SEP";if(e instanceof Uh)return"MANY";if(e instanceof Vh)return"CONSUME";throw Error("non exhaustive match")}function HS(e,t,r){const n=JC(t.configs.elements,e=>e.state.transitions);return{actualToken:r,possibleTokenTypes:TS(n.filter(e=>e instanceof pC).map(e=>e.tokenType),e=>e.tokenTypeIdx),tokenPath:e}}function YS(e,t){return e.edges[t.tokenTypeIdx]}function QS(e,t,r){const n=new FC,a=[];for(const s of e.elements){if(!1===r.is(s.alt))continue;if(7===s.state.type){a.push(s);continue}const e=s.state.transitions.length;for(let r=0;r0&&!ik(i))for(const s of a)i.add(s);return i}function ZS(e,t){if(e instanceof pC&&zg(t,e.tokenType))return e.target}function XS(e,t){let r;for(const n of e.elements)if(!0===t.is(n.alt))if(void 0===r)r=n.alt;else if(r!==n.alt)return;return r}function JS(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function ek(e,t,r,n){return n=tk(e,n),t.edges[r.tokenTypeIdx]=n,n}function tk(e,t){if(t===jC)return t;const r=t.configs.key,n=e.states[r];return void 0!==n?n:(t.configs.finalize(),e.states[r]=t,t)}function rk(e){const t=new FC,r=e.transitions.length;for(let n=0;n0){const r=[...e.stack];nk({state:r.pop(),alt:e.alt,stack:r},t)}else t.add(e);return}r.epsilonOnlyTransitions||t.add(e);const n=r.transitions.length;for(let a=0;a1)return!0;return!1}function ck(e){for(const t of Array.from(e.values()))if(1===Object.keys(t).length)return!0;return!1}Ge(GS,"isLL1Sequence"),Ge(zS,"initATNSimulator"),Ge(KS,"adaptivePredict"),Ge(qS,"performLookahead"),Ge(US,"computeLookaheadTarget"),Ge(BS,"reportLookaheadAmbiguity"),Ge(WS,"buildAmbiguityError"),Ge(VS,"getProductionDslName"),Ge(HS,"buildAdaptivePredictError"),Ge(YS,"getExistingTargetState"),Ge(QS,"computeReachSet"),Ge(ZS,"getReachableTarget"),Ge(XS,"getUniqueAlt"),Ge(JS,"newDFAState"),Ge(ek,"addDFAEdge"),Ge(tk,"addDFAState"),Ge(rk,"computeStartState"),Ge(nk,"closure"),Ge(ak,"getEpsilonTarget"),Ge(ik,"hasConfigInRuleStopState"),Ge(sk,"allConfigsInRuleStopStates"),Ge(ok,"hasConflictTerminatingPrediction"),Ge(lk,"getConflictingAltSets"),Ge(uk,"hasConflictingAltSet"),Ge(ck,"hasStateAssociatedWithOneAlt"),Qe();var pk=class{static{Ge(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new yk(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){const t=new mk;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){const r=new fk(e.startOffset,e.image.length,Sa(e),e.tokenType,!t);return r.grammarSource=t,r.root=this.rootNode,this.current.content.push(r),r}removeNode(e){const t=e.container;if(t){const r=t.content.indexOf(e);r>=0&&t.content.splice(r,1)}}addHiddenNodes(e){const t=[];for(const a of e){const e=new fk(a.startOffset,a.image.length,Sa(a),a.tokenType,!0);e.root=this.rootNode,t.push(e)}let r=this.current,n=!1;if(r.content.length>0)r.content.push(...t);else{for(;r.container;){const e=r.container.content.indexOf(r);if(e>0){r.container.content.splice(e,0,...t),n=!0;break}r=r.container}n||this.rootNode.content.unshift(...t)}}construct(e){const t=this.current;"string"!=typeof e.$type||e.$infixName||(this.current.astNode=e),e.$cstNode=t;const r=this.nodeStack.pop();0===r?.content.length&&this.removeNode(r)}},dk=class{static{Ge(this,"AbstractCstNode")}get hidden(){return!1}get astNode(){const e="string"==typeof this._astNode?.$type?this._astNode:this.container?.astNode;if(!e)throw new Error("This node has no associated AST element");return e}set astNode(e){this._astNode=e}get text(){return this.root.fullText.substring(this.offset,this.end)}},fk=class extends dk{static{Ge(this,"LeafCstNodeImpl")}get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,t,r,n,a=!1){super(),this._hidden=a,this._offset=e,this._tokenType=n,this._length=t,this._range=r}},mk=class extends dk{static{Ge(this,"CompositeCstNodeImpl")}constructor(){super(...arguments),this.content=new hk(this)}get offset(){return this.firstNonHiddenNode?.offset??0}get length(){return this.end-this.offset}get end(){return this.lastNonHiddenNode?.end??0}get range(){const e=this.firstNonHiddenNode,t=this.lastNonHiddenNode;if(e&&t){if(void 0===this._rangeCache){const{range:r}=e,{range:n}=t;this._rangeCache={start:r.start,end:n.end.line=0;e--){const t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}},hk=class e extends Array{static{Ge(this,"CstNodeContainer")}constructor(t){super(),this.parent=t,Object.setPrototypeOf(this,e.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,t,...r){return this.addParents(r),super.splice(e,t,...r)}addParents(e){for(const t of e)t.container=this.parent}},yk=class extends mk{static{Ge(this,"RootCstNodeImpl")}get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}},gk=Symbol("Datatype");function Tk(e){return e.$type===gk}Ge(Tk,"isDataTypeNode");var vk=Ge(e=>e.endsWith("\u200b")?e:e+"\u200b","withRuleSuffix"),$k=class{static{Ge(this,"AbstractLangiumParser")}constructor(e){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;const t=this.lexer.definition,r="production"===e.LanguageMetaData.mode;e.shared.profilers.LangiumProfiler?.isActive("parsing")?this.wrapper=new kk(t,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new Sk(t,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider})}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}getRule(e){return this.allRules.get(e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},Rk=class extends $k{static{Ge(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new pk,this.stack=[],this.assignmentMap=new Map,this.operatorPrecedence=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){const r=this.computeRuleType(e);let n;pn(e)&&(n=e.name,this.registerPrecedenceMap(e));const a=this.wrapper.DEFINE_RULE(vk(e.name),this.startImplementation(r,n,t).bind(this));return this.allRules.set(e.name,a),Pn(e)&&e.entry&&(this.mainRule=a),a}registerPrecedenceMap(e){const t=e.name,r=new Map;for(let n=0;n0&&(t=this.construct()),void 0===t)throw new Error("No result from parser");if(this.stack.length>0)throw new Error("Parser stack is not empty after parsing");return t}startImplementation(e,t,r){return n=>{const a=!this.isRecording()&&void 0!==e;if(a){const r={$type:e};this.stack.push(r),e===gk?r.value="":void 0!==t&&(r.$infixName=t)}return r(n),a?this.construct():void 0}}extractHiddenTokens(e){const t=this.lexerResult.hidden;if(!t.length)return[];const r=e.startOffset;for(let n=0;nr)return t.splice(0,n)}return t.splice(0,t.length)}consume(e,t,r){const n=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(n)){const e=this.extractHiddenTokens(n);this.nodeBuilder.addHiddenNodes(e);const t=this.nodeBuilder.buildLeafNode(n,r),{assignment:a,crossRef:i}=this.getAssignment(r),s=this.current;if(a){const e=vn(r)?n.image:this.converter.convert(n.image,t);this.assign(a.operator,a.feature,e,t,i)}else if(Tk(s)){let e=n.image;vn(r)||(e=this.converter.convert(e,t).toString()),s.value+=e}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&"number"==typeof e.endOffset&&!isNaN(e.endOffset)}subrule(e,t,r,n,a){let i,s;this.isRecording()||r||(i=this.nodeBuilder.buildCompositeNode(n));try{s=this.wrapper.wrapSubrule(e,t,a)}finally{this.isRecording()||(void 0!==s||r||(s=this.construct()),void 0!==s&&i&&i.length>0&&this.performSubruleAssignment(s,n,i))}}performSubruleAssignment(e,t,r){const{assignment:n,crossRef:a}=this.getAssignment(t);if(n)this.assign(n.operator,n.feature,e,r,a);else if(!n){const t=this.current;if(Tk(t))t.value+=e.toString();else if("object"==typeof e&&e){const r=this.assignWithoutOverride(e,t);this.stack.pop(),this.stack.push(r)}}}action(e,t){if(!this.isRecording()){let r=this.current;if(t.feature&&t.operator){r=this.construct(),this.nodeBuilder.removeNode(r.$cstNode);this.nodeBuilder.buildCompositeNode(t).content.push(r.$cstNode);const n={$type:e};this.stack.push(n),this.assign(t.operator,t.feature,r,r.$cstNode)}else r.$type=e}}construct(){if(this.isRecording())return;const e=this.stack.pop();return this.nodeBuilder.construct(e),"$infixName"in e?this.constructInfix(e,this.operatorPrecedence.get(e.$infixName)):Tk(e)?this.converter.convert(e.value,e.$cstNode):(Tr(this.astReflection,e),e)}constructInfix(e,t){const r=e.parts;if(!Array.isArray(r)||0===r.length)return;const n=e.operators;if(!Array.isArray(n)||r.length<2)return r[0];let a=0,i=-1;for(let m=0;mi?(i=r.precedence,a=m):r.precedence===i&&(r.rightAssoc||(a=m))}const s=n.slice(0,a),o=n.slice(a+1),l=r.slice(0,a+1),u=r.slice(a+1),c={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:l,operators:s},p={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:u,operators:o},d=this.constructInfix(c,t),f=this.constructInfix(p,t);return{$type:e.$type,$cstNode:e.$cstNode,left:d,operator:n[a],right:f}}getAssignment(e){if(!this.assignmentMap.has(e)){const t=lr(e,Gr);this.assignmentMap.set(e,{assignment:t,crossRef:t&&Qr(t.terminal)?t.terminal.isMulti?"multi":"single":void 0})}return this.assignmentMap.get(e)}assign(e,t,r,n,a){const i=this.current;let s;switch(s="single"===a&&"string"==typeof r?this.linker.buildReference(i,t,n,r):"multi"===a&&"string"==typeof r?this.linker.buildMultiReference(i,t,n,r):r,e){case"=":i[t]=s;break;case"?=":i[t]=!0;break;case"+=":Array.isArray(i[t])||(i[t]=[]),i[t].push(s)}}assignWithoutOverride(e,t){for(const[n,a]of Object.entries(t)){const t=e[n];void 0===t?e[n]=a:Array.isArray(t)&&Array.isArray(a)&&(a.push(...t),e[n]=a)}const r=e.$cstNode;return r&&(r.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},Ek=class{static{Ge(this,"AbstractParserErrorMessageProvider")}buildMismatchTokenMessage(e){return Kg.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return Kg.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return Kg.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return Kg.buildEarlyExitMessage(e)}},bk=class extends Ek{static{Ge(this,"LangiumParserErrorMessageProvider")}buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}},Ak=class extends $k{static{Ge(this,"LangiumCompletionParser")}constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();const t=this.lexer.tokenize(e,{mode:"partial"});return this.tokens=t.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){const r=this.wrapper.DEFINE_RULE(vk(e.name),this.startImplementation(t).bind(this));return this.allRules.set(e.name,r),e.entry&&(this.mainRule=r),r}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return t=>{const r=this.keepStackSize();try{e(t)}finally{this.resetStackSize(r)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){const e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,t,r){this.wrapper.wrapConsume(e,t),this.isRecording()||(this.lastElementStack=[...this.elementStack,r],this.nextTokenIndex=this.currIdx+1)}subrule(e,t,r,n,a){this.before(n),this.wrapper.wrapSubrule(e,t,a),this.after(n)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){const t=this.elementStack.lastIndexOf(e);t>=0&&this.elementStack.splice(t)}}get currIdx(){return this.wrapper.currIdx}},Ck={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new bk},Sk=class extends Xv{static{Ge(this,"ChevrotainWrapper")}constructor(e,t){super(e,{...Ck,lookaheadStrategy:t&&"maxLookahead"in t?new uv({maxLookahead:t.maxLookahead}):new FS({logging:t.skipValidations?()=>{}:void 0}),...t})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t,r){return this.RULE(e,t,r)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t,void 0)}wrapSubrule(e,t,r){return this.subrule(e,t,{ARGS:[r]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}rule(e){return e.call(this,{})}},kk=class extends Sk{static{Ge(this,"ProfilerWrapper")}constructor(e,t,r){super(e,t),this.task=r}rule(e){this.task.start(),this.task.startSubTask(this.ruleName(e));try{return super.rule(e)}finally{this.task.stopSubTask(this.ruleName(e)),this.task.stop()}}ruleName(e){return e.ruleName}subrule(e,t,r){this.task.startSubTask(this.ruleName(t));try{return super.subrule(e,t,r)}finally{this.task.stopSubTask(this.ruleName(t))}}};function xk(e,t,r){return wk({parser:t,tokens:r,ruleNames:new Map},e),t}function wk(e,t){const r=Ri(t,!1),n=nr(t.rules).filter(Pn).filter(e=>r.has(e));for(const i of n){const t={...e,consume:1,optional:1,subrule:1,many:1,or:1};e.parser.rule(i,Ik(t,i.definition))}const a=nr(t.rules).filter(pn).filter(e=>r.has(e));for(const i of a)e.parser.rule(i,Nk(e,i))}function Nk(e,t){const r=t.call.rule.ref;if(!r)throw new Error("Could not resolve reference to infix operator rule: "+t.call.rule.$refText);if(Jn(r))throw new Error("Cannot use terminal rule in infix expression");const n=t.operators.precedences.flatMap(e=>e.operators),a={$type:"Group",elements:[]},i={$container:a,$type:"Assignment",feature:"parts",operator:"+=",terminal:t.call},s={$container:a,$type:"Group",elements:[],cardinality:"*"};a.elements.push(i,s);const o={$container:s,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:n}},l={...i,$container:s};s.elements.push(o,l);const u=n.map(t=>e.tokens[t.value]).map((t,r)=>({ALT:Ge(()=>e.parser.consume(r,t,o),"ALT")}));let c;return t=>{c??(c=qk(e,r)),e.parser.subrule(0,c,!1,i,t),e.parser.many(0,{DEF:Ge(()=>{e.parser.alternatives(0,u),e.parser.subrule(1,c,!1,l,t)},"DEF")})}}function Ik(e,t,r=!1){let n;if(vn(t))n=zk(e,t);else if(_r(t))n=_k(e,t);else if(Gr(t))n=Ik(e,t.terminal);else if(Qr(t))n=Gk(e,t);else if(zn(t))n=Pk(e,t);else if(Or(t))n=Lk(e,t);else if(pa(t))n=Mk(e,t);else if(on(t))n=jk(e,t);else{if(!en(t))throw new Ua(t.$cstNode,`Unexpected element type: ${t.$type}`);{const r=e.consume++;n=Ge(()=>e.parser.consume(r,Fg,t),"method")}}return Kk(e,r?void 0:Fk(t),n,t.cardinality)}function _k(e,t){const r=Ui(t);return()=>e.parser.action(r,t)}function Pk(e,t){const r=t.rule.ref;if(Sr(r)){const n=e.subrule++,a=Pn(r)&&r.fragment,i=t.arguments.length>0?Ok(r,t.arguments):()=>({});let s;return o=>{s??(s=qk(e,r)),e.parser.subrule(n,s,a,t,i(o))}}if(Jn(r)){const n=e.consume++,a=Bk(e,r.name);return()=>e.parser.consume(n,a,t)}if(!r)throw new Ua(t.$cstNode,`Undefined rule: ${t.rule.$refText}`);Ba()}function Ok(e,t){if(t.some(e=>e.calledByName)){const e=t.map(e=>({parameterName:e.parameter?.ref?.name,predicate:Dk(e.value)}));return t=>{const r={};for(const{parameterName:n,predicate:a}of e)n&&(r[n]=a(t));return r}}{const r=t.map(e=>Dk(e.value));return t=>{const n={};for(let a=0;at(e)||r(e)}if(Hr(e)){const t=Dk(e.left),r=Dk(e.right);return e=>t(e)&&r(e)}if(Cn(e)){const t=Dk(e.value);return e=>!t(e)}if(In(e)){const t=e.parameter.ref.name;return e=>void 0!==e&&!0===e[t]}if(Kr(e)){const t=Boolean(e.true);return()=>t}Ba()}function Lk(e,t){if(1===t.elements.length)return Ik(e,t.elements[0]);{const r=[];for(const a of t.elements){const t={ALT:Ik(e,a,!0)},n=Fk(a);n&&(t.GATE=Dk(n)),r.push(t)}const n=e.or++;return t=>e.parser.alternatives(n,r.map(e=>{const r={ALT:Ge(()=>e.ALT(t),"ALT")},n=e.GATE;return n&&(r.GATE=()=>n(t)),r}))}}function Mk(e,t){if(1===t.elements.length)return Ik(e,t.elements[0]);const r=[];for(const o of t.elements){const t={ALT:Ik(e,o,!0)},n=Fk(o);n&&(t.GATE=Dk(n)),r.push(t)}const n=e.or++,a=Ge((e,t)=>`uGroup_${e}_${t.getRuleStack().join("-")}`,"idFunc"),i=Ge(t=>e.parser.alternatives(n,r.map((r,i)=>{const s={ALT:Ge(()=>!0,"ALT")},o=e.parser;s.ALT=()=>{if(r.ALT(t),!o.isRecording()){const e=a(n,o);o.unorderedGroups.get(e)||o.unorderedGroups.set(e,[]);const t=o.unorderedGroups.get(e);void 0===t?.[i]&&(t[i]=!0)}};const l=r.GATE;return s.GATE=l?()=>l(t):()=>{const e=o.unorderedGroups.get(a(n,o));return!e?.[i]},s})),"alternatives"),s=Kk(e,Fk(t),i,"*");return t=>{s(t),e.parser.isRecording()||e.parser.unorderedGroups.delete(a(n,e.parser))}}function jk(e,t){const r=t.elements.map(t=>Ik(e,t));return e=>r.forEach(t=>t(e))}function Fk(e){if(on(e))return e.guardCondition}function Gk(e,t,r=t.terminal){if(r){if(zn(r)&&Pn(r.rule.ref)){const n=r.rule.ref,a=e.subrule++;let i;return r=>{i??(i=qk(e,n)),e.parser.subrule(a,i,!1,t,r)}}if(zn(r)&&Jn(r.rule.ref)){const n=e.consume++,a=Bk(e,r.rule.ref.name);return()=>e.parser.consume(n,a,t)}if(vn(r)){const n=e.consume++,a=Bk(e,r.value);return()=>e.parser.consume(n,a,t)}throw new Error("Could not build cross reference parser")}{if(!t.type.ref)throw new Error("Could not resolve reference to type: "+t.type.$refText);const r=Pi(t.type.ref),n=r?.terminal;if(!n)throw new Error("Could not find name assignment for type: "+Ui(t.type.ref));return Gk(e,t,n)}}function zk(e,t){const r=e.consume++,n=e.tokens[t.value];if(!n)throw new Error("Could not find token for keyword: "+t.value);return()=>e.parser.consume(r,n,t)}function Kk(e,t,r,n){const a=t&&Dk(t);if(!n){if(a){const t=e.or++;return n=>e.parser.alternatives(t,[{ALT:Ge(()=>r(n),"ALT"),GATE:Ge(()=>a(n),"GATE")},{ALT:Qv(),GATE:Ge(()=>!a(n),"GATE")}])}return r}if("*"===n){const t=e.many++;return n=>e.parser.many(t,{DEF:Ge(()=>r(n),"DEF"),GATE:a?()=>a(n):void 0})}if("+"===n){const t=e.many++;if(a){const n=e.or++;return i=>e.parser.alternatives(n,[{ALT:Ge(()=>e.parser.atLeastOne(t,{DEF:Ge(()=>r(i),"DEF")}),"ALT"),GATE:Ge(()=>a(i),"GATE")},{ALT:Qv(),GATE:Ge(()=>!a(i),"GATE")}])}return n=>e.parser.atLeastOne(t,{DEF:Ge(()=>r(n),"DEF")})}if("?"===n){const t=e.optional++;return n=>e.parser.optional(t,{DEF:Ge(()=>r(n),"DEF"),GATE:a?()=>a(n):void 0})}Ba()}function qk(e,t){const r=Uk(e,t),n=e.parser.getRule(r);if(!n)throw new Error(`Rule "${r}" not found."`);return n}function Uk(e,t){if(Sr(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let r=t,n=r.$container,a=t.$type;for(;!Pn(n);){if(on(n)||Or(n)||pa(n)){a=n.elements.indexOf(r).toString()+":"+a}r=n,n=n.$container}return a=n.name+":"+a,e.ruleNames.set(t,a),a}}function Bk(e,t){const r=e.tokens[t];if(!r)throw new Error(`Token "${t}" not found."`);return r}function Wk(e){const t=e.Grammar,r=e.parser.Lexer,n=new Ak(e);return xk(t,n,r.definition),n.finalize(),n}function Vk(e){const t=Hk(e);return t.finalize(),t}function Hk(e){const t=e.Grammar,r=e.parser.Lexer;return xk(t,new Rk(e),r.definition)}Ge(xk,"createParser"),Ge(wk,"buildRules"),Ge(Nk,"buildInfixRule"),Ge(Ik,"buildElement"),Ge(_k,"buildAction"),Ge(Pk,"buildRuleCall"),Ge(Ok,"buildRuleCallPredicate"),Ge(Dk,"buildPredicate"),Ge(Lk,"buildAlternatives"),Ge(Mk,"buildUnorderedGroup"),Ge(jk,"buildGroup"),Ge(Fk,"getGuardCondition"),Ge(Gk,"buildCrossReference"),Ge(zk,"buildKeyword"),Ge(Kk,"wrap"),Ge(qk,"getRule"),Ge(Uk,"getRuleName"),Ge(Bk,"getToken"),Ge(Wk,"createCompletionParser"),Ge(Vk,"createLangiumParser"),Ge(Hk,"prepareLangiumParser");var Yk,Qk=class{static{Ge(this,"DefaultTokenBuilder")}constructor(){this.diagnostics=[]}buildTokens(e,t){const r=nr(Ri(e,!1)),n=this.buildTerminalTokens(r),a=this.buildKeywordTokens(r,n,t);return a.push(...n),a}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){const e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(Jn).filter(e=>!e.fragment).map(e=>this.buildTerminalToken(e)).toArray()}buildTerminalToken(e){const t=Hi(e),r=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,n={name:e.name,PATTERN:r};return"function"==typeof r&&(n.LINE_BREAKS=!0),e.hidden&&(n.GROUP=hi(t)?Sg.SKIPPED:"hidden"),n}requiresCustomPattern(e){return!(!e.flags.includes("u")&&!e.flags.includes("s"))}regexPatternFunction(e){const t=new RegExp(e,e.flags+"y");return(e,r)=>{t.lastIndex=r;return t.exec(e)}}buildKeywordTokens(e,t,r){return e.filter(Sr).flatMap(e=>mr(e).filter(vn)).distinct(e=>e.value).toArray().sort((e,t)=>t.value.length-e.value.length).map(e=>this.buildKeywordToken(e,t,Boolean(r?.caseInsensitive)))}buildKeywordToken(e,t,r){const n=this.buildKeywordPattern(e,r),a={name:e.value,PATTERN:n,LONGER_ALT:this.findLongerAlt(e,t)};return"function"==typeof n&&(a.LINE_BREAKS=!0),a}buildKeywordPattern(e,t){return t?new RegExp(yi(e.value),"i"):e.value}findLongerAlt(e,t){return t.reduce((t,r)=>{const n=r?.PATTERN;return n?.source&&gi("^"+n.source+"$",e.value)&&t.push(r),t},[])}},Zk=class{static{Ge(this,"DefaultValueConverter")}convert(e,t){let r=t.grammarSource;if(Qr(r)&&(r=Ai(r)),zn(r)){const n=r.rule.ref;if(!n)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(n,e,t)}return e}runConverter(e,t,r){switch(e.name.toUpperCase()){case"INT":return Yk.convertInt(t);case"STRING":return Yk.convertString(t);case"ID":return Yk.convertID(t)}switch(Vi(e)?.toLowerCase()){case"number":return Yk.convertNumber(t);case"boolean":return Yk.convertBoolean(t);case"bigint":return Yk.convertBigint(t);case"date":return Yk.convertDate(t);default:return t}}};!function(e){function t(e){let t="";for(let n=1;n{"undefined"==typeof setImmediate?setTimeout(e,0):setImmediate(e)})}Ue(Xk,Be(et(),1)),Ge(Jk,"delayNextTick");var ex=0,tx=10;function rx(){return ex=performance.now(),new Xk.CancellationTokenSource}function nx(e){tx=e}Ge(rx,"startCancelableOperation"),Ge(nx,"setInterruptionPeriod");var ax=Symbol("OperationCancelled");function ix(e){return e===ax}async function sx(e){if(e===Xk.CancellationToken.None)return;const t=performance.now();if(t-ex>=tx&&(ex=t,await Jk(),ex=performance.now()),e.isCancellationRequested)throw ax}Ge(ix,"isOperationCancelled"),Ge(sx,"interruptAndCheck");var ox,lx,ux=class{static{Ge(this,"Deferred")}constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>(e(t),this),this.reject=e=>(t(e),this)})}},cx=class e{static{Ge(this,"FullTextDocument")}constructor(e,t,r,n){this._uri=e,this._languageId=t,this._version=r,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content}update(t,r){for(const n of t)if(e.isIncremental(n)){const e=mx(n.range),t=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,t)+n.text+this._content.substring(r,this._content.length);const a=Math.max(e.start.line,0),i=Math.max(e.end.line,0);let s=this._lineOffsets;const o=dx(n.text,!1,t);if(i-a===o.length)for(let n=0,u=o.length;ne?n=a:r=a+1}const a=r-1;return{line:a,character:(e=this.ensureBeforeEOL(e,t[a]))-t[a]}}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const r=t[e.line];if(e.character<=0)return r;const n=e.line+1t&&fx(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}static isFull(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}};function px(e,t){if(e.length<=1)return e;const r=e.length/2|0,n=e.slice(0,r),a=e.slice(r);px(n,t),px(a,t);let i=0,s=0,o=0;for(;ir.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function hx(e){const t=mx(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){function t(e,t,r,n){return new cx(e,t,r,n)}function r(e,t,r){if(e instanceof cx)return e.update(t,r),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")}function n(e,t){const r=e.getText(),n=px(t.map(hx),(e,t)=>{const r=e.range.start.line-t.range.start.line;return 0===r?e.range.start.character-t.range.start.character:r});let a=0;const i=[];for(const s of n){const t=e.offsetAt(s.range.start);if(ta&&i.push(r.substring(a,t)),s.newText.length&&i.push(s.newText),a=e.offsetAt(s.range.end)}return i.push(r.substr(a)),i.join("")}Ge(t,"create"),e.create=t,Ge(r,"update"),e.update=r,Ge(n,"applyEdits"),e.applyEdits=n}(ox||(ox={})),Ge(px,"mergeSort"),Ge(dx,"computeLineOffsets"),Ge(fx,"isEOL"),Ge(mx,"getWellformedRange"),Ge(hx,"getWellformedEdit"),(()=>{var e={975:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,t){for(var r,n="",a=0,i=-1,s=0,o=0;o<=e.length;++o){if(o2){var l=n.lastIndexOf("/");if(l!==n.length-1){-1===l?(n="",a=0):a=(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),i=o,s=0;continue}}else if(2===n.length||1===n.length){n="",a=0,i=o,s=0;continue}t&&(n.length>0?n+="/..":n="..",a=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),a=o-i-1;i=o,s=0}else 46===r&&-1!==s?++s:s=-1}return n}Ge(t,"e"),Ge(r,"r");var n={resolve:Ge(function(){for(var e,n="",a=!1,i=arguments.length-1;i>=-1&&!a;i--){var s;i>=0?s=arguments[i]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(n=s+"/"+n,a=47===s.charCodeAt(0))}return n=r(n,!a),a?n.length>0?"/"+n:"/":n.length>0?n:"."},"resolve"),normalize:Ge(function(e){if(t(e),0===e.length)return".";var n=47===e.charCodeAt(0),a=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!n)).length||n||(e="."),e.length>0&&a&&(e+="/"),n?"/"+e:e},"normalize"),isAbsolute:Ge(function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},"isAbsolute"),join:Ge(function(){if(0===arguments.length)return".";for(var e,r=0;r0&&(void 0===e?e=a:e+="/"+a)}return void 0===e?".":n.normalize(e)},"join"),relative:Ge(function(e,r){if(t(e),t(r),e===r)return"";if((e=n.resolve(e))===(r=n.resolve(r)))return"";for(var a=1;au){if(47===r.charCodeAt(o+p))return r.slice(o+p+1);if(0===p)return r.slice(o+p)}else s>u&&(47===e.charCodeAt(a+p)?c=p:0===p&&(c=0));break}var d=e.charCodeAt(a+p);if(d!==r.charCodeAt(o+p))break;47===d&&(c=p)}var f="";for(p=a+c+1;p<=i;++p)p!==i&&47!==e.charCodeAt(p)||(0===f.length?f+="..":f+="/..");return f.length>0?f+r.slice(o+c):(o+=c,47===r.charCodeAt(o)&&++o,r.slice(o))},"relative"),_makeLong:Ge(function(e){return e},"_makeLong"),dirname:Ge(function(e){if(t(e),0===e.length)return".";for(var r=e.charCodeAt(0),n=47===r,a=-1,i=!0,s=e.length-1;s>=1;--s)if(47===(r=e.charCodeAt(s))){if(!i){a=s;break}}else i=!1;return-1===a?n?"/":".":n&&1===a?"//":e.slice(0,a)},"dirname"),basename:Ge(function(e,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');t(e);var n,a=0,i=-1,s=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var o=r.length-1,l=-1;for(n=e.length-1;n>=0;--n){var u=e.charCodeAt(n);if(47===u){if(!s){a=n+1;break}}else-1===l&&(s=!1,l=n+1),o>=0&&(u===r.charCodeAt(o)?-1==--o&&(i=n):(o=-1,i=l))}return a===i?i=l:-1===i&&(i=e.length),e.slice(a,i)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!s){a=n+1;break}}else-1===i&&(s=!1,i=n+1);return-1===i?"":e.slice(a,i)},"basename"),extname:Ge(function(e){t(e);for(var r=-1,n=0,a=-1,i=!0,s=0,o=e.length-1;o>=0;--o){var l=e.charCodeAt(o);if(47!==l)-1===a&&(i=!1,a=o+1),46===l?-1===r?r=o:1!==s&&(s=1):-1!==r&&(s=-1);else if(!i){n=o+1;break}}return-1===r||-1===a||0===s||1===s&&r===a-1&&r===n+1?"":e.slice(r,a)},"extname"),format:Ge(function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return r=(t=e).dir||t.root,n=t.base||(t.name||"")+(t.ext||""),r?r===t.root?r+n:r+"/"+n:n;var t,r,n},"format"),parse:Ge(function(e){t(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return r;var n,a=e.charCodeAt(0),i=47===a;i?(r.root="/",n=1):n=0;for(var s=-1,o=0,l=-1,u=!0,c=e.length-1,p=0;c>=n;--c)if(47!==(a=e.charCodeAt(c)))-1===l&&(u=!1,l=c+1),46===a?-1===s?s=c:1!==p&&(p=1):-1!==s&&(p=-1);else if(!u){o=c+1;break}return-1===s||-1===l||0===p||1===p&&s===l-1&&s===o+1?-1!==l&&(r.base=r.name=0===o&&i?e.slice(1,l):e.slice(o,l)):(0===o&&i?(r.name=e.slice(1,s),r.base=e.slice(1,l)):(r.name=e.slice(o,s),r.base=e.slice(o,l)),r.ext=e.slice(s,l)),o>0?r.dir=e.slice(0,o-1):i&&(r.dir="/"),r},"parse"),sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,e.exports=n}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}Ge(r,"r"),r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};let a;if(r.r(n),r.d(n,{URI:Ge(()=>d,"URI"),Utils:Ge(()=>S,"Utils")}),"object"==typeof process)a=!1;else if("object"==typeof navigator){let e=navigator.userAgent;a=e.indexOf("Windows")>=0}const i=/^\w[\w\d+.-]*$/,s=/^\//,o=/^\/\//;function l(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!i.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!s.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(o.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}Ge(l,"a");const u="",c="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static{Ge(this,"l")}static isUri(e){return e instanceof d||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,r,n,a,i=!1){"object"==typeof e?(this.scheme=e.scheme||u,this.authority=e.authority||u,this.path=e.path||u,this.query=e.query||u,this.fragment=e.fragment||u):(this.scheme=function(e,t){return e||t?e:"file"}(e,i),this.authority=t||u,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==c&&(t=c+t):t=c}return t}(this.scheme,r||u),this.query=n||u,this.fragment=a||u,l(this,i))}get fsPath(){return T(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:r,path:n,query:a,fragment:i}=e;return void 0===t?t=this.scheme:null===t&&(t=u),void 0===r?r=this.authority:null===r&&(r=u),void 0===n?n=this.path:null===n&&(n=u),void 0===a?a=this.query:null===a&&(a=u),void 0===i?i=this.fragment:null===i&&(i=u),t===this.scheme&&r===this.authority&&n===this.path&&a===this.query&&i===this.fragment?this:new m(t,r,n,a,i)}static parse(e,t=!1){const r=p.exec(e);return r?new m(r[2]||u,E(r[4]||u),E(r[5]||u),E(r[7]||u),E(r[9]||u),t):new m(u,u,u,u,u)}static file(e){let t=u;if(a&&(e=e.replace(/\\/g,c)),e[0]===c&&e[1]===c){const r=e.indexOf(c,2);-1===r?(t=e.substring(2),e=c):(t=e.substring(2,r),e=e.substring(r)||c)}return new m("file",t,e,u,u)}static from(e){const t=new m(e.scheme,e.authority,e.path,e.query,e.fragment);return l(t,!0),t}toString(e=!1){return v(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof d)return e;{const t=new m(e);return t._formatted=e.external,t._fsPath=e._sep===f?e.fsPath:null,t}}return e}}const f=a?1:void 0;class m extends d{static{Ge(this,"d")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=T(this,!1)),this._fsPath}toString(e=!1){return e?v(this,!0):(this._formatted||(this._formatted=v(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=f),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const h={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function y(e,t,r){let n,a=-1;for(let i=0;i=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||t&&47===s||r&&91===s||r&&93===s||r&&58===s)-1!==a&&(n+=encodeURIComponent(e.substring(a,i)),a=-1),void 0!==n&&(n+=e.charAt(i));else{void 0===n&&(n=e.substr(0,i));const t=h[s];void 0!==t?(-1!==a&&(n+=encodeURIComponent(e.substring(a,i)),a=-1),n+=t):-1===a&&(a=i)}}return-1!==a&&(n+=encodeURIComponent(e.substring(a))),void 0!==n?n:e}function g(e){let t;for(let r=0;r1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,a&&(r=r.replace(/\//g,"\\")),r}function v(e,t){const r=t?g:y;let n="",{scheme:a,authority:i,path:s,query:o,fragment:l}=e;if(a&&(n+=a,n+=":"),(i||"file"===a)&&(n+=c,n+=c),i){let e=i.indexOf("@");if(-1!==e){const t=i.substr(0,e);i=i.substr(e+1),e=t.lastIndexOf(":"),-1===e?n+=r(t,!1,!1):(n+=r(t.substr(0,e),!1,!1),n+=":",n+=r(t.substr(e+1),!1,!0)),n+="@"}i=i.toLowerCase(),e=i.lastIndexOf(":"),-1===e?n+=r(i,!1,!0):(n+=r(i.substr(0,e),!1,!0),n+=i.substr(e))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const e=s.charCodeAt(1);e>=65&&e<=90&&(s=`/${String.fromCharCode(e+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const e=s.charCodeAt(0);e>=65&&e<=90&&(s=`${String.fromCharCode(e+32)}:${s.substr(2)}`)}n+=r(s,!0,!1)}return o&&(n+="?",n+=r(o,!1,!1)),l&&(n+="#",n+=t?l:y(l,!1,!1)),n}function $(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+$(e.substr(3)):e}}Ge(y,"m"),Ge(g,"y"),Ge(T,"v"),Ge(v,"b"),Ge($,"C");const R=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function E(e){return e.match(R)?e.replace(R,e=>$(e)):e}Ge(E,"w");var b=r(975);const A=b.posix||b,C="/";var S,k;(k=S||(S={})).joinPath=function(e,...t){return e.with({path:A.join(e.path,...t)})},k.resolvePath=function(e,...t){let r=e.path,n=!1;r[0]!==C&&(r=C+r,n=!0);let a=A.resolve(r,...t);return n&&a[0]===C&&!e.authority&&(a=a.substring(1)),e.with({path:a})},k.dirname=function(e){if(0===e.path.length||e.path===C)return e;let t=A.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},k.basename=function(e){return A.basename(e.path)},k.extname=function(e){return A.extname(e.path)},lx=n})();var yx,{URI:gx,Utils:Tx}=lx;!function(e){e.basename=Tx.basename,e.dirname=Tx.dirname,e.extname=Tx.extname,e.joinPath=Tx.joinPath,e.resolvePath=Tx.resolvePath;const t="object"==typeof process&&!1;function r(e,t){return e?.toString()===t?.toString()}function n(e,r){const n="string"==typeof e?gx.parse(e).path:e.path,a="string"==typeof r?gx.parse(r).path:r.path,i=n.split("/").filter(e=>e.length>0),s=a.split("/").filter(e=>e.length>0);if(t){const e=/^[A-Z]:$/;if(i[0]&&e.test(i[0])&&(i[0]=i[0].toLowerCase()),s[0]&&e.test(s[0])&&(s[0]=s[0].toLowerCase()),i[0]!==s[0])return a.substring(1)}let o=0;for(;o({name:e.name,uri:yx.joinPath(gx.parse(t),e.name).toString(),element:e.element})):[]}all(){return this.collectValues(this.root)}findAll(e){const t=this.getNode(yx.normalize(e),!1);return t?this.collectValues(t):[]}getNode(e,t){const r=e.split("/");"/"===e.charAt(e.length-1)&&r.pop();let n=this.root;for(const a of r){let e=n.children.get(a);if(!e){if(!t)return;e={name:a,children:new Map,parent:n},n.children.set(a,e)}n=e}return n}collectValues(e){const t=[];e.element&&t.push(e.element);for(const r of e.children.values())t.push(...this.collectValues(r));return t}};($x=vx||(vx={}))[$x.Changed=0]="Changed",$x[$x.Parsed=1]="Parsed",$x[$x.IndexedContent=2]="IndexedContent",$x[$x.ComputedScopes=3]="ComputedScopes",$x[$x.Linked=4]="Linked",$x[$x.IndexedReferences=5]="IndexedReferences",$x[$x.Validated=6]="Validated";var Ex=class{static{Ge(this,"DefaultLangiumDocumentFactory")}constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=Xk.CancellationToken.None){const r=await this.fileSystemProvider.readFile(e);return this.createAsync(e,r,t)}fromTextDocument(e,t,r){return t=t??gx.parse(e.uri),Xk.CancellationToken.is(r)?this.createAsync(t,e,r):this.create(t,e,r)}fromString(e,t,r){return Xk.CancellationToken.is(r)?this.createAsync(t,e,r):this.create(t,e,r)}fromModel(e,t){return this.create(t,{$model:e})}create(e,t,r){if("string"==typeof t){const n=this.parse(e,t,r);return this.createLangiumDocument(n,e,void 0,t)}if("$model"in t){const r={value:t.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(r,e)}{const n=this.parse(e,t.getText(),r);return this.createLangiumDocument(n,e,t)}}async createAsync(e,t,r){if("string"==typeof t){const n=await this.parseAsync(e,t,r);return this.createLangiumDocument(n,e,void 0,t)}{const n=await this.parseAsync(e,t.getText(),r);return this.createLangiumDocument(n,e,t)}}createLangiumDocument(e,t,r,n){let a;if(r)a={parseResult:e,uri:t,state:vx.Parsed,references:[],textDocument:r};else{const r=this.createTextDocumentGetter(t,n);a={parseResult:e,uri:t,state:vx.Parsed,references:[],get textDocument(){return r()}}}return e.value.$document=a,a}async update(e,t){const r=e.parseResult.value.$cstNode?.root.fullText,n=this.textDocuments?.get(e.uri.toString()),a=n?n.getText():await this.fileSystemProvider.readFile(e.uri);if(n)Object.defineProperty(e,"textDocument",{value:n});else{const t=this.createTextDocumentGetter(e.uri,a);Object.defineProperty(e,"textDocument",{get:t})}return r!==a&&(e.parseResult=await this.parseAsync(e.uri,a,t),e.parseResult.value.$document=e),e.state=vx.Parsed,e}parse(e,t,r){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(t,r)}parseAsync(e,t,r){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(t,r)}createTextDocumentGetter(e,t){const r=this.serviceRegistry;let n;return()=>n??(n=ox.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,t??""))}},bx=class{static{Ge(this,"DefaultLangiumDocuments")}constructor(e){this.documentTrie=new Rx,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return nr(this.documentTrie.all())}addDocument(e){const t=e.uri.toString();if(this.documentTrie.has(t))throw new Error(`A document with the URI '${t}' is already present.`);this.documentTrie.insert(t,e)}getDocument(e){const t=e.toString();return this.documentTrie.find(t)}getDocuments(e){const t=e.toString();return this.documentTrie.findAll(t)}async getOrCreateDocument(e,t){let r=this.getDocument(e);return r||(r=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(r),r)}createDocument(e,t,r){if(r)return this.langiumDocumentFactory.fromString(t,e,r).then(e=>(this.addDocument(e),e));{const r=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(r),r}}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){const t=e.toString(),r=this.documentTrie.find(t);return r&&this.documentBuilder().resetToState(r,vx.Changed),r}deleteDocument(e){const t=e.toString(),r=this.documentTrie.find(t);return r&&(r.state=vx.Changed,this.documentTrie.delete(t)),r}deleteDocuments(e){const t=e.toString(),r=this.documentTrie.findAll(t);for(const n of r)n.state=vx.Changed;return this.documentTrie.delete(t),r}},Ax=Symbol("RefResolving"),Cx=class{static{Ge(this,"DefaultLinker")}constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async link(e,t=Xk.CancellationToken.None){if(this.profiler?.isActive("linking")){const r=this.profiler.createTask("linking",this.languageId);r.start();try{for(const n of hr(e.parseResult.value))await sx(t),gr(n).forEach(t=>{const a=`${n.$type}:${t.property}`;r.startSubTask(a);try{this.doLink(t,e)}finally{r.stopSubTask(a)}})}finally{r.stop()}}else for(const r of hr(e.parseResult.value))await sx(t),gr(r).forEach(t=>this.doLink(t,e))}doLink(e,t){const r=e.reference;if("_ref"in r&&void 0===r._ref){r._ref=Ax;try{const t=this.getCandidate(e);if(Vt(t))r._ref=t;else{r._nodeDescription=t;const n=this.loadAstNode(t);r._ref=n??this.createLinkingError(e,t)}}catch(n){console.error(`An error occurred while resolving reference to '${r.$refText}':`,n);const t=n.message??String(n);r._ref={info:e,message:`An error occurred while resolving reference to '${r.$refText}': ${t}`}}t.references.push(r)}else if("_items"in r&&void 0===r._items){r._items=Ax;try{const t=this.getCandidates(e),n=[];if(Vt(t))r._linkingError=t;else for(const e of t){const t=this.loadAstNode(e);t&&n.push({ref:t,$nodeDescription:e})}r._items=n}catch(n){r._linkingError={info:e,message:`An error occurred while resolving reference to '${r.$refText}': ${n}`},r._items=[]}t.references.push(r)}}unlink(e){for(const t of e.references)"_ref"in t?(t._ref=void 0,delete t._nodeDescription):"_items"in t&&(t._items=void 0,delete t._linkingError);e.references=[]}getCandidate(e){return this.scopeProvider.getScope(e).getElement(e.reference.$refText)??this.createLinkingError(e)}getCandidates(e){const t=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(e=>`${e.documentUri}#${e.path}`).toArray();return t.length>0?t:this.createLinkingError(e)}buildReference(e,t,r,n){const a=this,i={$refNode:r,$refText:n,_ref:void 0,get ref(){if(qt(this._ref))return this._ref;if(Wt(this._nodeDescription)){const r=a.loadAstNode(this._nodeDescription);this._ref=r??a.createLinkingError({reference:i,container:e,property:t},this._nodeDescription)}else if(void 0===this._ref){this._ref=Ax;const r=pr(e).$document,n=a.getLinkedNode({reference:i,container:e,property:t});if(n.error&&r&&r.state0?void 0:this._linkingError=a.createLinkingError({reference:i,container:e,property:t})}};return i}throwCyclicReferenceError(e,t,r){throw new Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${t} (symbol '${r}')`)}getLinkedNode(e){try{const t=this.getCandidate(e);if(Vt(t))return{error:t};const r=this.loadAstNode(t);return r?{node:r,descr:t}:{descr:t,error:this.createLinkingError(e,t)}}catch(t){console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,t);const r=t.message??String(t);return{error:{info:e,message:`An error occurred while resolving reference to '${e.reference.$refText}': ${r}`}}}}loadAstNode(e){if(e.node)return e.node;const t=this.langiumDocuments().getDocument(e.documentUri);return t?this.astNodeLocator.getAstNode(t.parseResult.value,e.path):void 0}createLinkingError(e,t){const r=pr(e.container).$document;r&&r.stateQr(e)&&e.isMulti)}findDeclarations(e){if(e){const t=_i(e),r=e.astNode;if(t&&r){const n=r[t.feature];if(Ut(n)||Bt(n))return dr(n);if(Array.isArray(n))for(const t of n)if((Ut(t)||Bt(t))&&t.$refNode&&t.$refNode.offset<=e.offset&&t.$refNode.end>=e.end)return dr(t)}if(r){const t=this.nameProvider.getNameNode(r);if(t&&(t===e||Ca(e,t)))return this.getSelfNodes(r)}}return[]}getSelfNodes(e){if(this.hasMultiReference){const t=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e)),r=this.getNodeFromReferenceDescription(t.head());if(r)for(const n of gr(r))if(Bt(n.reference)&&n.reference.items.some(t=>t.ref===e))return n.reference.items.map(e=>e.ref);return[e]}return[e]}getNodeFromReferenceDescription(e){if(!e)return;const t=this.documents.getDocument(e.sourceUri);return t?this.nodeLocator.getAstNode(t.parseResult.value,e.sourcePath):void 0}findDeclarationNodes(e){const t=this.findDeclarations(e),r=[];for(const n of t){const e=this.nameProvider.getNameNode(n)??n.$cstNode;e&&r.push(e)}return r}findReferences(e,t){const r=[];t.includeDeclaration&&r.push(...this.getSelfReferences(e));let n=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(n=n.filter(e=>yx.equals(e.sourceUri,t.documentUri))),r.push(...n),nr(r)}getSelfReferences(e){const t=this.getSelfNodes(e),r=[];for(const n of t){const e=this.nameProvider.getNameNode(n);if(e){const t=cr(n),a=this.nodeLocator.getAstNodePath(n);r.push({sourceUri:t.uri,sourcePath:a,targetUri:t.uri,targetPath:a,segment:ka(e),local:!0})}}return r}},wx=class{static{Ge(this,"MultiMap")}constructor(e){if(this.map=new Map,e)for(const[t,r]of e)this.add(t,r)}get size(){return ar.sum(nr(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,t){if(void 0===t)return this.map.delete(e);{const r=this.map.get(e);if(r){const n=r.indexOf(t);if(n>=0)return 1===r.length?this.map.delete(e):r.splice(n,1),!0}return!1}}get(e){return this.map.get(e)??[]}getStream(e){const t=this.map.get(e);return t?nr(t):tr}has(e,t){if(void 0===t)return this.map.has(e);{const r=this.map.get(e);return!!r&&r.indexOf(t)>=0}}add(e,t){return this.map.has(e)?this.map.get(e).push(t):this.map.set(e,[t]),this}addAll(e,t){return this.map.has(e)?this.map.get(e).push(...t):this.map.set(e,Array.from(t)),this}forEach(e){this.map.forEach((t,r)=>t.forEach(t=>e(t,r,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return nr(this.map.entries()).flatMap(([e,t])=>t.map(t=>[e,t]))}keys(){return nr(this.map.keys())}values(){return nr(this.map.values()).flat()}entriesGroupedByKey(){return nr(this.map.entries())}},Nx=class{static{Ge(this,"BiMap")}get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(const[t,r]of e)this.set(t,r)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){const t=this.map.get(e);return void 0!==t&&(this.map.delete(e),this.inverse.delete(t),!0)}},Ix=class{static{Ge(this,"DefaultScopeComputation")}constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=Xk.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,r=fr,n=Xk.CancellationToken.None){const a=[];this.addExportedSymbol(e,a,t);for(const i of r(e))await sx(n),this.addExportedSymbol(i,a,t);return a}addExportedSymbol(e,t,r){const n=this.nameProvider.getName(e);n&&t.push(this.descriptions.createDescription(e,n,r))}async collectLocalSymbols(e,t=Xk.CancellationToken.None){const r=e.parseResult.value,n=new wx;for(const a of mr(r))await sx(t),this.addLocalSymbol(a,e,n);return n}addLocalSymbol(e,t,r){const n=e.$container;if(n){const a=this.nameProvider.getName(e);a&&r.add(n,this.descriptions.createDescription(e,a,t))}}},_x=class{static{Ge(this,"StreamScope")}constructor(e,t,r){this.elements=e,this.outerScope=t,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.caseInsensitive?this.elements.find(e=>e.name.toLowerCase()===t):this.elements.find(t=>t.name===e);return r||(this.outerScope?this.outerScope.getElement(e):void 0)}getElements(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.caseInsensitive?this.elements.filter(e=>e.name.toLowerCase()===t):this.elements.filter(t=>t.name===e);return(this.concatOuterScope||r.isEmpty())&&this.outerScope?r.concat(this.outerScope.getElements(e)):r}},Px=class{static{Ge(this,"MapScope")}constructor(e,t,r){this.elements=new Map,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0;for(const n of e){const e=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.set(e,n)}this.outerScope=t}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t);return r||(this.outerScope?this.outerScope.getElement(e):void 0)}getElements(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t),n=r?[r]:[];return(this.concatOuterScope||n.length>0)&&this.outerScope?nr(n).concat(this.outerScope.getElements(e)):nr(n)}getAllElements(){let e=nr(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},Ox=class{static{Ge(this,"MultiMapScope")}constructor(e,t,r){this.elements=new wx,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0;for(const n of e){const e=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.add(e,n)}this.outerScope=t}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t)[0];return r||(this.outerScope?this.outerScope.getElement(e):void 0)}getElements(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t);return(this.concatOuterScope||0===r.length)&&this.outerScope?nr(r).concat(this.outerScope.getElements(e)):nr(r)}getAllElements(){let e=nr(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},Dx={getElement(){},getElements:()=>tr,getAllElements:()=>tr},Lx=class{static{Ge(this,"DisposableCache")}constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}},Mx=class extends Lx{static{Ge(this,"SimpleCache")}constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(t){const r=t();return this.cache.set(e,r),r}}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},jx=class extends Lx{static{Ge(this,"ContextCache")}constructor(e){super(),this.cache=new Map,this.converter=e??(e=>e)}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,r){this.throwIfDisposed(),this.cacheForContext(e).set(t,r)}get(e,t,r){this.throwIfDisposed();const n=this.cacheForContext(e);if(n.has(t))return n.get(t);if(r){const e=r();return n.set(t,e),e}}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){if(this.throwIfDisposed(),e){const t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){const t=this.converter(e);let r=this.cache.get(t);return r||(r=new Map,this.cache.set(t,r)),r}},Fx=class extends jx{static{Ge(this,"DocumentCache")}constructor(e,t){super(e=>e.toString()),t?(this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(t,e=>{this.clear(e.uri.toString())})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{for(const r of t)this.clear(r)}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{const r=e.concat(t);for(const n of r)this.clear(n)}))}},Gx=class extends Mx{static{Ge(this,"WorkspaceCache")}constructor(e,t){super(),t?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(t,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{t.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}},zx=class{static{Ge(this,"DefaultScopeProvider")}constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new Gx(e.shared)}getScope(e){const t=[],r=this.reflection.getReferenceType(e),n=cr(e.container).localSymbols;if(n){let a=e.container;do{n.has(a)&&t.push(n.getStream(a).filter(e=>this.reflection.isSubtype(e.type,r))),a=a.$container}while(a)}let a=this.getGlobalScope(r,e);for(let i=t.length-1;i>=0;i--)a=this.createScope(t[i],a);return a}createScope(e,t,r){return new _x(nr(e),t,r)}createScopeForNodes(e,t,r){const n=nr(e).map(e=>{const t=this.nameProvider.getName(e);if(t)return this.descriptions.createDescription(e,t)}).nonNullable();return new _x(n,t,r)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new Ox(this.indexManager.allElements(e)))}};function Kx(e){return"string"==typeof e.$comment}function qx(e){return"object"==typeof e&&!!e&&("$ref"in e||"$error"in e)}Ge(Kx,"isAstNodeWithComment"),Ge(qx,"isIntermediateReference");var Ux,Bx,Wx=class{static{Ge(this,"DefaultJsonSerializer")}constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t){const r=t??{},n=t?.replacer,a=Ge((e,t)=>this.replacer(e,t,r),"defaultReplacer"),i=n?(e,t)=>n(e,t,a):a;try{return this.currentDocument=cr(e),JSON.stringify(e,i,t?.space)}finally{this.currentDocument=void 0}}deserialize(e,t){const r=t??{},n=JSON.parse(e);return this.linkNode(n,n,r),n}replacer(e,t,{refText:r,sourceText:n,textRegions:a,comments:i,uriConverter:s}){if(!this.ignoreProperties.has(e)){if(Ut(t)){const e=t.ref,n=r?t.$refText:void 0;if(e){const t=cr(e);let r="";this.currentDocument&&this.currentDocument!==t&&(r=s?s(t.uri,e):t.uri.toString());return{$ref:`${r}#${this.astNodeLocator.getAstNodePath(e)}`,$refText:n}}return{$error:t.error?.message??"Could not resolve reference",$refText:n}}if(Bt(t)){const e=r?t.$refText:void 0,n=[];for(const r of t.items){const e=r.ref,t=cr(r.ref);let a="";this.currentDocument&&this.currentDocument!==t&&(a=s?s(t.uri,e):t.uri.toString());const i=this.astNodeLocator.getAstNodePath(e);n.push(`${a}#${i}`)}return{$refs:n,$refText:e}}if(qt(t)){let r;if(a&&(r=this.addAstNodeRegionWithAssignmentsTo({...t}),e&&!t.$document||!r?.$textRegion||(r.$textRegion.documentURI=this.currentDocument?.uri.toString())),n&&!e&&(r??(r={...t}),r.$sourceText=t.$cstNode?.text),i){r??(r={...t});const e=this.commentProvider.getComment(t);e&&(r.$comment=e.replace(/\r/g,""))}return r??t}return t}}addAstNodeRegionWithAssignmentsTo(e){const t=Ge(e=>({offset:e.offset,end:e.end,length:e.length,range:e.range}),"createDocumentSegment");if(e.$cstNode){const r=(e.$textRegion=t(e.$cstNode)).assignments={};return Object.keys(e).filter(e=>!e.startsWith("$")).forEach(n=>{const a=Si(e.$cstNode,n).map(t);0!==a.length&&(r[n]=a)}),e}}linkNode(e,t,r,n,a,i){for(const[o,l]of Object.entries(e))if(Array.isArray(l))for(let n=0;n{await this.handleException(()=>e.call(t,r,n,a),"An error occurred during validation",n,r)}}async handleException(e,t,r,n){try{await e()}catch(a){if(ix(a))throw a;console.error(`${t}:`,a),a instanceof Error&&a.stack&&console.error(a.stack);r("error",`${t}: ${a instanceof Error?a.message:String(a)}`,{node:n})}}addEntry(e,t){if("AstNode"!==e)for(const r of this.reflection.getAllSubTypes(e))this.entries.add(r,t);else this.entries.add("AstNode",t)}getChecks(e,t){let r=nr(this.entries.get(e)).concat(this.entries.get("AstNode"));return t&&(r=r.filter(e=>t.includes(e.category))),r.map(e=>e.check)}registerBeforeDocument(e,t=this){this.entriesBefore.push(this.wrapPreparationException(e,"An error occurred during set-up of the validation",t))}registerAfterDocument(e,t=this){this.entriesAfter.push(this.wrapPreparationException(e,"An error occurred during tear-down of the validation",t))}wrapPreparationException(e,t,r){return async(n,a,i,s)=>{await this.handleException(()=>e.call(r,n,a,i,s),t,a,n)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}},Xx=Object.freeze({validateNode:!0,validateChildren:!0}),Jx=class{static{Ge(this,"DefaultDocumentValidator")}constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async validateDocument(e,t={},r=Xk.CancellationToken.None){const n=e.parseResult,a=[];if(await sx(r),!t.categories||t.categories.includes("built-in")){if(this.processLexingErrors(n,a,t),t.stopAfterLexingErrors&&a.some(e=>e.data?.code===Yx.LexingError))return a;if(this.processParsingErrors(n,a,t),t.stopAfterParsingErrors&&a.some(e=>e.data?.code===Yx.ParsingError))return a;if(this.processLinkingErrors(e,a,t),t.stopAfterLinkingErrors&&a.some(e=>e.data?.code===Yx.LinkingError))return a}try{a.push(...await this.validateAst(n.value,t,r))}catch(i){if(ix(i))throw i;console.error("An error occurred during validation:",i)}return await sx(r),a}processLexingErrors(e,t,r){const n=[...e.lexerErrors,...e.lexerReport?.diagnostics??[]];for(const a of n){const e=a.severity??"error",r={severity:tw(e),range:{start:{line:a.line-1,character:a.column-1},end:{line:a.line-1,character:a.column+a.length-1}},message:a.message,data:rw(e),source:this.getSource()};t.push(r)}}processParsingErrors(e,t,r){for(const n of e.parserErrors){let e;if(isNaN(n.token.startOffset)){if("previousToken"in n){const t=n.previousToken;if(isNaN(t.startOffset)){const t={line:0,character:0};e={start:t,end:t}}else{const r={line:t.endLine-1,character:t.endColumn};e={start:r,end:r}}}}else e=Sa(n.token);if(e){const r={severity:tw("error"),range:e,message:n.message,data:Hx(Yx.ParsingError),source:this.getSource()};t.push(r)}}}processLinkingErrors(e,t,r){for(const n of e.references){const e=n.error;if(e){const r={node:e.info.container,range:n.$refNode?.range,property:e.info.property,index:e.info.index,data:{code:Yx.LinkingError,containerType:e.info.container.$type,property:e.info.property,refText:e.info.reference.$refText}};t.push(this.toDiagnostic("error",e.message,r))}}}async validateAst(e,t,r=Xk.CancellationToken.None){const n=[],a=Ge((e,t,r)=>{n.push(this.toDiagnostic(e,t,r))},"acceptor");return await this.validateAstBefore(e,t,a,r),await this.validateAstNodes(e,t,a,r),await this.validateAstAfter(e,t,a,r),n}async validateAstBefore(e,t,r,n=Xk.CancellationToken.None){const a=this.validationRegistry.checksBefore;for(const i of a)await sx(n),await i(e,r,t.categories??[],n)}async validateAstNodes(e,t,r,n=Xk.CancellationToken.None){if(this.profiler?.isActive("validating")){const a=this.profiler.createTask("validating",this.languageId);a.start();try{const i=hr(e).iterator();for(const e of i){a.startSubTask(e.$type);const s=this.validateSingleNodeOptions(e,t);if(s.validateNode)try{const a=this.validationRegistry.getChecks(e.$type,t.categories);for(const t of a)await t(e,r,n)}finally{a.stopSubTask(e.$type)}s.validateChildren||i.prune()}}finally{a.stop()}}else{const a=hr(e).iterator();for(const e of a){await sx(n);const i=this.validateSingleNodeOptions(e,t);if(i.validateNode){const a=this.validationRegistry.getChecks(e.$type,t.categories);for(const t of a)await t(e,r,n)}i.validateChildren||a.prune()}}}validateSingleNodeOptions(e,t){return Xx}async validateAstAfter(e,t,r,n=Xk.CancellationToken.None){const a=this.validationRegistry.checksAfter;for(const i of a)await sx(n),await i(e,r,t.categories??[],n)}toDiagnostic(e,t,r){return{message:t,range:ew(r),severity:tw(e),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}};function ew(e){if(e.range)return e.range;let t;return"string"==typeof e.property?t=ki(e.node.$cstNode,e.property,e.index):"string"==typeof e.keyword&&(t=Ni(e.node.$cstNode,e.keyword,e.index)),t??(t=e.node.$cstNode),t?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}function tw(e){switch(e){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+e)}}function rw(e){switch(e){case"error":return Hx(Yx.LexingError);case"warning":return Hx(Yx.LexingWarning);case"info":return Hx(Yx.LexingInfo);case"hint":return Hx(Yx.LexingHint);default:throw new Error("Invalid diagnostic severity: "+e)}}Ge(ew,"getDiagnosticRange"),Ge(tw,"toDiagnosticSeverity"),Ge(rw,"toDiagnosticData"),(Qx=Yx||(Yx={})).LexingError="lexing-error",Qx.LexingWarning="lexing-warning",Qx.LexingInfo="lexing-info",Qx.LexingHint="lexing-hint",Qx.ParsingError="parsing-error",Qx.LinkingError="linking-error";var nw=class{static{Ge(this,"DefaultAstNodeDescriptionProvider")}constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,r){const n=r??cr(e);t??(t=this.nameProvider.getName(e));const a=this.astNodeLocator.getAstNodePath(e);if(!t)throw new Error(`Node at path ${a} has no name.`);let i;const s=Ge(()=>i??(i=ka(this.nameProvider.getNameNode(e)??e.$cstNode)),"nameSegmentGetter");return{node:e,name:t,get nameSegment(){return s()},selectionSegment:ka(e.$cstNode),type:e.$type,documentUri:n.uri,path:a}}},aw=class{static{Ge(this,"DefaultReferenceDescriptionProvider")}constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=Xk.CancellationToken.None){const r=[],n=e.parseResult.value;for(const a of hr(n))await sx(t),gr(a).forEach(e=>{e.reference.error||r.push(...this.createInfoDescriptions(e))});return r}createInfoDescriptions(e){const t=e.reference;if(t.error||!t.$refNode)return[];let r=[];Ut(t)&&t.$nodeDescription?r=[t.$nodeDescription]:Bt(t)&&(r=t.items.map(e=>e.$nodeDescription).filter(e=>void 0!==e));const n=cr(e.container).uri,a=this.nodeLocator.getAstNodePath(e.container),i=[],s=ka(t.$refNode);for(const o of r)i.push({sourceUri:n,sourcePath:a,targetUri:o.documentUri,targetPath:o.path,segment:s,local:yx.equals(o.documentUri,n)});return i}},iw=class{static{Ge(this,"DefaultAstNodeLocator")}constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){const t=this.getAstNodePath(e.$container),r=this.getPathSegment(e);return t+this.segmentSeparator+r}return""}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return void 0!==t?e+this.indexSeparator+t:e}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((e,t)=>{if(!e||0===t.length)return e;const r=t.indexOf(this.indexSeparator);if(r>0){const n=t.substring(0,r),a=parseInt(t.substring(r+1)),i=e[n];return i?.[a]}return e[t]},e)}},sw={};Ue(sw,Be(Je(),1));var ow,lw=class{static{Ge(this,"DefaultConfigurationProvider")}constructor(e){this._ready=new ux,this.onConfigurationSectionUpdateEmitter=new sw.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){this.workspaceConfig=e.capabilities.workspace?.configuration??!1}async initialized(e){if(this.workspaceConfig){if(e.register){const t=this.serviceRegistry.all;e.register({section:t.map(e=>this.toSectionName(e.LanguageMetaData.languageId))})}if(e.fetchConfiguration){const t=this.serviceRegistry.all.map(e=>({section:this.toSectionName(e.LanguageMetaData.languageId)})),r=await e.fetchConfiguration(t);t.forEach((e,t)=>{this.updateSectionConfiguration(e.section,r[t])})}}this._ready.resolve()}updateConfiguration(e){"object"==typeof e.settings&&null!==e.settings&&Object.entries(e.settings).forEach(([e,t])=>{this.updateSectionConfiguration(e,t),this.onConfigurationSectionUpdateEmitter.fire({section:e,configuration:t})})}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;const r=this.toSectionName(e);if(this.settings[r])return this.settings[r][t]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}},uw=Be(Gt(),1);!function(e){function t(e){return{dispose:Ge(async()=>await e(),"dispose")}}Ge(t,"create"),e.create=t}(ow||(ow={}));var cw=class{static{Ge(this,"DefaultDocumentBuilder")}constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new wx,this.documentPhaseListeners=new wx,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=vx.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.fileSystemProvider=e.workspace.FileSystemProvider,this.workspaceManager=()=>e.workspace.WorkspaceManager,this.serviceRegistry=e.ServiceRegistry}async build(e,t={},r=Xk.CancellationToken.None){for(const n of e){const e=n.uri.toString();if(n.state===vx.Validated){if("boolean"==typeof t.validation&&t.validation)this.resetToState(n,vx.IndexedReferences);else if("object"==typeof t.validation){const r=this.findMissingValidationCategories(n,t);r.length>0&&(this.buildState.set(e,{completed:!1,options:{validation:{categories:r}},result:this.buildState.get(e)?.result}),n.state=vx.IndexedReferences)}}else this.buildState.delete(e)}this.currentState=vx.Changed,await this.emitUpdate(e.map(e=>e.uri),[]),await this.buildDocuments(e,t,r)}async update(e,t,r=Xk.CancellationToken.None){this.currentState=vx.Changed;const n=[];for(const o of t){const e=this.langiumDocuments.deleteDocuments(o);for(const t of e)n.push(t.uri),this.cleanUpDeleted(t)}const a=(await Promise.all(e.map(e=>this.findChangedUris(e)))).flat();for(const o of a){let e=this.langiumDocuments.getDocument(o);void 0===e&&(e=this.langiumDocumentFactory.fromModel({$type:"INVALID"},o),e.state=vx.Changed,this.langiumDocuments.addDocument(e)),this.resetToState(e,vx.Changed)}const i=nr(a).concat(n).map(e=>e.toString()).toSet();this.langiumDocuments.all.filter(e=>!i.has(e.uri.toString())&&this.shouldRelink(e,i)).forEach(e=>this.resetToState(e,vx.ComputedScopes)),await this.emitUpdate(a,n),await sx(r);const s=this.sortDocuments(this.langiumDocuments.all.filter(e=>e.state=1}findMissingValidationCategories(e,t){const r=this.buildState.get(e.uri.toString()),n=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),a=r?.result?.validationChecks?new Set(r?.result?.validationChecks):r?.completed?n:new Set;return nr(void 0===t||!0===t.validation?n:"object"==typeof t.validation?t.validation.categories??n:[]).filter(e=>!a.has(e)).toArray()}async findChangedUris(e){if(this.langiumDocuments.getDocument(e)??this.textDocuments?.get(e))return[e];try{const t=await this.fileSystemProvider.stat(e);if(t.isDirectory){return await this.workspaceManager().searchFolder(e)}if(this.workspaceManager().shouldIncludeEntry(t))return[e]}catch{}return[]}async emitUpdate(e,t){await Promise.all(this.updateListeners.map(r=>r(e,t)))}sortDocuments(e){let t=0,r=e.length-1;for(;t=0&&!this.hasTextDocument(e[r]);)r--;tvoid 0!==e.error)||this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),ow.create(()=>{const t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}resetToState(e,t){switch(t){case vx.Changed:case vx.Parsed:this.indexManager.removeContent(e.uri);case vx.IndexedContent:e.localSymbols=void 0;case vx.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case vx.Linked:this.indexManager.removeReferences(e.uri);case vx.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case vx.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=vx.Changed}async buildDocuments(e,t,r){this.prepareBuild(e,t),await this.runCancelable(e,vx.Parsed,r,e=>this.langiumDocumentFactory.update(e,r)),await this.runCancelable(e,vx.IndexedContent,r,e=>this.indexManager.updateContent(e,r)),await this.runCancelable(e,vx.ComputedScopes,r,async e=>{const t=this.serviceRegistry.getServices(e.uri).references.ScopeComputation;e.localSymbols=await t.collectLocalSymbols(e,r)});const n=e.filter(e=>this.shouldLink(e));await this.runCancelable(n,vx.Linked,r,e=>this.serviceRegistry.getServices(e.uri).references.Linker.link(e,r)),await this.runCancelable(n,vx.IndexedReferences,r,e=>this.indexManager.updateReferences(e,r));const a=e.filter(e=>!!this.shouldValidate(e)||(this.markAsCompleted(e),!1));await this.runCancelable(a,vx.Validated,r,async e=>{await this.validate(e,r),this.markAsCompleted(e)})}markAsCompleted(e){const t=this.buildState.get(e.uri.toString());t&&(t.completed=!0)}prepareBuild(e,t){for(const r of e){const e=r.uri.toString(),n=this.buildState.get(e);n&&!n.completed||this.buildState.set(e,{completed:!1,options:t,result:n?.result})}}async runCancelable(e,t,r,n){for(const i of e)i.statee.state===t);await this.notifyBuildPhase(a,t,r),this.currentState=t}onBuildPhase(e,t){return this.buildPhaseListeners.add(e,t),ow.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),ow.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,r){let n;return t&&"path"in t?n=t:r=t,r??(r=Xk.CancellationToken.None),n?this.awaitDocumentState(e,n,r):this.awaitBuilderState(e,r)}awaitDocumentState(e,t,r){const n=this.langiumDocuments.getDocument(t);return n?n.state>=e?Promise.resolve(t):r.isCancellationRequested?Promise.reject(ax):this.currentState>=e&&e>n.state?Promise.reject(new uw.ResponseError(uw.LSPErrorCodes.RequestFailed,`Document state of ${t.toString()} is ${vx[n.state]}, requiring ${vx[e]}, but workspace state is already ${vx[this.currentState]}. Returning undefined.`)):new Promise((n,a)=>{const i=this.onDocumentPhase(e,e=>{yx.equals(e.uri,t)&&(i.dispose(),s.dispose(),n(e.uri))}),s=r.onCancellationRequested(()=>{i.dispose(),s.dispose(),a(ax)})}):Promise.reject(new uw.ResponseError(uw.LSPErrorCodes.ServerCancelled,`No document found for URI: ${t.toString()}`))}awaitBuilderState(e,t){return this.currentState>=e?Promise.resolve():t.isCancellationRequested?Promise.reject(ax):new Promise((r,n)=>{const a=this.onBuildPhase(e,()=>{a.dispose(),i.dispose(),r()}),i=t.onCancellationRequested(()=>{a.dispose(),i.dispose(),n(ax)})})}async notifyDocumentPhase(e,t,r){const n=this.documentPhaseListeners.get(t).slice();for(const i of n)try{await sx(r),await i(e,r)}catch(a){if(!ix(a))throw a}}async notifyBuildPhase(e,t,r){if(0===e.length)return;const n=this.buildPhaseListeners.get(t).slice();for(const a of n)await sx(r),await a(e,r)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return Boolean(this.getBuildOptions(e).validation)}async validate(e,t){const r=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,n=this.getBuildOptions(e),a="object"==typeof n.validation?{...n.validation}:{};a.categories=this.findMissingValidationCategories(e,n);const i=await r.validateDocument(e,a,t);e.diagnostics?e.diagnostics.push(...i):e.diagnostics=i;const s=this.buildState.get(e.uri.toString());s&&(s.result??(s.result={}),s.result.validationChecks?s.result.validationChecks=nr(s.result.validationChecks).concat(a.categories).distinct().toArray():s.result.validationChecks=[...a.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}},pw=class{static{Ge(this,"DefaultIndexManager")}constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new jx,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){const r=cr(e).uri,n=[];return this.referenceIndex.forEach(e=>{e.forEach(e=>{yx.equals(e.targetUri,r)&&e.targetPath===t&&n.push(e)})}),nr(n)}allElements(e,t){let r=nr(this.symbolIndex.keys());return t&&(r=r.filter(e=>!t||t.has(e))),r.map(t=>this.getFileDescriptions(t,e)).flat()}getFileDescriptions(e,t){if(!t)return this.symbolIndex.get(e)??[];return this.symbolByTypeIndex.get(e,t,()=>(this.symbolIndex.get(e)??[]).filter(e=>this.astReflection.isSubtype(e.type,t)))}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){const t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t)}removeReferences(e){const t=e.toString();this.referenceIndex.delete(t)}async updateContent(e,t=Xk.CancellationToken.None){const r=this.serviceRegistry.getServices(e.uri),n=await r.references.ScopeComputation.collectExportedSymbols(e,t),a=e.uri.toString();this.symbolIndex.set(a,n),this.symbolByTypeIndex.clear(a)}async updateReferences(e,t=Xk.CancellationToken.None){const r=this.serviceRegistry.getServices(e.uri),n=await r.workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),n)}isAffected(e,t){const r=this.referenceIndex.get(e.uri.toString());return!!r&&r.some(e=>!e.local&&t.has(e.targetUri.toString()))}},dw=class{static{Ge(this,"DefaultWorkspaceManager")}constructor(e){this.initialBuildOptions={},this._ready=new ux,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(e){this.folders=e.workspaceFolders??void 0}initialized(e){return this.mutex.write(e=>this.initializeWorkspace(this.folders??[],e))}async initializeWorkspace(e,t=Xk.CancellationToken.None){const r=await this.performStartup(e);await sx(t),await this.documentBuilder.build(r,this.initialBuildOptions,t)}async performStartup(e){const t=[],r=Ge(e=>{t.push(e),this.langiumDocuments.hasDocument(e.uri)||this.langiumDocuments.addDocument(e)},"collector");await this.loadAdditionalDocuments(e,r);const n=[];await Promise.all(e.map(e=>this.getRootFolder(e)).map(async e=>this.traverseFolder(e,n)));const a=nr(n).distinct(e=>e.toString()).filter(e=>!this.langiumDocuments.hasDocument(e));return await this.loadWorkspaceDocuments(a,r),this._ready.resolve(),t}async loadWorkspaceDocuments(e,t){await Promise.all(e.map(async e=>{const r=await this.langiumDocuments.getOrCreateDocument(e);t(r)}))}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return gx.parse(e.uri)}async traverseFolder(e,t){try{const r=await this.fileSystemProvider.readDirectory(e);await Promise.all(r.map(async e=>{this.shouldIncludeEntry(e)&&(e.isDirectory?await this.traverseFolder(e.uri,t):e.isFile&&t.push(e.uri))}))}catch(r){console.error("Failure to read directory content of "+e.toString(!0),r)}}async searchFolder(e){const t=[];return await this.traverseFolder(e,t),t}shouldIncludeEntry(e){const t=yx.basename(e.uri);return!t.startsWith(".")&&(e.isDirectory?"node_modules"!==t&&"out"!==t:!!e.isFile&&this.serviceRegistry.hasServices(e.uri))}},fw=class{static{Ge(this,"DefaultLexerErrorMessageProvider")}buildUnexpectedCharactersMessage(e,t,r,n,a){return Ag.buildUnexpectedCharactersMessage(e,t,r,n,a)}buildUnableToPopLexerModeMessage(e){return Ag.buildUnableToPopLexerModeMessage(e)}},mw={mode:"full"},hw=class{static{Ge(this,"DefaultLexer")}constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;const t=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);const r=Tw(t)?Object.values(t):t,n="production"===e.LanguageMetaData.mode;this.chevrotainLexer=new Sg(r,{positionTracking:"full",skipValidations:n,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=mw){const r=this.chevrotainLexer.tokenize(e);return{tokens:r.tokens,errors:r.errors,hidden:r.groups.hidden??[],report:this.tokenBuilder.flushLexingReport?.(e)}}toTokenTypeDictionary(e){if(Tw(e))return e;const t=gw(e)?Object.values(e.modes).flat():e,r={};return t.forEach(e=>r[e.name]=e),r}};function yw(e){return Array.isArray(e)&&(0===e.length||"name"in e[0])}function gw(e){return e&&"modes"in e&&"defaultMode"in e}function Tw(e){return!yw(e)&&!gw(e)}function vw(e,t,r){let n,a;"string"==typeof e?(a=t,n=r):(a=e.range.start,n=t),a||(a=o.create(0,0));return Nw({index:0,tokens:Aw({lines:Rw(e),position:a,options:Mw(n)}),position:a})}function $w(e,t){const r=Mw(t),n=Rw(e);if(0===n.length)return!1;const a=n[0],i=n[n.length-1],s=r.start,o=r.end;return Boolean(s?.exec(a))&&Boolean(o?.exec(i))}function Rw(e){let t="";t="string"==typeof e?e:e.text;return t.split(li)}Ge(yw,"isTokenTypeArray"),Ge(gw,"isIMultiModeLexerDefinition"),Ge(Tw,"isTokenTypeDictionary"),Qe(),Ge(vw,"parseJSDoc"),Ge($w,"isJSDoc"),Ge(Rw,"getLines");var Ew=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,bw=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function Aw(e){const t=[];let r=e.position.line,n=e.position.character;for(let a=0;a=u.length){if(t.length>0){const e=o.create(r,n);t.push({type:"break",content:"",range:l.create(e,e)})}}else{Ew.lastIndex=c;const e=Ew.exec(u);if(e){const a=e[0],i=e[1],s=o.create(r,n+c),p=o.create(r,n+c+a.length);t.push({type:"tag",content:i,range:l.create(s,p)}),c+=a.length,c=xw(u,c)}if(c0&&"break"===t[t.length-1].type?t.slice(0,-1):t}function Cw(e,t,r,n){const a=[];if(0===e.length){const e=o.create(r,n),i=o.create(r,n+t.length);a.push({type:"text",content:t,range:l.create(e,i)})}else{let i=0;for(const u of e){const e=u.index,s=t.substring(i,e);s.length>0&&a.push({type:"text",content:t.substring(i,e),range:l.create(o.create(r,i+n),o.create(r,e+n))});let c=s.length+1;const p=u[1];if(a.push({type:"inline-tag",content:p,range:l.create(o.create(r,i+c+n),o.create(r,i+c+p.length+n))}),c+=p.length,4===u.length){c+=u[2].length;const e=u[3];a.push({type:"text",content:e,range:l.create(o.create(r,i+c+n),o.create(r,i+c+e.length+n))})}else a.push({type:"text",content:"",range:l.create(o.create(r,i+c+n),o.create(r,i+c+n))});i=e+u[0].length}const s=t.substring(i);s.length>0&&a.push({type:"text",content:s,range:l.create(o.create(r,i+n),o.create(r,i+n+s.length))})}return a}Ge(Aw,"tokenize"),Ge(Cw,"buildInlineTokens");var Sw=/\S/,kw=/\s*$/;function xw(e,t){const r=e.substring(t).match(Sw);return r?t+r.index:e.length}function ww(e){const t=e.match(kw);if(t&&"number"==typeof t.index)return t.index}function Nw(e){const t=o.create(e.position.line,e.position.character);if(0===e.tokens.length)return new Fw([],l.create(t,t));const r=[];for(;e.indext.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(const t of this.elements)if(0===e.length)e=t.toString();else{const r=t.toString();e+=Bw(e)+r}return e.trim()}toMarkdown(e){let t="";for(const r of this.elements)if(0===t.length)t=r.toMarkdown(e);else{const n=r.toMarkdown(e);t+=Bw(t)+n}return t.trim()}},Gw=class{static{Ge(this,"JSDocTagImpl")}constructor(e,t,r,n){this.name=e,this.content=t,this.inline=r,this.range=n}toString(){let e=`@${this.name}`;const t=this.content.toString();return 1===this.content.inlines.length?e=`${e} ${t}`:this.content.inlines.length>1&&(e=`${e}\n${t}`),this.inline?`{${e}}`:e}toMarkdown(e){return e?.renderTag?.(this)??this.toMarkdownDefault(e)}toMarkdownDefault(e){const t=this.content.toMarkdown(e);if(this.inline){const r=zw(this.name,t,e??{});if("string"==typeof r)return r}let r="";"italic"===e?.tag||void 0===e?.tag?r="*":"bold"===e?.tag?r="**":"bold-italic"===e?.tag&&(r="***");let n=`${r}@${this.name}${r}`;return 1===this.content.inlines.length?n=`${n} \u2014 ${t}`:this.content.inlines.length>1&&(n=`${n}\n${t}`),this.inline?`{${n}}`:n}};function zw(e,t,r){if("linkplain"===e||"linkcode"===e||"link"===e){const n=t.indexOf(" ");let a=t;if(n>0){const e=xw(t,n);a=t.substring(e),t=t.substring(0,n)}("linkcode"===e||"link"===e&&"code"===r.link)&&(a=`\`${a}\``);return r.renderLink?.(t,a)??Kw(t,a)}}function Kw(e,t){try{return gx.parse(e,!0),`[${t}](${e})`}catch{return e}}Ge(zw,"renderInlineTag"),Ge(Kw,"renderLinkDefault");var qw=class{static{Ge(this,"JSDocTextImpl")}constructor(e,t){this.inlines=e,this.range=t}toString(){let e="";for(let t=0;tr.range.start.line&&(e+="\n")}return e}toMarkdown(e){let t="";for(let r=0;rn.range.start.line&&(t+="\n")}return t}},Uw=class{static{Ge(this,"JSDocLineImpl")}constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}};function Bw(e){return e.endsWith("\n")?"\n":"\n\n"}Ge(Bw,"fillNewlines");var Ww,Vw=class{static{Ge(this,"JSDocDocumentationProvider")}constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){const t=this.commentProvider.getComment(e);if(t&&$w(t)){return vw(t).toMarkdown({renderLink:Ge((t,r)=>this.documentationLinkRenderer(e,t,r),"renderLink"),renderTag:Ge(t=>this.documentationTagRenderer(e,t),"renderTag")})}}documentationLinkRenderer(e,t,r){const n=this.findNameInLocalSymbols(e,t)??this.findNameInGlobalScope(e,t);if(n&&n.nameSegment){const e=n.nameSegment.range.start.line+1,t=n.nameSegment.range.start.character+1;return`[${r}](${n.documentUri.with({fragment:`L${e},${t}`}).toString()})`}}documentationTagRenderer(e,t){}findNameInLocalSymbols(e,t){const r=cr(e).localSymbols;if(!r)return;let n=e;do{const e=r.getStream(n).find(e=>e.name===t);if(e)return e;n=n.$container}while(n)}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(e=>e.name===t)}},Hw=class{static{Ge(this,"DefaultCommentProvider")}constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){return Kx(e)?e.$comment:_a(e.$cstNode,this.grammarConfig().multilineCommentRules)?.text}},Yw=class{static{Ge(this,"DefaultAsyncParser")}constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}},Qw=class{static{Ge(this,"AbstractThreadedAsyncParser")}constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length{if(this.queue.length>0){const t=this.queue.shift();t&&(e.lock(),t.resolve(e))}}),this.workerPool.push(e)}}async parse(e,t){const r=await this.acquireParserWorker(t),n=new ux;let a;const i=t.onCancellationRequested(()=>{a=setTimeout(()=>{this.terminateWorker(r)},this.terminationDelay)});return r.parse(e).then(e=>{const t=this.hydrator.hydrate(e);n.resolve(t)}).catch(e=>{n.reject(e)}).finally(()=>{i.dispose(),clearTimeout(a)}),n.promise}terminateWorker(e){e.terminate();const t=this.workerPool.indexOf(e);t>=0&&this.workerPool.splice(t,1)}async acquireParserWorker(e){this.initializeWorkers();for(const r of this.workerPool)if(r.ready)return r.lock(),r;const t=new ux;return e.onCancellationRequested(()=>{const e=this.queue.indexOf(t);e>=0&&this.queue.splice(e,1),t.reject(ax)}),this.queue.push(t),t.promise}},Zw=class{static{Ge(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,t,r,n){this.onReadyEmitter=new sw.Emitter,this.deferred=new ux,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=n,t(e=>{const t=e;this.deferred.resolve(t),this.unlock()}),r(e=>{this.deferred.reject(e),this.unlock()})}terminate(){this.deferred.reject(ax),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(e){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new ux,this.sendMessage(e),this.deferred.promise}},Xw=class{static{Ge(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new Xk.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();const t=rx();return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,r=Xk.CancellationToken.None){const n=new ux,a={action:t,deferred:n,cancellationToken:r};return e.push(a),this.performNextOperation(),n.promise}async performNextOperation(){if(!this.done)return;const e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else{if(!(this.readQueue.length>0))return;e.push(...this.readQueue.splice(0,this.readQueue.length))}this.done=!1,await Promise.all(e.map(async({action:e,deferred:t,cancellationToken:r})=>{try{const n=await Promise.resolve().then(()=>e(r));t.resolve(n)}catch(n){ix(n)?t.resolve(void 0):t.reject(n)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}},Jw=class{static{Ge(this,"DefaultHydrator")}constructor(e){this.grammarElementIdMap=new Nx,this.tokenTypeIdMap=new Nx,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport?this.dehydrateLexerReport(e.lexerReport):void 0,parserErrors:e.parserErrors.map(e=>({...e,message:e.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){const t=new Map,r=new Map;for(const n of hr(e))t.set(n,{});if(e.$cstNode)for(const n of ba(e.$cstNode))r.set(n,{});return{astNodes:t,cstNodes:r}}dehydrateAstNode(e,t){const r=t.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,void 0!==e.$cstNode&&(r.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for(const[n,a]of Object.entries(e))if(!n.startsWith("$"))if(Array.isArray(a)){const e=[];r[n]=e;for(const r of a)qt(r)?e.push(this.dehydrateAstNode(r,t)):Ut(r)?e.push(this.dehydrateReference(r,t)):e.push(r)}else qt(a)?r[n]=this.dehydrateAstNode(a,t):Ut(a)?r[n]=this.dehydrateReference(a,t):void 0!==a&&(r[n]=a);return r}dehydrateReference(e,t){const r={};return r.$refText=e.$refText,e.$refNode&&(r.$refNode=t.cstNodes.get(e.$refNode)),r}dehydrateCstNode(e,t){const r=t.cstNodes.get(e);return Zt(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,r.astNode=t.astNodes.get(e.astNode),Yt(e)?r.content=e.content.map(e=>this.dehydrateCstNode(e,t)):Qt(e)&&(r.tokenType=e.tokenType.name,r.offset=e.offset,r.length=e.length,r.startLine=e.range.start.line,r.startColumn=e.range.start.character,r.endLine=e.range.end.line,r.endColumn=e.range.end.character),r}hydrate(e){const t=e.value,r=this.createHydrationContext(t);return"$cstNode"in t&&this.hydrateCstNode(t.$cstNode,r),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,r)}}createHydrationContext(e){const t=new Map,r=new Map;for(const a of hr(e))t.set(a,{});let n;if(e.$cstNode)for(const a of ba(e.$cstNode)){let e;"fullText"in a?(e=new yk(a.fullText),n=e):"content"in a?e=new mk:"tokenType"in a&&(e=this.hydrateCstLeafNode(a)),e&&(r.set(a,e),e.root=n)}return{astNodes:t,cstNodes:r}}hydrateAstNode(e,t){const r=t.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,e.$cstNode&&(r.$cstNode=t.cstNodes.get(e.$cstNode));for(const[n,a]of Object.entries(e))if(!n.startsWith("$"))if(Array.isArray(a)){const e=[];r[n]=e;for(const i of a)qt(i)?e.push(this.setParent(this.hydrateAstNode(i,t),r)):Ut(i)?e.push(this.hydrateReference(i,r,n,t)):e.push(i)}else qt(a)?r[n]=this.setParent(this.hydrateAstNode(a,t),r):Ut(a)?r[n]=this.hydrateReference(a,r,n,t):void 0!==a&&(r[n]=a);return r}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,r,n){return this.linker.buildReference(t,r,n.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,r=0){const n=t.cstNodes.get(e);if("number"==typeof e.grammarSource&&(n.grammarSource=this.getGrammarElement(e.grammarSource)),n.astNode=t.astNodes.get(e.astNode),Yt(n))for(const a of e.content){const e=this.hydrateCstNode(a,t,r++);n.content.push(e)}return n}hydrateCstLeafNode(e){const t=this.getTokenType(e.tokenType),r=e.offset,n=e.length,a=e.startLine,i=e.startColumn,s=e.endLine,o=e.endColumn,l=e.hidden;return new fk(r,n,{start:{line:a,character:i},end:{line:s,character:o}},t,l)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap();return this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(const t of hr(this.grammar))Ar(t)&&this.grammarElementIdMap.set(t,e++)}};function eN(e){return{documentation:{CommentProvider:Ge(e=>new Hw(e),"CommentProvider"),DocumentationProvider:Ge(e=>new Vw(e),"DocumentationProvider")},parser:{AsyncParser:Ge(e=>new Yw(e),"AsyncParser"),GrammarConfig:Ge(e=>as(e),"GrammarConfig"),LangiumParser:Ge(e=>Vk(e),"LangiumParser"),CompletionParser:Ge(e=>Wk(e),"CompletionParser"),ValueConverter:Ge(()=>new Zk,"ValueConverter"),TokenBuilder:Ge(()=>new Qk,"TokenBuilder"),Lexer:Ge(e=>new hw(e),"Lexer"),ParserErrorMessageProvider:Ge(()=>new bk,"ParserErrorMessageProvider"),LexerErrorMessageProvider:Ge(()=>new fw,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:Ge(()=>new iw,"AstNodeLocator"),AstNodeDescriptionProvider:Ge(e=>new nw(e),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:Ge(e=>new aw(e),"ReferenceDescriptionProvider")},references:{Linker:Ge(e=>new Cx(e),"Linker"),NameProvider:Ge(()=>new kx,"NameProvider"),ScopeProvider:Ge(e=>new zx(e),"ScopeProvider"),ScopeComputation:Ge(e=>new Ix(e),"ScopeComputation"),References:Ge(e=>new xx(e),"References")},serializer:{Hydrator:Ge(e=>new Jw(e),"Hydrator"),JsonSerializer:Ge(e=>new Wx(e),"JsonSerializer")},validation:{DocumentValidator:Ge(e=>new Jx(e),"DocumentValidator"),ValidationRegistry:Ge(e=>new Zx(e),"ValidationRegistry")},shared:Ge(()=>e.shared,"shared")}}function tN(e){return{ServiceRegistry:Ge(e=>new Vx(e),"ServiceRegistry"),workspace:{LangiumDocuments:Ge(e=>new bx(e),"LangiumDocuments"),LangiumDocumentFactory:Ge(e=>new Ex(e),"LangiumDocumentFactory"),DocumentBuilder:Ge(e=>new cw(e),"DocumentBuilder"),IndexManager:Ge(e=>new pw(e),"IndexManager"),WorkspaceManager:Ge(e=>new dw(e),"WorkspaceManager"),FileSystemProvider:Ge(t=>e.fileSystemProvider(t),"FileSystemProvider"),WorkspaceLock:Ge(()=>new Xw,"WorkspaceLock"),ConfigurationProvider:Ge(e=>new lw(e),"ConfigurationProvider")},profilers:{}}}function rN(e,t,r,n,a,i,s,o,l){return iN([e,t,r,n,a,i,s,o,l].reduce(lN,{}))}Ge(eN,"createDefaultCoreModule"),Ge(tN,"createDefaultSharedCoreModule"),(Ww||(Ww={})).merge=(e,t)=>lN(lN({},e),t),Ge(rN,"inject");var nN=Symbol("isProxy");function aN(e){if(e&&e[nN])for(const t of Object.values(e))aN(t);return e}function iN(e,t){const r=new Proxy({},{deleteProperty:Ge(()=>!1,"deleteProperty"),set:Ge(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:Ge((n,a)=>a===nN||oN(n,a,e,t||r),"get"),getOwnPropertyDescriptor:Ge((n,a)=>(oN(n,a,e,t||r),Object.getOwnPropertyDescriptor(n,a)),"getOwnPropertyDescriptor"),has:Ge((t,r)=>r in e,"has"),ownKeys:Ge(()=>[...Object.getOwnPropertyNames(e)],"ownKeys")});return r}Ge(aN,"eagerLoad"),Ge(iN,"_inject");var sN=Symbol();function oN(e,t,r,n){if(t in e){if(e[t]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable. Cause: "+e[t]);if(e[t]===sN)throw new Error('Cycle detected. Please make "'+String(t)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return e[t]}if(t in r){const i=r[t];e[t]=sN;try{e[t]="function"==typeof i?i(n):iN(i,n)}catch(a){throw e[t]=a instanceof Error?a:void 0,a}return e[t]}}function lN(e,t){if(t)for(const[r,n]of Object.entries(t))if(null!=n)if("object"==typeof n){const t=e[r];e[r]=lN("object"==typeof t&&null!==t?t:{},n)}else e[r]=n;return e}Ge(oN,"_resolve"),Ge(lN,"_merge");var uN,cN,pN={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]};(cN=uN||(uN={})).REGULAR="indentation-sensitive",cN.IGNORE_INDENTATION="ignore-indentation";var dN=class extends Qk{static{Ge(this,"IndentationAwareTokenBuilder")}constructor(e=pN){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options={...pN,...e},this.indentTokenType=Mg({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=Mg({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,t){const r=super.buildTokens(e,t);if(!yw(r))throw new Error("Invalid tokens built by default builder");const{indentTokenName:n,dedentTokenName:a,whitespaceTokenName:i,ignoreIndentationDelimiters:s}=this.options;let o,l,u;const c=[];for(const p of r){for(const[e,t]of s)p.name===e?p.PUSH_MODE=uN.IGNORE_INDENTATION:p.name===t&&(p.POP_MODE=!0);p.name===a?o=p:p.name===n?l=p:p.name===i?u=p:c.push(p)}if(!o||!l||!u)throw new Error("Some indentation/whitespace tokens not found!");if(s.length>0){return{modes:{[uN.REGULAR]:[o,l,...c,u],[uN.IGNORE_INDENTATION]:[...c,u]},defaultMode:uN.REGULAR}}return[o,l,u,...c]}flushLexingReport(e){return{...super.flushLexingReport(e),remainingDedents:this.flushRemainingDedents(e)}}isStartOfLine(e,t){return 0===t||"\r\n".includes(e[t-1])}matchWhitespace(e,t,r,n){this.whitespaceRegExp.lastIndex=t;const a=this.whitespaceRegExp.exec(e);return{currIndentLevel:a?.[0].length??0,prevIndentLevel:this.indentationStack.at(-1),match:a}}createIndentationTokenInstance(e,t,r,n){const a=this.getLineNumber(t,n);return Gg(e,r,n,n+r.length,a,a,1,r.length)}getLineNumber(e,t){return e.substring(0,t).split(/\r\n|\r|\n/).length}indentMatcher(e,t,r,n){if(!this.isStartOfLine(e,t))return null;const{currIndentLevel:a,prevIndentLevel:i,match:s}=this.matchWhitespace(e,t,r,n);return a<=i?null:(this.indentationStack.push(a),s)}dedentMatcher(e,t,r,n){if(!this.isStartOfLine(e,t))return null;const{currIndentLevel:a,prevIndentLevel:i,match:s}=this.matchWhitespace(e,t,r,n);if(a>=i)return null;const o=this.indentationStack.lastIndexOf(a);if(-1===o)return this.diagnostics.push({severity:"error",message:`Invalid dedent level ${a} at offset: ${t}. Current indentation stack: ${this.indentationStack}`,offset:t,length:s?.[0]?.length??0,line:this.getLineNumber(e,t),column:1}),null;const l=this.indentationStack.length-o-1,u=e.substring(0,t).match(/[\r\n]+$/)?.[0].length??1;for(let c=0;c1;)t.push(this.createIndentationTokenInstance(this.dedentTokenType,e,"",e.length)),this.indentationStack.pop();return this.indentationStack=[0],t}},fN=class extends hw{static{Ge(this,"IndentationAwareLexer")}constructor(e){if(super(e),!(e.parser.TokenBuilder instanceof dN))throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder");this.indentationTokenBuilder=e.parser.TokenBuilder}tokenize(e,t=mw){const r=super.tokenize(e),n=r.report;"full"===t?.mode&&r.tokens.push(...n.remainingDedents),n.remainingDedents=[];const{indentTokenType:a,dedentTokenType:i}=this.indentationTokenBuilder,s=a.tokenTypeIdx,o=i.tokenTypeIdx,l=[],u=r.tokens.length-1;for(let c=0;c=0&&l.push(r.tokens[u]),r.tokens=l,r}},mN={};Ke(mN,{AstUtils:()=>sr,BiMap:()=>Nx,Cancellation:()=>Xk,ContextCache:()=>jx,CstUtils:()=>Kt,DONE_RESULT:()=>rr,Deferred:()=>ux,Disposable:()=>ow,DisposableCache:()=>Lx,DocumentCache:()=>Fx,EMPTY_STREAM:()=>tr,ErrorWithLocation:()=>Ua,GrammarUtils:()=>qa,MultiMap:()=>wx,OperationCancelled:()=>ax,Reduction:()=>ar,RegExpUtils:()=>Va,SimpleCache:()=>Mx,StreamImpl:()=>Xt,TreeStreamImpl:()=>ir,URI:()=>gx,UriTrie:()=>Rx,UriUtils:()=>yx,WorkspaceCache:()=>Gx,assertCondition:()=>Wa,assertUnreachable:()=>Ba,delayNextTick:()=>Jk,interruptAndCheck:()=>sx,isOperationCancelled:()=>ix,loadGrammarFromJson:()=>$N,setInterruptionPeriod:()=>nx,startCancelableOperation:()=>rx,stream:()=>nr}),Ue(mN,sw);var hN=class{static{Ge(this,"EmptyFileSystemProvider")}stat(e){throw new Error("No file system is available.")}statSync(e){throw new Error("No file system is available.")}async exists(){return!1}existsSync(){return!1}readBinary(){throw new Error("No file system is available.")}readBinarySync(){throw new Error("No file system is available.")}readFile(){throw new Error("No file system is available.")}readFileSync(){throw new Error("No file system is available.")}async readDirectory(){return[]}readDirectorySync(){return[]}},yN={fileSystemProvider:Ge(()=>new hN,"fileSystemProvider")},gN={Grammar:Ge(()=>{},"Grammar"),LanguageMetaData:Ge(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},TN={AstReflection:Ge(()=>new $a,"AstReflection")};function vN(){const e=rN(tN(yN),TN),t=rN(eN({shared:e}),gN);return e.ServiceRegistry.register(t),t}function $N(e){const t=vN(),r=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(r,gx.parse(`memory:/${r.name??"grammar"}.langium`)),r}Ge(vN,"createMinimalGrammarServices"),Ge($N,"loadGrammarFromJson"),Ue(zt,mN);var RN,EN,bN,AN,CN,SN,kN,xN,wN,NN,IN,_N,PN,ON,DN,LN=class{static{Ge(this,"DefaultLangiumProfiler")}constructor(e){this.activeCategories=new Set,this.allCategories=new Set(["validating","parsing","linking"]),this.activeCategories=e??new Set(this.allCategories),this.records=new wx}isActive(e){return this.activeCategories.has(e)}start(...e){e?e.forEach(e=>this.activeCategories.add(e)):this.activeCategories=new Set(this.allCategories)}stop(...e){e?e.forEach(e=>this.activeCategories.delete(e)):this.activeCategories.clear()}createTask(e,t){if(!this.isActive(e))throw new Error(`Category "${e}" is not active.`);return console.log(`Creating profiling task for '${e}.${t}'.`),new MN(t=>this.records.add(e,this.dumpRecord(e,t)),t)}dumpRecord(e,t){console.info(`Task ${e}.${t.identifier} executed in ${t.duration.toFixed(2)}ms and ended at ${t.date.toISOString()}`);const r=[];for(const i of t.entries.keys()){const e=t.entries.get(i),n=e.reduce((e,t)=>e+t);r.push({name:`${t.identifier}.${i}`,count:e.length,duration:n})}const n=t.duration-r.map(e=>e.duration).reduce((e,t)=>e+t,0);function a(e){return Math.round(100*e)/100}return r.push({name:t.identifier,count:1,duration:n}),r.sort((e,t)=>t.duration-e.duration),Ge(a,"Round"),console.table(r.map(e=>({Element:e.name,Count:e.count,"Self %":a(100*e.duration/t.duration),"Time (ms)":a(e.duration)}))),t}getRecords(...e){return 0===e.length?this.records.values():this.records.entries().filter(t=>e.some(e=>e===t[0])).flatMap(e=>e[1])}},MN=class{static{Ge(this,"ProfilingTask")}constructor(e,t){this.stack=[],this.entries=new wx,this.addRecord=e,this.identifier=t}start(){if(void 0!==this.startTime)throw new Error(`Task "${this.identifier}" is already started.`);this.startTime=performance.now()}stop(){if(void 0===this.startTime)throw new Error(`Task "${this.identifier}" was not started.`);if(0!==this.stack.length)throw new Error(`Task "${this.identifier}" cannot be stopped before sub-task(s): ${this.stack.map(e=>e.id).join(", ")}.`);const e={identifier:this.identifier,date:new Date,duration:performance.now()-this.startTime,entries:this.entries};this.addRecord(e),this.startTime=void 0,this.entries.clear()}startSubTask(e){this.stack.push({id:e,start:performance.now(),content:0})}stopSubTask(e){const t=this.stack.pop();if(!t)throw new Error(`Task "${this.identifier}.${e}" was not started.`);if(t.id!==e)throw new Error(`Sub-Task "${t.id}" is not already stopped.`);const r=performance.now()-t.start;void 0!==this.stack.at(-1)&&(this.stack[this.stack.length-1].content+=r);const n=r-t.content;this.entries.add(e,n)}};(RN||(RN={})).Terminals={ARROW_DIRECTION:/L|R|T|B/,ARROW_GROUP:/\{group\}/,ARROW_INTO:/<|>/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ARCH_ICON:/\([\w-:]+\)/,ARCH_TITLE:/\[(?:"([^"\\]|\\.)*"|'([^'\\]|\\.)*'|[^\[\]\r\n]+)\]/},(EN||(EN={})).Terminals={DOMAIN_NAME:/complex|complicated|clear|chaotic|confusion/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(bN||(bN={})).Terminals={EM_ID:/[_a-zA-Z][\w_]*/,EM_FID:/\d{1,3}/,EM_DATA_INLINE:/\{(.*)\}|"(.*)"|'(.*)'/,EM_DATA_BLOCK:/\{[\t ]*\r?\n(?:[\S\s]*?\r?\n)?\}(?:\r?\n|(?!\S))/,EM_ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,EM_ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,EM_TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,EM_WS:/\s+/,EM_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,EM_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,EM_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,EM_ML_COMMENT:/\/\*[\s\S]*?\*\//,EM_SL_COMMENT:/\/\/[^\n\r]*/},(AN||(AN={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,REFERENCE:/\w([-\./\w]*[-\w])?/},(CN||(CN={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(SN||(SN={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(kN||(kN={})).Terminals={NUMBER_PIE:/(?:-?[0-9]+\.[0-9]+(?!\.))|(?:-?(0|[1-9][0-9]*)(?!\.))/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(xN||(xN={})).Terminals={GRATICULE:/circle|polygon/,BOOLEAN:/true|false/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NUMBER:/(?:[0-9]+\.[0-9]+(?!\.))|(?:0|[1-9][0-9]*(?!\.))/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(wN||(wN={})).Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ABNF_RULENAME:/[A-Za-z][A-Za-z0-9-]*/,ABNF_STRING:/"[^"]*"/,ABNF_NUMVAL:/%[xXdDbB][0-9A-Fa-f]+(?:-[0-9A-Fa-f]+|\.[0-9A-Fa-f]+)*/,ABNF_REPEAT:/[0-9]*\*[0-9]*/,ABNF_EXACT_REPEAT:/[0-9]+/,ABNF_WHITESPACE:/[\t \r\n]+/,ABNF_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,ABNF_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,ABNF_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ABNF_COMMENT:/;[^\n\r]*/},(NN||(NN={})).Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,EBNF_ID:/[A-Z_a-z][\w-]*/,EBNF_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,EBNF_SPECIAL_SEQUENCE:/\?(?=[^?;]*[^?\s;][^?;]*\?)[^?;]*\?/,EBNF_WHITESPACE:/[\t \r\n]+/,EBNF_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,EBNF_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,EBNF_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,EBNF_BLOCK_COMMENT:/\/\*[\s\S]*?\*\//,EBNF_ISO_COMMENT:/\(\*[\s\S]*?\*\)/},(IN||(IN={})).Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,RR_ID:/[A-Z_a-z][\w-]*/,RR_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,RR_WHITESPACE:/[\t \r\n]+/,RR_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,RR_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,RR_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,RR_BLOCK_COMMENT:/\/\*[\s\S]*?\*\//},(_N||(_N={})).Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,PEG_ID:/[A-Z_a-z][\w-]*/,PEG_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,PEG_WHITESPACE:/[\t \r\n]+/,PEG_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,PEG_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,PEG_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,PEG_LINE_COMMENT:/#[^\n\r]*/},(PN||(PN={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,TREEMAP_KEYWORD:/treemap-beta|treemap/,CLASS_DEF:/classDef\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\s+([^;\r\n]*))?(?:;)?/,STYLE_SEPARATOR:/:::/,SEPARATOR:/:/,COMMA:/,/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,ID2:/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER2:/[0-9_\.\,]+/,STRING2:/"[^"]*"|'[^']*'/},(ON||(ON={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,CLASS_ANNOTATION:/[ \t]+:::[ \t]*[A-Za-z_][\w-]*/,ICON_ANNOTATION:/[ \t]+icon\([\w-]*(?::[\w-]+)?\)/,DESC_ANNOTATION:/[ \t]+##[^\n\r]*/,INDENTATION:/[ \t]{1,}/,QUOTED_NAME:/"[^"]*"|'[^']*'/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,BARE_NAME:/(?!:::|icon\(|##)[^ \t\n\r"'](?:(?![ \t]+:::[ \t]*[A-Za-z_]|[ \t]+icon\(|[ \t]+##)[^\n\r])*/},(DN||(DN={})).Terminals={WARDLEY_NUMBER:/[0-9]+\.[0-9]+/,ARROW:/->/,LINK_PORT:/\+<>|\+>|\+|-\.->|>|\+'[^']*'<>|\+'[^']*'<|\+'[^']*'>/,LINK_LABEL:/;[^\n\r]+/,STRATEGY:/build|buy|outsource|market/,KW_WARDLEY:/wardley-beta/,KW_SIZE:/size/,KW_EVOLUTION:/evolution/,KW_ANCHOR:/anchor/,KW_COMPONENT:/component/,KW_LABEL:/label/,KW_INERTIA:/inertia/,KW_EVOLVE:/evolve/,KW_PIPELINE:/pipeline/,KW_NOTE:/note/,KW_ANNOTATIONS:/annotations/,KW_ANNOTATION:/annotation/,KW_ACCELERATOR:/accelerator/,KW_DEACCELERATOR:/deaccelerator/,NAME_WITH_SPACES:/(?!title\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/,WS:/[ \t]+/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/};RN.Terminals,EN.Terminals,bN.Terminals,AN.Terminals,CN.Terminals,SN.Terminals,kN.Terminals,xN.Terminals,wN.Terminals,NN.Terminals,IN.Terminals,_N.Terminals,ON.Terminals,PN.Terminals,DN.Terminals;var jN="AbnfAlternation",FN="alternatives",GN="AbnfConcatenation",zN="elements",KN="AbnfElement",qN="primary",UN="repeat",BN="AbnfGroup",WN="element",VN="AbnfNumVal",HN="value",YN="AbnfOptionalGroup",QN="element",ZN="AbnfPrimary",XN="AbnfRule",JN="definition",eI="name",tI="AbnfRuleName",rI="name",nI="AbnfStringLiteral",aI="value",iI="Accelerator",sI="name",oI="x",lI="y",uI="Alignment",cI="direction",pI="members",dI="Anchor",fI="evolution",mI="name",hI="visibility",yI="Annotation",gI="number",TI="text",vI="x",$I="y",RI="Annotations",EI="x",bI="y",AI="Architecture",CI="accDescr",SI="accTitle",kI="alignments",xI="edges",wI="groups",NI="junctions",II="services",_I="title";Ge(function(e){return Ej.isInstance(e,AI)},"isArchitecture");var PI="Axis",OI="label",DI="name",LI="Branch",MI="name",jI="order";Ge(function(e){return Ej.isInstance(e,LI)},"isBranch");var FI="Checkout",GI="branch",zI="CherryPicking",KI="id",qI="parent",UI="tags",BI="ClassDefStatement",WI="className",VI="styleText",HI="Commit",YI="id",QI="message",ZI="tags",XI="type";Ge(function(e){return Ej.isInstance(e,HI)},"isCommit");var JI="Common",e_="accDescr",t_="accTitle",r_="title",n_="Component",a_="decorator",i_="evolution",s_="inertia",o_="label",l_="name",u_="visibility",c_="Curve",p_="entries",d_="label",f_="name",m_="Cynefin",h_="accDescr",y_="accTitle",g_="domains",T_="title",v_="transitions";Ge(function(e){return Ej.isInstance(e,m_)},"isCynefin");var $_="Deaccelerator",R_="name",E_="x",b_="y",A_="Decorator",C_="strategy",S_="Direction",k_="accDescr",x_="accTitle",w_="dir",N_="statements",I_="title",__="DomainBlock",P_="domain",O_="items";Ge(function(e){return Ej.isInstance(e,__)},"isDomainBlock");var D_="DomainItem",L_="label";Ge(function(e){return Ej.isInstance(e,D_)},"isDomainItem");var M_="EbnfChoice",j_="alternatives",F_="EbnfExceptionPostfix",G_="except",z_="EbnfGroup",K_="element",q_="EbnfNonTerminal",U_="name",B_="EbnfOneOrMorePostfix",W_="operator",V_="EbnfOptional",H_="element",Y_="EbnfOptionalPostfix",Q_="operator",Z_="EbnfPostfix",X_="EbnfPrimary",J_="EbnfRepetition",eP="element",tP="EbnfRule",rP="definition",nP="name",aP="EbnfSequence",iP="elements",sP="EbnfSpecial",oP="text",lP="EbnfTerm",uP="base",cP="postfixes",pP="EbnfTerminal",dP="value",fP="EbnfZeroOrMorePostfix",mP="operator",hP="Edge",yP="lhsDir",gP="lhsGroup",TP="lhsId",vP="lhsInto",$P="rhsDir",RP="rhsGroup",EP="rhsId",bP="rhsInto",AP="title",CP="EmDataEntity",SP="dataBlockValue",kP="dataType",xP="name",wP="EmFrame",NP="EmGwt",IP="givenStatements",_P="sourceFrame",PP="thenStatements",OP="whenStatements",DP="EmGwtStatement",LP="entityIdentifier",MP="EmModelEntity",jP="name";Ge(function(e){return"rmo"===e||"readmodel"===e||"ui"===e||"cmd"===e||"command"===e||"evt"===e||"event"===e||"pcr"===e||"processor"===e},"isEmModelEntityType");var FP="EmNoteEntity",GP="dataBlockValue",zP="dataType",KP="sourceFrame",qP="EmResetFrame",UP="dataInlineValue",BP="dataReference",WP="dataType",VP="entityIdentifier",HP="modelEntityType",YP="name",QP="sourceFrames";function ZP(e){return Ej.isInstance(e,qP)}Ge(ZP,"isEmResetFrame");var XP="EmTimeFrame",JP="dataInlineValue",eO="dataReference",tO="dataType",rO="entityIdentifier",nO="modelEntityType",aO="name",iO="sourceFrames",sO="Entry",oO="axis",lO="value",uO="EventModel",cO="accDescr",pO="accTitle",dO="dataEntities",fO="frames",mO="gwtEntities",hO="modelEntities",yO="noteEntities",gO="title",TO="Evolution",vO="stages",$O="EvolutionStage",RO="boundary",EO="name",bO="secondName",AO="Evolve",CO="component",SO="target",kO="GitGraph",xO="accDescr",wO="accTitle",NO="statements",IO="title";Ge(function(e){return Ej.isInstance(e,kO)},"isGitGraph");var _O="Group",PO="icon",OO="id",DO="in",LO="title",MO="Info",jO="accDescr",FO="accTitle",GO="title";Ge(function(e){return Ej.isInstance(e,MO)},"isInfo");var zO="Item",KO="classSelector",qO="name",UO="Junction",BO="id",WO="in",VO="Label",HO="negX",YO="negY",QO="offsetX",ZO="offsetY",XO="Leaf",JO="classSelector",eD="name",tD="value",rD="Link",nD="arrow",aD="from",iD="fromPort",sD="linkLabel",oD="to",lD="toPort",uD="Merge",cD="branch",pD="id",dD="tags",fD="type";Ge(function(e){return Ej.isInstance(e,uD)},"isMerge");var mD="Note",hD="evolution",yD="text",gD="visibility",TD="Option",vD="name",$D="value",RD="Packet",ED="accDescr",bD="accTitle",AD="blocks",CD="title";Ge(function(e){return Ej.isInstance(e,RD)},"isPacket");var SD="PacketBlock",kD="bits",xD="end",wD="label",ND="start";Ge(function(e){return Ej.isInstance(e,SD)},"isPacketBlock");var ID="PegAny",_D="dot",PD="PegGroup",OD="element",DD="PegIdentifier",LD="name",MD="PegLiteral",jD="value",FD="PegOrderedChoice",GD="alternatives",zD="PegPrefix",KD="operator",qD="suffix",UD="PegPrimary",BD="PegRule",WD="definition",VD="name",HD="PegSequence",YD="elements",QD="PegSuffix",ZD="operator",XD="primary",JD="Pie",eL="accDescr",tL="accTitle",rL="sections",nL="showData",aL="title";Ge(function(e){return Ej.isInstance(e,JD)},"isPie");var iL="PieSection",sL="label",oL="value";Ge(function(e){return Ej.isInstance(e,iL)},"isPieSection");var lL="Pipeline",uL="components",cL="parent",pL="PipelineComponent",dL="evolution",fL="label",mL="name",hL="Radar",yL="accDescr",gL="accTitle",TL="axes",vL="curves",$L="options",RL="title",EL="Railroad",bL="accDescr",AL="accTitle",CL="rules",SL="title";Ge(function(e){return Ej.isInstance(e,EL)},"isRailroad");var kL="RailroadAbnf",xL="accDescr",wL="accTitle",NL="rules",IL="title";Ge(function(e){return Ej.isInstance(e,kL)},"isRailroadAbnf");var _L="RailroadChoiceExpr",PL="alternatives",OL="RailroadEbnf",DL="accDescr",LL="accTitle",ML="rules",jL="title";Ge(function(e){return Ej.isInstance(e,OL)},"isRailroadEbnf");var FL="RailroadExpression",GL="RailroadNonTerminalExpr",zL="name",KL="RailroadOneOrMoreExpr",qL="element",UL="RailroadOptionalExpr",BL="element",WL="RailroadPeg",VL="accDescr",HL="accTitle",YL="rules",QL="title";Ge(function(e){return Ej.isInstance(e,WL)},"isRailroadPeg");var ZL="RailroadRule",XL="definition",JL="name",eM="RailroadSequenceExpr",tM="elements",rM="RailroadSpecialExpr",nM="text",aM="RailroadTerminalExpr",iM="value",sM="RailroadZeroOrMoreExpr",oM="element",lM="Section",uM="classSelector",cM="name",pM="Service",dM="icon",fM="iconText",mM="id",hM="in",yM="title",gM="Size",TM="height",vM="width",$M="Statement",RM="Transition",EM="from",bM="label",AM="to";Ge(function(e){return Ej.isInstance(e,RM)},"isTransition");var CM="Treemap",SM="accDescr",kM="accTitle",xM="title",wM="TreemapRows";Ge(function(e){return Ej.isInstance(e,CM)},"isTreemap");var NM="TreemapRow",IM="indent",_M="item",PM="TreeNode",OM="classAnnotation",DM="descAnnotation",LM="iconAnnotation",MM="indent",jM="name",FM="TreeView",GM="accDescr",zM="accTitle",KM="nodes",qM="title",UM="Wardley",BM="accDescr",WM="accelerators",VM="accTitle",HM="anchors",YM="annotation",QM="annotations",ZM="components",XM="deaccelerators",JM="evolution",ej="evolves",tj="links",rj="notes",nj="pipelines",aj="size",ij="title";Ge(function(e){return Ej.isInstance(e,UM)},"isWardley");var sj,oj,lj,uj,cj,pj,dj,fj,mj,hj,yj,gj,Tj,vj,$j,Rj=class extends Ht{constructor(){super(...arguments),this.types={AbnfAlternation:{name:jN,properties:{alternatives:{name:FN,defaultValue:[]}},superTypes:[]},AbnfConcatenation:{name:GN,properties:{elements:{name:zN,defaultValue:[]}},superTypes:[]},AbnfElement:{name:KN,properties:{primary:{name:qN},repeat:{name:UN}},superTypes:[]},AbnfGroup:{name:BN,properties:{element:{name:WN}},superTypes:[ZN]},AbnfNumVal:{name:VN,properties:{value:{name:HN}},superTypes:[ZN]},AbnfOptionalGroup:{name:YN,properties:{element:{name:QN}},superTypes:[ZN]},AbnfPrimary:{name:ZN,properties:{},superTypes:[]},AbnfRule:{name:XN,properties:{definition:{name:JN},name:{name:eI}},superTypes:[]},AbnfRuleName:{name:tI,properties:{name:{name:rI}},superTypes:[ZN]},AbnfStringLiteral:{name:nI,properties:{value:{name:aI}},superTypes:[ZN]},Accelerator:{name:iI,properties:{name:{name:sI},x:{name:oI},y:{name:lI}},superTypes:[]},Alignment:{name:uI,properties:{direction:{name:cI},members:{name:pI,defaultValue:[]}},superTypes:[]},Anchor:{name:dI,properties:{evolution:{name:fI},name:{name:mI},visibility:{name:hI}},superTypes:[]},Annotation:{name:yI,properties:{number:{name:gI},text:{name:TI},x:{name:vI},y:{name:$I}},superTypes:[]},Annotations:{name:RI,properties:{x:{name:EI},y:{name:bI}},superTypes:[]},Architecture:{name:AI,properties:{accDescr:{name:CI},accTitle:{name:SI},alignments:{name:kI,defaultValue:[]},edges:{name:xI,defaultValue:[]},groups:{name:wI,defaultValue:[]},junctions:{name:NI,defaultValue:[]},services:{name:II,defaultValue:[]},title:{name:_I}},superTypes:[]},Axis:{name:PI,properties:{label:{name:OI},name:{name:DI}},superTypes:[]},Branch:{name:LI,properties:{name:{name:MI},order:{name:jI}},superTypes:[$M]},Checkout:{name:FI,properties:{branch:{name:GI}},superTypes:[$M]},CherryPicking:{name:zI,properties:{id:{name:KI},parent:{name:qI},tags:{name:UI,defaultValue:[]}},superTypes:[$M]},ClassDefStatement:{name:BI,properties:{className:{name:WI},styleText:{name:VI}},superTypes:[]},Commit:{name:HI,properties:{id:{name:YI},message:{name:QI},tags:{name:ZI,defaultValue:[]},type:{name:XI}},superTypes:[$M]},Common:{name:JI,properties:{accDescr:{name:e_},accTitle:{name:t_},title:{name:r_}},superTypes:[]},Component:{name:n_,properties:{decorator:{name:a_},evolution:{name:i_},inertia:{name:s_,defaultValue:!1},label:{name:o_},name:{name:l_},visibility:{name:u_}},superTypes:[]},Curve:{name:c_,properties:{entries:{name:p_,defaultValue:[]},label:{name:d_},name:{name:f_}},superTypes:[]},Cynefin:{name:m_,properties:{accDescr:{name:h_},accTitle:{name:y_},domains:{name:g_,defaultValue:[]},title:{name:T_},transitions:{name:v_,defaultValue:[]}},superTypes:[]},Deaccelerator:{name:$_,properties:{name:{name:R_},x:{name:E_},y:{name:b_}},superTypes:[]},Decorator:{name:A_,properties:{strategy:{name:C_}},superTypes:[]},Direction:{name:S_,properties:{accDescr:{name:k_},accTitle:{name:x_},dir:{name:w_},statements:{name:N_,defaultValue:[]},title:{name:I_}},superTypes:[kO]},DomainBlock:{name:__,properties:{domain:{name:P_},items:{name:O_,defaultValue:[]}},superTypes:[]},DomainItem:{name:D_,properties:{label:{name:L_}},superTypes:[]},EbnfChoice:{name:M_,properties:{alternatives:{name:j_,defaultValue:[]}},superTypes:[]},EbnfExceptionPostfix:{name:F_,properties:{except:{name:G_}},superTypes:[Z_]},EbnfGroup:{name:z_,properties:{element:{name:K_}},superTypes:[X_]},EbnfNonTerminal:{name:q_,properties:{name:{name:U_}},superTypes:[X_]},EbnfOneOrMorePostfix:{name:B_,properties:{operator:{name:W_}},superTypes:[Z_]},EbnfOptional:{name:V_,properties:{element:{name:H_}},superTypes:[X_]},EbnfOptionalPostfix:{name:Y_,properties:{operator:{name:Q_}},superTypes:[Z_]},EbnfPostfix:{name:Z_,properties:{},superTypes:[]},EbnfPrimary:{name:X_,properties:{},superTypes:[]},EbnfRepetition:{name:J_,properties:{element:{name:eP}},superTypes:[X_]},EbnfRule:{name:tP,properties:{definition:{name:rP},name:{name:nP}},superTypes:[]},EbnfSequence:{name:aP,properties:{elements:{name:iP,defaultValue:[]}},superTypes:[]},EbnfSpecial:{name:sP,properties:{text:{name:oP}},superTypes:[X_]},EbnfTerm:{name:lP,properties:{base:{name:uP},postfixes:{name:cP,defaultValue:[]}},superTypes:[]},EbnfTerminal:{name:pP,properties:{value:{name:dP}},superTypes:[X_]},EbnfZeroOrMorePostfix:{name:fP,properties:{operator:{name:mP}},superTypes:[Z_]},Edge:{name:hP,properties:{lhsDir:{name:yP},lhsGroup:{name:gP,defaultValue:!1},lhsId:{name:TP},lhsInto:{name:vP,defaultValue:!1},rhsDir:{name:$P},rhsGroup:{name:RP,defaultValue:!1},rhsId:{name:EP},rhsInto:{name:bP,defaultValue:!1},title:{name:AP}},superTypes:[]},EmDataEntity:{name:CP,properties:{dataBlockValue:{name:SP},dataType:{name:kP},name:{name:xP}},superTypes:[]},EmFrame:{name:wP,properties:{},superTypes:[]},EmGwt:{name:NP,properties:{givenStatements:{name:IP,defaultValue:[]},sourceFrame:{name:_P,referenceType:wP},thenStatements:{name:PP,defaultValue:[]},whenStatements:{name:OP,defaultValue:[]}},superTypes:[]},EmGwtStatement:{name:DP,properties:{entityIdentifier:{name:LP,referenceType:MP}},superTypes:[]},EmModelEntity:{name:MP,properties:{name:{name:jP}},superTypes:[]},EmNoteEntity:{name:FP,properties:{dataBlockValue:{name:GP},dataType:{name:zP},sourceFrame:{name:KP,referenceType:wP}},superTypes:[]},EmResetFrame:{name:qP,properties:{dataInlineValue:{name:UP},dataReference:{name:BP,referenceType:CP},dataType:{name:WP},entityIdentifier:{name:VP},modelEntityType:{name:HP},name:{name:YP},sourceFrames:{name:QP,defaultValue:[],referenceType:wP}},superTypes:[wP]},EmTimeFrame:{name:XP,properties:{dataInlineValue:{name:JP},dataReference:{name:eO,referenceType:CP},dataType:{name:tO},entityIdentifier:{name:rO},modelEntityType:{name:nO},name:{name:aO},sourceFrames:{name:iO,defaultValue:[],referenceType:wP}},superTypes:[wP]},Entry:{name:sO,properties:{axis:{name:oO,referenceType:PI},value:{name:lO}},superTypes:[]},EventModel:{name:uO,properties:{accDescr:{name:cO},accTitle:{name:pO},dataEntities:{name:dO,defaultValue:[]},frames:{name:fO,defaultValue:[]},gwtEntities:{name:mO,defaultValue:[]},modelEntities:{name:hO,defaultValue:[]},noteEntities:{name:yO,defaultValue:[]},title:{name:gO}},superTypes:[]},Evolution:{name:TO,properties:{stages:{name:vO,defaultValue:[]}},superTypes:[]},EvolutionStage:{name:$O,properties:{boundary:{name:RO},name:{name:EO},secondName:{name:bO}},superTypes:[]},Evolve:{name:AO,properties:{component:{name:CO},target:{name:SO}},superTypes:[]},GitGraph:{name:kO,properties:{accDescr:{name:xO},accTitle:{name:wO},statements:{name:NO,defaultValue:[]},title:{name:IO}},superTypes:[]},Group:{name:_O,properties:{icon:{name:PO},id:{name:OO},in:{name:DO},title:{name:LO}},superTypes:[]},Info:{name:MO,properties:{accDescr:{name:jO},accTitle:{name:FO},title:{name:GO}},superTypes:[]},Item:{name:zO,properties:{classSelector:{name:KO},name:{name:qO}},superTypes:[]},Junction:{name:UO,properties:{id:{name:BO},in:{name:WO}},superTypes:[]},Label:{name:VO,properties:{negX:{name:HO,defaultValue:!1},negY:{name:YO,defaultValue:!1},offsetX:{name:QO},offsetY:{name:ZO}},superTypes:[]},Leaf:{name:XO,properties:{classSelector:{name:JO},name:{name:eD},value:{name:tD}},superTypes:[zO]},Link:{name:rD,properties:{arrow:{name:nD},from:{name:aD},fromPort:{name:iD},linkLabel:{name:sD},to:{name:oD},toPort:{name:lD}},superTypes:[]},Merge:{name:uD,properties:{branch:{name:cD},id:{name:pD},tags:{name:dD,defaultValue:[]},type:{name:fD}},superTypes:[$M]},Note:{name:mD,properties:{evolution:{name:hD},text:{name:yD},visibility:{name:gD}},superTypes:[]},Option:{name:TD,properties:{name:{name:vD},value:{name:$D,defaultValue:!1}},superTypes:[]},Packet:{name:RD,properties:{accDescr:{name:ED},accTitle:{name:bD},blocks:{name:AD,defaultValue:[]},title:{name:CD}},superTypes:[]},PacketBlock:{name:SD,properties:{bits:{name:kD},end:{name:xD},label:{name:wD},start:{name:ND}},superTypes:[]},PegAny:{name:ID,properties:{dot:{name:_D}},superTypes:[UD]},PegGroup:{name:PD,properties:{element:{name:OD}},superTypes:[UD]},PegIdentifier:{name:DD,properties:{name:{name:LD}},superTypes:[UD]},PegLiteral:{name:MD,properties:{value:{name:jD}},superTypes:[UD]},PegOrderedChoice:{name:FD,properties:{alternatives:{name:GD,defaultValue:[]}},superTypes:[]},PegPrefix:{name:zD,properties:{operator:{name:KD},suffix:{name:qD}},superTypes:[]},PegPrimary:{name:UD,properties:{},superTypes:[]},PegRule:{name:BD,properties:{definition:{name:WD},name:{name:VD}},superTypes:[]},PegSequence:{name:HD,properties:{elements:{name:YD,defaultValue:[]}},superTypes:[]},PegSuffix:{name:QD,properties:{operator:{name:ZD},primary:{name:XD}},superTypes:[]},Pie:{name:JD,properties:{accDescr:{name:eL},accTitle:{name:tL},sections:{name:rL,defaultValue:[]},showData:{name:nL,defaultValue:!1},title:{name:aL}},superTypes:[]},PieSection:{name:iL,properties:{label:{name:sL},value:{name:oL}},superTypes:[]},Pipeline:{name:lL,properties:{components:{name:uL,defaultValue:[]},parent:{name:cL}},superTypes:[]},PipelineComponent:{name:pL,properties:{evolution:{name:dL},label:{name:fL},name:{name:mL}},superTypes:[]},Radar:{name:hL,properties:{accDescr:{name:yL},accTitle:{name:gL},axes:{name:TL,defaultValue:[]},curves:{name:vL,defaultValue:[]},options:{name:$L,defaultValue:[]},title:{name:RL}},superTypes:[]},Railroad:{name:EL,properties:{accDescr:{name:bL},accTitle:{name:AL},rules:{name:CL,defaultValue:[]},title:{name:SL}},superTypes:[]},RailroadAbnf:{name:kL,properties:{accDescr:{name:xL},accTitle:{name:wL},rules:{name:NL,defaultValue:[]},title:{name:IL}},superTypes:[]},RailroadChoiceExpr:{name:_L,properties:{alternatives:{name:PL,defaultValue:[]}},superTypes:[FL]},RailroadEbnf:{name:OL,properties:{accDescr:{name:DL},accTitle:{name:LL},rules:{name:ML,defaultValue:[]},title:{name:jL}},superTypes:[]},RailroadExpression:{name:FL,properties:{},superTypes:[]},RailroadNonTerminalExpr:{name:GL,properties:{name:{name:zL}},superTypes:[FL]},RailroadOneOrMoreExpr:{name:KL,properties:{element:{name:qL}},superTypes:[FL]},RailroadOptionalExpr:{name:UL,properties:{element:{name:BL}},superTypes:[FL]},RailroadPeg:{name:WL,properties:{accDescr:{name:VL},accTitle:{name:HL},rules:{name:YL,defaultValue:[]},title:{name:QL}},superTypes:[]},RailroadRule:{name:ZL,properties:{definition:{name:XL},name:{name:JL}},superTypes:[]},RailroadSequenceExpr:{name:eM,properties:{elements:{name:tM,defaultValue:[]}},superTypes:[FL]},RailroadSpecialExpr:{name:rM,properties:{text:{name:nM}},superTypes:[FL]},RailroadTerminalExpr:{name:aM,properties:{value:{name:iM}},superTypes:[FL]},RailroadZeroOrMoreExpr:{name:sM,properties:{element:{name:oM}},superTypes:[FL]},Section:{name:lM,properties:{classSelector:{name:uM},name:{name:cM}},superTypes:[zO]},Service:{name:pM,properties:{icon:{name:dM},iconText:{name:fM},id:{name:mM},in:{name:hM},title:{name:yM}},superTypes:[]},Size:{name:gM,properties:{height:{name:TM},width:{name:vM}},superTypes:[]},Statement:{name:$M,properties:{},superTypes:[]},Transition:{name:RM,properties:{from:{name:EM},label:{name:bM},to:{name:AM}},superTypes:[]},TreeNode:{name:PM,properties:{classAnnotation:{name:OM},descAnnotation:{name:DM},iconAnnotation:{name:LM},indent:{name:MM},name:{name:jM}},superTypes:[]},TreeView:{name:FM,properties:{accDescr:{name:GM},accTitle:{name:zM},nodes:{name:KM,defaultValue:[]},title:{name:qM}},superTypes:[]},Treemap:{name:CM,properties:{accDescr:{name:SM},accTitle:{name:kM},title:{name:xM},TreemapRows:{name:wM,defaultValue:[]}},superTypes:[]},TreemapRow:{name:NM,properties:{indent:{name:IM},item:{name:_M}},superTypes:[]},Wardley:{name:UM,properties:{accDescr:{name:BM},accelerators:{name:WM,defaultValue:[]},accTitle:{name:VM},anchors:{name:HM,defaultValue:[]},annotation:{name:YM,defaultValue:[]},annotations:{name:QM,defaultValue:[]},components:{name:ZM,defaultValue:[]},deaccelerators:{name:XM,defaultValue:[]},evolution:{name:JM},evolves:{name:ej,defaultValue:[]},links:{name:tj,defaultValue:[]},notes:{name:rj,defaultValue:[]},pipelines:{name:nj,defaultValue:[]},size:{name:aj},title:{name:ij}},superTypes:[]}}}static{Ge(this,"MermaidAstReflection")}},Ej=new Rj,bj=Ge(()=>sj??(sj=$N('{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"alignments","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Alignment","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"align"},{"$type":"Assignment","feature":"direction","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"row"},{"$type":"Keyword","value":"column"}]}},{"$type":"Assignment","feature":"members","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"members","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@20"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[(?:\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'|[^\\\\[\\\\]\\\\r\\\\n]+)\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}')),"ArchitectureGrammarGrammar"),Aj=Ge(()=>oj??(oj=$N('{"$type":"Grammar","isDeclared":true,"name":"CynefinGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Cynefin","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"cynefin-beta"},{"$type":"Keyword","value":"cynefin-beta:"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"domains","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"transitions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"DomainBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"domain","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Assignment","feature":"items","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"DomainItem","definition":{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Transition","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":"--\x3e"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"DOMAIN_NAME","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"complex"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"complicated"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"clear"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"chaotic"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"confusion"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"CynefinGrammarGrammar"),Cj=Ge(()=>lj??(lj=$N('{"$type":"Grammar","isDeclared":true,"name":"EventModeling","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","entry":true,"name":"EventModel","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"eventmodeling"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"frames","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"dataEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"noteEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"gwtEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntityType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rmo"},{"$type":"Keyword","value":"readmodel"},{"$type":"Keyword","value":"ui"},{"$type":"Keyword","value":"cmd"},{"$type":"Keyword","value":"command"},{"$type":"Keyword","value":"evt"},{"$type":"Keyword","value":"event"},{"$type":"Keyword","value":"pcr"},{"$type":"Keyword","value":"processor"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"json"},{"$type":"Keyword","value":"jsobj"},{"$type":"Keyword","value":"figma"},{"$type":"Keyword","value":"salt"},{"$type":"Keyword","value":"uri"},{"$type":"Keyword","value":"md"},{"$type":"Keyword","value":"html"},{"$type":"Keyword","value":"text"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataInline","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataInlineValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataBlock","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataBlockValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"QualifiedName","dataType":"string","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"."},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmTimeFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"tf"},{"$type":"Keyword","value":"timeframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmResetFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rf"},{"$type":"Keyword","value":"resetframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmFrame","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"entity"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"data"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmNoteEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"note"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwt","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"gwt"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"given"},{"$type":"Assignment","feature":"givenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"},{"$type":"Group","elements":[{"$type":"Keyword","value":"when"},{"$type":"Assignment","feature":"whenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}],"cardinality":"?"},{"$type":"Keyword","value":"then"},{"$type":"Assignment","feature":"thenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwtStatement","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@9"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_EID","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_FI","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"EM_ID","definition":{"$type":"RegexToken","regex":"/[_a-zA-Z][\\\\w_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_FID","definition":{"$type":"RegexToken","regex":"/\\\\d{1,3}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_INLINE","definition":{"$type":"RegexToken","regex":"/\\\\{(.*)\\\\}|\\"(.*)\\"|\'(.*)\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_BLOCK","definition":{"$type":"RegexToken","regex":"/\\\\{[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?\\\\}(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"EM_WS","definition":{"$type":"RegexToken","regex":"/\\\\s+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SL_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\/[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"imports":[],"types":[]}')),"EventModelingGrammar"),Sj=Ge(()=>uj??(uj=$N('{"$type":"Grammar","isDeclared":true,"name":"GitGraphGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}')),"GitGraphGrammarGrammar"),kj=Ge(()=>cj??(cj=$N('{"$type":"Grammar","isDeclared":true,"name":"InfoGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"InfoGrammarGrammar"),xj=Ge(()=>pj??(pj=$N('{"$type":"Grammar","isDeclared":true,"name":"PacketGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"PacketGrammarGrammar"),wj=Ge(()=>dj??(dj=$N('{"$type":"Grammar","isDeclared":true,"name":"PieGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"PieGrammarGrammar"),Nj=Ge(()=>fj??(fj=$N('{"$type":"Grammar","isDeclared":true,"name":"RadarGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}},"isMulti":false}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"types":[]}')),"RadarGrammarGrammar"),Ij=Ge(()=>mj??(mj=$N('{"$type":"Grammar","isDeclared":true,"name":"RailroadAbnfGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_RULENAME","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Za-z][A-Za-z0-9-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_NUMVAL","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/%[xXdDbB][0-9A-Fa-f]+(?:-[0-9A-Fa-f]+|\\\\.[0-9A-Fa-f]+)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_REPEAT","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[0-9]*\\\\*[0-9]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_EXACT_REPEAT","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_COMMENT","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadAbnf","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-abnf-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"="},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfAlternation","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfConcatenation","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},"cardinality":"+"},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfElement","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"repeat","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"repeat","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"primary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfPrimary","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfStringLiteral","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfNumVal","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfRuleName","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfGroup","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfOptionalGroup","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadAbnf","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfAlternation","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfConcatenation","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfElement","attributes":[{"$type":"TypeAttribute","name":"repeat","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"primary","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"AbnfStringLiteral","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfNumVal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfRuleName","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"AbnfOptionalGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]}],"imports":[],"types":[]}')),"RailroadAbnfGrammarGrammar"),_j=Ge(()=>hj??(hj=$N('{"$type":"Grammar","isDeclared":true,"name":"RailroadEbnfGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_SPECIAL_SEQUENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\?(?=[^?;]*[^?\\\\s;][^?;]*\\\\?)[^?;]*\\\\?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_BLOCK_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_ISO_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\(\\\\*[\\\\s\\\\S]*?\\\\*\\\\)/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadEbnf","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-ebnf-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"="},{"$type":"Keyword","value":"::="}]},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfChoice","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"|"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfSequence","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":",","cardinality":"?"},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfTerm","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"base","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"postfixes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfPrimary","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfTerminal","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfNonTerminal","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfSpecial","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfGroup","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOptional","returnType":{"$ref":"#/interfaces@11"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfRepetition","returnType":{"$ref":"#/interfaces@12"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfPostfix","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOptionalPostfix","returnType":{"$ref":"#/interfaces@13"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"?"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfZeroOrMorePostfix","returnType":{"$ref":"#/interfaces@14"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"*"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOneOrMorePostfix","returnType":{"$ref":"#/interfaces@15"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"+"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfExceptionPostfix","returnType":{"$ref":"#/interfaces@16"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"except","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadEbnf","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfChoice","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfSequence","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfTerm","attributes":[{"$type":"TypeAttribute","name":"base","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false},{"$type":"TypeAttribute","name":"postfixes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@6"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"EbnfPostfix","attributes":[],"superTypes":[]},{"$type":"Interface","name":"EbnfTerminal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfNonTerminal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfSpecial","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"text","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfOptional","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfRepetition","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfOptionalPostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfZeroOrMorePostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfOneOrMorePostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfExceptionPostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"except","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}]}],"imports":[],"types":[]}')),"RailroadEbnfGrammarGrammar"),Pj=Ge(()=>yj??(yj=$N('{"$type":"Grammar","isDeclared":true,"name":"RailroadGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"RR_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"RR_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"RR_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_BLOCK_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"Railroad","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"="},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadExpression","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadSequenceExpr","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"sequence"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadChoiceExpr","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"choice"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadOptionalExpr","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"optional"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadOneOrMoreExpr","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"oneOrMore"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadZeroOrMoreExpr","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"zeroOrMore"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadTerminalExpr","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"terminal"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadNonTerminalExpr","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"nonterminal"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadSpecialExpr","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"special"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"Railroad","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"RailroadRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"RailroadExpression","attributes":[],"superTypes":[]},{"$type":"Interface","name":"RailroadSequenceExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}}},"isOptional":false}]},{"$type":"Interface","name":"RailroadChoiceExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}}},"isOptional":false}]},{"$type":"Interface","name":"RailroadOptionalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadOneOrMoreExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadZeroOrMoreExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadTerminalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"RailroadNonTerminalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"RailroadSpecialExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"text","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]}],"imports":[],"types":[]}')),"RailroadGrammarGrammar"),Oj=Ge(()=>gj??(gj=$N('{"$type":"Grammar","isDeclared":true,"name":"RailroadPegGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PEG_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PEG_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/#[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadPeg","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-peg-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"<-"},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegOrderedChoice","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegSequence","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"+"},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegPrefix","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"&"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"!"}}],"cardinality":"?"},{"$type":"Assignment","feature":"suffix","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegSuffix","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"primary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"?"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"*"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"+"}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegPrimary","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegLiteral","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegIdentifier","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegGroup","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegAny","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Assignment","feature":"dot","operator":"=","terminal":{"$type":"Keyword","value":"."}},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadPeg","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegOrderedChoice","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegSequence","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegPrefix","attributes":[{"$type":"TypeAttribute","name":"operator","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"suffix","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegSuffix","attributes":[{"$type":"TypeAttribute","name":"primary","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@6"}},"isOptional":false},{"$type":"TypeAttribute","name":"operator","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"PegPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"PegLiteral","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"PegIdentifier","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"PegGroup","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"PegAny","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"dot","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]}],"imports":[],"types":[]}')),"RailroadPegGrammarGrammar"),Dj=Ge(()=>Tj??(Tj=$N('{"$type":"Grammar","isDeclared":true,"name":"TreemapGrammar","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|\'[^\']*\'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@15"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}')),"TreemapGrammarGrammar"),Lj=Ge(()=>vj??(vj=$N('{"$type":"Grammar","isDeclared":true,"name":"TreeViewGrammar","rules":[{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"TreeView","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"treeView-beta"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"nodes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"CLASS_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+:::[ \\\\t]*[A-Za-z_][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ICON_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+icon\\\\([\\\\w-]*(?::[\\\\w-]+)?\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"DESC_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+##[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"QUOTED_NAME","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|\'[^\']*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"BARE_NAME","definition":{"$type":"RegexToken","regex":"/(?!:::|icon\\\\(|##)[^ \\\\t\\\\n\\\\r\\"\'](?:(?![ \\\\t]+:::[ \\\\t]*[A-Za-z_]|[ \\\\t]+icon\\\\(|[ \\\\t]+##)[^\\\\n\\\\r])*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TreeNode","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"classAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"iconAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"descAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"TreeView","attributes":[{"$type":"TypeAttribute","name":"nodes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@14"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * TreeView grammar for Langium\\n *\\n * Supports both quoted labels (\\"my file\\") and bare labels (index.js).\\n * Annotations (:::class, icon(), ## description) are parsed directly into\\n * AST fields by the grammar. Value conversion for stripping quotes, extracting\\n * class names, icon names, and description text happens in valueConverter.ts.\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treeView keyword, allowing for empty lines and comments before the\\n * treeView declaration.\\n */"}')),"TreeViewGrammarGrammar"),Mj=Ge(()=>$j??($j=$N('{"$type":"Grammar","isDeclared":true,"name":"WardleyGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Wardley","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@42"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"size","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"anchors","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"links","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"evolves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"pipelines","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"notes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"annotations","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Assignment","feature":"annotation","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"deaccelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Size","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"width","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"height","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolution","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EvolutionStage","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"@"},{"$type":"Assignment","feature":"boundary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}],"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"secondName","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Anchor","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Component","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"decorator","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Keyword","value":")"}]}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Label","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"negX","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetX","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"negY","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetY","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Decorator","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"strategy","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Link","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"fromPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"arrow","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"cardinality":"?"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"toPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"linkLabel","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolve","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@32"},"arguments":[]},{"$type":"Assignment","feature":"component","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Pipeline","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@33"},"arguments":[]},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"+"},{"$type":"Keyword","value":"}"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PipelineComponent","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Note","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@34"},"arguments":[]},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotations","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@35"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotation","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@36"},"arguments":[]},{"$type":"Assignment","feature":"number","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CoordinateValue","dataType":"number","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Accelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@37"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Deaccelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@38"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"WARDLEY_NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"->"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_PORT","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<>"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+>"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_ARROW","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"--\x3e"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-.->"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":">"},"parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+\'[^\']*\'<>/","parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+\'[^\']*\'/","parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_LABEL","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRATEGY","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"build"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"buy"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"outsource"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"market"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_WARDLEY","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"wardley-beta"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_SIZE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"size"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLUTION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolution"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANCHOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"anchor"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_COMPONENT","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"component"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_LABEL","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"label"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_INERTIA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"inertia"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLVE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolve"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_PIPELINE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"pipeline"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_NOTE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"note"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATIONS","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotations"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotation"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"accelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_DEACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"deaccelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NAME_WITH_SPACES","definition":{"$type":"RegexToken","regex":"/(?!title\\\\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \\\\t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@44"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@45"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@46"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@47"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@48"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"WardleyGrammarGrammar"),jj={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Fj={languageId:"cynefin",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Gj={languageId:"eventmodeling",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},zj={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Kj={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},qj={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Uj={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Bj={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Wj={languageId:"railroadAbnf",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Vj={languageId:"railroadEbnf",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Hj={languageId:"railroad",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Yj={languageId:"railroadPeg",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Qj={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Zj={languageId:"treeView",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Xj={languageId:"wardley",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Jj={AstReflection:Ge(()=>new Rj,"AstReflection")},eF={Grammar:Ge(()=>bj(),"Grammar"),LanguageMetaData:Ge(()=>jj,"LanguageMetaData"),parser:{}},tF={Grammar:Ge(()=>Aj(),"Grammar"),LanguageMetaData:Ge(()=>Fj,"LanguageMetaData"),parser:{}},rF={Grammar:Ge(()=>Cj(),"Grammar"),LanguageMetaData:Ge(()=>Gj,"LanguageMetaData"),parser:{}},nF={Grammar:Ge(()=>Sj(),"Grammar"),LanguageMetaData:Ge(()=>zj,"LanguageMetaData"),parser:{}},aF={Grammar:Ge(()=>kj(),"Grammar"),LanguageMetaData:Ge(()=>Kj,"LanguageMetaData"),parser:{}},iF={Grammar:Ge(()=>xj(),"Grammar"),LanguageMetaData:Ge(()=>qj,"LanguageMetaData"),parser:{}},sF={Grammar:Ge(()=>wj(),"Grammar"),LanguageMetaData:Ge(()=>Uj,"LanguageMetaData"),parser:{}},oF={Grammar:Ge(()=>Nj(),"Grammar"),LanguageMetaData:Ge(()=>Bj,"LanguageMetaData"),parser:{}},lF={Grammar:Ge(()=>Ij(),"Grammar"),LanguageMetaData:Ge(()=>Wj,"LanguageMetaData"),parser:{}},uF={Grammar:Ge(()=>_j(),"Grammar"),LanguageMetaData:Ge(()=>Vj,"LanguageMetaData"),parser:{}},cF={Grammar:Ge(()=>Pj(),"Grammar"),LanguageMetaData:Ge(()=>Hj,"LanguageMetaData"),parser:{}},pF={Grammar:Ge(()=>Oj(),"Grammar"),LanguageMetaData:Ge(()=>Yj,"LanguageMetaData"),parser:{}},dF={Grammar:Ge(()=>Dj(),"Grammar"),LanguageMetaData:Ge(()=>Qj,"LanguageMetaData"),parser:{}},fF={Grammar:Ge(()=>Lj(),"Grammar"),LanguageMetaData:Ge(()=>Zj,"LanguageMetaData"),parser:{}},mF={Grammar:Ge(()=>Mj(),"Grammar"),LanguageMetaData:Ge(()=>Xj,"LanguageMetaData"),parser:{}},hF={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},yF=class extends Zk{static{Ge(this,"AbstractMermaidValueConverter")}runConverter(e,t,r){let n=this.runCommonConverter(e,t,r);return void 0===n&&(n=this.runCustomConverter(e,t,r)),void 0===n?super.runConverter(e,t,r):n}runCommonConverter(e,t,r){const n=hF[e.name];if(void 0===n)return;const a=n.exec(t);return null!==a?void 0!==a[1]?a[1].trim().replace(/[\t ]{2,}/gm," "):void 0!==a[2]?a[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,"\n"):void 0:void 0}},gF=class extends yF{static{Ge(this,"CommonValueConverter")}runCustomConverter(e,t,r){}},TF=class extends Qk{static{Ge(this,"AbstractMermaidTokenBuilder")}constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,r){const n=super.buildKeywordTokens(e,t,r);return n.forEach(e=>{this.keywords.has(e.name)&&void 0!==e.PATTERN&&(e.PATTERN=new RegExp(e.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),n}};(class extends TF{static{Ge(this,"CommonTokenBuilder")}})},25552(e,t,r){r.d(t,{f:()=>s});var n=r(4954),a=class extends n.mR{static{(0,n.K2)(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},i={parser:{TokenBuilder:(0,n.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new n.Tm,"ValueConverter")}};function s(e=n.DD){const t=(0,n.WQ)((0,n.uM)(e),n.sr),r=(0,n.WQ)((0,n.tG)({shared:t}),n.Bg,i);return t.ServiceRegistry.register(r),{shared:t,Radar:r}}(0,n.K2)(s,"createRadarServices")},9427(e,t,r){r.d(t,{J:()=>s});var n=r(4954),a=class extends n.dg{static{(0,n.K2)(this,"WardleyValueConverter")}runCustomConverter(e,t,r){if("LINK_LABEL"===e.name.toUpperCase())return t.substring(1).trim()}},i={parser:{ValueConverter:(0,n.K2)(()=>new a,"ValueConverter")}};function s(e=n.DD){const t=(0,n.WQ)((0,n.uM)(e),n.sr),r=(0,n.WQ)((0,n.tG)({shared:t}),n.Xr,i);return t.ServiceRegistry.register(r),{shared:t,Wardley:r}}(0,n.K2)(s,"createWardleyServices")},30145(e,t,r){r.d(t,{I:()=>o});var n=r(4954),a=class extends n.dg{static{(0,n.K2)(this,"TreeViewValueConverter")}runCustomConverter(e,t,r){if("INDENTATION"===e.name)return t?.length||0;if("QUOTED_NAME"===e.name)return t.substring(1,t.length-1);if("BARE_NAME"===e.name)return t.replace(/[\t ]+$/,"");if("CLASS_ANNOTATION"===e.name){return t.trim().substring(3).trim()}if("ICON_ANNOTATION"===e.name){const e=t.trim();return e.substring(5,e.length-1)}if("DESC_ANNOTATION"===e.name){return t.trim().substring(2).trim()}}},i=class extends n.mR{static{(0,n.K2)(this,"TreeViewTokenBuilder")}constructor(){super(["treeView-beta"])}},s={parser:{TokenBuilder:(0,n.K2)(()=>new i,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new a,"ValueConverter")}};function o(e=n.DD){const t=(0,n.WQ)((0,n.uM)(e),n.sr),r=(0,n.WQ)((0,n.tG)({shared:t}),n.CZ,s);return t.ServiceRegistry.register(r),{shared:t,TreeView:r}}(0,n.K2)(o,"createTreeViewServices")},1721(e,t,r){r.d(t,{b:()=>s});var n=r(4954),a=class extends n.mR{static{(0,n.K2)(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},i={parser:{TokenBuilder:(0,n.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new n.Tm,"ValueConverter")}};function s(e=n.DD){const t=(0,n.WQ)((0,n.uM)(e),n.sr),r=(0,n.WQ)((0,n.tG)({shared:t}),n.d$,i);return t.ServiceRegistry.register(r),{shared:t,GitGraph:r}}(0,n.K2)(s,"createGitGraphServices")},38426(e,t,r){r.d(t,{l:()=>l});var n=r(4954),a=class extends n.mR{static{(0,n.K2)(this,"RailroadTokenBuilder")}constructor(){super(["railroad-beta"])}},i=(0,n.K2)(e=>{const t=e.slice(1,-1);let r="";for(let n=0;nnew a,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new s,"ValueConverter")}};function l(e=n.DD){const t=(0,n.WQ)((0,n.uM)(e),n.sr),r=(0,n.WQ)((0,n.tG)({shared:t}),n.Bi,o);return t.ServiceRegistry.register(r),{shared:t,Railroad:r}}(0,n.K2)(l,"createRailroadServices")},73263(e,t,r){r.d(t,{$:()=>s});var n=r(4954),a=class extends n.mR{static{(0,n.K2)(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},i={parser:{TokenBuilder:(0,n.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new n.Tm,"ValueConverter")}};function s(e=n.DD){const t=(0,n.WQ)((0,n.uM)(e),n.sr),r=(0,n.WQ)((0,n.tG)({shared:t}),n.p5,i);return t.ServiceRegistry.register(r),{shared:t,Packet:r}}(0,n.K2)(s,"createPacketServices")},89096(e,t,r){r.d(t,{s:()=>o});var n=r(4954),a=class extends n.mR{static{(0,n.K2)(this,"RailroadAbnfTokenBuilder")}constructor(){super(["railroad-abnf-beta"])}},i=class extends n.dg{static{(0,n.K2)(this,"RailroadAbnfValueConverter")}runConverter(e,t,r){const n=super.runConverter(e,t,r);if("TITLE"===e.name&&"string"==typeof n){const e=n.trim();if(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))return e.slice(1,-1)}return n}runCustomConverter(e,t,r){if("ABNF_STRING"===e.name)return t.slice(1,-1)}},s={parser:{TokenBuilder:(0,n.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new i,"ValueConverter")}};function o(e=n.DD){const t=(0,n.WQ)((0,n.uM)(e),n.sr),r=(0,n.WQ)((0,n.tG)({shared:t}),n.oI,s);return t.ServiceRegistry.register(r),{shared:t,RailroadAbnf:r}}(0,n.K2)(o,"createRailroadAbnfServices")},78731(e,t,r){r.d(t,{F5:()=>o.F5,Pz:()=>s.P,WG:()=>a.W,lz:()=>n.l,qg:()=>c,sB:()=>i.s,zg:()=>p});r(25552);var n=r(38426),a=r(14916),i=r(89096),s=r(43245),o=(r(16527),r(9427),r(93279),r(1721),r(54614),r(73263),r(26041),r(30145),r(45796),r(82688),r(4954)),l={},u={info:(0,o.K2)(async()=>{const{createInfoServices:e}=await r.e(6445).then(r.bind(r,6445)),t=e().Info.parser.LangiumParser;l.info=t},"info"),packet:(0,o.K2)(async()=>{const{createPacketServices:e}=await r.e(3327).then(r.bind(r,13327)),t=e().Packet.parser.LangiumParser;l.packet=t},"packet"),pie:(0,o.K2)(async()=>{const{createPieServices:e}=await r.e(9590).then(r.bind(r,59590)),t=e().Pie.parser.LangiumParser;l.pie=t},"pie"),treeView:(0,o.K2)(async()=>{const{createTreeViewServices:e}=await r.e(4142).then(r.bind(r,74142)),t=e().TreeView.parser.LangiumParser;l.treeView=t},"treeView"),architecture:(0,o.K2)(async()=>{const{createArchitectureServices:e}=await r.e(7089).then(r.bind(r,37089)),t=e().Architecture.parser.LangiumParser;l.architecture=t},"architecture"),gitGraph:(0,o.K2)(async()=>{const{createGitGraphServices:e}=await r.e(9945).then(r.bind(r,69945)),t=e().GitGraph.parser.LangiumParser;l.gitGraph=t},"gitGraph"),eventmodeling:(0,o.K2)(async()=>{const{createEventModelingServices:e}=await r.e(2355).then(r.bind(r,52355)),t=e().EventModel.parser.LangiumParser;l.eventmodeling=t},"eventmodeling"),radar:(0,o.K2)(async()=>{const{createRadarServices:e}=await r.e(8365).then(r.bind(r,98365)),t=e().Radar.parser.LangiumParser;l.radar=t},"radar"),railroad:(0,o.K2)(async()=>{const{createRailroadServices:e}=await r.e(2223).then(r.bind(r,2223)),t=e().Railroad.parser.LangiumParser;l.railroad=t},"railroad"),railroadEbnf:(0,o.K2)(async()=>{const{createRailroadEbnfServices:e}=await r.e(9035).then(r.bind(r,49035)),t=e().RailroadEbnf.parser.LangiumParser;l.railroadEbnf=t},"railroadEbnf"),railroadAbnf:(0,o.K2)(async()=>{const{createRailroadAbnfServices:e}=await r.e(6480).then(r.bind(r,6480)),t=e().RailroadAbnf.parser.LangiumParser;l.railroadAbnf=t},"railroadAbnf"),railroadPeg:(0,o.K2)(async()=>{const{createRailroadPegServices:e}=await r.e(5784).then(r.bind(r,55784)),t=e().RailroadPeg.parser.LangiumParser;l.railroadPeg=t},"railroadPeg"),treemap:(0,o.K2)(async()=>{const{createTreemapServices:e}=await r.e(884).then(r.bind(r,90884)),t=e().Treemap.parser.LangiumParser;l.treemap=t},"treemap"),wardley:(0,o.K2)(async()=>{const{createWardleyServices:e}=await r.e(7632).then(r.bind(r,37632)),t=e().Wardley.parser.LangiumParser;l.wardley=t},"wardley"),cynefin:(0,o.K2)(async()=>{const{createCynefinServices:e}=await r.e(7636).then(r.bind(r,57636)),t=e().Cynefin.parser.LangiumParser;l.cynefin=t},"cynefin")};async function c(e,t){const r=u[e];if(!r)throw new Error(`Unknown diagram type: ${e}`);l[e]||await r();const n=l[e].parse(t);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new p(n);return n.value}(0,o.K2)(c,"parse");var p=class extends Error{constructor(e){super(`Parsing failed: ${e.lexerErrors.map(e=>`Lexer error on line ${void 0===e.line||isNaN(e.line)?"?":e.line}, column ${void 0===e.column||isNaN(e.column)?"?":e.column}: ${e.message}`).join("\n")} ${e.parserErrors.map(e=>`Parse error on line ${void 0===e.token.startLine||isNaN(e.token.startLine)?"?":e.token.startLine}, column ${void 0===e.token.startColumn||isNaN(e.token.startColumn)?"?":e.token.startColumn}: ${e.message}`).join("\n")}`),this.result=e}static{(0,o.K2)(this,"MermaidParseError")}}}}]); \ No newline at end of file diff --git a/assets/js/884.6ebfab52.js b/assets/js/884.6ebfab52.js new file mode 100644 index 000000000..8978146e0 --- /dev/null +++ b/assets/js/884.6ebfab52.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[884],{90884(e,s,c){c.d(s,{createTreemapServices:()=>a.d});var a=c(16527);c(4954)}}]); \ No newline at end of file diff --git a/assets/js/88edeb39.674cedaf.js b/assets/js/88edeb39.674cedaf.js new file mode 100644 index 000000000..8c4fb5551 --- /dev/null +++ b/assets/js/88edeb39.674cedaf.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[2974],{2726(e,n,t){t.r(n),t.d(n,{assets:()=>r,contentTitle:()=>c,default:()=>l,frontMatter:()=>a,metadata:()=>s,toc:()=>h});const s=JSON.parse('{"id":"concepts/incentives/bandwidth-incentives","title":"Bandwidth Incentives (SWAP)","description":"Explains SWAP protocol for managing bandwidth resource exchange between nodes using cheques and off-chain accounting.","source":"@site/docs/concepts/incentives/bandwidth-incentives.md","sourceDirName":"concepts/incentives","slug":"/concepts/incentives/bandwidth-incentives","permalink":"/docs/concepts/incentives/bandwidth-incentives","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/concepts/incentives/bandwidth-incentives.md","tags":[],"version":"current","frontMatter":{"title":"Bandwidth Incentives (SWAP)","id":"bandwidth-incentives","description":"Explains SWAP protocol for managing bandwidth resource exchange between nodes using cheques and off-chain accounting."},"sidebar":"concepts","previous":{"title":"Postage Stamps","permalink":"/docs/concepts/incentives/postage-stamps"},"next":{"title":"Price Oracle","permalink":"/docs/concepts/incentives/price-oracle"}}');var o=t(74848),i=t(28453);const a={title:"Bandwidth Incentives (SWAP)",id:"bandwidth-incentives",description:"Explains SWAP protocol for managing bandwidth resource exchange between nodes using cheques and off-chain accounting."},c=void 0,r={},h=[{value:"Chequebook Contract",id:"chequebook-contract",level:2},{value:"Opportunistic Caching",id:"opportunistic-caching",level:2}];function d(e){const n={a:"a",admonition:"admonition",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.p,{children:"The Swarm Accounting Protocol (SWAP) is a protocol used to manage the exchange of bandwidth resources between nodes. SWAP ensures that node operators collaborate in routing messages and data while protecting the network against frivolous use of bandwidth. The protocol combines off-chain peer-to-peer based accounting with on-chain settlement through the chequebook contract."}),"\n",(0,o.jsx)(n.admonition,{title:"Key facts",type:"info",children:(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"What it is"}),": SWAP (Swarm Accounting Protocol) manages the exchange of bandwidth between nodes."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Accounting"}),": each pair of peers tracks their relative bandwidth usage off-chain."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Settlement"}),': when one node\'s debt crosses a threshold, it either issues an xBZZ "cheque" (settled on-chain via the chequebook contract) or keeps serving bandwidth in kind until the debt is paid off.']}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Thresholds & freeloaders"}),": each node sets its own debt threshold; nodes that do not pay risk being blacklisted."]}),"\n"]})}),"\n",(0,o.jsx)(n.p,{children:"As nodes relay requests and responses, they keep track of their bandwidth usage with each of their peers. Peers engage in a service-for-service exchange, where they provide resources to each other based on their relative usage."}),"\n",(0,o.jsx)(n.p,{children:'Once a node\'s relative debt with one of their peers crosses a certain threshold, the party in debt can either send a xBZZ payment in the form of a "cheque" (an off chain commitment to pay their debt), or can continue to provide bandwidth services in kind until their debt is paid off. Each node can set their own threshold for the level of relative debt they accept. Freeloader nodes which do not pay their debts are at risk of being blacklisted by other nodes.'}),"\n",(0,o.jsx)(n.h2,{id:"chequebook-contract",children:"Chequebook Contract"}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.a,{href:"https://github.com/ethersphere/swap-swear-and-swindle/blob/master/contracts/ERC20SimpleSwap.sol",children:"chequebook contract"})," is a smart contract used in the SWAP protocol to manage cheques that are sent between nodes on the network. It acts as a wallet which nodes can fund with xBZZ which can be used to issue payments when presented with a valid cheque. The contract is also responsible for ensuring that cheques are valid and are cashed out correctly."]}),"\n",(0,o.jsx)(n.p,{children:"When a node sends a cheque to one of its peers, it includes a signed message that specifies the amount of xBZZ tokens being transferred and the recipient's address. The chequebook contract receives this message and verifies that it is valid by checking the signature and ensuring that the sender has enough funds to cover the transfer."}),"\n",(0,o.jsx)(n.p,{children:"If the cheque is valid, the contract updates the balances of both nodes accordingly. The recipient can then cash out their xBZZ tokens by sending a transaction to the blockchain that invokes a function in the chequebook contract. This function transfers the specified amount of xBZZ tokens from the sender's account to the recipient's account."}),"\n",(0,o.jsx)(n.h2,{id:"opportunistic-caching",children:"Opportunistic Caching"}),"\n",(0,o.jsx)(n.p,{children:"When a node serves a chunk, the chunk is saved in the nodes' cache. Popular chunks which are frequently requested are kept in the cache so that they can be served again without the need to re-download the chunks from the network. This allows nodes to maximise their earnings by retaining popular chunks. This mechanism also contributes to Swarm's scalability, as popular chunks are always readily available for download as a result of opportunistic caching."}),"\n",(0,o.jsxs)(n.p,{children:["To learn in more detail about how bandwidth incentives work, refer to sections 3.1 and 3.2 from ",(0,o.jsx)(n.a,{href:"https://papers.ethswarm.org/p/book-of-swarm/",children:"The Book of Swarm"}),"."]})]})}function l(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},28453(e,n,t){t.d(n,{R:()=>a,x:()=>c});var s=t(96540);const o={},i=s.createContext(o);function a(e){const n=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8913.ba4b7ae2.js b/assets/js/8913.ba4b7ae2.js new file mode 100644 index 000000000..0b39c2ff3 --- /dev/null +++ b/assets/js/8913.ba4b7ae2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[8913],{58913(e,s,c){c.r(s)}}]); \ No newline at end of file diff --git a/assets/js/8932e155.b0af5622.js b/assets/js/8932e155.b0af5622.js new file mode 100644 index 000000000..9d215b870 --- /dev/null +++ b/assets/js/8932e155.b0af5622.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[8241],{1867(e,r,t){t.r(r),t.d(r,{assets:()=>d,contentTitle:()=>l,default:()=>p,frontMatter:()=>o,metadata:()=>a,toc:()=>c});const a=JSON.parse('{"id":"concepts/what-is-swarm","title":"What is Swarm?","description":"Details Swarm\'s four-layer architecture including underlay overlay data access and application layers for decentralized storage.","source":"@site/docs/concepts/what-is-swarm.mdx","sourceDirName":"concepts","slug":"/concepts/what-is-swarm","permalink":"/docs/concepts/what-is-swarm","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/concepts/what-is-swarm.mdx","tags":[],"version":"current","frontMatter":{"title":"What is Swarm?","id":"what-is-swarm","description":"Details Swarm\'s four-layer architecture including underlay overlay data access and application layers for decentralized storage."},"sidebar":"concepts","previous":{"title":"Introduction","permalink":"/docs/concepts/introduction"},"next":{"title":"DISC","permalink":"/docs/concepts/DISC/"}}');var n=t(74848),s=t(28453);const i=t.p+"assets/images/bos_fig_1_1-a68dfb0d006fdceab951c7df44a0b13a.jpg",o={title:"What is Swarm?",id:"what-is-swarm",description:"Details Swarm's four-layer architecture including underlay overlay data access and application layers for decentralized storage."},l=void 0,d={},c=[{value:"1. Underlay Network",id:"1-underlay-network",level:3},{value:"2. Overlay Network",id:"2-overlay-network",level:3},{value:"3. Data Access Layer",id:"3-data-access-layer",level:3},{value:"4. Application Layer",id:"4-application-layer",level:3}];function h(e){const r={a:"a",h3:"h3",li:"li",ol:"ol",p:"p",...(0,s.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.p,{children:"Swarm is a peer-to-peer network of nodes which work together to provide decentralised storage and communication infrastructure."}),"\n",(0,n.jsxs)(r.p,{children:["The complete vision of Swarm is described in detail in ",(0,n.jsx)(r.a,{href:"https://papers.ethswarm.org/p/book-of-swarm/",children:"The Book of Swarm"})," written by Swarm founder Viktor Tron, with further high level details described in the ",(0,n.jsx)(r.a,{href:"https://papers.ethswarm.org/p/whitepaper/",children:"whitepaper"}),". More in depth low level implementation details can be found in the ",(0,n.jsx)(r.a,{href:"https://papers.ethswarm.org/p/swarm-protocol-spec/",children:"Swarm Specification paper"}),". The latest research and technical papers from Swarm can be found on the ",(0,n.jsx)(r.a,{href:"https://papers.ethswarm.org/",children:'"Papers" section'})," of the Ethswarm homepage."]}),"\n",(0,n.jsx)(r.p,{children:"Swarm can be divided into four main parts:"}),"\n",(0,n.jsxs)(r.ol,{children:["\n",(0,n.jsxs)(r.li,{children:["Underlay Network - A peer-to-peer network protocol to serve as underlay transport. Swarm's underlay network is built with ",(0,n.jsx)(r.a,{href:"https://libp2p.io/",children:"libp2p"}),"."]}),"\n",(0,n.jsx)(r.li,{children:"Overlay Network - An overlay network with protocols powering a distributed immutable store for chunks (fixed size data blocks)."}),"\n",(0,n.jsx)(r.li,{children:"Data Access Layer - A component providing high-level data access and defining APIs for base-layer features."}),"\n",(0,n.jsx)(r.li,{children:"Application Layer - An application layer defining standards and outlining best practices for more elaborate use cases."}),"\n"]}),"\n",(0,n.jsxs)("div",{style:{textAlign:"center"},children:[(0,n.jsx)("img",{src:i,className:"responsive-image"}),(0,n.jsx)("p",{style:{fontStyle:"italic",marginTop:"0.5rem"},children:(0,n.jsxs)(r.p,{children:["Source: ",(0,n.jsx)("a",{href:"https://www.ethswarm.org/the-book-of-swarm-2.pdf#part.2",target:"_blank",children:'The Book of Swarm - Figure 1.1 - "Swarm\u2019s Layered Design"'})]})})]}),"\n",(0,n.jsx)(r.p,{children:"Of these four main parts, parts 2 and 3 form the core of Swarm."}),"\n",(0,n.jsx)(r.h3,{id:"1-underlay-network",children:"1. Underlay Network"}),"\n",(0,n.jsx)(r.p,{children:"The first part of Swarm is a peer-to-peer network protocol that serves as the underlay transport. The underlay transport layer is responsible for establishing connections between nodes in the network and routing data between them. It provides a low-level communication channel that enables nodes to communicate with each other directly, without relying on any centralised infrastructure."}),"\n",(0,n.jsx)(r.p,{children:"Swarm is designed to be agnostic of the particular underlay transport used, as long as it satisfies certain requirements described in The Book of Swarm."}),"\n",(0,n.jsxs)(r.p,{children:["As the ",(0,n.jsx)(r.a,{href:"https://libp2p.io/",children:"libp2p"})," library meets all these requirements it has been used to build the Swarm underlay network."]}),"\n",(0,n.jsx)(r.h3,{id:"2-overlay-network",children:"2. Overlay Network"}),"\n",(0,n.jsxs)(r.p,{children:["The second part of Swarm is an overlay network with protocols powering the ",(0,n.jsx)(r.a,{href:"/docs/concepts/DISC/",children:"Distributed Immutable Store of Chunks (DISC)"}),". This layer is responsible for storing and retrieving data in a decentralised and secure manner."]}),"\n",(0,n.jsxs)(r.p,{children:["Swarm's overlay network is built on top of the underlay transport layer and uses ",(0,n.jsx)(r.a,{href:"/docs/concepts/DISC/kademlia",children:"Kademlia"})," overlay routing to enable efficient and scalable communication between nodes. Kademlia is a distributed hash table (DHT) algorithm that allows nodes to locate each other in the network based on their unique identifier or hash."]}),"\n",(0,n.jsx)(r.p,{children:"Swarm's DISC is an implementation of a Kademlia DHT optimized for storage. While the use of DHTs in distributed data storage protocols is common, for many implementations DHTs are used only for indexing file references. Swarm's DISC distinguishes itself from other implementations by instead breaking files into chunks and storing the chunks themselves directly within the DHT."}),"\n",(0,n.jsx)(r.p,{children:"Each chunk has a fixed size of 4kb and is distributed across the network using the DISC model. Each chunk has a unique address taken from the same namespace as the network node addresses that allows it to be located and retrieved by other nodes in the network."}),"\n",(0,n.jsx)(r.p,{children:"Swarm's distributed immutable storage provides several benefits, including data redundancy, tamper-proofing, and fault tolerance. Because data is stored across multiple nodes in the network, it can be retrieved even if some nodes fail or go offline."}),"\n",(0,n.jsxs)(r.p,{children:["Built on top of the overlay network is also an ",(0,n.jsx)(r.a,{href:"/docs/concepts/incentives/overview",children:"incentives layer"})," which guarantees that node operators which share their resources with the network are fairly rewarded for their services."]}),"\n",(0,n.jsx)(r.h3,{id:"3-data-access-layer",children:"3. Data Access Layer"}),"\n",(0,n.jsx)(r.p,{children:"The third part of Swarm is a component that provides high-level data access and defines APIs for base-layer features. This layer is responsible for providing an easy-to-use interface for developers to interact with Swarm's underlying storage and communication infrastructure."}),"\n",(0,n.jsxs)(r.p,{children:["Swarm's high-level data access component provides ",(0,n.jsx)(r.a,{href:"/api/",children:"APIs that allow developers to perform various operations"})," on the network, including ",(0,n.jsx)(r.a,{href:"/docs/develop/upload-and-download",children:"uploading and downloading data"})," and searching for content. These APIs are designed to be simple and intuitive, making it easy for developers to build decentralised applications on top of Swarm."]}),"\n",(0,n.jsx)(r.h3,{id:"4-application-layer",children:"4. Application Layer"}),"\n",(0,n.jsxs)(r.p,{children:["The fourth part of Swarm is an application layer that defines standards and outlines best practices for more elaborate use cases. This layer is responsible for providing guidance to developers on ",(0,n.jsx)(r.a,{href:"/docs/develop/introduction",children:"how to build complex applications"})," on top of Swarm's underlying infrastructure."]})]})}function p(e={}){const{wrapper:r}={...(0,s.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},28453(e,r,t){t.d(r,{R:()=>i,x:()=>o});var a=t(96540);const n={},s=a.createContext(n);function i(e){const r=a.useContext(s);return a.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:i(e.components),a.createElement(s.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8952.ed0b3ca6.js b/assets/js/8952.ed0b3ca6.js new file mode 100644 index 000000000..fb6cce5de --- /dev/null +++ b/assets/js/8952.ed0b3ca6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[8952],{88952(t,n,e){e.d(n,{diagram:()=>at});var i=e(76385),s=(e(31293),e(86827)),r=e(70451);function o(t,n){let e;if(void 0===n)for(const i of t)null!=i&&(e>i||void 0===e&&i>=i)&&(e=i);else{let i=-1;for(let s of t)null!=(s=n(s,++i,t))&&(e>s||void 0===e&&s>=s)&&(e=s)}return e}function l(t){return t.target.depth}function a(t,n){return t.sourceLinks.length?t.depth:n-1}function c(t,n){let e=0;if(void 0===n)for(let i of t)(i=+i)&&(e+=i);else{let i=-1;for(let s of t)(s=+n(s,++i,t))&&(e+=s)}return e}function h(t,n){let e;if(void 0===n)for(const i of t)null!=i&&(e=i)&&(e=i);else{let i=-1;for(let s of t)null!=(s=n(s,++i,t))&&(e=s)&&(e=s)}return e}function u(t){return function(){return t}}function f(t,n){return d(t.source,n.source)||t.index-n.index}function y(t,n){return d(t.target,n.target)||t.index-n.index}function d(t,n){return t.y0-n.y0}function g(t){return t.value}function p(t){return t.index}function _(t){return t.nodes}function k(t){return t.links}function x(t,n){const e=t.get(n);if(!e)throw new Error("missing: "+n);return e}function m({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const i of n.sourceLinks)i.y0=t+i.width/2,t+=i.width;for(const i of n.targetLinks)i.y1=e+i.width/2,e+=i.width}}function b(){let t,n,e,i=0,s=0,r=1,l=1,b=24,v=8,w=p,L=a,S=_,E=k,K=6;function A(){const a={nodes:S.apply(null,arguments),links:E.apply(null,arguments)};return function({nodes:t,links:n}){for(const[e,s]of t.entries())s.index=e,s.sourceLinks=[],s.targetLinks=[];const i=new Map(t.map((n,e)=>[w(n,e,t),n]));for(const[e,s]of n.entries()){s.index=e;let{source:t,target:n}=s;"object"!=typeof t&&(t=s.source=x(i,t)),"object"!=typeof n&&(n=s.target=x(i,n)),t.sourceLinks.push(s),n.targetLinks.push(s)}if(null!=e)for(const{sourceLinks:s,targetLinks:r}of t)s.sort(e),r.sort(e)}(a),function({nodes:t}){for(const n of t)n.value=void 0===n.fixedValue?Math.max(c(n.sourceLinks,g),c(n.targetLinks,g)):n.fixedValue}(a),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,s=0;for(;e.size;){for(const t of e){t.depth=s;for(const{target:n}of t.sourceLinks)i.add(n)}if(++s>n)throw new Error("circular link");e=i,i=new Set}}(a),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,s=0;for(;e.size;){for(const t of e){t.height=s;for(const{source:n}of t.targetLinks)i.add(n)}if(++s>n)throw new Error("circular link");e=i,i=new Set}}(a),function(e){const a=function({nodes:t}){const e=h(t,t=>t.depth)+1,s=(r-i-b)/(e-1),o=new Array(e);for(const n of t){const t=Math.max(0,Math.min(e-1,Math.floor(L.call(null,n,e))));n.layer=t,n.x0=i+t*s,n.x1=n.x0+b,o[t]?o[t].push(n):o[t]=[n]}if(n)for(const i of o)i.sort(n);return o}(e);t=Math.min(v,(l-s)/(h(a,t=>t.length)-1)),function(n){const e=o(n,n=>(l-s-(n.length-1)*t)/c(n,g));for(const i of n){let n=s;for(const s of i){s.y0=n,s.y1=n+s.value*e,n=s.y1+t;for(const t of s.sourceLinks)t.width=t.value*e}n=(l-n+t)/(i.length+1);for(let t=0;t0))continue;let s=(n/i-t.y0)*e;t.y0+=s,t.y1+=s,P(t)}void 0===n&&r.sort(d),T(r,i)}}function I(t,e,i){for(let s=t.length-2;s>=0;--s){const r=t[s];for(const t of r){let n=0,i=0;for(const{target:e,value:r}of t.sourceLinks){let s=r*(e.layer-t.layer);n+=O(t,e)*s,i+=s}if(!(i>0))continue;let s=(n/i-t.y0)*e;t.y0+=s,t.y1+=s,P(t)}void 0===n&&r.sort(d),T(r,i)}}function T(n,e){const i=n.length>>1,r=n[i];N(n,r.y0-t,i-1,e),C(n,r.y1+t,i+1,e),N(n,l,n.length-1,e),C(n,s,0,e)}function C(n,e,i,s){for(;i1e-6&&(r.y0+=o,r.y1+=o),e=r.y1+t}}function N(n,e,i,s){for(;i>=0;--i){const r=n[i],o=(r.y1-e)*s;o>1e-6&&(r.y0-=o,r.y1-=o),e=r.y0-t}}function P({sourceLinks:t,targetLinks:n}){if(void 0===e){for(const{source:{sourceLinks:t}}of n)t.sort(y);for(const{target:{targetLinks:n}}of t)n.sort(f)}}function $(t){if(void 0===e)for(const{sourceLinks:n,targetLinks:e}of t)n.sort(y),e.sort(f)}function D(n,e){let i=n.y0-(n.sourceLinks.length-1)*t/2;for(const{target:s,width:r}of n.sourceLinks){if(s===e)break;i+=r+t}for(const{source:t,width:s}of e.targetLinks){if(t===n)break;i-=s}return i}function O(n,e){let i=e.y0-(e.targetLinks.length-1)*t/2;for(const{source:s,width:r}of e.targetLinks){if(s===n)break;i+=r+t}for(const{target:t,width:s}of n.sourceLinks){if(t===e)break;i-=s}return i}return A.update=function(t){return m(t),t},A.nodeId=function(t){return arguments.length?(w="function"==typeof t?t:u(t),A):w},A.nodeAlign=function(t){return arguments.length?(L="function"==typeof t?t:u(t),A):L},A.nodeSort=function(t){return arguments.length?(n=t,A):n},A.nodeWidth=function(t){return arguments.length?(b=+t,A):b},A.nodePadding=function(n){return arguments.length?(v=t=+n,A):v},A.nodes=function(t){return arguments.length?(S="function"==typeof t?t:u(t),A):S},A.links=function(t){return arguments.length?(E="function"==typeof t?t:u(t),A):E},A.linkSort=function(t){return arguments.length?(e=t,A):e},A.size=function(t){return arguments.length?(i=s=0,r=+t[0],l=+t[1],A):[r-i,l-s]},A.extent=function(t){return arguments.length?(i=+t[0][0],r=+t[1][0],s=+t[0][1],l=+t[1][1],A):[[i,s],[r,l]]},A.iterations=function(t){return arguments.length?(K=+t,A):K},A}var v=Math.PI,w=2*v,L=1e-6,S=w-L;function E(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function K(){return new E}E.prototype=K.prototype={constructor:E,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,i){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+i)},bezierCurveTo:function(t,n,e,i,s,r){this._+="C"+ +t+","+ +n+","+ +e+","+ +i+","+(this._x1=+s)+","+(this._y1=+r)},arcTo:function(t,n,e,i,s){t=+t,n=+n,e=+e,i=+i,s=+s;var r=this._x1,o=this._y1,l=e-t,a=i-n,c=r-t,h=o-n,u=c*c+h*h;if(s<0)throw new Error("negative radius: "+s);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(u>L)if(Math.abs(h*l-a*c)>L&&s){var f=e-r,y=i-o,d=l*l+a*a,g=f*f+y*y,p=Math.sqrt(d),_=Math.sqrt(u),k=s*Math.tan((v-Math.acos((d+u-g)/(2*p*_)))/2),x=k/_,m=k/p;Math.abs(x-1)>L&&(this._+="L"+(t+x*c)+","+(n+x*h)),this._+="A"+s+","+s+",0,0,"+ +(h*f>c*y)+","+(this._x1=t+m*l)+","+(this._y1=n+m*a)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,i,s,r){t=+t,n=+n,r=!!r;var o=(e=+e)*Math.cos(i),l=e*Math.sin(i),a=t+o,c=n+l,h=1^r,u=r?i-s:s-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+a+","+c:(Math.abs(this._x1-a)>L||Math.abs(this._y1-c)>L)&&(this._+="L"+a+","+c),e&&(u<0&&(u=u%w+w),u>S?this._+="A"+e+","+e+",0,1,"+h+","+(t-o)+","+(n-l)+"A"+e+","+e+",0,1,"+h+","+(this._x1=a)+","+(this._y1=c):u>L&&(this._+="A"+e+","+e+",0,"+ +(u>=v)+","+h+","+(this._x1=t+e*Math.cos(s))+","+(this._y1=n+e*Math.sin(s))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};const A=K;var M=Array.prototype.slice;function I(t){return function(){return t}}function T(t){return t[0]}function C(t){return t[1]}function N(t){return t.source}function P(t){return t.target}function $(t){var n=N,e=P,i=T,s=C,r=null;function o(){var o,l=M.call(arguments),a=n.apply(this,l),c=e.apply(this,l);if(r||(r=o=A()),t(r,+i.apply(this,(l[0]=a,l)),+s.apply(this,l),+i.apply(this,(l[0]=c,l)),+s.apply(this,l)),o)return r=null,o+""||null}return o.source=function(t){return arguments.length?(n=t,o):n},o.target=function(t){return arguments.length?(e=t,o):e},o.x=function(t){return arguments.length?(i="function"==typeof t?t:I(+t),o):i},o.y=function(t){return arguments.length?(s="function"==typeof t?t:I(+t),o):s},o.context=function(t){return arguments.length?(r=null==t?null:t,o):r},o}function D(t,n,e,i,s){t.moveTo(n,e),t.bezierCurveTo(n=(n+i)/2,e,n,s,i,s)}function O(t){return[t.source.x1,t.y0]}function j(t){return[t.target.x0,t.y1]}function z(){return $(D).source(O).target(j)}var F=function(){var t=(0,s.K)(function(t,n,e,i){for(e=e||{},i=t.length;i--;e[t[i]]=n);return e},"o"),n=[1,9],e=[1,10],i=[1,5,10,12],r={trace:(0,s.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:(0,s.K)(function(t,n,e,i,s,r,o){var l=r.length-1;switch(s){case 7:const t=i.findOrCreateNode(r[l-4].trim().replaceAll('""','"')),n=i.findOrCreateNode(r[l-2].trim().replaceAll('""','"')),e=parseFloat(r[l].trim());i.addLink(t,n,e);break;case 8:case 9:case 11:this.$=r[l];break;case 10:this.$=r[l-1]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:e},{1:[2,6],7:11,10:[1,12]},t(e,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(i,[2,8]),t(i,[2,9]),{19:[1,16]},t(i,[2,11]),{1:[2,1]},{1:[2,5]},t(e,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:e},{15:18,16:7,17:8,18:n,20:e},{18:[1,19]},t(e,[2,3]),{12:[1,20]},t(i,[2,10]),{15:21,16:7,17:8,18:n,20:e},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:(0,s.K)(function(t,n){if(!n.recoverable){var e=new Error(t);throw e.hash=n,e}this.trace(t)},"parseError"),parse:(0,s.K)(function(t){var n=this,e=[0],i=[],r=[null],o=[],l=this.table,a="",c=0,h=0,u=0,f=o.slice.call(arguments,1),y=Object.create(this.lexer),d={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(d.yy[g]=this.yy[g]);y.setInput(t,d.yy),d.yy.lexer=y,d.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var p=y.yylloc;o.push(p);var _=y.options&&y.options.ranges;function k(){var t;return"number"!=typeof(t=i.pop()||y.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K)(function(t){e.length=e.length-2*t,r.length=r.length-t,o.length=o.length-t},"popStack"),(0,s.K)(k,"lex");for(var x,m,b,v,w,L,S,E,K,A={};;){if(b=e[e.length-1],this.defaultActions[b]?v=this.defaultActions[b]:(null==x&&(x=k()),v=l[b]&&l[b][x]),void 0===v||!v.length||!v[0]){var M="";for(L in K=[],l[b])this.terminals_[L]&&L>2&&K.push("'"+this.terminals_[L]+"'");M=y.showPosition?"Parse error on line "+(c+1)+":\n"+y.showPosition()+"\nExpecting "+K.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(M,{text:y.match,token:this.terminals_[x]||x,line:y.yylineno,loc:p,expected:K})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+x);switch(v[0]){case 1:e.push(x),r.push(y.yytext),o.push(y.yylloc),e.push(v[1]),x=null,m?(x=m,m=null):(h=y.yyleng,a=y.yytext,c=y.yylineno,p=y.yylloc,u>0&&u--);break;case 2:if(S=this.productions_[v[1]][1],A.$=r[r.length-S],A._$={first_line:o[o.length-(S||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(S||1)].first_column,last_column:o[o.length-1].last_column},_&&(A._$.range=[o[o.length-(S||1)].range[0],o[o.length-1].range[1]]),void 0!==(w=this.performAction.apply(A,[a,h,c,d.yy,v[1],r,o].concat(f))))return w;S&&(e=e.slice(0,-1*S*2),r=r.slice(0,-1*S),o=o.slice(0,-1*S)),e.push(this.productions_[v[1]][0]),r.push(A.$),o.push(A._$),E=l[e[e.length-2]][e[e.length-1]],e.push(E);break;case 3:return!0}}return!0},"parse")},o=function(){return{EOF:1,parseError:(0,s.K)(function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)},"parseError"),setInput:(0,s.K)(function(t,n){return this.yy=n||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,s.K)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,s.K)(function(t){var n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===i.length?this.yylloc.first_column:0)+i[i.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:(0,s.K)(function(){return this._more=!0,this},"more"),reject:(0,s.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,s.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,s.K)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,s.K)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,s.K)(function(){var t=this.pastInput(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"},"showPosition"),test_match:(0,s.K)(function(t,n){var e,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},"test_match"),next:(0,s.K)(function(){if(this.done)return this.EOF;var t,n,e,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;rn[0].length)){if(n=e,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,s[r])))return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?!1!==(t=this.test_match(n,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,s.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,s.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,s.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,s.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,s.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,s.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,s.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,s.K)(function(t,n,e,i){switch(e){case 0:case 1:return this.pushState("csv"),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;case 6:return 20;case 7:return this.popState("escaped_text"),18;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}}}();function l(){this.yy={}}return r.lexer=o,(0,s.K)(l,"Parser"),l.prototype=r,r.Parser=l,new l}();F.parser=F;var U=F,W=[],G=[],V=new Map,X=(0,s.K)(()=>{W=[],G=[],V=new Map,(0,i.IU)()},"clear"),Y=class{constructor(t,n,e=0){this.source=t,this.target=n,this.value=e}static{(0,s.K)(this,"SankeyLink")}},q=(0,s.K)((t,n,e)=>{W.push(new Y(t,n,e))},"addLink"),B=class{constructor(t){this.ID=t}static{(0,s.K)(this,"SankeyNode")}},Q=(0,s.K)(t=>{t=i.Y2.sanitizeText(t,(0,i.D7)());let n=V.get(t);return void 0===n&&(n=new B(t),V.set(t,n),G.push(n)),n},"findOrCreateNode"),R=(0,s.K)(()=>G,"getNodes"),Z=(0,s.K)(()=>W,"getLinks"),H=(0,s.K)(()=>({nodes:G.map(t=>({id:t.ID})),links:W.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),J={nodesMap:V,getConfig:(0,s.K)(()=>(0,i.D7)().sankey,"getConfig"),getNodes:R,getLinks:Z,getGraph:H,addLink:q,findOrCreateNode:Q,getAccTitle:i.iN,setAccTitle:i.SV,getAccDescription:i.m7,setAccDescription:i.EI,getDiagramTitle:i.ab,setDiagramTitle:i.ke,clear:X},tt=class t{static{(0,s.K)(this,"Uid")}static{this.count=0}static next(n){return new t(n+ ++t.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}},nt={left:function(t){return t.depth},right:function(t,n){return n-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?o(t.sourceLinks,l)-1:0},justify:a},et=(0,s.K)(t=>{let n=0,e=0;for(const i of t){const t=i.value??0;t>n&&(n=t,e=i.layer??0)}return e},"findCentralNodeLayer"),it=(0,s.K)(function(t,n,e,o){const{securityLevel:l,sankey:a}=(0,i.D7)(),c=i.ME.sankey;let h;"sandbox"===l&&(h=(0,r.Ltv)("#i"+n));const u="sandbox"===l?(0,r.Ltv)(h.nodes()[0].contentDocument.body):(0,r.Ltv)("body"),f="sandbox"===l?u.select(`[id="${n}"]`):(0,r.Ltv)(`[id="${n}"]`),y=a?.width??c.width,d=a?.height??c.width,g=a?.useMaxWidth??c.useMaxWidth,p=a?.nodeAlignment??c.nodeAlignment,_=a?.prefix??c.prefix,k=a?.suffix??c.suffix,x=a?.showValues??c.showValues,m=a?.nodeWidth??c.nodeWidth??10,v=a?.nodePadding??c.nodePadding??12,w=a?.labelStyle??c.labelStyle??"legacy",L=a?.nodeColors??{},S=o.db.getGraph(),E=nt[p];b().nodeId(t=>t.id).nodeWidth(m).nodePadding(v+(x?15:0)).nodeAlign(E).extent([[0,0],[y,d]])(S);const K=et(S.nodes),A=(0,r.UMr)(r.zt),M=(0,s.K)(t=>L[t]??A(t),"getNodeColor");f.append("g").attr("class","nodes").selectAll(".node").data(S.nodes).join("g").attr("class","node").attr("id",t=>(t.uid=tt.next("node-")).id).attr("transform",function(t){return"translate("+t.x0+","+t.y0+")"}).attr("x",t=>t.x0).attr("y",t=>t.y0).append("rect").attr("height",t=>t.y1-t.y0).attr("width",t=>t.x1-t.x0).attr("fill",t=>M(t.id));const I=(0,s.K)(({id:t,value:n})=>x?`${t}\n${_}${Math.round(100*n)/100}${k}`:t,"getText"),T=(0,s.K)(t=>{if("outlined"===w){return(t.layer??0)C.selectAll(t?`.${t}`:"text").data(S.nodes).join("text").attr("class",t??null).attr("x",t=>T(t).x).attr("y",t=>(t.y1+t.y0)/2).attr("dy",(x?"0":"0.35")+"em").attr("text-anchor",t=>T(t).anchor).text(I),"appendLabel");"outlined"===w?(N("sankey-label-bg"),N("sankey-label-fg")):N();const P=f.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(S.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),$=a?.linkColor??"gradient";if("gradient"===$){const t=P.append("linearGradient").attr("id",t=>(t.uid=tt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",t=>t.source.x1).attr("x2",t=>t.target.x0);t.append("stop").attr("offset","0%").attr("stop-color",t=>M(t.source.id)),t.append("stop").attr("offset","100%").attr("stop-color",t=>M(t.target.id))}let D;switch($){case"gradient":D=(0,s.K)(t=>t.uid,"coloring");break;case"source":D=(0,s.K)(t=>M(t.source.id),"coloring");break;case"target":D=(0,s.K)(t=>M(t.target.id),"coloring");break;default:D=$}P.append("path").attr("d",z()).attr("stroke",D).attr("stroke-width",t=>Math.max(1,t.width)),(0,i.ot)(void 0,f,0,g)},"draw"),st={draw:it},rt=(0,s.K)(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,"\n").trim(),"prepareTextForParsing"),ot=(0,s.K)(t=>`.label {\n font-family: ${t.fontFamily};\n }\n\n .node-labels {\n font-family: ${t.fontFamily};\n }\n\n /* Outlined label style - background stroke for better readability */\n .sankey-label-bg {\n stroke: ${t.mainBkg||t.background||"#fff"};\n stroke-width: 4px;\n stroke-linejoin: round;\n paint-order: stroke;\n }\n\n /* Foreground label text */\n .sankey-label-fg {\n fill: ${t.textColor};\n }\n\n /* Node styling */\n .node rect {\n shape-rendering: crispEdges;\n }\n\n /* Link styling */\n .link {\n fill: none;\n stroke-opacity: 0.5;\n mix-blend-mode: multiply;\n }\n`,"getStyles"),lt=U.parse.bind(U);U.parse=t=>lt(rt(t));var at={styles:ot,parser:U,db:J,renderer:st}}}]); \ No newline at end of file diff --git a/assets/js/89aa0649.62be07d8.js b/assets/js/89aa0649.62be07d8.js new file mode 100644 index 000000000..eceb3e273 --- /dev/null +++ b/assets/js/89aa0649.62be07d8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[4595],{93984(e,n,i){i.r(n),i.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>p,frontMatter:()=>r,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"concepts/pss","title":"PSS","description":"Explains Postal Service over Swarm messaging protocol enabling secure private and efficient communication between network nodes.","source":"@site/docs/concepts/pss.md","sourceDirName":"concepts","slug":"/concepts/pss","permalink":"/docs/concepts/pss","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/concepts/pss.md","tags":[],"version":"current","frontMatter":{"title":"PSS","id":"pss","description":"Explains Postal Service over Swarm messaging protocol enabling secure private and efficient communication between network nodes."},"sidebar":"concepts","previous":{"title":"Price Oracle","permalink":"/docs/concepts/incentives/price-oracle"},"next":{"title":"Access Control","permalink":"/docs/concepts/access-control"}}');var t=i(74848),o=i(28453);const r={title:"PSS",id:"pss",description:"Explains Postal Service over Swarm messaging protocol enabling secure private and efficient communication between network nodes."},c=void 0,a={},l=[{value:"Security",id:"security",level:2},{value:"Privacy",id:"privacy",level:2},{value:"Efficiency",id:"efficiency",level:2},{value:"Mailboxing",id:"mailboxing",level:2}];function d(e){const n={admonition:"admonition",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"PSS, or Postal Service over Swarm, is a messaging protocol that enables users to send and receive messages over Swarm. It is an essential component of Swarm's infrastructure, providing secure, private, and efficient communication between nodes."}),"\n",(0,t.jsx)(n.admonition,{title:"Key facts",type:"info",children:(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"What it is"}),": PSS (Postal Service over Swarm) is Swarm's node-to-node messaging protocol."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"How delivery works"}),": a message is encrypted to the recipient and wrapped in a content-addressed chunk whose address falls in the recipient's neighborhood, so the push-sync protocol delivers it; only the recipient can decrypt it."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Anonymous inbound"}),": senders can be previously unknown identities."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Offline recipients"}),": mailboxing lets a message wait for a recipient who is not online."]}),"\n"]})}),"\n",(0,t.jsx)(n.h2,{id:"security",children:"Security"}),"\n",(0,t.jsx)(n.p,{children:"PSS is designed to be secure by encrypting messages for the intended recipient and wrapping them with a topic in a content-addressed chunk. The chunk is crafted in such a way that its content address falls into the recipient's neighborhood, ensuring that delivery is naturally taken care of by the push-sync protocol. This ensures that messages are delivered only to the intended recipient's neighborhood and cannot be intercepted or read by unauthorized parties. While the chunk will be delivered to all members of the recipient's neighborhood, only the recipient will be able to decrypt the message using their private key."}),"\n",(0,t.jsx)(n.h2,{id:"privacy",children:"Privacy"}),"\n",(0,t.jsx)(n.p,{children:"PSS also provides privacy by allowing users to receive messages from previously unknown identities. This makes it an ideal communication primitive for sending anonymous messages to public identities such as registrations or initial contact to start a thread by setting up secure communication."}),"\n",(0,t.jsx)(n.h2,{id:"efficiency",children:"Efficiency"}),"\n",(0,t.jsx)(n.p,{children:"Efficiency is another key feature of PSS. It uses direct node-to-node messaging in Swarm, which means that messages are delivered directly from one node to another without the need for intermediaries. This reduces latency and ensures that messages are delivered quickly and reliably."}),"\n",(0,t.jsx)(n.h2,{id:"mailboxing",children:"Mailboxing"}),"\n",(0,t.jsx)(n.p,{children:"PSS also supports mailboxing, which allows users to deposit messages for download if the recipient is not online. This ensures that messages are not lost if the recipient is offline when they are sent."})]})}function p(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},28453(e,n,i){i.d(n,{R:()=>r,x:()=>c});var s=i(96540);const t={},o=s.createContext(t);function r(e){const n=s.useContext(o);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8c5f7849.77b8b451.js b/assets/js/8c5f7849.77b8b451.js new file mode 100644 index 000000000..b68585117 --- /dev/null +++ b/assets/js/8c5f7849.77b8b451.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[3829],{57777(e,n,i){i.r(n),i.d(n,{assets:()=>c,contentTitle:()=>d,default:()=>p,frontMatter:()=>l,metadata:()=>a,toc:()=>h});const a=JSON.parse('{"id":"bee/working-with-bee/configuration","title":"Configuration","description":"Documents all Bee configuration options available through YAML files environment variables and command-line flags.","source":"@site/docs/bee/working-with-bee/configuration.md","sourceDirName":"bee/working-with-bee","slug":"/bee/working-with-bee/configuration","permalink":"/docs/bee/working-with-bee/configuration","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/bee/working-with-bee/configuration.md","tags":[],"version":"current","frontMatter":{"title":"Configuration","id":"configuration","description":"Documents all Bee configuration options available through YAML files environment variables and command-line flags."},"sidebar":"bee","previous":{"title":"Introduction","permalink":"/docs/bee/working-with-bee/introduction"},"next":{"title":"Node Types","permalink":"/docs/bee/working-with-bee/node-types"}}');var t=i(74848),o=i(28453),r=i(4865),s=i(19365);const l={title:"Configuration",id:"configuration",description:"Documents all Bee configuration options available through YAML files environment variables and command-line flags."},d=void 0,c={},h=[{value:"Configuration Methods and Priority",id:"configuration-methods-and-priority",level:2},{value:"Command Line Arguments",id:"command-line-arguments",level:3},{value:"Environment variables",id:"environment-variables",level:3},{value:"YAML configuration file",id:"yaml-configuration-file",level:3},{value:"Manually generating YAML config file for bee start",id:"manually-generating-yaml-config-file-for-bee-start",level:2},{value:"Node Types",id:"node-types",level:2},{value:"How to Set Node Type",id:"how-to-set-node-type",level:3},{value:"Configuration Examples",id:"configuration-examples",level:2},{value:"Full Node Configuration",id:"full-node-configuration",level:3},{value:"Using Command-Line Arguments",id:"using-command-line-arguments",level:4},{value:"Using Environment Variables",id:"using-environment-variables",level:4},{value:"Using YAML Configuration",id:"using-yaml-configuration",level:4},{value:"Light Node Configuration",id:"light-node-configuration",level:3},{value:"Using Command-Line Arguments",id:"using-command-line-arguments-1",level:4},{value:"Using Environment Variables",id:"using-environment-variables-1",level:4},{value:"Using YAML Configuration",id:"using-yaml-configuration-1",level:4},{value:"Ultra-Light Node Configuration",id:"ultra-light-node-configuration",level:3},{value:"Using Command-Line Arguments",id:"using-command-line-arguments-2",level:4},{value:"Using Environment Variables",id:"using-environment-variables-2",level:4},{value:"Using YAML Configuration",id:"using-yaml-configuration-2",level:4},{value:"Default Data and Config Directories",id:"default-data-and-config-directories",level:2},{value:"Bee Service Default Directories (Package Manager Install)",id:"bee-service-default-directories-package-manager-install",level:3},{value:"Shell Script Install Default Directories",id:"shell-script-install-default-directories",level:3},{value:"Create Password",id:"create-password",level:2},{value:"Setting Blockchain RPC endpoint",id:"setting-blockchain-rpc-endpoint",level:2},{value:"RPC Providers",id:"rpc-providers",level:3},{value:"Block number sync interval",id:"block-number-sync-interval",level:3},{value:"SIMD hashing (Optional)",id:"simd-hashing-optional",level:2},{value:"Configuring Swap Initial Deposit (Optional)",id:"configuring-swap-initial-deposit-optional",level:2},{value:"Chequebook Verification (Optional)",id:"chequebook-verification-optional",level:2},{value:"NAT address",id:"nat-address",level:2},{value:"ENS Resolution (Optional)",id:"ens-resolution-optional",level:2},{value:"Sepolia Testnet Configuration",id:"sepolia-testnet-configuration",level:2},{value:"Funding Testnet Node",id:"funding-testnet-node",level:3}];function u(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"configuration-methods-and-priority",children:"Configuration Methods and Priority"}),"\n",(0,t.jsx)(n.p,{children:"There are three configuration methods, each with a different priority level. Configuration is processed in the following ascending order of preference:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:"Command Line Flags"}),"\n",(0,t.jsx)(n.li,{children:"Environment Variables"}),"\n",(0,t.jsx)(n.li,{children:"YAML Configuration File"}),"\n"]}),"\n",(0,t.jsxs)(n.admonition,{type:"info",children:[(0,t.jsxs)(n.p,{children:["All three methods may be used when running Bee using ",(0,t.jsx)(n.code,{children:"bee start"}),"."]}),(0,t.jsxs)(n.p,{children:["However when Bee is started as a service with tools like ",(0,t.jsx)(n.code,{children:"systemctl"})," or ",(0,t.jsx)(n.code,{children:"brew services"}),", only the YAML configuration file is supported by default."]})]}),"\n",(0,t.jsx)(n.h3,{id:"command-line-arguments",children:"Command Line Arguments"}),"\n",(0,t.jsxs)(n.p,{children:["Run ",(0,t.jsx)(n.code,{children:"bee help printconfig"})," in your terminal to list the available command-line arguments and config option flags:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'Ethereum Swarm Bee\n\nUsage:\n bee [command]\n\nAvailable Commands:\n start Start a Swarm node\n init Initialise a Swarm node\n deploy Deploy and fund the chequebook contract\n version Print version number\n db Perform basic DB related operations\n split Split a file into chunks\n printconfig Print default or provided configuration in yaml format\n help Help about any command\n completion Generate the autocompletion script for the specified shell\n\nFlags:\n --config string config file (default is $HOME/.bee.yaml)\n -h, --help help for bee\n\nUse "bee [command] --help" for more information about a command.\nroot@noah-bee:~# docker exec -it bee-1 bee help printconfig\nPrint default or provided configuration in yaml format\n\nUsage:\n bee printconfig [flags]\n\nFlags:\n --allow-private-cidrs allow to advertise private CIDRs to the public network\n --api-addr string HTTP API listen address (default "127.0.0.1:1633")\n --autotls-ca-endpoint string autotls certificate authority endpoint (default "https://acme-v02.api.letsencrypt.org/directory")\n --autotls-domain string autotls domain (default "libp2p.direct")\n --autotls-registration-endpoint string autotls registration endpoint (default "https://registration.libp2p.direct")\n --block-sync-interval uint block number cache sync interval in blocks (default 10)\n --block-time uint chain block time (default 5)\n --blockchain-rpc-dial-timeout duration blockchain rpc TCP dial timeout (default 30s)\n --blockchain-rpc-endpoint string rpc blockchain endpoint\n --blockchain-rpc-idle-timeout duration blockchain rpc idle connection timeout (default 1m30s)\n --blockchain-rpc-keepalive duration blockchain rpc TCP keepalive interval (default 30s)\n --blockchain-rpc-tls-timeout duration blockchain rpc TLS handshake timeout (default 10s)\n --bootnode strings initial nodes to connect to (default [/dnsaddr/mainnet.ethswarm.org])\n --bootnode-mode cause the node to always accept incoming connections\n --bzz-token-address string bzz token contract address\n --cache-capacity uint cache capacity in chunks, multiply by 4096 to get approximate capacity in bytes (default 1000000)\n --cache-retrieval enable forwarded content caching (default true)\n --chequebook-enable enable chequebook (default true)\n --chequebook-min-balance string minimum chequebook token balance required for verification, in token small units (default 11 BZZ) (default "110000000000000000")\n --chequebook-verification reject full-node hive/handshake records that carry no chequebook address\n --cors-allowed-origins strings origins with CORS headers enabled\n --data-dir string data directory (default "/home/bee/.bee")\n --db-block-cache-capacity uint size of block cache of the database in bytes (default 33554432)\n --db-disable-seeks-compaction disables db compactions triggered by seeks (default true)\n --db-open-files-limit uint number of open files allowed by database (default 200)\n --db-write-buffer-size uint size of the database write buffer in bytes (default 33554432)\n --full-node cause the node to start in full mode\n --gas-limit-fallback uint gas limit fallback when estimation fails for contract transactions (default 500000)\n -h, --help help for printconfig\n --mainnet triggers connect to main net bootnodes. (default true)\n --minimum-gas-tip-cap uint minimum gas tip cap in wei for transactions, 0 means use suggested gas tip cap\n --minimum-storage-radius uint minimum radius storage threshold\n --nat-addr string NAT exposed address\n --nat-wss-addr string WSS NAT exposed address\n --neighborhood-suggester string suggester for target neighborhood (default "https://api.swarmscan.io/v1/network/neighborhoods/suggestion")\n --network-id uint ID of the Swarm network (default 1)\n --p2p-addr string P2P listen address (default ":1634")\n --p2p-ws-enable enable P2P WebSocket transport\n --p2p-wss-addr string p2p wss address (default ":1635")\n --p2p-wss-enable Enable Secure WebSocket P2P connections\n --password string password for decrypting keys\n --password-file string path to a file that contains password for decrypting keys\n --payment-early-percent int percentage below the peers payment threshold when we initiate settlement (default 50)\n --payment-threshold string threshold in BZZ where you expect to get paid from your peers (default "13500000")\n --payment-tolerance-percent int excess debt above payment threshold in percentages where you disconnect from your peer (default 25)\n --postage-stamp-address string postage stamp contract address\n --postage-stamp-start-block uint postage stamp contract start block number\n --pprof-mutex enable pprof mutex profile\n --pprof-profile enable pprof block profile\n --price-oracle-address string price oracle contract address\n --redistribution-address string redistribution contract address\n --reserve-capacity-doubling int reserve capacity doubling\n --resolver-options strings ENS compatible API endpoint for a TLD and with contract address, can be repeated, format [tld:][contract-addr@]url\n --resync forces the node to resync postage contract data\n --skip-postage-snapshot skip postage snapshot\n --staking-address string staking contract address\n --statestore-cache-capacity uint lru memory caching capacity in number of statestore entries (default 100000)\n --static-nodes strings protect nodes from getting kicked out on bootnode\n --storage-incentives-enable enable storage incentives feature (default true)\n --swap-enable enable swap\n --swap-factory-address string swap factory addresses\n --swap-initial-deposit string initial deposit if deploying a new chequebook (default "0")\n --target-neighborhood string neighborhood to target in binary format (ex: 111111001) for mining the initial overlay\n --tracing-enable enable tracing\n --tracing-endpoint string endpoint to send tracing data (default "127.0.0.1:6831")\n --tracing-host string host to send tracing data\n --tracing-port string port to send tracing data\n --tracing-service-name string service name identifier for tracing (default "bee")\n --transaction-debug-mode skips the gas estimate step for contract transactions\n --use-simd-hashing use SIMD BMT hasher (available only on linux amd64 platforms)\n --verbosity string log verbosity level 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=trace (default "info")\n --warmup-time duration maximum node warmup duration; proceeds when stable or after this time (default 5m0s)\n --welcome-message string send a welcome message string during handshakes\n --withdrawal-addresses-whitelist strings withdrawal target addresses\n\nGlobal Flags:\n --config string config file (default is $HOME/.bee.yaml)\n'})}),"\n",(0,t.jsx)(n.h3,{id:"environment-variables",children:"Environment variables"}),"\n",(0,t.jsx)(n.p,{children:"Bee configuration can also be set using environment variables."}),"\n",(0,t.jsx)(n.p,{children:"Environment variables are set as variables in your operating system's\nsession or systemd configuration file. To set an environment variable,\ntype the following in your terminal session."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"export VARIABLE_NAME=variableValue\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Verify that it is correctly set by running ",(0,t.jsx)(n.code,{children:"echo $VARIABLE_NAME"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["All available configuration options are available as ",(0,t.jsx)(n.code,{children:"BEE"})," prefixed,\ncapitalised, and underscored environment variables, e.g. ",(0,t.jsx)(n.code,{children:"--api-addr"})," becomes ",(0,t.jsx)(n.code,{children:"BEE_API_ADDR"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"yaml-configuration-file",children:"YAML configuration file"}),"\n",(0,t.jsxs)(n.p,{children:["You can view the default contents of the ",(0,t.jsx)(n.code,{children:"bee.yaml"})," configuration file using the ",(0,t.jsx)(n.code,{children:"bee printconfig"})," command:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"bee printconfig\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'# allow to advertise private CIDRs to the public network\nallow-private-cidrs: false\n# HTTP API listen address\napi-addr: 127.0.0.1:1633\n# autotls certificate authority endpoint\nautotls-ca-endpoint: https://acme-v02.api.letsencrypt.org/directory\n# autotls domain\nautotls-domain: libp2p.direct\n# autotls registration endpoint\nautotls-registration-endpoint: https://registration.libp2p.direct\n# block number cache sync interval in blocks\nblock-sync-interval: "10"\n# chain block time\nblock-time: "5"\n# blockchain rpc TCP dial timeout\nblockchain-rpc-dial-timeout: 30s\n# rpc blockchain endpoint\nblockchain-rpc-endpoint: ""\n# blockchain rpc idle connection timeout\nblockchain-rpc-idle-timeout: 1m30s\n# blockchain rpc TCP keepalive interval\nblockchain-rpc-keepalive: 30s\n# blockchain rpc TLS handshake timeout\nblockchain-rpc-tls-timeout: 10s\n# initial nodes to connect to\nbootnode:\n- /dnsaddr/mainnet.ethswarm.org\n# cause the node to always accept incoming connections\nbootnode-mode: false\n# bzz token contract address\nbzz-token-address: ""\n# cache capacity in chunks, multiply by 4096 to get approximate capacity in bytes\ncache-capacity: "1000000"\n# enable forwarded content caching\ncache-retrieval: true\n# enable chequebook\nchequebook-enable: true\n# minimum chequebook token balance required for verification, in token small units (default 11 BZZ)\nchequebook-min-balance: "110000000000000000"\n# reject full-node hive/handshake records that carry no chequebook address\nchequebook-verification: false\n# config file (default is $HOME/.bee.yaml)\nconfig: /home/bee/.bee.yaml\n# origins with CORS headers enabled\ncors-allowed-origins: []\n# data directory\ndata-dir: /home/bee/.bee\n# size of block cache of the database in bytes\ndb-block-cache-capacity: "33554432"\n# disables db compactions triggered by seeks\ndb-disable-seeks-compaction: true\n# number of open files allowed by database\ndb-open-files-limit: "200"\n# size of the database write buffer in bytes\ndb-write-buffer-size: "33554432"\n# cause the node to start in full mode\nfull-node: false\n# gas limit fallback when estimation fails for contract transactions\ngas-limit-fallback: "500000"\n# help for printconfig\nhelp: false\n# triggers connect to main net bootnodes.\nmainnet: true\n# minimum gas tip cap in wei for transactions, 0 means use suggested gas tip cap\nminimum-gas-tip-cap: "0"\n# minimum radius storage threshold\nminimum-storage-radius: "0"\n# NAT exposed address\nnat-addr: ""\n# WSS NAT exposed address\nnat-wss-addr: ""\n# suggester for target neighborhood\nneighborhood-suggester: https://api.swarmscan.io/v1/network/neighborhoods/suggestion\n# ID of the Swarm network\nnetwork-id: "1"\n# P2P listen address\np2p-addr: :1634\n# enable P2P WebSocket transport\np2p-ws-enable: false\n# p2p wss address\np2p-wss-addr: :1635\n# Enable Secure WebSocket P2P connections\np2p-wss-enable: false\n# password for decrypting keys\npassword: ""\n# path to a file that contains password for decrypting keys\npassword-file: ""\n# percentage below the peers payment threshold when we initiate settlement\npayment-early-percent: 50\n# threshold in BZZ where you expect to get paid from your peers\npayment-threshold: "13500000"\n# excess debt above payment threshold in percentages where you disconnect from your peer\npayment-tolerance-percent: 25\n# postage stamp contract address\npostage-stamp-address: ""\n# postage stamp contract start block number\npostage-stamp-start-block: "0"\n# enable pprof mutex profile\npprof-mutex: false\n# enable pprof block profile\npprof-profile: false\n# price oracle contract address\nprice-oracle-address: ""\n# redistribution contract address\nredistribution-address: ""\n# reserve capacity doubling\nreserve-capacity-doubling: 0\n# ENS compatible API endpoint for a TLD and with contract address, can be repeated, format [tld:][contract-addr@]url\nresolver-options: []\n# forces the node to resync postage contract data\nresync: false\n# skip postage snapshot\nskip-postage-snapshot: false\n# staking contract address\nstaking-address: ""\n# lru memory caching capacity in number of statestore entries\nstatestore-cache-capacity: "100000"\n# protect nodes from getting kicked out on bootnode\nstatic-nodes: []\n# enable storage incentives feature\nstorage-incentives-enable: true\n# enable swap\nswap-enable: false\n# swap factory addresses\nswap-factory-address: ""\n# initial deposit if deploying a new chequebook\nswap-initial-deposit: "0"\n# neighborhood to target in binary format (ex: 111111001) for mining the initial overlay\ntarget-neighborhood: ""\n# enable tracing\ntracing-enable: false\n# endpoint to send tracing data\ntracing-endpoint: 127.0.0.1:6831\n# host to send tracing data\ntracing-host: ""\n# port to send tracing data\ntracing-port: ""\n# service name identifier for tracing\ntracing-service-name: bee\n# skips the gas estimate step for contract transactions\ntransaction-debug-mode: false\n# use SIMD BMT hasher (available only on linux amd64 platforms)\nuse-simd-hashing: false\n# log verbosity level 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=trace\nverbosity: info\n# maximum node warmup duration; proceeds when stable or after this time\nwarmup-time: 5m0s\n# send a welcome message string during handshakes\nwelcome-message: ""\n# withdrawal target addresses\nwithdrawal-addresses-whitelist: []\n'})}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["Note that depending on whether Bee is started directly with the ",(0,t.jsx)(n.code,{children:"bee start"})," command or started as a service with ",(0,t.jsx)(n.code,{children:"systemctl"})," / ",(0,t.jsx)(n.code,{children:"brew services"}),", the default directory for the YAML configuration file (shown in the ",(0,t.jsx)(n.code,{children:"config"})," option above) ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/configuration",children:"will be different"}),"."]})}),"\n",(0,t.jsx)(n.p,{children:"To change your node's configuration, simply edit the YAML file and restart Bee:"}),"\n",(0,t.jsxs)(r.A,{defaultValue:"linux",values:[{label:"Linux",value:"linux"},{label:"MacOS arm64 (Apple Silicon)",value:"macos-arm64"},{label:"MacOS amd64 (Intel)",value:"macos-amd64"}],children:[(0,t.jsxs)(s.A,{value:"linux",children:[(0,t.jsx)(n.p,{children:"Open the config file for editing:"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo vi /etc/bee/bee.yaml\n"})}),(0,t.jsx)(n.p,{children:"After saving your changes, restart your node:"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo systemctl restart bee\n"})})]}),(0,t.jsxs)(s.A,{value:"macos-arm64",children:[(0,t.jsx)(n.p,{children:"Open the config file for editing:"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo vi /opt/homebrew/etc/swarm-bee/bee.yaml\n"})}),(0,t.jsx)(n.p,{children:"After saving your changes, restart your node:"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"brew services restart swarm-bee\n"})})]}),(0,t.jsxs)(s.A,{value:"macos-amd64",children:[(0,t.jsx)(n.p,{children:"Open the config file for editing:"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo vi /usr/local/etc/swarm-bee/bee.yaml\n"})}),(0,t.jsx)(n.p,{children:"After saving your changes, restart your node:"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"brew services restart swarm-bee\n"})})]})]}),"\n",(0,t.jsxs)(n.h2,{id:"manually-generating-yaml-config-file-for-bee-start",children:["Manually generating YAML config file for ",(0,t.jsx)(n.em,{children:"bee start"})]}),"\n",(0,t.jsxs)(n.p,{children:["No YAML file is generated during installation when using the ",(0,t.jsx)(n.a,{href:"/docs/bee/installation/shell-script-install",children:"shell script install method"}),", so you must generate one if you wish to use a YAML file to specify your configuration options. To do this you can use the ",(0,t.jsx)(n.code,{children:"bee printconfig"})," command to print out a set of default options and save it to a new file in the default location:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"bee printconfig &> $HOME/.bee.yaml\n"})}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["Note that ",(0,t.jsx)(n.code,{children:"bee printconfig"})," prints the default configuration for your node, not the current configuration including any changes."]})}),"\n",(0,t.jsxs)(n.p,{children:["When using ",(0,t.jsx)(n.code,{children:"bee.yaml"})," with the ",(0,t.jsx)(n.code,{children:"bee start"})," command, make sure to use the ",(0,t.jsx)(n.code,{children:"--config"})," flag to specify the location of your configuration file."]}),"\n",(0,t.jsx)(n.h2,{id:"node-types",children:"Node Types"}),"\n",(0,t.jsxs)(n.p,{children:["There are three node types which each offer varying levels of functionality - ",(0,t.jsx)(n.em,{children:(0,t.jsx)(n.strong,{children:"full"})}),", ",(0,t.jsx)(n.em,{children:(0,t.jsx)(n.strong,{children:"light"})}),", and ",(0,t.jsx)(n.em,{children:(0,t.jsx)(n.strong,{children:"ultra-light"})}),". You can configure your node to run as any of these three types by setting the related options within your configuration."]}),"\n",(0,t.jsxs)(n.p,{children:["For a deeper dive into each node type and its features and limitations, refer to the ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/node-types",children:"Node Types"})," page."]}),"\n",(0,t.jsx)(n.h3,{id:"how-to-set-node-type",children:"How to Set Node Type"}),"\n",(0,t.jsxs)(n.p,{children:["There are three relevant options which are used to set your node type: ",(0,t.jsx)(n.code,{children:"full-node"}),", ",(0,t.jsx)(n.code,{children:"swap-enable"}),", and ",(0,t.jsx)(n.code,{children:"blockchain-rpc-endpoint"}),". The required option values for each node type are outlined below:"]}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Node Type"}),(0,t.jsx)(n.th,{children:(0,t.jsx)(n.code,{children:"full-node"})}),(0,t.jsx)(n.th,{children:(0,t.jsx)(n.code,{children:"swap-enable"})}),(0,t.jsx)(n.th,{children:(0,t.jsx)(n.code,{children:"blockchain-rpc-endpoint"})}),(0,t.jsx)(n.th,{children:"Functionality"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Full Node"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"true"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"true"})}),(0,t.jsx)(n.td,{children:"Required"}),(0,t.jsx)(n.td,{children:"Full functionality, including uploads, downloads, and Swarm network participation."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Light Node"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"false"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"true"})}),(0,t.jsx)(n.td,{children:"Required"}),(0,t.jsx)(n.td,{children:"Supports uploading and downloading only."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Ultra-Light Node"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"false"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"false"})}),(0,t.jsx)(n.td,{children:"Not required"}),(0,t.jsx)(n.td,{children:"Free-tier downloads only."})]})]})]}),"\n",(0,t.jsx)(n.h2,{id:"configuration-examples",children:"Configuration Examples"}),"\n",(0,t.jsx)(n.p,{children:"Bee nodes can be configured using command-line flags, environment variables, or a YAML configuration file:"}),"\n",(0,t.jsxs)(r.A,{defaultValue:"full",values:[{label:"Full",value:"full"},{label:"Light",value:"light"},{label:"Ultra-Light",value:"ultra-light"}],children:[(0,t.jsxs)(s.A,{value:"full",children:[(0,t.jsx)(n.h3,{id:"full-node-configuration",children:"Full Node Configuration"}),(0,t.jsx)(n.h4,{id:"using-command-line-arguments",children:"Using Command-Line Arguments"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"bee start \\\n --password mypassword \\\n --full-node \\\n --swap-enable \\\n --blockchain-rpc-endpoint https://xdai.fairdatasociety.org\n"})}),(0,t.jsx)(n.h4,{id:"using-environment-variables",children:"Using Environment Variables"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'export BEE_PASSWORD="mypassword"\nexport BEE_FULL_NODE="true"\nexport BEE_SWAP_ENABLE="true"\nexport BEE_BLOCKCHAIN_RPC_ENDPOINT="https://xdai.fairdatasociety.org"\nbee start\n'})}),(0,t.jsx)(n.h4,{id:"using-yaml-configuration",children:"Using YAML Configuration"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'password: mypassword\nfull-node: true\nswap-enable: true\nblockchain-rpc-endpoint: "https://xdai.fairdatasociety.org"\n'})})]}),(0,t.jsxs)(s.A,{value:"light",children:[(0,t.jsx)(n.h3,{id:"light-node-configuration",children:"Light Node Configuration"}),(0,t.jsx)(n.h4,{id:"using-command-line-arguments-1",children:"Using Command-Line Arguments"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"bee start \\\n --password mypassword \\\n --swap-enable \\\n --blockchain-rpc-endpoint https://xdai.fairdatasociety.org\n"})}),(0,t.jsx)(n.h4,{id:"using-environment-variables-1",children:"Using Environment Variables"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'export BEE_PASSWORD="mypassword"\nexport BEE_SWAP_ENABLE="true"\nexport BEE_BLOCKCHAIN_RPC_ENDPOINT="https://xdai.fairdatasociety.org"\nbee start\n'})}),(0,t.jsx)(n.h4,{id:"using-yaml-configuration-1",children:"Using YAML Configuration"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'password: mypassword\nswap-enable: true\nblockchain-rpc-endpoint: "https://xdai.fairdatasociety.org"\n'})})]}),(0,t.jsxs)(s.A,{value:"ultra-light",children:[(0,t.jsx)(n.h3,{id:"ultra-light-node-configuration",children:"Ultra-Light Node Configuration"}),(0,t.jsx)(n.h4,{id:"using-command-line-arguments-2",children:"Using Command-Line Arguments"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"bee start \\\n --password mypassword\n"})}),(0,t.jsx)(n.h4,{id:"using-environment-variables-2",children:"Using Environment Variables"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'export BEE_PASSWORD="mypassword"\nbee start\n'})}),(0,t.jsx)(n.h4,{id:"using-yaml-configuration-2",children:"Using YAML Configuration"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:"password: mypassword\n"})})]})]}),"\n",(0,t.jsx)(n.h2,{id:"default-data-and-config-directories",children:"Default Data and Config Directories"}),"\n",(0,t.jsx)(n.p,{children:"Depending on the operating system and startup method used, the default directories for your node will differ:"}),"\n",(0,t.jsx)(n.h3,{id:"bee-service-default-directories-package-manager-install",children:"Bee Service Default Directories (Package Manager Install)"}),"\n",(0,t.jsxs)(n.p,{children:["When installed using a package manager, Bee is set up to run as a service with default data and configuration directories set up automatically during the installation. The examples below include default directories for Linux and macOS. You can find the complete details of default directories for different operating systems in the ",(0,t.jsx)(n.code,{children:"bee.yaml"})," files included in the ",(0,t.jsx)(n.a,{href:"https://github.com/ethersphere/bee/tree/master/packaging",children:"packaging folder of the Bee repo"}),"."]}),"\n",(0,t.jsxs)(r.A,{defaultValue:"linux",values:[{label:"Linux",value:"linux"},{label:"MacOS arm64 (Apple Silicon)",value:"macos-arm64"},{label:"MacOS amd64 (Intel)",value:"macos-amd64"}],children:[(0,t.jsxs)(s.A,{value:"linux",children:[(0,t.jsx)(n.p,{children:"The default data folder and config file locations:"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:"data-dir: /var/lib/bee\nconfig: /etc/bee/bee.yaml\n"})})]}),(0,t.jsxs)(s.A,{value:"macos-arm64",children:[(0,t.jsx)(n.p,{children:"The default data folder and config file locations:"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:"data-dir: /opt/homebrew/var/lib/swarm-bee\nconfig: /opt/homebrew/etc/swarm-bee/bee.yaml\n"})})]}),(0,t.jsxs)(s.A,{value:"macos-amd64",children:[(0,t.jsx)(n.p,{children:"The default data folder and config file locations:"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:"data-dir: /usr/local/var/lib/swarm-bee/\nconfig: /usr/local/etc/swarm-bee/bee.yaml\n"})})]})]}),"\n",(0,t.jsx)(n.h3,{id:"shell-script-install-default-directories",children:"Shell Script Install Default Directories"}),"\n",(0,t.jsxs)(n.p,{children:["For all operating systems, the default data and config directories for the ",(0,t.jsx)(n.code,{children:"bee start"})," startup method can be found using the ",(0,t.jsx)(n.code,{children:"bee printconfig"})," command:"]}),"\n",(0,t.jsxs)(n.p,{children:["This will print out a complete default Bee node configuration file to the terminal, the ",(0,t.jsx)(n.code,{children:"config"})," and ",(0,t.jsx)(n.code,{children:"data-dir"})," values show the default directories for your system:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:"config: /root/.bee.yaml\ndata-dir: /root/.bee\n"})}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["The default directories for your system may differ from the example above, so make sure to run the ",(0,t.jsx)(n.code,{children:"bee printconfig"})," command to view the default directories for your system."]})}),"\n",(0,t.jsx)(n.h2,{id:"create-password",children:"Create Password"}),"\n",(0,t.jsxs)(n.p,{children:["A password is required for all modes, and can either be set directly in text through the ",(0,t.jsx)(n.code,{children:"password"})," configuration option or alternatively a file can be used by setting the ",(0,t.jsx)(n.code,{children:"password-file"})," option to the path where your password file is located."]}),"\n",(0,t.jsx)(n.h2,{id:"setting-blockchain-rpc-endpoint",children:"Setting Blockchain RPC endpoint"}),"\n",(0,t.jsxs)(n.admonition,{type:"warning",children:[(0,t.jsxs)(n.p,{children:["A RPC endpoint for ",(0,t.jsx)(n.em,{children:"a full archival Gnosis Chain node is required"})," since a Bee node must sync all data starting from when the ",(0,t.jsx)(n.a,{href:"https://gnosisscan.io/tx/0x3427deb106b30a7d23f7ce9d2465f2d83945948c5aeddba55337c318fb56ec25",children:"postage stamp smart contract was created"}),"."]}),(0,t.jsxs)(n.p,{children:["The free RPC endpoint offered by the Fair Data Society (",(0,t.jsx)(n.a,{href:"https://xdai.fairdatasociety.org",children:"https://xdai.fairdatasociety.org"}),") will work since it is a full archival node, but running Bee with other public free RPC endpoints from non-archive nodes will result in the ",(0,t.jsx)(n.code,{children:"storage: not found"})," error."]}),(0,t.jsxs)(n.p,{children:["If you do encounter the ",(0,t.jsx)(n.code,{children:"storage: not found"})," error, update your RPC endpoint to one for a full archival node, and restart your node with the ",(0,t.jsx)(n.code,{children:"resync"})," option set to ",(0,t.jsx)(n.code,{children:"true"}),"."]})]}),"\n",(0,t.jsx)(n.p,{children:"Full and light Bee nodes require a Gnosis Chain RPC endpoint in order to sync blockchain data and issue transactions (not required for ultra-light nodes)."}),"\n",(0,t.jsxs)(n.p,{children:["To set your RPC endpoint, specify it with the ",(0,t.jsx)(n.code,{children:"blockchain-rpc-endpoint"})," value, which is set to an empty string by default."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:"# bee.yaml\nblockchain-rpc-endpoint: https://xdai.fairdatasociety.org\n"})}),"\n",(0,t.jsxs)(n.p,{children:["We recommend you ",(0,t.jsx)(n.a,{href:"https://docs.gnosischain.com/node/",children:"run your own Gnosis Chain node"}),", but you may also consider using a paid RPC endpoint provider such as ",(0,t.jsx)(n.a,{href:"https://getblock.io/",children:"GetBlock"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"rpc-providers",children:"RPC Providers"}),"\n",(0,t.jsx)(n.p,{children:"While we recommend running your own Gnosis Chain node for your RPC endpoint, you may wish to use a third party provider instead."}),"\n",(0,t.jsxs)(n.p,{children:["For a comprehensive list of RPC providers, refer to the ",(0,t.jsx)(n.a,{href:"https://docs.gnosischain.com/tools/RPC%20Providers/",children:"Gnosis Chain documentation"}),". The list includes both free and paid RPC providers (refer to ",(0,t.jsx)(n.a,{href:"#setting-blockchain-rpc-endpoint",children:"warning above"})," about free RPC providers)."]}),"\n",(0,t.jsxs)(n.p,{children:["For running a light node or for testing out a single full node you can use the free RPC endpoint provided by the Fair Data Society: ",(0,t.jsx)(n.code,{children:"https://xdai.fairdatasociety.org"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"block-number-sync-interval",children:"Block number sync interval"}),"\n",(0,t.jsxs)(n.p,{children:["Bee periodically reads the current block number from your blockchain RPC endpoint and estimates it locally in between those reads, which significantly reduces how often it calls the RPC.\nThe ",(0,t.jsx)(n.code,{children:"block-sync-interval"})," option controls how frequently the real block number is refreshed:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:"# bee.yaml\nblock-sync-interval: 10\n"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["The default is ",(0,t.jsx)(n.code,{children:"10"}),", so operators who want the default do not need to set anything."]}),"\n",(0,t.jsx)(n.li,{children:"A higher value means fewer RPC calls, at the cost of a slightly staler block-number estimate."}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"1"})," refreshes the block number as often as possible."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"0"}),' is not allowed; the node treats it as "no interval" and clamps it to ',(0,t.jsx)(n.code,{children:"1"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["The equivalent flag is ",(0,t.jsx)(n.code,{children:"--block-sync-interval"})," and the environment variable is ",(0,t.jsx)(n.code,{children:"BEE_BLOCK_SYNC_INTERVAL"}),".\nThis is especially useful for operators on paid or rate-limited RPC providers who want to lower request volume."]}),"\n",(0,t.jsx)(n.h2,{id:"simd-hashing-optional",children:"SIMD hashing (Optional)"}),"\n",(0,t.jsx)(n.p,{children:"Bee can use a hardware-accelerated (SIMD) implementation of its chunk hasher, a frequent and CPU-intensive operation.\nOn supported hardware this noticeably lowers the CPU cost of hashing, which speeds up uploads and other hashing-heavy work."}),"\n",(0,t.jsxs)(n.p,{children:["This is ",(0,t.jsx)(n.strong,{children:"opt-in and off by default"}),".\nIt is currently available ",(0,t.jsx)(n.strong,{children:"only on Linux x86-64 (amd64)"}),"; on all other platforms (Windows, macOS, ARM) the node automatically falls back to the standard hasher, with no action required and no regression."]}),"\n",(0,t.jsxs)(n.p,{children:["To enable it, set the ",(0,t.jsx)(n.code,{children:"use-simd-hashing"})," option:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:"# bee.yaml\nuse-simd-hashing: true\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The equivalent flag is ",(0,t.jsx)(n.code,{children:"--use-simd-hashing"})," and the environment variable is ",(0,t.jsx)(n.code,{children:"BEE_USE_SIMD_HASHING"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"configuring-swap-initial-deposit-optional",children:"Configuring Swap Initial Deposit (Optional)"}),"\n",(0,t.jsxs)(n.p,{children:["When running your Bee node with SWAP enabled for the first time, your node will deploy a 'chequebook' contract using the canonical factory contract which is deployed by Swarm. Once the chequebook is deployed, Bee will (optionally) deposit a certain amount of xBZZ in the chequebook contract so that it can pay other nodes in return for their services. The amount of xBZZ transferred to the chequebook is set by the ",(0,t.jsx)(n.code,{children:"swap-initial-deposit"})," configuration setting (it may be left at the default value of zero or commented out)."]}),"\n",(0,t.jsx)(n.h2,{id:"chequebook-verification-optional",children:"Chequebook Verification (Optional)"}),"\n",(0,t.jsx)(n.p,{children:"Full node operators can optionally require that incoming peer connections come from nodes that maintain a minimum chequebook balance. When enabled, the node checks the chequebook balance of each incoming full-node peer and rejects connections from peers whose balance falls below the configured threshold."}),"\n",(0,t.jsxs)(n.p,{children:["This feature is ",(0,t.jsx)(n.strong,{children:"disabled by default"})," and only applies to full nodes with chequebook and chain functionality enabled. Light nodes skip chequebook verification regardless of configuration. Remote peers do not need to enable chequebook verification themselves in order to be accepted \u2014 only the verifying node needs to have it enabled."]}),"\n",(0,t.jsxs)(n.p,{children:["To enable chequebook verification, set ",(0,t.jsx)(n.code,{children:"chequebook-verification"})," to ",(0,t.jsx)(n.code,{children:"true"}),":"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:"# bee.yaml\nchequebook-verification: true\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The default minimum balance threshold is ",(0,t.jsx)(n.strong,{children:"11 BZZ"}),".\nThe value is set in the token's smallest unit (PLUR), where 1 BZZ = 10^16 PLUR, so the default is ",(0,t.jsx)(n.code,{children:"110000000000000000"}),".\nTo configure a different threshold, set ",(0,t.jsx)(n.code,{children:"chequebook-min-balance"})," accordingly:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'# bee.yaml\nchequebook-verification: true\nchequebook-min-balance: "110000000000000000" # 11 BZZ, expressed in PLUR\n'})}),"\n",(0,t.jsx)(n.p,{children:"Or using command-line flags:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"bee start \\\n --chequebook-verification \\\n --chequebook-min-balance 110000000000000000\n"})}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsx)(n.p,{children:"Chequebook verification is an optional defense layer for full node operators who want to avoid connecting to peers that do not maintain a sufficient chequebook balance.\nIt was introduced in Bee v2.8.0."})}),"\n",(0,t.jsx)(n.h2,{id:"nat-address",children:"NAT address"}),"\n",(0,t.jsxs)(n.p,{children:["Swarm is all about sharing and storing chunks of data. To enable other Bees (also known as ",(0,t.jsx)(n.em,{children:"peers"}),") to connect to your Bee, you must\nbroadcast your public IP address in order to ensure that Bee is reachable on the correct p2p port (default ",(0,t.jsx)(n.code,{children:"1634"}),"). We recommend that you ",(0,t.jsx)(n.a,{href:"/docs/bee/installation/connectivity",children:"manually configure your external IP and check\nconnectivity"})," to ensure your Bee is able to receive connections from other peers."]}),"\n",(0,t.jsx)(n.p,{children:"First, determine your public IP address:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl icanhazip.com\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"123.123.123.123\n"})}),"\n",(0,t.jsx)(n.p,{children:"Then configure your node, including your p2p port (default 1634)."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'# bee.yaml\nnat-addr: "123.123.123.123:1634"\n'})}),"\n",(0,t.jsxs)(n.p,{children:["Ensure ",(0,t.jsx)(n.code,{children:"nat-addr"})," and ",(0,t.jsx)(n.code,{children:"nat-wss-addr"})," if used are set to valid ",(0,t.jsx)(n.code,{children:"host:port"})," values \u2014 invalid values prevent the node from starting."]}),"\n",(0,t.jsx)(n.h2,{id:"ens-resolution-optional",children:"ENS Resolution (Optional)"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.a,{href:"https://ens.domains/",children:"ENS"})," domain resolution system is used to host websites on Bee, and in order to use this your Bee must be connected to a mainnet Ethereum blockchain node. We recommend you run your own ethereum node. An option for resource restricted devices is geth+nimbus and a guide can be found ",(0,t.jsx)(n.a,{href:"https://ethereum-on-arm-documentation.readthedocs.io/en/latest/",children:"here"}),". Other options include ",(0,t.jsx)(n.a,{href:"https://dappnode.com/",children:"dappnode"}),", ",(0,t.jsx)(n.a,{href:"https://www.nicenode.xyz/",children:"nicenode"}),", ",(0,t.jsx)(n.a,{href:"https://stereum.net/",children:"stereum"})," and ",(0,t.jsx)(n.a,{href:"https://ava.do/",children:"avado"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["If you do not wish to run your own Ethereum node, you may use a blockchain RPC service provider such as ",(0,t.jsx)(n.a,{href:"https://infura.io",children:"Infura"}),". After signing up for Infura, simply set your ",(0,t.jsx)(n.code,{children:"--resolver-options"})," to ",(0,t.jsx)(n.code,{children:"https://mainnet.infura.io/v3/your-api-key"}),"."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'# bee.yaml\nresolver-options: ["https://mainnet.infura.io/v3/<>"]\n'})}),"\n",(0,t.jsx)(n.h2,{id:"sepolia-testnet-configuration",children:"Sepolia Testnet Configuration"}),"\n",(0,t.jsxs)(n.p,{children:["In order to operate a Bee node on the Sepolia testnet, you need to change ",(0,t.jsx)(n.code,{children:"mainnet"})," to ",(0,t.jsx)(n.code,{children:"false"}),", and provide a valid Sepolia testnet RPC endpoint through the ",(0,t.jsx)(n.code,{children:"blockchain-rpc-endpoint"})," option."]}),"\n",(0,t.jsx)(n.p,{children:"Here is an example of a full configuration for a testnet full node:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'data-dir: /home/username/bee/sepolia # Specified an alternate "data-dir" for our testnet node data\nfull-node: true\nmainnet: false # Changed to "false"\npassword: password\nblockchain-rpc-endpoint: wss://sepolia.infura.io/ws/v3/ # Replaced the Gnosis Chain RPC with a Sepolia testnet RPC endpoint\nswap-enable: true\nverbosity: 5\nwelcome-message: "welcome-from-the-hive"\nwarmup-time: 30s\n'})}),"\n",(0,t.jsx)(n.h3,{id:"funding-testnet-node",children:"Funding Testnet Node"}),"\n",(0,t.jsxs)(n.p,{children:["Make sure to fund your node with Sepolia ETH rather than xDAI to pay for gas on the Sepolia testnet. There are many public faucets you can use to obtain Sepolia ETH, such as ",(0,t.jsx)(n.a,{href:"https://www.infura.io/faucet/sepolia",children:"this one from Infura"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["To get Sepolia BZZ (sBZZ) you can use ",(0,t.jsx)(n.a,{href:"https://app.uniswap.org/swap?outputCurrency=0x543dDb01Ba47acB11de34891cD86B675F04840db&inputCurrency=ETH",children:"this Uniswap market"}),", just make sure that you've switched to the Sepolia network in your browser wallet."]})]})}function p(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(u,{...e})}):u(e)}},19365(e,n,i){i.d(n,{A:()=>l});i(96540);var a=i(34164),t=i(47751);const o="tabItem_Ymn6";var r=i(74848);function s(e){let n=e.children,i=e.className,t=e.hidden;return(0,r.jsx)("div",{role:"tabpanel",className:(0,a.A)(o,i),hidden:t,children:n})}function l(e){let n=e.children,i=e.className,a=e.value;const o=(0,t.uc)(),l=o.selectedValue,d=o.lazy,c=a===l;return!c&&d?null:(0,r.jsx)(s,{className:i,hidden:!c,children:n})}},4865(e,n,i){i.d(n,{A:()=>f});i(96540);var a=i(34164),t=i(17559),o=i(47751),r=i(23104),s=i(92303);const l="tabList__CuJ",d="tabItem_LNqP";var c=i(74848);function h(e){let n=e.className;const i=(0,o.uc)(),t=i.selectedValue,s=i.selectValue,l=i.tabValues,h=i.block,u=[],p=(0,r.a_)().blockElementScrollPositionUntilNextRender,f=e=>{const n=e.currentTarget,i=u.indexOf(n),a=l[i].value;a!==t&&(p(n),s(a))},g=e=>{var n;let i=null;switch(e.key){case"Enter":f(e);break;case"ArrowRight":{var a;const n=u.indexOf(e.currentTarget)+1;i=null!=(a=u[n])?a:u[0];break}case"ArrowLeft":{var t;const n=u.indexOf(e.currentTarget)-1;i=null!=(t=u[n])?t:u[u.length-1];break}}null==(n=i)||n.focus()};return(0,c.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":h},n),children:l.map(e=>{let n=e.value,i=e.label,o=e.attributes;return(0,c.jsx)("li",Object.assign({role:"tab",tabIndex:t===n?0:-1,"aria-selected":t===n,ref:e=>{u.push(e)},onKeyDown:g,onClick:f},o,{className:(0,a.A)("tabs__item",d,null==o?void 0:o.className,{"tabs__item--active":t===n}),children:null!=i?i:n}),n)})})}function u(e){let n=e.children;return(0,c.jsx)("div",{className:"margin-top--md",children:n})}function p(e){let n=e.className,i=e.children;return(0,c.jsxs)("div",{className:(0,a.A)(t.G.tabs.container,"tabs-container",l),children:[(0,c.jsx)(h,{className:n}),(0,c.jsx)(u,{children:i})]})}function f(e){const n=(0,s.A)(),i=(0,o.OC)(e);return(0,c.jsx)(o.O_,{value:i,children:(0,c.jsx)(p,{className:e.className,children:(0,o.vT)(e.children)})},String(n))}},47751(e,n,i){i.d(n,{OC:()=>f,O_:()=>b,uc:()=>m,vT:()=>c});var a=i(96540),t=i(56347),o=i(205),r=i(57485),s=i(70679),l=i(31682),d=i(74848);function c(e){return a.Children.toArray(e).filter(e=>"\n"!==e)}function h(e){const n=e.values,i=e.children;return(0,a.useMemo)(()=>{const e=null!=n?n:function(e){return a.Children.toArray(e).flatMap(e=>{if(!e)return[];if((0,a.isValidElement)(e)&&function(e){const n=e.props;return!!n&&"object"==typeof n&&"value"in n}(e))return[e];const n="string"==typeof e.type?e.type:e.type.name;throw new Error("Docusaurus error: Bad child <"+n+'>: all children of the component should be , and every should have a unique "value" prop.\nIf you do not want to pass on a "value" prop to the direct children of , you can also pass an explicit prop.')}).map(e=>{let n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}})}(i);return function(e){const n=(0,l.XI)(e,(e,n)=>e.value===n.value);if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map(e=>"'"+e.value+"'").join(", ")+'" found in . Every value needs to be unique.')}(e),e},[n,i])}function u(e){let n=e.value;return e.tabValues.some(e=>e.value===n)}function p(e){let n=e.queryString,i=void 0!==n&&n,o=e.groupId;const s=(0,t.W6)(),l=function(e){let n=e.queryString,i=void 0!==n&&n,a=e.groupId;if("string"==typeof i)return i;if(!1===i)return null;if(!0===i&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=a?a:null}({queryString:i,groupId:o});return[(0,r.aZ)(l),(0,a.useCallback)(e=>{if(!l)return;const n=new URLSearchParams(s.location.search);n.set(l,e),s.replace(Object.assign({},s.location,{search:n.toString()}))},[l,s])]}function f(e){var n,i;const t=e.defaultValue,r=e.queryString,l=void 0!==r&&r,d=e.groupId,c=h(e),f=(0,a.useState)(()=>function(e){var n;let i=e.defaultValue,a=e.tabValues;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(i){if(!u({value:i,tabValues:a}))throw new Error('Docusaurus error: The has a defaultValue "'+i+'" but none of its children has the corresponding value. Available values are: '+a.map(e=>e.value).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return i}const t=null!=(n=a.find(e=>e.default))?n:a[0];if(!t)throw new Error("Unexpected error: 0 tabValues");return t.value}({defaultValue:t,tabValues:c})),g=f[0],m=f[1],b=p({queryString:l,groupId:d}),x=b[0],y=b[1],v=function(e){const n=function(e){return e?"docusaurus.tab."+e:null}(e.groupId),i=(0,s.Dv)(n),t=i[0],o=i[1];return[t,(0,a.useCallback)(e=>{n&&o.set(e)},[n,o])]}({groupId:d}),j=v[0],w=v[1],k=(()=>{const e=null!=x?x:j;return u({value:e,tabValues:c})?e:null})();(0,o.A)(()=>{k&&m(k)},[k]);return{selectedValue:g,selectValue:(0,a.useCallback)(e=>{if(!u({value:e,tabValues:c}))throw new Error("Can't select invalid tab value="+e);m(e),y(e),w(e)},[y,w,c]),tabValues:c,lazy:null!=(n=e.lazy)&&n,block:null!=(i=e.block)&&i}}const g=(0,a.createContext)(null);function m(){const e=a.useContext(g);if(!e)throw new Error("useTabsContext() must be used within a Tabs component");return e}function b(e){return(0,d.jsx)(g.Provider,{value:e.value,children:e.children})}},28453(e,n,i){i.d(n,{R:()=>r,x:()=>s});var a=i(96540);const t={},o=a.createContext(t);function r(e){const n=a.useContext(o);return a.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),a.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8e1fb12b.375876d3.js b/assets/js/8e1fb12b.375876d3.js new file mode 100644 index 000000000..f3d133dee --- /dev/null +++ b/assets/js/8e1fb12b.375876d3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[1108],{88353(e,n,i){i.r(n),i.d(n,{assets:()=>a,contentTitle:()=>d,default:()=>h,frontMatter:()=>o,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"bee/installation/getting-started","title":"Getting Started","description":"Introduces Bee node types their requirements and available installation methods to help users choose appropriate setup approaches.","source":"@site/docs/bee/installation/getting-started.md","sourceDirName":"bee/installation","slug":"/bee/installation/getting-started","permalink":"/docs/bee/installation/getting-started","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/bee/installation/getting-started.md","tags":[],"version":"current","frontMatter":{"title":"Getting Started","id":"getting-started","description":"Introduces Bee node types their requirements and available installation methods to help users choose appropriate setup approaches."},"sidebar":"bee","next":{"title":"Quickstart","permalink":"/docs/bee/installation/quick-start"}}');var t=i(74848),r=i(28453);const o={title:"Getting Started",id:"getting-started",description:"Introduces Bee node types their requirements and available installation methods to help users choose appropriate setup approaches."},d=void 0,a={},l=[{value:"Overview",id:"overview",level:2},{value:"Node Types",id:"node-types",level:2},{value:"Choosing a Node Type",id:"choosing-a-node-type",level:2},{value:"Requirements",id:"requirements",level:2},{value:"Software Requirements",id:"software-requirements",level:3},{value:"Recommended Operating Systems",id:"recommended-operating-systems",level:4},{value:"Essential Tools",id:"essential-tools",level:4},{value:"Hardware Requirements",id:"hardware-requirements",level:3},{value:"Light and Ultra-Light",id:"light-and-ultra-light",level:4},{value:"Full Node",id:"full-node",level:4},{value:"Network Requirements",id:"network-requirements",level:3},{value:"RPC Endpoint",id:"rpc-endpoint",level:4},{value:"NAT and Port Forwarding",id:"nat-and-port-forwarding",level:4},{value:"Installation Methods",id:"installation-methods",level:2},{value:"Swarm Desktop",id:"swarm-desktop",level:3},{value:"Shell Script Install",id:"shell-script-install",level:3},{value:"Docker Install",id:"docker-install",level:3},{value:"Package Manager Install",id:"package-manager-install",level:3},{value:"Building from Source",id:"building-from-source",level:3}];function c(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"Running a Bee node means choosing a node type (full, light, or ultra-light), meeting the software, hardware, and network requirements, and picking an installation method. This guide covers each so you can choose the right setup."}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.p,{children:["If you want to get a Bee node up and running ASAP, check out the ",(0,t.jsx)(n.a,{href:"/docs/bee/installation/quick-start",children:"Quick Start"})," guide."]})}),"\n",(0,t.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,t.jsx)(n.p,{children:"This guide provides the essential background information to help you start running a Bee node, including:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/docs/bee/installation/getting-started#node-types",children:"Types of Bee nodes and their features"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/docs/bee/installation/getting-started#choosing-a-node-type",children:"Choosing the right node type"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/docs/bee/installation/getting-started#software-requirements",children:"Software requirements"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/docs/bee/installation/getting-started#hardware-requirements",children:"Hardware requirements"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/docs/bee/installation/getting-started#network-requirements",children:"Network requirements"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/docs/bee/installation/getting-started#installation-methods",children:"Installation methods"})}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{title:"New Bee Users: Read This Guide in Full",type:"caution",children:(0,t.jsxs)(n.p,{children:["For new Bee users, it is strongly recommended to read through this ",(0,t.jsx)(n.em,{children:(0,t.jsx)(n.strong,{children:"entire guide page"})})," before proceeding with installation and setup."]})}),"\n",(0,t.jsx)(n.h2,{id:"node-types",children:"Node Types"}),"\n",(0,t.jsxs)(n.p,{children:["Bee nodes can be run in three different modes, ",(0,t.jsx)(n.em,{children:(0,t.jsx)(n.strong,{children:"full"})}),", ",(0,t.jsx)(n.em,{children:(0,t.jsx)(n.strong,{children:"light"})}),", or ",(0,t.jsx)(n.em,{children:(0,t.jsx)(n.strong,{children:"ultra-light"})}),". Full nodes provide complete access to all of Swarm's features including downloads, uploads, full participation in Swarm's incentives systems, and advanced messaging features such as PSS and GSOC. Light nodes are primarily for downloading and uploading only. Ultra-light nodes are the most limited, and only allow users to download a small amount of data with the free-tier limits set by full node operators."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/node-types",children:"Node Types"})," page provides you with an in-depth look into the features and limitations of each node type along with instructions for how to set node options for all three types."]}),"\n",(0,t.jsx)(n.h2,{id:"choosing-a-node-type",children:"Choosing a Node Type"}),"\n",(0,t.jsx)(n.p,{children:"The node type you need to run will differ depending on your use-case:"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Use Case"}),(0,t.jsx)(n.th,{children:"Recommended Node Type(s)"}),(0,t.jsx)(n.th,{children:"Details"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"Basic Interaction with Swarm"})}),(0,t.jsx)(n.td,{children:"Ultra-Light, Light"}),(0,t.jsxs)(n.td,{children:["Ultra-light nodes allow limited free-tier downloads. Light nodes support both uploads and downloads and run efficiently in the background. ",(0,t.jsx)(n.a,{href:"https://www.ethswarm.org/build/desktop",children:"Swarm Desktop"})," provides an easy way to set up either type."]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"DApp Development"})}),(0,t.jsx)(n.td,{children:"Light, Full"}),(0,t.jsx)(n.td,{children:"Light nodes are sufficient for many DApp use cases. Full nodes are required for advanced features like GSOC and PSS."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"Earning xBZZ & Supporting the Network"})}),(0,t.jsx)(n.td,{children:"Full"}),(0,t.jsxs)(n.td,{children:["Full nodes are necessary for storage incentives and long-term xBZZ earnings. Running multiple nodes? Consider using ",(0,t.jsx)(n.a,{href:"https://www.docker.com/",children:"Docker"}),", ",(0,t.jsx)(n.a,{href:"https://docs.docker.com/compose/",children:"Docker Compose"}),", or ",(0,t.jsx)(n.a,{href:"https://kubernetes.io/",children:"Kubernetes"})," for easier management."]})]})]})]}),"\n",(0,t.jsxs)(n.p,{children:["Refer to the ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/node-types",children:"Node Types"})," page for deep dive into each node type, their features and limitations, and configuration instructions."]}),"\n",(0,t.jsx)(n.h2,{id:"requirements",children:"Requirements"}),"\n",(0,t.jsx)(n.h3,{id:"software-requirements",children:"Software Requirements"}),"\n",(0,t.jsx)(n.h4,{id:"recommended-operating-systems",children:"Recommended Operating Systems"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Officially supported systems are listed in the ",(0,t.jsx)(n.a,{href:"https://github.com/ethersphere/bee/releases",children:"Bee releases"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["You can ",(0,t.jsx)(n.a,{href:"/docs/bee/installation/build-from-source",children:"build from source"})," if your OS is unsupported."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Swarm Desktop users"})," can use macOS, Windows, or Linux."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Linux/macOS recommended"}),": Most tools and documentation are designed for Unix-based systems."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Windows users"}),": While a Window release of Bee is available, you may also consider using ",(0,t.jsx)(n.a,{href:"https://learn.microsoft.com/en-us/windows/wsl/install",children:"WSL"})," and using a Linux version of Bee."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"essential-tools",children:"Essential Tools"}),"\n",(0,t.jsxs)(n.p,{children:["While not strictly required, these tools will ",(0,t.jsx)(n.em,{children:"greatly"})," simplify your experience working with Bee nodes:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.a,{href:"https://jqlang.org/",children:(0,t.jsx)(n.code,{children:"jq"})})}),": Formats JSON responses (recommended for API users)."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.a,{href:"https://curl.se/",children:(0,t.jsx)(n.code,{children:"curl"})})}),": Used for sending API requests (required for API interactions)."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/swarm-cli",children:"Swarm CLI"})}),": Terminal-based Bee node management."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.a,{href:"/docs/develop/tools-and-features/bee-js",children:"Bee JS"})}),": JavaScript library for programmatic API access."]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"hardware-requirements",children:"Hardware Requirements"}),"\n",(0,t.jsx)(n.p,{children:"All three node types run on ordinary consumer hardware.\nNone of them requires a powerful machine."}),"\n",(0,t.jsx)(n.h4,{id:"light-and-ultra-light",children:"Light and Ultra-Light"}),"\n",(0,t.jsx)(n.p,{children:"Light and ultra-light nodes have very minimal CPU, RAM, disk and network requirements, and run on practically any commercially available computer hardware and internet connection."}),"\n",(0,t.jsx)(n.h4,{id:"full-node",children:"Full Node"}),"\n",(0,t.jsxs)(n.p,{children:["Full nodes have modest CPU and RAM requirements too, but they use more disk space and require a more sustained bandwidth than the lighter modes.\nThey also need a Gnosis Chain RPC endpoint and some xDAI to cover gas fees, including the chequebook deployment transaction.\nSee ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/node-types#full-node-specifications",children:"full node specifications"})," on the Node Types page for the complete list of hardware and funding requirements."]}),"\n",(0,t.jsxs)(n.p,{children:["Staking and receiving storage incentives may require more CPU power.\nTest node performance with ",(0,t.jsx)(n.a,{href:"https://docs.ethswarm.org/docs/bee/working-with-bee/bee-api/#rchash",children:(0,t.jsx)(n.code,{children:"/rchash"})})," before deciding to participate in the redistribution game."]}),"\n",(0,t.jsx)(n.h3,{id:"network-requirements",children:"Network Requirements"}),"\n",(0,t.jsx)(n.p,{children:"A reliable, high-speed internet connection is recommended when running a full node, while ultra-light and light nodes require less bandwidth. The actual amount of bandwidth consumption depends on the node type and use-case:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Full Node"}),": High bandwidth usage due to constant chunk syncing, and even greater utilization if also used for uploads / downloads."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Light Node"}),": Moderate usage, based on data transfer volume."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Ultra-Light Node"}),": Minimal usage, bandwidth utilization restricted based on free-tier download limits."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"rpc-endpoint",children:"RPC Endpoint"}),"\n",(0,t.jsx)(n.admonition,{type:"warning",children:(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.em,{children:(0,t.jsx)(n.strong,{children:"Free public RPC endpoints are discouraged"})})," since they may enforce rate limiting or may not store the historical smart contract data required by Bee nodes. ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/configuration#setting-blockchain-rpc-endpoint",children:"Read more"}),"."]})}),"\n",(0,t.jsxs)(n.p,{children:["An ",(0,t.jsx)(n.a,{href:"/docs/references/glossary#rpc-endpoint",children:"RPC (Remote Procedure Call) endpoint"})," is required to allow your node to interact with ",(0,t.jsx)(n.strong,{children:"Gnosis Chain"}),", which is required for transactions like purchasing postage stamps, staking xBZZ, and storage incentives related transactions."]}),"\n",(0,t.jsxs)(n.p,{children:["Bee nodes use the ",(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"--blockchain-rpc-endpoint"})})," configuration option to specify which Gnosis Chain RPC service to connect to."]}),"\n",(0,t.jsx)(n.p,{children:"This can be:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["A ",(0,t.jsx)(n.a,{href:"https://docs.gnosischain.com/node",children:"self-hosted Gnosis Chain node"}),", giving full control over blockchain interactions but requiring additional setup and maintenance (recommended)."]}),"\n",(0,t.jsxs)(n.li,{children:["A ",(0,t.jsx)(n.strong,{children:"private and paid endpoint"})," from a third-party service provider."]}),"\n",(0,t.jsxs)(n.li,{children:["A ",(0,t.jsx)(n.strong,{children:"public and free endpoint"}),", such as this free one from the Fair Data Society: ",(0,t.jsx)(n.code,{children:"https://xdai.fairdatasociety.org"})]}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["A well-maintained list of both free and paid RPC endpoint providers can be found in the ",(0,t.jsx)(n.a,{href:"https://docs.gnosischain.com/tools/RPC%20Providers/",children:"Gnosis Chain documentation"}),"."]})}),"\n",(0,t.jsxs)(n.p,{children:["Without a properly configured RPC endpoint, a Bee node cannot interact with the blockchain, meaning it will be ",(0,t.jsx)(n.em,{children:(0,t.jsx)(n.strong,{children:"unable"})})," to:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Buy postage stamps"}),"\n",(0,t.jsx)(n.li,{children:"Stake tokens"}),"\n",(0,t.jsx)(n.li,{children:"Make blockchain transactions"}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"nat-and-port-forwarding",children:"NAT and Port Forwarding"}),"\n",(0,t.jsxs)(n.p,{children:["If running Bee on a home network, there is a good chance it is behind NAT by default. Often simply ",(0,t.jsx)(n.a,{href:"https://www.noip.com/support/knowledgebase/general-port-forwarding-guide",children:"enabling port forwarding"})," will be enough to allow your node to start communicating smoothly with the rest of the network."]}),"\n",(0,t.jsxs)(n.p,{children:["See ",(0,t.jsx)(n.a,{href:"/docs/bee/installation/connectivity",children:"this page"})," for more information on how to make sure your node can communicate with the network."]}),"\n",(0,t.jsx)(n.p,{children:"For VPS/cloud-based setups, connectivity is typically unrestricted."}),"\n",(0,t.jsxs)(n.p,{children:["If your home network happens to be using ",(0,t.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Carrier-grade_NAT",children:"CGNAT (Carrier-Grade NAT)"}),", you may face significant difficulty with setting up your node so it can connect with the rest of the network. Contacting your IP provider may be required."]}),"\n",(0,t.jsx)(n.h2,{id:"installation-methods",children:"Installation Methods"}),"\n",(0,t.jsx)(n.h3,{id:"swarm-desktop",children:(0,t.jsx)(n.a,{href:"/docs/desktop/introduction",children:"Swarm Desktop"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Best for beginners."}),"\n",(0,t.jsx)(n.li,{children:"GUI-based interface."}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"shell-script-install",children:(0,t.jsx)(n.a,{href:"/docs/bee/installation/shell-script-install",children:"Shell Script Install"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Quick setup using a minimal script."}),"\n",(0,t.jsx)(n.li,{children:"Requires manual configuration for background operation."}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"docker-install",children:(0,t.jsx)(n.a,{href:"/docs/bee/installation/docker",children:"Docker Install"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Suitable for running multiple nodes."}),"\n",(0,t.jsx)(n.li,{children:"Offers easy container management."}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"package-manager-install",children:(0,t.jsx)(n.a,{href:"/docs/bee/installation/package-manager-install",children:"Package Manager Install"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Uses APT, RPM, or Homebrew."}),"\n",(0,t.jsx)(n.li,{children:"Runs Bee as a background service."}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"building-from-source",children:(0,t.jsx)(n.a,{href:"/docs/bee/installation/build-from-source",children:"Building from Source"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Most flexible, but requires advanced setup."}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},28453(e,n,i){i.d(n,{R:()=>o,x:()=>d});var s=i(96540);const t={},r=s.createContext(t);function o(e){const n=s.useContext(r);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9035.45855021.js b/assets/js/9035.45855021.js new file mode 100644 index 000000000..9d232f478 --- /dev/null +++ b/assets/js/9035.45855021.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[9035],{49035(e,s,c){c.d(s,{createRailroadEbnfServices:()=>a.W});var a=c(14916);c(4954)}}]); \ No newline at end of file diff --git a/assets/js/9111841d.6be04c40.js b/assets/js/9111841d.6be04c40.js new file mode 100644 index 000000000..070bcf78b --- /dev/null +++ b/assets/js/9111841d.6be04c40.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[4464],{60396(e,a,t){t.r(a),t.d(a,{assets:()=>p,contentTitle:()=>b,default:()=>x,frontMatter:()=>u,metadata:()=>n,toc:()=>m});const n=JSON.parse('{"id":"develop/tools-and-features/buy-a-stamp-batch","title":"Postage Stamp Batches","description":"Guide for purchasing postage stamp batches required for uploading data to Swarm.","source":"@site/docs/develop/tools-and-features/buy-a-stamp-batch.md","sourceDirName":"develop/tools-and-features","slug":"/develop/tools-and-features/buy-a-stamp-batch","permalink":"/docs/develop/tools-and-features/buy-a-stamp-batch","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/develop/tools-and-features/buy-a-stamp-batch.md","tags":[],"version":"current","frontMatter":{"title":"Postage Stamp Batches","id":"buy-a-stamp-batch","description":"Guide for purchasing postage stamp batches required for uploading data to Swarm."},"sidebar":"develop","previous":{"title":"Swarm Cheatsheet","permalink":"/docs/develop/tools-and-features/cheatsheets"},"next":{"title":"Bee JS","permalink":"/docs/develop/tools-and-features/bee-js"}}');var l=t(74848),s=t(28453),i=t(96540);function o(){const e=(0,i.useState)(""),a=e[0],t=e[1],n=(0,i.useState)(""),s=n[0],o=n[1],r=(0,i.useState)(""),c=r[0],d=r[1],h=(0,i.useState)({}),u=h[0],b=h[1],p=(0,i.useState)(!1),m=p[0],g=p[1],x=(0,i.useState)(0),f=x[0],B=x[1],j=(0,i.useState)(null),v=j[0],y=j[1],T=(0,i.useState)(!1),w=T[0],G=T[1],k=(0,i.useState)("none"),S=k[0],I=k[1],C={unencrypted:{none:{17:"44.70 kB",18:"6.66 MB",19:"112.06 MB",20:"687.62 MB",21:"2.60 GB",22:"7.73 GB",23:"19.94 GB",24:"47.06 GB",25:"105.51 GB",26:"227.98 GB",27:"476.68 GB",28:"993.65 GB",29:"2.04 TB",30:"4.17 TB",31:"8.45 TB",32:"17.07 TB",33:"34.36 TB",34:"69.04 TB"},medium:{17:"41.56 kB",18:"6.19 MB",19:"104.18 MB",20:"639.27 MB",21:"2.41 GB",22:"7.18 GB",23:"18.54 GB",24:"43.75 GB",25:"98.09 GB",26:"211.95 GB",27:"443.16 GB",28:"923.78 GB",29:"1.90 TB",30:"3.88 TB",31:"7.86 TB",32:"15.87 TB",33:"31.94 TB",34:"64.19 TB"},strong:{17:"37.37 kB",18:"5.57 MB",19:"93.68 MB",20:"574.81 MB",21:"2.17 GB",22:"6.46 GB",23:"16.67 GB",24:"39.34 GB",25:"88.20 GB",26:"190.58 GB",27:"398.47 GB",28:"830.63 GB",29:"1.71 TB",30:"3.49 TB",31:"7.07 TB",32:"14.27 TB",33:"28.72 TB",34:"57.71 TB"},insane:{17:"33.88 kB",18:"5.05 MB",19:"84.92 MB",20:"521.09 MB",21:"1.97 GB",22:"5.86 GB",23:"15.11 GB",24:"35.66 GB",25:"79.96 GB",26:"172.77 GB",27:"361.23 GB",28:"753.00 GB",29:"1.55 TB",30:"3.16 TB",31:"6.41 TB",32:"12.93 TB",33:"26.04 TB",34:"52.32 TB"},paranoid:{17:"13.27 kB",18:"1.98 MB",19:"33.27 MB",20:"204.14 MB",21:"771.13 MB",22:"2.29 GB",23:"5.92 GB",24:"13.97 GB",25:"31.32 GB",26:"67.68 GB",27:"141.51 GB",28:"294.99 GB",29:"606.90 GB",30:"1.24 TB",31:"2.51 TB",32:"5.07 TB",33:"10.20 TB",34:"20.50 TB"}},encrypted:{none:{17:"44.35 kB",18:"6.61 MB",19:"111.18 MB",20:"682.21 MB",21:"2.58 GB",22:"7.67 GB",23:"19.78 GB",24:"46.69 GB",25:"104.68 GB",26:"226.19 GB",27:"472.93 GB",28:"985.83 GB",29:"2.03 TB",30:"4.14 TB",31:"8.39 TB",32:"16.93 TB",33:"34.09 TB",34:"68.50 TB"},medium:{17:"40.89 kB",18:"6.09 MB",19:"102.49 MB",20:"628.91 MB",21:"2.38 GB",22:"7.07 GB",23:"18.24 GB",24:"43.04 GB",25:"96.50 GB",26:"208.52 GB",27:"435.98 GB",28:"908.81 GB",29:"1.87 TB",30:"3.81 TB",31:"7.73 TB",32:"15.61 TB",33:"31.43 TB",34:"63.15 TB"},strong:{17:"36.73 kB",18:"5.47 MB",19:"92.07 MB",20:"564.95 MB",21:"2.13 GB",22:"6.35 GB",23:"16.38 GB",24:"38.66 GB",25:"86.69 GB",26:"187.31 GB",27:"391.64 GB",28:"816.39 GB",29:"1.68 TB",30:"3.43 TB",31:"6.94 TB",32:"14.02 TB",33:"28.23 TB",34:"56.72 TB"},insane:{17:"33.26 kB",18:"4.96 MB",19:"83.38 MB",20:"511.65 MB",21:"1.93 GB",22:"5.75 GB",23:"14.84 GB",24:"35.02 GB",25:"78.51 GB",26:"169.64 GB",27:"354.69 GB",28:"739.37 GB",29:"1.52 TB",30:"3.10 TB",31:"6.29 TB",32:"12.70 TB",33:"25.57 TB",34:"51.37 TB"},paranoid:{17:"13.17 kB",18:"1.96 MB",19:"33.01 MB",20:"202.53 MB",21:"765.05 MB",22:"2.28 GB",23:"5.87 GB",24:"13.86 GB",25:"31.08 GB",26:"67.15 GB",27:"140.40 GB",28:"292.67 GB",29:"602.12 GB",30:"1.23 TB",31:"2.49 TB",32:"5.03 TB",33:"10.12 TB",34:"20.34 TB"}}},M={none:"None",medium:"Medium",strong:"Strong",insane:"Insane",paranoid:"Paranoid"};(0,i.useEffect)(()=>{N()},[]);const N=async()=>{g(!0),d(""),b({});try{const e=await fetch("https://api.swarmscan.io/v1/events/storage-price-oracle/price-update");if(!e.ok)throw new Error("Network response was not ok");const a=await e.json();a.events&&a.events.length>0?B(parseFloat(a.events[0].data.price)):d("No price update available")}catch(e){d("Error: "+e.message),b({general:e.message})}finally{g(!1)}},A=(e,a,t)=>{let n={};const l=Number(e),s=Number(a),i=17280*t;if((!Number.isInteger(l)||l<17||l>34)&&(n.depth="Depth must be an integer greater or equal to 17 and less than or equal to 34."),(!Number.isInteger(s)||sC[w?"encrypted":"unencrypted"][S][e]||"N/A")(l),n=function(e){const a=1e3,t=a**3,n=a**4,l=a**5;return e{const a=86400;return e>31536e3?(e/31536e3).toFixed(2)+" years":e>604800?(e/604800).toFixed(2)+" weeks":e>a?(e/a).toFixed(2)+" days":e>3600?(e/3600).toFixed(2)+" hours":e.toFixed(2)+" seconds"};return(0,l.jsxs)("div",{style:{fontFamily:"Arial, sans-serif",width:"auto",boxShadow:"0 2px 4px rgba(0,0,0,0.1)"},children:[(0,l.jsxs)("div",{style:{marginBottom:"10px"},children:[(0,l.jsx)("label",{htmlFor:"depthInput",style:{display:"block",marginBottom:"5px"},children:"Depth:"}),(0,l.jsx)("input",{id:"depthInput",placeholder:"Input batch depth (17 to 34)",value:a,onChange:e=>t(e.target.value),style:{display:"block",marginBottom:"5px",padding:"8px"}}),u.depth&&(0,l.jsx)("div",{style:{color:"red",marginBottom:"10px"},children:u.depth}),(0,l.jsxs)("label",{htmlFor:"amountInput",style:{display:"block",marginBottom:"5px"},children:["Amount (current minimum is ",m?"Loading...":17280*f+10," PLUR):"]}),(0,l.jsx)("input",{id:"amountInput",placeholder:"Input amount",value:s,onChange:e=>o(e.target.value),style:{display:"block",marginBottom:"5px",padding:"8px"}}),(0,l.jsx)("label",{htmlFor:"erasureSelect",style:{display:"block",marginBottom:"5px",marginTop:"5px"},children:"Erasure Coding Level:"}),(0,l.jsxs)("select",{id:"erasureSelect",style:{display:"block",marginBottom:"5px",padding:"8px"},value:S,onChange:e=>I(e.target.value),children:[(0,l.jsx)("option",{value:"none",children:"None"}),(0,l.jsx)("option",{value:"medium",children:"Medium"}),(0,l.jsx)("option",{value:"strong",children:"Strong"}),(0,l.jsx)("option",{value:"insane",children:"Insane"}),(0,l.jsx)("option",{value:"paranoid",children:"Paranoid"})]}),(0,l.jsxs)("label",{style:{display:"block",marginBottom:"10px"},children:[(0,l.jsx)("input",{type:"checkbox",checked:w,onChange:()=>G(!w)})," Use Encryption?"]}),(0,l.jsx)("button",{onClick:()=>{A(a.trim(),s.trim(),f)},disabled:m,style:{padding:"10px 15px",cursor:"pointer"},children:m?"Loading...":"Calculate"})]}),u.amount&&(0,l.jsx)("div",{style:{color:"red",marginBottom:"10px"},children:u.amount}),c&&(0,l.jsx)("div",{style:{color:u.general?"red":"",marginBottom:"20px",fontSize:"16px"},children:c}),v&&(0,l.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse"},children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{style:{textAlign:"left",padding:"8px",border:"1px solid"},children:"Field"}),(0,l.jsx)("th",{style:{textAlign:"left",padding:"8px",border:"1px solid"},children:"Value"})]})}),(0,l.jsx)("tbody",{children:Object.entries(v).map(e=>{let a=e[0],t=e[1];return(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{style:{fontWeight:"bold",padding:"8px",border:"1px solid"},children:a}),(0,l.jsx)("td",{style:{padding:"8px",border:"1px solid"},children:t})]},a)})})]})]})}const r=function(){const e=(0,i.useState)(null),a=e[0],t=e[1],n=(0,i.useState)(""),s=n[0],o=n[1],r=(0,i.useState)("hours"),c=r[0],d=r[1],h=(0,i.useState)(""),u=h[0],b=h[1],p=(0,i.useState)("GB"),m=p[0],g=p[1],x=(0,i.useState)(!1),f=x[0],B=x[1],j=(0,i.useState)("none"),v=j[0],y=j[1],T=(0,i.useState)(null),w=T[0],G=T[1],k=(0,i.useState)(null),S=k[0],I=k[1],C=(0,i.useState)(null),M=C[0],N=C[1],A=(0,i.useState)(null),D=A[0],E=A[1],L=(0,i.useState)(null),P=L[0],F=L[1],V=(0,i.useState)(null),q=V[0],Z=V[1],R=(0,i.useState)(!1),U=R[0],z=R[1],W=(0,i.useState)(""),O=W[0],_=W[1],H=(0,i.useState)(""),Y=H[0],X=H[1],J={unencrypted:{none:{17:{label:"44.70 kB",gb:43e-6},18:{label:"6.66 MB",gb:.006504},19:{label:"112.06 MB",gb:.109434},20:{label:"687.62 MB",gb:.671504},21:{label:"2.60 GB",gb:2.6},22:{label:"7.73 GB",gb:7.73},23:{label:"19.94 GB",gb:19.94},24:{label:"47.06 GB",gb:47.06},25:{label:"105.51 GB",gb:105.51},26:{label:"227.98 GB",gb:227.98},27:{label:"476.68 GB",gb:476.68},28:{label:"993.65 GB",gb:993.65},29:{label:"2.04 TB",gb:2088.96},30:{label:"4.17 TB",gb:4270.08},31:{label:"8.45 TB",gb:8652.8},32:{label:"17.07 TB",gb:17479.68},33:{label:"34.36 TB",gb:35184.64},34:{label:"69.04 TB",gb:70696.96}},medium:{17:{label:"41.56 kB",gb:4e-5},18:{label:"6.19 MB",gb:.006045},19:{label:"104.18 MB",gb:.101738},20:{label:"639.27 MB",gb:.624287},21:{label:"2.41 GB",gb:2.41},22:{label:"7.18 GB",gb:7.18},23:{label:"18.54 GB",gb:18.54},24:{label:"43.75 GB",gb:43.75},25:{label:"98.09 GB",gb:98.09},26:{label:"211.95 GB",gb:211.95},27:{label:"443.16 GB",gb:443.16},28:{label:"923.78 GB",gb:923.78},29:{label:"1.90 TB",gb:1945.6},30:{label:"3.88 TB",gb:3973.12},31:{label:"7.86 TB",gb:8048.64},32:{label:"15.87 TB",gb:16250.88},33:{label:"31.94 TB",gb:32706.56},34:{label:"64.19 TB",gb:65730.56}},strong:{17:{label:"37.37 kB",gb:36e-6},18:{label:"5.57 MB",gb:.005439},19:{label:"93.68 MB",gb:.091484},20:{label:"574.81 MB",gb:.561338},21:{label:"2.17 GB",gb:2.17},22:{label:"6.46 GB",gb:6.46},23:{label:"16.67 GB",gb:16.67},24:{label:"39.34 GB",gb:39.34},25:{label:"88.20 GB",gb:88.2},26:{label:"190.58 GB",gb:190.58},27:{label:"398.47 GB",gb:398.47},28:{label:"830.63 GB",gb:830.63},29:{label:"1.71 TB",gb:1751.04},30:{label:"3.49 TB",gb:3573.76},31:{label:"7.07 TB",gb:7239.68},32:{label:"14.27 TB",gb:14612.48},33:{label:"28.72 TB",gb:29409.28},34:{label:"57.71 TB",gb:59095.04}},insane:{17:{label:"33.88 kB",gb:32e-6},18:{label:"5.05 MB",gb:.004932},19:{label:"84.92 MB",gb:.08293},20:{label:"521.09 MB",gb:.508877},21:{label:"1.97 GB",gb:1.97},22:{label:"5.86 GB",gb:5.86},23:{label:"15.11 GB",gb:15.11},24:{label:"35.66 GB",gb:35.66},25:{label:"79.96 GB",gb:79.96},26:{label:"172.77 GB",gb:172.77},27:{label:"361.23 GB",gb:361.23},28:{label:"753.00 GB",gb:753},29:{label:"1.55 TB",gb:1587.2},30:{label:"3.16 TB",gb:3235.84},31:{label:"6.41 TB",gb:6563.84},32:{label:"12.93 TB",gb:13240.32},33:{label:"26.04 TB",gb:26664.96},34:{label:"52.32 TB",gb:53575.68}},paranoid:{17:{label:"13.27 kB",gb:13e-6},18:{label:"1.98 MB",gb:.001934},19:{label:"33.27 MB",gb:.03249},20:{label:"204.14 MB",gb:.199355},21:{label:"771.13 MB",gb:.753057},22:{label:"2.29 GB",gb:2.29},23:{label:"5.92 GB",gb:5.92},24:{label:"13.97 GB",gb:13.97},25:{label:"31.32 GB",gb:31.32},26:{label:"67.68 GB",gb:67.68},27:{label:"141.51 GB",gb:141.51},28:{label:"294.99 GB",gb:294.99},29:{label:"606.90 GB",gb:606.9},30:{label:"1.24 TB",gb:1269.76},31:{label:"2.51 TB",gb:2570.24},32:{label:"5.07 TB",gb:5191.68},33:{label:"10.20 TB",gb:10444.8},34:{label:"20.50 TB",gb:20992}}},encrypted:{none:{17:{label:"44.35 kB",gb:42e-6},18:{label:"6.61 MB",gb:.006455},19:{label:"111.18 MB",gb:.108574},20:{label:"682.21 MB",gb:.666221},21:{label:"2.58 GB",gb:2.58},22:{label:"7.67 GB",gb:7.67},23:{label:"19.78 GB",gb:19.78},24:{label:"46.69 GB",gb:46.69},25:{label:"104.68 GB",gb:104.68},26:{label:"226.19 GB",gb:226.19},27:{label:"472.93 GB",gb:472.93},28:{label:"985.83 GB",gb:985.83},29:{label:"2.03 TB",gb:2078.72},30:{label:"4.14 TB",gb:4239.36},31:{label:"8.39 TB",gb:8591.36},32:{label:"16.93 TB",gb:17336.32},33:{label:"34.09 TB",gb:34908.16},34:{label:"68.50 TB",gb:70144}},medium:{17:{label:"40.89 kB",gb:39e-6},18:{label:"6.09 MB",gb:.005947},19:{label:"102.49 MB",gb:.100088},20:{label:"628.91 MB",gb:.61417},21:{label:"2.38 GB",gb:2.38},22:{label:"7.07 GB",gb:7.07},23:{label:"18.24 GB",gb:18.24},24:{label:"43.04 GB",gb:43.04},25:{label:"96.50 GB",gb:96.5},26:{label:"208.52 GB",gb:208.52},27:{label:"435.98 GB",gb:435.98},28:{label:"908.81 GB",gb:908.81},29:{label:"1.87 TB",gb:1914.88},30:{label:"3.81 TB",gb:3901.44},31:{label:"7.73 TB",gb:7915.52},32:{label:"15.61 TB",gb:15984.64},33:{label:"31.43 TB",gb:32184.32},34:{label:"63.15 TB",gb:64665.6}},strong:{17:{label:"36.73 kB",gb:35e-6},18:{label:"5.47 MB",gb:.005342},19:{label:"92.07 MB",gb:.089912},20:{label:"564.95 MB",gb:.551709},21:{label:"2.13 GB",gb:2.13},22:{label:"6.35 GB",gb:6.35},23:{label:"16.38 GB",gb:16.38},24:{label:"38.66 GB",gb:38.66},25:{label:"86.69 GB",gb:86.69},26:{label:"187.31 GB",gb:187.31},27:{label:"391.64 GB",gb:391.64},28:{label:"816.39 GB",gb:816.39},29:{label:"1.68 TB",gb:1720.32},30:{label:"3.43 TB",gb:3512.32},31:{label:"6.94 TB",gb:7106.56},32:{label:"14.02 TB",gb:14356.48},33:{label:"28.23 TB",gb:28907.52},34:{label:"56.72 TB",gb:58081.28}},insane:{17:{label:"33.26 kB",gb:32e-6},18:{label:"4.96 MB",gb:.004844},19:{label:"83.38 MB",gb:.081426},20:{label:"511.65 MB",gb:.499658},21:{label:"1.93 GB",gb:1.93},22:{label:"5.75 GB",gb:5.75},23:{label:"14.84 GB",gb:14.84},24:{label:"35.02 GB",gb:35.02},25:{label:"78.51 GB",gb:78.51},26:{label:"169.64 GB",gb:169.64},27:{label:"354.69 GB",gb:354.69},28:{label:"739.37 GB",gb:739.37},29:{label:"1.52 TB",gb:1556.48},30:{label:"3.10 TB",gb:3174.4},31:{label:"6.29 TB",gb:6440.96},32:{label:"12.70 TB",gb:13004.8},33:{label:"25.57 TB",gb:26183.68},34:{label:"51.37 TB",gb:52602.88}},paranoid:{17:{label:"13.17 kB",gb:13e-6},18:{label:"1.96 MB",gb:.001914},19:{label:"33.01 MB",gb:.032236},20:{label:"202.53 MB",gb:.197783},21:{label:"765.05 MB",gb:.747119},22:{label:"2.28 GB",gb:2.28},23:{label:"5.87 GB",gb:5.87},24:{label:"13.86 GB",gb:13.86},25:{label:"31.08 GB",gb:31.08},26:{label:"67.15 GB",gb:67.15},27:{label:"140.40 GB",gb:140.4},28:{label:"292.67 GB",gb:292.67},29:{label:"602.12 GB",gb:602.12},30:{label:"1.23 TB",gb:1259.52},31:{label:"2.49 TB",gb:2549.76},32:{label:"5.03 TB",gb:5150.72},33:{label:"10.12 TB",gb:10362.88},34:{label:"20.34 TB",gb:20828.16}}}};(0,i.useEffect)(()=>{K()},[]),(0,i.useEffect)(()=>{null!==M&&null!==D&&ee(),null!==S&&null!==D&&ae()},[M,D,S]);const K=async()=>{try{const e=await fetch("https://api.swarmscan.io/v1/events/storage-price-oracle/price-update");if(!e.ok)throw new Error("Network response was not ok");const a=await e.json();a.events&&a.events.length>0?t(parseFloat(a.events[0].data.price)):console.error("No price update available.")}catch(e){console.error("Error fetching price:",e.message)}},$=()=>J[f?"encrypted":"unencrypted"][v],Q=e=>{for(let a=17;a<=34;a++)if(e<=Math.pow(2,12+a)/1024**3)return a;return null},ee=()=>{if(null!==M&&null!==D){F((2**M*D/1e16).toFixed(4))}},ae=()=>{if(null!==S&&null!==D){Z((2**S*D/1e16).toFixed(4))}},te=(e,a)=>{const t=parseFloat(e);if(isNaN(t)||t<=0)return _("Time must be a positive number greater than 24 hrs."),0;const n=t*("years"===a?8760:"weeks"===a?168:"days"===a?24:1);return n<24?(_("Time must be longer than 24 hours."),0):n},ne=(e,a)=>{const t=parseFloat(e);if(isNaN(t)||t<=0)return X("Volume must be a positive number."),0;const n=t*("TB"===a?1024:"PB"===a?1048576:"MB"===a?1/1024:"kB"===a?1/1048576:1);if(n<=0)return X("Volume must be greater than 0."),0;const l=$();return n>l[34].gb?(X("Volume exceeds maximum effective volume ("+l[34].label+") for the selected encryption and erasure settings."),0):n},le={none:"None",medium:"Medium",strong:"Strong",insane:"Insane",paranoid:"Paranoid"};return(0,l.jsxs)("div",{style:{alignItems:"flex-start",width:"auto"},children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{htmlFor:"timeInput",style:{display:"block",marginBottom:"5px"},children:"Time:"}),(0,l.jsx)("input",{id:"timeInput",style:{marginRight:"5px",padding:"8px"},value:s,onChange:e=>o(e.target.value),placeholder:"Enter time (>= 24 hrs)"}),(0,l.jsxs)("select",{style:{marginRight:"5px",padding:"8px"},value:c,onChange:e=>d(e.target.value),children:[(0,l.jsx)("option",{value:"hours",children:"Hours"}),(0,l.jsx)("option",{value:"days",children:"Days"}),(0,l.jsx)("option",{value:"weeks",children:"Weeks"}),(0,l.jsx)("option",{value:"years",children:"Years"})]}),O&&(0,l.jsx)("p",{style:{color:"red",marginBottom:"10px"},children:O})]}),(0,l.jsxs)("div",{style:{marginBottom:"5px"},children:[(0,l.jsx)("label",{htmlFor:"volumeInput",style:{display:"block",marginBottom:"5px"},children:"Volume:"}),(0,l.jsx)("input",{id:"volumeInput",style:{marginRight:"5px",padding:"8px"},value:u,onChange:e=>b(e.target.value),placeholder:"Enter volume"}),(0,l.jsxs)("select",{style:{marginRight:"5px",padding:"8px"},value:m,onChange:e=>g(e.target.value),children:[(0,l.jsx)("option",{value:"kB",children:"Kilobytes"}),(0,l.jsx)("option",{value:"MB",children:"Megabytes"}),(0,l.jsx)("option",{value:"GB",children:"Gigabytes"}),(0,l.jsx)("option",{value:"TB",children:"Terabytes"}),(0,l.jsx)("option",{value:"PB",children:"Petabytes"})]}),Y&&(0,l.jsx)("p",{style:{color:"red",marginBottom:"10px"},children:Y})]}),(0,l.jsxs)("div",{style:{marginBottom:"5px"},children:[(0,l.jsx)("label",{htmlFor:"erasureSelect",style:{display:"block",marginBottom:"5px"},children:"Erasure Coding Level:"}),(0,l.jsxs)("select",{id:"erasureSelect",style:{padding:"8px"},value:v,onChange:e=>y(e.target.value),children:[(0,l.jsx)("option",{value:"none",children:"None"}),(0,l.jsx)("option",{value:"medium",children:"Medium"}),(0,l.jsx)("option",{value:"strong",children:"Strong"}),(0,l.jsx)("option",{value:"insane",children:"Insane"}),(0,l.jsx)("option",{value:"paranoid",children:"Paranoid"})]})]}),(0,l.jsx)("div",{style:{marginBottom:"10px"},children:(0,l.jsxs)("label",{style:{display:"block",marginBottom:"5px"},children:[(0,l.jsx)("input",{type:"checkbox",checked:f,onChange:()=>B(!f)})," Use Encryption?"]})}),(0,l.jsx)("div",{children:(0,l.jsx)("button",{style:{padding:"10px 15px",cursor:"pointer",display:"inline-block",width:"auto"},onClick:()=>{if(!a)return void console.error("Price data not available");z(!1),_(""),X("");const e=te(s,c),t=ne(u,m);if(!e||!t)return;G(e);const n=$();let l=null;for(let a=17;a<=34;a++)if(n[a]&&n[a].gb>=t){l=a;break}if(!l)return void X("Requested volume exceeds maximum available effective volume for the selected settings.");N(l);const i=Q(t);I(i);E(3600*e/5*a),z(!0)},children:"Calculate"})}),U&&!O&&!Y&&(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{style:{marginTop:"20px",fontSize:"16px"},children:["In order to store "+u+" "+m+" of data for "+s+" "+c," ("+(f?"encrypted":"unencrypted")+", "+le[v]+" erasure coding),"," a depth of "+M+" and an amount value of "+D+" should be used."]}),(0,l.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",marginTop:"20px"},children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{style:{textAlign:"left",padding:"8px",border:"1px solid"},children:"Field"}),(0,l.jsx)("th",{style:{textAlign:"left",padding:"8px",border:"1px solid"},children:"Value"})]})}),(0,l.jsxs)("tbody",{children:[(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{style:{fontWeight:"bold",padding:"8px",border:"1px solid"},children:"Time"}),(0,l.jsxs)("td",{style:{padding:"8px",border:"1px solid"},children:[w," hours"]})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{style:{fontWeight:"bold",padding:"8px",border:"1px solid"},children:"Volume"}),(0,l.jsx)("td",{style:{padding:"8px",border:"1px solid"},children:u+" "+m})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{style:{fontWeight:"bold",padding:"8px",border:"1px solid"},children:"Encryption"}),(0,l.jsx)("td",{style:{padding:"8px",border:"1px solid"},children:f?"Yes":"No"})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{style:{fontWeight:"bold",padding:"8px",border:"1px solid"},children:"Erasure Coding"}),(0,l.jsx)("td",{style:{padding:"8px",border:"1px solid"},children:le[v]})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{style:{fontWeight:"bold",padding:"8px",border:"1px solid"},children:"Suggested Minimum Amount"}),(0,l.jsxs)("td",{style:{padding:"8px",border:"1px solid"},children:[D+10," PLUR"]})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{style:{fontWeight:"bold",padding:"8px",border:"1px solid"},children:"Suggested Safe Depth"}),(0,l.jsxs)("td",{style:{padding:"8px",border:"1px solid"},children:[M+" (for an ",(0,l.jsx)("a",{href:"/docs/concepts/incentives/postage-stamps#effective-utilisation-table",children:"effective volume"})," of "+(e=>{const a=$();return a[e]?a[e].label:"N/A"})(M)+")"]})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{style:{fontWeight:"bold",padding:"8px",border:"1px solid"},children:"Suggested Minimum Depth"}),(0,l.jsxs)("td",{style:{padding:"8px",border:"1px solid"},children:[S," (see ",(0,l.jsx)("a",{href:"/docs/concepts/incentives/postage-stamps#effective-utilisation-table",children:"batch utilisation"})," - may require ",(0,l.jsx)("a",{href:"#dilute-your-batch",children:"dilution"}),")"]})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{style:{fontWeight:"bold",padding:"8px",border:"1px solid"},children:"Batch Cost for Safe Depth"}),(0,l.jsxs)("td",{style:{padding:"8px",border:"1px solid"},children:[P," xBZZ"]})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{style:{fontWeight:"bold",padding:"8px",border:"1px solid"},children:"Batch Cost for Minimum Depth"}),(0,l.jsxs)("td",{style:{padding:"8px",border:"1px solid"},children:[q," xBZZ"]})]})]})]})]})]})};var c=t(4865),d=t(19365),h=t(47650);const u={title:"Postage Stamp Batches",id:"buy-a-stamp-batch",description:"Guide for purchasing postage stamp batches required for uploading data to Swarm."},b=void 0,p={},m=[{value:"Fund your node's wallet.",id:"fund-your-nodes-wallet",level:2},{value:"Buying a stamp batch",id:"buying-a-stamp-batch",level:2},{value:"Setting stamp batch parameters and options",id:"setting-stamp-batch-parameters-and-options",level:2},{value:"Choosing depth",id:"choosing-depth",level:3},{value:"Choosing amount",id:"choosing-amount",level:3},{value:"Mutable or Immutable?",id:"mutable-or-immutable",level:3},{value:"Calculators",id:"calculators",level:2},{value:"Depth & Amount to Time & Volume Calculator",id:"depth--amount-to-time--volume-calculator",level:3},{value:"Time & Volume to Depth & Amount Calculator",id:"time--volume-to-depth--amount-calculator",level:3},{value:"Viewing Stamps",id:"viewing-stamps",level:2},{value:"Checking the remaining TTL (time to live) of your batch",id:"checking-the-remaining-ttl-time-to-live-of-your-batch",level:2},{value:"Top up your batch",id:"top-up-your-batch",level:2},{value:"Dilute your batch",id:"dilute-your-batch",level:2},{value:"Stewardship",id:"stewardship",level:2}];function g(e){const a={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",p:"p",pre:"pre",strong:"strong",...(0,s.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(a.p,{children:["A postage batch is required to upload data to Swarm. Postage stamp batches represent ",(0,l.jsx)(a.em,{children:"right to write"})," data on Swarm's ",(0,l.jsx)(a.a,{href:"/docs/concepts/DISC/",children:"DISC (Distributed Immutable Store of Chunks)"}),". The parameters which control the duration and quantity of data that can be stored by a postage batch are ",(0,l.jsx)(a.code,{children:"depth"})," and ",(0,l.jsx)(a.code,{children:"amount"}),", with ",(0,l.jsx)(a.code,{children:"depth"})," determining data volume that can be uploaded by the batch and ",(0,l.jsx)(a.code,{children:"amount"})," determining storage duration of data uploaded with the batch."]}),"\n",(0,l.jsxs)(a.admonition,{type:"info",children:[(0,l.jsxs)(a.p,{children:["The storage volume and duration are both non-deterministic. Volume is non-deterministic due to the details of how ",(0,l.jsx)(a.a,{href:"/docs/concepts/incentives/postage-stamps#batch-utilisation",children:"postage stamp batch utilization"})," works. While duration is non-deterministic due to price changes made by the ",(0,l.jsx)(a.a,{href:"/docs/concepts/incentives/price-oracle",children:"price oracle contract"}),"."]}),(0,l.jsx)(a.p,{children:(0,l.jsxs)(a.strong,{children:["Storage volume and ",(0,l.jsx)(a.code,{children:"depth"}),":"]})}),(0,l.jsxs)(a.p,{children:["When purchasing stamp batches for larger volumes of data (by increasing the ",(0,l.jsx)(a.code,{children:"depth"})," value), the amount of data which can be stored becomes increasingly more predictable. For example, at ",(0,l.jsx)(a.code,{children:"depth"})," 22 a batch can store between 2.28 GB (encrypted, paranoid erasure coding) and 17.18 GB (theoretical max), while at ",(0,l.jsx)(a.code,{children:"depth"})," 28, a batch can store between 292.67 GB and 1.1 TB of data, and at higher depths the difference between the minimum and maximum storage volumes approach the same value. The effective volume also depends on the encryption and erasure coding settings used. See the ",(0,l.jsx)(a.a,{href:"/docs/concepts/incentives/postage-stamps#effective-utilisation-tables",children:"effective utilisation tables"})," for the full details."]}),(0,l.jsx)(a.p,{children:(0,l.jsxs)(a.strong,{children:["Storage duration and ",(0,l.jsx)(a.code,{children:"amount"}),":"]})}),(0,l.jsxs)(a.p,{children:["The duration of time for which a batch can store data is also non-deterministic since the price of storage is automatically adjusted over time by the ",(0,l.jsx)(a.a,{href:"/docs/concepts/incentives/price-oracle",children:"price oracle contract"}),". However, limits have been placed on how swiftly the price of storage can change, so there is no danger of a rapid change in price causing postage batches to unexpectedly expire due to a rapid increase in price. You can view a history of price changes by inspecting ",(0,l.jsx)("a",{href:`https://gnosisscan.io/address/${h.v.priceOracleContract}#events`,target:"_blank",children:"the events emitted by the oracle contract"}),", or also through the ",(0,l.jsx)(a.a,{href:"https://api.swarmscan.io/v1/events/storage-price-oracle/price-update",children:"Swarmscan API"}),". As you can see, if and when postage batch prices are updated, the updates are quite small. Still, since it is not entirely deterministic, it is important to monitor your stamp batch TTL (time to live) as it will change along with price oracle changes. You can inspect your batch's TTL using the ",(0,l.jsx)(a.code,{children:"/stamps"})," endpoint of the API:"]}),(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-bash",children:'root@noah-bee:~# curl -s localhost:1633/stamps | jq\n{\n "stamps": [\n {\n "batchID": "f56af59cc2c785a3b45bbf3e46c3c4b20f80379339ef337b5bbf45ebe5629a66",\n "utilization": 0,\n "usable": true,\n "label": "",\n "depth": 17,\n "amount": "432072000",\n "bucketDepth": 16,\n "blockNumber": 38498819,\n "immutableFlag": true,\n "exists": true,\n "batchTTL": 82943\n }\n ]\n}\n'})}),(0,l.jsxs)(a.p,{children:["Here we can see from the ",(0,l.jsx)(a.code,{children:"batchTTL"})," that ",(0,l.jsx)(a.code,{children:"82943"})," seconds remain, or approximately 23 hours."]})]}),"\n",(0,l.jsxs)(a.p,{children:["For a deeper understanding of how ",(0,l.jsx)(a.code,{children:"depth"})," and ",(0,l.jsx)(a.code,{children:"amount"})," parameters determine the data volume and storage duration of a postage batch, see the ",(0,l.jsx)(a.a,{href:"/docs/concepts/incentives/postage-stamps",children:"postage stamp page"}),"."]}),"\n",(0,l.jsx)(a.h2,{id:"fund-your-nodes-wallet",children:"Fund your node's wallet."}),"\n",(0,l.jsx)(a.p,{children:"In order to purchase a postage stamp batch, your node's Gnosis Chain address needs to be funded with sufficient xDAI to pay gas for transaction fees on Gnosis Chain as well as sufficient xBZZ to pay for the cost of the postage stamp batch itself."}),"\n",(0,l.jsxs)(a.p,{children:["xBZZ can be obtained from a variety of different centralized and decentralized exchanges. You can find more information on ",(0,l.jsx)(a.a,{href:"https://www.ethswarm.org/get-bzz#how-to-get-bzz",children:"where to obtain xBZZ"})," on the Ethswarm homepage."]}),"\n",(0,l.jsxs)(a.p,{children:["xDAI can be obtained from a wide range of centralized and decentralized exchanges. See ",(0,l.jsx)(a.a,{href:"https://docs.gnosischain.com/about/tokens/xdai",children:"this list of exchanges"})," from the Gnosis Chain documentation to get started."]}),"\n",(0,l.jsxs)(a.p,{children:["You can learn more details from the ",(0,l.jsx)(a.a,{href:"/docs/bee/installation/fund-your-node",children:"Fund Your Node"})," section."]}),"\n",(0,l.jsx)(a.h2,{id:"buying-a-stamp-batch",children:"Buying a stamp batch"}),"\n",(0,l.jsxs)(a.p,{children:["When interacting with the Bee API directly, ",(0,l.jsx)(a.code,{children:"amount"})," and ",(0,l.jsx)(a.code,{children:"depth"})," are passed as path parameters:"]}),"\n",(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-bash",children:"curl -s -X POST http://localhost:1633/stamps//\n"})}),"\n",(0,l.jsx)(a.p,{children:"And with Swarm CLI, they are set using option flags:"}),"\n",(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-bash",children:"swarm-cli stamp buy --depth --amount \n"})}),"\n",(0,l.jsxs)(c.A,{defaultValue:"api",values:[{label:"API",value:"api"},{label:"Swarm CLI",value:"swarm-cli"}],children:[(0,l.jsxs)(d.A,{value:"api",children:[(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-bash",children:"curl -s -X POST http://localhost:1633/stamps/100000000/20\n"})}),(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-bash",children:'{\n "batchID": "8fcec40c65841e0c3c56679315a29a6495d32b9ed506f2757e03cdd778552c6b",\n "txHash": "0x51c77ac171efd930eca8f3a77e3fcd5aca0a7353b84d5562f8e9c13f5907b675"\n}\n'})})]}),(0,l.jsxs)(d.A,{value:"swarm-cli",children:[(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-bash",children:"swarm-cli stamp buy --depth 20 --amount 100000000\n"})}),(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-bash",children:"Estimated cost: 0.010 BZZ\nEstimated capacity: 4.00 GB\nEstimated TTL: 5 hours 47 minutes 13 seconds\nType: Mutable\nWhen a mutable stamp reaches full capacity, it still permits new content uploads. However, this comes with the caveat of overwriting previously uploaded content associated with the same stamp.\n? Confirm the purchase Yes\nStamp ID: f4b9830676f4eeed4982c051934e64113dc348d7f5d2ab4398d371be0fbcdbf5\n"})})]})]}),"\n",(0,l.jsx)(a.admonition,{type:"info",children:(0,l.jsx)(a.p,{children:"Once your batch has been purchased, it will take a few minutes for other Bee nodes in the Swarm to catch up and register your batch. Allow some time for your batch to propagate in the network before proceeding to the next step."})}),"\n",(0,l.jsx)(a.h2,{id:"setting-stamp-batch-parameters-and-options",children:"Setting stamp batch parameters and options"}),"\n",(0,l.jsxs)(a.p,{children:["When purchasing a batch of stamps there are several parameters and options which must be considered. The ",(0,l.jsx)(a.code,{children:"depth"})," parameter will control how many chunks can be uploaded with a batch of stamps. The ",(0,l.jsx)(a.code,{children:"amount"})," parameter determines how much xBZZ will be allocated per chunk, and therefore also controls how long the chunks will be stored. While the ",(0,l.jsx)(a.code,{children:"immutable"})," header option sets the batch as either mutable or immutable, which can significantly alter the behavior of the batch utilisation (more details below)."]}),"\n",(0,l.jsxs)(a.h3,{id:"choosing-depth",children:["Choosing ",(0,l.jsx)(a.em,{children:"depth"})]}),"\n",(0,l.jsx)(a.admonition,{type:"caution",children:(0,l.jsxs)(a.p,{children:["The minimum value for ",(0,l.jsx)(a.code,{children:"depth"})," is 17, however a higher depth value is recommended for most use cases due to the ",(0,l.jsx)(a.a,{href:"/docs/concepts/incentives/postage-stamps#batch-utilisation",children:"mechanics of stamp batch utilisation"}),". See ",(0,l.jsx)(a.a,{href:"/docs/concepts/incentives/postage-stamps#effective-utilisation-tables",children:"the depths utilisation table"})," to help decide which depth is best for your use case."]})}),"\n",(0,l.jsx)(a.p,{children:"One notable aspect of batch utilisation is that the entire batch is considered fully utilised as soon as any one of its buckets are filled. This means that the actual amount of chunks storable by a batch is less than the nominal maximum amount."}),"\n",(0,l.jsxs)(a.p,{children:["See the ",(0,l.jsx)(a.a,{href:"/docs/concepts/incentives/postage-stamps",children:"postage stamp page"})," for a more complete explanation of how batch utilisation works and a ",(0,l.jsx)(a.a,{href:"/docs/concepts/incentives/postage-stamps#effective-utilisation-tables",children:"table"})," with the specific amounts of data which can be safely uploaded for each ",(0,l.jsx)(a.code,{children:"depth"})," value."]}),"\n",(0,l.jsxs)(a.h3,{id:"choosing-amount",children:["Choosing ",(0,l.jsx)(a.em,{children:"amount"})]}),"\n",(0,l.jsx)(a.admonition,{type:"caution",children:(0,l.jsxs)(a.p,{children:["The minimum ",(0,l.jsx)(a.code,{children:"amount"})," value for purchasing stamps is required to be at least enough to pay for 24 hours of storage. To find this value multiply the lastPrice value from the postage stamp contract times 17280 (the number of blocks in 24 hours). You can also use the ",(0,l.jsx)(a.a,{href:"#calculators",children:"calculator"})," below. This requirement is in place in order to prevent spamming the network."]})}),"\n",(0,l.jsxs)(a.p,{children:["The ",(0,l.jsx)(a.code,{children:"amount"})," parameter determines how much xBZZ is assigned per chunk for a postage stamp batch. You can use the calculators below to find the appropriate ",(0,l.jsx)(a.code,{children:"amount"})," value for your target duration of storage and can also preview the price. For more information see the ",(0,l.jsx)(a.a,{href:"/docs/concepts/incentives/postage-stamps#batch-depth-and-batch-amount",children:"postage stamp"})," page where a more complete description is included."]}),"\n",(0,l.jsx)(a.h3,{id:"mutable-or-immutable",children:"Mutable or Immutable?"}),"\n",(0,l.jsxs)(a.p,{children:["Depending on the use case, uploaders may desire to use mutable or immutable batches. The fundamental difference between immutable and mutable batches is that immutable batches become unusable once their capacity is filled, while for mutable batches, once their capacity is filled, they may continue to be used, however older chunks of data will be overwritten with the newer once over capacity. The default batch type is immutable. In order to set the batch type to mutable, the ",(0,l.jsx)(a.code,{children:"immutable"})," header should be set to ",(0,l.jsx)(a.code,{children:"false"}),". See ",(0,l.jsx)(a.a,{href:"/docs/concepts/incentives/postage-stamps#which-type-of-batch-to-use",children:"this section on postage stamp batch utilisation"})," to learn more about mutable vs immutable batches, and about which type may be right for your use case."]}),"\n",(0,l.jsx)(a.h2,{id:"calculators",children:"Calculators"}),"\n",(0,l.jsx)(a.p,{children:"The following postage batch calculators allow you to conveniently find the depth and amount values for a given storage duration and storage volume, or to find the storage duration and storage volume for a given depth and amount. The results will display the cost in xBZZ for the postage batch. The current pricing information is sourced from the Swarmscan API and will vary over time."}),"\n",(0,l.jsx)(a.admonition,{type:"info",children:(0,l.jsxs)(a.p,{children:["The 'effective volume' is the volume of data that can be safely stored for each batch depth, with a failure rate of less than 0.1%. The 'theoretical max volume' is significantly higher than the effective volume at lower depths, and the two values trend towards the same value at higher depths. Effective volumes are available for all depths from 17 to 41, and depend on the encryption and erasure coding settings selected. For example, at depth 17, the effective volume ranges from 13.17 kB (encrypted, paranoid) to 44.70 kB (unencrypted, no erasure coding). ",(0,l.jsx)(a.a,{href:"/docs/concepts/incentives/postage-stamps#effective-utilisation-tables",children:"Learn more here"}),"."]})}),"\n",(0,l.jsx)(a.h3,{id:"depth--amount-to-time--volume-calculator",children:"Depth & Amount to Time & Volume Calculator"}),"\n",(0,l.jsx)(o,{}),"\n",(0,l.jsx)(a.h3,{id:"time--volume-to-depth--amount-calculator",children:"Time & Volume to Depth & Amount Calculator"}),"\n",(0,l.jsxs)(a.p,{children:["The recommended depth in this calculator's results is the lowest depth value whose ",(0,l.jsx)(a.a,{href:"/docs/concepts/incentives/postage-stamps#effective-utilisation-tables",children:"effective volume"})," is greater than the entered volume."]}),"\n",(0,l.jsx)(r,{}),"\n",(0,l.jsx)(a.h2,{id:"viewing-stamps",children:"Viewing Stamps"}),"\n",(0,l.jsx)(a.p,{children:"To check on your stamps, send a GET request to the stamp endpoint."}),"\n",(0,l.jsxs)(c.A,{defaultValue:"api",values:[{label:"API",value:"api"},{label:"Swarm CLI",value:"swarm-cli"}],children:[(0,l.jsxs)(d.A,{value:"api",children:[(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-bash",children:"curl http://localhost:1633/stamps\n"})}),(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-bash",children:'{\n "stamps": [\n {\n "batchID": "f4b9830676f4eeed4982c051934e64113dc348d7f5d2ab4398d371be0fbcdbf5",\n "utilization": 0,\n "usable": true,\n "label": "",\n "depth": 20,\n "amount": "100000000",\n "bucketDepth": 16,\n "blockNumber": 30643611,\n "immutableFlag": true,\n "exists": true,\n "batchTTL": 20588,\n "expired": false\n }\n ]\n}\n'})})]}),(0,l.jsxs)(d.A,{value:"swarm-cli",children:[(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-bash",children:"swarm-cli stamp list\n"})}),(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-bash",children:"Stamp ID: f4b9830676f4eeed4982c051934e64113dc348d7f5d2ab4398d371be0fbcdbf5\nUsage: 0%\nRemaining Capacity: 4.00 GB\nTTL: 5 hours 42 minutes 18 seconds\nExpires: 2023-10-26\n\n"})})]})]}),"\n",(0,l.jsx)(a.admonition,{type:"info",children:(0,l.jsx)(a.p,{children:"It is not possible to reupload unencrypted content which was stamped using an expired postage stamp."})}),"\n",(0,l.jsx)(a.h2,{id:"checking-the-remaining-ttl-time-to-live-of-your-batch",children:"Checking the remaining TTL (time to live) of your batch"}),"\n",(0,l.jsx)(a.admonition,{type:"info",children:(0,l.jsx)(a.p,{children:"At present, TTL is a primitive calculation based on the current storage price and the assumption that storage price will remain static in the future. As more data is uploaded into Swarm, the price of storage will begin to increase. For data that it is important to keep alive, make sure your batches have plenty of time to live!"})}),"\n",(0,l.jsxs)(a.p,{children:["In order to make sure your ",(0,l.jsx)(a.em,{children:"batch"})," has sufficient ",(0,l.jsx)(a.em,{children:"remaining balance"})," to be stored and served by nodes in its ",(0,l.jsx)(a.a,{href:"/docs/references/glossary#2-area-of-responsibility-related-depths",children:(0,l.jsx)(a.em,{children:"area of responsibility"})}),", you must regularly check on its ",(0,l.jsx)(a.em,{children:"time to live"})," and act accordingly. The ",(0,l.jsx)(a.em,{children:"time to live"})," is the number of seconds before the chunks will be considered for garbage collection by nodes in the network."]}),"\n",(0,l.jsxs)(a.p,{children:["The remaining ",(0,l.jsx)(a.em,{children:"time to live"})," in seconds is shown in the API in the returned json object as the value for ",(0,l.jsx)(a.code,{children:"batchTTL"}),", and with Swarm CLI you will see the formatted TTL as the ",(0,l.jsx)(a.code,{children:"TTL"})," value."]}),"\n",(0,l.jsxs)(c.A,{defaultValue:"api",values:[{label:"API",value:"api"},{label:"Swarm CLI",value:"swarm-cli"}],children:[(0,l.jsxs)(d.A,{value:"api",children:[(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-bash",children:"curl http://localhost:1633/stamps\n"})}),(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-bash",children:'{\n "stamps": [\n {\n "batchID": "f4b9830676f4eeed4982c051934e64113dc348d7f5d2ab4398d371be0fbcdbf5",\n "utilization": 0,\n "usable": true,\n "label": "",\n "depth": 20,\n "amount": "100000000",\n "bucketDepth": 16,\n "blockNumber": 30643611,\n "immutableFlag": true,\n "exists": true,\n "batchTTL": 20588,\n "expired": false\n }\n ]\n}\n'})})]}),(0,l.jsxs)(d.A,{value:"swarm-cli",children:[(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-bash",children:"swarm-cli stamp list\n"})}),(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-bash",children:"Stamp ID: f4b9830676f4eeed4982c051934e64113dc348d7f5d2ab4398d371be0fbcdbf5\nUsage: 0%\nRemaining Capacity: 4.00 GB\nTTL: 5 hours 42 minutes 18 seconds\nExpires: 2023-10-26\n\n"})})]})]}),"\n",(0,l.jsx)(a.h2,{id:"top-up-your-batch",children:"Top up your batch"}),"\n",(0,l.jsx)(a.admonition,{type:"danger",children:(0,l.jsx)(a.p,{children:"Don't let your batch run out! If it does, you will need to restamp and resync your content."})}),"\n",(0,l.jsx)(a.p,{children:"If your batch is starting to run out, or you would like to extend the life of your batch to protect against storage price rises, you can increase the batch TTL by topping up your batch using the stamps endpoint, passing in the relevant batchID into the HTTP PATCH request."}),"\n",(0,l.jsxs)(c.A,{defaultValue:"api",values:[{label:"API",value:"api"},{label:"Swarm CLI",value:"swarm-cli"}],children:[(0,l.jsx)(d.A,{value:"api",children:(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-bash",children:'curl -X PATCH "http://localhost:1633/stamps/topup/6d32e6f1b724f8658830e51f8f57aa6029f82ee7a30e4fc0c1bfe23ab5632b27/10000000"\n'})})}),(0,l.jsxs)(d.A,{value:"swarm-cli",children:[(0,l.jsx)(a.p,{children:"List available stamps."}),(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-bash",children:"swarm-cli stamp list\n"})}),(0,l.jsx)(a.p,{children:"Copy stamp ID."}),(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-bash",children:"Stamp ID: daa8c5b36e1cf481b10118a8b02430a6f22618deaa6ba5aa4ea660de66aa62db\nUsage: 13%\nRemaining Capacity: 3.50 GB\nTTL: 183 days 1 hour 37 minutes 8 seconds\nExpires: 2024-05-02\n"})}),(0,l.jsxs)(a.p,{children:["Use ",(0,l.jsx)(a.code,{children:"swarm-cli stamp topup"})," with the ",(0,l.jsx)(a.code,{children:"--amount"})," and ",(0,l.jsx)(a.code,{children:"--stamp"})," parameters set with the amount to topup in PLUR and the stamp ID."]}),(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-bash",children:"swarm-cli stamp topup --amount 10000000 --stamp daa8c5b36e1cf481b10118a8b02430a6f22618deaa6ba5aa\n4ea660de66aa62db\n"})}),(0,l.jsx)(a.p,{children:"Wait for topup transaction to complete."}),(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-bash",children:"\u2b21 \u2b21 \u2b22 Topup in progress. This may take a while.\nStamp ID: daa8c5b36e1cf481b10118a8b02430a6f22618deaa6ba5aa4ea660de66aa62db\nDepth: 20\nAmount: 100000001000\n"})})]})]}),"\n",(0,l.jsx)(a.h2,{id:"dilute-your-batch",children:"Dilute your batch"}),"\n",(0,l.jsx)(a.p,{children:'In order to store more data with a batch of stamps, you must "dilute" the batch. Dilution simply refers to increasing the depth of the batch, thereby allowing it to store a greater number of chunks. As dilution only increases the the depth of a batch and does not automatically top up the batch with more xBZZ, dilution will decrease the TTL of the batch. Therefore if you wish to store more with your batch but don\'t want to decrease its TTL, you will need to both dilute and top up your batch with more xBZZ.'}),"\n",(0,l.jsxs)(c.A,{defaultValue:"api",values:[{label:"API",value:"api"},{label:"Swarm CLI",value:"swarm-cli"}],children:[(0,l.jsxs)(d.A,{value:"api",children:[(0,l.jsxs)(a.p,{children:["Here we call the ",(0,l.jsx)(a.code,{children:"/stamps"})," endpoint and find a batch with ",(0,l.jsx)(a.code,{children:"depth"})," 24 and a ",(0,l.jsx)(a.code,{children:"batchTTL"})," of 2083223 which we wish to dilute:"]}),(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-bash",children:"curl http://localhost:1633/stamps\n"})}),(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-json",children:'{\n "stamps": [\n {\n "batchID": "0e4dd16cc435730a25ba662eb3da46e28d260c61c31713b6f4abf8f8c2548ae5",\n "utilization": 0,\n "usable": true,\n "label": "",\n "depth": 24,\n "amount": "10000000000",\n "bucketDepth": 16,\n "blockNumber": 29717348,\n "immutableFlag": false,\n "exists": true,\n "batchTTL": 2083223,\n "expired": false\n }\n ]\n}\n'})}),(0,l.jsxs)(a.p,{children:["Next we call the ",(0,l.jsx)(a.a,{href:"/api/#tag/Postage-Stamps/paths/~1stamps~1dilute~1%7Bbatch_id%7D~1%7Bdepth%7D/patch",children:(0,l.jsx)(a.code,{children:"dilute"})})," endpoint to increase the ",(0,l.jsx)(a.code,{children:"depth"})," of the batch using the ",(0,l.jsx)(a.code,{children:"batchID"})," and our new ",(0,l.jsx)(a.code,{children:"depth"})," of 26:"]}),(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-bash",children:"curl -s -XPATCH http://localhost:1633/stamps/dilute/0e4dd16cc435730a25ba662eb3da46e28d260c61c31713b6f4abf8f8c2548ae5/26\n"})}),(0,l.jsxs)(a.p,{children:["And a ",(0,l.jsx)(a.code,{children:"txHash"})," of our successful transaction:"]}),(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-bash",children:'{\n "batchID": "0e4dd16cc435730a25ba662eb3da46e28d260c61c31713b6f4abf8f8c2548ae5",\n "txHash": "0x298e80358b3257292752edb2535a1cd84440c074451b61f78fab349aea4962b7"\n}\n'})}),(0,l.jsxs)(a.p,{children:["And finally we use the ",(0,l.jsx)(a.code,{children:"/stamps"})," endpoint again to confirm the new ",(0,l.jsx)(a.code,{children:"depth"})," and decreased ",(0,l.jsx)(a.code,{children:"batchTTL"}),":"]}),(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-bash",children:"curl http://localhost:1633/stamps\n"})}),(0,l.jsxs)(a.p,{children:["We can see the new ",(0,l.jsx)(a.code,{children:"depth"})," of 26 and a decreased ",(0,l.jsx)(a.code,{children:"batchTTL"})," of 519265."]}),(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-json",children:'{\n "stamps": [\n {\n "batchID": "0e4dd16cc435730a25ba662eb3da46e28d260c61c31713b6f4abf8f8c2548ae5",\n "utilization": 0,\n "usable": true,\n "label": "",\n "depth": 26,\n "amount": "10000000000",\n "bucketDepth": 16,\n "blockNumber": 29717348,\n "immutableFlag": false,\n "exists": true,\n "batchTTL": 519265,\n "expired": false\n }\n ]\n}\n'})})]}),(0,l.jsxs)(d.A,{value:"swarm-cli",children:[(0,l.jsxs)(a.p,{children:["List available stamps, make sure to use the ",(0,l.jsx)(a.code,{children:"--verbose"})," flag so that we can see the batch depth."]}),(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-bash",children:"swarm-cli stamp list --verbose\n"})}),(0,l.jsx)(a.p,{children:"We have a stamp batch with depth 20 we want to dilute. Copy stamp ID of that batch."}),(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-bash",children:"Listing postage stamps...\nStamp ID: daa8c5b36e1cf481b10118a8b02430a6f22618deaa6ba5aa4ea660de66aa62db\nUsage: 13%\nRemaining Capacity: 3.50 GB\nTotal Capacity (mutable): 4.00 GB\nTTL: 182 days 4 hours 39 minutes 47 seconds\nExpires: 2024-05-02\nDepth: 20\nBucket Depth: 16\nAmount: 100010002000\nUsable: true\nUtilization: 2\nBlock Number: 29734329\n"})}),(0,l.jsxs)(a.p,{children:["Use ",(0,l.jsx)(a.code,{children:"swarm-cli stamp dilute"})," with the ",(0,l.jsx)(a.code,{children:"--depth"})," and ",(0,l.jsx)(a.code,{children:"--stamp"})," parameters set with the desired new depth and the stamp ID."]}),(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-bash",children:"swarm-cli stamp dilute --depth 21 --stamp daa8c5b36e1cf481b10118a8b02430a6f22618deaa6ba5aa4ea660de66aa62db\n"})}),(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-bash",children:"\u2b21 \u2b21 \u2b22 Dilute in progress. This may take a while.\nStamp ID: daa8c5b36e1cf481b10118a8b02430a6f22618deaa6ba5aa4ea660de66aa62db\nDepth: 20\nAmount: 100010002000\n"})})]})]}),"\n",(0,l.jsx)(a.h2,{id:"stewardship",children:"Stewardship"}),"\n",(0,l.jsxs)(a.p,{children:["The ",(0,l.jsx)("a",{href:"/api/#tag/Stewardship",target:"_blank",children:"stewardship endpoint"})," in combination with ",(0,l.jsx)(a.a,{href:"/docs/develop/tools-and-features/pinning",children:"pinning"})," can be used to guarantee that important content is always available. It is used for checking whether the content for a Swarm reference is retrievable and for re-uploading the content if it is not."]}),"\n",(0,l.jsxs)(a.p,{children:["An HTTP GET request to the ",(0,l.jsx)(a.code,{children:"stewardship"})," endpoint checks to see whether the content for the specified Swarm reference is retrievable:"]}),"\n",(0,l.jsx)(a.admonition,{type:"info",children:(0,l.jsxs)(a.p,{children:[(0,l.jsx)(a.code,{children:"stewardship"})," is not currently supported by Swarm CLI"]})}),"\n",(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-bash",children:'curl "http://localhost:1633/stewardship/c0c2b70b01db8cdfaf114cde176a1e30972b556c7e72d5403bea32e\nc0207136f"\n'})}),"\n",(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-json",children:'{\n "isRetrievable": true\n}\n'})}),"\n",(0,l.jsx)(a.p,{children:"If the content is not retrievable, an HTTP PUT request can be used to re-upload the content:"}),"\n",(0,l.jsx)(a.pre,{children:(0,l.jsx)(a.code,{className:"language-bash",children:'curl -X PUT "http://localhost:1633/stewardship/c0c2b70b01db8cdfaf114cde176a1e30972b556c7e72d5403bea32ec0207136f"\n'})}),"\n",(0,l.jsx)(a.p,{children:"Note that for the re-upload to succeed, the associated content must be available locally, either pinned or cached. Since it isn't easy to predict if the content will be cached, for important content pinning is recommended."})]})}function x(e={}){const{wrapper:a}={...(0,s.R)(),...e.components};return a?(0,l.jsx)(a,{...e,children:(0,l.jsx)(g,{...e})}):g(e)}},19365(e,a,t){t.d(a,{A:()=>r});t(96540);var n=t(34164),l=t(47751);const s="tabItem_Ymn6";var i=t(74848);function o(e){let a=e.children,t=e.className,l=e.hidden;return(0,i.jsx)("div",{role:"tabpanel",className:(0,n.A)(s,t),hidden:l,children:a})}function r(e){let a=e.children,t=e.className,n=e.value;const s=(0,l.uc)(),r=s.selectedValue,c=s.lazy,d=n===r;return!d&&c?null:(0,i.jsx)(o,{className:t,hidden:!d,children:a})}},4865(e,a,t){t.d(a,{A:()=>p});t(96540);var n=t(34164),l=t(17559),s=t(47751),i=t(23104),o=t(92303);const r="tabList__CuJ",c="tabItem_LNqP";var d=t(74848);function h(e){let a=e.className;const t=(0,s.uc)(),l=t.selectedValue,o=t.selectValue,r=t.tabValues,h=t.block,u=[],b=(0,i.a_)().blockElementScrollPositionUntilNextRender,p=e=>{const a=e.currentTarget,t=u.indexOf(a),n=r[t].value;n!==l&&(b(a),o(n))},m=e=>{var a;let t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{var n;const a=u.indexOf(e.currentTarget)+1;t=null!=(n=u[a])?n:u[0];break}case"ArrowLeft":{var l;const a=u.indexOf(e.currentTarget)-1;t=null!=(l=u[a])?l:u[u.length-1];break}}null==(a=t)||a.focus()};return(0,d.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,n.A)("tabs",{"tabs--block":h},a),children:r.map(e=>{let a=e.value,t=e.label,s=e.attributes;return(0,d.jsx)("li",Object.assign({role:"tab",tabIndex:l===a?0:-1,"aria-selected":l===a,ref:e=>{u.push(e)},onKeyDown:m,onClick:p},s,{className:(0,n.A)("tabs__item",c,null==s?void 0:s.className,{"tabs__item--active":l===a}),children:null!=t?t:a}),a)})})}function u(e){let a=e.children;return(0,d.jsx)("div",{className:"margin-top--md",children:a})}function b(e){let a=e.className,t=e.children;return(0,d.jsxs)("div",{className:(0,n.A)(l.G.tabs.container,"tabs-container",r),children:[(0,d.jsx)(h,{className:a}),(0,d.jsx)(u,{children:t})]})}function p(e){const a=(0,o.A)(),t=(0,s.OC)(e);return(0,d.jsx)(s.O_,{value:t,children:(0,d.jsx)(b,{className:e.className,children:(0,s.vT)(e.children)})},String(a))}},47751(e,a,t){t.d(a,{OC:()=>p,O_:()=>x,uc:()=>g,vT:()=>d});var n=t(96540),l=t(56347),s=t(205),i=t(57485),o=t(70679),r=t(31682),c=t(74848);function d(e){return n.Children.toArray(e).filter(e=>"\n"!==e)}function h(e){const a=e.values,t=e.children;return(0,n.useMemo)(()=>{const e=null!=a?a:function(e){return n.Children.toArray(e).flatMap(e=>{if(!e)return[];if((0,n.isValidElement)(e)&&function(e){const a=e.props;return!!a&&"object"==typeof a&&"value"in a}(e))return[e];const a="string"==typeof e.type?e.type:e.type.name;throw new Error("Docusaurus error: Bad child <"+a+'>: all children of the component should be , and every should have a unique "value" prop.\nIf you do not want to pass on a "value" prop to the direct children of , you can also pass an explicit prop.')}).map(e=>{let a=e.props;return{value:a.value,label:a.label,attributes:a.attributes,default:a.default}})}(t);return function(e){const a=(0,r.XI)(e,(e,a)=>e.value===a.value);if(a.length>0)throw new Error('Docusaurus error: Duplicate values "'+a.map(e=>"'"+e.value+"'").join(", ")+'" found in . Every value needs to be unique.')}(e),e},[a,t])}function u(e){let a=e.value;return e.tabValues.some(e=>e.value===a)}function b(e){let a=e.queryString,t=void 0!==a&&a,s=e.groupId;const o=(0,l.W6)(),r=function(e){let a=e.queryString,t=void 0!==a&&a,n=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=n?n:null}({queryString:t,groupId:s});return[(0,i.aZ)(r),(0,n.useCallback)(e=>{if(!r)return;const a=new URLSearchParams(o.location.search);a.set(r,e),o.replace(Object.assign({},o.location,{search:a.toString()}))},[r,o])]}function p(e){var a,t;const l=e.defaultValue,i=e.queryString,r=void 0!==i&&i,c=e.groupId,d=h(e),p=(0,n.useState)(()=>function(e){var a;let t=e.defaultValue,n=e.tabValues;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!u({value:t,tabValues:n}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+n.map(e=>e.value).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}const l=null!=(a=n.find(e=>e.default))?a:n[0];if(!l)throw new Error("Unexpected error: 0 tabValues");return l.value}({defaultValue:l,tabValues:d})),m=p[0],g=p[1],x=b({queryString:r,groupId:c}),f=x[0],B=x[1],j=function(e){const a=function(e){return e?"docusaurus.tab."+e:null}(e.groupId),t=(0,o.Dv)(a),l=t[0],s=t[1];return[l,(0,n.useCallback)(e=>{a&&s.set(e)},[a,s])]}({groupId:c}),v=j[0],y=j[1],T=(()=>{const e=null!=f?f:v;return u({value:e,tabValues:d})?e:null})();(0,s.A)(()=>{T&&g(T)},[T]);return{selectedValue:m,selectValue:(0,n.useCallback)(e=>{if(!u({value:e,tabValues:d}))throw new Error("Can't select invalid tab value="+e);g(e),B(e),y(e)},[B,y,d]),tabValues:d,lazy:null!=(a=e.lazy)&&a,block:null!=(t=e.block)&&t}}const m=(0,n.createContext)(null);function g(){const e=n.useContext(m);if(!e)throw new Error("useTabsContext() must be used within a Tabs component");return e}function x(e){return(0,c.jsx)(m.Provider,{value:e.value,children:e.children})}},47650(e,a,t){t.d(a,{v:()=>n});const n={postageStampContract:"0x45a1502382541Cd610CC9068e88727426b696293",stakingContract:"0xda2a16EE889E7F04980A8d597b48c8D51B9518F4",redistributionContract:"0x5069cdfB3D9E56d23B1cAeE83CE6109A7E4fd62d",priceOracleContract:"0x47EeF336e7fE5bED98499A4696bce8f28c1B0a8b"}},28453(e,a,t){t.d(a,{R:()=>i,x:()=>o});var n=t(96540);const l={},s=n.createContext(l);function i(e){const a=n.useContext(s);return n.useMemo(function(){return"function"==typeof e?e(a):{...a,...e}},[a,e])}function o(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:i(e.components),n.createElement(s.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9590.753e6b67.js b/assets/js/9590.753e6b67.js new file mode 100644 index 000000000..8ca5b1109 --- /dev/null +++ b/assets/js/9590.753e6b67.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[9590],{59590(e,s,c){c.d(s,{createPieServices:()=>a.f});var a=c(26041);c(4954)}}]); \ No newline at end of file diff --git a/assets/js/9594edf7.7bdce76a.js b/assets/js/9594edf7.7bdce76a.js new file mode 100644 index 000000000..1f32d6208 --- /dev/null +++ b/assets/js/9594edf7.7bdce76a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[2396],{14379(e,n,s){s.r(n),s.d(n,{assets:()=>i,contentTitle:()=>r,default:()=>l,frontMatter:()=>c,metadata:()=>a,toc:()=>h});const a=JSON.parse('{"id":"bee/working-with-bee/cashing-out","title":"Cashing Out","description":"Explains how to withdraw earned xBZZ rewards and manage cheques through the bandwidth incentives SWAP system.","source":"@site/docs/bee/working-with-bee/cashing-out.md","sourceDirName":"bee/working-with-bee","slug":"/bee/working-with-bee/cashing-out","permalink":"/docs/bee/working-with-bee/cashing-out","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/bee/working-with-bee/cashing-out.md","tags":[],"version":"current","frontMatter":{"title":"Cashing Out","id":"cashing-out","description":"Explains how to withdraw earned xBZZ rewards and manage cheques through the bandwidth incentives SWAP system."},"sidebar":"bee","previous":{"title":"Staking","permalink":"/docs/bee/working-with-bee/staking"},"next":{"title":"Monitoring Your Node","permalink":"/docs/bee/working-with-bee/monitoring"}}');var t=s(74848),o=s(28453);const c={title:"Cashing Out",id:"cashing-out",description:"Explains how to withdraw earned xBZZ rewards and manage cheques through the bandwidth incentives SWAP system."},r=void 0,i={},h=[{value:"Withdrawing xBZZ Rewards and Native xDAI",id:"withdrawing-xbzz-rewards-and-native-xdai",level:2},{value:"Cashing out Cheques (SWAP)",id:"cashing-out-cheques-swap",level:2},{value:"Managing uncashed cheques",id:"managing-uncashed-cheques",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"There are two different types of cashing out. The first type is cashing out xBZZ rewards earned from staking and providing storage services (this method also allows for withdrawal of the native xDAI token). The second type is for the withdrawal of xBZZ earned through bandwidth incentives (SWAP). Both types are explained below:"}),"\n",(0,t.jsx)(n.h2,{id:"withdrawing-xbzz-rewards-and-native-xdai",children:"Withdrawing xBZZ Rewards and Native xDAI"}),"\n",(0,t.jsxs)(n.p,{children:["You can withdraw xBZZ rewards or native xDAI tokens using the ",(0,t.jsx)(n.code,{children:"/wallet/withdraw/"})," endpoint. The endpoint allows you to withdraw tokens to any address which you have whitelisted using the ",(0,t.jsx)(n.code,{children:"withdrawal-addresses-whitelist"})," option."]}),"\n",(0,t.jsx)(n.p,{children:"You can specify either a single address:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:"# withdrawal target addresses\nwithdrawal-addresses-whitelist: 0x62d04588e282849d391ebff1b9884cb921b9b94a\n"})}),"\n",(0,t.jsx)(n.p,{children:"Or an array of addresses:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:"# withdrawal target addresses\nwithdrawal-addresses-whitelist: [ 0x62d04588e282849d391ebff1b9884cb921b9b94a, 0x71a5aae026e2ab87612a5824d492a095e7d790bf ]\n"})}),"\n",(0,t.jsx)(n.p,{children:"The token you desire to withdraw is specified in the path directly:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"http://localhost:1633/wallet/withdraw/{coin}\n"})}),"\n",(0,t.jsxs)(n.p,{children:["For ",(0,t.jsx)(n.code,{children:"coin"}),", you can use the value ",(0,t.jsx)(n.code,{children:"NativeToken"})," for xDAI or ",(0,t.jsx)(n.code,{children:"BZZ"})," for xBZZ."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"amount"})," query parameter is used to specify how much of the token you wish to withdraw. The value should be specified in the lowest denomination for each token (wei for xDAI and PLUR for xBZZ)."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"address"})," query parameter is used to specify the target address to withdraw to. This address must be specified using the ",(0,t.jsx)(n.code,{children:"withdrawal-addresses-whitelist"})," option in your configuration."]}),"\n",(0,t.jsx)(n.p,{children:"The following command will withdraw a single PLUR of xBZZ to address 0x62d04588e282849d391ebff1b9884cb921b9b94a:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'curl -X POST "http://localhost:1633/wallet/withdraw/bzz?amount=1&address=0x62d04588e282849d391ebff1b9884cb921b9b94a"\n'})}),"\n",(0,t.jsx)(n.h2,{id:"cashing-out-cheques-swap",children:"Cashing out Cheques (SWAP)"}),"\n",(0,t.jsxs)(n.p,{children:["As your Bee forwards and serves chunks to its peers, it is rewarded in\nxBZZ in the form of cheques. Once these cheques accumulate sufficient\nvalue, you may ",(0,t.jsx)(n.em,{children:"cash them out"})," using Bee's API. This process transfers\nmoney from your peer's chequebooks into your own, which you can then\nwithdraw to your wallet to do with as you please!"]}),"\n",(0,t.jsx)(n.admonition,{type:"important",children:(0,t.jsxs)(n.p,{children:["Do ",(0,t.jsx)(n.strong,{children:"not"})," cash out your cheques too regularly! Once a week is more\nthan sufficient! Besides the transaction costs, this prevents and\nrelieves unnecessary congestion on the blockchain. \ud83d\udca9"]})}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["Learn more about how SWAP and other accounting protocols work by reading\n",(0,t.jsx)(n.a,{href:"https://www.ethswarm.org/the-book-of-swarm-2.pdf",children:"The Book of Swarm"}),"."]})}),"\n",(0,t.jsx)(n.p,{children:"Bee contains a rich set of features to enable you to query the current accounting state of your node. First, let's query our node's current balance by sending a POST request to the balances endpoint."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl localhost:1633/chequebook/balance | jq\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "totalBalance": "10000000",\n "availableBalance": "9640360"\n}\n'})}),"\n",(0,t.jsx)(n.p,{children:"It is also possible to examine your per-peer balances."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl localhost:1633/balances | jq\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "balances": [\n //...\n {\n "peer": "d0bf001e05014fa036af97f3d226bee253d2b147f540b6c2210947e5b7b409af",\n "balance": "-85420"\n },\n {\n "peer": "f1e2872581de18bdc68060dc8edd3aa96368eb341e915aba86b450486b105a47",\n "balance": "-75990"\n }\n //...\n ]\n}\n'})}),"\n",(0,t.jsx)(n.p,{children:"In Swarm, these per-peer balances represent trustful agreements between nodes. Tokens only actually change hands when a node settles a cheque. This can either be triggered manually or when a certain threshold is reached with a peer. In this case, a settlement takes place. You may view these using the settlements endpoint."}),"\n",(0,t.jsx)(n.p,{children:"More info can be found by using the chequebook API."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl localhost:1633/settlements| jq\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "totalreceived": "718030",\n "totalsent": "0",\n "settlements": [\n //...\n {\n "peer": "dce1833609db868e7611145b48224c061ea57fd14e784a278f2469f355292ca6",\n "received": "8987000000000",\n "sent": "0"\n }\n //...\n ]\n}\n'})}),"\n",(0,t.jsx)(n.p,{children:"More information about the current received or sent cheques can also be found using the chequebook api."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl localhost:1633/chequebook/cheque | jq\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "lastcheques": [\n {\n "peer": "dce1833609db868e7611145b48224c061ea57fd14e784a278f2469f355292ca6",\n "lastreceived": {\n "beneficiary": "0x21b26864067deb88e2d5cdca512167815f2910d3",\n "chequebook": "0x4A373Db93ba54cab999e2C757bF5ca0356B42a3f",\n "payout": "8987000000000"\n },\n "lastsent": null\n }\n //...\n ]\n}\n'})}),"\n",(0,t.jsxs)(n.p,{children:["As our node's participation in the network increases, we will begin to see more and more of these balances arriving. In the case that we have ",(0,t.jsx)(n.em,{children:"received"})," a settlement from another peer, we can ask our node to perform the relevant transactions on the blockchain, and cash our earnings out."]}),"\n",(0,t.jsxs)(n.p,{children:["To do this, we simply POST the relevant peer's address to the ",(0,t.jsx)(n.code,{children:"cashout"})," endpoint."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl -X POST http://localhost:1633/chequebook/cashout/d7881307e793e389642ea733451db368c4c9b9e23f188cca659c8674d183a56b\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "transactionHash": "0xba7b500e21fc0dc0d7163c13bb5fea235d4eb769d342e9c007f51ab8512a9a82"\n}\n'})}),"\n",(0,t.jsxs)(n.p,{children:["You may check the status of your transaction using the ",(0,t.jsx)(n.a,{href:"https://gnosis.blockscout.com/",children:"xDAI\nBlockscout"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"Finally, we can now see the status of the cashout transaction by sending a GET request to the same URL."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl http://localhost:1633/chequebook/cashout/d7881307e793e389642ea733451db368c4c9b9e23f188cca659c8674d183a56b | jq\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "peer": "d7881307e793e389642ea733451db368c4c9b9e23f188cca659c8674d183a56b",\n "chequebook": "0xae315a9adf0920ba4f3353e2f011031ca701d247",\n "cumulativePayout": "179160",\n "beneficiary": "0x21b26864067deb88e2d5cdca512167815f2910d3",\n "transactionHash": "0xba7b500e21fc0dc0d7163c13bb5fea235d4eb769d342e9c007f51ab8512a9a82",\n "result": {\n "recipient": "0x312fe7fde9e0768337c9b3e3462189ea6f9f9066",\n "lastPayout": "179160",\n "bounced": false\n }\n}\n'})}),"\n",(0,t.jsx)(n.p,{children:"Success, we earned our first xBZZ! \ud83d\udc1d"}),"\n",(0,t.jsx)(n.p,{children:"Now we have earned tokens, to withdraw our xBZZ from the chequebook contract back into our node's own wallet, we simply POST a request to the chequebook withdraw endpoint."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl -X POST http://localhost:1633/chequebook/withdraw\\?amount\\=1000 | jq\n"})}),"\n",(0,t.jsx)(n.p,{children:"And conversely, if we have used more services than we have provided, we may deposit extra xBZZ into the chequebook contract by sending a POST request to the deposit endpoint."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl -X POST http://localhost:1633/chequebook/deposit\\?amount\\=1000 | jq\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "transactionHash": "0xedc80ebc89e6d719e617a50c6900c3dd5dc2f283e1b8c447b9065d7c8280484a"\n}\n'})}),"\n",(0,t.jsxs)(n.p,{children:["You may then use ",(0,t.jsx)(n.a,{href:"https://gnosis.blockscout.com/",children:"Blockscout"})," to\ntrack your transaction and make sure it completed successfully."]}),"\n",(0,t.jsx)(n.h2,{id:"managing-uncashed-cheques",children:"Managing uncashed cheques"}),"\n",(0,t.jsx)(n.p,{children:"For the Bee process, the final step of earning xBZZ is cashing a\ncheque. It is worth noting that a cheque is not yet actual xBZZ. In\nBee, a cheque, just like a real cheque, is a promise to hand over\nmoney upon request. In real life, you would present the cheque to a\nbank. In swarm life, we present the cheque to a smart-contract."}),"\n",(0,t.jsx)(n.p,{children:"Holding on to a swap-cheque is risky; it is possible that the owner of\nthe chequebook has issued cheques worth more xBZZ than is contained in\ntheir chequebook contract. For this reason, it is important to cash\nout your cheques every so often."}),"\n",(0,t.jsxs)(n.p,{children:["With the set of API endpoints, as offered by Bee, it is possible to\ndevelop a script that fully manages the uncashed cheques for you. As\nan example, we offer you a ",(0,t.jsx)(n.a,{href:"https://gist.github.com/ralph-pichler/3b5ccd7a5c5cd0500e6428752b37e975#file-cashout-sh",children:"very basic\nscript"}),",\nwhere you can manually cash out all cheques with a worth above a\ncertain value. To use the script:"]}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:"Download and save the script:"}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"wget -O cashout.sh https://gist.githubusercontent.com/ralph-pichler/3b5ccd7a5c5cd0500e6428752b37e975/raw/cashout.sh\n"})}),"\n",(0,t.jsxs)(n.ol,{start:"2",children:["\n",(0,t.jsx)(n.li,{children:"Make the file executable:"}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"chmod +x cashout.sh\n"})}),"\n",(0,t.jsxs)(n.ol,{start:"3",children:["\n",(0,t.jsx)(n.li,{children:"List all uncashed cheques and cash out your cheques above a certain value:"}),"\n"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"List:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"./cashout.sh\n"})}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsx)(n.p,{children:"If running ./cashout.sh returns nothing, you currently have no uncashed cheques."})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Cashout all cheques:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"./cashout.sh cashout-all\n"})}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["Are you a Windows-user who is willing to help us? We are currently\nmissing a simple cashout script for Windows. Please see the\n",(0,t.jsx)(n.a,{href:"https://github.com/ethersphere/bee/issues/1092",children:"issue"}),"."]})}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["You can find the officially deployed smart-contract by the Swarm team\nin the ",(0,t.jsx)(n.a,{href:"https://github.com/ethersphere/swap-swear-and-swindle",children:"swap-swear-and-swindle\nrepository"}),"."]})})]})}function l(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},28453(e,n,s){s.d(n,{R:()=>c,x:()=>r});var a=s(96540);const t={},o=a.createContext(t);function c(e){const n=a.useContext(o);return a.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:c(e.components),a.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9945.8df854f5.js b/assets/js/9945.8df854f5.js new file mode 100644 index 000000000..2568b5d07 --- /dev/null +++ b/assets/js/9945.8df854f5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[9945],{69945(e,s,c){c.d(s,{createGitGraphServices:()=>a.b});var a=c(1721);c(4954)}}]); \ No newline at end of file diff --git a/assets/js/99b6ceef.6dd962d4.js b/assets/js/99b6ceef.6dd962d4.js new file mode 100644 index 000000000..b4631294f --- /dev/null +++ b/assets/js/99b6ceef.6dd962d4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[7824],{65132(e,r,t){t.r(r),t.d(r,{assets:()=>h,contentTitle:()=>o,default:()=>l,frontMatter:()=>a,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"references/awesome-list","title":"Awesome Swarm","description":"Curated list of community resources tools and projects related to Swarm.","source":"@site/docs/references/awesome-list.mdx","sourceDirName":"references","slug":"/references/awesome-list","permalink":"/docs/references/awesome-list","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/references/awesome-list.mdx","tags":[],"version":"current","frontMatter":{"title":"Awesome Swarm","sidebar_label":"Awesome Swarm","description":"Curated list of community resources tools and projects related to Swarm."},"sidebar":"References","previous":{"title":"FAQ","permalink":"/docs/references/faq"}}');var n=t(74848),i=t(28453);const a={title:"Awesome Swarm",sidebar_label:"Awesome Swarm",description:"Curated list of community resources tools and projects related to Swarm."},o=void 0,h={},c=[{value:"Contents",id:"contents",level:2},{value:"Nodes",id:"nodes",level:2},{value:"Libraries",id:"libraries",level:2},{value:"CI/CD",id:"cicd",level:2},{value:"UI",id:"ui",level:2},{value:"Tools",id:"tools",level:2},{value:"Smart Contracts",id:"smart-contracts",level:2},{value:"Documentation",id:"documentation",level:2},{value:"Community / Ecosystem",id:"community--ecosystem",level:2},{value:"Miscellaneous",id:"miscellaneous",level:2},{value:"Contributing",id:"contributing",level:2},{value:"Footnotes",id:"footnotes",level:2}];function d(e){const r={a:"a",code:"code",em:"em",h2:"h2",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.p,{children:(0,n.jsxs)(r.em,{children:["Contribute to the Awesome Swarm list on ",(0,n.jsx)(r.a,{href:"https://github.com/ethersphere/awesome-swarm",children:"GitHub"}),"."]})}),"\n",(0,n.jsx)("p",{align:"center",children:(0,n.jsx)("a",{href:"https://www.ethswarm.org/",children:(0,n.jsx)("img",{src:"https://raw.githubusercontent.com/ethersphere/awesome-swarm/main/media/swarm-logo.png",width:"360",alt:"Swarm"})})}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://www.ethswarm.org/",children:"Swarm"})," is an incentivized peer-to-peer storage and communication system. ",(0,n.jsx)(r.a,{href:"https://docs.ethswarm.org/docs/bee/installation/quick-start",children:"Join the decentralized network with a Bee node"}),", the basic building block of Swarm."]}),"\n",(0,n.jsx)(r.p,{children:"This is a list of free and open source projects related to Swarm and its growing ecosystem."}),"\n",(0,n.jsx)(r.h2,{id:"contents",children:"Contents"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.a,{href:"#nodes",children:"Nodes"})}),"\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.a,{href:"#libraries",children:"Libraries"})}),"\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.a,{href:"#cicd",children:"CI/CD"})}),"\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.a,{href:"#ui",children:"UI"})}),"\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.a,{href:"#tools",children:"Tools"})}),"\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.a,{href:"#smart-contracts",children:"Smart Contracts"})}),"\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.a,{href:"#documentation",children:"Documentation"})}),"\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.a,{href:"#community--ecosystem",children:"Community / Ecosystem"})}),"\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.a,{href:"#miscellaneous",children:"Miscellaneous"})}),"\n"]}),"\n",(0,n.jsx)(r.h2,{id:"nodes",children:"Nodes"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/ethersphere/bee",children:"Bee"})," - Official Swarm full node implementation in Go, provided by the Swarm Foundation."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/solardev-xyz/ant",children:"Ant"})," - A lightweight Swarm client built in Rust, designed to be embedded in Freedom Browser."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/omnipin/hoverfly",children:"Hoverfly"})," - Experimental Swarm light client that works natively and in a browser."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://radicle.network/nodes/rosa.radicle.network/rad:z41Aa98xcURaZQnV2Lrio1SoX3Tjd",children:"Kabashira"})," - An intentionally minimal lightweight Rust client and toolkit for Swarm."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/nxm-rs/vertex",children:"Vertex"})," - Swarm full node under active development in Rust, with a focus on performance and modularity."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/lat-murmeldjur/weeb-3",children:"weeb-3"})," - Work-in-progress Swarm client implementation that relies solely on browser-side technologies."]}),"\n",(0,n.jsx)(r.h2,{id:"libraries",children:"Libraries"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/ethersphere/bee-js",children:"Bee-JS"})," - A high-level JavaScript library to interact with Bee through its REST API."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/petfold/ontodag",children:"OntoDAG"})," - Category DAG on Swarm: canonical content-addressed roots, queries as intersections of subcategories, coordination-free merge between writers."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/petfold/recordstore",children:"recordstore"})," - Versioned key-value record store over Swarm with canonical roots, atomic commits and snapshot isolation, in Python."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/petfold/swarmfs",children:"swarmfs"})," - An fsspec backend for Swarm \u2014 use bzz:// URLs across the Python data stack (pandas, Dask, Zarr, DuckDB, etc.)."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/petfold/swarmlite",children:"swarmlite"})," - Verifiable serverless SQLite hosting: run SELECT against published databases, fetching only the pages each query touches, in Python or in the browser."]}),"\n",(0,n.jsx)(r.h2,{id:"cicd",children:"CI/CD"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/ethersphere/beekeeper",children:"Beekeeper"})," - Orchestrate and test Bee clusters through Kubernetes."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/ethersphere/swarm-actions",children:"Swarm Actions"})," - GitHub Actions workflow for uploading data to the Swarm network."]}),"\n",(0,n.jsx)(r.h2,{id:"ui",children:"UI"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/ethersphere/bee-dashboard",children:"Bee Dashboard"})," - React project to troubleshoot and interact with your Bee node."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/ethersphere/beeport",children:"Beeport"})," - Managed service to buy storage with multichain payments and upload data to Swarm."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/ethersphere/swarm-gateway",children:"Gateway"})," - Gateway to the Swarm project, for uploading, downloading and sharing assets on the network."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/ethersphere/multichain-widget",children:"Multichain Widget"})," - Embeddable React widget for multichain swaps to xBZZ and xDAI."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://swarmy.cloud/",children:"Swarmy"})," - Swarm as a service, makes it simple to store and retrieve data on Swarm."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://www.ethswarm.org/build/desktop",children:"Swarm Desktop App"})," - By running a lightweight Swarm node on your computer, you get direct access to the Swarm peer-to-peer network, without the need for centralized gateways."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://buzzmint.io/",children:"buzzMint"})," - A decentralised NFT creator."]}),"\n",(0,n.jsx)(r.h2,{id:"tools",children:"Tools"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/ethersphere/swarm-mcp",children:"Swarm MCP"})," - A Model Context Protocol (MCP) server implementation that uses Ethereum Swarm's Bee API for storing and retrieving data."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/ethersphere/swarm-cli",children:"Swarm CLI"})," - No more copy-pasting curl commands, with ",(0,n.jsx)(r.code,{children:"swarm-cli"})," you can do everything on Swarm with simple commands straight from the terminal."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/ethersphere/create-swarm-app",children:"Create Swarm App"})," - Quick-start a Swarm decentralized app from multiple templates."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/ethersphere/bee-factory",children:"Bee Factory"})," - CLI tool to spin up a test environment with Bee clients and a test blockchain."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/MetaProvide/nextcloud-swarm-plugin",children:"Nextcloud Swarm Plugin"})," - Plugin for bridging Nextcloud and Swarm."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/w3rkspacelabs/doctor-bee",children:"Doctor Bee"})," - A simple Python script to check up a Bee node's health status."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/Cafe137/etherchunk",children:"etherchunk"})," - CLI that stamps chunks client-side and tracks postage-batch slot usage, enabling file deletion by reclaiming slots."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/Solar-Punk-Ltd/ipfs-to-swarm",children:"IPFS to Swarm"})," - Migrate data from IPFS to Swarm."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/datafund/provenance",children:"Datafund Provenance Toolkit"})," - Store data on Swarm with cryptographic provenance \u2014 hashing, optional notary signing and on-chain anchoring, with SDK, CLI and MCP server."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/petfold/ontodag-fs",children:"ontodag-fs"})," - Browse an OntoDAG category lattice as a read-only fsspec and FUSE filesystem where directory paths are queries and file content is stored on Swarm."]}),"\n",(0,n.jsx)(r.h2,{id:"smart-contracts",children:"Smart Contracts"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/ethersphere/swap-swear-and-swindle",children:"Swap, Swear and Swindle"})," - Protocols for peer-to-peer accounting."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/ethersphere/storage-incentives",children:"Storage Incentives"})," - Smart contracts providing the basis for Swarm's storage incentivization model."]}),"\n",(0,n.jsx)(r.h2,{id:"documentation",children:"Documentation"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://docs.ethswarm.org/the-book-of-swarm.pdf",children:"The Book of Swarm"})," - Storage and communication infrastructure for self-sovereign digital society back-end stack for the decentralised web."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/ethersphere/bee-docs",children:"Bee Docs"})," - Documentation for the Swarm Bee Client. View at ",(0,n.jsx)(r.a,{href:"https://docs.ethswarm.org/docs/",children:"docs.ethswarm.org"}),"."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/ethersphere/bee-js-docs",children:"Bee-JS Docs"})," - Documentation for the Swarm Bee-JS JavaScript library. View at ",(0,n.jsx)(r.a,{href:"https://bee-js.ethswarm.org/docs/",children:"bee-js.ethswarm.org"}),"."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://papers.ethswarm.org/p/swarm-protocol-spec/",children:"Swarm Specification"})," - The Swarm specification document is an essential resource for developers and software engineers seeking to build their own Swarm client or integrate Swarm's functionalities into their applications."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://papers.ethswarm.org/p/erasure/",children:"Swarm Erasure Coding paper"})," - The erasure coding paper provides a technical exploration of erasure coding in the Swarm network, focusing on ensuring data integrity and resilience."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://papers.ethswarm.org/",children:"Swarm Papers"})," - Swarm\u2019s documentation includes a variety of papers from technical specifications to in-depth explorations of the network's architecture and functionalities."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://docs.ethswarm.org/api/",children:"Bee API Reference"})," - Bee API Documentation."]}),"\n",(0,n.jsx)(r.h2,{id:"community--ecosystem",children:"Community / Ecosystem"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://fairdatasociety.org/",children:"Fair data society"})," - Ecosystem initiative for ethical Web3."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/fairDataSociety/fairOS-dfs",children:"FairOS"})," - Distributed file system, key-value store and nosql store on Swarm (for developers)."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://fdp.fairdatasociety.org/",children:"The Fair Data Protocol (FDP)"})," - A data interoperability protocol for dApps that use personal data."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://fairdrive.fairdatasociety.org/",children:"Fairdrive"}),' - Decentralised and unstoppable "Dropbox" for end-users and developers using Fair Data Protocol.']}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/fairDataSociety/fairdrive-theapp",children:"Fairdrive code"}),' - Code for decentralised and unstoppable "Dropbox" for end-users and developers using Fair Data Protocol.']}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://swarmscan.io/",children:"SwarmScan"})," - Get network insights."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://etherna.io/",children:"Etherna.io"})," - Decentralised media platform on Swarm."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/w3rkspacelabs/DAppNodePackage-Swarm",children:"Swarm DAppNode Package"})," - Swarm DAppNode package for Swarm Mainnet with multi-platform (x86_64 and arm64) support."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/ethersphere/devcon-swarm-exporter",children:"Export Webpage on Swarm"})," - CLI tool to build an optimized static export of devcon app frontend."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/Blobscan/blobscan",children:"Blob Storage on Swarm"})," - The pioneer blockchain explorer dedicated to navigate and visualize shard blob transactions."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://github.com/ethersphere/SWIPs",children:"SWIPs"})," - The Swarm Improvement Proposal repository."]}),"\n",(0,n.jsx)(r.h2,{id:"miscellaneous",children:"Miscellaneous"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://deepwiki.com/ethersphere/bee",children:"ethersphere/bee DeepWiki"})," - The DeepWiki for the Bee client GitHub repository. DeepWiki is a tool which provides autogenerated documentation (using LLM ai agents such as ChatGPT or Google Gemini) based directly on code from a GitHub repository. It also has a question box where any question can be asked about the Bee codebase."]}),"\n",(0,n.jsx)(r.p,{children:(0,n.jsx)(r.em,{children:"As with all LLMs, DeepWiki may sometimes be confidently wrong. Make sure to always double check (either by inspecting the code yourself, or confirming with a Bee team core developer) before assuming its answers are correct."})}),"\n",(0,n.jsx)(r.h2,{id:"contributing",children:"Contributing"}),"\n",(0,n.jsxs)(r.p,{children:["Contributions are welcome. Please read the ",(0,n.jsx)(r.a,{href:"https://github.com/ethersphere/awesome-swarm/blob/main/CONTRIBUTING.md",children:"contribution guidelines"})," first."]}),"\n",(0,n.jsx)(r.h2,{id:"footnotes",children:"Footnotes"}),"\n",(0,n.jsxs)(r.p,{children:["Projects that are no longer actively maintained are kept in ",(0,n.jsx)(r.a,{href:"https://github.com/ethersphere/awesome-swarm/blob/main/archived.md",children:"archived.md"})," \u2014 archived, long-dormant, and quiet entries retained for reference rather than listed above."]})]})}function l(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},28453(e,r,t){t.d(r,{R:()=>a,x:()=>o});var s=t(96540);const n={},i=s.createContext(n);function a(e){const r=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:a(e.components),s.createElement(i.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/99fbaaba.eb0dd69e.js b/assets/js/99fbaaba.eb0dd69e.js new file mode 100644 index 000000000..4d0ea367b --- /dev/null +++ b/assets/js/99fbaaba.eb0dd69e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[5908],{49960(e,n,s){s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>d,default:()=>h,frontMatter:()=>o,metadata:()=>i,toc:()=>a});const i=JSON.parse('{"id":"develop/tools-and-features/gsoc","title":"GSOC","description":"Graffiti Several Owner Chunk (GSOC) \u2014 a many-to-one messaging feature that lets one full Bee node receive messages from many writer nodes.","source":"@site/docs/develop/tools-and-features/gsoc.md","sourceDirName":"develop/tools-and-features","slug":"/develop/tools-and-features/gsoc","permalink":"/docs/develop/tools-and-features/gsoc","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/develop/tools-and-features/gsoc.md","tags":[],"version":"current","frontMatter":{"title":"GSOC","id":"gsoc","description":"Graffiti Several Owner Chunk (GSOC) \u2014 a many-to-one messaging feature that lets one full Bee node receive messages from many writer nodes."},"sidebar":"develop","previous":{"title":"PSS Messaging","permalink":"/docs/develop/tools-and-features/pss"},"next":{"title":"Pinning","permalink":"/docs/develop/tools-and-features/pinning"}}');var t=s(74848),r=s(28453);const o={title:"GSOC",id:"gsoc",description:"Graffiti Several Owner Chunk (GSOC) \u2014 a many-to-one messaging feature that lets one full Bee node receive messages from many writer nodes."},d=void 0,c={},a=[{value:"Introduction",id:"introduction",level:2},{value:"bee-js GSOC Methods",id:"bee-js-gsoc-methods",level:2},{value:"Bee.gsocMine()",id:"beegsocmine",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Functionality:",id:"functionality",level:4},{value:"Bee.gsocSend()",id:"beegsocsend",level:3},{value:"Parameters:",id:"parameters-1",level:4},{value:"Functionality:",id:"functionality-1",level:4},{value:"Bee.gsocSubscribe()",id:"beegsocsubscribe",level:3},{value:"Parameters:",id:"parameters-2",level:4},{value:"Functionality:",id:"functionality-2",level:4},{value:"Example Scripts",id:"example-scripts",level:2},{value:"Script Requirements",id:"script-requirements",level:3},{value:"Service Node Script",id:"service-node-script",level:3},{value:"Initialize Project",id:"initialize-project",level:4},{value:"Update Configuration",id:"update-configuration",level:4},{value:"Run Service Node Script",id:"run-service-node-script",level:4},{value:"Writer Node Script",id:"writer-node-script",level:3},{value:"Initialize Project",id:"initialize-project-1",level:4},{value:"Update Configuration",id:"update-configuration-1",level:4},{value:"Run Writer Node Script",id:"run-writer-node-script",level:4}];function l(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"introduction",children:"Introduction"}),"\n",(0,t.jsxs)(n.p,{children:["The Graffiti Several Owner Chunk (GSOC) feature enables a single Bee ",(0,t.jsx)(n.em,{children:"service"})," node to receive messages from multiple Bee ",(0,t.jsx)(n.em,{children:"writer"})," nodes. It is based on a ",(0,t.jsx)(n.a,{href:"/docs/develop/tools-and-features/chunk-types#single-owner-chunks",children:"Single Owner Chunk (SOC)"})," with an address which is derived so that it falls within the neighborhood of the service node, ensuring updates are automatically synced as part of the normal full node syncing process."]}),"\n",(0,t.jsxs)(n.p,{children:["The service node determines the data used to derive the GSOC private key. Any node with access to this data can derive the same private key and update the GSOC in order to send messages to the service node. Since only full nodes sync neighborhood chunks, the service node ",(0,t.jsx)(n.em,{children:"must be a full node to receive GSOC updates"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"To receive messages in real time, the service node establishes a WebSocket connection to listen for GSOC update events. When a matching SOC update reaches a node with an active GSOC connection, an event is emitted, enabling the service node to dynamically receive messages as part of a many-to-one notification system."}),"\n",(0,t.jsxs)(n.admonition,{type:"info",children:[(0,t.jsx)(n.mdxAdmonitionTitle,{}),(0,t.jsxs)(n.p,{children:["GSOC was initially introduced in a ",(0,t.jsx)(n.a,{href:"https://github.com/ethersphere/SWIPs/blob/99e6cf90a4768b24d27e5339b205c18825b53322/SWIPs/swip-draft_graffiti-soc.md#gsoc-identifier",children:"SWIP"}),", which outlines its core concepts and implementation details, and it is an evolution of the earlier ",(0,t.jsx)(n.a,{href:"https://github.com/fairDataSociety/FIPs/blob/master/text/0062-graffiti-feed.md",children:"Graffiti feed"})," feature."]})]}),"\n",(0,t.jsxs)(n.h2,{id:"bee-js-gsoc-methods",children:[(0,t.jsx)(n.em,{children:"bee-js"})," GSOC Methods"]}),"\n",(0,t.jsxs)(n.p,{children:["While you can interact with GSOC directly via the ",(0,t.jsx)(n.code,{children:"/gsoc/subscribe/{address}"})," endpoint, the ",(0,t.jsx)(n.a,{href:"/docs/develop/tools-and-features/bee-js",children:"bee-js"})," library is the recommended way for most users. The library includes three methods which make it easy to get started with GSOC:"]}),"\n",(0,t.jsx)(n.h3,{id:"beegsocmine",children:(0,t.jsx)(n.code,{children:"Bee.gsocMine()"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"Bee.gsocMine"})," method mines a GSOC private key corresponding to a specific overlay address:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["The service node uses this method to generate the private key for a GSOC in its own neighborhood, and then uses it with the ",(0,t.jsx)(n.code,{children:"gsocSubscribe"})," method to listen for updates from writer nodes."]}),"\n",(0,t.jsxs)(n.li,{children:["A writer node uses this method to generate the private key it uses to send messages to the service node with the ",(0,t.jsx)(n.code,{children:"gsocSend()"})," method."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"parameters",children:"Parameters"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"targetOverlay"})})," (",(0,t.jsx)(n.code,{children:"PeerAddress | Uint8Array | string"}),") \u2013 The overlay address of the service node."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"identifier"})})," (",(0,t.jsx)(n.code,{children:"Identifier | Uint8Array | string"}),") \u2013 A unique, arbitrary value that can be modified to mine a GSOC private key derived from a specific value."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"proximity"})})," (",(0,t.jsx)(n.code,{children:"number"}),", default: ",(0,t.jsx)(n.code,{children:"16"}),") \u2013 Determines the neighborhood depth, i.e., how many prefix bits match between ",(0,t.jsx)(n.code,{children:"targetOverlay"})," and the mined GSOC overlay address."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["The function returns a mined private key, which corresponds to a GSOC overlay address that falls within the ",(0,t.jsx)(n.code,{children:"targetOverlay"})," neighborhood."]}),"\n",(0,t.jsx)(n.h4,{id:"functionality",children:"Functionality:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["Mines and returns a private key that generates a GSOC overlay address within the specified ",(0,t.jsx)(n.code,{children:"proximity"})," of ",(0,t.jsx)(n.code,{children:"targetOverlay"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["The service node uses this method to mine a GSOC chunk whose overlay falls within its own neighborhood, and shares the values used as input with the writer node (",(0,t.jsx)(n.code,{children:"targetOverlay"}),", ",(0,t.jsx)(n.code,{children:"identifier"}),", and ",(0,t.jsx)(n.code,{children:"proximity"}),")."]}),"\n",(0,t.jsx)(n.li,{children:"The writer node uses this method with the input values shared from the service node to generate the private key that allows it to send messages as updates to the mined GSOC."}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"This function allows users to derive a GSOC overlay address that aligns with a target node\u2019s network neighborhood."}),"\n",(0,t.jsx)(n.h3,{id:"beegsocsend",children:(0,t.jsx)(n.code,{children:"Bee.gsocSend()"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"Bee.gsocSend"})," method is used by a writer node for sending GSOC messages. It creates an update for the GSOC using the provided ",(0,t.jsx)(n.code,{children:"data"})," as the message, signs the update with the private key mined by the ",(0,t.jsx)(n.code,{children:"gsocMine()"})," method, and uploads it to Swarm."]}),"\n",(0,t.jsx)(n.h4,{id:"parameters-1",children:"Parameters:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"postageBatchId"})})," (",(0,t.jsx)(n.code,{children:"BatchId | Uint8Array | string"}),") \u2013 The ID of the postage batch used to pay for the upload."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"signer"})})," (",(0,t.jsx)(n.code,{children:"PrivateKey | Uint8Array | string"}),") \u2013 The private key used to sign the chunk."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"identifier"})})," (",(0,t.jsx)(n.code,{children:"Identifier | Uint8Array | string"}),") \u2013 A unique identifier for the GSOC."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"data"})})," (",(0,t.jsx)(n.code,{children:"string | Uint8Array"}),") \u2013 The payload to be sent."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"options"})})," (",(0,t.jsx)(n.code,{children:"UploadOptions"}),", optional) \u2013 Additional upload configuration."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"requestOptions"})})," (",(0,t.jsx)(n.code,{children:"BeeRequestOptions"}),", optional) \u2013 Custom request options."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"functionality-1",children:"Functionality:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["Used by the writer node to send a GSOC message using the private key returned from ",(0,t.jsx)(n.code,{children:"gsocMine()"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["Requires the ",(0,t.jsx)(n.code,{children:"postageBatchId"})," for a valid postage stamp batch (ideally ",(0,t.jsx)(n.a,{href:"/docs/develop/tools-and-features/gsoc#script-requirements",children:"mutable"}),") to send messages."]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"beegsocsubscribe",children:(0,t.jsx)(n.code,{children:"Bee.gsocSubscribe()"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"Bee.gsocSubscribe"})," method is used by the service node to establish a WebSocket connection to listen for GSOC messages. It subscribes to messages associated with a specific ",(0,t.jsx)(n.code,{children:"address"})," and ",(0,t.jsx)(n.code,{children:"identifier"}),"."]}),"\n",(0,t.jsx)(n.h4,{id:"parameters-2",children:"Parameters:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"address"})})," (",(0,t.jsx)(n.code,{children:"EthAddress | Uint8Array | string"}),") \u2013 The Gnosis Chain address associated with the private key returned by the ",(0,t.jsx)(n.code,{children:"gsocMine()"})," function."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"identifier"})})," (",(0,t.jsx)(n.code,{children:"Identifier | Uint8Array | string"}),") \u2013 A unique identifier used to track the messages."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"handler"})})," (",(0,t.jsx)(n.code,{children:"GsocMessageHandler"}),") \u2013 A callback function to handle incoming messages."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"functionality-2",children:"Functionality:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["The function is used by the service node to construct a GSOC address using the provided ",(0,t.jsx)(n.code,{children:"identifier"})," and ",(0,t.jsx)(n.code,{children:"address"}),"."]}),"\n",(0,t.jsx)(n.li,{children:"A WebSocket connection is opened to subscribe to update events for this GSOC address."}),"\n",(0,t.jsxs)(n.li,{children:["Incoming messages are processed by the ",(0,t.jsx)(n.code,{children:"handler"})," function."]}),"\n",(0,t.jsxs)(n.li,{children:["The function returns a ",(0,t.jsx)(n.code,{children:"GsocSubscription"})," object with a ",(0,t.jsx)(n.code,{children:"cancel"})," method to terminate the subscription."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"example-scripts",children:"Example Scripts"}),"\n",(0,t.jsxs)(n.p,{children:["The service node and writer node scripts below are a minimalistic example of how to use ",(0,t.jsx)(n.code,{children:"bee-js"})," to set up a service node to listen for GSOC messages, and a writer node to send GSOC messages."]}),"\n",(0,t.jsx)(n.h3,{id:"script-requirements",children:"Script Requirements"}),"\n",(0,t.jsx)(n.p,{children:"To run both nodes and send messages from the writer node to the service node you will need:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:"A fully synced Bee full node for the service node and a second Bee light node for the writer node (they do not both need to be running on the same machine)"}),"\n",(0,t.jsx)(n.li,{children:"A small amount of xDAI (~0.01) and xBZZ (~0.01)"}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://nodejs.org/en",children:"NodeJS"})," & ",(0,t.jsx)(n.a,{href:"https://www.npmjs.com/",children:"NPM"})]}),"\n",(0,t.jsxs)(n.li,{children:["A mutable stamp batch (",(0,t.jsx)(n.em,{children:"set the"})," ",(0,t.jsxs)(n.a,{href:"/api/#tag/Postage-Stamps/paths/~1stamps~1%7Bamount%7D~1%7Bdepth%7D/post",children:[(0,t.jsx)(n.code,{children:"immutable"})," header parameter"]})," ",(0,t.jsxs)(n.em,{children:["to ",(0,t.jsx)(n.code,{children:"false"})," when"]})," ",(0,t.jsx)(n.a,{href:"/docs/develop/tools-and-features/buy-a-stamp-batch#buying-a-stamp-batch",children:"buying a batch"}),")"]}),"\n"]}),"\n",(0,t.jsxs)(n.admonition,{type:"warning",children:[(0,t.jsx)(n.mdxAdmonitionTitle,{}),(0,t.jsxs)(n.p,{children:["Only ",(0,t.jsx)(n.em,{children:(0,t.jsx)(n.strong,{children:"mutable"})})," postage stamp batches should be used for GSOC."]}),(0,t.jsxs)(n.p,{children:["Since each GSOC update utilizes one slot within the ",(0,t.jsx)(n.em,{children:(0,t.jsx)(n.strong,{children:"same"})})," ",(0,t.jsx)(n.a,{href:"/docs/concepts/incentives/postage-stamps#batch-utilisation",children:"postage batch bucket"}),", immutable batches will fill up very quickly (e.g., at depth 18, four GSOC messages exhaust the batch)."]}),(0,t.jsx)(n.p,{children:"Mutable batches allow updates to overwrite older ones, preventing full utilization and enabling indefinite GSOC messaging as long as the batch still has remaining TTL."})]}),"\n",(0,t.jsx)(n.h3,{id:"service-node-script",children:"Service Node Script"}),"\n",(0,t.jsxs)(n.p,{children:["\u2705 For your service node project, you must use a ",(0,t.jsx)(n.em,{children:(0,t.jsx)(n.strong,{children:"full node"})}),"."]}),"\n",(0,t.jsx)(n.p,{children:"\u274c A service node does not need a postage stamp batch."}),"\n",(0,t.jsx)(n.h4,{id:"initialize-project",children:"Initialize Project"}),"\n",(0,t.jsx)(n.p,{children:"First, initialize the service node project on a machine running a full Bee node in the background:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'mkdir service-node\ncd service-node\nnpm init -y && npm pkg set type="module" && cat package.json\nnpm install bee-js --save\n'})}),"\n",(0,t.jsxs)(n.p,{children:["The command first creates the ",(0,t.jsx)(n.code,{children:"service-node"})," directory, moves into that directory, initializes a ",(0,t.jsx)(n.code,{children:"package.json"})," file, sets ",(0,t.jsx)(n.code,{children:'"type": "module"'})," in the file, and finally installs the ",(0,t.jsx)(n.code,{children:"bee-js"})," library."]}),"\n",(0,t.jsxs)(n.p,{children:["Next create a file named ",(0,t.jsx)(n.code,{children:"index.js"})," which will hold the code for our service node."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"touch index.js\n"})}),"\n",(0,t.jsx)(n.p,{children:"Then open in your editor of choice:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"vi index.js\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Copy the completed code below for a service node into our newly created ",(0,t.jsx)(n.code,{children:"index.js"})," file:"]}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsx)(n.p,{children:"Read through the code and code comments for a more in-depth understanding of how the service node works."})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-javascript",children:"import { Bee, NULL_IDENTIFIER } from 'bee-js';\n\n// Configuration\nconst BEE_HOST = 'http://localhost:1633'; // Change this if necessary\nconst BEE_PROXIMITY = 12 // Mining depth of the GSOC overlay - modified from the default of 16 for a shorter mining time\n\nconst BEE = new Bee(BEE_HOST, {});\nasync function mineGsocKey() {\n console.log('Fetching node addresses...');\n const addresses = await BEE.getNodeAddresses();\n const privateKey = BEE.gsocMine(addresses.overlay, NULL_IDENTIFIER, BEE_PROXIMITY); // `NULL_IDENTIFIER` is a constant `Uint8Array(32)` imported from `bee-js` for use as a default identifier\n console.log('Mining completed. Public Key:', privateKey.publicKey().toCompressedHex());\n return privateKey;\n}\n\nasync function createGsocListener() {\n try {\n const privateKey = await mineGsocKey();\n // Subscribe to GSOC messages\n const subscription = BEE.gsocSubscribe(privateKey.publicKey().address(), NULL_IDENTIFIER, {\n onMessage: message => console.log('Received GSOC update:', message.toJSON()),\n onError: err => console.error('Error in subscription:', err),\n });\n\n console.log('Listening for GSOC updates...');\n\n return { privateKey, subscription };\n } catch (err) {\n console.error('Error:', err.message);\n }\n}\n\n(async () => {\n await createGsocListener();\n})();\n"})}),"\n",(0,t.jsx)(n.h4,{id:"update-configuration",children:"Update Configuration"}),"\n",(0,t.jsx)(n.p,{children:"Update the constants in the configuration section with your own information:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Update ",(0,t.jsx)(n.code,{children:"BEE_HOST"})," if your node is not using the default ",(0,t.jsx)(n.code,{children:"http://localhost:1633"}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"run-service-node-script",children:"Run Service Node Script"}),"\n",(0,t.jsx)(n.p,{children:"Start the service node:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"node index.js\n"})}),"\n",(0,t.jsx)(n.p,{children:"If everything is working correctly, after a few seconds you should see output like this:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"Fetching node addresses...\nNode overlay address: 75703155f54cbb899a359a7e3daec75da7722baef9286522e58e86ccbfcd7f13\nMining completed. Public Key: e82d2c98a92a3b0c690f6ba28070c59e3e0cd0a2a384d3b03cba9d1fded41a9831e73a3232d85b3614833d344c7d502dd09d7ecd0614b06095c86be0c8501460\nListening for GSOC updates...\n"})}),"\n",(0,t.jsxs)(n.p,{children:["This means the service node has successfully mined a GSOC chunk that it falls into its own neighborhood, and is now listening for updates on that chunk. Copy the ",(0,t.jsx)(n.code,{children:"Node overlay address:"})," value (",(0,t.jsx)(n.code,{children:"75703155f54cbb899a359a7e3daec75da7722baef9286522e58e86ccbfcd7f13"})," from the example output) and save it - we will need it for our writer node's configuration."]}),"\n",(0,t.jsx)(n.h3,{id:"writer-node-script",children:"Writer Node Script"}),"\n",(0,t.jsx)(n.p,{children:"\u2705 For your writer node, either a light or a full node can be used"}),"\n",(0,t.jsxs)(n.p,{children:["\u2705 A writer node needs a valid ",(0,t.jsx)(n.em,{children:(0,t.jsx)(n.strong,{children:"mutable"})})," (not technically required, but ",(0,t.jsx)(n.a,{href:"/docs/develop/tools-and-features/gsoc#script-requirements",children:"strongly recommended"}),") postage stamp batch in order to send GSOC messages"]}),"\n",(0,t.jsx)(n.h4,{id:"initialize-project-1",children:"Initialize Project"}),"\n",(0,t.jsx)(n.p,{children:"We initialize our writer node using almost the same command as our service node, only the directory name has been changed."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'mkdir writer-node\ncd writer-node\nnpm init -y && npm pkg set type="module" && cat package.json\nnpm install bee-js --save\n'})}),"\n",(0,t.jsxs)(n.p,{children:["The command first creates the ",(0,t.jsx)(n.code,{children:"writer-node"})," directory, moves into that directory, initializes a ",(0,t.jsx)(n.code,{children:"package.json"})," file, sets ",(0,t.jsx)(n.code,{children:'"type": "module"'})," in the file, and finally installs the ",(0,t.jsx)(n.code,{children:"bee-js"})," library."]}),"\n",(0,t.jsxs)(n.p,{children:["Next create a file named ",(0,t.jsx)(n.code,{children:"index.js"})," which will hold the code for our writer node."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"touch index.js\n"})}),"\n",(0,t.jsx)(n.p,{children:"Then open in your editor of choice:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"vi index.js\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Copy the completed code below for a writer node into our newly created ",(0,t.jsx)(n.code,{children:"index.js"})," file:"]}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsx)(n.p,{children:"Read through the code and code comments for a more in-depth understanding of how the writer node works."})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-javascript",children:"import { Bee, NULL_IDENTIFIER } from 'bee-js';\n\n// Configuration\nconst BEE_HOST = 'http://localhost:1643'; // Change this if necessary\nconst BEE_BATCH = '42a10176596ecc73dcd24b91a16fb77d874ebd108fe8bc7fb896c8e89e8cb06e'; // Ensure this is a valid hex string\nconst TARGET_OVERLAY = '75703155f54cbb899a359a7e3daec75da7722baef9286522e58e86ccbfcd7f13'; // Overlay of service node writer node wants to message\nconst BEE_PROXIMITY = 12 // Mining depth of the GSOC overlay - modified from the default of 16 for a shorter mining time\n\nconst BEE = new Bee(BEE_HOST, {});\n\nasync function mineGsocKey() {\n const privateKey = BEE.gsocMine(TARGET_OVERLAY, NULL_IDENTIFIER, BEE_PROXIMITY); // `NULL_IDENTIFIER` is a constant `Uint8Array(32)` imported from `bee-js` for use as a default identifier\n console.log('Mining completed. Public Key:', privateKey.publicKey().toCompressedHex());\n return privateKey;\n}\n\nasync function sendGsocMessage(privateKey, name, body) {\n if (!privateKey) {\n console.error('Error: Private key is not available');\n return;\n }\n\n if (!/^[0-9a-fA-F]{64}$/.test(BEE_BATCH)) {\n console.error('Error: Invalid BEE_BATCH. It must be a 64-character hex string.');\n return;\n }\n\n const message = JSON.stringify({ name, body });\n await BEE.gsocSend(BEE_BATCH, privateKey, NULL_IDENTIFIER, message); \n console.log('Message sent:', message);\n}\n\n(async () => {\n const privateKey = await mineGsocKey();\n\n // Example: Sending a message after a delay (simulate user input)\n setTimeout(() => {\n sendGsocMessage(privateKey, 'Alice', 'Hello from Node.js!');\n }, 5000);\n})();\n"})}),"\n",(0,t.jsx)(n.h4,{id:"update-configuration-1",children:"Update Configuration"}),"\n",(0,t.jsx)(n.p,{children:"Update the configuration section constants with your own information:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Set ",(0,t.jsx)(n.code,{children:"BEE_HOST"})," to your writer node's API endpoint"]}),"\n",(0,t.jsxs)(n.li,{children:["Set ",(0,t.jsx)(n.code,{children:"BEE_BATCH"})," to the batch id of a valid, ",(0,t.jsx)(n.em,{children:"mutable"})," postage stamp batch - ",(0,t.jsx)(n.a,{href:"/docs/develop/tools-and-features/buy-a-stamp-batch",children:"buy a batch"})," if needed"]}),"\n",(0,t.jsxs)(n.li,{children:["Set ",(0,t.jsx)(n.code,{children:"TARGET_OVERLAY"})," to the service node overlay value we copied from the output of the service node script"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"After updating the configuration, run the writer node script (before running the writer node script, make sure the service node script has already been started and is currently listening for GSOC updates):"}),"\n",(0,t.jsx)(n.h4,{id:"run-writer-node-script",children:"Run Writer Node Script"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"node index.js\n"})}),"\n",(0,t.jsx)(n.p,{children:"If everything is working correctly, after a few moments on your writer node you should see output like this:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'Mining completed. Public Key: e82d2c98a92a3b0c690f6ba28070c59e3e0cd0a2a384d3b03cba9d1fded41a9831e73a3232d85b3614833d344c7d502dd09d7ecd0614b06095c86be0c8501460\nMessage sent: {"name":"Alice","body":"Hello from Node.js!"}\n'})}),"\n",(0,t.jsx)(n.p,{children:"While in the output from our service node, we should receive the update:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"Received GSOC update: { name: 'Alice', body: 'Hello from Node.js!' }\n"})}),"\n",(0,t.jsx)(n.p,{children:"Congratulations! You've just sent your first GSOC message."})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},28453(e,n,s){s.d(n,{R:()=>o,x:()=>d});var i=s(96540);const t={},r=i.createContext(t);function o(e){const n=i.useContext(r);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a0798b91.768661c3.js b/assets/js/a0798b91.768661c3.js new file mode 100644 index 000000000..0c2a81dbc --- /dev/null +++ b/assets/js/a0798b91.768661c3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[596],{44245(e,o,n){n.r(o),n.d(o,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>s,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"bee/installation/hive","title":"Hive","description":"Describes tools and orchestration methods for managing multiple Bee nodes using Docker Compose Helm or manual configuration.","source":"@site/docs/bee/installation/hive.md","sourceDirName":"bee/installation","slug":"/bee/installation/hive","permalink":"/docs/bee/installation/hive","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/bee/installation/hive.md","tags":[],"version":"current","frontMatter":{"title":"Hive","id":"hive","description":"Describes tools and orchestration methods for managing multiple Bee nodes using Docker Compose Helm or manual configuration."},"sidebar":"bee","previous":{"title":"Set Target Neighborhood","permalink":"/docs/bee/installation/set-target-neighborhood"},"next":{"title":"Connectivity","permalink":"/docs/bee/installation/connectivity"}}');var r=n(74848),i=n(28453);const s={title:"Hive",id:"hive",description:"Describes tools and orchestration methods for managing multiple Bee nodes using Docker Compose Helm or manual configuration."},a=void 0,c={},l=[{value:"Docker",id:"docker",level:2},{value:"Docker Compose",id:"docker-compose",level:2},{value:"Helm",id:"helm",level:2},{value:"Manual Setup",id:"manual-setup",level:2},{value:"Monitoring",id:"monitoring",level:2}];function d(e){const o={a:"a",code:"code",h2:"h2",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o.p,{children:["Due to the mechanics of Swarm's ",(0,r.jsx)(o.a,{href:"/docs/concepts/incentives/redistribution-game",children:"storage incentives"}),", node operators may wish to run multiple nodes in order to maximize earning potential. Read ",(0,r.jsx)(o.a,{href:"https://www.ethswarm.org/the-book-of-swarm-2.pdf",children:"The Book of Swarm"})," for more information on how the\nswarm comes together."]}),"\n",(0,r.jsx)(o.h2,{id:"docker",children:"Docker"}),"\n",(0,r.jsxs)(o.p,{children:["Up-to-date ",(0,r.jsx)(o.a,{href:"/docs/bee/installation/docker",children:"Docker images for Bee"})," are provided."]}),"\n",(0,r.jsx)(o.h2,{id:"docker-compose",children:"Docker Compose"}),"\n",(0,r.jsxs)(o.p,{children:["Running multiple Bee nodes is easier with\n",(0,r.jsx)(o.code,{children:"docker-compose"}),". Check out the Docker compose section of the\n",(0,r.jsx)(o.a,{href:"https://github.com/ethersphere/bee/tree/master/packaging/docker",children:"Docker README"}),"."]}),"\n",(0,r.jsx)(o.h2,{id:"helm",children:"Helm"}),"\n",(0,r.jsxs)(o.p,{children:["If you plan to run a large number of Bee nodes and you have experience using Kubernetes with Helm, you can have a look at how we manage our cluster under ",(0,r.jsx)(o.a,{href:"https://github.com/ethersphere/helm/tree/master/charts/bee",children:"Ethersphere/helm"}),"."]}),"\n",(0,r.jsx)(o.h2,{id:"manual-setup",children:"Manual Setup"}),"\n",(0,r.jsx)(o.p,{children:"If you just want to run a handful of Bee nodes, you can run multiple Bee nodes by creating separate configuration files."}),"\n",(0,r.jsx)(o.p,{children:"Create your first configuration file by running"}),"\n",(0,r.jsx)(o.pre,{children:(0,r.jsx)(o.code,{className:"language-console",children:"bee printconfig &> bee-config-1.yaml\n"})}),"\n",(0,r.jsxs)(o.p,{children:["Make as many copies of bee-config-1.yaml as you want to run Bee nodes. Increment the number in the name (",(0,r.jsx)(o.code,{children:"bee-config-1"})," to ",(0,r.jsx)(o.code,{children:"bee-config-2"}),") for each new configuration file."]}),"\n",(0,r.jsxs)(o.p,{children:["Configure your nodes as desired, but ensure that the values ",(0,r.jsx)(o.code,{children:"api-addr"}),", ",(0,r.jsx)(o.code,{children:"data-dir"})," and ",(0,r.jsx)(o.code,{children:"p2p-addr"})," are unique for each configuration."]}),"\n",(0,r.jsx)(o.h2,{id:"monitoring",children:"Monitoring"}),"\n",(0,r.jsxs)(o.p,{children:["See the ",(0,r.jsx)(o.a,{href:"/docs/bee/working-with-bee/logs-and-files",children:"logging section"})," for more information on how to access your node's metrics. Share your community creations (such as ",(0,r.jsx)(o.a,{href:"https://github.com/doristeo/SwarmMonitoring",children:"swarmMonitor"})," - thanks doristeo!) in the ",(0,r.jsx)(o.a,{href:"https://discord.gg/kHRyMNpw7t",children:"#node-operators"})," channel of our Discord server so we can add you to our list of all things that are ",(0,r.jsx)(o.a,{href:"https://github.com/ethersphere/awesome-swarm",children:"awesome"})," and Swarm. \ud83e\udde1"]})]})}function h(e={}){const{wrapper:o}={...(0,i.R)(),...e.components};return o?(0,r.jsx)(o,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},28453(e,o,n){n.d(o,{R:()=>s,x:()=>a});var t=n(96540);const r={},i=t.createContext(r);function s(e){const o=t.useContext(i);return t.useMemo(function(){return"function"==typeof e?e(o):{...o,...e}},[o,e])}function a(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),t.createElement(i.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a23930e7.3045fb5e.js b/assets/js/a23930e7.3045fb5e.js new file mode 100644 index 000000000..478bff479 --- /dev/null +++ b/assets/js/a23930e7.3045fb5e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[3623],{39600(e,t,n){n.r(t),n.d(t,{assets:()=>r,contentTitle:()=>d,default:()=>h,frontMatter:()=>a,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"desktop/publish-a-website","title":"Publish a Website","description":"Publish a static website to Swarm from the Swarm Desktop app and access it via a Swarm hash.","source":"@site/docs/desktop/publish-a-website.md","sourceDirName":"desktop","slug":"/desktop/publish-a-website","permalink":"/docs/desktop/publish-a-website","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/desktop/publish-a-website.md","tags":[],"version":"current","frontMatter":{"title":"Publish a Website","id":"publish-a-website","description":"Publish a static website to Swarm from the Swarm Desktop app and access it via a Swarm hash."},"sidebar":"desktop","previous":{"title":"Backup and Restore","permalink":"/docs/desktop/backup-restore"},"next":{"title":"Start a Blog","permalink":"/docs/desktop/start-a-blog"}}');var i=n(74848),o=n(28453);const a={title:"Publish a Website",id:"publish-a-website",description:"Publish a static website to Swarm from the Swarm Desktop app and access it via a Swarm hash."},d=void 0,r={},l=[{value:"Step by Step Guide",id:"step-by-step-guide",level:2},{value:"Install Swarm Desktop and Deposit Funds",id:"install-swarm-desktop-and-deposit-funds",level:3},{value:"Setup Chequebook",id:"setup-chequebook",level:3},{value:"Publish Website",id:"publish-website",level:3},{value:"Connecting an ENS Domain to Your Website",id:"connecting-an-ens-domain-to-your-website",level:3},{value:"Update the Website: Set up and update a feed",id:"update-the-website-set-up-and-update-a-feed",level:3},{value:"Set up a Feed:",id:"set-up-a-feed",level:4},{value:"Upload Website on Swarm and connect it to the Feed:",id:"upload-website-on-swarm-and-connect-it-to-the-feed",level:4}];function c(e){const t={a:"a",code:"code",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h2,{id:"step-by-step-guide",children:"Step by Step Guide"}),"\n",(0,i.jsx)(t.h3,{id:"install-swarm-desktop-and-deposit-funds",children:"Install Swarm Desktop and Deposit Funds"}),"\n",(0,i.jsxs)(t.p,{children:["First, download and ",(0,i.jsx)(t.a,{href:"/docs/desktop/install",children:"install the Swarm Desktop App"}),". Next, add xDAI (transaction fees) to your Node Wallet address. If you possess xBZZ (storage fees), you can deposit it alongside the xDAI. Otherwise, you can exchange your xDAI for xBZZ using the Swarm Desktop app."]}),"\n",(0,i.jsx)(t.p,{children:"Follow these steps to deposit funds:"}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsx)(t.li,{children:"Launch the Swarm Desktop App and go to the Account section in the left menu."}),"\n",(0,i.jsx)(t.li,{children:"Transfer xDAI to your node wallet address. For safety, we suggest sending no more than 5 to 10 xDAI."}),"\n",(0,i.jsx)(t.li,{children:"After funding your wallet, click the Top Up Wallet button on the right side of the screen."}),"\n",(0,i.jsx)(t.li,{children:"Select the Use xDAI option."}),"\n",(0,i.jsx)(t.li,{children:"Verify your xDAI balance and click Proceed."}),"\n",(0,i.jsx)(t.li,{children:"Specify the amount of xDAI to convert to xBZZ and click Swap Now."}),"\n",(0,i.jsx)(t.li,{children:"Your Node Wallet address will be credited with xBZZ."}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{src:n(70490).A+"",width:"1634",height:"948"})}),"\n",(0,i.jsx)(t.h3,{id:"setup-chequebook",children:"Setup Chequebook"}),"\n",(0,i.jsx)(t.p,{children:"Your node address is now funded with xDAI and xBZZ. However, to upload data on Swarm, you will need to transfer your funds to the Chequebook contract address."}),"\n",(0,i.jsx)(t.p,{children:"Follow these steps:"}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsx)(t.li,{children:"Go to the Account section in the left menu."}),"\n",(0,i.jsx)(t.li,{children:"Select the Chequebook tab in the top menu."}),"\n",(0,i.jsx)(t.li,{children:"Click the Deposit button."}),"\n",(0,i.jsx)(t.li,{children:"Specify the amount of xBZZ to deposit into your Chequebook, which will be used for storage costs."}),"\n"]}),"\n",(0,i.jsx)(t.h3,{id:"publish-website",children:"Publish Website"}),"\n",(0,i.jsx)(t.p,{children:"To publish your website on Swarm, follow these steps:"}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsx)(t.li,{children:"Navigate to the Files tab."}),"\n",(0,i.jsx)(t.li,{children:"Click the Add Website button."}),"\n",(0,i.jsx)(t.li,{children:"Select your website folder. NOTE: The index.html file should be in the root folder."}),"\n",(0,i.jsx)(t.li,{children:"Purchase a Postage Stamp to publish your page. NOTE: Postage stamps cover storage costs for a specified duration."}),"\n",(0,i.jsx)(t.li,{children:"Upload the website."}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{src:n(33589).A+"",width:"1280",height:"720"})}),"\n",(0,i.jsx)(t.p,{children:"Once uploaded, your website can be accessed through its Swarm hash via your local Bee node or through a public gateway. Sharing the hash is a convenient way to distribute your content to users who aren't running their own Bee node\u2014they can access it directly through any Swarm gateway."}),"\n",(0,i.jsx)(t.p,{children:"Your website is now accessible via:"}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.strong,{children:"Local Bee node:"})}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:"http://localhost:1633/bzz/bc9b942212421e2a19fe1ffdf0add641ae530923041ea8f549381747b14b2f2d/\n"})}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.strong,{children:"Public gateway:"})}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:"https://api.gateway.ethswarm.org/bzz/bc9b942212421e2a19fe1ffdf0add641ae530923041ea8f549381747b14b2f2d/\n"})}),"\n",(0,i.jsx)(t.p,{children:"Replace the hash with your actual website hash."}),"\n",(0,i.jsx)(t.h3,{id:"connecting-an-ens-domain-to-your-website",children:"Connecting an ENS Domain to Your Website"}),"\n",(0,i.jsx)(t.p,{children:"Associating your ENS domain with a Swarm hash generates a memorable, user-friendly identifier for your website, allowing users to easily locate and access your website without having to recall a lengthy, complex Swarm hash."}),"\n",(0,i.jsx)(t.p,{children:"Initially, you\u2019ll need to register your domain name. To register and manage your ENS domain, you can use the ENS Domains Dapp along with the MetaMask browser extension."}),"\n",(0,i.jsx)(t.p,{children:"After registering your name and connecting MetaMask to the relevant Ethereum account, set the resolver to use the public ENS if you haven\u2019t already."}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsx)(t.li,{children:"Navigate to My Names and select the name you want to link to your Swarm content."}),"\n",(0,i.jsx)(t.li,{children:"Click on ADD/EDIT RECORD."}),"\n",(0,i.jsx)(t.li,{children:'From the "add record" dropdown menu, select Content.'}),"\n",(0,i.jsx)(t.li,{children:'Enter your Swarm Hash, beginning with "bzz://" and click "Save."'}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{src:n(35324).A+"",width:"1280",height:"720"})}),"\n",(0,i.jsx)(t.p,{children:"Your website is now available on:"}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.a,{href:"https://api.gateway.ethswarm.org/bzz/swarm-devrel.eth/",children:"https://api.gateway.ethswarm.org/bzz/swarm-devrel.eth/"})}),"\n",(0,i.jsx)(t.h3,{id:"update-the-website-set-up-and-update-a-feed",children:"Update the Website: Set up and update a feed"}),"\n",(0,i.jsx)(t.p,{children:"Swarm feeds allow you to easily create a permanent address for your content stored on Swarm that you can update at any time."}),"\n",(0,i.jsx)(t.p,{children:"If you plan to update your website in the future, it\u2019s recommended that you set up a \u201cFeed\u201d before uploading your website to Swarm. This way, the Swarm Hash connected to your ENS domain will stay the same, even as you change the content behind that hash. This will enable you to update your website\u2019s content without changing the Swarm Hash and incurring Ethereum transaction costs each time you do so."}),"\n",(0,i.jsx)(t.h4,{id:"set-up-a-feed",children:"Set up a Feed:"}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsx)(t.li,{children:"Navigate to to Account"}),"\n",(0,i.jsx)(t.li,{children:"Click on Feeds in the top menu"}),"\n",(0,i.jsx)(t.li,{children:"Click on Create New Feed"}),"\n",(0,i.jsx)(t.li,{children:"Define Identity name"}),"\n",(0,i.jsx)(t.li,{children:"And click Create Feed."}),"\n"]}),"\n",(0,i.jsx)(t.h4,{id:"upload-website-on-swarm-and-connect-it-to-the-feed",children:"Upload Website on Swarm and connect it to the Feed:"}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsx)(t.li,{children:"Navigate to to Account"}),"\n",(0,i.jsx)(t.li,{children:"Click on Feeds in the top menu"}),"\n",(0,i.jsx)(t.li,{children:"Choose the Feed you want to update"}),"\n",(0,i.jsx)(t.li,{children:"Click View Feed Page"}),"\n",(0,i.jsx)(t.li,{children:"Click the Add Website button."}),"\n",(0,i.jsx)(t.li,{children:"Select your website folder. NOTE: The index.html file should be in the root folder."}),"\n",(0,i.jsx)(t.li,{children:"Add Postage Stamp to publish your page. NOTE: Postage stamps cover storage costs for a specified duration."}),"\n",(0,i.jsx)(t.li,{children:"Upload the website to your Node."}),"\n",(0,i.jsx)(t.li,{children:"Connect the Feed hash to your ENS domain using the ENS steps shown earlier."}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{src:n(49487).A+"",width:"1280",height:"720"})}),"\n",(0,i.jsx)(t.p,{children:"By following these instructions, you can now leverage the benefits of decentralised storage, maintain a censorship-resistant website, and create a user-friendly experience by connecting your site to an ENS domain."})]})}function h(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},70490(e,t,n){n.d(t,{A:()=>s});const s=n.p+"assets/images/upload-a-website1-9a7bf23ce92e8efdeccf4c0d888f8124.gif"},33589(e,t,n){n.d(t,{A:()=>s});const s=n.p+"assets/images/upload-a-website2-bce37190157d9a4461531cc77c5db23d.gif"},35324(e,t,n){n.d(t,{A:()=>s});const s=n.p+"assets/images/upload-a-website3-fc23c1f073a0c55d95b7d08f7132c697.gif"},49487(e,t,n){n.d(t,{A:()=>s});const s=n.p+"assets/images/upload-a-website4-955dd24d27a0c99c2518b0c87f7d545d.gif"},28453(e,t,n){n.d(t,{R:()=>a,x:()=>d});var s=n(96540);const i={},o=s.createContext(i);function a(e){const t=s.useContext(o);return s.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a670bcb3.359ea40a.js b/assets/js/a670bcb3.359ea40a.js new file mode 100644 index 000000000..33e439fce --- /dev/null +++ b/assets/js/a670bcb3.359ea40a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[3615],{1448(e,o,t){t.r(o),t.d(o,{assets:()=>h,contentTitle:()=>a,default:()=>g,frontMatter:()=>r,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"bee/installation/set-target-neighborhood","title":"Set Target Neighborhood","description":"Explains how to strategically assign node neighborhoods using Swarmscan data to optimize staking rewards and network resilience.","source":"@site/docs/bee/installation/set-target-neighborhood.md","sourceDirName":"bee/installation","slug":"/bee/installation/set-target-neighborhood","permalink":"/docs/bee/installation/set-target-neighborhood","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/bee/installation/set-target-neighborhood.md","tags":[],"version":"current","frontMatter":{"title":"Set Target Neighborhood","id":"set-target-neighborhood","description":"Explains how to strategically assign node neighborhoods using Swarmscan data to optimize staking rewards and network resilience."},"sidebar":"bee","previous":{"title":"Build from Source","permalink":"/docs/bee/installation/build-from-source"},"next":{"title":"Hive","permalink":"/docs/bee/installation/hive"}}');var s=t(74848),i=t(28453);const r={title:"Set Target Neighborhood",id:"set-target-neighborhood",description:"Explains how to strategically assign node neighborhoods using Swarmscan data to optimize staking rewards and network resilience."},a=void 0,h={},d=[{value:"Setting Neighborhood Manually",id:"setting-neighborhood-manually",level:2}];function l(e){const o={a:"a",admonition:"admonition",code:"code",h2:"h2",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(o.p,{children:["In older versions of Bee, ",(0,s.jsx)(o.a,{href:"/docs/concepts/DISC/neighborhoods",children:"neighborhood"})," assignment was random by default. However, we can maximize a node's chances of winning xBZZ and also strengthen the resiliency of the network by strategically assigning neighborhoods to new nodes (see the ",(0,s.jsx)(o.a,{href:"/docs/bee/working-with-bee/staking",children:"staking section"})," for more details)."]}),"\n",(0,s.jsxs)(o.p,{children:["Therefore the default Bee configuration now includes the ",(0,s.jsx)(o.code,{children:"neighborhood-suggester"})," option, which is set by default to use the Swarmscan neighborhood suggester (",(0,s.jsx)(o.code,{children:"https://api.swarmscan.io/v1/network/neighborhoods/suggestion"}),"). You can use an alternative suggester URL, but it must return a JSON response in the following format: ",(0,s.jsx)(o.code,{children:'{"neighborhood":"101000110101"}'}),". However, we currently recommend using only the default suggester."]}),"\n",(0,s.jsx)(o.admonition,{type:"info",children:(0,s.jsx)(o.p,{children:"The Swarmscan neighborhood selector prioritizes the least populated neighborhood. If a neighborhood contains imbalanced sub-neighborhoods, it will suggest the least populated sub-neighborhood instead. Furthermore, the suggester will temporarily de-prioritize previously suggested neighborhoods based on the assumption that a new node is being created in each suggested neighborhood so that multiple nodes do not simultaneously attempt to join the same neighborhood."})}),"\n",(0,s.jsx)(o.h2,{id:"setting-neighborhood-manually",children:"Setting Neighborhood Manually"}),"\n",(0,s.jsxs)(o.p,{children:["It's recommended to use the default ",(0,s.jsx)(o.code,{children:"neighborhood-suggester"})," configuration for choosing your node's neighborhood, however you may also set your node's neighborhood manually using the ",(0,s.jsx)(o.code,{children:"target-neighborhood"})," option."]}),"\n",(0,s.jsxs)(o.p,{children:["To use this option, it's first necessary to identify potential target neighborhoods. You can find underpopulated neighborhoods using the ",(0,s.jsx)(o.a,{href:"https://swarmscan.io/neighborhoods",children:"Swarmscan website"}),". It ranks neighborhoods from least to most populated and displays their leading binary bits. Simply copy the leading bits from one of the least populated neighborhoods (for example, ",(0,s.jsx)(o.code,{children:"0010100001"}),") and use it to set ",(0,s.jsx)(o.code,{children:"target-neighborhood"}),". After doing so, an overlay address within that neighborhood will be generated when starting Bee for the first time."]}),"\n",(0,s.jsx)(o.pre,{children:(0,s.jsx)(o.code,{className:"language-yaml",children:'# bee.yaml\ntarget-neighborhood: "0010100001"\n'})}),"\n",(0,s.jsxs)(o.p,{children:["You can also use the ",(0,s.jsx)(o.a,{href:"https://api.swarmscan.io/#tag/Network/paths/~1v1~1network~1neighborhoods~1suggestion/get",children:"Swarmscan API endpoint"})," to programmatically retrieve a suggested neighborhood:"]}),"\n",(0,s.jsx)(o.pre,{children:(0,s.jsx)(o.code,{className:"language-bash",children:"curl https://api.swarmscan.io/v1/network/neighborhoods/suggestion\n"})}),"\n",(0,s.jsx)(o.p,{children:"A suggested neighborhood will be returned:"}),"\n",(0,s.jsx)(o.pre,{children:(0,s.jsx)(o.code,{className:"language-bash",children:'{"neighborhood":"1111110101"}\n'})})]})}function g(e={}){const{wrapper:o}={...(0,i.R)(),...e.components};return o?(0,s.jsx)(o,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},28453(e,o,t){t.d(o,{R:()=>r,x:()=>a});var n=t(96540);const s={},i=n.createContext(s);function r(e){const o=n.useContext(i);return n.useMemo(function(){return"function"==typeof e?e(o):{...o,...e}},[o,e])}function a(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),n.createElement(i.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a68c8598.823cda73.js b/assets/js/a68c8598.823cda73.js new file mode 100644 index 000000000..c6cfb4b22 --- /dev/null +++ b/assets/js/a68c8598.823cda73.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[7183],{27981(e,n,t){t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>h,default:()=>f,frontMatter:()=>d,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"concepts/DISC/disc","title":"DISC","description":"Overview of Swarm\'s Distributed Immutable Store for Chunks system using Kademlia neighborhoods and synchronization protocols.","source":"@site/docs/concepts/DISC/DISC.mdx","sourceDirName":"concepts/DISC","slug":"/concepts/DISC/","permalink":"/docs/concepts/DISC/","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/concepts/DISC/DISC.mdx","tags":[],"version":"current","frontMatter":{"title":"DISC","id":"disc","description":"Overview of Swarm\'s Distributed Immutable Store for Chunks system using Kademlia neighborhoods and synchronization protocols."},"sidebar":"concepts","previous":{"title":"What is Swarm?","permalink":"/docs/concepts/what-is-swarm"},"next":{"title":"Kademlia","permalink":"/docs/concepts/DISC/kademlia"}}');var a=t(74848),o=t(28453);const r=t.p+"assets/images/bos_fig_2_7-160d775553d44403c5773971ab62c7bc.jpg",i=t.p+"assets/images/bos_fig_2_10-9712b5ea83e60fdd908b2358262b6284.jpg",d={title:"DISC",id:"disc",description:"Overview of Swarm's Distributed Immutable Store for Chunks system using Kademlia neighborhoods and synchronization protocols."},h=void 0,c={},l=[{value:"Kademlia Topology and Routing",id:"kademlia-topology-and-routing",level:2},{value:"Neighborhoods",id:"neighborhoods",level:2},{value:"Chunks",id:"chunks",level:2},{value:"Content-Addressed Chunks and Single-Owner Chunks",id:"content-addressed-chunks-and-single-owner-chunks",level:3},{value:"Push-Sync, Pull-Sync, and Retrieval Protocols",id:"push-sync-pull-sync-and-retrieval-protocols",level:2}];function u(e){const n={a:"a",em:"em",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.p,{children:["DISC (Distributed Immutable Store for Chunks) is a storage solution developed by Swarm based on a modified implementation of a ",(0,a.jsx)(n.a,{href:"/docs/concepts/DISC/kademlia",children:"Kademlia DHT"})," which has been specialized for data storage. Swarm's implementation of a DHT differs significantly in that it stores the content in the DHT directly, rather than just storing a list of seeders who are able to serve the content. This approach allows for much faster and more efficient retrieval of data."]}),"\n",(0,a.jsx)(n.h2,{id:"kademlia-topology-and-routing",children:"Kademlia Topology and Routing"}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"/docs/concepts/DISC/kademlia",children:"Kademlia"})," is a distributed hash table (DHT) widely used in peer-to-peer networks such as Ethereum and Bittorent. It serves as the routing and topology foundation for communication between nodes in the Swarm network. It organizes nodes based on their overlay addresses and ensures that messages are relayed efficiently, even in a dynamic, decentralized environment."]}),"\n",(0,a.jsx)(n.p,{children:'One of the advantages of using Kademlia as a model for network topology is that both the number of forwarding "hops" required to route a chunk to its destination and the number of peer connections required to maintain Kademlia topology are logarithmic to the size of the network (a minimum of two connections is required in order to maintain Kademlia topology in case of network churn - nodes dropping in and out of the network). This makes Swarm a highly scalable system which is efficient even at very large scales.'}),"\n",(0,a.jsx)(n.h2,{id:"neighborhoods",children:"Neighborhoods"}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"/docs/concepts/DISC/neighborhoods",children:"Neighborhoods"})," are groups of nodes which are responsible for sharing the same chunks. The chunks which each neighborhood is responsible for storing are defined by the proximity order of the nodes and the chunks. In other words, each node is responsible for storing chunks with which their overlay addresses share a certain number of prefix bits, and together with other nodes which share the same prefix bits, make up neighborhoods which share the responsibility for storing the same chunks."]}),"\n",(0,a.jsxs)(n.p,{children:["Neighborhoods play a key role in providing data redundancy for chunks stored on Swarm since each node in a neighborhood will keep copies of the same chunks. The optional ",(0,a.jsx)(n.a,{href:"/docs/concepts/DISC/erasure-coding",children:"erasure coding"})," feature can also be enabled for added redundancy and greater data protection."]}),"\n",(0,a.jsx)(n.h2,{id:"chunks",children:"Chunks"}),"\n",(0,a.jsxs)(n.p,{children:["In the DISC model, ",(0,a.jsx)(n.strong,{children:"chunks"})," are the basic storage unit of the network layer.\nWhen a file is uploaded to Swarm, it gets broken down into chunks - pieces of at most 4KB, each with a small metadata header.\nEvery chunk gets its own address, and each chunk is stored by the nodes whose ",(0,a.jsx)(n.a,{href:"/docs/references/glossary#overlay",children:"overlay addresses"})," are closest to that chunk address.\nChunk addressing is ",(0,a.jsx)(n.em,{children:"deterministic, collision-free, and uniformly distributed,"})," which is what gives Swarm local validity, integrity guarantee, and load balancing across nodes.\nThere are two fundamental chunk types: content-addressed chunks and single-owner chunks."]}),"\n",(0,a.jsx)(n.h3,{id:"content-addressed-chunks-and-single-owner-chunks",children:"Content-Addressed Chunks and Single-Owner Chunks"}),"\n",(0,a.jsx)(n.p,{children:"Content-addressed chunks are chunks whose address is based on the hash digest of their data.\nUsing a hash as the chunk address makes it possible to verify the integrity of chunk data.\nSwarm uses the BMT hash function, a binary Merkle tree (BMT) built with Keccak256 over the 32-byte segments of the chunk data; payloads shorter than 4KB are hashed as if zero-padded up to 4KB.\nA content-addressed chunk has an at most 4KB payload, and its address is calculated as the hash of the 8-byte span and the BMT root of the payload.\nBecause the address is derived from the content, a content-addressed chunk cannot be changed in place.\nDifferent content yields a different address."}),"\n",(0,a.jsxs)("div",{style:{textAlign:"center"},children:[(0,a.jsx)("img",{src:r,className:"responsive-image"}),(0,a.jsx)("p",{style:{fontStyle:"italic",marginTop:"0.5rem"},children:(0,a.jsxs)(n.p,{children:["Source: ",(0,a.jsx)("a",{href:"https://www.ethswarm.org/the-book-of-swarm-2.pdf#subsection.2.2.2",target:"_blank",children:'The Book of Swarm - Figure 2.7 - "Content addressed chunk"'})]})})]}),"\n",(0,a.jsx)(n.p,{children:"For single-owner chunks on the other hand, the address is calculated as the hash of an identifier and an owner's Ethereum address.\nThe content consists of an arbitrary data payload along with required headers: a 32-byte identifier, a 65-byte signature, and the same 8-byte span used by content-addressed chunks.\nThe signature signs off on the identifier and the BMT hash of the span and payload, so integrity comes from the owner's signature rather than from the content itself.\nValidating a single-owner chunk means recovering the owner's address from the signature and checking the hash of the identifier and that address against the chunk address, which is in effect, an authentication that the owner has write access to that address."}),"\n",(0,a.jsxs)("div",{style:{textAlign:"center"},children:[(0,a.jsx)("img",{src:i,className:"responsive-image"}),(0,a.jsx)("p",{style:{fontStyle:"italic",marginTop:"0.5rem"},children:(0,a.jsxs)(n.p,{children:["Source: ",(0,a.jsx)("a",{href:"https://www.ethswarm.org/the-book-of-swarm-2.pdf#subsection.2.2.3",target:"_blank",children:'The Book of Swarm - Figure 2.10 - "Single owner chunk"'})]})})]}),"\n",(0,a.jsx)(n.p,{children:"Single-owner chunks form the basis for feeds.\nA feed chunk is a single-owner chunk whose identifier is the hash of a feed topic and an index, so each update is published as a new chunk at a new, deterministically derivable address.\nA reader can therefore find the latest update from the owner's address and the topic alone, even though no individual chunk is ever overwritten, meaning the chunk store itself remains immutable."}),"\n",(0,a.jsxs)(n.table,{children:[(0,a.jsx)(n.thead,{children:(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.th,{}),(0,a.jsx)(n.th,{children:"Content-addressed chunk (CAC)"}),(0,a.jsx)(n.th,{children:"Single-owner chunk (SOC)"})]})}),(0,a.jsxs)(n.tbody,{children:[(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"Address derived from"}),(0,a.jsx)(n.td,{children:"Hash of the 8-byte span and the BMT root of the payload"}),(0,a.jsx)(n.td,{children:"Hash of the 32-byte identifier and the owner's Ethereum address"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"Integrity attested by"}),(0,a.jsx)(n.td,{children:"The content itself \u2014 the address is the hash of the content"}),(0,a.jsx)(n.td,{children:"The owner's signature over the identifier and the BMT hash of span and payload"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"Chunk mutable?"}),(0,a.jsx)(n.td,{children:"No \u2014 different content yields a different address"}),(0,a.jsx)(n.td,{children:"No \u2014 signing a second payload for the same identifier makes network behaviour unpredictable; mutability is achieved at the feed layer"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"Max payload"}),(0,a.jsx)(n.td,{children:"4 KB + 8-byte span header"}),(0,a.jsx)(n.td,{children:"4 KB + 105 bytes of headers (identifier, signature, span)"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"Basis for"}),(0,a.jsx)(n.td,{children:"File and manifest data"}),(0,a.jsx)(n.td,{children:"Feeds (a mutable resource resolved from owner address + topic)"})]})]})]}),"\n",(0,a.jsx)(n.h2,{id:"push-sync-pull-sync-and-retrieval-protocols",children:"Push-Sync, Pull-Sync, and Retrieval Protocols"}),"\n",(0,a.jsxs)(n.p,{children:["When a file is first uploaded to Swarm, it gets broken down by the uploading Bee node chunks which are then distributed amongst other Bee nodes in the Swarm network. Chunks get distributed to the target neighborhood by the ",(0,a.jsx)(n.em,{children:(0,a.jsx)(n.strong,{children:"push-sync"})})," protocol. Once a chunk reaches its destination, it will then be duplicated and synced to other nodes in order to achieve data redundancy through the ",(0,a.jsx)(n.em,{children:(0,a.jsx)(n.strong,{children:"pull-sync"})})," protocol. The pull-sync protocol operates continuously as nodes enter or exit the network \u2013 ensuring that data redundancy is always maintained. When a client node requests a file for download, its request gets forwarded by the ",(0,a.jsx)(n.em,{children:(0,a.jsx)(n.strong,{children:"retrieval-protocol"})})," to all the nodes storing the relevant chunks, and then those chunks get returned to the requesting node and the file gets reconstructed from its constituent chunks."]})]})}function f(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(u,{...e})}):u(e)}},28453(e,n,t){t.d(n,{R:()=>r,x:()=>i});var s=t(96540);const a={},o=s.createContext(a);function r(e){const n=s.useContext(o);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a6aa9e1f.23e242b1.js b/assets/js/a6aa9e1f.23e242b1.js new file mode 100644 index 000000000..0a3fedf9e --- /dev/null +++ b/assets/js/a6aa9e1f.23e242b1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[7643],{25625(e,t,s){s.r(t),s.d(t,{default:()=>$e});var a=s(96540),n=s(34164),l=s(44586),r=s(45500),i=s(17559),o=s(98587),c=s(36882),m=s(24581),d=s(21312),h=s(89532),u=(s(36803),s(74848));const g=a.createContext(null);function x(e){let t=e.children,s=e.content,n=e.isBlogPostPage;const l=function(e){let t=e.content,s=e.isBlogPostPage;return(0,a.useMemo)(()=>({metadata:t.metadata,frontMatter:t.frontMatter,assets:t.assets,toc:t.toc,isBlogPostPage:s}),[t,s])}({content:s,isBlogPostPage:void 0!==n&&n});return(0,u.jsx)(g.Provider,{value:l,children:t})}function p(){const e=(0,a.useContext)(g);if(null===e)throw new h.dV("BlogPostProvider");return e}var j=s(86025);const f=e=>new Date(e).toISOString();function v(e){const t=e.map(N);return{author:1===t.length?t[0]:t}}function b(e,t,s){return e?{image:A({imageUrl:t(e,{absolute:!0}),caption:"title image for the blog post: "+s})}:{}}function w(e){const t=(0,l.A)().siteConfig,s=(0,j.hH)().withBaseUrl,a=e.metadata,n=a.blogDescription,r=a.blogTitle,i=a.permalink,o=""+t.url+i;return{"@context":"https://schema.org","@type":"Blog","@id":o,mainEntityOfPage:o,headline:r,description:n,blogPost:e.items.map(e=>function(e,t,s){var a,n;const l=e.assets,r=e.frontMatter,i=e.metadata,o=i.date,c=i.title,m=i.description,d=i.lastUpdatedAt,h=null!=(a=l.image)?a:r.image,u=null!=(n=r.keywords)?n:[],g=""+t.url+i.permalink,x=d?f(d):void 0;return Object.assign({"@type":"BlogPosting","@id":g,mainEntityOfPage:g,url:g,headline:c,name:c,description:m,datePublished:o},x?{dateModified:x}:{},v(i.authors),b(h,s,c),u?{keywords:u}:{})}(e.content,t,s))}}function N(e){return Object.assign({"@type":"Person"},e.name?{name:e.name}:{},e.title?{description:e.title}:{},e.url?{url:e.url}:{},e.email?{email:e.email}:{},e.imageURL?{image:e.imageURL}:{})}function A(e){let t=e.imageUrl;return{"@type":"ImageObject","@id":t,url:t,contentUrl:t,caption:e.caption}}var M=s(56347),k=s(28774),C=s(31682),_=s(99169);function y(e){const t=(0,M.zy)().pathname;return(0,a.useMemo)(()=>e.filter(e=>function(e,t){return!(e.unlisted&&!(0,_.ys)(e.permalink,t))}(e,t)),[e,t])}function P(e){let t=e.items,s=e.ulClassName,a=e.liClassName,n=e.linkClassName,l=e.linkActiveClassName;return(0,u.jsx)("ul",{className:s,children:t.map(e=>(0,u.jsx)("li",{className:a,children:(0,u.jsx)(k.A,{isNavLink:!0,to:e.permalink,className:n,activeClassName:l,children:e.title})},e.permalink))})}var O=s(6342),B=s(51107);function I(e){let t=e.year,s=e.yearGroupHeadingClassName,a=e.children;return(0,u.jsxs)("div",{role:"group",children:[(0,u.jsx)(B.A,{as:"h3",className:s,children:t}),a]})}function T(e){let t=e.items,s=e.yearGroupHeadingClassName,a=e.ListComponent;if((0,O.p)().blog.sidebar.groupByYear){const e=function(e){const t=(0,C.$z)(e,e=>""+new Date(e.date).getFullYear()),s=Object.entries(t);return s.reverse(),s}(t);return(0,u.jsx)(u.Fragment,{children:e.map(e=>{let t=e[0],n=e[1];return(0,u.jsx)(I,{year:t,yearGroupHeadingClassName:s,children:(0,u.jsx)(a,{items:n})},t)})})}return(0,u.jsx)(a,{items:t})}const L=(0,a.memo)(T),H="sidebar_re4s",F="sidebarItemTitle_pO2u",Z="sidebarItemList_Yudw",U="sidebarItem__DBe",R="sidebarItemLink_mo7H",z="sidebarItemLinkActive_I1ZP",G="yearGroupHeading_rMGB",S=e=>{let t=e.items;return(0,u.jsx)(P,{items:t,ulClassName:(0,n.A)(Z,"clean-list"),liClassName:U,linkClassName:R,linkActiveClassName:z})};function D(e){let t=e.sidebar;const s=y(t.items);return(0,u.jsx)("aside",{className:"col col--3",children:(0,u.jsxs)("nav",{className:(0,n.A)(H,"thin-scrollbar"),"aria-label":(0,d.T)({id:"theme.blog.sidebar.navAriaLabel",message:"Blog recent posts navigation",description:"The ARIA label for recent posts in the blog sidebar"}),children:[(0,u.jsx)("div",{className:(0,n.A)(F,"margin-bottom--md"),children:t.title}),(0,u.jsx)(L,{items:s,ListComponent:S,yearGroupHeadingClassName:G})]})})}const V=(0,a.memo)(D);var Y=s(75600);const E="yearGroupHeading_QT03",X=e=>{let t=e.items;return(0,u.jsx)(P,{items:t,ulClassName:"menu__list",liClassName:"menu__list-item",linkClassName:"menu__link",linkActiveClassName:"menu__link--active"})};function W(e){const t=y(e.sidebar.items);return(0,u.jsx)(L,{items:t,ListComponent:X,yearGroupHeadingClassName:E})}function J(e){return(0,u.jsx)(Y.GX,{component:W,props:e})}const q=(0,a.memo)(J);function Q(e){let t=e.sidebar;const s=(0,m.l)();return null!=t&&t.items.length?"mobile"===s?(0,u.jsx)(q,{sidebar:t}):(0,u.jsx)(V,{sidebar:t}):null}const $=["sidebar","toc","children"];function K(e){const t=e.sidebar,s=e.toc,a=e.children,l=(0,o.A)(e,$),r=t&&t.items.length>0;return(0,u.jsx)(c.A,Object.assign({},l,{children:(0,u.jsx)("div",{className:"container margin-vert--lg",children:(0,u.jsxs)("div",{className:"row",children:[(0,u.jsx)(Q,{sidebar:t}),(0,u.jsx)("main",{className:(0,n.A)("col",{"col--7":r,"col--9 col--offset-1":!r}),children:a}),s&&(0,u.jsx)("div",{className:"col col--2",children:s})]})})}))}var ee=s(39022);function te(e){const t=e.metadata,s=t.previousPage,a=t.nextPage;return(0,u.jsxs)("nav",{className:"pagination-nav","aria-label":(0,d.T)({id:"theme.blog.paginator.navAriaLabel",message:"Blog list page navigation",description:"The ARIA label for the blog pagination"}),children:[s&&(0,u.jsx)(ee.A,{permalink:s,title:(0,u.jsx)(d.A,{id:"theme.blog.paginator.newerEntries",description:"The label used to navigate to the newer blog posts page (previous page)",children:"Newer entries"})}),a&&(0,u.jsx)(ee.A,{permalink:a,title:(0,u.jsx)(d.A,{id:"theme.blog.paginator.olderEntries",description:"The label used to navigate to the older blog posts page (next page)",children:"Older entries"}),isNext:!0})]})}var se=s(41463);function ae(e){let t=e.children,s=e.className;return(0,u.jsx)("article",{className:s,children:t})}const ne="title_f1Hy";function le(e){let t=e.className;const s=p(),a=s.metadata,l=s.isBlogPostPage,r=a.permalink,i=a.title,o=l?"h1":"h2";return(0,u.jsx)(o,{className:(0,n.A)(ne,t),children:l?i:(0,u.jsx)(k.A,{to:r,children:i})})}var re=s(53465),ie=s(36266);const oe="container_mt6G";function ce(e){let t=e.readingTime;const s=function(){const e=(0,re.W)().selectMessage;return t=>{const s=Math.ceil(t);return e(s,(0,d.T)({id:"theme.blog.post.readingTime.plurals",description:'Pluralized label for "{readingTime} min read". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',message:"One min read|{readingTime} min read"},{readingTime:s}))}}();return(0,u.jsx)(u.Fragment,{children:s(t)})}function me(e){let t=e.date,s=e.formattedDate;return(0,u.jsx)("time",{dateTime:t,children:s})}function de(){return(0,u.jsx)(u.Fragment,{children:" \xb7 "})}function he(e){let t=e.className;const s=p().metadata,a=s.date,l=s.readingTime,r=(0,ie.i)({day:"numeric",month:"long",year:"numeric",timeZone:"UTC"});return(0,u.jsxs)("div",{className:(0,n.A)(oe,"margin-vert--md",t),children:[(0,u.jsx)(me,{date:a,formattedDate:(i=a,r.format(new Date(i)))}),void 0!==l&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(de,{}),(0,u.jsx)(ce,{readingTime:l})]})]});var i}const ue="githubSvg_Uu4N";const ge="xSvg_y3PF";const xe="linkedinSvg_FCgI";const pe=function(e){return(0,u.jsxs)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e,{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M1.2 12a10.8 10.8 0 1 0 21.6 0a10.8 10.8 0 0 0 -21.6 0"}),(0,u.jsx)("path",{d:"M1.92 8.4h20.16"}),(0,u.jsx)("path",{d:"M1.92 15.6h20.16"}),(0,u.jsx)("path",{d:"M11.4 1.2a20.4 20.4 0 0 0 0 21.6"}),(0,u.jsx)("path",{d:"M12.6 1.2a20.4 20.4 0 0 1 0 21.6"})]}))},je="blueskySvg_AzZw";const fe="instagramSvg_YC40";const ve="threadsSvg_PTXY";const be="authorSocials_rSDt",we="authorSocialLink_owbf",Ne="authorSocialIcon_XYv3",Ae={twitter:{Icon:function(e){return(0,u.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 209",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid"},e,{children:(0,u.jsx)("path",{d:"M256 25.45c-9.42 4.177-19.542 7-30.166 8.27 10.845-6.5 19.172-16.793 23.093-29.057a105.183 105.183 0 0 1-33.351 12.745C205.995 7.201 192.346.822 177.239.822c-29.006 0-52.523 23.516-52.523 52.52 0 4.117.465 8.125 1.36 11.97-43.65-2.191-82.35-23.1-108.255-54.876-4.52 7.757-7.11 16.78-7.11 26.404 0 18.222 9.273 34.297 23.365 43.716a52.312 52.312 0 0 1-23.79-6.57c-.003.22-.003.44-.003.661 0 25.447 18.104 46.675 42.13 51.5a52.592 52.592 0 0 1-23.718.9c6.683 20.866 26.08 36.05 49.062 36.475-17.975 14.086-40.622 22.483-65.228 22.483-4.24 0-8.42-.249-12.529-.734 23.243 14.902 50.85 23.597 80.51 23.597 96.607 0 149.434-80.031 149.434-149.435 0-2.278-.05-4.543-.152-6.795A106.748 106.748 0 0 0 256 25.45",fill:"#55acee"})}))},label:"Twitter"},github:{Icon:function(e){return(0,u.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 250",preserveAspectRatio:"xMidYMid",style:{"--dark":"#000","--light":"#fff"}},e,{className:(0,n.A)(e.className,ue),children:(0,u.jsx)("path",{d:"M128.001 0C57.317 0 0 57.307 0 128.001c0 56.554 36.676 104.535 87.535 121.46 6.397 1.185 8.746-2.777 8.746-6.158 0-3.052-.12-13.135-.174-23.83-35.61 7.742-43.124-15.103-43.124-15.103-5.823-14.795-14.213-18.73-14.213-18.73-11.613-7.944.876-7.78.876-7.78 12.853.902 19.621 13.19 19.621 13.19 11.417 19.568 29.945 13.911 37.249 10.64 1.149-8.272 4.466-13.92 8.127-17.116-28.431-3.236-58.318-14.212-58.318-63.258 0-13.975 5-25.394 13.188-34.358-1.329-3.224-5.71-16.242 1.24-33.874 0 0 10.749-3.44 35.21 13.121 10.21-2.836 21.16-4.258 32.038-4.307 10.878.049 21.837 1.47 32.066 4.307 24.431-16.56 35.165-13.12 35.165-13.12 6.967 17.63 2.584 30.65 1.255 33.873 8.207 8.964 13.173 20.383 13.173 34.358 0 49.163-29.944 59.988-58.447 63.157 4.591 3.972 8.682 11.762 8.682 23.704 0 17.126-.148 30.91-.148 35.126 0 3.407 2.304 7.398 8.792 6.14C219.37 232.5 256 184.537 256 128.002 256 57.307 198.691 0 128.001 0Zm-80.06 182.34c-.282.636-1.283.827-2.194.39-.929-.417-1.45-1.284-1.15-1.922.276-.655 1.279-.838 2.205-.399.93.418 1.46 1.293 1.139 1.931Zm6.296 5.618c-.61.566-1.804.303-2.614-.591-.837-.892-.994-2.086-.375-2.66.63-.566 1.787-.301 2.626.591.838.903 1 2.088.363 2.66Zm4.32 7.188c-.785.545-2.067.034-2.86-1.104-.784-1.138-.784-2.503.017-3.05.795-.547 2.058-.055 2.861 1.075.782 1.157.782 2.522-.019 3.08Zm7.304 8.325c-.701.774-2.196.566-3.29-.49-1.119-1.032-1.43-2.496-.726-3.27.71-.776 2.213-.558 3.315.49 1.11 1.03 1.45 2.505.701 3.27Zm9.442 2.81c-.31 1.003-1.75 1.459-3.199 1.033-1.448-.439-2.395-1.613-2.103-2.626.301-1.01 1.747-1.484 3.207-1.028 1.446.436 2.396 1.602 2.095 2.622Zm10.744 1.193c.036 1.055-1.193 1.93-2.715 1.95-1.53.034-2.769-.82-2.786-1.86 0-1.065 1.202-1.932 2.733-1.958 1.522-.03 2.768.818 2.768 1.868Zm10.555-.405c.182 1.03-.875 2.088-2.387 2.37-1.485.271-2.861-.365-3.05-1.386-.184-1.056.893-2.114 2.376-2.387 1.514-.263 2.868.356 3.061 1.403Z"})}))},label:"GitHub"},stackoverflow:{Icon:function(e){return(0,u.jsxs)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 169.61 200",width:"1em",height:"1em"},e,{children:[(0,u.jsx)("path",{d:"M140.44 178.38v-48.65h21.61V200H0v-70.27h21.61v48.65z",fill:"#bcbbbb"}),(0,u.jsx)("path",{d:"M124.24 140.54l4.32-16.22-86.97-17.83-3.78 17.83zM49.7 82.16L130.72 120l7.56-16.22-81.02-37.83zm22.68-40l68.06 57.3 11.35-13.51-68.6-57.3-11.35 13.51zM116.14 0l-14.59 10.81 53.48 71.89 14.58-10.81zM37.81 162.16h86.43v-16.21H37.81z",fill:"#f48024"})]}))},label:"Stack Overflow"},linkedin:{Icon:function(e){return(0,u.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid",viewBox:"0 0 256 256",style:{"--dark":"#0a66c2","--light":"#ffffffe6"}},e,{className:(0,n.A)(e.className,xe),children:(0,u.jsx)("path",{d:"M218.123 218.127h-37.931v-59.403c0-14.165-.253-32.4-19.728-32.4-19.756 0-22.779 15.434-22.779 31.369v60.43h-37.93V95.967h36.413v16.694h.51a39.907 39.907 0 0 1 35.928-19.733c38.445 0 45.533 25.288 45.533 58.186l-.016 67.013ZM56.955 79.27c-12.157.002-22.014-9.852-22.016-22.009-.002-12.157 9.851-22.014 22.008-22.016 12.157-.003 22.014 9.851 22.016 22.008A22.013 22.013 0 0 1 56.955 79.27m18.966 138.858H37.95V95.967h37.97v122.16ZM237.033.018H18.89C8.58-.098.125 8.161-.001 18.471v219.053c.122 10.315 8.576 18.582 18.89 18.474h218.144c10.336.128 18.823-8.139 18.966-18.474V18.454c-.147-10.33-8.635-18.588-18.966-18.453"})}))},label:"LinkedIn"},x:{Icon:function(e){return(0,u.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 1200 1227",style:{"--dark":"#000","--light":"#fff"}},e,{className:(0,n.A)(e.className,ge),children:(0,u.jsx)("path",{d:"M714.163 519.284 1160.89 0h-105.86L667.137 450.887 357.328 0H0l468.492 681.821L0 1226.37h105.866l409.625-476.152 327.181 476.152H1200L714.137 519.284h.026ZM569.165 687.828l-47.468-67.894-377.686-540.24h162.604l304.797 435.991 47.468 67.894 396.2 566.721H892.476L569.165 687.854v-.026Z"})}))},label:"X"},bluesky:{Icon:function(e){return(0,u.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid",viewBox:"0 0 256 226",style:{"--dark":"#0085ff","--light":"#0085ff"}},e,{className:(0,n.A)(e.className,je),children:(0,u.jsx)("path",{d:"M55.491 15.172c29.35 22.035 60.917 66.712 72.509 90.686 11.592-23.974 43.159-68.651 72.509-90.686C221.686-.727 256-13.028 256 26.116c0 7.818-4.482 65.674-7.111 75.068-9.138 32.654-42.436 40.983-72.057 35.942 51.775 8.812 64.946 38 36.501 67.187-54.021 55.433-77.644-13.908-83.696-31.676-1.11-3.257-1.63-4.78-1.637-3.485-.008-1.296-.527.228-1.637 3.485-6.052 17.768-29.675 87.11-83.696 31.676-28.445-29.187-15.274-58.375 36.5-67.187-29.62 5.041-62.918-3.288-72.056-35.942C4.482 91.79 0 33.934 0 26.116 0-13.028 34.314-.727 55.491 15.172Z"})}))},label:"Bluesky"},instagram:{Icon:function(e){return(0,u.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid",viewBox:"0 0 256 256",style:{"--dark":"#000","--light":"#fff"}},e,{className:(0,n.A)(e.className,fe),children:(0,u.jsx)("path",{d:"M128 23.064c34.177 0 38.225.13 51.722.745 12.48.57 19.258 2.655 23.769 4.408 5.974 2.322 10.238 5.096 14.717 9.575 4.48 4.479 7.253 8.743 9.575 14.717 1.753 4.511 3.838 11.289 4.408 23.768.615 13.498.745 17.546.745 51.723 0 34.178-.13 38.226-.745 51.723-.57 12.48-2.655 19.257-4.408 23.768-2.322 5.974-5.096 10.239-9.575 14.718-4.479 4.479-8.743 7.253-14.717 9.574-4.511 1.753-11.289 3.839-23.769 4.408-13.495.616-17.543.746-51.722.746-34.18 0-38.228-.13-51.723-.746-12.48-.57-19.257-2.655-23.768-4.408-5.974-2.321-10.239-5.095-14.718-9.574-4.479-4.48-7.253-8.744-9.574-14.718-1.753-4.51-3.839-11.288-4.408-23.768-.616-13.497-.746-17.545-.746-51.723 0-34.177.13-38.225.746-51.722.57-12.48 2.655-19.258 4.408-23.769 2.321-5.974 5.095-10.238 9.574-14.717 4.48-4.48 8.744-7.253 14.718-9.575 4.51-1.753 11.288-3.838 23.768-4.408 13.497-.615 17.545-.745 51.723-.745M128 0C93.237 0 88.878.147 75.226.77c-13.625.622-22.93 2.786-31.071 5.95-8.418 3.271-15.556 7.648-22.672 14.764C14.367 28.6 9.991 35.738 6.72 44.155 3.555 52.297 1.392 61.602.77 75.226.147 88.878 0 93.237 0 128c0 34.763.147 39.122.77 52.774.622 13.625 2.785 22.93 5.95 31.071 3.27 8.417 7.647 15.556 14.763 22.672 7.116 7.116 14.254 11.492 22.672 14.763 8.142 3.165 17.446 5.328 31.07 5.95 13.653.623 18.012.77 52.775.77s39.122-.147 52.774-.77c13.624-.622 22.929-2.785 31.07-5.95 8.418-3.27 15.556-7.647 22.672-14.763 7.116-7.116 11.493-14.254 14.764-22.672 3.164-8.142 5.328-17.446 5.95-31.07.623-13.653.77-18.012.77-52.775s-.147-39.122-.77-52.774c-.622-13.624-2.786-22.929-5.95-31.07-3.271-8.418-7.648-15.556-14.764-22.672C227.4 14.368 220.262 9.99 211.845 6.72c-8.142-3.164-17.447-5.328-31.071-5.95C167.122.147 162.763 0 128 0Zm0 62.27C91.698 62.27 62.27 91.7 62.27 128c0 36.302 29.428 65.73 65.73 65.73 36.301 0 65.73-29.428 65.73-65.73 0-36.301-29.429-65.73-65.73-65.73Zm0 108.397c-23.564 0-42.667-19.103-42.667-42.667S104.436 85.333 128 85.333s42.667 19.103 42.667 42.667-19.103 42.667-42.667 42.667Zm83.686-110.994c0 8.484-6.876 15.36-15.36 15.36-8.483 0-15.36-6.876-15.36-15.36 0-8.483 6.877-15.36 15.36-15.36 8.484 0 15.36 6.877 15.36 15.36Z"})}))},label:"Instagram"},threads:{Icon:function(e){return(0,u.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-label":"Threads",viewBox:"0 0 192 192",width:"1em",fill:"none",height:"1em",style:{"--dark":"#000","--light":"#fff"}},e,{className:(0,n.A)(e.className,ve),children:(0,u.jsx)("path",{d:"M141.537 88.988a66.667 66.667 0 0 0-2.518-1.143c-1.482-27.307-16.403-42.94-41.457-43.1h-.34c-14.986 0-27.449 6.396-35.12 18.036l13.779 9.452c5.73-8.695 14.724-10.548 21.348-10.548h.229c8.249.053 14.474 2.452 18.503 7.129 2.932 3.405 4.893 8.111 5.864 14.05-7.314-1.243-15.224-1.626-23.68-1.14-23.82 1.371-39.134 15.264-38.105 34.568.522 9.792 5.4 18.216 13.735 23.719 7.047 4.652 16.124 6.927 25.557 6.412 12.458-.683 22.231-5.436 29.049-14.127 5.178-6.6 8.453-15.153 9.899-25.93 5.937 3.583 10.337 8.298 12.767 13.966 4.132 9.635 4.373 25.468-8.546 38.376-11.319 11.308-24.925 16.2-45.488 16.351-22.809-.169-40.06-7.484-51.275-21.742C35.236 139.966 29.808 120.682 29.605 96c.203-24.682 5.63-43.966 16.133-57.317C56.954 24.425 74.204 17.11 97.013 16.94c22.975.17 40.526 7.52 52.171 21.847 5.71 7.026 10.015 15.86 12.853 26.162l16.147-4.308c-3.44-12.68-8.853-23.606-16.219-32.668C147.036 9.607 125.202.195 97.07 0h-.113C68.882.194 47.292 9.642 32.788 28.08 19.882 44.485 13.224 67.315 13.001 95.932L13 96v.067c.224 28.617 6.882 51.447 19.788 67.854C47.292 182.358 68.882 191.806 96.957 192h.113c24.96-.173 42.554-6.708 57.048-21.189 18.963-18.945 18.392-42.692 12.142-57.27-4.484-10.454-13.033-18.945-24.723-24.553ZM98.44 129.507c-10.44.588-21.286-4.098-21.82-14.135-.397-7.442 5.296-15.746 22.461-16.735 1.966-.114 3.895-.169 5.79-.169 6.235 0 12.068.606 17.371 1.765-1.978 24.702-13.58 28.713-23.802 29.274Z"})}))},label:"Threads"},mastodon:{Icon:function(e){const t=(0,a.useId)();return(0,u.jsxs)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 61 65",width:"1em",height:"1em"},e,{children:[(0,u.jsx)("path",{fill:"url(#"+t+")",d:"M60.754 14.39C59.814 7.406 53.727 1.903 46.512.836 45.294.656 40.682 0 29.997 0h-.08C19.23 0 16.938.656 15.72.836 8.705 1.873 2.299 6.82.745 13.886c-.748 3.48-.828 7.338-.689 10.877.198 5.075.237 10.142.697 15.197a71.482 71.482 0 0 0 1.664 9.968c1.477 6.056 7.458 11.096 13.317 13.152a35.718 35.718 0 0 0 19.484 1.028 28.365 28.365 0 0 0 2.107-.576c1.572-.5 3.413-1.057 4.766-2.038a.154.154 0 0 0 .062-.118v-4.899a.146.146 0 0 0-.055-.111.145.145 0 0 0-.122-.028 54 54 0 0 1-12.644 1.478c-7.328 0-9.298-3.478-9.863-4.925a15.258 15.258 0 0 1-.857-3.882.142.142 0 0 1 .178-.145 52.976 52.976 0 0 0 12.437 1.477c1.007 0 2.012 0 3.02-.026 4.213-.119 8.654-.334 12.8-1.144.103-.02.206-.038.295-.065 6.539-1.255 12.762-5.196 13.394-15.176.024-.393.083-4.115.083-4.523.003-1.386.446-9.829-.065-15.017Z"}),(0,u.jsx)("path",{fill:"#fff",d:"M50.394 22.237v17.35H43.52V22.749c0-3.545-1.478-5.353-4.483-5.353-3.303 0-4.958 2.139-4.958 6.364v9.217h-6.835V23.76c0-4.225-1.657-6.364-4.96-6.364-2.988 0-4.48 1.808-4.48 5.353v16.84H10.93V22.237c0-3.545.905-6.362 2.715-8.45 1.868-2.082 4.317-3.152 7.358-3.152 3.519 0 6.178 1.354 7.951 4.057l1.711 2.871 1.714-2.871c1.773-2.704 4.432-4.056 7.945-4.056 3.038 0 5.487 1.069 7.36 3.152 1.81 2.085 2.712 4.902 2.71 8.449Z"}),(0,u.jsx)("defs",{children:(0,u.jsxs)("linearGradient",{id:t,x1:30.5,x2:30.5,y1:0,y2:65,gradientUnits:"userSpaceOnUse",children:[(0,u.jsx)("stop",{stopColor:"#6364FF"}),(0,u.jsx)("stop",{offset:1,stopColor:"#563ACC"})]})})]}))},label:"Mastodon"},youtube:{Icon:function(e){return(0,u.jsxs)("svg",Object.assign({viewBox:"0 0 256 180",width:"1em",height:"1em",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},e,{children:[(0,u.jsx)("path",{d:"M250.346 28.075A32.18 32.18 0 0 0 227.69 5.418C207.824 0 127.87 0 127.87 0S47.912.164 28.046 5.582A32.18 32.18 0 0 0 5.39 28.24c-6.009 35.298-8.34 89.084.165 122.97a32.18 32.18 0 0 0 22.656 22.657c19.866 5.418 99.822 5.418 99.822 5.418s79.955 0 99.82-5.418a32.18 32.18 0 0 0 22.657-22.657c6.338-35.348 8.291-89.1-.164-123.134Z",fill:"red"}),(0,u.jsx)("path",{fill:"#FFF",d:"m102.421 128.06 66.328-38.418-66.328-38.418z"})]}))},label:"YouTube"},twitch:{Icon:function(e){return(0,u.jsxs)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",x:0,y:0,viewBox:"0 0 2400 2800",width:"1em",height:"1em"},e,{children:[(0,u.jsx)("path",{d:"m2200 1300-400 400h-400l-350 350v-350H600V200h1600z",fill:"#fff"}),(0,u.jsxs)("g",{children:[(0,u.jsx)("path",{d:"M500 0 0 500v1800h600v500l500-500h400l900-900V0H500zm1700 1300-400 400h-400l-350 350v-350H600V200h1600v1100z",fill:"#9146ff"}),(0,u.jsx)("path",{d:"M1700 550h200v600h-200zM1150 550h200v600h-200z",fill:"#9146ff"})]})]}))},label:"Twitch"},email:{Icon:function(e){return(0,u.jsxs)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},e,{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z"}),(0,u.jsx)("path",{d:"M7.2 12a4.8 4.8 0 1 0 9.6 0 4.8 4.8 0 1 0-9.6 0"}),(0,u.jsx)("path",{d:"M16.8 12v1.8a3 3 0 0 0 6 0V12a10.8 10.8 0 1 0-6.6 9.936"})]}))},label:"Email"}};function Me(e){let t=e.platform,s=e.link;const a=null!=(o=Ae[i=t])?o:{Icon:pe,label:i},l=a.Icon,r=a.label;var i,o;return(0,u.jsx)(k.A,{className:we,href:s,title:r,children:(0,u.jsx)(l,{className:(0,n.A)(Ne)})})}function ke(e){var t;let s=e.author;const a=Object.entries(null!=(t=s.socials)?t:{});return(0,u.jsx)("div",{className:be,children:a.map(e=>{let t=e[0],s=e[1];return(0,u.jsx)(Me,{platform:t,link:s},t)})})}const Ce={authorImage:"authorImage_XqGP","author-as-h1":"author-as-h1_n9oJ","author-as-h2":"author-as-h2_gXvM",authorDetails:"authorDetails_lV9A",authorName:"authorName_yefp",authorTitle:"authorTitle_nd0D",authorBlogPostCount:"authorBlogPostCount_iiJ5"};function _e(e){return e.href?(0,u.jsx)(k.A,Object.assign({},e)):(0,u.jsx)(u.Fragment,{children:e.children})}function ye(e){let t=e.title;return(0,u.jsx)("small",{className:Ce.authorTitle,title:t,children:t})}function Pe(e){let t=e.name,s=e.as;return s?(0,u.jsx)(B.A,{as:s,className:Ce.authorName,translate:"no",children:t}):(0,u.jsx)("span",{className:Ce.authorName,translate:"no",children:t})}function Oe(e){let t=e.count;return(0,u.jsx)("span",{className:(0,n.A)(Ce.authorBlogPostCount),children:t})}function Be(e){let t=e.as,s=e.author,a=e.className,l=e.count;const r=s.name,i=s.title,o=s.url,c=s.imageURL,m=s.email,d=s.page,h=(null==d?void 0:d.permalink)||o||m&&"mailto:"+m||void 0;return(0,u.jsxs)("div",{className:(0,n.A)("avatar margin-bottom--sm",a,Ce["author-as-"+t]),children:[c&&(0,u.jsx)(_e,{href:h,className:"avatar__photo-link",children:(0,u.jsx)("img",{className:(0,n.A)("avatar__photo",Ce.authorImage),src:c,alt:r})}),(r||i)&&(0,u.jsxs)("div",{className:(0,n.A)("avatar__intro",Ce.authorDetails),children:[(0,u.jsxs)("div",{className:"avatar__name",children:[r&&(0,u.jsx)(_e,{href:h,children:(0,u.jsx)(Pe,{name:r,as:t})}),void 0!==l&&(0,u.jsx)(Oe,{count:l})]}),!!i&&(0,u.jsx)(ye,{title:i}),(0,u.jsx)(ke,{author:s})]})]})}const Ie="authorCol_Hf19",Te="imageOnlyAuthorRow_pa_O",Le="imageOnlyAuthorCol_G86a";function He(e){let t=e.className;const s=p(),a=s.metadata.authors,l=s.assets;if(0===a.length)return null;const r=a.every(e=>!e.name),i=1===a.length;return(0,u.jsx)("div",{className:(0,n.A)("margin-top--md margin-bottom--sm",r?Te:"row",t),children:a.map((e,t)=>{var s;return(0,u.jsx)("div",{className:(0,n.A)(!r&&(i?"col col--12":"col col--6"),r?Le:Ie),children:(0,u.jsx)(Be,{author:Object.assign({},e,{imageURL:null!=(s=l.authorsImageUrls[t])?s:e.imageURL})})},t)})})}function Fe(){return(0,u.jsxs)("header",{children:[(0,u.jsx)(le,{}),(0,u.jsx)(he,{}),(0,u.jsx)(He,{})]})}var Ze=s(70440),Ue=s(1393);function Re(e){let t=e.children,s=e.className;const a=p().isBlogPostPage;return(0,u.jsx)("div",{id:a?Ze.LU:void 0,className:(0,n.A)("markdown",s),children:(0,u.jsx)(Ue.A,{children:t})})}var ze=s(4336),Ge=s(58046);const Se=["blogPostTitle"];function De(){return(0,u.jsx)("b",{children:(0,u.jsx)(d.A,{id:"theme.blog.post.readMore",description:"The label used in blog post item excerpts to link to full blog posts",children:"Read more"})})}function Ve(e){const t=e.blogPostTitle,s=(0,o.A)(e,Se);return(0,u.jsx)(k.A,Object.assign({"aria-label":(0,d.T)({message:"Read more about {title}",id:"theme.blog.post.readMoreLabel",description:"The ARIA label for the link to full blog posts from excerpts"},{title:t})},s,{children:(0,u.jsx)(De,{})}))}function Ye(){const e=p(),t=e.metadata,s=e.isBlogPostPage,a=t.tags,l=t.title,r=t.editUrl,o=t.hasTruncateMarker,c=t.lastUpdatedBy,m=t.lastUpdatedAt,d=!s&&o,h=a.length>0;if(!(h||d||r))return null;if(s){const e=!!(r||m||c);return(0,u.jsxs)("footer",{className:"docusaurus-mt-lg",children:[h&&(0,u.jsx)("div",{className:(0,n.A)("row","margin-top--sm",i.G.blog.blogFooterEditMetaRow),children:(0,u.jsx)("div",{className:"col",children:(0,u.jsx)(Ge.A,{tags:a})})}),e&&(0,u.jsx)(ze.A,{className:(0,n.A)("margin-top--sm",i.G.blog.blogFooterEditMetaRow),editUrl:r,lastUpdatedAt:m,lastUpdatedBy:c})]})}return(0,u.jsxs)("footer",{className:"row docusaurus-mt-lg",children:[h&&(0,u.jsx)("div",{className:(0,n.A)("col",{"col--9":d}),children:(0,u.jsx)(Ge.A,{tags:a})}),d&&(0,u.jsx)("div",{className:(0,n.A)("col text--right",{"col--3":h}),children:(0,u.jsx)(Ve,{blogPostTitle:l,to:t.permalink})})]})}function Ee(e){let t=e.children,s=e.className;const a=p().isBlogPostPage?void 0:"margin-bottom--xl";return(0,u.jsxs)(ae,{className:(0,n.A)(a,s),children:[(0,u.jsx)(Fe,{}),(0,u.jsx)(Re,{children:t}),(0,u.jsx)(Ye,{})]})}function Xe(e){let t=e.items,s=e.component,a=void 0===s?Ee:s;return(0,u.jsx)(u.Fragment,{children:t.map(e=>{let t=e.content;return(0,u.jsx)(x,{content:t,children:(0,u.jsx)(a,{children:(0,u.jsx)(t,{})})},t.metadata.permalink)})})}var We=s(5260);function Je(e){const t=w(e);return(0,u.jsx)(We.A,{children:(0,u.jsx)("script",{type:"application/ld+json",children:JSON.stringify(t)})})}function qe(e){const t=e.metadata,s=(0,l.A)().siteConfig.title,a=t.blogDescription,n=t.blogTitle,i="/"===t.permalink?s:n;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(r.be,{title:i,description:a}),(0,u.jsx)(se.A,{tag:"blog_posts_list"})]})}function Qe(e){const t=e.metadata,s=e.items,a=e.sidebar;return(0,u.jsxs)(K,{sidebar:a,children:[(0,u.jsx)(Xe,{items:s}),(0,u.jsx)(te,{metadata:t})]})}function $e(e){return(0,u.jsxs)(r.e3,{className:(0,n.A)(i.G.wrapper.blogPages,i.G.page.blogListPage),children:[(0,u.jsx)(qe,Object.assign({},e)),(0,u.jsx)(Je,Object.assign({},e)),(0,u.jsx)(Qe,Object.assign({},e))]})}},53465(e,t,s){s.d(t,{W:()=>c});var a=s(96540),n=s(44586);const l=["zero","one","two","few","many","other"];function r(e){return l.filter(t=>e.includes(t))}const i={locale:"en",pluralForms:r(["one","other"]),select:e=>1===e?"one":"other"};function o(){const e=(0,n.A)().i18n.currentLocale;return(0,a.useMemo)(()=>{try{return function(e){const t=new Intl.PluralRules(e);return{locale:e,pluralForms:r(t.resolvedOptions().pluralCategories),select:e=>t.select(e)}}(e)}catch(t){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+t.message+"\n"),i}},[e])}function c(){const e=o();return{selectMessage:(t,s)=>function(e,t,s){const a=e.split("|");if(1===a.length)return a[0];a.length>s.pluralForms.length&&console.error("For locale="+s.locale+", a maximum of "+s.pluralForms.length+" plural forms are expected ("+s.pluralForms.join(",")+"), but the message contains "+a.length+": "+e);const n=s.select(t),l=s.pluralForms.indexOf(n);return a[Math.min(l,a.length-1)]}(s,t,e)}}}}]); \ No newline at end of file diff --git a/assets/js/a7456010.fc33afa3.js b/assets/js/a7456010.fc33afa3.js new file mode 100644 index 000000000..c22c283d2 --- /dev/null +++ b/assets/js/a7456010.fc33afa3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[1235],{88552(e){e.exports=JSON.parse('{"name":"docusaurus-plugin-content-pages","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/a7bd4aaa.3f1ebaba.js b/assets/js/a7bd4aaa.3f1ebaba.js new file mode 100644 index 000000000..4bf25cb24 --- /dev/null +++ b/assets/js/a7bd4aaa.3f1ebaba.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[7098],{74532(e,n,s){s.r(n),s.d(n,{default:()=>d});s(96540);var r=s(45500),o=s(23025),t=s(82565),c=s(22831),i=s(41463),a=s(74848);function u(e){const n=e.version;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.A,{version:n.version,tag:(0,t.k)(n.pluginId,n.version)}),(0,a.jsx)(r.be,{children:n.noIndex&&(0,a.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})]})}function l(e){const n=e.version,s=e.route;return(0,a.jsx)(r.e3,{className:n.className,children:(0,a.jsx)(o.n,{version:n,children:(0,c.v)(s.routes)})})}function d(e){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u,Object.assign({},e)),(0,a.jsx)(l,Object.assign({},e))]})}}}]); \ No newline at end of file diff --git a/assets/js/a7d5385f.a0c635d9.js b/assets/js/a7d5385f.a0c635d9.js new file mode 100644 index 000000000..cd05e475d --- /dev/null +++ b/assets/js/a7d5385f.a0c635d9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[766],{24182(e,t,n){n.r(t),n.d(t,{assets:()=>h,contentTitle:()=>a,default:()=>l,frontMatter:()=>i,metadata:()=>r,toc:()=>d});const r=JSON.parse('{"id":"references/faq","title":"FAQ","description":"Answers to common questions about Swarm, the BZZ token, and community channels.","source":"@site/docs/references/faq.md","sourceDirName":"references","slug":"/references/faq","permalink":"/docs/references/faq","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/references/faq.md","tags":[],"version":"current","frontMatter":{"title":"FAQ","id":"faq","description":"Answers to common questions about Swarm, the BZZ token, and community channels."},"sidebar":"References","previous":{"title":"Fair Data Society","permalink":"/docs/references/fair-data-society"},"next":{"title":"Awesome Swarm","permalink":"/docs/references/awesome-list"}}');var s=n(74848),o=n(28453);const i={title:"FAQ",id:"faq",description:"Answers to common questions about Swarm, the BZZ token, and community channels."},a=void 0,h={},d=[{value:"Community",id:"community",level:2},{value:"What are the Swarm Foundation's official channels?",id:"what-are-the-swarm-foundations-official-channels",level:3},{value:"Where can I find technical support and get answers to my other questions?",id:"where-can-i-find-technical-support-and-get-answers-to-my-other-questions",level:3},{value:"Where can I find support for running Bee node on Dappnode?",id:"where-can-i-find-support-for-running-bee-node-on-dappnode",level:3},{value:"Who can I contact for other inquiries?",id:"who-can-i-contact-for-other-inquiries",level:3},{value:"What's the relationship between Swarm and Ethereum?",id:"whats-the-relationship-between-swarm-and-ethereum",level:3},{value:"BZZ Token",id:"bzz-token",level:2},{value:"What is BZZ Token?",id:"what-is-bzz-token",level:3},{value:"What is PLUR?",id:"what-is-plur",level:3},{value:"Where can I buy BZZ tokens?",id:"where-can-i-buy-bzz-tokens",level:3},{value:"What is the BZZ token address?",id:"what-is-the-bzz-token-address",level:3},{value:"What is the BZZ token supply?",id:"what-is-the-bzz-token-supply",level:3},{value:"BZZ token tokenomics",id:"bzz-token-tokenomics",level:3},{value:"What is the bonding curve?",id:"what-is-the-bonding-curve",level:3},{value:"What is the "Bzzaar" bonding curve?",id:"what-is-the-bzzaar-bonding-curve",level:3}];function c(e){const t={a:"a",em:"em",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"community",children:"Community"}),"\n",(0,s.jsx)(t.h3,{id:"what-are-the-swarm-foundations-official-channels",children:"What are the Swarm Foundation's official channels?"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["Website: ",(0,s.jsx)(t.a,{href:"https://www.ethswarm.org/",children:"https://www.ethswarm.org/"})]}),"\n",(0,s.jsxs)(t.li,{children:["Blog:",(0,s.jsx)(t.a,{href:"https://blog.ethswarm.org/",children:"https://blog.ethswarm.org/"})]}),"\n",(0,s.jsxs)(t.li,{children:["Github: ",(0,s.jsx)(t.a,{href:"https://github.com/ethersphere",children:"https://github.com/ethersphere"})]}),"\n",(0,s.jsxs)(t.li,{children:["e-mail: ",(0,s.jsx)(t.a,{href:"mailto:info@ethswarm.org",children:"info@ethswarm.org"})]}),"\n",(0,s.jsxs)(t.li,{children:["Discord: ",(0,s.jsx)(t.a,{href:"https://discord.gg/kHRyMNpw7t",children:"https://discord.gg/kHRyMNpw7t"})]}),"\n",(0,s.jsxs)(t.li,{children:["Twitter: ",(0,s.jsx)(t.a,{href:"https://twitter.com/ethswarm",children:"https://twitter.com/ethswarm"})]}),"\n",(0,s.jsxs)(t.li,{children:["Reddit: ",(0,s.jsx)(t.a,{href:"https://www.reddit.com/r/ethswarm",children:"https://www.reddit.com/r/ethswarm"})]}),"\n",(0,s.jsxs)(t.li,{children:["Youtube: ",(0,s.jsx)(t.a,{href:"https://www.youtube.com/channel/UCu6ywn9MTqdREuE6xuRkskA",children:"https://www.youtube.com/channel/UCu6ywn9MTqdREuE6xuRkskA"})]}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"where-can-i-find-technical-support-and-get-answers-to-my-other-questions",children:"Where can I find technical support and get answers to my other questions?"}),"\n",(0,s.jsxs)(t.p,{children:["The Swarm community is centered around our Discord server where you will find many people willing and able to help with your every need! ",(0,s.jsx)(t.a,{href:"https://discord.gg/kHRyMNpw7t",children:"https://discord.gg/kHRyMNpw7t"})]}),"\n",(0,s.jsx)(t.h3,{id:"where-can-i-find-support-for-running-bee-node-on-dappnode",children:"Where can I find support for running Bee node on Dappnode?"}),"\n",(0,s.jsxs)(t.p,{children:["You can find support for running Bee on Dappnode on the Dappnode Discord server: ",(0,s.jsx)(t.a,{href:"https://discord.gg/dappnode",children:"https://discord.gg/dappnode"})]}),"\n",(0,s.jsx)(t.h3,{id:"who-can-i-contact-for-other-inquiries",children:"Who can I contact for other inquiries?"}),"\n",(0,s.jsxs)(t.p,{children:["For any other inquiries, you can contact us at ",(0,s.jsx)(t.a,{href:"mailto:info@ethswarm.org",children:"info@ethswarm.org"})]}),"\n",(0,s.jsx)(t.h3,{id:"whats-the-relationship-between-swarm-and-ethereum",children:"What's the relationship between Swarm and Ethereum?"}),"\n",(0,s.jsx)(t.p,{children:'Swarm started in the first days of Ethereum as part of the original "world computer" vision, consisting of Ethereum (the processor), Whisper (messaging) and Swarm (storage). The project is the result of years of research and work by the Ethereum Foundation, the Swarm Foundation, teams, individuals across the ecosystem and the community.'}),"\n",(0,s.jsx)(t.p,{children:"The conceptual idea for Swarm was started in the Ethereum team at the beginning, and the Ethereum Foundation incubated Swarm. After five years of research, Swarm and Ethereum are now two separate entities."}),"\n",(0,s.jsx)(t.h2,{id:"bzz-token",children:"BZZ Token"}),"\n",(0,s.jsx)(t.h3,{id:"what-is-bzz-token",children:"What is BZZ Token?"}),"\n",(0,s.jsx)(t.p,{children:"Swarm's native token BZZ, was initially issued on Ethereum. It has been bridged over to Gnosis where it is referred to as xBZZ for differentiation, and serves as a means of accessing the platform's data relay and storage services, while also providing compensation for node operators who provide these services."}),"\n",(0,s.jsx)(t.h3,{id:"what-is-plur",children:"What is PLUR?"}),"\n",(0,s.jsx)(t.p,{children:"1 PLUR is the atomic unit of xBZZ, where xBZZ then has 16 decimals (ie. 1 PLUR = 1e-16 xBZZ)"}),"\n",(0,s.jsx)(t.h3,{id:"where-can-i-buy-bzz-tokens",children:"Where can I buy BZZ tokens?"}),"\n",(0,s.jsxs)(t.p,{children:["There are many ways to acquire BZZ tokens, either on custodial centralised exchanges where you can trade traditional currencies and cryptocurrency or through decentralised exchanges and protocols where you can trade between cryptocurrencies. For more information please visit the ",(0,s.jsx)(t.a,{href:"https://www.ethswarm.org/get-bzz",children:"Get BZZ"})," page on the Ethswarm.org homepage."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.em,{children:"Note that for use on Swarm for staking or purchasing postage stamps, you need the Gnosis Chain version of BZZ, commonly referred to as xBZZ."})}),"\n",(0,s.jsx)(t.h3,{id:"what-is-the-bzz-token-address",children:"What is the BZZ token address?"}),"\n",(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"/docs/references/smart-contracts",children:"this page"})," for a list of relevant token addresses."]}),"\n",(0,s.jsx)(t.h3,{id:"what-is-the-bzz-token-supply",children:"What is the BZZ token supply?"}),"\n",(0,s.jsxs)(t.p,{children:["With the ",(0,s.jsx)(t.a,{href:"https://blog.ethswarm.org/foundation/2024/bonding-curve-shutdown/",children:"shutdown of the bonding curve"})," as a result of a ",(0,s.jsx)(t.a,{href:"https://blog.ethswarm.org/foundation/2024/announcing-the-outcome-of-swarms-bonding-curve-vote/",children:"community vote"}),", the BZZ supply is now fixed at ",(0,s.jsx)(t.a,{href:"https://etherscan.io/token/0x19062190b1925b5b6689d7073fdfc8c2976ef8cb",children:"63,149,437"}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"bzz-token-tokenomics",children:"BZZ token tokenomics"}),"\n",(0,s.jsxs)(t.p,{children:["More about BZZ token tokenomics: ",(0,s.jsx)(t.a,{href:"https://blog.ethswarm.org/hive/2021/bzz-tokenomics/",children:"https://blog.ethswarm.org/hive/2021/bzz-tokenomics/"})]}),"\n",(0,s.jsx)(t.h3,{id:"what-is-the-bonding-curve",children:"What is the bonding curve?"}),"\n",(0,s.jsx)(t.p,{children:"A bonding curve is a mathematical function in the form of y=f(x) that determines the price of a single token, depending on the number of tokens currently in existence, or the market supply. The key difference is that with a traditional exchange platform market makers are required to provide liquidity to the market, whereas a bonding curve takes over the role of providing liquidity, negating the need for market makers."}),"\n",(0,s.jsx)(t.h3,{id:"what-is-the-bzzaar-bonding-curve",children:'What is the "Bzzaar" bonding curve?'}),"\n",(0,s.jsx)(t.p,{children:"During the first several years of the life of the BZZ token, the bonding curve mechanism played a critical role in maintaining liquidity and setting a transparent pricing model for BZZ tokens."}),"\n",(0,s.jsxs)(t.p,{children:["On May 4th of 2024, as a result of a ",(0,s.jsx)(t.a,{href:"https://blog.ethswarm.org/foundation/2024/announcing-the-outcome-of-swarms-bonding-curve-vote/",children:"community vote"}),", the bonding curve was ",(0,s.jsx)(t.a,{href:"https://blog.ethswarm.org/foundation/2024/bonding-curve-shutdown/",children:"shut down"})," and the BZZ supply is now fixed at ",(0,s.jsx)(t.a,{href:"https://etherscan.io/token/0x19062190b1925b5b6689d7073fdfc8c2976ef8cb",children:"63,149,437"}),"."]})]})}function l(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},28453(e,t,n){n.d(t,{R:()=>i,x:()=>a});var r=n(96540);const s={},o=r.createContext(s);function i(e){const t=r.useContext(o);return r.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a7e6bfea.e960564d.js b/assets/js/a7e6bfea.e960564d.js new file mode 100644 index 000000000..65775bf49 --- /dev/null +++ b/assets/js/a7e6bfea.e960564d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[6440],{6056(e,t,n){n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>r,default:()=>l,frontMatter:()=>i,metadata:()=>o,toc:()=>c});const o=JSON.parse('{"id":"desktop/introduction","title":"Introduction","description":"Swarm Desktop is a graphical app for Windows, Mac, and Linux that runs a Bee node and uploads and downloads content without the command line.","source":"@site/docs/desktop/introduction.md","sourceDirName":"desktop","slug":"/desktop/introduction","permalink":"/docs/desktop/introduction","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/desktop/introduction.md","tags":[],"version":"current","frontMatter":{"title":"Introduction","id":"introduction","description":"Swarm Desktop is a graphical app for Windows, Mac, and Linux that runs a Bee node and uploads and downloads content without the command line."},"sidebar":"desktop","next":{"title":"Install","permalink":"/docs/desktop/install"}}');var a=n(74848),s=n(28453);const i={title:"Introduction",id:"introduction",description:"Swarm Desktop is a graphical app for Windows, Mac, and Linux that runs a Bee node and uploads and downloads content without the command line."},r=void 0,d={},c=[];function p(e){const t={img:"img",p:"p",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{src:n(51348).A+"",width:"1873",height:"950"})}),"\n",(0,a.jsx)(t.p,{children:"The Swarm Desktop app provides an easy-to-use graphical user interface for running a Bee node and interacting seamlessly with the Swarm network."}),"\n",(0,a.jsx)(t.p,{children:"While running Bee from the terminal is a powerful and flexible approach for developers and node operators, the Swarm Desktop app is a simpler alternative for more basic use cases."}),"\n",(0,a.jsx)(t.p,{children:"The Swarm Desktop App was designed to simplify the Swarm onboarding process so that anyone can benefit from decentralized storage while maintaining privacy and control over their data. Available for Windows, Mac, and Linux operating systems, the Swarm Desktop App serves as a personal gateway to the Swarm network."})]})}function l(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(p,{...e})}):p(e)}},51348(e,t,n){n.d(t,{A:()=>o});const o=n.p+"assets/images/swarm-desktop-b7b65504e52ae453694474672563dd65.png"},28453(e,t,n){n.d(t,{R:()=>i,x:()=>r});var o=n(96540);const a={},s=o.createContext(a);function i(e){const t=o.useContext(s);return o.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a94703ab.45e60308.js b/assets/js/a94703ab.45e60308.js new file mode 100644 index 000000000..542411df9 --- /dev/null +++ b/assets/js/a94703ab.45e60308.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[9048],{78115(e,t,n){n.r(t),n.d(t,{default:()=>Be});var a=n(96540),i=n(34164),s=n(45500),l=n(17559),o=n(26972),c=n(60609),r=n(21312),d=n(23104),u=n(75062);const m="backToTopButton_sjWU",b="backToTopButtonShow_xfvO";var h=n(74848);function p(){const e=function(e){let t=e.threshold;const n=(0,a.useState)(!1),i=n[0],s=n[1],l=(0,a.useRef)(!1),o=(0,d.gk)(),c=o.startScroll,r=o.cancelScroll;return(0,d.Mq)((e,n)=>{let a=e.scrollY;const i=null==n?void 0:n.scrollY;i&&(l.current?l.current=!1:a>=i?(r(),s(!1)):a{e.location.hash&&(l.current=!0,s(!1))}),{shown:i,scrollToTop:()=>c(0)}}({threshold:300}),t=e.shown,n=e.scrollToTop;return(0,h.jsx)("button",{"aria-label":(0,r.T)({id:"theme.BackToTopButton.buttonAriaLabel",message:"Scroll back to top",description:"The ARIA label for the back to top button"}),className:(0,i.A)("clean-btn",l.G.common.backToTopButton,m,t&&b),type:"button",onClick:n})}var x=n(53109),j=n(56347),f=n(24581),g=n(6342),v=n(23465);function _(e){return(0,h.jsx)("svg",Object.assign({width:"20",height:"20","aria-hidden":"true"},e,{children:(0,h.jsxs)("g",{fill:"#7a7a7a",children:[(0,h.jsx)("path",{d:"M9.992 10.023c0 .2-.062.399-.172.547l-4.996 7.492a.982.982 0 01-.828.454H1c-.55 0-1-.453-1-1 0-.2.059-.403.168-.551l4.629-6.942L.168 3.078A.939.939 0 010 2.528c0-.548.45-.997 1-.997h2.996c.352 0 .649.18.828.45L9.82 9.472c.11.148.172.347.172.55zm0 0"}),(0,h.jsx)("path",{d:"M19.98 10.023c0 .2-.058.399-.168.547l-4.996 7.492a.987.987 0 01-.828.454h-3c-.547 0-.996-.453-.996-1 0-.2.059-.403.168-.551l4.625-6.942-4.625-6.945a.939.939 0 01-.168-.55 1 1 0 01.996-.997h3c.348 0 .649.18.828.45l4.996 7.492c.11.148.168.347.168.55zm0 0"})]})}))}const A="collapseSidebarButton_PEFL",C="collapseSidebarButtonIcon_kv0_";function k(e){let t=e.onClick;return(0,h.jsx)("button",{type:"button",title:(0,r.T)({id:"theme.docs.sidebar.collapseButtonTitle",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),"aria-label":(0,r.T)({id:"theme.docs.sidebar.collapseButtonAriaLabel",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),className:(0,i.A)("button button--secondary button--outline",A),onClick:t,children:(0,h.jsx)(_,{className:C})})}var S=n(65041),N=n(98587),I=n(89532);const T=Symbol("EmptyContext"),y=a.createContext(T);function L(e){let t=e.children;const n=(0,a.useState)(null),i=n[0],s=n[1],l=(0,a.useMemo)(()=>({expandedItem:i,setExpandedItem:s}),[i]);return(0,h.jsx)(y.Provider,{value:l,children:t})}var w=n(41422),B=n(99169),E=n(28774),M=n(92303),P=n(16654),H=n(43186);const O="menuExternalLink_NmtK",G="linkLabel_WmDU",W=["item","onItemClick","activePath","level","index"];function D(e){let t=e.label;return(0,h.jsx)("span",{title:t,className:G,children:t})}function R(e){let t=e.item,n=e.onItemClick,a=e.activePath,s=e.level,c=(e.index,(0,N.A)(e,W));const r=t.href,d=t.label,u=t.className,m=t.autoAddBaseUrl,b=(0,o.w8)(t,a),p=(0,P.A)(r);return(0,h.jsx)("li",{className:(0,i.A)(l.G.docs.docSidebarItemLink,l.G.docs.docSidebarItemLinkLevel(s),"menu__list-item",u),children:(0,h.jsxs)(E.A,Object.assign({className:(0,i.A)("menu__link",!p&&O,{"menu__link--active":b}),autoAddBaseUrl:m,"aria-current":b?"page":void 0,to:r},p&&{onClick:n?()=>n(t):void 0},c,{children:[(0,h.jsx)(D,{label:d}),!p&&(0,h.jsx)(H.A,{})]}))},d)}const U="categoryLink_byQd",F="categoryLinkLabel_W154",V=["item"],Y=["type","collapsed","collapsible","items","linkUnlisted"],K=["item","onItemClick","activePath","level","index"];function z(e){let t=e.collapsed,n=e.categoryLabel,a=e.onClick;return(0,h.jsx)("button",{"aria-label":t?(0,r.T)({id:"theme.DocSidebarItem.expandCategoryAriaLabel",message:"Expand sidebar category '{label}'",description:"The ARIA label to expand the sidebar category"},{label:n}):(0,r.T)({id:"theme.DocSidebarItem.collapseCategoryAriaLabel",message:"Collapse sidebar category '{label}'",description:"The ARIA label to collapse the sidebar category"},{label:n}),"aria-expanded":!t,type:"button",className:"clean-btn menu__caret",onClick:a})}function q(e){let t=e.label;return(0,h.jsx)("span",{title:t,className:F,children:t})}function Q(e){return 0===(0,o.Y)(e.item.items,e.activePath).length?(0,h.jsx)(Z,Object.assign({},e)):(0,h.jsx)(J,Object.assign({},e))}function Z(e){let t=e.item,n=(0,N.A)(e,V);if("string"!=typeof t.href)return null;t.type,t.collapsed,t.collapsible,t.items,t.linkUnlisted;const a=(0,N.A)(t,Y),i=Object.assign({type:"link"},a);return(0,h.jsx)(R,Object.assign({item:i},n))}function J(e){let t=e.item,n=e.onItemClick,s=e.activePath,c=e.level,r=e.index,d=(0,N.A)(e,K);const u=t.items,m=t.label,b=t.collapsible,p=t.className,x=t.href,j=(0,g.p)().docs.sidebar.autoCollapseCategories,f=function(e){const t=(0,M.A)();return(0,a.useMemo)(()=>e.href&&!e.linkUnlisted?e.href:!t&&e.collapsible?(0,o.Nr)(e):void 0,[e,t])}(t),v=(0,o.w8)(t,s),_=(0,B.ys)(x,s),A=(0,w.u)({initialState:()=>!!b&&(!v&&t.collapsed)}),C=A.collapsed,k=A.setCollapsed,S=function(){const e=(0,a.useContext)(y);if(e===T)throw new I.dV("DocSidebarItemsExpandedStateProvider");return e}(),L=S.expandedItem,P=S.setExpandedItem,H=function(e){void 0===e&&(e=!C),P(e?null:r),k(e)};!function(e){let t=e.isActive,n=e.collapsed,i=e.updateCollapsed,s=e.activePath;const l=(0,I.ZC)(t),o=(0,I.ZC)(s);(0,a.useEffect)(()=>{(t&&!l||t&&l&&s!==o)&&n&&i(!1)},[t,l,n,i,s,o])}({isActive:v,collapsed:C,updateCollapsed:H,activePath:s}),(0,a.useEffect)(()=>{b&&null!=L&&L!==r&&j&&k(!0)},[b,L,r,k,j]);return(0,h.jsxs)("li",{className:(0,i.A)(l.G.docs.docSidebarItemCategory,l.G.docs.docSidebarItemCategoryLevel(c),"menu__list-item",{"menu__list-item--collapsed":C},p),children:[(0,h.jsxs)("div",{className:(0,i.A)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":_}),children:[(0,h.jsx)(E.A,Object.assign({className:(0,i.A)(U,"menu__link",{"menu__link--sublist":b,"menu__link--sublist-caret":!x&&b,"menu__link--active":v}),onClick:e=>{null==n||n(t),b&&(x?_?(e.preventDefault(),H()):H(!1):(e.preventDefault(),H()))},"aria-current":_?"page":void 0,role:b&&!x?"button":void 0,"aria-expanded":b&&!x?!C:void 0,href:b?null!=f?f:"#":f},d,{children:(0,h.jsx)(q,{label:m})})),x&&b&&(0,h.jsx)(z,{collapsed:C,categoryLabel:m,onClick:e=>{e.preventDefault(),H()}})]}),(0,h.jsx)(w.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:C,children:(0,h.jsx)(ie,{items:u,tabIndex:C?-1:0,onItemClick:n,activePath:s,level:c+1})})]})}const X="menuHtmlItem_M9Kj";function $(e){let t=e.item,n=e.level,a=e.index;const s=t.value,o=t.defaultStyle,c=t.className;return(0,h.jsx)("li",{className:(0,i.A)(l.G.docs.docSidebarItemLink,l.G.docs.docSidebarItemLinkLevel(n),o&&[X,"menu__list-item"],c),dangerouslySetInnerHTML:{__html:s}},a)}const ee=["item"];function te(e){let t=e.item,n=(0,N.A)(e,ee);switch(t.type){case"category":return(0,h.jsx)(Q,Object.assign({item:t},n));case"html":return(0,h.jsx)($,Object.assign({item:t},n));default:return(0,h.jsx)(R,Object.assign({item:t},n))}}const ne=["items"];function ae(e){let t=e.items,n=(0,N.A)(e,ne);const a=(0,o.Y)(t,n.activePath);return(0,h.jsx)(L,{children:a.map((e,t)=>(0,h.jsx)(te,Object.assign({item:e,index:t},n),t))})}const ie=(0,a.memo)(ae),se="menu_SIkG",le="menuWithAnnouncementBar_GW3s";function oe(e){let t=e.path,n=e.sidebar,s=e.className;const o=function(){const e=(0,S.M)().isActive,t=(0,a.useState)(e),n=t[0],i=t[1];return(0,d.Mq)(t=>{let n=t.scrollY;e&&i(0===n)},[e]),e&&n}();return(0,h.jsx)("nav",{"aria-label":(0,r.T)({id:"theme.docs.sidebar.navAriaLabel",message:"Docs sidebar",description:"The ARIA label for the sidebar navigation"}),className:(0,i.A)("menu thin-scrollbar",se,o&&le,s),children:(0,h.jsx)("ul",{className:(0,i.A)(l.G.docs.docSidebarMenu,"menu__list"),children:(0,h.jsx)(ie,{items:n,activePath:t,level:1})})})}const ce="sidebar_njMd",re="sidebarWithHideableNavbar_wUlq",de="sidebarHidden_VK0M",ue="sidebarLogo_isFc";function me(e){let t=e.path,n=e.sidebar,a=e.onCollapse,s=e.isHidden;const l=(0,g.p)(),o=l.navbar.hideOnScroll,c=l.docs.sidebar.hideable;return(0,h.jsxs)("div",{className:(0,i.A)(ce,o&&re,s&&de),children:[o&&(0,h.jsx)(v.A,{tabIndex:-1,className:ue}),(0,h.jsx)(oe,{path:t,sidebar:n}),c&&(0,h.jsx)(k,{onClick:a})]})}const be=a.memo(me);var he=n(75600),pe=n(22069);const xe=e=>{let t=e.sidebar,n=e.path;const a=(0,pe.M)();return(0,h.jsx)("ul",{className:(0,i.A)(l.G.docs.docSidebarMenu,"menu__list"),children:(0,h.jsx)(ie,{items:t,activePath:n,onItemClick:e=>{"category"===e.type&&e.href&&a.toggle(),"link"===e.type&&a.toggle()},level:1})})};function je(e){return(0,h.jsx)(he.GX,{component:xe,props:e})}const fe=a.memo(je);function ge(e){const t=(0,f.l)(),n="desktop"===t||"ssr"===t,a="mobile"===t;return(0,h.jsxs)(h.Fragment,{children:[n&&(0,h.jsx)(be,Object.assign({},e)),a&&(0,h.jsx)(fe,Object.assign({},e))]})}const ve="expandButton_TmdG",_e="expandButtonIcon_i1dp";function Ae(e){let t=e.toggleSidebar;return(0,h.jsx)("div",{className:ve,title:(0,r.T)({id:"theme.docs.sidebar.expandButtonTitle",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),"aria-label":(0,r.T)({id:"theme.docs.sidebar.expandButtonAriaLabel",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),tabIndex:0,role:"button",onKeyDown:t,onClick:t,children:(0,h.jsx)(_,{className:_e})})}const Ce={docSidebarContainer:"docSidebarContainer_YfHR",docSidebarContainerHidden:"docSidebarContainerHidden_DPk8",sidebarViewport:"sidebarViewport_aRkj"};function ke(e){var t;let n=e.children;const i=(0,c.t)();return(0,h.jsx)(a.Fragment,{children:n},null!=(t=null==i?void 0:i.name)?t:"noSidebar")}function Se(e){let t=e.sidebar,n=e.hiddenSidebarContainer,s=e.setHiddenSidebarContainer;const o=(0,j.zy)().pathname,c=(0,a.useState)(!1),r=c[0],d=c[1],u=(0,a.useCallback)(()=>{r&&d(!1),!r&&(0,x.O)()&&d(!0),s(e=>!e)},[s,r]);return(0,h.jsx)("aside",{className:(0,i.A)(l.G.docs.docSidebarContainer,Ce.docSidebarContainer,n&&Ce.docSidebarContainerHidden),onTransitionEnd:e=>{e.currentTarget.classList.contains(Ce.docSidebarContainer)&&n&&d(!0)},children:(0,h.jsx)(ke,{children:(0,h.jsxs)("div",{className:(0,i.A)(Ce.sidebarViewport,r&&Ce.sidebarViewportHidden),children:[(0,h.jsx)(ge,{sidebar:t,path:o,onCollapse:u,isHidden:r}),r&&(0,h.jsx)(Ae,{toggleSidebar:u})]})})})}const Ne={docMainContainer:"docMainContainer_TBSr",docMainContainerEnhanced:"docMainContainerEnhanced_lQrH",docItemWrapperEnhanced:"docItemWrapperEnhanced_JWYK"};function Ie(e){let t=e.hiddenSidebarContainer,n=e.children;const a=(0,c.t)();return(0,h.jsx)("main",{className:(0,i.A)(Ne.docMainContainer,(t||!a)&&Ne.docMainContainerEnhanced),children:(0,h.jsx)("div",{className:(0,i.A)("container padding-top--md padding-bottom--lg",Ne.docItemWrapper,t&&Ne.docItemWrapperEnhanced),children:n})})}const Te="docRoot_UBD9",ye="docsWrapper_hBAB";function Le(e){let t=e.children;const n=(0,c.t)(),i=(0,a.useState)(!1),s=i[0],l=i[1];return(0,h.jsxs)("div",{className:ye,children:[(0,h.jsx)(p,{}),(0,h.jsxs)("div",{className:Te,children:[n&&(0,h.jsx)(Se,{sidebar:n.items,hiddenSidebarContainer:s,setHiddenSidebarContainer:l}),(0,h.jsx)(Ie,{hiddenSidebarContainer:s,children:t})]})]})}var we=n(23363);function Be(e){const t=(0,o.B5)(e);if(!t)return(0,h.jsx)(we.A,{});const n=t.docElement,a=t.sidebarName,r=t.sidebarItems;return(0,h.jsx)(s.e3,{className:(0,i.A)(l.G.page.docsDocPage),children:(0,h.jsx)(c.V,{name:a,items:r,children:(0,h.jsx)(Le,{children:n})})})}},23363(e,t,n){n.d(t,{A:()=>o});n(96540);var a=n(34164),i=n(21312),s=n(51107),l=n(74848);function o(e){let t=e.className;return(0,l.jsx)("main",{className:(0,a.A)("container margin-vert--xl",t),children:(0,l.jsx)("div",{className:"row",children:(0,l.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,l.jsx)(s.A,{as:"h1",className:"hero__title",children:(0,l.jsx)(i.A,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,l.jsx)("p",{children:(0,l.jsx)(i.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,l.jsx)("p",{children:(0,l.jsx)(i.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}}}]); \ No newline at end of file diff --git a/assets/js/ab99809b.687a5077.js b/assets/js/ab99809b.687a5077.js new file mode 100644 index 000000000..de1853fe6 --- /dev/null +++ b/assets/js/ab99809b.687a5077.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[9],{70894(e,n,s){s.r(n),s.d(n,{assets:()=>r,contentTitle:()=>d,default:()=>h,frontMatter:()=>i,metadata:()=>o,toc:()=>a});const o=JSON.parse('{"id":"develop/upload-and-download","title":"Upload & Download","description":"Comprehensive guide for uploading and downloading files with the Bee API.","source":"@site/docs/develop/upload-and-download.md","sourceDirName":"develop","slug":"/develop/upload-and-download","permalink":"/docs/develop/upload-and-download","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/develop/upload-and-download.md","tags":[],"version":"current","frontMatter":{"title":"Upload & Download","id":"upload-and-download","description":"Comprehensive guide for uploading and downloading files with the Bee API."},"sidebar":"develop","previous":{"title":"Start Building","permalink":"/docs/develop/introduction"},"next":{"title":"Host a Webpage","permalink":"/docs/develop/host-your-website"}}');var l=s(74848),t=s(28453);const i={title:"Upload & Download",id:"upload-and-download",description:"Comprehensive guide for uploading and downloading files with the Bee API."},d=void 0,r={},a=[{value:"Upload & Download with bee-js",id:"upload--download-with-bee-js",level:2},{value:"Single file \u2014 Node.js",id:"single-file--nodejs",level:3},{value:"Single file \u2014 Browser",id:"single-file--browser",level:3},{value:"Multiple files \u2014 Browser",id:"multiple-files--browser",level:3},{value:"Multiple files \u2014 Node.js",id:"multiple-files--nodejs",level:3},{value:"Upload & Download with the Bee API (advanced)",id:"upload--download-with-the-bee-api-advanced",level:2},{value:"Upload with /bzz",id:"upload-with-bzz",level:3}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",hr:"hr",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(n.p,{children:["Uploading to Swarm has two steps: (1) ",(0,l.jsx)(n.strong,{children:"buy storage"})," as a ",(0,l.jsx)(n.strong,{children:"postage stamp batch"})," with a unique ",(0,l.jsx)(n.strong,{children:"batch ID"}),"\u2014and (2) ",(0,l.jsx)(n.strong,{children:"upload using the batch ID"}),". The upload returns a ",(0,l.jsx)(n.strong,{children:"Swarm reference hash"}),", anyone with that reference can download the content."]}),"\n",(0,l.jsx)(n.admonition,{title:"Example project",type:"info",children:(0,l.jsxs)(n.p,{children:["The runnable Node.js scripts for this guide are in ",(0,l.jsx)(n.a,{href:"https://github.com/ethersphere/examples/tree/main/upload-and-download",children:(0,l.jsx)(n.code,{children:"examples/upload-and-download"})}),". Clone the repo, copy ",(0,l.jsx)(n.code,{children:".env.example"})," to ",(0,l.jsx)(n.code,{children:".env"}),", fill in your ",(0,l.jsx)(n.code,{children:"BEE_URL"})," and ",(0,l.jsx)(n.code,{children:"BATCH_ID"}),", run ",(0,l.jsx)(n.code,{children:"npm install"}),", then ",(0,l.jsx)(n.code,{children:"npm run script:01"})," or ",(0,l.jsx)(n.code,{children:"npm run script:02"}),"."]})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Before you begin:"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["You need a running Bee node connected to Gnosis Chain and funded with ",(0,l.jsx)(n.strong,{children:"xBZZ"})," and ",(0,l.jsx)(n.strong,{children:"xDAI"}),"."]}),"\n",(0,l.jsxs)(n.li,{children:["Uploads always require a ",(0,l.jsx)(n.strong,{children:"postage stamp batch"}),"."]}),"\n",(0,l.jsxs)(n.li,{children:["Ultra-light nodes can download but ",(0,l.jsx)(n.strong,{children:"cannot upload"}),"."]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"upload--download-with-bee-js",children:"Upload & Download with bee-js"}),"\n",(0,l.jsxs)(n.p,{children:["The ",(0,l.jsx)(n.code,{children:"bee-js"})," library is the ",(0,l.jsx)(n.strong,{children:"official SDK for building Swarm-based applications"}),". It works in both ",(0,l.jsx)(n.strong,{children:"browser"})," and ",(0,l.jsx)(n.strong,{children:"Node.js"})," environments and ",(0,l.jsx)(n.strong,{children:"greatly simplifies development"})," compared with using the Bee HTTP API directly. It is the recommended method for developing applications on Swarm."]}),"\n",(0,l.jsxs)(n.p,{children:["Refer to the ",(0,l.jsxs)(n.a,{href:"https://bee-js.ethswarm.org/docs/",children:[(0,l.jsx)(n.code,{children:"bee-js"})," documentation"]})," for more usage guides."]}),"\n",(0,l.jsxs)(n.admonition,{type:"tip",children:[(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Environment-specific methods:"})}),(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Browser-only:"})," ",(0,l.jsx)(n.a,{href:"https://bee-js.ethswarm.org/docs/api/classes/Bee/#uploadfiles",children:(0,l.jsx)(n.code,{children:"uploadFiles"})})," (multi-file via ",(0,l.jsx)(n.code,{children:"File[]"}),"/",(0,l.jsx)(n.code,{children:"FileList"}),")"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Node.js-only:"})," ",(0,l.jsx)(n.a,{href:"https://bee-js.ethswarm.org/docs/api/classes/Bee/#uploadfiles",children:(0,l.jsx)(n.code,{children:"uploadFilesFromDirectory"})})," (recursively reads local filesystem to upload multiple files in a directory using ",(0,l.jsx)(n.code,{children:"fs"}),"),"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Both:"})," ",(0,l.jsx)(n.a,{href:"https://bee-js.ethswarm.org/docs/api/classes/Bee/#uploadfile",children:(0,l.jsx)(n.code,{children:"uploadFile"})})," (with some environment specific usage), ",(0,l.jsx)(n.a,{href:"https://bee-js.ethswarm.org/docs/api/classes/Bee/#downloadfile",children:(0,l.jsx)(n.code,{children:"downloadFile"})})]}),"\n"]})]}),"\n",(0,l.jsx)(n.h3,{id:"single-file--nodejs",children:"Single file \u2014 Node.js"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Step-by-step Walkthrough:"})}),"\n",(0,l.jsxs)(n.ol,{children:["\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Create a Bee client:"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:'const bee = new Bee("http://localhost:1633")'})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Buy storage (postage stamp batch) by specifying storage size and duration:"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:"const batchId = await bee.buyStorage(Size.fromGigabytes(1), Duration.fromDays(1))"})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Read the file from disk:"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:'const data = await readFile("./hello.txt")'})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Upload bytes with filename & content type \u2192 get reference:"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:'const { reference } = await bee.uploadFile(batchId, data, "hello.txt", { contentType: "text/plain" })'})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Download the file by reference:"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:"const file = await bee.downloadFile(reference)"})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Log the downloaded file\u2019s title and metadata:"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:"console.log(file.name)"})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:"console.log(file.contentType)"})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:"console.log(file.data.toUtf8())"})}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Full example:"})}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-js",children:'import { Bee, Size, Duration } from "@ethersphere/bee-js";\nimport { readFile } from "node:fs/promises";\n\n// 1) Connect to your Bee node HTTP API\nconst bee = new Bee("http://localhost:1633");\n\n// 2) Buy storage (postage stamp batch) for this session\nconst batchId = await bee.buyStorage(\n Size.fromGigabytes(1),\n Duration.fromDays(1)\n);\n\n// 3) Read the file from disk as bytes\nconst data = await readFile("./hello.txt");\n\n// 4) Upload the bytes with a filename and content type; capture the reference\nconst { reference } = await bee.uploadFile(batchId, data, "hello.txt", {\n contentType: "text/plain",\n});\nconsole.log("Uploaded reference:", reference.toHex());\n\n// 5) Download the file back using the reference\nconst file = await bee.downloadFile(reference);\n\n// 6) Log the file\'s metadata and contents to the terminal\nconsole.log(file.name); // "hello.txt"\nconsole.log(file.contentType); // "text/plain"\nconsole.log(file.data.toUtf8()); // Prints file content\n'})}),"\n",(0,l.jsx)(n.h3,{id:"single-file--browser",children:"Single file \u2014 Browser"}),"\n",(0,l.jsx)(n.admonition,{type:"info",children:(0,l.jsxs)(n.p,{children:["When working with browsers you can use the ",(0,l.jsxs)(n.a,{href:"https://developer.mozilla.org/en-US/docs/Web/API/File",children:[(0,l.jsx)(n.code,{children:"File"})," interface"]}),". The filename is taken from the ",(0,l.jsx)(n.code,{children:"File"})," object itself, but can be overwritten through the second argument of the ",(0,l.jsx)(n.code,{children:"uploadFile"})," function."]})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Walkthrough"})}),"\n",(0,l.jsxs)(n.ol,{children:["\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Initialize a Bee object using the API endpoint of a Bee node:"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:'const bee = new Bee("http://localhost:1633")'})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Buy storage and get postage stamp batch ID:"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:"const batchId = await bee.buyStorage(Size.fromGigabytes(1), Duration.fromDays(1))"})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsxs)(n.p,{children:["Create a ",(0,l.jsx)(n.code,{children:"File"})," object:"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:'const file = new File(["Hello Swarm!"], "hello.txt", { type: "text/plain" })'})}),"\n",(0,l.jsxs)(n.ol,{start:"4",children:["\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Use batch ID to upload \u2192 get reference:"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:"const { reference } = await bee.uploadFile(batchId, file)"})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Download by reference:"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:"const downloaded = await bee.downloadFile(reference)"})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Log the downloaded file\u2019s title and metadata:"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:'console.log(downloaded.name) // "hello.txt"'})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:'console.log(file.contentType) // "text/plain"'})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:"console.log(downloaded.data.toUtf8()) // prints file content"})}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-js",children:'import { Bee, Size, Duration } from "@ethersphere/bee-js";\n\n// 1) Connect to your Bee node HTTP API\nconst bee = new Bee("http://localhost:1633");\n\n// 2) Buy storage (postage stamp batch) for this session\nconst batchId = await bee.buyStorage(\n Size.fromGigabytes(1),\n Duration.fromDays(1)\n);\nconsole.log("Batch ID:", String(batchId));\n\n// 3) Upload a single file created in code\nconst file = new File(["Hello Swarm!"], "hello.txt", { type: "text/plain" });\nconst { reference } = await bee.uploadFile(batchId, file);\nconsole.log("Reference:", String(reference));\n\n// 4) Download and print name + contents\nconst downloaded = await bee.downloadFile(reference);\nconsole.log(downloaded.name); // "hello.txt"\nconsole.log(file.contentType); // "text/plain"\nconsole.log(downloaded.data.toUtf8()); // prints file content\n'})}),"\n",(0,l.jsx)(n.h3,{id:"multiple-files--browser",children:"Multiple files \u2014 Browser"}),"\n",(0,l.jsxs)(n.p,{children:["Use ",(0,l.jsx)(n.strong,{children:(0,l.jsx)(n.code,{children:"uploadFiles"})})," for multi-file upload in the browser. It accepts ",(0,l.jsx)(n.code,{children:"File[]"}),"/",(0,l.jsx)(n.code,{children:"FileList"}),". When using ",(0,l.jsx)(n.code,{children:''}),", each file\u2019s ",(0,l.jsx)(n.strong,{children:"relative path"})," is preserved. To download a specific file later, pass the ",(0,l.jsx)(n.strong,{children:"collection reference"})," plus the ",(0,l.jsx)(n.strong,{children:"same relative path"}),"."]}),"\n",(0,l.jsxs)(n.ol,{children:["\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsxs)(n.p,{children:["Initialize a Bee object using the API endpoint of a Bee node:\n",(0,l.jsx)(n.code,{children:'const bee = new Bee("http://localhost:1633")'})]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsxs)(n.p,{children:["Buy storage and get postage stamp batch ID:\n",(0,l.jsx)(n.code,{children:"const batchId = await bee.buyStorage(Size.fromGigabytes(1), Duration.fromDays(1))"})]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Create files for upload:"}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-js",children:'const files = [\n new File(["

    Hello Swarm

    "], "index.html", { type: "text/html" }),\n new File(["body{font-family:sans-serif}"], "assets/main.css", {\n type: "text/css",\n }),\n];\n'})}),"\n",(0,l.jsxs)(n.ol,{start:"4",children:["\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsxs)(n.p,{children:["Upload multiple files (collection) \u2192 get collection reference:\n",(0,l.jsx)(n.code,{children:"const res = await bee.uploadFiles(batchId, files)"})]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsxs)(n.p,{children:["Download files by relative paths:\n",(0,l.jsx)(n.code,{children:'const logo = await bee.downloadFile(res.reference, "images/logo.png")'})]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Log the downloaded file\u2019s title and contents:"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:'console.log(page.name) // "index.html"'})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:"console.log(page.data.toUtf8()) // prints file content"})}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-js",children:'import { Bee, Size, Duration } from "@ethersphere/bee-js";\n\n// 1. Initialize a Bee object\nconst bee = new Bee("http://localhost:1633");\n\n// 2. Buy storage and get batch ID\nconst batchId = await bee.buyStorage(\n Size.fromGigabytes(1),\n Duration.fromDays(1)\n);\nconsole.log("Batch ID:", String(batchId));\n\n// 3. Create files for upload\nconst files = [\n new File(["

    Hello Swarm

    "], "index.html", { type: "text/html" }),\n new File(["body{font-family:sans-serif}"], "assets/main.css", {\n type: "text/css",\n }),\n];\n\n// 4. Upload multiple files (collection) \u2192 get collection reference\nconst res = await bee.uploadFiles(batchId, files);\nconsole.log("Collection ref:", String(res.reference));\n\n// 5. Download files by relative path\nconst page = await bee.downloadFile(res.reference, "index.html");\nconsole.log(page.name); // "index.html"\nconsole.log(page.data.toUtf8()); // prints file content\n\nconst style = await bee.downloadFile(res.reference, "assets/main.css");\nconsole.log(style.name); // "main.css"\nconsole.log(style.data.toUtf8()); // prints file content\n'})}),"\n",(0,l.jsx)(n.h3,{id:"multiple-files--nodejs",children:"Multiple files \u2014 Node.js"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Step-by-step Walkthrough:"})}),"\n",(0,l.jsxs)(n.ol,{children:["\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Initialize a Bee object using the API endpoint of a Bee node:"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:'const bee = new Bee("http://localhost:1633")'})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Buy storage and get postage stamp batch ID:"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:"const batchId = await bee.buyStorage(Size.fromGigabytes(1), Duration.fromDays(1))"})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Recursively upload a local directory \u2192 get collection reference:"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:'const res = await bee.uploadFilesFromDirectory(batchId, "./site")'})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Download one file by its relative path:"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:'const page = await bee.downloadFile(res.reference, "index.html")'})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsx)(n.p,{children:"Log the downloaded file name and contents:"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:'console.log(page.name ?? "index.html")'})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:"console.log(page.data.toUtf8())"})}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Full example:"})}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-js",children:'import { Bee, Size, Duration } from "@ethersphere/bee-js";\n\n// 1) Connect to your Bee node HTTP API\nconst bee = new Bee("http://localhost:1633");\n\n// 2) Buy storage (postage stamp batch)\nconst batchId = await bee.buyStorage(\n Size.fromGigabytes(1),\n Duration.fromDays(1)\n);\n\n// 3) Upload all files under ./files (relative paths preserved); get reference\nconst res = await bee.uploadFilesFromDirectory(batchId, "./files");\nconsole.log("Directory uploaded. Collection reference:", res.reference.toHex());\n\n// 4) Download files from the collection by original relative paths\nconst page = await bee.downloadFile(res.reference, "root.txt");\nconst stylesheet = await bee.downloadFile(\n res.reference,\n "subdirectory/example.txt"\n);\n\n// 5) Log the file name and contents to the terminal\nconsole.log(page.name); // "root.txt"\nconsole.log(page.data.toUtf8()); // prints file content\n\nconsole.log(stylesheet.name); // "example.txt"\nconsole.log(stylesheet.data.toUtf8()); // prints file content\n'})}),"\n",(0,l.jsx)(n.h2,{id:"upload--download-with-the-bee-api-advanced",children:"Upload & Download with the Bee API (advanced)"}),"\n",(0,l.jsxs)(n.p,{children:["The ",(0,l.jsx)(n.strong,{children:"Bee HTTP API"})," offers the ",(0,l.jsx)(n.strong,{children:"lowest-level access"})," to a Bee node. It is ",(0,l.jsx)(n.strong,{children:"more complex and harder to use"})," than ",(0,l.jsx)(n.strong,{children:"bee-js"})," because you must manage headers, content types, and postage parameters yourself. ",(0,l.jsx)(n.strong,{children:"Unless you specifically require raw HTTP control"}),", we ",(0,l.jsx)(n.strong,{children:"do not recommend"})," using the Bee API directly \u2014 use ",(0,l.jsx)(n.strong,{children:"bee-js"})," instead for application development."]}),"\n",(0,l.jsxs)(n.p,{children:["Refer to the ",(0,l.jsx)(n.a,{href:"https://docs.ethswarm.org/api/",children:"Bee API reference specification"})," for detailed usage information."]}),"\n",(0,l.jsx)(n.p,{children:"The Bee API exposes three HTTP endpoints:"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:(0,l.jsx)(n.code,{children:"/bzz"})})," \u2014 upload & download files/directories (most common)"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:(0,l.jsx)(n.code,{children:"/bytes"})})," \u2014 upload & download raw data"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:(0,l.jsx)(n.code,{children:"/chunks"})})," \u2014 upload & download individual chunks"]}),"\n"]}),"\n",(0,l.jsxs)(n.h3,{id:"upload-with-bzz",children:["Upload with ",(0,l.jsx)(n.strong,{children:"/bzz"})]}),"\n",(0,l.jsxs)(n.p,{children:["While ",(0,l.jsx)(n.code,{children:"bee-js"})," allows postage stamp batches to be purchased by specifying storage duration and data size, the raw Bee API requires ",(0,l.jsx)(n.code,{children:"amount"})," and ",(0,l.jsx)(n.code,{children:"depth"})," parameters directly. The relationship between these parameters and the storage size and duration of the batch is complex, so ",(0,l.jsx)(n.code,{children:"bee-js"})," is strongly encouraged for newcomers. ",(0,l.jsx)(n.a,{href:"/docs/develop/tools-and-features/buy-a-stamp-batch",children:"Learn more"}),"."]}),"\n",(0,l.jsxs)(n.ol,{children:["\n",(0,l.jsx)(n.li,{children:"Buy a postage batch:"}),"\n"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"curl -s -X POST http://localhost:1633/stamps//\n"})}),"\n",(0,l.jsxs)(n.ol,{start:"2",children:["\n",(0,l.jsxs)(n.li,{children:["Upload a file with the returned ",(0,l.jsx)(n.code,{children:"batchID"}),":"]}),"\n"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:'curl -X POST \\\n -H "Swarm-Postage-Batch-Id: " \\\n -H "Content-Type: text/plain" \\\n --data-binary "@test.txt" \\\n http://localhost:1633/bzz\n'})}),"\n",(0,l.jsx)(n.p,{children:"Response:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-json",children:'{\n "reference": "22cbb9cedca08ca8d50b0319a32016174ceb8fbaa452ca5f0a77b804109baa00"\n}\n'})}),"\n",(0,l.jsxs)(n.ol,{start:"3",children:["\n",(0,l.jsxs)(n.li,{children:["Download with ",(0,l.jsx)(n.code,{children:"/bzz"})]}),"\n"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"curl http://localhost:1633/bzz/ -o output.txt\n"})}),"\n",(0,l.jsx)(n.hr,{}),"\n",(0,l.jsxs)(n.p,{children:[(0,l.jsx)(n.strong,{children:"Next:"})," ",(0,l.jsx)(n.a,{href:"/docs/develop/host-your-website",children:"Host a Webpage"})," \u2014 upload a static website and serve it through ",(0,l.jsx)(n.code,{children:"/bzz//"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(c,{...e})}):c(e)}},28453(e,n,s){s.d(n,{R:()=>i,x:()=>d});var o=s(96540);const l={},t=o.createContext(l);function i(e){const n=o.useContext(t);return o.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:i(e.components),o.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/aba21aa0.58976dd2.js b/assets/js/aba21aa0.58976dd2.js new file mode 100644 index 000000000..5a2cbc55e --- /dev/null +++ b/assets/js/aba21aa0.58976dd2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[5742],{27093(e){e.exports=JSON.parse('{"name":"docusaurus-plugin-content-docs","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/b0c952a3.af5761bb.js b/assets/js/b0c952a3.af5761bb.js new file mode 100644 index 000000000..674ddeea4 --- /dev/null +++ b/assets/js/b0c952a3.af5761bb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[3460],{64666(e,n,t){t.r(n),t.d(n,{assets:()=>i,contentTitle:()=>d,default:()=>h,frontMatter:()=>a,metadata:()=>o,toc:()=>c});const o=JSON.parse('{"id":"develop/tools-and-features/starting-a-test-network","title":"Starting a Private Network","description":"Instructions for setting up local test networks for development and experimentation.","source":"@site/docs/develop/tools-and-features/starting-a-test-network.md","sourceDirName":"develop/tools-and-features","slug":"/develop/tools-and-features/starting-a-test-network","permalink":"/docs/develop/tools-and-features/starting-a-test-network","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/develop/tools-and-features/starting-a-test-network.md","tags":[],"version":"current","frontMatter":{"title":"Starting a Private Network","id":"starting-a-test-network","description":"Instructions for setting up local test networks for development and experimentation."},"sidebar":"develop","previous":{"title":"bee-factory","permalink":"/docs/develop/tools-and-features/bee-dev-mode"},"next":{"title":"Overview","permalink":"/docs/develop/contribute/introduction"}}');var s=t(74848),r=t(28453);const a={title:"Starting a Private Network",id:"starting-a-test-network",description:"Instructions for setting up local test networks for development and experimentation."},d=void 0,i={},c=[{value:"Start a network on your own computer",id:"start-a-network-on-your-own-computer",level:2},{value:"Configuration",id:"configuration",level:3},{value:"Starting Your Nodes",id:"starting-your-nodes",level:3},{value:"Making a network",id:"making-a-network",level:3},{value:"Funding Nodes",id:"funding-nodes",level:2},{value:"Getting Testnet Tokens",id:"getting-testnet-tokens",level:3}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",p:"p",pre:"pre",strong:"strong",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:["A private network can be used to test your applications in an isolated environment before you deploy to Swarm mainnet. It can be started by overriding the default configuration values of your Swarm node. Throughout this tutorial, we will make use of configuration files to configure the nodes but of course you can also do the same using flags or environment variables (see ",(0,s.jsx)(n.a,{href:"/docs/bee/working-with-bee/configuration",children:"Start your node"}),")."]}),"\n",(0,s.jsx)(n.h2,{id:"start-a-network-on-your-own-computer",children:"Start a network on your own computer"}),"\n",(0,s.jsx)(n.h3,{id:"configuration",children:"Configuration"}),"\n",(0,s.jsxs)(n.p,{children:["Starting a network is easiest achieved by making use of configuration files. We need at least two nodes to start a network. Hence, below two configuration files are provided. Save them respectively as ",(0,s.jsx)(n.code,{children:"config_1.yaml"})," and ",(0,s.jsx)(n.code,{children:"config_2.yaml"}),"."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"config_1.yaml"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:'network-id: 7357\napi-addr: 127.0.0.1:1633\np2p-addr: :1634\nbootnode: ""\ndata-dir: /tmp/bee/node1\npassword: set-a-strong-password\nswap-enable: false\nmainnet: false\nblockchain-rpc-endpoint: https://sepolia.dev.fairdatasociety.org\nverbosity: 5\nfull-node: true \n'})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"config_2.yaml"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:'network-id: 7357\napi-addr: 127.0.0.1::1733\np2p-addr: :1734\ndata-dir: /tmp/bee/node2\nbootnode: ""\npassword: set-a-strong-password\nwelcome-message: "Bzz Bzz Bzz"\nswap-enable: false\nmainnet: false\nblockchain-rpc-endpoint: https://sepolia.dev.fairdatasociety.org\nverbosity: 5\nfull-node: true \n'})}),"\n",(0,s.jsxs)(n.p,{children:["Note that for each node, we provide a different ",(0,s.jsx)(n.code,{children:"api-addr"}),". If we had not specified different addresses here, we\nwould get an ",(0,s.jsx)(n.code,{children:"address already in use"})," error, as no two applications\ncan listen to the same port. We also specify a different\n",(0,s.jsx)(n.code,{children:"p2p-addr"}),". If we had not, our nodes would not be able to communicate\nwith each other. We also specify a separate ",(0,s.jsx)(n.code,{children:"data-dir"})," for each node,\nas each node must have its own separate key and chunk data store."]}),"\n",(0,s.jsxs)(n.p,{children:["We also provide a network-id, so that our network remains separate\nfrom the Swarm mainnet, which has network-id 1. Nodes will not connect\nto peers which have a different network id. We also set our bootnode\nto be the empty string ",(0,s.jsx)(n.code,{children:'""'}),". A bootnode is responsible for\nbootstrapping the network so that a new node can find its first few\npeers before it begins its own journey to find friends in the\nSwarm. In Swarm any node can be used as a bootnode. Later, we will\nuse our first node as the bootnode for our other node(s), but for now we leave this option blank."]}),"\n",(0,s.jsxs)(n.p,{children:["We have set ",(0,s.jsx)(n.code,{children:"mainnet"})," to false so that our node runs on the Sepolia testnet, and we provide an RPC endpoint for Sepolia in the ",(0,s.jsx)(n.code,{children:"blockchain-rpc-endpoint"})," option. We have also set ",(0,s.jsx)(n.code,{children:"full-node"})," and ",(0,s.jsx)(n.code,{children:"swap-enable"})," to ",(0,s.jsx)(n.code,{children:"true"})," so that we can run full nodes."]}),"\n",(0,s.jsxs)(n.p,{children:["Log verbosity has been set to level 5 with the ",(0,s.jsx)(n.code,{children:"verbosity"})," option. By setting it at the highest level of 5, we make sure all important information is shown in our logs. Setting this is optional."]}),"\n",(0,s.jsxs)(n.p,{children:["Finally, note the ",(0,s.jsx)(n.code,{children:"welcome-message"})," in the first nodes configuration file. This is a friendly feature allowing you to send a message to peers that connect to you!"]}),"\n",(0,s.jsx)(n.h3,{id:"starting-your-nodes",children:"Starting Your Nodes"}),"\n",(0,s.jsxs)(n.p,{children:["Now we have created our configuration files, let's start our nodes by running ",(0,s.jsx)(n.code,{children:"bee start --config config_1.yaml"}),", then in another Terminal session, run ",(0,s.jsx)(n.code,{children:"bee start --config config_2.yaml"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["We can now inspect the state of our network by sending HTTP requests to the ",(0,s.jsx)(n.a,{href:"/api/",children:"API"}),"."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"curl -s http://localhost:1633/topology | jq .connected\n"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"0\n"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"curl -s http://localhost:1733/topology | jq .connected\n"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"0\n"})}),"\n",(0,s.jsx)(n.p,{children:"No connections yet? Right! Let's remedy that!"}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:["Here we are using the ",(0,s.jsx)(n.code,{children:"jq"})," command line utility to count the amount of objects in the ",(0,s.jsx)(n.code,{children:"peers"})," array in the JSON response we have received from our API, learn more about how to install and use ",(0,s.jsx)(n.code,{children:"jq"})," ",(0,s.jsx)(n.a,{href:"https://jqlang.org/",children:"here"}),"."]})}),"\n",(0,s.jsx)(n.h3,{id:"making-a-network",children:"Making a network"}),"\n",(0,s.jsx)(n.p,{children:"In order to create a network from our two isolated nodes, we must first instruct our nodes to connect to each other. This step is not explicitly needed if you connect to the main Swarm network, as the default bootnodes in the Swarm network will automatically suggest peers."}),"\n",(0,s.jsxs)(n.p,{children:["First, we will need to find out the network address of the first node. To do this, we send a HTTP request to the ",(0,s.jsx)(n.code,{children:"addresses"})," endpoint of the API."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"curl localhost:1633/addresses | jq\n"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{\n "overlay": "b1978be389998e8c8596ef3c3a54214e2d4db764898ec17ec1ad5f19cdf7cc59",\n "underlay": [\n "/ip4/127.0.0.1/tcp/1634/p2p/QmQHgcpizgoybDtrQXCWRSGdTP526ufeMFn1PyeGd1zMEZ",\n "/ip4/172.25.128.69/tcp/1634/p2p/QmQHgcpizgoybDtrQXCWRSGdTP526ufeMFn1PyeGd1zMEZ",\n "/ip6/::1/tcp/1634/p2p/QmQHgcpizgoybDtrQXCWRSGdTP526ufeMFn1PyeGd1zMEZ"\n ],\n "ethereum": "0xd22cc790e2aef341827e1e49cc631d2a16898cd9",\n "publicKey": "023b26ce8b78ed8cdb07f3af3d284c95bee5e038e7c5d0c397b8a5e33424f5d790",\n "pssPublicKey": "039ceb9c1f0afedf79991d86d89ccf4e96511cf656b43971dc3e878173f7462487"\n}\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Here, we get firstly the ",(0,s.jsx)(n.strong,{children:"overlay address"})," - this is the permanent address Swarm uses as your anonymous identity in the network and secondly, a list of all the ",(0,s.jsx)(n.a,{href:"https://libp2p.io/docs/peers/#peer-ids-in-multiaddrs",children:"multiaddresses"}),", which are physical network addresses at which you node can be found by peers."]}),"\n",(0,s.jsxs)(n.p,{children:["Note the addresses starting with an ",(0,s.jsx)(n.code,{children:"/ip4"}),", followed by ",(0,s.jsx)(n.code,{children:"127.0.0.1"}),", which is the ",(0,s.jsx)(n.code,{children:"localhost"})," internal network in your computer. Now we can use this full address to be the bootnode of our second node so that when it starts up, it goes to this address and both nodes become peers of each other. Let's add this into our config_2.yaml file."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"config_2.yaml"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:'network-id: 7357\napi-addr: 127.0.0.1::1733\np2p-addr: :1734\ndata-dir: /tmp/bee/node2\nbootnode: "/ip4/127.0.0.1/tcp/1634/p2p/QmQHgcpizgoybDtrQXCWRSGdTP526ufeMFn1PyeGd1zMEZ"\npassword: set-a-strong-password\nwelcome-message: "Bzz Bzz Bzz"\nswap-enable: false\nblockchain-rpc-endpoint: https://sepolia.dev.fairdatasociety.org\nverbosity: 5\nfull-node: true \n'})}),"\n",(0,s.jsx)(n.p,{children:"Now, we can shut our second node and reboot with the new configuration."}),"\n",(0,s.jsx)(n.p,{children:"Look at the the output for your first node, you should see our connection message!"}),"\n",(0,s.jsx)(n.p,{children:"Let's also verify that we can see both nodes in using each other's API's."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"curl -s http://localhost:1633/peers | jq\n"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"curl -s http://localhost:1733/peers | jq\n"})}),"\n",(0,s.jsx)(n.p,{children:"Congratulations! You have made your own tiny two bee Swarm! \ud83d\udc1d \ud83d\udc1d"}),"\n",(0,s.jsx)(n.h2,{id:"funding-nodes",children:"Funding Nodes"}),"\n",(0,s.jsx)(n.p,{children:"While you have successfully set up two nodes, they are currently unfunded with either sETH or sBZZ. Sepolia ETH (sETH) is required for issuing transactions on the Sepolia testnet, and Sepolia BZZ (sBZZ) is required for your node to operate as a full staking node."}),"\n",(0,s.jsxs)(n.p,{children:["To fund our nodes, we need to first collect the blockchain addresses for each node. We can use the ",(0,s.jsx)(n.code,{children:"/addresses"})," endpoint for this:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"curl localhost:1633/addresses | jq\n"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'{\n "overlay": "b1978be389998e8c8596ef3c3a54214e2d4db764898ec17ec1ad5f19cdf7cc59",\n "underlay": [\n "/ip4/127.0.0.1/tcp/1634/p2p/QmQHgcpizgoybDtrQXCWRSGdTP526ufeMFn1PyeGd1zMEZ",\n "/ip4/172.25.128.69/tcp/1634/p2p/QmQHgcpizgoybDtrQXCWRSGdTP526ufeMFn1PyeGd1zMEZ",\n "/ip6/::1/tcp/1634/p2p/QmQHgcpizgoybDtrQXCWRSGdTP526ufeMFn1PyeGd1zMEZ"\n ],\n "ethereum": "0xd22cc790e2aef341827e1e49cc631d2a16898cd9",\n "publicKey": "023b26ce8b78ed8cdb07f3af3d284c95bee5e038e7c5d0c397b8a5e33424f5d790",\n "pssPublicKey": "039ceb9c1f0afedf79991d86d89ccf4e96511cf656b43971dc3e878173f7462487"\n}\n'})}),"\n",(0,s.jsx)(n.p,{children:'Then copy the address in the "ethereum" field. This is the address you need to send sETH and sBZZ to.'}),"\n",(0,s.jsx)(n.p,{children:"You will need to send only a very small amount of sETH such as 0.01 sETH, to get started. You will need 10 sBZZ to run a full node with staking."}),"\n",(0,s.jsx)(n.p,{children:"After sending sETH and sBZZ to your node's address which you copied above, restart your node and it should begin operating properly as a full node."}),"\n",(0,s.jsx)(n.p,{children:"Repeat these same steps with the other node in order to complete a private test network of two full nodes."}),"\n",(0,s.jsx)(n.h3,{id:"getting-testnet-tokens",children:"Getting Testnet Tokens"}),"\n",(0,s.jsxs)(n.p,{children:["In order to acquire sETH and sBZZ, refer to the ",(0,s.jsx)(n.a,{href:"/docs/bee/installation/fund-your-node",children:"Fund Your Node"})," page."]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},28453(e,n,t){t.d(n,{R:()=>a,x:()=>d});var o=t(96540);const s={},r=o.createContext(s);function a(e){const n=o.useContext(r);return o.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),o.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b0d08c50.5a995325.js b/assets/js/b0d08c50.5a995325.js new file mode 100644 index 000000000..ce42886a8 --- /dev/null +++ b/assets/js/b0d08c50.5a995325.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[7233],{43805(e,t,a){a.r(t),a.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>p,frontMatter:()=>o,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"concepts/incentives/price-oracle","title":"Price Oracle","description":"Describes smart contract mechanism for dynamically adjusting postage stamp prices based on network utilization data.","source":"@site/docs/concepts/incentives/price-oracle.md","sourceDirName":"concepts/incentives","slug":"/concepts/incentives/price-oracle","permalink":"/docs/concepts/incentives/price-oracle","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/concepts/incentives/price-oracle.md","tags":[],"version":"current","frontMatter":{"title":"Price Oracle","id":"price-oracle","description":"Describes smart contract mechanism for dynamically adjusting postage stamp prices based on network utilization data."},"sidebar":"concepts","previous":{"title":"Bandwidth Incentives (SWAP)","permalink":"/docs/concepts/incentives/bandwidth-incentives"},"next":{"title":"PSS","permalink":"/docs/concepts/pss"}}');var r=a(74848),n=a(28453);const o={title:"Price Oracle",id:"price-oracle",description:"Describes smart contract mechanism for dynamically adjusting postage stamp prices based on network utilization data."},i=void 0,c={},d=[{value:"How does the price oracle set stamp prices?",id:"stamp-prices",level:2},{value:"How does the price adjust to network demand?",id:"network-demand",level:2}];function l(e){const t={a:"a",h2:"h2",mermaid:"mermaid",p:"p",...(0,n.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h2,{id:"stamp-prices",children:"How does the price oracle set stamp prices?"}),"\n",(0,r.jsx)(t.p,{children:"The price oracle targets a fourfold (4\xd7) data-redundancy level as a safe minimum, and moves the stamp price to hold it there: when redundancy falls below 4 it raises the price, and when redundancy rises above 4 it lowers it \u2014 a negative-feedback loop that pulls redundancy back toward 4."}),"\n",(0,r.jsxs)(t.p,{children:["The job of the ",(0,r.jsx)(t.a,{href:"https://github.com/ethersphere/storage-incentives/blob/master/src/PriceOracle.sol",children:"oracle contract"})," is to set the price of postage stamps. The oracle contract uses data from the ",(0,r.jsx)(t.a,{href:"https://github.com/ethersphere/storage-incentives/blob/master/src/Redistribution.sol",children:"redistribution contract"})," in order to set the appropriate price for postage stamps through the ",(0,r.jsx)(t.a,{href:"https://github.com/ethersphere/storage-incentives/blob/master/src/PostageStamp.sol",children:"postage stamp contract"}),'. The data from the redistribution contract is used to calculate a "utilisation signal". This signal is an indicator of how much the Swarm network\u2019s data storage capacity is being utilized. Specifically, the signal is a measure of data redundancy on the network. Redundancy is a measure of how many copies of each piece of data can be stored by the network. The protocol targets a fourfold level of data redundancy as a safe minimum.']}),"\n",(0,r.jsx)(t.h2,{id:"network-demand",children:"How does the price adjust to network demand?"}),"\n",(0,r.jsx)(t.p,{children:"The oracle runs a negative-feedback loop that keeps redundancy near the 4\xd7 target:"}),"\n",(0,r.jsx)(t.mermaid,{value:"flowchart TD\n T([Target: 4x data redundancy])\n T -- redundancy falls below 4 --\x3e U[Oracle raises the stamp price]\n U --\x3e V[Fewer stamps bought]\n V -- redundancy rises --\x3e T\n T -- redundancy rises above 4 --\x3e X[Oracle lowers the stamp price]\n X --\x3e Y[More stamps bought]\n Y -- redundancy falls --\x3e T"}),"\n",(0,r.jsx)(t.p,{children:"For example, if there is an increase in postage stamps being purchased while the number of nodes remains constant, the data redundancy level will begin to fall as data storers\u2019 available space begins to become reserved. If too many postage stamps are purchased without an equivalent increase in storage providers, the redundancy level may fall below four. In this case, the oracle will increase the price of postage stamps so that it becomes more expensive to store data on Swarm. The higher cost of storage will then lead to less postage stamps being purchased, and will push the redundancy level back up towards four."}),"\n",(0,r.jsx)(t.p,{children:"Conversely, if the amount of Stamps being purchased decreases while the number of storage provider nodes remains constant, the redundancy level will increase as there are fewer chunks of data to be distributed amongst the same number of nodes. In this case, the oracle will decrease the Postage Stamp price in order to promote more data storers to store their data on Swarm. The lower cost of storage will then lead to more Postage Stamps being purchased and push the redundancy level back down towards four."})]})}function p(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},28453(e,t,a){a.d(t,{R:()=>o,x:()=>i});var s=a(96540);const r={},n=s.createContext(r);function o(e){const t=s.useContext(n);return s.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(n.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b2147b80.5027f325.js b/assets/js/b2147b80.5027f325.js new file mode 100644 index 000000000..af0c17fb2 --- /dev/null +++ b/assets/js/b2147b80.5027f325.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[4311],{49663(e,n,s){s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>d,metadata:()=>t,toc:()=>a});const t=JSON.parse('{"id":"bee/installation/fund-your-node","title":"Fund Your Node","description":"Outlines xDAI and xBZZ token requirements by use case and provides guidance on acquiring tokens from exchanges and faucets.","source":"@site/docs/bee/installation/fund-your-node.md","sourceDirName":"bee/installation","slug":"/bee/installation/fund-your-node","permalink":"/docs/bee/installation/fund-your-node","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/bee/installation/fund-your-node.md","tags":[],"version":"current","frontMatter":{"title":"Fund Your Node","id":"fund-your-node","description":"Outlines xDAI and xBZZ token requirements by use case and provides guidance on acquiring tokens from exchanges and faucets."},"sidebar":"bee","previous":{"title":"Connectivity","permalink":"/docs/bee/installation/connectivity"},"next":{"title":"Introduction","permalink":"/docs/bee/working-with-bee/introduction"}}');var i=s(74848),r=s(28453);const d={title:"Fund Your Node",id:"fund-your-node",description:"Outlines xDAI and xBZZ token requirements by use case and provides guidance on acquiring tokens from exchanges and faucets."},o=void 0,l={},a=[{value:"Overview",id:"overview",level:2},{value:"xDAI is Required For:",id:"xdai-is-required-for",level:3},{value:"xBZZ is Required For:",id:"xbzz-is-required-for",level:3},{value:"Token Amounts by Use Case",id:"token-amounts-by-use-case",level:2},{value:"Getting Tokens",id:"getting-tokens",level:2},{value:"How to Get xDAI",id:"how-to-get-xdai",level:3},{value:"How to Get xBZZ",id:"how-to-get-xbzz",level:3},{value:"Getting Testnet Tokens (Sepolia ETH & sBZZ)",id:"getting-testnet-tokens-sepolia-eth--sbzz",level:3},{value:"Node Wallet & Chequebook",id:"node-wallet--chequebook",level:2},{value:"Funding Your Wallet",id:"funding-your-wallet",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,i.jsxs)(n.p,{children:["Bee nodes require ",(0,i.jsx)(n.strong,{children:"xDAI"})," (for gas fees) and ",(0,i.jsx)(n.strong,{children:"xBZZ"})," (for storage and bandwidth) to function properly. The amount needed depends on your node type and use case."]}),"\n",(0,i.jsx)(n.h3,{id:"xdai-is-required-for",children:"xDAI is Required For:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Buying Postage Stamps"})," (",(0,i.jsx)(n.a,{href:"/docs/develop/tools-and-features/buy-a-stamp-batch",children:"Uploading Data"}),")"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Stake Management Transactions"})," (",(0,i.jsx)(n.a,{href:"/docs/bee/working-with-bee/staking",children:"Staking"}),")"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Storage Incentives Transactions"})," (",(0,i.jsx)(n.a,{href:"/docs/concepts/incentives/redistribution-game",children:"Redistribution Game"}),")"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Chequebook Deployment"})," (",(0,i.jsx)(n.a,{href:"/docs/concepts/incentives/bandwidth-incentives",children:"Bandwidth Payments"}),")"]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"xbzz-is-required-for",children:"xBZZ is Required For:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Buying Postage Stamps"})," (scales with data size and duration)"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Staking"})," (Minimum ",(0,i.jsx)(n.strong,{children:"10 xBZZ"}),", ",(0,i.jsx)(n.strong,{children:"20 xBZZ"})," for reserve doubling)"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Bandwidth Payments"})," (~",(0,i.jsx)(n.strong,{children:"0.5 xBZZ per GB downloaded"}),")"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"token-amounts-by-use-case",children:"Token Amounts by Use Case"}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:(0,i.jsx)(n.strong,{children:"Use Case"})}),(0,i.jsx)(n.th,{children:(0,i.jsx)(n.strong,{children:"Node Type"})}),(0,i.jsx)(n.th,{children:(0,i.jsx)(n.strong,{children:"xDAI Required"})}),(0,i.jsx)(n.th,{children:(0,i.jsx)(n.strong,{children:"xBZZ Required"})})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Free tier downloads"}),(0,i.jsx)(n.td,{children:"Ultra-Light, Light, Full"}),(0,i.jsx)(n.td,{children:"None"}),(0,i.jsx)(n.td,{children:"None"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Downloading beyond free tier"}),(0,i.jsx)(n.td,{children:"Light, Full"}),(0,i.jsx)(n.td,{children:"None"}),(0,i.jsx)(n.td,{children:"Scales with volume\u2014start with ~0.1 xBZZ, increase as needed"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Uploading"}),(0,i.jsx)(n.td,{children:"Light, Full"}),(0,i.jsx)(n.td,{children:"None"}),(0,i.jsx)(n.td,{children:"Scales with volume\u2014start with ~0.1 xBZZ, increase as needed"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Purchasing Postage Stamp Batches"}),(0,i.jsx)(n.td,{children:"Light, Full"}),(0,i.jsx)(n.td,{children:"< 0.01 xDAI / tx"}),(0,i.jsx)(n.td,{children:"Scales with volume & duration. Can start with ~0.2 xBZZ for small uploads."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Staking"}),(0,i.jsx)(n.td,{children:"Full"}),(0,i.jsx)(n.td,{children:"< 0.01 xDAI / tx"}),(0,i.jsx)(n.td,{children:"10 xBZZ (minimum)"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Storage Incentives Transactions"}),(0,i.jsx)(n.td,{children:"Full"}),(0,i.jsx)(n.td,{children:"< 0.01 xDAI / tx - needs topups over time since these are reoccurring transactions"}),(0,i.jsx)(n.td,{children:"None"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Bandwidth Payments"}),(0,i.jsx)(n.td,{children:"Light, Full"}),(0,i.jsx)(n.td,{children:"None"}),(0,i.jsx)(n.td,{children:"Scales with bandwidth (~0.5 xBZZ/GB downloaded)"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Chequebook Deployment"}),(0,i.jsx)(n.td,{children:"Light, Full"}),(0,i.jsx)(n.td,{children:"< 0.001 xDAI"}),(0,i.jsx)(n.td,{children:"None"})]})]})]}),"\n",(0,i.jsx)(n.h2,{id:"getting-tokens",children:"Getting Tokens"}),"\n",(0,i.jsx)(n.h3,{id:"how-to-get-xdai",children:"How to Get xDAI"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Free xDAI Faucets"}),": You may try one of the ",(0,i.jsx)(n.a,{href:"https://docs.gnosischain.com/tools/Faucets",children:"Gnosis Chain faucets"})," listed in the official Gnosis Chain documentation, however the amount offered may not meet your needs."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Purchasing xDAI"}),": You can also purchase xDAI from ",(0,i.jsx)(n.a,{href:"https://docs.gnosischain.com/about/tokens/xdai",children:"various exchanges"})," listed in the Gnosis Chain documentation. xDAI is also widely available on most major cryptocurrency exchanges."]}),"\n"]}),"\n",(0,i.jsx)(n.admonition,{type:"warning",children:(0,i.jsx)(n.p,{children:"Make sure that you are withdrawing the Gnosis Chain version of xDAI, as xDAI has been bridged to several other chains as well."})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Bridging From Ethereum"}),": If you already have xDAI on Ethereum, you can also consider using the ",(0,i.jsx)(n.a,{href:"https://bridge.gnosischain.com/",children:"Gnosis Chain bridge"})," to transfer it over to Gnosis Chain."]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"how-to-get-xbzz",children:"How to Get xBZZ"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Buying xBZZ"}),": xBZZ can be purchased from a variety of ",(0,i.jsx)(n.a,{href:"https://www.ethswarm.org/get-bzz#how-to-get-bzz",children:"centralized and decentralized exchanges"})," listed on the official Ethswarm.org website."]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"getting-testnet-tokens-sepolia-eth--sbzz",children:"Getting Testnet Tokens (Sepolia ETH & sBZZ)"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Sepolia ETH"}),": Try ",(0,i.jsx)(n.a,{href:"https://faucetlink.to/sepolia",children:"these faucets"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"sBZZ"}),": Buy on ",(0,i.jsx)(n.a,{href:"https://app.uniswap.org/swap?outputCurrency=0x543dDb01Ba47acB11de34891cD86B675F04840db&inputCurrency=ETH",children:"Uniswap"})," (ensure ",(0,i.jsx)(n.strong,{children:"Sepolia testnet"})," is selected in MetaMask and ",(0,i.jsx)(n.strong,{children:"Testnet mode"})," is enabled in the Uniswap web app settings)."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"node-wallet--chequebook",children:"Node Wallet & Chequebook"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Wallet Creation"}),": A Gnosis Chain wallet is auto-created when you install Bee."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Chequebook Deployment"}),": A chequebook contract will be automatically deployed when a Bee node is configured to run as a light or full node and has been funded with sufficient xDAI to pay for the chequebook deployment transaction. Required for bandwidth payments."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Wallet Access"}),": Located in ",(0,i.jsx)(n.code,{children:"keys/"})," in Bee's ",(0,i.jsx)(n.code,{children:"data-dir"})," (importable to MetaMask). Also requires a password which is specified through your node's configuration (either passed directly with the ",(0,i.jsx)(n.code,{children:"password"})," option or as a password file specified with the ",(0,i.jsx)(n.code,{children:"password-file"})," option)."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"funding-your-wallet",children:"Funding Your Wallet"}),"\n",(0,i.jsx)(n.p,{children:"In order to fund your wallet, first you need to identify your wallet address. The easiest way to do so is to first start your Bee node in ultra-light mode (Bee will start in ultra-light mode when started with the default settings) and then query the Bee API to find your address:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -s localhost:1633/addresses | jq .ethereum\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'"0x9a73f283cd9212b99b5e263f9a81a0ddc847cd93"\n'})}),"\n",(0,i.jsxs)(n.p,{children:["Fund your node with the appropriate amount of xDAI and xBZZ based on the recommended amounts specified in ",(0,i.jsx)(n.a,{href:"/docs/bee/installation/fund-your-node#token-amounts-by-use-case",children:"the chart above"}),"."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsxs)(n.em,{children:["For support, ask in the ",(0,i.jsx)(n.a,{href:"https://discord.com/channels/799027393297514537/811574542069137449",children:"Develop on Swarm"})," Discord channel."]})})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},28453(e,n,s){s.d(n,{R:()=>d,x:()=>o});var t=s(96540);const i={},r=t.createContext(i);function d(e){const n=t.useContext(r);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:d(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b35a7c50.c42457ae.js b/assets/js/b35a7c50.c42457ae.js new file mode 100644 index 000000000..d417475dd --- /dev/null +++ b/assets/js/b35a7c50.c42457ae.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[3230],{34419(e,t,s){s.r(t),s.d(t,{assets:()=>d,contentTitle:()=>r,default:()=>h,frontMatter:()=>i,metadata:()=>n,toc:()=>l});const n=JSON.parse('{"id":"desktop/install","title":"Install","description":"Install the Swarm Desktop app on Windows, macOS, or Linux to run a Bee node with a graphical interface.","source":"@site/docs/desktop/install.md","sourceDirName":"desktop","slug":"/desktop/install","permalink":"/docs/desktop/install","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/desktop/install.md","tags":[],"version":"current","frontMatter":{"title":"Install","id":"install","description":"Install the Swarm Desktop app on Windows, macOS, or Linux to run a Bee node with a graphical interface."},"sidebar":"desktop","previous":{"title":"Introduction","permalink":"/docs/desktop/introduction"},"next":{"title":"Configuration","permalink":"/docs/desktop/configuration"}}');var a=s(74848),o=s(28453);const i={title:"Install",id:"install",description:"Install the Swarm Desktop app on Windows, macOS, or Linux to run a Bee node with a graphical interface."},r=void 0,d={},l=[{value:"Download and Install Swarm Desktop",id:"download-and-install-swarm-desktop",level:2},{value:"What Just Happened?",id:"what-just-happened",level:3},{value:""Ultra-light" and "Light" Nodes",id:"ultra-light-and-light-nodes",level:3},{value:"Tour of Swarm Desktop",id:"tour-of-swarm-desktop",level:2},{value:"Info Tab",id:"info-tab",level:3},{value:"Files Tab",id:"files-tab",level:3},{value:"Account Tab",id:"account-tab",level:3},{value:"Settings Tab",id:"settings-tab",level:3},{value:"Status Tab",id:"status-tab",level:3}];function c(e){const t={a:"a",admonition:"admonition",em:"em",h2:"h2",h3:"h3",img:"img",p:"p",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.h2,{id:"download-and-install-swarm-desktop",children:"Download and Install Swarm Desktop"}),"\n",(0,a.jsxs)(t.p,{children:["Installing the Swarm Desktop app takes only a few clicks. To get started, simply download and install the Swarm Desktop app for your operating system. Installers are available for Windows, Linux, and OSX. You can find download links for Swarm Desktop at the Swarm ",(0,a.jsx)(t.a,{href:"https://www.ethswarm.org/build/desktop",children:"homepage"})," and you can find installers for specific operating systems at the ",(0,a.jsx)(t.a,{href:"https://github.com/ethersphere/swarm-desktop/releases",children:"releases page"})," of the Swarm Desktop GitHub repo."]}),"\n",(0,a.jsx)(t.admonition,{type:"caution",children:(0,a.jsx)(t.p,{children:"Swarm Desktop is in Beta and currently includes the Sentry application monitoring and bug reporting software which automatically collects data in order to help improve the software."})}),"\n",(0,a.jsx)(t.admonition,{type:"caution",children:(0,a.jsx)(t.p,{children:"This project is in beta state. There might (and most probably will) be changes in the future to its API and working. Also, no guarantees can be made about its stability, efficiency, and security at this stage."})}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.a,{href:"https://www.ethswarm.org/build/desktop",children:(0,a.jsx)(t.img,{src:s(45005).A+"",width:"2542",height:"1193"})}),"\n",(0,a.jsx)(t.em,{children:"Ethswarm.org Swarm Desktop Page"})]}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.a,{href:"https://github.com/ethersphere/swarm-desktop/releases",children:(0,a.jsx)(t.img,{src:s(43055).A+"",width:"1890",height:"1277"})}),"\n",(0,a.jsx)(t.em,{children:"Swarm Desktop GitHub Releases Page"})]}),"\n",(0,a.jsx)(t.p,{children:"After running the installer, a window will pop up and display the installation status:"}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{src:s(50046).A+"",width:"1482",height:"1096"})}),"\n",(0,a.jsx)(t.p,{children:'Once the installation is complete, Swarm Desktop will open up in your default browser in a new window to the "Info" tab of the app:'}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{src:s(28960).A+"",width:"2546",height:"1213"})}),"\n",(0,a.jsx)(t.p,{children:'If the installation went smoothly, you should see the message "Your node is connected" above the "Access Content" button along with a status message of "Node OK".'}),"\n",(0,a.jsx)(t.h3,{id:"what-just-happened",children:"What Just Happened?"}),"\n",(0,a.jsx)(t.p,{children:"Running the Swarm Desktop app for the first time set up a new Bee node on your system. The installation process generated and saved private keys for your node in the Swarm Desktop's data directory. Those keys were used to start up a new Bee node in ultra-light mode."}),"\n",(0,a.jsx)(t.admonition,{type:"warning",children:(0,a.jsxs)(t.p,{children:["If your Swarm Desktop files are accidentally deleted or become corrupted you will lose access to any assets or data which are secured using those keys. Make sure to ",(0,a.jsx)(t.a,{href:"/docs/desktop/backup-restore",children:"backup your keys"}),"."]})}),"\n",(0,a.jsx)(t.h3,{id:"ultra-light-and-light-nodes",children:'"Ultra-light" and "Light" Nodes'}),"\n",(0,a.jsxs)(t.p,{children:['Swarm Desktop by default starts up a node in "ultra-light" mode. When running in ultra-light mode Swarm Desktop limited to only downloading data from Swarm. Moreover, it\'s limited to downloading only within the free threshold allowed by other nodes. For instructions on switching to light mode see the ',(0,a.jsx)(t.a,{href:"/docs/desktop/configuration",children:"configuration section"}),"."]}),"\n",(0,a.jsx)(t.h2,{id:"tour-of-swarm-desktop",children:"Tour of Swarm Desktop"}),"\n",(0,a.jsx)(t.h3,{id:"info-tab",children:"Info Tab"}),"\n",(0,a.jsx)(t.p,{children:'The "Info" tab gives you a quick view of your Swarm Desktop\'s status. From here we can quickly see if the node is connected to Swarm, whether the node is funded, and whether its chequebook contract is set up. On a new install of Swarm Desktop, the node should be connected, but the wallet and chequebook will not have been set up yet.'}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{src:s(18693).A+"",width:"2560",height:"1367"})}),"\n",(0,a.jsx)(t.h3,{id:"files-tab",children:"Files Tab"}),"\n",(0,a.jsxs)(t.p,{children:['From "Files" tab you can input a Swarm hash in order to download the file associated with the hash. See this full ',(0,a.jsx)(t.a,{href:"/docs/desktop/access-content",children:"guide for downloading"})," using Swarm Desktop."]}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{src:s(85900).A+"",width:"2560",height:"1372"})}),"\n",(0,a.jsx)(t.h3,{id:"account-tab",children:"Account Tab"}),"\n",(0,a.jsx)(t.p,{children:'From the "Account" tab you can view your Swarm Desktop node\'s Gnosis Chain address and associated xBZZ and xDAI balances.'}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{src:s(34756).A+"",width:"2560",height:"1372"})}),"\n",(0,a.jsx)(t.h3,{id:"settings-tab",children:"Settings Tab"}),"\n",(0,a.jsxs)(t.p,{children:['From the "Settings" tab you can view important settings values. Note that the Blockchain RPC URL and ENS resolver URL are already filled in, and only the Blockchain RPC URL is modifiable through this tab. If you wish to modify other settings see the ',(0,a.jsx)(t.a,{href:"/docs/desktop/configuration",children:" configuration page"})," for detailed instructions."]}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{src:s(86854).A+"",width:"2560",height:"1373"})}),"\n",(0,a.jsx)(t.h3,{id:"status-tab",children:"Status Tab"}),"\n",(0,a.jsx)(t.p,{children:'From the "Status" tab you can see a quick overview of the health of your Swarm Desktop\'s Bee node.'}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{src:s(1511).A+"",width:"2560",height:"1357"})})]})}function h(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(c,{...e})}):c(e)}},45005(e,t,s){s.d(t,{A:()=>n});const n=s.p+"assets/images/desktop-homepage-dl-12a08bb9260fcf5a022cbb087f24f6e9.png"},50046(e,t,s){s.d(t,{A:()=>n});const n=s.p+"assets/images/desktop-install-downloading-1fa3a12d14bb0b11efaabe0f7be96723.png"},28960(e,t,s){s.d(t,{A:()=>n});const n=s.p+"assets/images/desktop-new-install-8e60389ae653e767c6b1c64367149eb8.png"},43055(e,t,s){s.d(t,{A:()=>n});const n=s.p+"assets/images/desktop-releases-dl-cba1154cb87d19016ee3ac3211ba3584.png"},34756(e,t,s){s.d(t,{A:()=>n});const n=s.p+"assets/images/swarm-desktop-account-tab-33af042045830c434520ca470eeee8a3.png"},85900(e,t,s){s.d(t,{A:()=>n});const n=s.p+"assets/images/swarm-desktop-files-tab-c38ee8216a81a02bc4ca6528a3ffd165.png"},18693(e,t,s){s.d(t,{A:()=>n});const n=s.p+"assets/images/swarm-desktop-info-tab-d11651491dd2935fd14699edaf17cb5d.png"},86854(e,t,s){s.d(t,{A:()=>n});const n=s.p+"assets/images/swarm-desktop-settings-tab-583e639cac14116c03fb1193f427af8f.png"},1511(e,t,s){s.d(t,{A:()=>n});const n=s.p+"assets/images/swarm-desktop-status-tab-c11b2013c1c54f4998d52819263bd766.png"},28453(e,t,s){s.d(t,{R:()=>i,x:()=>r});var n=s(96540);const a={},o=n.createContext(a);function i(e){const t=n.useContext(o);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),n.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b57c29d7.9e4f4afb.js b/assets/js/b57c29d7.9e4f4afb.js new file mode 100644 index 000000000..3f1861c33 --- /dev/null +++ b/assets/js/b57c29d7.9e4f4afb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[4154],{73178(e,n,t){t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>i,metadata:()=>o,toc:()=>l});const o=JSON.parse('{"id":"bee/installation/connectivity","title":"Connectivity","description":"Explains network setup and NAT configuration to ensure Bee nodes can communicate with peers on both private and public networks.","source":"@site/docs/bee/installation/connectivity.md","sourceDirName":"bee/installation","slug":"/bee/installation/connectivity","permalink":"/docs/bee/installation/connectivity","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/bee/installation/connectivity.md","tags":[],"version":"current","frontMatter":{"title":"Connectivity","id":"connectivity","description":"Explains network setup and NAT configuration to ensure Bee nodes can communicate with peers on both private and public networks."},"sidebar":"bee","previous":{"title":"Hive","permalink":"/docs/bee/installation/hive"},"next":{"title":"Fund Your Node","permalink":"/docs/bee/installation/fund-your-node"}}');var r=t(74848),s=t(28453);const i={title:"Connectivity",id:"connectivity",description:"Explains network setup and NAT configuration to ensure Bee nodes can communicate with peers on both private and public networks."},a=void 0,c={},l=[{value:"Networking Basics",id:"networking-basics",level:2},{value:"Your IP Address",id:"your-ip-address",level:3},{value:"Datacenters and Computers Connected Directly to the Internet",id:"datacenters-and-computers-connected-directly-to-the-internet",level:3},{value:"Home, Commercial and Business Networks and Other Networks Behind NAT",id:"home-commercial-and-business-networks-and-other-networks-behind-nat",level:3},{value:"Navigating Through the NAT",id:"navigating-through-the-nat",level:2},{value:"Automatic: Universal Plug and Play (UPnP)",id:"automatic-universal-plug-and-play-upnp",level:3},{value:"Manual: Configure Your Router and Bee",id:"manual-configure-your-router-and-bee",level:3},{value:"Using multiple P2P transports (TCP, WS, WSS)",id:"using-multiple-p2p-transports-tcp-ws-wss",level:3},{value:"Troubleshooting Connectivity",id:"troubleshooting-connectivity",level:3}];function d(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.p,{children:"To fully connect to the swarm, your Bee node needs to be able to both\nsend and receive messages from the outside world. Normally, your\nrouter will not allow other IPs on the Internet to connect, unless\nyou have initiated the connection. Bees welcome newcomers in the\nswarm, as long as they play by the rules! If a node misbehaves, we\nwill simply add it to a list of blocked nodes and refuse future\nconnections from them."}),"\n",(0,r.jsxs)(n.p,{children:["Here at Swarm, every Bee counts! To make sure all Bees can join the\nswarm, below you will find a detailed guide to navigating your way\nthrough your network and making it out into the wild so you can buzz\naround fellow bees and maximize your chances of earning xBZZ. If\nyou still have problems, please join us in our ",(0,r.jsx)(n.a,{href:"https://discord.gg/kHRyMNpw7t",children:"Discord\nserver"})," and we'll help you find the\nway! \ud83d\udc1d \ud83d\udc1d \ud83d\udc1d \ud83d\udc1d \ud83d\udc1d"]}),"\n",(0,r.jsx)(n.admonition,{type:"warning",children:(0,r.jsxs)(n.p,{children:["To ensure your Bee has the best chance of participating in the swarm,\nyou must ensure your Bee is able to handle ",(0,r.jsxs)(n.strong,{children:["both incoming and\noutgoing connections from the global Internet to its p2p port\n(",(0,r.jsx)(n.code,{children:"1634"})," by default)"]}),". See below for a detailed guide on how to make sure\nthis is the case, or for the 1337: check your\n",(0,r.jsx)(n.code,{children:"http://localhost:1633/addresses"})," to see which public IP and port\nlibp2p is advertising and verify its connectivity to the rest of the\nInternet! You may need to alter your Bee node's ",(0,r.jsx)(n.code,{children:"nat-addr"}),"\nconfiguration. \ud83e\udd13"]})}),"\n",(0,r.jsx)(n.h2,{id:"networking-basics",children:"Networking Basics"}),"\n",(0,r.jsxs)(n.p,{children:["In a network, each computer is assigned an IP address. Each IP address\nis then subdivided into thousands of ",(0,r.jsx)(n.em,{children:"sockets"})," or ",(0,r.jsx)(n.em,{children:"ports"}),", each of\nwhich has an incoming and outgoing component."]}),"\n",(0,r.jsx)(n.p,{children:"In a completely trusted network of computers, any connections to or\nfrom any of these ports are allowed. However, to protect ourselves\nfrom nefarious actors when we join the wider Internet, it is sometimes\nimportant to filter this traffic so that some of these ports are off\nlimits to the public."}),"\n",(0,r.jsxs)(n.p,{children:["In order to allow messages to our p2p port from other Bee nodes that\nwe have previously not connected, we must ensure that our network is\nset up to receive incoming connections (on port ",(0,r.jsx)(n.code,{children:"1634"})," by default)."]}),"\n",(0,r.jsx)(n.admonition,{type:"danger",children:(0,r.jsxs)(n.p,{children:["There are also some ports which you should never expose to the outside Internet. Make sure that your ",(0,r.jsx)(n.code,{children:"api-addr"})," (default ",(0,r.jsx)(n.code,{children:"1633"}),") is never exposed to the internet. It is good practice to employ one or more firewalls that block traffic on every port except for those you are expecting to be open. If you do not use a firewall, make sure to change the default ",(0,r.jsx)(n.code,{children:"api-addr"})," from ",(0,r.jsx)(n.code,{children:"1633"})," to ",(0,r.jsx)(n.code,{children:"127.0.0.1:1633"})," so that it is not publicly exposed."]})}),"\n",(0,r.jsx)(n.h3,{id:"your-ip-address",children:"Your IP Address"}),"\n",(0,r.jsxs)(n.p,{children:["When you connect to the Internet, you are assigned a unique number\ncalled an IP Address. IP stands for ",(0,r.jsx)(n.strong,{children:"Internet Protocol"}),". The most\nprevalent IP version used is ",(0,r.jsx)(n.em,{children:"still"})," the archaic\n",(0,r.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/IPv4",children:"IPv4"})," which was invented way back\nin 1981. IPv6 is available but not well used. Due to the mitigation of\nthe deficiencies inherent in the IPv4 standard, some complications may arise."]}),"\n",(0,r.jsx)(n.h3,{id:"datacenters-and-computers-connected-directly-to-the-internet",children:"Datacenters and Computers Connected Directly to the Internet"}),"\n",(0,r.jsx)(n.p,{children:"If you are renting space in a datacenter, the chances are that your computer will be connected directly to the real Internet. This means that the IP of your networking interface will be directly set to be the same as your public IP."}),"\n",(0,r.jsx)(n.p,{children:"You can investigate this by running:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"ifconfig\n"})}),"\n",(0,r.jsx)(n.p,{children:"or"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"ip address\n"})}),"\n",(0,r.jsx)(n.p,{children:"Your output should contain something like:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"eth0: flags=4163 mtu 1500\n inet 178.128.196.191 netmask 255.255.240.0 broadcast 178.128.207.255\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Here we can see our computer's ",(0,r.jsx)(n.strong,{children:"public IP address"}),"\n",(0,r.jsx)(n.code,{children:"178.128.196.191"}),". This is the address that is used by other computers\nwe connect to over the Internet. We can verify this using a third\nparty service such as ",(0,r.jsx)(n.em,{children:"icanhazip"})," or ",(0,r.jsx)(n.em,{children:"ifconfig"}),"."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"curl icanhazip.com --ipv4\n"})}),"\n",(0,r.jsx)(n.p,{children:"or"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"curl ifconfig.co --ipv4\n"})}),"\n",(0,r.jsx)(n.p,{children:"The response may contain something like:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"178.128.196.191\n"})}),"\n",(0,r.jsx)(n.p,{children:"With Bee running, try to connect to your Bee's p2p port using the public IP address from another computer:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"nc -zv 178.128.196.191 1634\n"})}),"\n",(0,r.jsx)(n.p,{children:"If you have success, congratulations!"}),"\n",(0,r.jsxs)(n.p,{children:["If this still doesn't work for you, see the last part of ",(0,r.jsx)(n.em,{children:"Manual: Configure Your Router and Bee"})," section below, as you may need to configure your ",(0,r.jsx)(n.code,{children:"nat-addr"}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"home-commercial-and-business-networks-and-other-networks-behind-nat",children:"Home, Commercial and Business Networks and Other Networks Behind NAT"}),"\n",(0,r.jsxs)(n.p,{children:["To address the\n",(0,r.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/IPv4_address_exhaustion",children:"scarcity of IP numbers"}),",\nNetwork Address Translation (NAT) was implemented. This approach\ncreates a smaller, private network which many devices connect to in\norder to share a public IP address. Traffic destined for the Internet\nat large is then mediated by another specialised computer. In the\ncases of the a home network, this computer is the familiar home\nrouter, normally also used to provide a WiFi network."]}),"\n",(0,r.jsx)(n.p,{children:"If we run the above commands to find the computer's IP in this scenario, we will see a different output."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"ip address\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"en0: flags=8863 mtu 1500\n\t...\n\tinet 192.168.0.10 netmask 0xffffff00 broadcast 192.168.0.255\n\t...\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Here we can see that, instead of the public IP address, we can see\nthat our computer's IP address is ",(0,r.jsx)(n.code,{children:"192.168.0.10"}),". This is part of the\nIP address space that the Internet Engineering Task Force has\ndesignated for\n",(0,r.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Private_network",children:"private networks"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["As this IP won't work on the global Internet, our router remembers\nthat our computer has been assigned this IP. It then uses ",(0,r.jsx)(n.em,{children:"Network\nAddress Translation"})," (NAT) to modify all requests from our computer to\nanother computer somewhere in the Internet. As the requests pass\nthrough the router it changes our local IP to the public IP of the\nrouter, and vice versa when the responses are sent back, from the\npublic IP to the local one."]}),"\n",(0,r.jsx)(n.h2,{id:"navigating-through-the-nat",children:"Navigating Through the NAT"}),"\n",(0,r.jsx)(n.p,{children:"The presence of NAT presents two problems for p2p networking."}),"\n",(0,r.jsx)(n.p,{children:"The first is that it can be difficult for programs running on our computer to know our real public IP as it is not explicitly known by our computer's networking interface, which is configured with a private network IP. This is a relatively easy problem to solve as we can simply discover our public IP and then specify it in Bee's configuration, or indeed determine it using other means."}),"\n",(0,r.jsxs)(n.p,{children:["The second issue is that our router has only 65535 ports to expose to\nthe public network. However, ",(0,r.jsx)(n.em,{children:"each device on your private network is\ncapable of exposing 65535 ports"}),". To the global Internet, it appears\nthat there is only one set of ports to connect to, whereas, in actual\nfact, there is a full set of ports for each of the devices which are\nconnected to the private network. To solve this second problem,\nrouters commonly employ an approach known as ",(0,r.jsx)(n.em,{children:"port forwarding"}),"."]}),"\n",(0,r.jsx)(n.p,{children:"Bee's solution to these problems come in two flavours, automatic and manual."}),"\n",(0,r.jsx)(n.h3,{id:"automatic-universal-plug-and-play-upnp",children:"Automatic: Universal Plug and Play (UPnP)"}),"\n",(0,r.jsx)(n.p,{children:"UPnP is a protocol designed to simplify the administration of NAT and\nport forwarding for the end user by providing an API from which\nsoftware running within the network can use to ask the router for the\npublic IP and to request for ports to be forwarded to the private IP\nof the computer running the software."}),"\n",(0,r.jsx)(n.admonition,{title:"UPnP is a security risk!",type:"danger",children:(0,r.jsxs)(n.p,{children:["UPnP is a security risk as it allows any host or process inside\n(sometimes also outside) your network to open arbitrary ports which\nmay be used to transfer malicious traffic, for example a\n",(0,r.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Remote_desktop_software#RAT",children:"RAT"}),". UPnP\ncan also be used to determine your IP, and in the case of using ToR or\na VPN, your ",(0,r.jsx)(n.em,{children:"real"})," public IP. We urge you to disable UPnP on your\nrouter and use manual port forwarding as described below."]})}),"\n",(0,r.jsx)(n.p,{children:"Bee will use UPnP to determine your public IP, which is required for various internal processes."}),"\n",(0,r.jsxs)(n.p,{children:["In addition to this, a request will be sent to your router to ask it\nto forward a random one of its ports, which are exposed directly to\nthe Internet, to the Bee p2p port (default ",(0,r.jsx)(n.code,{children:"1634"}),") which your computer\nis exposing only to the private network. Doing this creates a tunnel\nthrough which other Bees may connect to your computer safely."]}),"\n",(0,r.jsx)(n.p,{children:"If you start your Bee node in a private network with UPnP available, the output of the addresses endpoint of your API will look something like this:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'[\n "/ip4/127.0.0.1/tcp/1634/p2p/16Uiu2HAm5zcoBFWmqjDTwGy9RXepBFF8idy6Pr312obMwwxdJSUP",\n "/ip4/192.168.0.10/tcp/1634/p2p/16Uiu2HAm5zcoBFWmqjDTwGy9RXepBFF8idy6Pr312obMwwxdJSUP",\n "/ip6/::1/tcp/1634/p2p/16Uiu2HAm5zcoBFWmqjDTwGy9RXepBFF8idy6Pr312obMwwxdJSUP",\n "/ip4/86.98.94.9/tcp/20529/p2p/16Uiu2HAm5zcoBFWmqjDTwGy9RXepBFF8idy6Pr312obMwwxdJSUP"\n]\n'})}),"\n",(0,r.jsxs)(n.p,{children:["Note that the port in the external\n",(0,r.jsx)(n.a,{href:"https://docs.libp2p.io/concepts/addressing/",children:"multiaddress"})," is the\nrouter's randomly selected ",(0,r.jsx)(n.code,{children:"20529"})," which is forwarded by the router to\n",(0,r.jsx)(n.code,{children:"192.168.0.10:1634"}),". These addresses in this multiaddress are also\nknown as the underlay addresses."]}),"\n",(0,r.jsx)(n.h3,{id:"manual-configure-your-router-and-bee",children:"Manual: Configure Your Router and Bee"}),"\n",(0,r.jsxs)(n.p,{children:["Inspecting the underlay addresses in the output of the addresses\nendpoint of our API, we can see addresses only for ",(0,r.jsx)(n.em,{children:"localhost"}),"\n",(0,r.jsx)(n.code,{children:"127.0.0.1"})," and our ",(0,r.jsx)(n.em,{children:"private network IP"})," ",(0,r.jsx)(n.code,{children:"192.168.0.10"}),". Bee must be\nhaving trouble navigating our NAT."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'[\n "/ip4/127.0.0.1/tcp/1634/p2p/16Uiu2HAm8Hs91MzWuXfUyKrYaj3h8K8gzvRqzSK5gP9TNCwypkJB",\n "/ip4/192.168.0.10/tcp/1634/p2p/16Uiu2HAm8Hs91MzWuXfUyKrYaj3h8K8gzvRqzSK5gP9TNCwypkJB",\n "/ip6/::1/tcp/1634/p2p/16Uiu2HAm8Hs91MzWuXfUyKrYaj3h8K8gzvRqzSK5gP9TNCwypkJB"\n]\n'})}),"\n",(0,r.jsx)(n.p,{children:"To help fix the first problem, let's determine our public IP address."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"curl icanhazip.com\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"86.98.94.9\n"})}),"\n",(0,r.jsx)(n.p,{children:"Now we can simply supply this IP in our Bee configuration on startup."}),"\n",(0,r.jsx)(n.p,{children:"Solving our second problem is a little more difficult as we will need to interact with our router's firmware, which is a little cranky."}),"\n",(0,r.jsxs)(n.p,{children:["Each router is different, but the concept is usually the same. Log in to your router by navigating your browser to your router's configuration user interface, usually at ",(0,r.jsx)(n.a,{href:"http://192.168.0.1",children:"http://192.168.0.1"}),". You will need to log in with a password. Sadly, passwords are often left to be the defaults, which can be found readily on the Internet."]}),"\n",(0,r.jsxs)(n.p,{children:["Once logged in, find the interface to set up port forwarding. The ",(0,r.jsx)(n.a,{href:"https://portforward.com/router.htm",children:"Port Forward"})," website provides some good information, or you may refer to your router manual or provider."]}),"\n",(0,r.jsxs)(n.p,{children:["Here, we will then set up a rule that forwards port ",(0,r.jsx)(n.code,{children:"1634"})," of our\nprivate IP address ",(0,r.jsx)(n.code,{children:"192.168.0.10"})," to the same port ",(0,r.jsx)(n.code,{children:"1634"})," of our\npublic IP."]}),"\n",(0,r.jsxs)(n.p,{children:["Now, when requests arrive at our public address ",(0,r.jsx)(n.code,{children:"86.98.94.9:1634"})," they\nare modified by our router and forwarded to our private IP and port\n",(0,r.jsx)(n.code,{children:"192.168.0.10:1634"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["Sometimes this can be a little tricky, so let's verify we are able to make a TCP connection using ",(0,r.jsx)(n.a,{href:"https://nmap.org/ncat/",children:"netcat"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["First, with Bee ",(0,r.jsx)(n.strong,{children:"not"})," running, let's set up a simple TCP listener using Netcat on the same machine we would like to run Bee on."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"nc -l 0.0.0.0 1634\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"nc -zv 86.98.94.9 1634\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"Connection to 86.98.94.9 port 1834 [tcp/*] succeeded!\n"})}),"\n",(0,r.jsx)(n.p,{children:"Success! \u2728"}),"\n",(0,r.jsx)(n.p,{children:"If this didn't work for you, check out our Debugging Connectivity guide below."}),"\n",(0,r.jsxs)(n.p,{children:["If it did, let's start our Bee node with the ",(0,r.jsx)(n.code,{children:"--nat-addr"})," configured."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"bee start --nat-addr 86.98.94.9:1634\n"})}),"\n",(0,r.jsx)(n.p,{children:"Checking our addresses endpoint again, we can now see that Bee has been able to successfully assign a public address! Congratulations, your Bee is now connected to the outside world!"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'[\n "/ip4/127.0.0.1/tcp/1634/p2p/16Uiu2HAm8Hs91MzWuXfUyKrYaj3h8K8gzvRqzSK5gP9TNCwypkJB",\n "/ip4/192.168.0.10/tcp/1634/p2p/16Uiu2HAm8Hs91MzWuXfUyKrYaj3h8K8gzvRqzSK5gP9TNCwypkJB",\n "/ip6/::1/tcp/1634/p2p/16Uiu2HAm8Hs91MzWuXfUyKrYaj3h8K8gzvRqzSK5gP9TNCwypkJB",\n "/ip4/86.98.94.9/tcp/1634/p2p/16Uiu2HAm8Hs91MzWuXfUyKrYaj3h8K8gzvRqzSK5gP9TNCwypkJB"\n]\n'})}),"\n",(0,r.jsx)(n.admonition,{type:"info",children:(0,r.jsx)(n.p,{children:"If you are regularly connecting and disconnecting to a network, you\nmay also want to use your router's firmware to configure the router to\nreserve and only assign the same local network IP from its DHCP pool\nto your computer's MAC address. This will ensure that your Bee\nseamlessly connects when you rejoin the network!"})}),"\n",(0,r.jsx)(n.h3,{id:"using-multiple-p2p-transports-tcp-ws-wss",children:"Using multiple P2P transports (TCP, WS, WSS)"}),"\n",(0,r.jsxs)(n.p,{children:["A Bee node can expose more than one transport for peer-to-peer communication. By default, nodes use the TCP-based libp2p transport, but Secure WebSocket (",(0,r.jsx)(n.code,{children:"WSS"}),") transport can also be enabled."]}),"\n",(0,r.jsx)(n.p,{children:"To enable WSS support, set:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yaml",children:"p2p-wss-enable: true\n"})}),"\n",(0,r.jsxs)(n.p,{children:["When enabled, Bee listens for Secure WebSocket connections on ",(0,r.jsx)(n.code,{children:"p2p-wss-addr"})," (default ",(0,r.jsx)(n.code,{children:":1635"}),"). In most cases the remaining WSS and AutoTLS options can be left at their default values:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yaml",children:'p2p-wss-addr: ":1635"\nnat-wss-addr: ""\n\nautotls-domain: libp2p.direct\nautotls-registration-endpoint: https://registration.libp2p.direct\nautotls-ca-endpoint: https://acme-v02.api.letsencrypt.org/directory\n'})}),"\n",(0,r.jsx)(n.p,{children:"A configuration using both TCP and WSS transports may look like:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yaml",children:"p2p-addr: :1634\np2p-wss-enable: true\np2p-wss-addr: :1635\n\nnat-addr: 1.2.3.4:1634\nnat-wss-addr: node.example.com:443\n"})}),"\n",(0,r.jsx)(n.p,{children:"In this example:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"p2p-addr"})," defines the local TCP listening address."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"p2p-wss-addr"})," defines the local Secure WebSocket listening address."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"nat-addr"})," is the public address advertised to peers for TCP connections."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"nat-wss-addr"})," is the public address advertised to peers for WSS connections."]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"If WSS is enabled, the WSS port must be reachable by peers. This means the port should be open in your firewall, exposed by your container or host configuration, and permitted by your network if outbound connections are restricted."}),"\n",(0,r.jsxs)(n.p,{children:["When specifying ",(0,r.jsx)(n.code,{children:"nat-addr"})," or ",(0,r.jsx)(n.code,{children:"nat-wss-addr"}),", the value must be a valid ",(0,r.jsx)(n.code,{children:"host:port"})," pair. For example:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yaml",children:"nat-addr: 1.2.3.4:1634\nnat-wss-addr: node.example.com:443\n"})}),"\n",(0,r.jsx)(n.p,{children:"Values missing either the host or port or otherwise misformed addresses are considered invalid and will prevent the node from starting."}),"\n",(0,r.jsx)(n.h3,{id:"troubleshooting-connectivity",children:"Troubleshooting Connectivity"}),"\n",(0,r.jsx)(n.p,{children:"The above guide navigates your NAT, but there are still a few hurdles to overcome. To make sure there is a clear path from your computer to the outside world, let's follow our Bee's journey from the inside out."}),"\n",(0,r.jsx)(n.p,{children:"Let's set up a netcat listener on all interfaces on the computer we'd\nlike to run Bee on as we have above."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"nc -l 0.0.0.0 1634\n"})}),"\n",(0,r.jsx)(n.p,{children:"Now, let's verify we're able to connect to netcat by checking the connection from our local machine."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"nc -zv 127.0.0.1 1634\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"Connection to 127.0.0.1 port 1634 [tcp/*] succeeded!\n"})}),"\n",(0,r.jsx)(n.p,{children:"This should be a no brainer, the connection between localhost in not normally mediated."}),"\n",(0,r.jsxs)(n.p,{children:["If there is a problem here, the problem is with some other software running on your operating system or your operating system itself. Try a different port, such as ",(0,r.jsx)(n.code,{children:"1734"})," and turning off any unnecessary software. If this doesn't work, you may need to try a different operating system environment. Please get in touch and we'll try to help!"]}),"\n",(0,r.jsx)(n.p,{children:"If we were successful, let's move on to the next stage."}),"\n",(0,r.jsx)(n.admonition,{type:"info",children:(0,r.jsx)(n.p,{children:"If you are not able to get access to some firewall settings, or\notherwise debug incoming connectivity, don't worry! All is not\nlost. Bee can function just fine with just outgoing\nconnections. However, if you can, it is worth the effort to allow\nincoming connections, as the whole swarm will benefit from the\nincreased connectivity."})}),"\n",(0,r.jsx)(n.p,{children:"Let's find out what our IP looks like to the Internet."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"curl icanhazip.com\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"86.98.94.9\n"})}),"\n",(0,r.jsx)(n.p,{children:"Now try to connect to your port using the global IP."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"nc -zv 86.98.94.9 1634\n"})}),"\n",(0,r.jsx)(n.p,{children:"If this is successful, our Bee node's path is clear!"}),"\n",(0,r.jsx)(n.p,{children:"If not, we can try a few things to make sure there are no barriers stopping us from getting through."}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsx)(n.li,{children:"Check your computer's firewall."}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["Sometimes your computer is configured to prevent connections. If you\nare on a private network mediated by NAT, you can check if this is\nthe problem by trying to connect from another device on your network\nusing the local IP ",(0,r.jsx)(n.code,{children:"nc -zv 192.168.0.10 1634"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["Ubuntu uses ",(0,r.jsx)(n.a,{href:"https://help.ubuntu.com/community/UFW",children:"UFW"}),", MacOS can\nbe configured using the ",(0,r.jsx)(n.em,{children:"Firewall"})," tab in the ",(0,r.jsx)(n.em,{children:"Security & Privacy"}),"\nsection of ",(0,r.jsx)(n.em,{children:"System Preferences"}),". Windows uses\n",(0,r.jsx)(n.a,{href:"https://support.microsoft.com/en-US/windows/security/windows-security/firewall-and-network-protection-in-the-windows-security-app",children:"Defender Firewall"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["For each of these firewalls, set a special rule to allow UDP and TCP\ntraffic to pass through on port ",(0,r.jsx)(n.code,{children:"1634"}),". You may want to limit this\ntraffic to the Bee application only."]}),"\n",(0,r.jsxs)(n.ol,{start:"2",children:["\n",(0,r.jsx)(n.li,{children:"Check your ingress' firewall."}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"For a datacenter hired server, this configuration will often take\nplace in somewhere in the web user interface. Refer to your server\nhosting provider's documentation to work out how to open ports to\nthe open Internet. Ensure that both TCP and UDP traffic are allowed."}),"\n",(0,r.jsx)(n.p,{children:"Similarly, if you are connecting from within a private network, you\nmay find that the port is blocked by the router. Each router is\ndifferent, so consult your router's firmware documentation to make\nsure there are no firewalls in place blocking traffic on your Bee's\ndesignated p2p port."}),"\n",(0,r.jsxs)(n.p,{children:["You may check this using netcat by trying to connect using your\ncomputer's public IP, as above ",(0,r.jsx)(n.code,{children:"nc -zv 86.98.94.9 1634"}),"."]}),"\n",(0,r.jsxs)(n.ol,{start:"3",children:["\n",(0,r.jsx)(n.li,{children:"Docker"}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Docker adds another level of complexity."}),"\n",(0,r.jsxs)(n.p,{children:["To debug docker connectivity issues, we may use netcat as above to\ncheck port connections are working as expected. Double check that\nyou are exposing the right ports to your local network, either by\nusing the command line flags or in your docker-compose.yaml. You\nshould be able to successfully check the connection locally using\neg. ",(0,r.jsx)(n.code,{children:"nc -zv localhost 1634"})," then follow instructions above to make\nsure your local network has the correct ports exposed to the\nInternet."]}),"\n",(0,r.jsxs)(n.ol,{start:"3",children:["\n",(0,r.jsx)(n.li,{children:"Something else entirely?"}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["Networking is a complex topic, but it keeps us all together. If you\nstill can't connect to your Bee, get in touch via the ",(0,r.jsx)(n.a,{href:"https://discord.gg/kHRyMNpw7t",children:"official node operator's Discord channel"})," and we'll do our best to get\nyou connected. In Swarm, no Bee is left behind."]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},28453(e,n,t){t.d(n,{R:()=>i,x:()=>a});var o=t(96540);const r={},s=o.createContext(r);function i(e){const n=o.useContext(s);return o.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b57ec343.2853d628.js b/assets/js/b57ec343.2853d628.js new file mode 100644 index 000000000..5b82c09e8 --- /dev/null +++ b/assets/js/b57ec343.2853d628.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[9429],{95844(e,t,o){o.r(t),o.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>c,frontMatter:()=>a,metadata:()=>i,toc:()=>d});const i=JSON.parse('{"id":"desktop/start-a-blog","title":"Start a Blog","description":"Create and publish a blog on Swarm using the Swarm Desktop app.","source":"@site/docs/desktop/start-a-blog.md","sourceDirName":"desktop","slug":"/desktop/start-a-blog","permalink":"/docs/desktop/start-a-blog","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/desktop/start-a-blog.md","tags":[],"version":"current","frontMatter":{"title":"Start a Blog","id":"start-a-blog","description":"Create and publish a blog on Swarm using the Swarm Desktop app."},"sidebar":"desktop","previous":{"title":"Publish a Website","permalink":"/docs/desktop/publish-a-website"}}');var s=o(74848),n=o(28453);const a={title:"Start a Blog",id:"start-a-blog",description:"Create and publish a blog on Swarm using the Swarm Desktop app."},r=void 0,l={},d=[{value:"A Guide to Starting Your Blog on Swarm",id:"a-guide-to-starting-your-blog-on-swarm",level:2},{value:"Requirements",id:"requirements",level:2},{value:"Getting Started",id:"getting-started",level:2},{value:"Open Etherjot",id:"open-etherjot",level:3},{value:"Initialize Your Blog",id:"initialize-your-blog",level:2},{value:"Don't Lose Your Work!",id:"dont-lose-your-work",level:2},{value:"Back-up Your Blog",id:"back-up-your-blog",level:3},{value:"Avoid Losing Changes (DANGER)",id:"avoid-losing-changes-danger",level:3},{value:"Writing Your Blog",id:"writing-your-blog",level:2},{value:"Add Some Text",id:"add-some-text",level:3},{value:"Add Media Files",id:"add-media-files",level:3},{value:"Set Background Image",id:"set-background-image",level:3},{value:"Set Blog "Type"",id:"set-blog-type",level:3},{value:"Set Blog "Category" (REQUIRED)",id:"set-blog-category-required",level:3},{value:"Publishing Your Blog",id:"publishing-your-blog",level:3},{value:"Add a New Post",id:"add-a-new-post",level:3},{value:"Settings and Optional Features",id:"settings-and-optional-features",level:2},{value:"Setting Custom Text and Links",id:"setting-custom-text-and-links",level:3},{value:"Changing Default Text",id:"changing-default-text",level:3},{value:"Reset Your Blog (DANGER)",id:"reset-your-blog-danger",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",ul:"ul",...(0,n.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"a-guide-to-starting-your-blog-on-swarm",children:"A Guide to Starting Your Blog on Swarm"}),"\n",(0,s.jsx)(t.p,{children:'There are many different approaches to starting a blog on Swarm, however the easiest is to use the Etherjot Web blogging tool. Etherjot Web is a straightforward tool for publishing and editing your blog on Swarm. It handles all uploading of files, page customization, basic UI template, and even comes with a "comments" feature so any other Swarm user can leave a comment on your blog.'}),"\n",(0,s.jsx)(t.h2,{id:"requirements",children:"Requirements"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"/docs/desktop/install",children:"Swarm Desktop"})," with a ",(0,s.jsx)(t.a,{href:"/docs/desktop/postage-stamps",children:"valid postage stamp batch"})]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"getting-started",children:"Getting Started"}),"\n",(0,s.jsxs)(t.p,{children:["To get started you must first have installed Swarm Desktop and have it running on your computer with a ",(0,s.jsx)(t.a,{href:"/docs/desktop/postage-stamps",children:"valid stamp batch"}),". Note that your blog will only stay online as long as the postage batch is still valid, therefore you must make sure to stay aware of the postage batch TTL (time to live), and ",(0,s.jsx)(t.a,{href:"/docs/desktop/postage-stamps#top-up-a-batch",children:"top up your batch"})," regularly in order to keep your content online."]}),"\n",(0,s.jsx)(t.h3,{id:"open-etherjot",children:"Open Etherjot"}),"\n",(0,s.jsx)(t.p,{children:'To open Etherjot, right click the Swarm Desktop icon in your dashboard and navigate to "Apps", and then click on "Etherjot".'}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:o(29325).A+"",width:"631",height:"541"})}),"\n",(0,s.jsx)(t.h2,{id:"initialize-your-blog",children:"Initialize Your Blog"}),"\n",(0,s.jsx)(t.p,{children:"When first starting Etherjot Web, you will be greeted with this page:"}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:o(53419).A+"",width:"1743",height:"1194"})}),"\n",(0,s.jsxs)(t.p,{children:["On this page, as long as you have fulfilled the requirements outlined above, you will see two green checkmarks confirming you have Swarm Desktop running with a valid postage stamp batch. You will also see a warning reminding you of the importance of ",(0,s.jsx)(t.a,{href:"/docs/desktop/postage-stamps#top-up-a-batch",children:"topping up your stamp batch"})," to prevent the batch TTL from running out."]}),"\n",(0,s.jsx)(t.admonition,{type:"danger",children:(0,s.jsx)(t.p,{children:"In addition to monitoring your postage stamp batch TTL, it is also important that you back up your blog, or else you may lose access to your blog in Etherjot (although it will still remain live on Swarm as long as its stamp batch has not expired)."})}),"\n",(0,s.jsx)(t.p,{children:'Fill in your blog name, check the box with the TTL warning, and click the "Create" button to initialize your blog. This will issue a Swarm transaction to set up a feed for your blog. The transaction will take a few moments, after which you will be greeted with the Etherjot Web blog editor.'}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:o(20428).A+"",width:"2559",height:"1237"})}),"\n",(0,s.jsx)(t.p,{children:'The "Swarm Hash" displayed at the top of the editor is the address for the homepage of your blog. Click "Open" to navigate to your blog. We can see now that the blog has been initialized, but no content has been uploaded.'}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:o(74587).A+"",width:"2229",height:"1236"})}),"\n",(0,s.jsx)(t.h2,{id:"dont-lose-your-work",children:"Don't Lose Your Work!"}),"\n",(0,s.jsx)(t.p,{children:"Due to the decentralised nature of Swarm and applications built on Swarm, there are several precautions you should take which you may be unfamiliar with when coming from a Web 2.0 application."}),"\n",(0,s.jsx)(t.h3,{id:"back-up-your-blog",children:"Back-up Your Blog"}),"\n",(0,s.jsx)(t.p,{children:'No username and password are required for editing your blog and uploading new posts. However, you do need to make sure to back up your blog in order to prevent losing access to it. You should do this after initializing your blog, and you should also back up your blog again after publishing any changes. To back up your blog, start by clicking "Settings."'}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:o(20891).A+"",width:"2557",height:"1224"})}),"\n",(0,s.jsx)(t.p,{children:'From the Settings page, click "Export."'}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:o(23328).A+"",width:"2559",height:"1203"})}),"\n",(0,s.jsxs)(t.p,{children:["Copy the displayed text to a ",(0,s.jsx)(t.code,{children:".json"})," file, make certain to copy the entire displayed text. This is your backup file and is used to import your blog. Note that the backup contains the private key of your blog, so should not be revealed to anyone else."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:o(47529).A+"",width:"2559",height:"1213"})}),"\n",(0,s.jsx)(t.h3,{id:"avoid-losing-changes-danger",children:"Avoid Losing Changes (DANGER)"}),"\n",(0,s.jsx)(t.p,{children:'Etherjot currently does not allow you to save drafts locally, so if you navigate away from the blog post you are currently editing, you will lose any changes you have made which have not yet been uploaded to Swarm. Take note of the three UI elements highlighted in the screenshot - using the "+" or "Settings" buttons will cause you to lose any changes not uploaded to Swarm, and hitting the "Reset" button will cause you to lose everything which has not been backed up.'}),"\n",(0,s.jsx)(t.admonition,{type:"danger",children:(0,s.jsxs)(t.p,{children:['Hitting the "Reset" button will cause you to lose any content which has not yet been published and ',(0,s.jsx)(t.a,{href:"/docs/desktop/start-a-blog#back-up-your-blog",children:"backed up"}),"."]})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:o(60370).A+"",width:"2544",height:"1222"})}),"\n",(0,s.jsx)(t.p,{children:'If you click the "+" button or the "Settings" button, you will see a warning to notify you that any unsaved changes will be lost.'}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:o(99346).A+"",width:"2553",height:"1239"})}),"\n",(0,s.jsx)(t.p,{children:"You will NOT see a warning for refreshing your browser page, however, so be careful not to refresh your browser before publishing any changes to Swarm."}),"\n",(0,s.jsx)(t.h2,{id:"writing-your-blog",children:"Writing Your Blog"}),"\n",(0,s.jsx)(t.h3,{id:"add-some-text",children:"Add Some Text"}),"\n",(0,s.jsxs)(t.p,{children:["The text editor for your blog has two main panels. The one on the left is where you can write your content using ",(0,s.jsx)(t.a,{href:"https://www.markdownguide.org/",children:"Markdown"}),". On the right side is where you can see a preview of your rendered markdown as it will appear to a visitor to your blog."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:o(29497).A+"",width:"2559",height:"1237"})}),"\n",(0,s.jsx)(t.p,{children:"Let's fill in some content and examine the preview."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:o(27078).A+"",width:"2559",height:"1240"})}),"\n",(0,s.jsx)(t.p,{children:'Here you can see the new content we just wrote, note that there is no auto-save functionality, so any changes we make will not be saved until we click "Publish" to upload the changes to Swarm. However you will see that the "Publish" button is greyed currently, as we have not yet filled in all the required fields for publishing.'}),"\n",(0,s.jsx)(t.h3,{id:"add-media-files",children:"Add Media Files"}),"\n",(0,s.jsx)(t.p,{children:'Next let\'s try to add an image. To get started, we need to click the "Asset Browser" button.'}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:o(23248).A+"",width:"2559",height:"1240"})}),"\n",(0,s.jsx)(t.p,{children:"This will open up the Asset Browser where you can manage your blog assets such as images."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:o(8623).A+"",width:"2559",height:"1224"})}),"\n",(0,s.jsx)(t.p,{children:'To upload your file, click the "browse" button and choose the file you wish to upload.'}),"\n",(0,s.jsxs)(t.admonition,{type:"info",children:[(0,s.jsxs)(t.p,{children:["In addition to images, video and audio files may also be uploaded, however currently the URL to the Swarm hash must be manually inserted into html ",(0,s.jsx)(t.code,{children:"
    \n )\n}\n"})}),"\n",(0,a.jsxs)(n.h3,{id:"5-add-a-static-404html-for-non-hash-urls",children:["5. Add a Static ",(0,a.jsx)(n.code,{children:"404.html"})," for Non-Hash URLs"]}),"\n",(0,a.jsx)(n.p,{children:"Swarm still needs a fallback for URLs like:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"/non-existent-file\n"})}),"\n",(0,a.jsxs)(n.p,{children:["Create a ",(0,a.jsx)(n.code,{children:"./public"})," directory and save a ",(0,a.jsx)(n.code,{children:"404.html"})," file inside:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-html",children:'\n\n\n \n 404 \u2013 Not Found\n \n\n\n\n\n\n

    404

    \n

    This page doesn\'t exist.

    \n

    Return to Home

    \n\n\n'})}),"\n",(0,a.jsxs)(n.p,{children:["Vite will automatically include this in ",(0,a.jsx)(n.code,{children:"dist/"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["This file handles ",(0,a.jsx)(n.strong,{children:"non-hash"})," missing paths.\nReact handles ",(0,a.jsx)(n.strong,{children:"hash"})," missing paths."]}),"\n",(0,a.jsx)(n.h3,{id:"6-build-the-project",children:"6. Build the Project"}),"\n",(0,a.jsx)(n.p,{children:"Before uploading, compile the Vite app into a static bundle:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"npm run build\n"})}),"\n",(0,a.jsxs)(n.p,{children:["This produces a ",(0,a.jsx)(n.code,{children:"dist/"})," folder containing:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"dist/\n index.html\n 404.html\n assets/\n"})}),"\n",(0,a.jsxs)(n.p,{children:["Everything inside ",(0,a.jsx)(n.code,{children:"dist/"})," will be uploaded to your Swarm feed."]}),"\n",(0,a.jsx)(n.h3,{id:"7-deploy-site",children:"7. Deploy Site"}),"\n",(0,a.jsxs)(n.p,{children:["The project includes an ",(0,a.jsx)(n.code,{children:"upload.js"})," script that uploads ",(0,a.jsx)(n.code,{children:"./dist"})," to Swarm and publishes the result to a feed (so your URL stays stable across re-uploads). Set up your ",(0,a.jsx)(n.code,{children:".env"})," and run it:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"cp .env.example .env\n# Fill in BATCH_ID and PUBLISHER_KEY in .env\nnpm run upload\n"})}),"\n",(0,a.jsxs)(n.p,{children:["You should see the website Swarm hash and a feed manifest hash. Open the feed manifest URL \u2014 ",(0,a.jsx)(n.code,{children:"http://localhost:1633/bzz//"})," \u2014 in your browser."]}),"\n",(0,a.jsxs)(n.p,{children:["For details on feeds and stable URLs, see the ",(0,a.jsx)(n.a,{href:"/docs/develop/host-your-website#advanced-keep-your-url-stable-across-updates",children:"Host a Webpage"})," guide."]}),"\n",(0,a.jsxs)(n.p,{children:["The Home and About pages will be properly resolved by the routes we specified (",(0,a.jsx)(n.code,{children:"./#/"}),") and (",(0,a.jsx)(n.code,{children:"./#/about"}),"), and non-existent URLs will be handled by the ",(0,a.jsx)(n.code,{children:"NotFound"})," component for hash URLs and our ",(0,a.jsx)(n.code,{children:"404.html"})," error document for all others."]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{src:t(82046).A+"",width:"1510",height:"630"})}),"\n",(0,a.jsx)(n.h2,{id:"manifest-based-routing",children:"Manifest Based Routing"}),"\n",(0,a.jsx)(n.p,{children:"The second routing method involves directly manipulating the manifest so that routes resolve properly to the intended content."}),"\n",(0,a.jsx)(n.h3,{id:"1-upload-the-site-with-default-manifest",children:"1. Upload the Site with Default Manifest"}),"\n",(0,a.jsx)(n.p,{children:"Download example project:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"git clone https://github.com/ethersphere/examples.git\ncd examples/routing-manifest\n"})}),"\n",(0,a.jsx)(n.p,{children:"Install dependencies:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"npm install\n"})}),"\n",(0,a.jsxs)(n.p,{children:["Configure environment variables. There is a ",(0,a.jsx)(n.code,{children:".env"})," file with important constants listed in it. You will need to at least update it with a valid batch ID, and potentially other changes if you are not using a default setup:"]}),"\n",(0,a.jsxs)(n.p,{children:["Replace the value for ",(0,a.jsx)(n.code,{children:"BATCH_ID"})," with your own valid batch IDs. Otherwise you may also need to update ",(0,a.jsx)(n.code,{children:"BEE_URL"})," if its value doesn't match your Bee RPC endpoint."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-.env",children:"BEE_URL=http://localhost:1633\nBATCH_ID=afd0810c2ea2936df849fe7b52650e231a19b7b31dbf7f96a93f0cf8a296f3f3\nPUBLISHER_KEY=0x1111111111111111111111111111111111111111111111111111111111111111\nUPLOAD_DIR=./site\nBASE_MANIFEST=\n"})}),"\n",(0,a.jsxs)(n.p,{children:["Start by uploading the site using the ",(0,a.jsx)(n.code,{children:"upload.js"})," script provided in the example project:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"node .\\upload.js\n"})}),"\n",(0,a.jsx)(n.p,{children:"Terminal output:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"\nManifest reference: e4d93dc161d9b1fb192fdcef7e18830bd50fa5b80561de18d5f2945fb8618515\n\nURL: http://localhost:1633/bzz/e4d93dc161d9b1fb192fdcef7e18830bd50fa5b80561de18d5f2945fb8618515/\n"})}),"\n",(0,a.jsxs)(n.p,{children:["Copy the manifest reference hash and set it inside your ",(0,a.jsx)(n.code,{children:".env"})," file as the BASE_MANIFEST value:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BASE_MANIFEST=e4d93dc161d9b1fb192fdcef7e18830bd50fa5b80561de18d5f2945fb8618515\n"})}),"\n",(0,a.jsxs)(n.p,{children:["If you peek inside the ",(0,a.jsx)(n.code,{children:"upload.js"})," code you will see these lines:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-js",children:'const { reference } = await bee.uploadFilesFromDirectory(\n batchId,\n uploadDir,\n {\n indexDocument: "index.html",\n errorDocument: "404.html",\n }\n)\n'})}),"\n",(0,a.jsxs)(n.p,{children:["Take note of the values set by the ",(0,a.jsx)(n.code,{children:"indexDocument"})," and ",(0,a.jsx)(n.code,{children:"errorDocument"})," options. With those options specified, manifest entries for the root path ",(0,a.jsx)(n.code,{children:"./"})," and non existent paths will be created on upload to resolve to ",(0,a.jsx)(n.code,{children:"index.html"})," and ",(0,a.jsx)(n.code,{children:"404.html"})," respectively. Without specifying them, your site would not load either page unless you explicitly include the entire filename with extension in the URL."]}),"\n",(0,a.jsxs)(n.p,{children:["Navigate in your browser to the manifest URL output to the terminal after running the ",(0,a.jsx)(n.code,{children:"upload.js"})," script:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"http://localhost:1633/bzz/e4d93dc161d9b1fb192fdcef7e18830bd50fa5b80561de18d5f2945fb8618515/\n"})}),"\n",(0,a.jsx)(n.p,{children:"Scroll down the example web page, read the instructions in the example website and click each of the example links to inspect how routing works by default without any manifest edits (besides those specified for the index and error documents):"}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{src:t(17695).A+"",width:"1307",height:"951"})}),"\n",(0,a.jsxs)(n.p,{children:["You will find that links to direct files with file extensions included like ",(0,a.jsx)(n.code,{children:"/about.html"})," will work, but links to ",(0,a.jsx)(n.code,{children:"/about"})," will not. This is because we have not yet modified our manifest to set up typical routing behavior."]}),"\n",(0,a.jsx)(n.h3,{id:"2-fix-routing-with-manifest-manipulation",children:"2. Fix Routing With Manifest Manipulation"}),"\n",(0,a.jsx)(n.p,{children:"Without manifest edits, routes only work via exact file paths like:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"/index.html\n/about.html\n/contact.html\n"})}),"\n",(0,a.jsxs)(n.p,{children:["Trying to access ",(0,a.jsx)(n.code,{children:"/about"})," or ",(0,a.jsx)(n.code,{children:"/about/"})," will fail."]}),"\n",(0,a.jsx)(n.h4,{id:"add-routing-behavior-by-manifest-manipulation",children:"Add Routing Behavior by Manifest Manipulation"}),"\n",(0,a.jsx)(n.p,{children:"We can easily add standard routing behavior by adding entries to our manifest which link the content reference with our desired URL paths:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-ts",children:"node.addFork('about', referenceForAbout, metadata)\nnode.addFork('about/', referenceForAbout, metadata)\n"})}),"\n",(0,a.jsxs)(n.p,{children:["After this, both ",(0,a.jsx)(n.code,{children:"/about"})," and ",(0,a.jsx)(n.code,{children:"/about/"})," will resolve to the same content as ",(0,a.jsx)(n.code,{children:"/about.html"}),"."]}),"\n",(0,a.jsx)(n.p,{children:"Run the provided script to update the manifest:"}),"\n",(0,a.jsxs)(n.admonition,{type:"warning",children:[(0,a.jsxs)(n.p,{children:["Make sure you have already set the ",(0,a.jsx)(n.code,{children:"BASE_MANIFEST"})," to the hash returned from the upload script we ran above or else this won't work:"]}),(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BASE_MANIFEST=e4d93dc161d9b1fb192fdcef7e18830bd50fa5b80561de18d5f2945fb8618515\n"})})]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"node .\\updateManifest.js\n"})}),"\n",(0,a.jsx)(n.p,{children:"Terminal output:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"Updated manifest reference: 1483be29a42ec1e40b4d639f800a8fd982db9d5146088672a5edef9a1e0648aa\n\nURL: http://localhost:1633/bzz/1483be29a42ec1e40b4d639f800a8fd982db9d5146088672a5edef9a1e0648aa/007bff\n"})}),"\n",(0,a.jsxs)(n.p,{children:["Try navigating to the ",(0,a.jsx)(n.code,{children:"/about"})," and ",(0,a.jsx)(n.code,{children:"/about/"})," routes which previously led to a 404 page, they should now resolve properly. ",(0,a.jsx)(n.code,{children:"/about.html"})," will still resolve properly as it did previously."]}),"\n",(0,a.jsx)(n.h3,{id:"3-remove-routes-and-add-new-ones",children:"3. Remove Routes and Add New Ones"}),"\n",(0,a.jsxs)(n.p,{children:["Manifests control ",(0,a.jsx)(n.strong,{children:"which paths exist"})," on your site by mapping paths to immutable Swarm content references. To remove a page from your site, remove its route(s) from the manifest:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-js",children:'node.removeFork("old-page.html")\n'})}),"\n",(0,a.jsx)(n.p,{children:"If you previously added clean-URL aliases such as:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-js",children:'node.addFork("about", referenceForAbout, metadata)\nnode.addFork("about/", referenceForAbout, metadata)\n'})}),"\n",(0,a.jsxs)(n.p,{children:["\u2026then you must remove ",(0,a.jsx)(n.strong,{children:"all"})," routes that expose that content:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-js",children:'node.removeFork("about")\nnode.removeFork("about/")\nnode.removeFork("about.html")\n'})}),"\n",(0,a.jsxs)(n.p,{children:["You can also reuse the ",(0,a.jsx)(n.strong,{children:"same content reference"})," under a different path by adding a new manifest entry that points to that same reference:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-js",children:'node.addFork("new-path", existingFileReference, metadata)\n'})}),"\n",(0,a.jsx)(n.p,{children:"This is useful when you want the same page to be available at a new URL without re-uploading or changing the underlying content. If you remove the old route, the old URL will return a 404, while the new URL will serve the same content."}),"\n",(0,a.jsx)(n.p,{children:"Run the provided script to test the behavior:"}),"\n",(0,a.jsx)(n.admonition,{type:"warning",children:(0,a.jsxs)(n.p,{children:["Make sure that once again you have updated the ",(0,a.jsx)(n.code,{children:".env"})," file with the hash returned from the second step before running this script."]})}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"node .\\updateManifest.js\n"})}),"\n",(0,a.jsx)(n.p,{children:"Terminal output:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"\nUpdated manifest reference: 53e90f4033b99c7f6b82026b8f7beb39f42f99fbb816ae76e850cf2a1b45491d\n\nURL: http://localhost:1633/bzz/53e90f4033b99c7f6b82026b8f7beb39f42f99fbb816ae76e850cf2a1b45491d/\n\nRoutes now:\n /moved-about\n /moved-about/\nRemoved:\n /about\n /about/\n /about.html\n"})}),"\n",(0,a.jsxs)(n.p,{children:["Now all our old links to the ",(0,a.jsx)(n.code,{children:"about"})," page will 404. However, you can still reach the same content by navigating to the newly added routs:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"/moved-about\n/moved-about/\n"})}),"\n",(0,a.jsx)(n.p,{children:"Manually add them to the end of your website URL to check that they load properly."}),"\n",(0,a.jsx)(n.h3,{id:"4-manifest-routing-enables-dynamic-content",children:"4. Manifest Routing Enables Dynamic Content"}),"\n",(0,a.jsx)(n.p,{children:"Once you understand manifest-based routing, you can dynamically:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"Add new paths (e.g. blog posts, product pages)"}),"\n",(0,a.jsx)(n.li,{children:"Create custom routes"}),"\n",(0,a.jsx)(n.li,{children:"Remove unwanted paths"}),"\n"]}),"\n",(0,a.jsx)(n.hr,{}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Next:"})," ",(0,a.jsx)(n.a,{href:"/docs/develop/gateway-proxy",children:"Run a Gateway"})," \u2014 expose your Swarm-hosted site to the public web through an HTTP gateway."]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(c,{...e})}):c(e)}},82046(e,n,t){t.d(n,{A:()=>s});const s=t.p+"assets/images/hash-routing-9ded011466d98e803d9f75f3b1c0116c.jpg"},17695(e,n,t){t.d(n,{A:()=>s});const s=t.p+"assets/images/routing-manifest-7e3a4408af18995c31d40d91bf154672.png"},28453(e,n,t){t.d(n,{R:()=>o,x:()=>d});var s=t(96540);const a={},i=s.createContext(a);function o(e){const n=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/be94df29.5a4f54f7.js b/assets/js/be94df29.5a4f54f7.js new file mode 100644 index 000000000..a915c95aa --- /dev/null +++ b/assets/js/be94df29.5a4f54f7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[9622],{65621(e,t,n){n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>r,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"develop/dynamic-content","title":"Dynamic Content","description":"Learn how to use feeds to create updateable content on Swarm \u2014 with a complete example project that builds a simple blog.","source":"@site/docs/develop/dynamic-content.md","sourceDirName":"develop","slug":"/develop/dynamic-content","permalink":"/docs/develop/dynamic-content","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/develop/dynamic-content.md","tags":[],"version":"current","frontMatter":{"title":"Dynamic Content","id":"dynamic-content","sidebar_label":"Dynamic Content","description":"Learn how to use feeds to create updateable content on Swarm \u2014 with a complete example project that builds a simple blog."},"sidebar":"develop","previous":{"title":"Run a Gateway","permalink":"/docs/develop/gateway-proxy"},"next":{"title":"Multi-Author Blog","permalink":"/docs/develop/multi-author-blog"}}');var o=n(74848),i=n(28453);const r={title:"Dynamic Content",id:"dynamic-content",sidebar_label:"Dynamic Content",description:"Learn how to use feeds to create updateable content on Swarm \u2014 with a complete example project that builds a simple blog."},a=void 0,l={},d=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Example Scripts and Projects",id:"example-scripts-and-projects",level:2},{value:"The Immutability Problem",id:"the-immutability-problem",level:2},{value:"Feeds \u2014 Mutable Pointers on Immutable Storage",id:"feeds--mutable-pointers-on-immutable-storage",level:2},{value:"Create a Publisher Key",id:"create-a-publisher-key",level:3},{value:"Write and Read a Feed",id:"write-and-read-a-feed",level:3},{value:"Update the Feed",id:"update-the-feed",level:3},{value:"Feed Manifests \u2014 Stable URLs",id:"feed-manifests--stable-urls",level:2},{value:"How It All Fits Together",id:"how-it-all-fits-together",level:2},{value:"Example Project \u2014 Simple Blog",id:"example-project--simple-blog",level:2},{value:"Project Setup",id:"project-setup",level:3},{value:"Project Structure",id:"project-structure",level:3},{value:"The HTML Generation Module",id:"the-html-generation-module",level:3},{value:"Initialize the Blog",id:"initialize-the-blog",level:3},{value:"Create, Edit, and Delete Posts",id:"create-edit-and-delete-posts",level:3},{value:"Read the Feed",id:"read-the-feed",level:3},{value:"Summary",id:"summary",level:2}];function c(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.p,{children:"Every upload to Swarm produces a unique content hash \u2014 change one byte and you get a different address. This is great for data integrity, but it means there is no built-in way to give someone a single, stable link that always shows the latest version of your content. Feeds solve this problem. A feed acts as a mutable pointer on top of Swarm's immutable storage, giving you a permanent address that always resolves to whatever content you last pointed it at."}),"\n",(0,o.jsxs)(t.p,{children:["If you followed the ",(0,o.jsx)(t.a,{href:"/docs/develop/host-your-website",children:"Host a Webpage"})," guide, you already used feeds to enable seamless website updates without changing your ENS content hash. This guide explains how feeds actually work under the hood and walks through building a simple dynamic application from scratch."]}),"\n",(0,o.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:["A running Bee node (",(0,o.jsx)(t.a,{href:"/docs/bee/installation/quick-start",children:"install guide"}),")"]}),"\n",(0,o.jsxs)(t.li,{children:["A valid postage stamp batch (",(0,o.jsx)(t.a,{href:"/docs/develop/tools-and-features/buy-a-stamp-batch",children:"how to get one"}),")"]}),"\n",(0,o.jsxs)(t.li,{children:["Node.js 18+ and ",(0,o.jsx)(t.code,{children:"@ethersphere/bee-js"})," installed"]}),"\n"]}),"\n",(0,o.jsx)(t.h2,{id:"example-scripts-and-projects",children:"Example Scripts and Projects"}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"bee-js"})," code snippets throughout this guide are available as runnable scripts in the ",(0,o.jsx)(t.a,{href:"https://github.com/ethersphere/examples",children:"examples"})," repo. The guide also includes a complete blog project that puts all the concepts together."]}),"\n",(0,o.jsxs)(t.p,{children:["The full working scripts are available in the ",(0,o.jsx)(t.a,{href:"https://github.com/ethersphere/examples",children:"examples"})," repo:"]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://github.com/ethersphere/examples/blob/main/dynamic-content/script-01.js",children:(0,o.jsx)(t.code,{children:"script-01.js"})})," \u2014 The Immutability Problem"]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://github.com/ethersphere/examples/blob/main/dynamic-content/script-02.js",children:(0,o.jsx)(t.code,{children:"script-02.js"})})," \u2014 Write, Read, and Update a Feed"]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://github.com/ethersphere/examples/blob/main/dynamic-content/script-03.js",children:(0,o.jsx)(t.code,{children:"script-03.js"})})," \u2014 Feed Manifests \u2014 Stable URLs"]}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["The complete blog project is in the ",(0,o.jsx)(t.a,{href:"https://github.com/ethersphere/examples/tree/main/simple-blog",children:(0,o.jsx)(t.code,{children:"simple-blog"})})," directory."]}),"\n",(0,o.jsx)(t.p,{children:"Clone the repo and set up the example scripts:"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-bash",children:"git clone https://github.com/ethersphere/examples.git\ncd examples/dynamic-content\nnpm install\ncp .env.example .env\n"})}),"\n",(0,o.jsxs)(t.p,{children:["Fill in your ",(0,o.jsx)(t.code,{children:"BATCH_ID"})," and verify ",(0,o.jsx)(t.code,{children:"BEE_URL"})," in ",(0,o.jsx)(t.code,{children:".env"}),":"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-bash",children:"BEE_URL=http://localhost:1633\nBATCH_ID=\n"})}),"\n",(0,o.jsx)(t.p,{children:"You can then run any script with:"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-bash",children:"node script-01.js\nnode script-02.js\nnode script-03.js\n"})}),"\n",(0,o.jsxs)(t.p,{children:["The blog project has its own setup \u2014 see ",(0,o.jsx)(t.a,{href:"#example-project--simple-blog",children:"Example Project \u2014 Simple Blog"})," below."]}),"\n",(0,o.jsx)(t.h2,{id:"the-immutability-problem",children:"The Immutability Problem"}),"\n",(0,o.jsxs)(t.p,{children:["To see why feeds are necessary, try uploading the same content twice with a small change (",(0,o.jsx)(t.a,{href:"https://github.com/ethersphere/examples/blob/main/dynamic-content/script-01.js",children:(0,o.jsx)(t.code,{children:"script-01.js"})}),"):"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-js",children:'import { Bee } from "@ethersphere/bee-js";\n\nconst bee = new Bee("http://localhost:1633");\nconst batchId = "BATCH_ID";\n\nconst upload1 = await bee.uploadFile(batchId, "Hello Swarm - version 1", "note.txt");\nconsole.log("Version 1:", upload1.reference.toHex());\n\nconst upload2 = await bee.uploadFile(batchId, "Hello Swarm - version 2", "note.txt");\nconsole.log("Version 2:", upload2.reference.toHex());\n'})}),"\n",(0,o.jsx)(t.p,{children:'Each upload returns a different hash. If you shared the first hash with someone, they would always see "version 1" \u2014 there is no way to redirect them to "version 2" using content addressing alone. Feeds provide the missing layer of indirection.'}),"\n",(0,o.jsx)(t.h2,{id:"feeds--mutable-pointers-on-immutable-storage",children:"Feeds \u2014 Mutable Pointers on Immutable Storage"}),"\n",(0,o.jsxs)(t.p,{children:["A feed is identified by two things: an ",(0,o.jsx)(t.strong,{children:"owner"})," (an Ethereum address derived from a private key) and a ",(0,o.jsx)(t.strong,{children:"topic"})," (a human-readable string that you choose, like ",(0,o.jsx)(t.code,{children:'"my-website"'})," or ",(0,o.jsx)(t.code,{children:'"notes"'}),"). Together, these uniquely identify a feed on the network."]}),"\n",(0,o.jsxs)(t.p,{children:["The feed owner can write Swarm references to the feed sequentially \u2014 first at index 0, then index 1, and so on. Anyone who knows the owner and topic can read the feed and retrieve the latest reference. The feed itself does not store your content directly; it stores a ",(0,o.jsx)(t.em,{children:"pointer"})," (a Swarm reference) to content that you uploaded separately."]}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsxs)(t.p,{children:["Feeds are built on top of ",(0,o.jsx)(t.a,{href:"/docs/develop/tools-and-features/chunk-types#single-owner-chunks",children:"single-owner chunks"}),", a special chunk type in Swarm where the address is derived from an identity rather than the content. For a deeper look at how this works, see the ",(0,o.jsx)(t.a,{href:"https://bee-js.ethswarm.org/docs/soc-and-feeds/",children:"bee-js SOC and Feeds documentation"}),"."]})}),"\n",(0,o.jsx)(t.admonition,{title:"Always use immutable stamp batches with feeds",type:"warning",children:(0,o.jsxs)(t.p,{children:["When a ",(0,o.jsx)(t.a,{href:"/docs/concepts/incentives/postage-stamps#mutable-batches",children:"mutable batch"})," fills up, new chunks overwrite the oldest chunks in each bucket. If feed entry chunks get overwritten, the sequential indexing scheme that feeds depend on breaks \u2014 lookups will fail because earlier indices are no longer reachable. Always use an ",(0,o.jsx)(t.strong,{children:"immutable"})," batch when working with feeds."]})}),"\n",(0,o.jsx)(t.h3,{id:"create-a-publisher-key",children:"Create a Publisher Key"}),"\n",(0,o.jsx)(t.p,{children:"Before creating a feed, you need a dedicated private key that will sign feed updates. Anyone with this key can publish to your feed, so store it securely."}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-js",children:'import crypto from "crypto";\nimport { PrivateKey } from "@ethersphere/bee-js";\n\nconst hex = "0x" + crypto.randomBytes(32).toString("hex");\nconst pk = new PrivateKey(hex);\n\nconsole.log("Private key:", pk.toHex());\nconsole.log("Address:", pk.publicKey().address().toHex());\n'})}),"\n",(0,o.jsx)(t.p,{children:"Save the private key somewhere secure. You will use it for all future feed updates."}),"\n",(0,o.jsx)(t.h3,{id:"write-and-read-a-feed",children:"Write and Read a Feed"}),"\n",(0,o.jsxs)(t.p,{children:["Now upload some content and write its reference to a feed, then read it back (",(0,o.jsx)(t.a,{href:"https://github.com/ethersphere/examples/blob/main/dynamic-content/script-02.js",children:(0,o.jsx)(t.code,{children:"script-02.js"})}),"):"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-js",children:'import { Bee, Topic, PrivateKey } from "@ethersphere/bee-js";\n\nconst bee = new Bee("http://localhost:1633");\nconst batchId = "BATCH_ID";\nconst pk = new PrivateKey("YOUR_PRIVATE_KEY");\nconst owner = pk.publicKey().address();\n\n// Choose a topic for this feed\nconst topic = Topic.fromString("notes");\n\n// Upload content to Swarm\nconst upload = await bee.uploadFile(batchId, "My first note", "note.txt");\nconsole.log("Content hash:", upload.reference.toHex());\n\n// Write the content reference to the feed\nconst writer = bee.makeFeedWriter(topic, pk);\nawait writer.upload(batchId, upload.reference);\nconsole.log("Feed updated at index 0");\n\n// Brief pause to allow the node to index the feed chunk\nawait new Promise((r) => setTimeout(r, 1000));\n\n// Read the latest reference from the feed\nconst reader = bee.makeFeedReader(topic, owner);\nconst result = await reader.downloadReference();\nconsole.log("Latest reference:", result.reference.toHex());\nconsole.log("Current index:", result.feedIndex.toBigInt());\n'})}),"\n",(0,o.jsx)(t.h3,{id:"update-the-feed",children:"Update the Feed"}),"\n",(0,o.jsxs)(t.p,{children:["When you have new content, upload it and write the new reference to the feed. The writer automatically uses the next sequential index (this continues from the previous snippet \u2014 both are combined in ",(0,o.jsx)(t.a,{href:"https://github.com/ethersphere/examples/blob/main/dynamic-content/script-02.js",children:(0,o.jsx)(t.code,{children:"script-02.js"})}),"):"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-js",children:'// Upload updated content\nconst upload2 = await bee.uploadFile(batchId, "My updated note", "note.txt");\nconsole.log("New content hash:", upload2.reference.toHex());\n\n// Update the feed \u2014 writer auto-discovers the next index\nawait writer.upload(batchId, upload2.reference);\nconsole.log("Feed updated at index 1");\n\n// Brief pause to allow the node to index the new entry\nawait new Promise((r) => setTimeout(r, 1000));\n\nconst result2 = await reader.downloadReference();\nconsole.log("Latest reference:", result2.reference.toHex());\nconsole.log("Current index:", result2.feedIndex.toBigInt()); // 1n\n'})}),"\n",(0,o.jsx)(t.h2,{id:"feed-manifests--stable-urls",children:"Feed Manifests \u2014 Stable URLs"}),"\n",(0,o.jsxs)(t.p,{children:["So far, reading a feed requires knowing the owner address and topic. A ",(0,o.jsx)(t.strong,{children:"feed manifest"})," packages these two values into a single Swarm hash that acts as a permanent URL. When Bee resolves a feed manifest through the ",(0,o.jsx)(t.code,{children:"/bzz/"})," endpoint, it automatically looks up the latest feed entry and serves whatever content it points to (",(0,o.jsx)(t.a,{href:"https://github.com/ethersphere/examples/blob/main/dynamic-content/script-03.js",children:(0,o.jsx)(t.code,{children:"script-03.js"})}),")."]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-js",children:'// Create a feed manifest (one-time operation)\nconst manifest = await bee.createFeedManifest(batchId, topic, owner);\nconsole.log("Feed manifest:", manifest.toHex());\n'})}),"\n",(0,o.jsx)(t.p,{children:"You can now access the content through a stable URL:"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-text",children:"http://localhost:1633/bzz/FEED_MANIFEST_HASH/\n"})}),"\n",(0,o.jsxs)(t.p,{children:["Every time you update the feed, the same URL serves the new content \u2014 no URL change needed. This is also the hash you would register in ENS as your content hash (see ",(0,o.jsx)(t.a,{href:"/docs/develop/host-your-website#optional-connect-site-to-ens-domain",children:"Host a Webpage - Connect to ENS"}),")."]}),"\n",(0,o.jsx)(t.admonition,{type:"tip",children:(0,o.jsx)(t.p,{children:"A feed manifest only needs to be created once. After that, just update the feed and the manifest URL will always resolve to the latest content."})}),"\n",(0,o.jsx)(t.h2,{id:"how-it-all-fits-together",children:"How It All Fits Together"}),"\n",(0,o.jsx)(t.p,{children:"The resolution chain when someone accesses your feed manifest URL:"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-text",children:"GET /bzz/MANIFEST_HASH/\n \u2192 Bee downloads the manifest, extracts the topic and owner\n \u2192 Looks up the latest feed entry for that topic/owner pair\n \u2192 Reads the Swarm content reference from the latest entry\n \u2192 Retrieves and serves the content at that reference\n"})}),"\n",(0,o.jsx)(t.p,{children:"From the outside, a feed manifest URL behaves exactly like a regular Swarm URL \u2014 except the content behind it can change whenever the feed owner publishes an update."}),"\n",(0,o.jsx)(t.h2,{id:"example-project--simple-blog",children:"Example Project \u2014 Simple Blog"}),"\n",(0,o.jsxs)(t.p,{children:["This section puts everything together into a minimal but complete project: a ",(0,o.jsx)(t.strong,{children:"simple blog"})," that lives on Swarm. It generates a static HTML site with an index page listing all posts and individual post pages. The publisher can create, edit, and delete posts \u2014 and readers always find the latest version at a single stable URL."]}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsxs)(t.p,{children:["This project follows the same architectural pattern used by ",(0,o.jsx)(t.a,{href:"https://github.com/ethersphere/etherjot",children:"Etherjot"}),", a full-featured blogging platform on Swarm. Etherjot regenerates and re-uploads the entire blog site each time a post is added, then updates a single feed to point to the new version. Our blog does the same thing in a simplified form."]})}),"\n",(0,o.jsx)(t.h3,{id:"project-setup",children:"Project Setup"}),"\n",(0,o.jsxs)(t.p,{children:["Clone the ",(0,o.jsx)(t.a,{href:"https://github.com/ethersphere/examples",children:"examples"})," repo (if you haven't already) and navigate to the blog project:"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-bash",children:"git clone https://github.com/ethersphere/examples.git\ncd examples/simple-blog\nnpm install\n"})}),"\n",(0,o.jsxs)(t.p,{children:["Copy ",(0,o.jsx)(t.code,{children:".env.example"})," to ",(0,o.jsx)(t.code,{children:".env"})," and fill in your ",(0,o.jsx)(t.code,{children:"BATCH_ID"}),":"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-bash",children:"cp .env.example .env\n"})}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-bash",children:"BEE_URL=http://localhost:1633\nBATCH_ID=\n"})}),"\n",(0,o.jsx)(t.h3,{id:"project-structure",children:"Project Structure"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{children:"simple-blog/\n\u251c\u2500\u2500 .env # Bee URL and batch ID\n\u251c\u2500\u2500 html.js # Shared HTML generation utility\n\u251c\u2500\u2500 init.js # Initialize the blog (run once)\n\u251c\u2500\u2500 post.js # Create, edit, or delete a post and update the feed\n\u251c\u2500\u2500 read.js # Read the feed (demonstrates reader access)\n\u251c\u2500\u2500 config.json # Generated by init.js \u2014 stores keys and manifest hash\n\u2514\u2500\u2500 posts.json # Generated by init.js \u2014 stores all blog posts\n"})}),"\n",(0,o.jsx)(t.h3,{id:"the-html-generation-module",children:"The HTML Generation Module"}),"\n",(0,o.jsxs)(t.p,{children:["The blog regenerates its site from ",(0,o.jsx)(t.code,{children:"posts.json"})," every time a post is created, edited, or deleted. To keep that logic in one place, ",(0,o.jsx)(t.code,{children:"init.js"})," and ",(0,o.jsx)(t.code,{children:"post.js"})," both import a single helper from ",(0,o.jsx)(t.code,{children:"html.js"}),":"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-js",children:'// html.js\nimport { writeFileSync, mkdirSync, rmSync } from "fs";\n\nexport function writeSiteFiles(posts) {\n rmSync("site", { recursive: true, force: true });\n mkdirSync("site/posts", { recursive: true });\n\n writeFileSync("site/index.html", generateIndex(posts));\n for (const post of posts) {\n writeFileSync(`site/posts/${post.slug}.html`, generatePost(post));\n }\n}\n\nfunction generateIndex(posts) {\n const items = posts\n .sort((a, b) => new Date(b.date) - new Date(a.date))\n .map(\n (p) => `\n `\n )\n .join("\\n");\n\n return `\nMy Blog\n\n

    My Blog

    \n

    ${posts.length} post${posts.length !== 1 ? "s" : ""}

    \n ${items || "

    No posts yet.

    "}\n`;\n}\n\nfunction generatePost(post) {\n return `\n${esc(post.title)}\n\n

    ← Back

    \n

    ${esc(post.title)}

    \n ${post.date}\n
    ${esc(post.body)}
    \n`;\n}\n\nfunction esc(s) {\n return s\n .replace(/&/g, "&")\n .replace(//g, ">")\n .replace(/"/g, """);\n}\n'})}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.code,{children:"writeSiteFiles(posts)"})," wipes the local ",(0,o.jsx)(t.code,{children:"site/"})," directory and rebuilds it from the array of posts. The Swarm-side logic \u2014 uploading the regenerated directory and pointing the feed at the new reference \u2014 lives in ",(0,o.jsx)(t.code,{children:"init.js"})," and ",(0,o.jsx)(t.code,{children:"post.js"}),"."]}),"\n",(0,o.jsx)(t.h3,{id:"initialize-the-blog",children:"Initialize the Blog"}),"\n",(0,o.jsxs)(t.p,{children:["Create ",(0,o.jsx)(t.code,{children:"init.js"})," \u2014 this generates a publisher key, creates an empty blog, uploads it, sets up the feed, and saves the configuration:"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-js",children:'import { Bee, Topic, PrivateKey } from "@ethersphere/bee-js";\nimport crypto from "crypto";\nimport { writeFileSync } from "fs";\nimport { config } from "dotenv";\nimport { writeSiteFiles } from "./html.js";\n\nconfig();\n\nconst bee = new Bee(process.env.BEE_URL);\nconst batchId = process.env.BATCH_ID;\n\n// 1. Generate publisher key\nconst hex = "0x" + crypto.randomBytes(32).toString("hex");\nconst pk = new PrivateKey(hex);\nconst owner = pk.publicKey().address();\nconst topic = Topic.fromString("blog");\n\n// 2. Create initial empty blog\nconst posts = [];\nwriteFileSync("posts.json", JSON.stringify(posts, null, 2));\nwriteSiteFiles(posts);\n\nconst upload = await bee.uploadFilesFromDirectory(batchId, "./site", {\n indexDocument: "index.html",\n});\n\n// 3. Set up feed and manifest\nconst writer = bee.makeFeedWriter(topic, pk);\nawait writer.upload(batchId, upload.reference);\nconst manifest = await bee.createFeedManifest(batchId, topic, owner);\n\n// 4. Save config\nconst cfg = {\n privateKey: pk.toHex(),\n owner: owner.toHex(),\n topic: "blog",\n manifest: manifest.toHex(),\n};\nwriteFileSync("config.json", JSON.stringify(cfg, null, 2));\n\nconsole.log("Blog initialized!");\nconsole.log(`View your blog: ${process.env.BEE_URL}/bzz/${manifest.toHex()}/`);\n'})}),"\n",(0,o.jsx)(t.p,{children:"Run it once:"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-bash",children:"node init.js\n"})}),"\n",(0,o.jsx)(t.p,{children:"Example output:"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{children:"Blog initialized!\nFeed manifest: caa414d70028d14b0bdd9cbab18d1c1a0a3bab1b...\nView your blog: http://localhost:1633/bzz/caa414d70028d14b.../\n"})}),"\n",(0,o.jsx)(t.h3,{id:"create-edit-and-delete-posts",children:"Create, Edit, and Delete Posts"}),"\n",(0,o.jsxs)(t.p,{children:["Create ",(0,o.jsx)(t.code,{children:"post.js"})," \u2014 a single script that handles creating, editing, and deleting posts. Each operation modifies the local ",(0,o.jsx)(t.code,{children:"posts.json"}),", regenerates the entire site, uploads it, and updates the feed:"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-js",children:'import { Bee, Topic, PrivateKey } from "@ethersphere/bee-js";\nimport { readFileSync, writeFileSync } from "fs";\nimport { config } from "dotenv";\nimport { writeSiteFiles } from "./html.js";\n\nconfig();\n\nconst [action, ...args] = process.argv.slice(2);\n\nif (!action || !["create", "edit", "delete"].includes(action)) {\n console.log(`Usage:\n node post.js create "" "<body>"\n node post.js edit <slug> "<title>" "<body>"\n node post.js delete <slug>`);\n process.exit(1);\n}\n\nconst bee = new Bee(process.env.BEE_URL);\nconst batchId = process.env.BATCH_ID;\nconst cfg = JSON.parse(readFileSync("config.json", "utf-8"));\nconst posts = JSON.parse(readFileSync("posts.json", "utf-8"));\n\n// --- Apply the action ---\n\nif (action === "create") {\n const [slug, title, body] = args;\n if (!slug || !title || !body) {\n console.error(\'Usage: node post.js create <slug> "<title>" "<body>"\');\n process.exit(1);\n }\n if (posts.find((p) => p.slug === slug)) {\n console.error(`Post "${slug}" already exists. Use "edit" to update it.`);\n process.exit(1);\n }\n posts.push({ slug, title, body, date: new Date().toISOString() });\n console.log(`Created post: ${slug}`);\n}\n\nif (action === "edit") {\n const [slug, title, body] = args;\n if (!slug || !title || !body) {\n console.error(\'Usage: node post.js edit <slug> "<title>" "<body>"\');\n process.exit(1);\n }\n const idx = posts.findIndex((p) => p.slug === slug);\n if (idx === -1) {\n console.error(`Post "${slug}" not found.`);\n process.exit(1);\n }\n posts[idx] = { ...posts[idx], title, body, date: new Date().toISOString() };\n console.log(`Edited post: ${slug}`);\n}\n\nif (action === "delete") {\n const [slug] = args;\n if (!slug) {\n console.error("Usage: node post.js delete <slug>");\n process.exit(1);\n }\n const idx = posts.findIndex((p) => p.slug === slug);\n if (idx === -1) {\n console.error(`Post "${slug}" not found.`);\n process.exit(1);\n }\n posts.splice(idx, 1);\n console.log(`Deleted post: ${slug}`);\n}\n\n// --- Save, regenerate, upload, update feed ---\n\nwriteFileSync("posts.json", JSON.stringify(posts, null, 2));\nwriteSiteFiles(posts);\n\nconst pk = new PrivateKey(cfg.privateKey);\nconst topic = Topic.fromString(cfg.topic);\nconst writer = bee.makeFeedWriter(topic, pk);\n\nconst upload = await bee.uploadFilesFromDirectory(batchId, "./site", {\n indexDocument: "index.html",\n});\nawait writer.upload(batchId, upload.reference);\n\nconsole.log(`Blog updated! (${posts.length} post${posts.length !== 1 ? "s" : ""})`);\nconsole.log(`View: ${process.env.BEE_URL}/bzz/${cfg.manifest}/`);\n'})}),"\n",(0,o.jsx)(t.p,{children:"Usage:"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-bash",children:'# Create a post\nnode post.js create hello-world "Hello World" "This is my first blog post on Swarm."\n\n# Create another post\nnode post.js create feeds-intro "Understanding Feeds" "Feeds provide mutable pointers on immutable storage."\n\n# Edit a post\nnode post.js edit hello-world "Hello Swarm!" "Updated: this is my first post, now improved."\n\n# Delete a post\nnode post.js delete feeds-intro\n'})}),"\n",(0,o.jsx)(t.p,{children:"Each command regenerates the entire site and updates the feed. The same feed manifest URL always serves the latest version of the blog."}),"\n",(0,o.jsx)(t.admonition,{type:"tip",children:(0,o.jsx)(t.p,{children:'Notice that editing and deleting work the same way as creating \u2014 modify the local data, regenerate the site, re-upload, update the feed. Swarm itself doesn\'t have "edit" or "delete" operations. The old versions of the site remain accessible via their direct Swarm hashes, but the feed manifest always resolves to the latest version.'})}),"\n",(0,o.jsx)(t.h3,{id:"read-the-feed",children:"Read the Feed"}),"\n",(0,o.jsx)(t.p,{children:"This demonstrates how anyone can read the feed without the publisher's private key \u2014 only the owner address and topic (or the manifest hash) are needed:"}),"\n",(0,o.jsxs)(t.p,{children:["Create ",(0,o.jsx)(t.code,{children:"read.js"}),":"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-js",children:'import { Bee, Topic, EthAddress } from "@ethersphere/bee-js";\nimport { readFileSync } from "fs";\nimport { config } from "dotenv";\nconfig();\n\nconst bee = new Bee(process.env.BEE_URL);\nconst cfg = JSON.parse(readFileSync("config.json", "utf-8"));\n\nconst topic = Topic.fromString(cfg.topic);\nconst owner = new EthAddress(cfg.owner);\nconst reader = bee.makeFeedReader(topic, owner);\n\nconst result = await reader.downloadReference();\nconsole.log("Latest content reference:", result.reference.toHex());\nconsole.log("Feed index:", result.feedIndex.toBigInt());\nconsole.log("View:", `${process.env.BEE_URL}/bzz/${cfg.manifest}/`);\n'})}),"\n",(0,o.jsx)(t.p,{children:"Run it:"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-bash",children:"node read.js\n"})}),"\n",(0,o.jsx)(t.h2,{id:"summary",children:"Summary"}),"\n",(0,o.jsx)(t.p,{children:"Feeds add a mutable pointer layer on top of Swarm's immutable storage. The core pattern is: upload content \u2192 write its reference to a feed \u2192 use a feed manifest as a stable URL. The same manifest URL always serves the latest content."}),"\n",(0,o.jsxs)(t.p,{children:["This is the same pattern that ",(0,o.jsx)(t.a,{href:"https://github.com/ethersphere/etherjot",children:"Etherjot"})," uses to power fully decentralized blogs \u2014 regenerate the site, re-upload, and update the feed. The difference is only in scale and features (markdown rendering, categories, media management), not in the underlying feed mechanics."]}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"simple-blog"})," project you just built is a single-author blog. The next guide extends this into a multi-author system where each author controls their own feed and an admin maintains an index feed that links them all together."]}),"\n",(0,o.jsx)(t.p,{children:"Key takeaways:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"Every upload to Swarm is immutable and produces a unique hash."}),"\n",(0,o.jsxs)(t.li,{children:["A feed is a sequence of updates identified by an ",(0,o.jsx)(t.strong,{children:"owner"})," and a ",(0,o.jsx)(t.strong,{children:"topic"}),"."]}),"\n",(0,o.jsx)(t.li,{children:"Each feed update stores a Swarm reference pointing to your content."}),"\n",(0,o.jsxs)(t.li,{children:["A ",(0,o.jsx)(t.strong,{children:"feed manifest"})," wraps the feed identity into a single permanent hash that resolves through ",(0,o.jsx)(t.code,{children:"/bzz/"}),"."]}),"\n",(0,o.jsx)(t.li,{children:"Only the feed owner (holder of the private key) can publish updates, but anyone can read the feed."}),"\n",(0,o.jsx)(t.li,{children:'"Editing" and "deleting" content on Swarm means regenerating your site without the removed or changed content, re-uploading, and updating the feed. Old versions remain on Swarm at their original hashes, but the feed always points to the latest.'}),"\n"]}),"\n",(0,o.jsx)(t.hr,{}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.strong,{children:"Next:"})," ",(0,o.jsx)(t.a,{href:"/docs/develop/multi-author-blog",children:"Multi-Author Blog"})," \u2014 extend feeds into a multi-publisher system where each author controls their own feed and a shared index links them together."]})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},28453(e,t,n){n.d(t,{R:()=>r,x:()=>a});var s=n(96540);const o={},i=s.createContext(o);function r(e){const t=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c141421f.f2c0fb13.js b/assets/js/c141421f.f2c0fb13.js new file mode 100644 index 000000000..cd2617728 --- /dev/null +++ b/assets/js/c141421f.f2c0fb13.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[957],{40936(e){e.exports=JSON.parse('{"name":"docusaurus-theme-search-algolia","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/c15d9823.91a438f4.js b/assets/js/c15d9823.91a438f4.js new file mode 100644 index 000000000..7d8df35e1 --- /dev/null +++ b/assets/js/c15d9823.91a438f4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[8146],{29328(e){e.exports=JSON.parse('{"metadata":{"permalink":"/blog","page":1,"postsPerPage":10,"totalPages":1,"totalCount":0,"blogDescription":"Blog","blogTitle":"Blog"}}')}}]); \ No newline at end of file diff --git a/assets/js/c34c2406.1c783f34.js b/assets/js/c34c2406.1c783f34.js new file mode 100644 index 000000000..26f0e29b5 --- /dev/null +++ b/assets/js/c34c2406.1c783f34.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[626],{62625(e,n,o){o.r(n),o.d(n,{assets:()=>r,contentTitle:()=>c,default:()=>p,frontMatter:()=>s,metadata:()=>t,toc:()=>d});const t=JSON.parse('{"id":"develop/tools-and-features/pinning","title":"Pinning","description":"Explains pinning mechanism for ensuring data permanence and preventing garbage collection.","source":"@site/docs/develop/tools-and-features/pinning.md","sourceDirName":"develop/tools-and-features","slug":"/develop/tools-and-features/pinning","permalink":"/docs/develop/tools-and-features/pinning","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/develop/tools-and-features/pinning.md","tags":[],"version":"current","frontMatter":{"title":"Pinning","id":"pinning","description":"Explains pinning mechanism for ensuring data permanence and preventing garbage collection."},"sidebar":"develop","previous":{"title":"GSOC","permalink":"/docs/develop/tools-and-features/gsoc"},"next":{"title":"Erasure Coding","permalink":"/docs/develop/tools-and-features/erasure-coding"}}');var i=o(74848),a=o(28453);const s={title:"Pinning",id:"pinning",description:"Explains pinning mechanism for ensuring data permanence and preventing garbage collection."},c=void 0,r={},d=[{value:"How do I pin content during upload?",id:"pin-during-upload",level:2},{value:"How do I manage pinned content?",id:"administer-pinned-content",level:2},{value:"How do I unpin content?",id:"unpinning-content",level:3},{value:"How do I pin already-uploaded content?",id:"pinning-already-uploaded-content",level:3}];function l(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",p:"p",pre:"pre",strong:"strong",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:["Each Bee node is configured to reserve a certain amount of memory on your computer's hard drive to store and serve chunks within their ",(0,i.jsx)(n.em,{children:"neighborhood of responsibility"})," for other nodes in the Swarm network. Once this alloted space has been filled, each Bee node deletes older chunks to make way for newer ones as they are uploaded by the network."]}),"\n",(0,i.jsx)(n.p,{children:"Each time a chunk is accessed, it is moved back to the end of the deletion queue, so that regularly accessed content stays alive in the network and is not deleted by a node's garbage collection routine."}),"\n",(0,i.jsxs)(n.p,{children:["Bee nodes provide a facility to ",(0,i.jsx)(n.strong,{children:"pin"})," important content so that it is not deleted by the node's garbage collection routine. Chunks can be ",(0,i.jsx)(n.em,{children:"pinned"})," either during upload, or retrospectively using the Swarm reference."]}),"\n",(0,i.jsx)(n.h2,{id:"pin-during-upload",children:"How do I pin content during upload?"}),"\n",(0,i.jsxs)(n.p,{children:["To store content so that it will persist even when Bee's garbage collection routine is deleting old chunks, we simply pass the ",(0,i.jsx)(n.code,{children:"Swarm-Pin"})," header set to ",(0,i.jsx)(n.code,{children:"true"})," when uploading."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'curl -H "Swarm-Pin: true" -H "Swarm-Postage-Batch-Id: 78a26be9b42317fe6f0cbea3e47cbd0cf34f533db4e9c91cf92be40eb2968264" --data-binary @bee.mp4 localhost:1633/bzz\\?bee.mp4\n'})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "reference": "1bfe7c3ce4100ae7f02b62e38d3e8d4c3a86ea368349614a87827402f20cbb30"\n}\n'})}),"\n",(0,i.jsx)(n.h2,{id:"administer-pinned-content",children:"How do I manage pinned content?"}),"\n",(0,i.jsxs)(n.p,{children:["To check what content is currently pinned on your node, query the ",(0,i.jsx)(n.code,{children:"pins"})," endpoint of your Bee API:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl localhost:1633/pins\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "references": [\n "1bfe7c3ce4100ae7f02b62e38d3e8d4c3a86ea368349614a87827402f20cbb30"\n ]\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"or, to check for specific references:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl localhost:1633/pins/1bfe7c3ce4100ae7f02b62e38d3e8d4c3a86ea368349614a87827402f20cbb30\n"})}),"\n",(0,i.jsxs)(n.p,{children:["A ",(0,i.jsx)(n.code,{children:"404"})," response indicates the content is not available."]}),"\n",(0,i.jsx)(n.h3,{id:"unpinning-content",children:"How do I unpin content?"}),"\n",(0,i.jsxs)(n.p,{children:["We can unpin content by sending a ",(0,i.jsx)(n.code,{children:"DELETE"})," request to the pinning endpoint using the same reference:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'curl -XDELETE http://localhost:1633/pins/1bfe7c3ce4100ae7f02b62e38d3e8d4c3a86ea368349614a87827402f20cbb30\n``\n\n```json\n{"message":"OK","code":200}\n'})}),"\n",(0,i.jsxs)(n.p,{children:["Now, when check again, we will get a ",(0,i.jsx)(n.code,{children:"404"})," error as the content is no longer pinned."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl localhost:1633/pins/1bfe7c3ce4100ae7f02b62e38d3e8d4c3a86ea368349614a87827402f20cbb30\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{ "message": "Not Found", "code": 404 }\n'})}),"\n",(0,i.jsx)(n.admonition,{type:"info",children:(0,i.jsxs)(n.p,{children:["Pinning and unpinning is possible for files (as in the example) and also the chunks, directories, and bytes endpoints. See the ",(0,i.jsx)(n.a,{href:"/api/",children:"API"})," documentation for more details."]})}),"\n",(0,i.jsx)(n.h3,{id:"pinning-already-uploaded-content",children:"How do I pin already-uploaded content?"}),"\n",(0,i.jsx)(n.p,{children:"The previous example showed how we can pin content upon upload. It is also possible to pin content that is already uploaded and present in the Swarm."}),"\n",(0,i.jsxs)(n.p,{children:["To do so, we can send a ",(0,i.jsx)(n.code,{children:"POST"})," request including the swarm reference to the files pinning endpoint."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -X POST http://localhost:1633/pins/7b344ea68c699b0eca8bb4cfb3a77eb24f5e4e8ab50d38165e0fb48368350e8f\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{ "message": "OK", "code": 200 }\n'})}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"pins"})," operation will attempt to fetch the content from the network if it is not available on the local node."]}),"\n",(0,i.jsx)(n.p,{children:"Now, if we query our files pinning endpoint again, the swarm reference will be returned."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl http://localhost:1633/pins/7b344ea68c699b0eca8bb4cfb3a77eb24f5e4e8ab50d38165e0fb48368350e8f\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "reference": "7b344ea68c699b0eca8bb4cfb3a77eb24f5e4e8ab50d38165e0fb48368350e8f"\n}\n'})}),"\n",(0,i.jsx)(n.admonition,{type:"warning",children:(0,i.jsx)(n.p,{children:"While the pin operation will attempt to fetch content from the network if it is not available locally, we advise you to ensure that the content is available locally before calling the pin operation. If the content, for whatever reason, is only fetched partially from the network, the pin operation only partly succeeds and leaves the internal administration of pinning in an inconsistent state."})})]})}function p(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},28453(e,n,o){o.d(n,{R:()=>s,x:()=>c});var t=o(96540);const i={},a=t.createContext(i);function s(e){const n=t.useContext(a);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),t.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c4f5d8e4.016bc2e0.js b/assets/js/c4f5d8e4.016bc2e0.js new file mode 100644 index 000000000..d1293b118 --- /dev/null +++ b/assets/js/c4f5d8e4.016bc2e0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[2634],{62468(e,s,t){t.r(s),t.d(s,{default:()=>k});t(96540);var a=t(36882),o=t(5260),r=(t(28774),t(44586));t(86025);const i="mainTitle_BcKq",n="subTitle_opAm",c="titleContainer_NK7n",l="sectionButton_Yvap",m="sectionButtonInner_O7Rk",d="sectionImageLearnDark_RIoI",g="sectionImageLearnLight_gnO6",h="sectionImageDesktopDark_hhG_",p="sectionImageDesktopLight_rnEv",x="sectionImageDevelopDark_qxFy",j="sectionImageDevelopLight_eT5Z",w="description_VY6t",N="container_czXe",v="buttonTitle_w5Vb";var u=t(74848);const k=function(){return(0,r.A)().siteConfig,(0,u.jsxs)(a.A,{title:"Welcome",description:"Hello and welcome to Swarm! \ud83d\udc1d",children:[(0,u.jsxs)(o.A,{children:[(0,u.jsx)("meta",{property:"og:image",content:"https://docs.ethswarm.org/img/preview-image.png"}),(0,u.jsx)("meta",{property:"og:image:alt",content:"Front page of the Bee client docs site"}),(0,u.jsx)("meta",{property:"og:title",content:"Home of the official Bee client docs"}),(0,u.jsx)("meta",{property:"og:type",content:"website"}),(0,u.jsx)("meta",{property:"og:url",content:"https://docs.ethswarm.org/"}),(0,u.jsx)("meta",{property:"og:description",content:"How to operate and manage a Bee client for the Swarm network"}),(0,u.jsx)("meta",{name:"twitter:image",content:"https://docs.ethswarm.org/img/preview-image.png"}),(0,u.jsx)("meta",{name:"twitter:card",content:"summary_large_image"})]}),(0,u.jsxs)("div",{className:c,children:[(0,u.jsx)("h1",{className:i,children:"Swarm Documentation"}),(0,u.jsx)("p",{className:n,children:"Official documentation of the decentralised data storage and distribution protocol built to power the next generation of censorship-resistant, unstoppable, serverless dapps."})]}),(0,u.jsxs)("div",{className:N,children:[(0,u.jsx)("a",{className:l,href:"/docs/concepts/introduction",children:(0,u.jsxs)("div",{className:m,children:[(0,u.jsx)("img",{className:d,src:"img/learn-dark.svg"}),(0,u.jsx)("img",{className:g,src:"img/learn-light.svg"}),(0,u.jsx)("h3",{className:v,children:"Learn about Swarm"}),(0,u.jsx)("p",{className:w,children:"Get to know more about the Swarm's decentralised data storage and distribution technology."})]})}),(0,u.jsx)("a",{className:l,href:"/docs/desktop/introduction",children:(0,u.jsxs)("div",{className:m,children:[(0,u.jsx)("img",{className:h,src:"img/desktop-dark.svg"}),(0,u.jsx)("img",{className:p,src:"img/desktop-light.svg"}),(0,u.jsx)("h3",{className:v,children:"Use Swarm Desktop"}),(0,u.jsx)("p",{className:w,children:"Install the Swarm Desktop client to quickly spin up a Bee node and start interacting with the Swarm network."})]})}),(0,u.jsx)("a",{className:l,href:"/docs/bee/installation/getting-started",children:(0,u.jsxs)("div",{className:m,children:[(0,u.jsx)("img",{className:x,src:"img/bee-dark.svg"}),(0,u.jsx)("img",{className:j,src:"img/bee-light.svg"}),(0,u.jsx)("h3",{className:v,children:"Run a Bee Node"}),(0,u.jsx)("p",{className:w,children:"Operate a Bee node to connect with other peers all over the world to become part of Swarm network."})]})}),(0,u.jsx)("a",{className:l,href:"/docs/develop/introduction",children:(0,u.jsxs)("div",{className:m,children:[(0,u.jsx)("img",{className:x,src:"img/develop-dark.svg"}),(0,u.jsx)("img",{className:j,src:"img/develop-light.svg"}),(0,u.jsx)("h3",{className:v,children:"Develop on Swarm"}),(0,u.jsx)("p",{className:w,children:"Swarm empowers developers to create and host decentralised dapps, NFT meta-data, media files, and much more!"})]})})]})]})}}}]); \ No newline at end of file diff --git a/assets/js/c5b6ac1f.f8b0044a.js b/assets/js/c5b6ac1f.f8b0044a.js new file mode 100644 index 000000000..24be04220 --- /dev/null +++ b/assets/js/c5b6ac1f.f8b0044a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[3302],{26153(e,s,r){r.r(s),r.d(s,{assets:()=>o,contentTitle:()=>l,default:()=>c,frontMatter:()=>a,metadata:()=>t,toc:()=>d});const t=JSON.parse('{"id":"develop/resources","title":"Developer Resources","description":"A curated list of Swarm developer resources \u2014 docs, SDKs, example projects, gateways, network tools, and community links.","source":"@site/docs/develop/resources-md.md","sourceDirName":"develop","slug":"/develop/resources","permalink":"/docs/develop/resources","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/develop/resources-md.md","tags":[],"version":"current","frontMatter":{"title":"Developer Resources","id":"resources","sidebar_label":"Developer Resources","hide_table_of_contents":false,"description":"A curated list of Swarm developer resources \u2014 docs, SDKs, example projects, gateways, network tools, and community links."},"sidebar":"develop","previous":{"title":"Add Access Control","permalink":"/docs/develop/act"},"next":{"title":"Overview","permalink":"/docs/develop/tools-and-features/introduction"}}');var n=r(74848),i=r(28453);const a={title:"Developer Resources",id:"resources",sidebar_label:"Developer Resources",hide_table_of_contents:!1,description:"A curated list of Swarm developer resources \u2014 docs, SDKs, example projects, gateways, network tools, and community links."},l=void 0,o={},d=[{value:"Learn",id:"learn",level:2},{value:"Get Started",id:"get-started",level:3},{value:"Key Concepts",id:"key-concepts",level:3},{value:"Developer Guides",id:"developer-guides",level:3},{value:"Examples",id:"examples",level:2},{value:"Publishing & Websites",id:"publishing--websites",level:3},{value:"Streaming",id:"streaming",level:3},{value:"Messaging & Chat",id:"messaging--chat",level:3},{value:"Tools",id:"tools",level:2},{value:"SDKs & APIs",id:"sdks--apis",level:3},{value:"Libraries & Primitives",id:"libraries--primitives",level:3},{value:"Developer Tools",id:"developer-tools",level:3},{value:"Gateways & Deploy",id:"gateways--deploy",level:3},{value:"Network Tools",id:"network-tools",level:3},{value:"Community",id:"community",level:2},{value:"Community & Support",id:"community--support",level:3}];function h(e){const s={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",ul:"ul",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h2,{id:"learn",children:"Learn"}),"\n",(0,n.jsx)(s.h3,{id:"get-started",children:"Get Started"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/docs/concepts/what-is-swarm",children:"What is Swarm"})," \u2014 Introduction to the decentralised storage network"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/docs/develop/introduction",children:"Developer introduction"})," \u2014 Overview of building on Swarm"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/docs/bee/installation/quick-start",children:"Bee node quickstart"})," \u2014 Get a node running in minutes"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/docs/bee/installation/getting-started",children:"Full installation guide"})," \u2014 Step-by-step setup for all platforms"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://papers.ethswarm.org",children:"Swarm papers \u2197"})," \u2014 Technical whitepapers and research"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://docs.ethswarm.org/the-book-of-swarm.pdf",children:"The Book of Swarm \u2197"})," \u2014 Full technical book on Swarm's architecture and design"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://papers.ethswarm.org/p/swarm-protocol-spec/",children:"Swarm Protocol Specification \u2197"})," \u2014 Formal spec for developers building clients or integrations"]}),"\n"]}),"\n",(0,n.jsx)(s.h3,{id:"key-concepts",children:"Key Concepts"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/docs/concepts/DISC/",children:"DISC"})," \u2014 How data is stored and retrieved across the network"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/docs/concepts/incentives/overview",children:"Incentives & BZZ"})," \u2014 Economic model and token mechanics"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/docs/develop/tools-and-features/buy-a-stamp-batch",children:"Postage stamps"})," \u2014 Pay for storage with stamp batches"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/docs/develop/tools-and-features/feeds",children:"Feeds"})," \u2014 Mutable content pointers for updatable data"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/docs/develop/tools-and-features/manifests",children:"Manifests"})," \u2014 Directory and routing structure on Swarm"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/docs/develop/tools-and-features/chunk-types",children:"Chunk types"})," \u2014 Content-addressed and single-owner chunks"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/docs/bee/working-with-bee/node-types",children:"Node types"})," \u2014 Full, light, and ultra-light participation levels"]}),"\n"]}),"\n",(0,n.jsx)(s.h3,{id:"developer-guides",children:"Developer Guides"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/docs/develop/upload-and-download",children:"Upload and download files"})," \u2014 Basic file operations via the API"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/docs/develop/host-your-website",children:"Host a website on Swarm"})," \u2014 Deploy static sites to decentralised storage"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/docs/develop/files",children:"Work with files and directories"})," \u2014 Manifest operations for virtual paths"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/docs/develop/routing",children:"Routing manifests for SPAs"})," \u2014 Single-page app routing on Swarm"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/docs/develop/dynamic-content",children:"Dynamic content with feeds"})," \u2014 Build updatable content with feed primitives"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/docs/develop/multi-author-blog",children:"Multi-author blog"})," \u2014 Combine per-author feeds with a shared index"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/docs/develop/act",children:"Access control (ACT)"})," \u2014 Restrict who can read your uploaded content"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/docs/develop/tools-and-features/pss",children:"PSS messaging"})," \u2014 Send encrypted messages over the network"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/docs/develop/tools-and-features/gsoc",children:"GSOC messaging"})," \u2014 Graffiti single-owner chunk messaging"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/docs/develop/tools-and-features/store-with-encryption",children:"Encrypt uploads"})," \u2014 Client-side encryption before uploading"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/docs/develop/tools-and-features/erasure-coding",children:"Erasure coding"})," \u2014 Redundant storage for fault tolerance"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/docs/develop/tools-and-features/pinning",children:"Pinning content"})," \u2014 Keep content locally pinned to your node"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/docs/develop/tools-and-features/gateway-proxy",children:"Run a local gateway proxy"})," \u2014 Serve Swarm content over HTTP"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/docs/develop/tools-and-features/starting-a-test-network",children:"Start a private test network"})," \u2014 Local multi-node dev environment"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/docs/develop/tools-and-features/bee-dev-mode",children:"bee-factory"})," \u2014 Local Swarm dev stack, no real funds needed"]}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"examples",children:"Examples"}),"\n",(0,n.jsx)(s.h3,{id:"publishing--websites",children:"Publishing & Websites"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/Cafe137/etherjot",children:"Cafe137/etherjot \u2197"})," \u2014 Static blog generator, live at etherjot.eth.limo"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/ethersphere/examples",children:"ethersphere/examples \u2197"})," \u2014 Collection of example apps and starters"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/ethersphere/examples/tree/main/simple-blog",children:"examples/simple-blog \u2197"})," \u2014 Minimal feed-backed blog, one publisher, updatable content"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/ethersphere/examples/tree/main/multi-author-blog",children:"examples/multi-author-blog \u2197"})," \u2014 Multi-author blog using per-author feeds and a shared index"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/ethersphere/examples/tree/main/website",children:"examples/website \u2197"})," \u2014 Upload a static website to Swarm, publish it to a feed for a stable URL, and resolve it via ENS"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/ethersphere/examples/tree/main/routing-manifest",children:"examples/routing-manifest \u2197"})," \u2014 Manifest-based routing demo for single-page apps"]}),"\n"]}),"\n",(0,n.jsx)(s.h3,{id:"streaming",children:"Streaming"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/Solar-Punk-Ltd/swarm-stream-js",children:"Solar-Punk-Ltd/swarm-stream-js \u2197"})," \u2014 Core streaming library for Swarm"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/Solar-Punk-Ltd/swarm-hls-stream",children:"Solar-Punk-Ltd/swarm-hls-stream \u2197"})," \u2014 HLS streaming over Swarm"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/Solar-Punk-Ltd/swarm-stream-aggregator-js",children:"Solar-Punk-Ltd/swarm-stream-aggregator-js \u2197"})," \u2014 Stream aggregation layer"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/Solar-Punk-Ltd/swarm-stream-react-example",children:"Solar-Punk-Ltd/swarm-stream-react-example \u2197"})," \u2014 React media player consuming Swarm streams"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/Solar-Punk-Ltd/swarm-ingestion-stream-react-example",children:"Solar-Punk-Ltd/swarm-ingestion-stream-react-example \u2197"})," \u2014 React app for live stream ingest to Swarm"]}),"\n"]}),"\n",(0,n.jsx)(s.h3,{id:"messaging--chat",children:"Messaging & Chat"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/Solar-Punk-Ltd/swarm-chat-js",children:"Solar-Punk-Ltd/swarm-chat-js \u2197"})," \u2014 Core chat library for Swarm"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/Solar-Punk-Ltd/swarm-chat-aggregator-js",children:"Solar-Punk-Ltd/swarm-chat-aggregator-js \u2197"})," \u2014 Chat message aggregation layer"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/Solar-Punk-Ltd/swarm-chat-react-example",children:"Solar-Punk-Ltd/swarm-chat-react-example \u2197"})," \u2014 React chat application on Swarm"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/Solar-Punk-Ltd/swarm-comment-js",children:"Solar-Punk-Ltd/swarm-comment-js \u2197"})," \u2014 Core comments library"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/Solar-Punk-Ltd/swarm-comment-react-example",children:"Solar-Punk-Ltd/swarm-comment-react-example \u2197"})," \u2014 React comments component"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/Solar-Punk-Ltd/comment-system",children:"Solar-Punk-Ltd/comment-system \u2197"})," \u2014 Deployable comment system on Swarm"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/Solar-Punk-Ltd/comment-system-ui",children:"Solar-Punk-Ltd/comment-system-ui \u2197"})," \u2014 UI for the Swarm comment system"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/Solar-Punk-Ltd/swarm-collaborative-docs",children:"Solar-Punk-Ltd/swarm-collaborative-docs \u2197"})," \u2014 Real-time collaborative document editing on Swarm"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/Cafe137/gsoc-group-chat",children:"Cafe137/gsoc-group-chat \u2197"})," \u2014 Group chat using GSOC (Graffiti Single Owner Chunks)"]}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"tools",children:"Tools"}),"\n",(0,n.jsx)(s.h3,{id:"sdks--apis",children:"SDKs & APIs"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://bee-js.ethswarm.org/docs/",children:"bee-js \u2197"})," \u2014 Official JavaScript / TypeScript SDK"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://bee-js.ethswarm.org/docs/getting-started/",children:"bee-js getting started \u2197"})," \u2014 Quickstart for bee-js integration"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://docs.ethswarm.org/api/",children:"Bee HTTP API reference \u2197"})," \u2014 Full REST API documentation"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/docs/bee/working-with-bee/swarm-cli/",children:"swarm-cli"})," \u2014 Command-line interface for uploads, feeds, and more"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/ethersphere/swarm-mcp",children:"swarm-mcp \u2197"})," \u2014 MCP server for AI agents to read and write Swarm"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/ethersphere/swarm-actions",children:"Swarm Actions \u2197"})," \u2014 Deploy to Swarm from GitHub CI/CD workflows"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/ethersphere/swarm-quickstart-skills",children:"Swarm Quickstart Skills \u2197"})," \u2014 Interactive Claude Code skills for guided Swarm onboarding"]}),"\n"]}),"\n",(0,n.jsx)(s.h3,{id:"libraries--primitives",children:"Libraries & Primitives"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/Solar-Punk-Ltd/file-manager-lib",children:"Solar-Punk-Ltd/file-manager-lib \u2197"})," \u2014 High-level file management primitives for Swarm"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/Cafe137/feed-helper",children:"Cafe137/feed-helper \u2197"})," \u2014 Utility library for working with Swarm feeds"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/fairDataSociety/fdp-storage",children:"fairDataSociety/fdp-storage \u2197"})," \u2014 Serverless web3 filesystem, Fair Data Protocol reference implementation"]}),"\n"]}),"\n",(0,n.jsx)(s.h3,{id:"developer-tools",children:"Developer Tools"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/ethersphere/create-swarm-app",children:"ethersphere/create-swarm-app \u2197"})," \u2014 Boilerplate for building Swarm apps with JavaScript"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/Cafe137/fdp-play",children:"Cafe137/fdp-play \u2197"})," \u2014 Docker-based local Bee cluster and FDP dev environment"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/Cafe137/pss-gsoc-learning-material",children:"Cafe137/pss-gsoc-learning-material \u2197"})," \u2014 Learning material for PSS and GSOC primitives"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/ethersphere/examples/tree/main/dynamic-content",children:"examples/dynamic-content \u2197"})," \u2014 Content addressing and feeds, introduction example"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/ethersphere/examples/tree/main/filesystem",children:"examples/filesystem \u2197"})," \u2014 Filesystem-style operations using bee-js"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/agazso/swarm-cid-converter",children:"agazso/swarm-cid-converter \u2197"})," \u2014 Convert Swarm hashes or links to CID and vice versa"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/Solar-Punk-Ltd/ipfs-to-swarm",children:"Solar-Punk-Ltd/ipfs-to-swarm \u2197"})," \u2014 Migrate data from IPFS to Swarm"]}),"\n"]}),"\n",(0,n.jsx)(s.h3,{id:"gateways--deploy",children:"Gateways & Deploy"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://beeport.ethswarm.org",children:"Beeport \u2197"})," \u2014 Upload without running a node"]}),"\n",(0,n.jsxs)(s.li,{children:["Public content gateway \u2014 Access any content by hash (",(0,n.jsx)(s.code,{children:"https://<hash>.bzz.link"}),")"]}),"\n",(0,n.jsxs)(s.li,{children:["ENS gateway \u2014 Resolve ENS names to Swarm content (",(0,n.jsx)(s.code,{children:"https://<name>.eth.limo"}),")"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://app.ens.domains",children:"ENS name management \u2197"})," \u2014 Register and manage ENS names"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/ethersphere/gateway-proxy",children:"ethersphere/gateway-proxy \u2197"})," \u2014 Production gateway proxy server"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/ethersphere/swarm-gateway",children:"ethersphere/swarm-gateway \u2197"})," \u2014 Official Swarm HTTP content gateway"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://swarmy.cloud",children:"Swarmy \u2197"})," \u2014 Swarm as a service, upload and retrieve without running a node"]}),"\n"]}),"\n",(0,n.jsx)(s.h3,{id:"network-tools",children:"Network Tools"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://swarmscan.io/",children:"SwarmScan \u2197"})," \u2014 Network explorer and node statistics"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://gateway.ethswarm.org/",children:"Swarm Gateway \u2197"})," \u2014 Share files via URL"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://ethswarm.org/build/desktop",children:"Swarm Desktop \u2197"})," \u2014 GUI node for non-technical users"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/ethersphere/bee-dashboard",children:"Bee Dashboard \u2197"})," \u2014 Web UI for node management"]}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"community",children:"Community"}),"\n",(0,n.jsx)(s.h3,{id:"community--support",children:"Community & Support"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://discord.ethswarm.org",children:"Discord \u2197"})," \u2014 Community chat and support"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/ethersphere",children:"GitHub \u2014 Ethersphere org \u2197"})," \u2014 All official repositories"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/ethersphere/awesome-swarm",children:"Awesome Swarm \u2197"})," \u2014 Curated ecosystem list"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://blog.ethswarm.org",children:"Blog \u2197"})," \u2014 News, updates, and deep dives"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://ethswarm.org",children:"Website \u2197"})," \u2014 Main Swarm website"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/docs/references/faq/",children:"FAQ"})," \u2014 Frequently asked questions"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/ethersphere/SWIPs",children:"SWIPs \u2197"})," \u2014 Swarm Improvement Proposals, follow or contribute to protocol direction"]}),"\n"]})]})}function c(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},28453(e,s,r){r.d(s,{R:()=>a,x:()=>l});var t=r(96540);const n={},i=t.createContext(n);function a(e){const s=t.useContext(i);return t.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function l(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:a(e.components),t.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d181d228.92851780.js b/assets/js/d181d228.92851780.js new file mode 100644 index 000000000..b74e7637e --- /dev/null +++ b/assets/js/d181d228.92851780.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[3583],{98155(e,n,o){o.r(n),o.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>h,frontMatter:()=>a,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"bee/bee-faq","title":"Bee FAQ","description":"Addresses common questions about running Bee nodes including setup installation troubleshooting and blockchain interactions.","source":"@site/docs/bee/faq.md","sourceDirName":"bee","slug":"/bee/bee-faq","permalink":"/docs/bee/bee-faq","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/bee/faq.md","tags":[],"version":"current","frontMatter":{"title":"Bee FAQ","id":"bee-faq","description":"Addresses common questions about running Bee nodes including setup installation troubleshooting and blockchain interactions."},"sidebar":"bee","previous":{"title":"Uninstalling Bee","permalink":"/docs/bee/working-with-bee/uninstalling-bee"}}');var s=o(74848),i=o(28453);const a={title:"Bee FAQ",id:"bee-faq",description:"Addresses common questions about running Bee nodes including setup installation troubleshooting and blockchain interactions."},r=void 0,d={},c=[{value:"Running a Bee Node",id:"running-a-bee-node",level:2},{value:"How can I become part of the Swarm network?",id:"how-can-i-become-part-of-the-swarm-network",level:3},{value:"What are the differences between Bee node types?",id:"what-are-the-differences-between-bee-node-types",level:3},{value:"What are the requirements for running a Bee node?",id:"what-are-the-requirements-for-running-a-bee-node",level:3},{value:"Full node",id:"full-node",level:4},{value:"How much bandwidth is required for each node?",id:"how-much-bandwidth-is-required-for-each-node",level:3},{value:"How do I Install Bee on Windows?",id:"how-do-i-install-bee-on-windows",level:3},{value:"How do I get the node's wallet's private key (use-case for Desktop app)?",id:"how-do-i-get-the-nodes-wallets-private-key-use-case-for-desktop-app",level:3},{value:"How do I import my private key to Metamask?",id:"how-do-i-import-my-private-key-to-metamask",level:3},{value:"Where can I find my password?",id:"where-can-i-find-my-password",level:3},{value:"Connectivity",id:"connectivity",level:2},{value:"Which p2p port does Bee use and which should I open in my router?",id:"which-p2p-port-does-bee-use-and-which-should-i-open-in-my-router",level:3},{value:"How do I know if I am connected to other peers?",id:"how-do-i-know-if-i-am-connected-to-other-peers",level:3},{value:"Errors",id:"errors",level:2},{value:"What does "could not connect to peer" mean?",id:"what-does-could-not-connect-to-peer-mean",level:3},{value:"What does "context deadline exceeded" error mean?",id:"what-does-context-deadline-exceeded-error-mean",level:3},{value:"How do I set up a blockchain endpoint?",id:"how-do-i-set-up-a-blockchain-endpoint",level:3},{value:"How can I export my private keys?",id:"how-can-i-export-my-private-keys",level:3},{value:"How to import bee node address to MetaMask?",id:"how-to-import-bee-node-address-to-metamask",level:3},{value:"What are the restart commands of bee?",id:"what-are-the-restart-commands-of-bee",level:3},{value:"Relevant endpoints and explanations",id:"relevant-endpoints-and-explanations",level:3},{value:"How can I check how many cashed out cheques do I have?",id:"how-can-i-check-how-many-cashed-out-cheques-do-i-have",level:3},{value:"Where can I find documents about the cashout commands?",id:"where-can-i-find-documents-about-the-cashout-commands",level:3},{value:"When I run http://localhost:1633/chequebook/balance I get "totalBalance" and "availableBalance" what is the difference?",id:"when-i-run-httplocalhost1633chequebookbalance-i-get-totalbalance-and-availablebalance-what-is-the-difference",level:3},{value:"What determines the number of peers and how to influence their number? Why are there sometimes 300+ peers and sometimes 30?",id:"what-determines-the-number-of-peers-and-how-to-influence-their-number-why-are-there-sometimes-300-peers-and-sometimes-30",level:3},{value:"What is the difference between "systemctl" and "bee start"?",id:"what-is-the-difference-between-systemctl-and-bee-start",level:3},{value:"Swarm Protocol",id:"swarm-protocol",level:2},{value:"Can I use one Ethereum Address/Wallet for many nodes?",id:"can-i-use-one-ethereum-addresswallet-for-many-nodes",level:3},{value:"Miscellaneous",id:"miscellaneous",level:2},{value:"How can I add Gnosis / Sepolia to Metamask?",id:"how-can-i-add-gnosis--sepolia-to-metamask",level:3},{value:"Gnosis Chain",id:"gnosis-chain",level:4}];function l(e){const n={a:"a",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"running-a-bee-node",children:"Running a Bee Node"}),"\n",(0,s.jsx)(n.h3,{id:"how-can-i-become-part-of-the-swarm-network",children:"How can I become part of the Swarm network?"}),"\n",(0,s.jsx)(n.p,{children:"You can become part of the network by running a bee node. Bee is a peer-to-peer client that connects you with other peers all over the world to become part of the Swarm network, a global distributed p2p storage network that aims to store and distribute all of the world's data"}),"\n",(0,s.jsx)(n.p,{children:"Depending on your needs you can run an ultra-light, light or full node."}),"\n",(0,s.jsx)(n.h3,{id:"what-are-the-differences-between-bee-node-types",children:"What are the differences between Bee node types?"}),"\n",(0,s.jsxs)(n.p,{children:["A bee node can be configured to run in various modes based on specific use cases and requirements.\n",(0,s.jsx)(n.a,{href:"/docs/bee/working-with-bee/node-types#node-types-overview",children:"See here"})," for an overview of the differences."]}),"\n",(0,s.jsx)(n.h3,{id:"what-are-the-requirements-for-running-a-bee-node",children:"What are the requirements for running a Bee node?"}),"\n",(0,s.jsxs)(n.p,{children:["See the ",(0,s.jsx)(n.a,{href:"/docs/bee/installation/getting-started#requirements",children:"getting started section"})," for more information about running a Bee node."]}),"\n",(0,s.jsx)(n.h4,{id:"full-node",children:"Full node"}),"\n",(0,s.jsxs)(n.p,{children:["All three node types run on ordinary consumer hardware.\nFull nodes use more disk space and bandwidth than the lighter modes and additionally need a Gnosis Chain connection and funds \u2014 see ",(0,s.jsx)(n.a,{href:"/docs/bee/working-with-bee/node-types#full-node-specifications",children:"full node specifications"})," for the current list."]}),"\n",(0,s.jsx)(n.h3,{id:"how-much-bandwidth-is-required-for-each-node",children:"How much bandwidth is required for each node?"}),"\n",(0,s.jsx)(n.p,{children:"Typically, each node requires around 10 megabits per second (Mbps) of bandwidth during normal operation."}),"\n",(0,s.jsx)(n.h3,{id:"how-do-i-install-bee-on-windows",children:"How do I Install Bee on Windows?"}),"\n",(0,s.jsxs)(n.p,{children:["Bee is compatible with Windows and a Bee ",(0,s.jsx)(n.code,{children:".exe"})," file can be found on the ",(0,s.jsxs)(n.a,{href:"https://github.com/ethersphere/bee/releases",children:[(0,s.jsx)(n.code,{children:"releases"})," page"]})," of the Bee repo."]}),"\n",(0,s.jsxs)(n.p,{children:["It is also possible to ",(0,s.jsx)(n.a,{href:"/docs/bee/installation/build-from-source",children:"build from the source"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"how-do-i-get-the-nodes-wallets-private-key-use-case-for-desktop-app",children:"How do I get the node's wallet's private key (use-case for Desktop app)?"}),"\n",(0,s.jsxs)(n.p,{children:["See the ",(0,s.jsx)(n.a,{href:"/docs/bee/working-with-bee/backups",children:"backup section"})," for more info."]}),"\n",(0,s.jsx)(n.h3,{id:"how-do-i-import-my-private-key-to-metamask",children:"How do I import my private key to Metamask?"}),"\n",(0,s.jsxs)(n.p,{children:["You can import the ",(0,s.jsx)(n.code,{children:"swarm.key"})," json file in MetaMask using your password file or the password you have set in your bee config file."]}),"\n",(0,s.jsx)(n.h3,{id:"where-can-i-find-my-password",children:"Where can I find my password?"}),"\n",(0,s.jsxs)(n.p,{children:["You can find the password in the root of your data directory. See the ",(0,s.jsx)(n.a,{href:"/docs/bee/working-with-bee/backups",children:"backup section"})," for more info."]}),"\n",(0,s.jsx)(n.h2,{id:"connectivity",children:"Connectivity"}),"\n",(0,s.jsx)(n.h3,{id:"which-p2p-port-does-bee-use-and-which-should-i-open-in-my-router",children:"Which p2p port does Bee use and which should I open in my router?"}),"\n",(0,s.jsxs)(n.p,{children:["The default p2p port for Bee is 1634, please forward this using your router and allow traffic over your firewall as necessary. Bee also supports UPnP but it is recommended you do not use this protocol as it lacks security. For more detailed information see the connectivity section in the docs. ",(0,s.jsx)(n.a,{href:"https://docs.ethswarm.org/docs/bee/installation/connectivity",children:"https://docs.ethswarm.org/docs/bee/installation/connectivity"})]}),"\n",(0,s.jsx)(n.h3,{id:"how-do-i-know-if-i-am-connected-to-other-peers",children:"How do I know if I am connected to other peers?"}),"\n",(0,s.jsxs)(n.p,{children:["You may communicate with your Bee using its HTTP api. Type ",(0,s.jsx)(n.code,{children:"curl http://localhost:1633/peers"})," at your command line to see a list of your peers."]}),"\n",(0,s.jsx)(n.h2,{id:"errors",children:"Errors"}),"\n",(0,s.jsx)(n.h3,{id:"what-does-could-not-connect-to-peer-mean",children:'What does "could not connect to peer" mean?'}),"\n",(0,s.jsx)(n.p,{children:'The "Could not connect to peer" error can occur for various reasons. One of the most common is that you have the identifier of a peer in your address book from a previous session. When trying to connect to this node again, the peer may no longer be online.'}),"\n",(0,s.jsx)(n.h3,{id:"what-does-context-deadline-exceeded-error-mean",children:'What does "context deadline exceeded" error mean?'}),"\n",(0,s.jsx)(n.p,{children:'The "context deadline exceeded" is a non-critical warning. It means that a node took unexpectedly long to respond to a request from your node. Your node will automatically try again via another node.'}),"\n",(0,s.jsx)(n.h3,{id:"how-do-i-set-up-a-blockchain-endpoint",children:"How do I set up a blockchain endpoint?"}),"\n",(0,s.jsxs)(n.p,{children:["We recommend you run your own ",(0,s.jsx)(n.a,{href:"https://docs.gnosischain.com/node/tools/sedge",children:"Gnosis Node using Nethermind"}),"."]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:'If you use "bee start"'}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"you can set it in your bee configuration under --blockchain-rpc-endpoint or BEE_BLOCKCHAIN_RPC_ENDPOINT"}),"\n",(0,s.jsx)(n.li,{children:"open ~/.bee.yaml"}),"\n",(0,s.jsxs)(n.li,{children:["set ",(0,s.jsx)(n.code,{children:"blockchain-rpc-endpoint: http://localhost:8545"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"If you use bee.service"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"you can set it in your bee configuration under --blockchain-rpc-endpoint or BEE_BLOCKCHAIN_RPC_ENDPOINT"}),"\n",(0,s.jsx)(n.li,{children:"open /etc/bee/bee.yaml"}),"\n",(0,s.jsxs)(n.li,{children:["and then uncomment ",(0,s.jsx)(n.code,{children:"blockchain-rpc-endpoint"})," configuration"]}),"\n",(0,s.jsxs)(n.li,{children:["and set it to ",(0,s.jsx)(n.code,{children:"http://localhost:8545"})]}),"\n",(0,s.jsx)(n.li,{children:"after that sudo systemctl restart bee"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"how-can-i-export-my-private-keys",children:"How can I export my private keys?"}),"\n",(0,s.jsxs)(n.p,{children:["See the section on ",(0,s.jsx)(n.a,{href:"/docs/bee/working-with-bee/backups",children:"backups"})," for exporting your keys."]}),"\n",(0,s.jsx)(n.h3,{id:"how-to-import-bee-node-address-to-metamask",children:"How to import bee node address to MetaMask?"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["See the ",(0,s.jsx)(n.a,{href:"/docs/bee/working-with-bee/backups",children:"backup section"})," for info on exporting keys."]}),"\n",(0,s.jsx)(n.li,{children:'Go to Metamask and click "Account 1" --\x3e "Import Account"'}),"\n",(0,s.jsx)(n.li,{children:'Choose the "Select Type" dropdown menu and choose "JSON file"'}),"\n",(0,s.jsx)(n.li,{children:"Paste the password (Make sure to do this first)"}),"\n",(0,s.jsx)(n.li,{children:"Upload exported JSON file"}),"\n",(0,s.jsx)(n.li,{children:'Click "Import"'}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"what-are-the-restart-commands-of-bee",children:"What are the restart commands of bee?"}),"\n",(0,s.jsx)(n.p,{children:"If you use bee.service:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Start: ",(0,s.jsx)(n.code,{children:"sudo systemctl start bee.service"})]}),"\n",(0,s.jsxs)(n.li,{children:["Stop: ",(0,s.jsx)(n.code,{children:"sudo systemctl stop bee.service"})]}),"\n",(0,s.jsxs)(n.li,{children:["Status: ",(0,s.jsx)(n.code,{children:"sudo systemctl status bee.service"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:'If you use "bee start"'}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Start: ",(0,s.jsx)(n.code,{children:"bee start"})]}),"\n",(0,s.jsxs)(n.li,{children:["Stop: ",(0,s.jsx)(n.code,{children:"ctrl + c"})," or ",(0,s.jsx)(n.code,{children:"cmd + c"})," or close terminal to stop process"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"relevant-endpoints-and-explanations",children:"Relevant endpoints and explanations"}),"\n",(0,s.jsxs)(n.p,{children:["See the ",(0,s.jsx)(n.a,{href:"https://docs.ethswarm.org/api/",children:"API Reference"})," pages for details."]}),"\n",(0,s.jsx)(n.h3,{id:"how-can-i-check-how-many-cashed-out-cheques-do-i-have",children:"How can I check how many cashed out cheques do I have?"}),"\n",(0,s.jsxs)(n.p,{children:["You can look at your chequebook contract at etherscan.\nGet your chequebook contract address with: ",(0,s.jsx)(n.code,{children:"curl http://localhost:1633/chequebook/address"})]}),"\n",(0,s.jsx)(n.h3,{id:"where-can-i-find-documents-about-the-cashout-commands",children:"Where can I find documents about the cashout commands?"}),"\n",(0,s.jsxs)(n.p,{children:["Learn how to cash out ",(0,s.jsx)(n.a,{href:"/docs/bee/working-with-bee/cashing-out",children:"here"}),"."]}),"\n",(0,s.jsxs)(n.h3,{id:"when-i-run-httplocalhost1633chequebookbalance-i-get-totalbalance-and-availablebalance-what-is-the-difference",children:["When I run ",(0,s.jsx)(n.a,{href:"http://localhost:1633/chequebook/balance",children:"http://localhost:1633/chequebook/balance"}),' I get "totalBalance" and "availableBalance" what is the difference?']}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"totalBalance"})," is the balance on the blockchain, and ",(0,s.jsx)(n.code,{children:"availableBalance"})," is that balance minus the outstanding (non-cashed) cheques that you have issued to your peers. These latter cheques do not show up on the blockchain."]}),"\n",(0,s.jsx)(n.p,{children:"It's like what the bank thinks your balance is vs what your chequebook knows is actually available because of the cheques you've written that are still \"in the mail\" and not yet cashed."}),"\n",(0,s.jsx)(n.h3,{id:"what-determines-the-number-of-peers-and-how-to-influence-their-number-why-are-there-sometimes-300-peers-and-sometimes-30",children:"What determines the number of peers and how to influence their number? Why are there sometimes 300+ peers and sometimes 30?"}),"\n",(0,s.jsxs)(n.p,{children:['The number of connected peers is determined by your node as it attempts to keep the distributed Kademlia well connected. As nodes come and go in the network your peer count will go up and down. If you watch bee\'s output logs for "successfully connected", there should be a mix of (inbound) and (outbound) at the end of those messages. If you only get (outbound) then you may need to get your p2p port opened through your firewall and/or forwarded by your router. Check out the connectivity section in the docs ',(0,s.jsx)(n.a,{href:"https://docs.ethswarm.org/docs/bee/installation/connectivity",children:"https://docs.ethswarm.org/docs/bee/installation/connectivity"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"what-is-the-difference-between-systemctl-and-bee-start",children:'What is the difference between "systemctl" and "bee start"?'}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.em,{children:"bee start"})," and ",(0,s.jsx)(n.em,{children:"systemctl start bee"})," actually run 2 different instances with 2 different ",(0,s.jsx)(n.em,{children:"bee.yaml"})," files and two different data directories."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.em,{children:"bee start"})," uses ",(0,s.jsx)(n.em,{children:"~/.bee.yaml"})," and the ",(0,s.jsx)(n.em,{children:"~/.bee"})," directory for data\n",(0,s.jsx)(n.em,{children:"systemctl"})," uses ",(0,s.jsx)(n.em,{children:"/etc/bee/bee.yaml"})," and (IIRC) ",(0,s.jsx)(n.em,{children:"/var/lib/bee"})," for data"]}),"\n",(0,s.jsx)(n.h2,{id:"swarm-protocol",children:"Swarm Protocol"}),"\n",(0,s.jsx)(n.h3,{id:"can-i-use-one-ethereum-addresswallet-for-many-nodes",children:"Can I use one Ethereum Address/Wallet for many nodes?"}),"\n",(0,s.jsx)(n.p,{children:"No, this violates the requirements of the Swarm Protocol and will break critical node functions such as staking, purchasing stamp batches, and uploading data."}),"\n",(0,s.jsx)(n.p,{children:"Therefore, the rule is, each node must have:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"1 Ethereum address (this address, the Swarm network id, and a random nonce are used to determine the node's overlay address)"}),"\n",(0,s.jsx)(n.li,{children:"1 Chequebook"}),"\n",(0,s.jsx)(n.li,{children:"2 Unique ports for Bee API / p2p API"}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"miscellaneous",children:"Miscellaneous"}),"\n",(0,s.jsx)(n.h3,{id:"how-can-i-add-gnosis--sepolia-to-metamask",children:"How can I add Gnosis / Sepolia to Metamask?"}),"\n",(0,s.jsxs)(n.p,{children:["You can easily add Sepolia or Gnosis to metamask using the ",(0,s.jsx)(n.a,{href:"https://support.metamask.io/configure/networks/how-to-add-a-custom-network-rpc/",children:"official guide from Metamask"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"If you are using a different wallet which does not have an easy option for adding networks like Metamask does, then you may need to add the networks manually. You need to fill in four pieces of information to do so:"}),"\n",(0,s.jsx)(n.h4,{id:"gnosis-chain",children:"Gnosis Chain"}),"\n",(0,s.jsxs)(n.p,{children:["Network name: Gnosis\nRPC URL: ",(0,s.jsx)(n.a,{href:"https://xdai.fairdatasociety.org",children:"https://xdai.fairdatasociety.org"}),"\nChain ID: 100\nCurrency symbol: XDAI"]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},28453(e,n,o){o.d(n,{R:()=>a,x:()=>r});var t=o(96540);const s={},i=t.createContext(s);function a(e){const n=t.useContext(i);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d643000e.cc16fba8.js b/assets/js/d643000e.cc16fba8.js new file mode 100644 index 000000000..f28c9bc3f --- /dev/null +++ b/assets/js/d643000e.cc16fba8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[7519],{83486(e,n,s){s.r(n),s.d(n,{assets:()=>r,contentTitle:()=>d,default:()=>h,frontMatter:()=>a,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"bee/installation/quick-start","title":"Quickstart","description":"Accelerates Bee setup with shell script installation and swarm-cli tools enabling rapid node deployment and network interaction.","source":"@site/docs/bee/installation/quick-start.md","sourceDirName":"bee/installation","slug":"/bee/installation/quick-start","permalink":"/docs/bee/installation/quick-start","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/bee/installation/quick-start.md","tags":[],"version":"current","frontMatter":{"title":"Quickstart","id":"quick-start","description":"Accelerates Bee setup with shell script installation and swarm-cli tools enabling rapid node deployment and network interaction."},"sidebar":"bee","previous":{"title":"Getting Started","permalink":"/docs/bee/installation/getting-started"},"next":{"title":"Shell Script Install","permalink":"/docs/bee/installation/shell-script-install"}}');var i=s(74848),o=s(28453);const a={title:"Quickstart",id:"quick-start",description:"Accelerates Bee setup with shell script installation and swarm-cli tools enabling rapid node deployment and network interaction."},d=void 0,r={},l=[{value:"Requirements",id:"requirements",level:2},{value:"Install Bee",id:"install-bee",level:2},{value:"Install Swarm-CLI",id:"install-swarm-cli",level:2},{value:"Start Your Bee Node",id:"start-your-bee-node",level:2},{value:"Get Your Node\u2019s Address",id:"get-your-nodes-address",level:2},{value:"Fund Your Node",id:"fund-your-node",level:2},{value:"Wait to Sync (~5 Minutes)",id:"wait-to-sync-5-minutes",level:2},{value:"Next Steps",id:"next-steps",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:["This guide will help you install and run a Bee ",(0,i.jsx)(n.a,{href:"/docs/bee/working-with-bee/node-types",children:"light node"})," using the ",(0,i.jsx)(n.a,{href:"/docs/bee/installation/shell-script-install",children:"shell script"})," install method. After explaining how to install and start the node, the guide then explains how to use the ",(0,i.jsxs)(n.a,{href:"/docs/bee/working-with-bee/swarm-cli",children:[(0,i.jsx)(n.code,{children:"swarm-cli"})," command line tool"]})," to find your node's address, fund your node, and fully initialize it so that it is ready interact with the network."]}),"\n",(0,i.jsx)(n.admonition,{type:"tip",children:(0,i.jsxs)(n.p,{children:['A "light" node can download and upload data from Swarm but does not share its disk space with the network and does not earn rewards. ',(0,i.jsx)(n.a,{href:"/docs/bee/working-with-bee/node-types",children:"Learn more"}),"."]})}),"\n",(0,i.jsx)(n.h2,{id:"requirements",children:"Requirements"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Linux or macOS"})," (The shell script installation method does ",(0,i.jsx)(n.strong,{children:"not"})," support Windows natively. Windows users can use ",(0,i.jsx)(n.a,{href:"https://learn.microsoft.com/en-us/windows/wsl/install",children:"WSL"}),".)"]}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://nodejs.org/",children:"Node.js (v18 or higher)"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://docs.npmjs.com/downloading-and-installing-node-js-and-npm",children:"npm (Node Package Manager)"})}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://curl.se/",children:(0,i.jsx)(n.code,{children:"curl"})})," or ",(0,i.jsx)(n.a,{href:"https://www.gnu.org/software/wget/",children:(0,i.jsx)(n.code,{children:"wget"})})," (Check with ",(0,i.jsx)(n.code,{children:"curl --version"})," or ",(0,i.jsx)(n.code,{children:"wget --version"}),")"]}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/docs/bee/installation/fund-your-node#how-to-get-xbzz",children:"~0.20 xBZZ on Gnosis Chain"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/docs/bee/installation/fund-your-node#how-to-get-xdai",children:"~0.01 xDAI on Gnosis Chain"})}),"\n"]}),"\n",(0,i.jsx)(n.admonition,{type:"info",children:(0,i.jsxs)(n.p,{children:["Although ",(0,i.jsx)(n.code,{children:"BZZ"})," is the official symbol of the token on both Ethereum and Gnosis Chain, the term ",(0,i.jsx)(n.code,{children:"xBZZ"})," is widely used by the Swarm community and in documentation to indicate that it is BZZ on Gnosis Chain (not Ethereum)."]})}),"\n",(0,i.jsx)(n.h2,{id:"install-bee",children:"Install Bee"}),"\n",(0,i.jsxs)(n.p,{children:["Run the shell script using ",(0,i.jsx)(n.code,{children:"curl"})," or ",(0,i.jsx)(n.code,{children:"wget"}),":"]}),"\n",(0,i.jsx)(n.admonition,{type:"tip",children:(0,i.jsxs)(n.p,{children:["We specify ",(0,i.jsx)(n.code,{children:"TAG=v2.8.1"})," to indicate which Bee version to install. You can find available versions in the ",(0,i.jsx)(n.a,{href:"https://github.com/ethersphere/bee/releases",children:'"releases" section'})," of the Bee GitHub repo."]})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -s https://raw.githubusercontent.com/ethersphere/bee/master/install.sh | TAG=v2.8.1 bash\n"})}),"\n",(0,i.jsx)(n.p,{children:"OR"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"wget -q -O - https://raw.githubusercontent.com/ethersphere/bee/master/install.sh | TAG=v2.8.1 bash\n"})}),"\n",(0,i.jsx)(n.p,{children:"Verify installation:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"bee version\n"})}),"\n",(0,i.jsx)(n.h2,{id:"install-swarm-cli",children:"Install Swarm-CLI"}),"\n",(0,i.jsxs)(n.p,{children:["Requires ",(0,i.jsx)(n.strong,{children:"Node.js 18+"}),". Install using ",(0,i.jsx)(n.strong,{children:"npm"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"npm install --global @ethersphere/swarm-cli\n"})}),"\n",(0,i.jsx)(n.p,{children:"Verify installation:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"swarm-cli --version\n"})}),"\n",(0,i.jsx)(n.h2,{id:"start-your-bee-node",children:"Start Your Bee Node"}),"\n",(0,i.jsx)(n.p,{children:"Start Bee with a secure password:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"bee start \\\n --password YOUR_SECURE_PASSWORD \\\n --verbosity 5 \\\n --swap-enable \\\n --api-addr 127.0.0.1:1633 \\\n --blockchain-rpc-endpoint https://xdai.fairdatasociety.org\n"})}),"\n",(0,i.jsx)(n.p,{children:"Example output:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'Welcome to Swarm.... Bzzz Bzzzz Bzzzz\n\n\n"Share the knowledge" - in memory of ldeffenb\n\n\n \\ /\n \\ o ^ o /\n \\ ( ) /\n ____________(%%%%%%%)____________\n ( / / )%%%%%%%( \\ \\ )\n (___/___/__/ \\__\\___\\___)\n ( / /(%%%%%%%)\\ \\ )\n (__/___/ (%%%%%%%) \\___\\__)\n /( )\\\n / (%%%%%) \\\n (%%%)\n !\n\nDISCLAIMER:\nThis software is provided to you "as is", use at your own risk and without warranties of any kind.\nIt is your responsibility to read and understand how Swarm works and the implications of running this software.\nThe usage of Bee involves various risks, including, but not limited to:\ndamage to hardware or loss of funds associated with the Ethereum account connected to your node.\nNo developers or entity involved will be liable for any claims and damages associated with your use,\ninability to use, or your interaction with other nodes or the software.\n\n"time"="2026-07-07 16:52:59.641444" "level"="info" "logger"="node" "msg"="bee version" "version"="2.8.1-7cf53193"\n"time"="2026-07-07 16:52:59.793257" "level"="info" "logger"="node" "msg"="swarm public key"\n"public_key"="02d8d7e1ca6b3b43653ae27e35a375dd74e3ce2f40587fd264bc7268ed918650ab"\n"time"="2026-07-07 16:53:00.087534" "level"="info" "logger"="node" "msg"="pss public key" "public_key"="02aaae4ede42f47f48aa5182df4b94039ca71254f44ebc5383d5a67f71fe7e6156"\n"time"="2025-03-04 11:13:10.268479" "level"="info" "logger"="node" "msg"="using ethereum address" "address"="0x003842B26B3dB292Cf84d5969E71c0d1e93F5578"\n"time"="2025-03-04 11:13:10.288418" "level"="info" "logger"="node" "msg"="using overlay address" "address"="fe38346dd89e4211c0e60195ee73e38d2c2ee2fe2b914b771d4ad503cfedbd3c"\n"time"="2025-03-04 11:13:10.288474" "level"="info" "logger"="node" "msg"="starting with an enabled chain backend"\n"time"="2025-03-04 11:13:10.987200" "level"="info" "logger"="node" "msg"="connected to blockchain backend" "version"="Nethermind/v1.30.3+87c86379/linux-x64/dotnet9.0.0"\n"time"="2025-03-04 11:13:11.196067" "level"="info" "logger"="node" "msg"="using chain with network network" "chain_id"=100 "network_id"=1\n"time"="2025-03-04 11:13:11.211976" "level"="info" "logger"="node" "msg"="starting debug & api server" "address"="127.0.0.1:1633"\n"time"="2025-03-04 11:13:11.623998" "level"="info" "logger"="node" "msg"="using default factory address" "chain_id"=100 "factory_address"="0xC2d5A532cf69AA9A1378737D8ccDEF884B6E7420"\n"time"="2025-03-04 11:13:11.675186" "level"="info" "logger"="node/chequebook" "msg"="no chequebook found, deploying new one."\n"time"="2025-03-04 11:13:11.723451" "level"="warning" "logger"="node/chequebook" "msg"="cannot continue until there is at least min xDAI (for Gas) available on address" "min_amount"="0.000250000002" "address"="0x003842B26B3dB292Cf84d5969E71c0d1e93F5578"\n'})}),"\n",(0,i.jsx)(n.p,{children:"\ud83c\udf89 Congratulations! You've just successfully installed and started your first Bee node \ud83d\udc1d!"}),"\n",(0,i.jsx)(n.h2,{id:"get-your-nodes-address",children:"Get Your Node\u2019s Address"}),"\n",(0,i.jsx)(n.p,{children:"The final line of the logs in the previous step lets us know that we need to fund our node to continue, and shows our node's Gnosis chain address. Copy the address and save it for the next step:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'"time"="2025-03-04 11:13:11.723451" "level"="warning" "logger"="node/chequebook" "msg"="cannot continue until there is at least min xDAI (for Gas) available on address" "min_amount"="0.000250000002" "address"="0x003842B26B3dB292Cf84d5969E71c0d1e93F5578"\n'})}),"\n",(0,i.jsxs)(n.p,{children:["You can also view your node's addresses any time using the ",(0,i.jsx)(n.code,{children:"swarm-cli addresses"})," command:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"swarm-cli addresses\n"})}),"\n",(0,i.jsx)(n.p,{children:"Example output:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"Node Addresses\n-----------------------------------------------------------------------------------------------------------------------------------\nEthereum: 0x003842b26b3db292cf84d5969e71c0d1e93f5578\nOverlay: fe38346dd89e4211c0e60195ee73e38d2c2ee2fe2b914b771d4ad503cfedbd3c\nPSS Public Key: 03a3166e04b749ab3d04fda8a41180598ff2eed01a8096fb72d2c7da393a47c46a\nPublic Key: 02b19880b8d024eac3bf8afa3fa85b31b72fcfd491cebc6af78ddd85ff97f65416\nUnderlay: /ip4/127.0.0.1/tcp/1634/p2p/QmPbXzjN9mzYnpxsMn6ftFvvUuf4VArcmR6oGtpf1mRgWt /ip4/172.25.128.69/tcp/1634/p2p/QmPbXzjN9mzYnpxsMn6ftFvvUuf4VArcmR6oGtpf1mRgWt /ip6/::1/tcp/1634/p2p/QmPbXzjN9mzYnpxsMn6ftFvvUuf4VArcmR6oGtpf1mRgWt\n"})}),"\n",(0,i.jsx)(n.h2,{id:"fund-your-node",children:"Fund Your Node"}),"\n",(0,i.jsxs)(n.p,{children:["Send ",(0,i.jsx)(n.strong,{children:"xDAI"})," (to pay for transaction fees on Gnosis Chain) and ",(0,i.jsx)(n.strong,{children:"xBZZ"})," (for uploads and staking) to your node\u2019s Ethereum address on ",(0,i.jsx)(n.strong,{children:"Gnosis Chain"}),"."]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"xDAI:"})," 0.01 xDAI is enough to start a light node"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"xBZZ:"})," 0.20 xBZZ is enough to upload a small amount of data"]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["Learn how to ",(0,i.jsx)(n.a,{href:"/docs/bee/installation/fund-your-node#getting-tokens",children:"get xDAI and xBZZ"})," if you need some."]}),"\n",(0,i.jsx)(n.admonition,{type:"tip",children:(0,i.jsx)(n.p,{children:"If you wait too long to fund your node it may shut itself down. In that case, simply use the same startup command to start the node again."})}),"\n",(0,i.jsx)(n.h2,{id:"wait-to-sync-5-minutes",children:"Wait to Sync (~5 Minutes)"}),"\n",(0,i.jsxs)(n.p,{children:["After starting and funding a Bee light node for the first time, the node will automatically issue a ",(0,i.jsx)(n.a,{href:"https://gnosisscan.io/tx/0xf8048c4e8020ccef842c9a901e6262e9c06d6f5926ff31bdb7dd9d7274dcf19c",children:"transaction"})," on Gnosis Chain to deploy the node's ",(0,i.jsx)(n.a,{href:"/docs/concepts/incentives/bandwidth-incentives#chequebook-contract",children:"chequebook contract"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["The node then needs to sync blockchain data before it can buy a postage stamp batch. The process may take ",(0,i.jsx)(n.strong,{children:"~5 minutes"})," depending on your RPC provider and network speed."]}),"\n",(0,i.jsxs)(n.p,{children:["You can check your node's syncing progress with the ",(0,i.jsx)(n.code,{children:"swarm-cli status"})," command:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"swarm-cli status\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"Bee\nAPI: http://localhost:1633 [OK]\nVersion: 2.8.1-7cf53193\nMode: light\n\nChainsync\nBlock: 39,566,742 / 41,710,807 (\u0394 2,144,065)\n\nTopology\nERROR Request failed with status code 503\n\nThere may be additional information in the Bee logs.\n"})}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"Chainsync"})," section tells us how many blocks our node has synced so far out of the total Gnosis Chain blocks (and the number after the \u0394 symbol shows how many blocks still need to be synced):"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"Chainsync\nBlock: 33,515,656 / 38,855,407 (\u0394 5,339,751)\n"})}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"Topology"})," section will show information about which other nodes your own node is connected with. It will display an ",(0,i.jsx)(n.code,{children:"ERROR"})," until the node is fully initialized."]}),"\n",(0,i.jsxs)(n.p,{children:["After several minutes, your node will be fully synced, and can now interact with the Swarm network - we can use ",(0,i.jsx)(n.code,{children:"swarm-cli status"})," again to confirm:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"swarm-cli status\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"Bee\nAPI: http://localhost:1633 [OK]\nVersion: 2.8.1-7cf53193\nMode: light\n\nChainsync\nBlock: 41,711,260 / 41,711,268 (\u0394 8)\n\nTopology\nConnected Peers: 156\nPopulation: 2693\nDepth: 10\n\nWallet\nxBZZ: 0.0000000000000000\nxDAI: 0.009787142484816165\n\nChequebook\nAvailable xBZZ: 0.0000000000000000\nTotal xBZZ: 0.0000000000000000\n"})}),"\n",(0,i.jsx)(n.h2,{id:"next-steps",children:"Next Steps"}),"\n",(0,i.jsxs)(n.p,{children:["With your node now fully synced, you're ready start start learning how to ",(0,i.jsx)(n.a,{href:"/docs/develop/introduction",children:"develop on Swarm"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},28453(e,n,s){s.d(n,{R:()=>a,x:()=>d});var t=s(96540);const i={},o=t.createContext(i);function a(e){const n=t.useContext(o);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d6644dbd.314d4c76.js b/assets/js/d6644dbd.314d4c76.js new file mode 100644 index 000000000..d92721db4 --- /dev/null +++ b/assets/js/d6644dbd.314d4c76.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[6673],{19514(s,e,t){t.r(e),t.d(e,{assets:()=>a,contentTitle:()=>r,default:()=>x,frontMatter:()=>l,metadata:()=>n,toc:()=>h});const n=JSON.parse('{"id":"concepts/incentives/postage-stamps","title":"Postage Stamps","description":"Details prepaid batch system for uploading data to Swarm with dynamic pricing based on network redundancy signals.","source":"@site/docs/concepts/incentives/postage-stamps.md","sourceDirName":"concepts/incentives","slug":"/concepts/incentives/postage-stamps","permalink":"/docs/concepts/incentives/postage-stamps","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/concepts/incentives/postage-stamps.md","tags":[],"version":"current","frontMatter":{"title":"Postage Stamps","id":"postage-stamps","description":"Details prepaid batch system for uploading data to Swarm with dynamic pricing based on network redundancy signals."},"sidebar":"concepts","previous":{"title":"Redistribution Game","permalink":"/docs/concepts/incentives/redistribution-game"},"next":{"title":"Bandwidth Incentives (SWAP)","permalink":"/docs/concepts/incentives/bandwidth-incentives"}}');var i=t(74848),d=t(28453);const l={title:"Postage Stamps",id:"postage-stamps",description:"Details prepaid batch system for uploading data to Swarm with dynamic pricing based on network redundancy signals."},r=void 0,a={},h=[{value:"Batch Buckets",id:"batch-buckets",level:2},{value:"Bucket Size",id:"bucket-size",level:3},{value:"Batch Depth and Batch Amount",id:"batch-depth-and-batch-amount",level:2},{value:"Batch Depth",id:"batch-depth",level:3},{value:"Batch Amount (& Batch Cost)",id:"batch-amount--batch-cost",level:3},{value:"Calculating <em>amount</em> needed for desired TTL",id:"calculating-amount-needed-for-desired-ttl",level:3},{value:"Batch Utilisation",id:"batch-utilisation",level:2},{value:"Immutable Batches",id:"immutable-batches",level:3},{value:"Mutable Batches",id:"mutable-batches",level:3},{value:"Which Type of Batch to Use",id:"which-type-of-batch-to-use",level:3},{value:"Re-uploading",id:"re-uploading",level:3},{value:"Single chunks",id:"single-chunks",level:4},{value:"Files",id:"files",level:4},{value:"Affect on Batch Utilisation",id:"affect-on-batch-utilisation",level:4},{value:"Implications for Swarm Users",id:"implications-for-swarm-users",level:3},{value:"Effective Utilisation Tables",id:"effective-utilisation-tables",level:2},{value:"Unencrypted - NONE",id:"unencrypted---none",level:3},{value:"Unencrypted - MEDIUM",id:"unencrypted---medium",level:3},{value:"Unencrypted - STRONG",id:"unencrypted---strong",level:3},{value:"Unencrypted - INSANE",id:"unencrypted---insane",level:3},{value:"Unencrypted - PARANOID",id:"unencrypted---paranoid",level:3},{value:"Encrypted - NONE",id:"encrypted---none",level:3},{value:"Encrypted - MEDIUM",id:"encrypted---medium",level:3},{value:"Encrypted - STRONG",id:"encrypted---strong",level:3},{value:"Encrypted - INSANE",id:"encrypted---insane",level:3},{value:"Encrypted - PARANOID",id:"encrypted---paranoid",level:3}];function c(s){const e={a:"a",admonition:"admonition",annotation:"annotation",blockquote:"blockquote",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",math:"math",mi:"mi",mn:"mn",mo:"mo",mrow:"mrow",msup:"msup",mtext:"mtext",ol:"ol",p:"p",semantics:"semantics",span:"span",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,d.R)(),...s.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(e.p,{children:"Postage stamps are used to pay for storing data on Swarm. They are purchased in batches, granting a prepaid right to store data on Swarm, similar to how real-world postage stamps pay for mail delivery."}),"\n",(0,i.jsxs)(e.p,{children:["When a node uploads data to Swarm, it 'attaches' postage stamps to each ",(0,i.jsx)(e.a,{href:"/docs/concepts/DISC/",children:"chunk"})," of data. The value assigned to a stamp indicates how much it is worth to persist the associated data on Swarm, which nodes use to prioritize which chunks to remove from their reserve first."]}),"\n",(0,i.jsx)(e.p,{children:"The value of a postage stamp decreases over time as if storage rent was regularly deducted from the batch balance. A stamp expires when its batch runs out of balance. Chunks with expired stamps cannot be used as proof in the redistribution game, meaning storer nodes will no longer receive rewards for storing them and can safely remove them from their reserves."}),"\n",(0,i.jsx)(e.p,{children:"Postage stamp prices are dynamically set based on a utilization signal supplied by the price oracle smart contract. Prices will automatically increase or decrease according to the level of utilization."}),"\n",(0,i.jsx)(e.h2,{id:"batch-buckets",children:"Batch Buckets"}),"\n",(0,i.jsxs)(e.p,{children:["Postage stamps are issued in batches with a certain number of storage slots partitioned into ",(0,i.jsxs)(e.span,{className:"katex",children:[(0,i.jsx)(e.span,{className:"katex-mathml",children:(0,i.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,i.jsxs)(e.semantics,{children:[(0,i.jsx)(e.mrow,{children:(0,i.jsxs)(e.msup,{children:[(0,i.jsx)(e.mn,{children:"2"}),(0,i.jsxs)(e.mrow,{children:[(0,i.jsx)(e.mi,{children:"b"}),(0,i.jsx)(e.mi,{children:"u"}),(0,i.jsx)(e.mi,{children:"c"}),(0,i.jsx)(e.mi,{children:"k"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"D"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"p"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"h"})]})]})}),(0,i.jsx)(e.annotation,{encoding:"application/x-tex",children:"2^{bucketDepth}"})]})})}),(0,i.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.8491em"}}),(0,i.jsxs)(e.span,{className:"mord",children:[(0,i.jsx)(e.span,{className:"mord",children:"2"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsx)(e.span,{className:"vlist-t",children:(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.8491em"},children:(0,i.jsxs)(e.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,i.jsxs)(e.span,{className:"mord mtight",children:[(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"b"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"u"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"c"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",style:{marginRight:"0.0315em"},children:"k"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"t"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",style:{marginRight:"0.0278em"},children:"D"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"pt"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"h"})]})})]})})})})})]})]})})]})," equally sized address space buckets (bucket depth has a fixed value of 16). Each bucket is responsible for storing chunks that fall within a certain range of the address space. When uploaded, files are split into 4kb chunks, each chunk is assigned a unique address, and each chunk is then assigned to the bucket in which its address falls."]}),"\n",(0,i.jsx)(e.h3,{id:"bucket-size",children:"Bucket Size"}),"\n",(0,i.jsx)(e.p,{children:"Bucket depth determines how the address space is partitioned, with each bucket storing chunks that share a common address prefix. Each bucket contains a fixed number of slots, each capable of storing a stamped chunk. Once all slots in any single bucket are filled, the entire postage batch becomes fully utilized, preventing further uploads."}),"\n",(0,i.jsxs)(e.p,{children:["Together with ",(0,i.jsx)(e.code,{children:"batch depth"}),", ",(0,i.jsx)(e.code,{children:"bucket depth"})," determines how many chunks are allowed in each bucket. The number of chunks allowed in each bucket is calculated like so:"]}),"\n",(0,i.jsx)(e.span,{className:"katex-display",children:(0,i.jsxs)(e.span,{className:"katex",children:[(0,i.jsx)(e.span,{className:"katex-mathml",children:(0,i.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block",children:(0,i.jsxs)(e.semantics,{children:[(0,i.jsx)(e.mrow,{children:(0,i.jsxs)(e.msup,{children:[(0,i.jsx)(e.mn,{children:"2"}),(0,i.jsxs)(e.mrow,{children:[(0,i.jsx)(e.mo,{stretchy:"false",children:"("}),(0,i.jsx)(e.mi,{children:"b"}),(0,i.jsx)(e.mi,{children:"a"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"c"}),(0,i.jsx)(e.mi,{children:"h"}),(0,i.jsx)(e.mi,{children:"D"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"p"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"h"}),(0,i.jsx)(e.mo,{children:"\u2212"}),(0,i.jsx)(e.mi,{children:"b"}),(0,i.jsx)(e.mi,{children:"u"}),(0,i.jsx)(e.mi,{children:"c"}),(0,i.jsx)(e.mi,{children:"k"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"D"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"p"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"h"}),(0,i.jsx)(e.mo,{stretchy:"false",children:")"})]})]})}),(0,i.jsx)(e.annotation,{encoding:"application/x-tex",children:"2^{(batchDepth - bucketDepth)}"})]})})}),(0,i.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.938em"}}),(0,i.jsxs)(e.span,{className:"mord",children:[(0,i.jsx)(e.span,{className:"mord",children:"2"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsx)(e.span,{className:"vlist-t",children:(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.938em"},children:(0,i.jsxs)(e.span,{style:{top:"-3.113em",marginRight:"0.05em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,i.jsxs)(e.span,{className:"mord mtight",children:[(0,i.jsx)(e.span,{className:"mopen mtight",children:"("}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"ba"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"t"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"c"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"h"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",style:{marginRight:"0.0278em"},children:"D"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"pt"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"h"}),(0,i.jsx)(e.span,{className:"mbin mtight",children:"\u2212"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"b"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"u"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"c"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",style:{marginRight:"0.0315em"},children:"k"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"t"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",style:{marginRight:"0.0278em"},children:"D"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"pt"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"h"}),(0,i.jsx)(e.span,{className:"mclose mtight",children:")"})]})})]})})})})})]})]})})]})}),"\n",(0,i.jsx)(e.p,{children:"So with a batch depth of 24 and a bucket depth of 16:"}),"\n",(0,i.jsx)(e.span,{className:"katex-display",children:(0,i.jsxs)(e.span,{className:"katex",children:[(0,i.jsx)(e.span,{className:"katex-mathml",children:(0,i.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block",children:(0,i.jsxs)(e.semantics,{children:[(0,i.jsxs)(e.mrow,{children:[(0,i.jsxs)(e.msup,{children:[(0,i.jsx)(e.mn,{children:"2"}),(0,i.jsxs)(e.mrow,{children:[(0,i.jsx)(e.mo,{stretchy:"false",children:"("}),(0,i.jsx)(e.mn,{children:"24"}),(0,i.jsx)(e.mo,{children:"\u2212"}),(0,i.jsx)(e.mn,{children:"16"}),(0,i.jsx)(e.mo,{stretchy:"false",children:")"})]})]}),(0,i.jsx)(e.mo,{children:"="}),(0,i.jsxs)(e.msup,{children:[(0,i.jsx)(e.mn,{children:"2"}),(0,i.jsx)(e.mn,{children:"8"})]}),(0,i.jsx)(e.mo,{children:"="}),(0,i.jsx)(e.mn,{children:"256"}),(0,i.jsx)(e.mtext,{children:"\xa0chunks/bucket"})]}),(0,i.jsx)(e.annotation,{encoding:"application/x-tex",children:"2^{(24 - 16)} = 2^{8} = 256 \\text{ chunks/bucket}"})]})})}),(0,i.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.938em"}}),(0,i.jsxs)(e.span,{className:"mord",children:[(0,i.jsx)(e.span,{className:"mord",children:"2"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsx)(e.span,{className:"vlist-t",children:(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.938em"},children:(0,i.jsxs)(e.span,{style:{top:"-3.113em",marginRight:"0.05em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,i.jsxs)(e.span,{className:"mord mtight",children:[(0,i.jsx)(e.span,{className:"mopen mtight",children:"("}),(0,i.jsx)(e.span,{className:"mord mtight",children:"24"}),(0,i.jsx)(e.span,{className:"mbin mtight",children:"\u2212"}),(0,i.jsx)(e.span,{className:"mord mtight",children:"16"}),(0,i.jsx)(e.span,{className:"mclose mtight",children:")"})]})})]})})})})})]}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,i.jsx)(e.span,{className:"mrel",children:"="}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.8641em"}}),(0,i.jsxs)(e.span,{className:"mord",children:[(0,i.jsx)(e.span,{className:"mord",children:"2"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsx)(e.span,{className:"vlist-t",children:(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.8641em"},children:(0,i.jsxs)(e.span,{style:{top:"-3.113em",marginRight:"0.05em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,i.jsx)(e.span,{className:"mord mtight",children:(0,i.jsx)(e.span,{className:"mord mtight",children:"8"})})})]})})})})})]}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,i.jsx)(e.span,{className:"mrel",children:"="}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"1em",verticalAlign:"-0.25em"}}),(0,i.jsx)(e.span,{className:"mord",children:"256"}),(0,i.jsx)(e.span,{className:"mord text",children:(0,i.jsx)(e.span,{className:"mord",children:"\xa0chunks/bucket"})})]})]})]})}),"\n",(0,i.jsx)(e.admonition,{type:"info",children:(0,i.jsxs)(e.p,{children:["Note that due how buckets fill as described above, a batch can become fully utilised before its theoretical maximum volume has been reached. See ",(0,i.jsx)(e.a,{href:"/docs/concepts/incentives/postage-stamps#batch-utilisation",children:"batch utilisation section below"})," for more information."]})}),"\n",(0,i.jsx)(e.h2,{id:"batch-depth-and-batch-amount",children:"Batch Depth and Batch Amount"}),"\n",(0,i.jsxs)(e.p,{children:["Each batch of stamps has two key parameters, ",(0,i.jsx)(e.code,{children:"batch depth"})," and ",(0,i.jsx)(e.code,{children:"amount"}),', which are recorded on Gnosis Chain at issuance. Note that these "depths" do not refer to the depth terms used to describe topology which are outlined ',(0,i.jsx)(e.a,{href:"/docs/references/glossary#depth-types",children:"here in the glossary"}),"."]}),"\n",(0,i.jsx)(e.h3,{id:"batch-depth",children:"Batch Depth"}),"\n",(0,i.jsx)(e.admonition,{type:"caution",children:(0,i.jsxs)(e.p,{children:["The minimum value for ",(0,i.jsx)(e.code,{children:"depth"})," is 17, however higher depths are recommended for most use cases due to the ",(0,i.jsx)(e.a,{href:"#batch-utilisation",children:"mechanics of stamp batch utilisation"}),". See ",(0,i.jsx)(e.a,{href:"#effective-utilisation-tables",children:"the depths utilisation table"})," to help decide which depth is best for your use case."]})}),"\n",(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.code,{children:"Batch depth"})," determines how much data can be stored by a batch. The number of chunks which can be stored (stamped) by a batch is equal to ",(0,i.jsxs)(e.span,{className:"katex",children:[(0,i.jsx)(e.span,{className:"katex-mathml",children:(0,i.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,i.jsxs)(e.semantics,{children:[(0,i.jsx)(e.mrow,{children:(0,i.jsxs)(e.msup,{children:[(0,i.jsx)(e.mn,{children:"2"}),(0,i.jsxs)(e.mrow,{children:[(0,i.jsx)(e.mi,{children:"b"}),(0,i.jsx)(e.mi,{children:"a"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"c"}),(0,i.jsx)(e.mi,{children:"h"}),(0,i.jsx)(e.mi,{children:"D"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"p"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"h"})]})]})}),(0,i.jsx)(e.annotation,{encoding:"application/x-tex",children:"2^{batchDepth}"})]})})}),(0,i.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.8491em"}}),(0,i.jsxs)(e.span,{className:"mord",children:[(0,i.jsx)(e.span,{className:"mord",children:"2"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsx)(e.span,{className:"vlist-t",children:(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.8491em"},children:(0,i.jsxs)(e.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,i.jsxs)(e.span,{className:"mord mtight",children:[(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"ba"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"t"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"c"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"h"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",style:{marginRight:"0.0278em"},children:"D"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"pt"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"h"})]})})]})})})})})]})]})})]}),"."]}),"\n",(0,i.jsxs)(e.p,{children:["For a batch with a ",(0,i.jsx)(e.code,{children:"batch depth"})," of 24, a maximum of ",(0,i.jsxs)(e.span,{className:"katex",children:[(0,i.jsx)(e.span,{className:"katex-mathml",children:(0,i.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,i.jsxs)(e.semantics,{children:[(0,i.jsxs)(e.mrow,{children:[(0,i.jsxs)(e.msup,{children:[(0,i.jsx)(e.mn,{children:"2"}),(0,i.jsx)(e.mn,{children:"24"})]}),(0,i.jsx)(e.mo,{children:"="}),(0,i.jsx)(e.mn,{children:"16"}),(0,i.jsx)(e.mo,{separator:"true",children:","}),(0,i.jsx)(e.mn,{children:"777"}),(0,i.jsx)(e.mo,{separator:"true",children:","}),(0,i.jsx)(e.mn,{children:"216"})]}),(0,i.jsx)(e.annotation,{encoding:"application/x-tex",children:"2^{24} = 16,777,216"})]})})}),(0,i.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.8141em"}}),(0,i.jsxs)(e.span,{className:"mord",children:[(0,i.jsx)(e.span,{className:"mord",children:"2"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsx)(e.span,{className:"vlist-t",children:(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.8141em"},children:(0,i.jsxs)(e.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,i.jsx)(e.span,{className:"mord mtight",children:(0,i.jsx)(e.span,{className:"mord mtight",children:"24"})})})]})})})})})]}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,i.jsx)(e.span,{className:"mrel",children:"="}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.8389em",verticalAlign:"-0.1944em"}}),(0,i.jsx)(e.span,{className:"mord",children:"16"}),(0,i.jsx)(e.span,{className:"mpunct",children:","}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.1667em"}}),(0,i.jsx)(e.span,{className:"mord",children:"777"}),(0,i.jsx)(e.span,{className:"mpunct",children:","}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.1667em"}}),(0,i.jsx)(e.span,{className:"mord",children:"216"})]})]})]})," chunks can be stamped."]}),"\n",(0,i.jsxs)(e.p,{children:["Since we know that one chunk can store 4 kb of data, we can calculate the theoretical maximum amount of data which can be stored by a batch from the ",(0,i.jsx)(e.code,{children:"batch depth"}),"."]}),"\n",(0,i.jsx)(e.span,{className:"katex-display",children:(0,i.jsxs)(e.span,{className:"katex",children:[(0,i.jsx)(e.span,{className:"katex-mathml",children:(0,i.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block",children:(0,i.jsxs)(e.semantics,{children:[(0,i.jsxs)(e.mrow,{children:[(0,i.jsx)(e.mtext,{children:"Theoretical\xa0maximum\xa0batch\xa0volume"}),(0,i.jsx)(e.mo,{children:"="}),(0,i.jsxs)(e.msup,{children:[(0,i.jsx)(e.mn,{children:"2"}),(0,i.jsxs)(e.mrow,{children:[(0,i.jsx)(e.mi,{children:"b"}),(0,i.jsx)(e.mi,{children:"a"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"c"}),(0,i.jsx)(e.mi,{children:"h"}),(0,i.jsx)(e.mi,{children:"D"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"p"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"h"})]})]}),(0,i.jsx)(e.mo,{children:"\xd7"}),(0,i.jsx)(e.mtext,{children:"4\xa0kb"})]}),(0,i.jsx)(e.annotation,{encoding:"application/x-tex",children:"\\text{Theoretical maximum batch volume} = 2^{batchDepth} \\times \\text{4 kb} "})]})})}),(0,i.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.6944em"}}),(0,i.jsx)(e.span,{className:"mord text",children:(0,i.jsx)(e.span,{className:"mord",children:"Theoretical\xa0maximum\xa0batch\xa0volume"})}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,i.jsx)(e.span,{className:"mrel",children:"="}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.9824em",verticalAlign:"-0.0833em"}}),(0,i.jsxs)(e.span,{className:"mord",children:[(0,i.jsx)(e.span,{className:"mord",children:"2"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsx)(e.span,{className:"vlist-t",children:(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.8991em"},children:(0,i.jsxs)(e.span,{style:{top:"-3.113em",marginRight:"0.05em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,i.jsxs)(e.span,{className:"mord mtight",children:[(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"ba"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"t"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"c"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"h"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",style:{marginRight:"0.0278em"},children:"D"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"pt"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"h"})]})})]})})})})})]}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,i.jsx)(e.span,{className:"mbin",children:"\xd7"}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.6944em"}}),(0,i.jsx)(e.span,{className:"mord text",children:(0,i.jsx)(e.span,{className:"mord",children:"4\xa0kb"})})]})]})]})}),"\n",(0,i.jsxs)(e.p,{children:["However, due to the way postage stamp batches are utilised, batches will become fully utilised before stamping the theoretical maximum number of chunks. Therefore when deciding which batch depth to use, it is important to consider the effective amount of data that can be stored by a batch, and not the theoretical maximum. The effective rate of utilisation increases along with the batch depth. See ",(0,i.jsx)(e.a,{href:"/docs/concepts/incentives/postage-stamps#batch-utilisation",children:"section on stamp batch utilisation below"})," for more information."]}),"\n",(0,i.jsx)(e.h3,{id:"batch-amount--batch-cost",children:"Batch Amount (& Batch Cost)"}),"\n",(0,i.jsxs)(e.p,{children:["The ",(0,i.jsx)(e.code,{children:"amount"})," parameter is the quantity of xBZZ in PLUR ",(0,i.jsxs)(e.span,{className:"katex",children:[(0,i.jsx)(e.span,{className:"katex-mathml",children:(0,i.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,i.jsxs)(e.semantics,{children:[(0,i.jsxs)(e.mrow,{children:[(0,i.jsx)(e.mo,{stretchy:"false",children:"("}),(0,i.jsx)(e.mn,{children:"1"}),(0,i.jsx)(e.mo,{children:"\xd7"}),(0,i.jsxs)(e.msup,{children:[(0,i.jsx)(e.mn,{children:"10"}),(0,i.jsx)(e.mn,{children:"16"})]}),(0,i.jsx)(e.mi,{children:"P"}),(0,i.jsx)(e.mi,{children:"L"}),(0,i.jsx)(e.mi,{children:"U"}),(0,i.jsx)(e.mi,{children:"R"}),(0,i.jsx)(e.mo,{children:"="}),(0,i.jsx)(e.mn,{children:"1"}),(0,i.jsx)(e.mtext,{children:"\xa0xBZZ"}),(0,i.jsx)(e.mo,{stretchy:"false",children:")"})]}),(0,i.jsx)(e.annotation,{encoding:"application/x-tex",children:"(1 \\times 10^{16}PLUR = 1 \\text{ xBZZ})"})]})})}),(0,i.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"1em",verticalAlign:"-0.25em"}}),(0,i.jsx)(e.span,{className:"mopen",children:"("}),(0,i.jsx)(e.span,{className:"mord",children:"1"}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,i.jsx)(e.span,{className:"mbin",children:"\xd7"}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.8141em"}}),(0,i.jsx)(e.span,{className:"mord",children:"1"}),(0,i.jsxs)(e.span,{className:"mord",children:[(0,i.jsx)(e.span,{className:"mord",children:"0"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsx)(e.span,{className:"vlist-t",children:(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.8141em"},children:(0,i.jsxs)(e.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,i.jsx)(e.span,{className:"mord mtight",children:(0,i.jsx)(e.span,{className:"mord mtight",children:"16"})})})]})})})})})]}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.1389em"},children:"P"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.109em"},children:"LU"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.0077em"},children:"R"}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,i.jsx)(e.span,{className:"mrel",children:"="}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"1em",verticalAlign:"-0.25em"}}),(0,i.jsx)(e.span,{className:"mord",children:"1"}),(0,i.jsx)(e.span,{className:"mord text",children:(0,i.jsx)(e.span,{className:"mord",children:"\xa0xBZZ"})}),(0,i.jsx)(e.span,{className:"mclose",children:")"})]})]})]})," that is assigned per chunk in the batch. The total number of xBZZ that will be paid for the batch is calculated from this figure and the ",(0,i.jsx)(e.code,{children:"batch depth"})," like so:"]}),"\n",(0,i.jsx)(e.p,{children:(0,i.jsxs)(e.span,{className:"katex",children:[(0,i.jsx)(e.span,{className:"katex-mathml",children:(0,i.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,i.jsxs)(e.semantics,{children:[(0,i.jsxs)(e.mrow,{children:[(0,i.jsxs)(e.msup,{children:[(0,i.jsx)(e.mn,{children:"2"}),(0,i.jsxs)(e.mrow,{children:[(0,i.jsx)(e.mi,{children:"b"}),(0,i.jsx)(e.mi,{children:"a"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"c"}),(0,i.jsx)(e.mi,{children:"h"}),(0,i.jsx)(e.mi,{children:"D"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"p"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"h"})]})]}),(0,i.jsx)(e.mo,{children:"\xd7"}),(0,i.jsxs)(e.mrow,{children:[(0,i.jsx)(e.mi,{children:"a"}),(0,i.jsx)(e.mi,{children:"m"}),(0,i.jsx)(e.mi,{children:"o"}),(0,i.jsx)(e.mi,{children:"u"}),(0,i.jsx)(e.mi,{children:"n"}),(0,i.jsx)(e.mi,{children:"t"})]})]}),(0,i.jsx)(e.annotation,{encoding:"application/x-tex",children:"2^{batchDepth} \\times {amount}"})]})})}),(0,i.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.9324em",verticalAlign:"-0.0833em"}}),(0,i.jsxs)(e.span,{className:"mord",children:[(0,i.jsx)(e.span,{className:"mord",children:"2"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsx)(e.span,{className:"vlist-t",children:(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.8491em"},children:(0,i.jsxs)(e.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,i.jsxs)(e.span,{className:"mord mtight",children:[(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"ba"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"t"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"c"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"h"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",style:{marginRight:"0.0278em"},children:"D"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"pt"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"h"})]})})]})})})})})]}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,i.jsx)(e.span,{className:"mbin",children:"\xd7"}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.6151em"}}),(0,i.jsxs)(e.span,{className:"mord",children:[(0,i.jsx)(e.span,{className:"mord mathnormal",children:"am"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"o"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"u"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"n"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"})]})]})]})]})}),"\n",(0,i.jsxs)(e.p,{children:["The paid xBZZ forms the ",(0,i.jsx)(e.code,{children:"balance"})," of the batch. This ",(0,i.jsx)(e.code,{children:"balance"})," is then slowly depleted as time ticks on and blocks are mined on Gnosis Chain."]}),"\n",(0,i.jsxs)(e.p,{children:["For example, with a ",(0,i.jsx)(e.code,{children:"batch depth"})," of 24 and an ",(0,i.jsx)(e.code,{children:"amount"})," of 1000000000 PLUR:"]}),"\n",(0,i.jsx)(e.span,{className:"katex-display",children:(0,i.jsxs)(e.span,{className:"katex",children:[(0,i.jsx)(e.span,{className:"katex-mathml",children:(0,i.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block",children:(0,i.jsxs)(e.semantics,{children:[(0,i.jsxs)(e.mrow,{children:[(0,i.jsxs)(e.msup,{children:[(0,i.jsx)(e.mn,{children:"2"}),(0,i.jsx)(e.mn,{children:"24"})]}),(0,i.jsx)(e.mo,{children:"\xd7"}),(0,i.jsx)(e.mn,{children:"1000000000"}),(0,i.jsx)(e.mo,{children:"="}),(0,i.jsx)(e.mn,{children:"16777216000000000"}),(0,i.jsx)(e.mtext,{children:"\xa0PLUR"}),(0,i.jsx)(e.mo,{children:"="}),(0,i.jsx)(e.mn,{children:"1.6777216"}),(0,i.jsx)(e.mtext,{children:"\xa0xBZZ"})]}),(0,i.jsx)(e.annotation,{encoding:"application/x-tex",children:"2^{24} \\times 1000000000 = 16777216000000000 \\text{ PLUR} = 1.6777216 \\text{ xBZZ}"})]})})}),(0,i.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.9474em",verticalAlign:"-0.0833em"}}),(0,i.jsxs)(e.span,{className:"mord",children:[(0,i.jsx)(e.span,{className:"mord",children:"2"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsx)(e.span,{className:"vlist-t",children:(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.8641em"},children:(0,i.jsxs)(e.span,{style:{top:"-3.113em",marginRight:"0.05em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,i.jsx)(e.span,{className:"mord mtight",children:(0,i.jsx)(e.span,{className:"mord mtight",children:"24"})})})]})})})})})]}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,i.jsx)(e.span,{className:"mbin",children:"\xd7"}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.6444em"}}),(0,i.jsx)(e.span,{className:"mord",children:"1000000000"}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,i.jsx)(e.span,{className:"mrel",children:"="}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.6833em"}}),(0,i.jsx)(e.span,{className:"mord",children:"16777216000000000"}),(0,i.jsx)(e.span,{className:"mord text",children:(0,i.jsx)(e.span,{className:"mord",children:"\xa0PLUR"})}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,i.jsx)(e.span,{className:"mrel",children:"="}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.6833em"}}),(0,i.jsx)(e.span,{className:"mord",children:"1.6777216"}),(0,i.jsx)(e.span,{className:"mord text",children:(0,i.jsx)(e.span,{className:"mord",children:"\xa0xBZZ"})})]})]})]})}),"\n",(0,i.jsxs)(e.h3,{id:"calculating-amount-needed-for-desired-ttl",children:["Calculating ",(0,i.jsx)(e.em,{children:"amount"})," needed for desired TTL"]}),"\n",(0,i.jsxs)(e.p,{children:["To calculate the required ",(0,i.jsx)(e.code,{children:"amount"}),", divide the current postage price by the Gnosis block time (5 sec) and multiply by the desired storage duration in seconds. For the example below we assume a stamp price of 24000 PLUR / chunk / block:"]}),"\n",(0,i.jsx)(e.admonition,{type:"info",children:(0,i.jsxs)(e.p,{children:["The postage stamp price is dynamically determined according to a network utilisation signal. You can view the current storage price at ",(0,i.jsx)(e.a,{href:"https://swarmscan.io/",children:"Swarmscan.io"}),"."]})}),"\n",(0,i.jsx)(e.span,{className:"katex-display",children:(0,i.jsxs)(e.span,{className:"katex",children:[(0,i.jsx)(e.span,{className:"katex-mathml",children:(0,i.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block",children:(0,i.jsxs)(e.semantics,{children:[(0,i.jsxs)(e.mrow,{children:[(0,i.jsx)(e.mo,{stretchy:"false",children:"("}),(0,i.jsx)(e.mtext,{children:"stamp\xa0price"}),(0,i.jsx)(e.mo,{children:"\xf7"}),(0,i.jsx)(e.mtext,{children:"block\xa0time\xa0in\xa0seconds"}),(0,i.jsx)(e.mo,{stretchy:"false",children:")"}),(0,i.jsx)(e.mo,{children:"\xd7"}),(0,i.jsx)(e.mtext,{children:"storage\xa0time\xa0in\xa0seconds"})]}),(0,i.jsx)(e.annotation,{encoding:"application/x-tex",children:"(\\text{stamp price} \\div \\text{block time in seconds}) \\times \\text{storage time in seconds}"})]})})}),(0,i.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"1em",verticalAlign:"-0.25em"}}),(0,i.jsx)(e.span,{className:"mopen",children:"("}),(0,i.jsx)(e.span,{className:"mord text",children:(0,i.jsx)(e.span,{className:"mord",children:"stamp\xa0price"})}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,i.jsx)(e.span,{className:"mbin",children:"\xf7"}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"1em",verticalAlign:"-0.25em"}}),(0,i.jsx)(e.span,{className:"mord text",children:(0,i.jsx)(e.span,{className:"mord",children:"block\xa0time\xa0in\xa0seconds"})}),(0,i.jsx)(e.span,{className:"mclose",children:")"}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,i.jsx)(e.span,{className:"mbin",children:"\xd7"}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.8889em",verticalAlign:"-0.1944em"}}),(0,i.jsx)(e.span,{className:"mord text",children:(0,i.jsx)(e.span,{className:"mord",children:"storage\xa0time\xa0in\xa0seconds"})})]})]})]})}),"\n",(0,i.jsxs)(e.p,{children:["There are 1036800 seconds in 12 days, so the ",(0,i.jsx)(e.code,{children:"amount"})," value required to store for 12 days can be calculated:"]}),"\n",(0,i.jsx)(e.span,{className:"katex-display",children:(0,i.jsxs)(e.span,{className:"katex",children:[(0,i.jsx)(e.span,{className:"katex-mathml",children:(0,i.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block",children:(0,i.jsxs)(e.semantics,{children:[(0,i.jsxs)(e.mrow,{children:[(0,i.jsx)(e.mo,{stretchy:"false",children:"("}),(0,i.jsx)(e.mtext,{children:"24000"}),(0,i.jsx)(e.mo,{children:"\xf7"}),(0,i.jsx)(e.mtext,{children:"5"}),(0,i.jsx)(e.mo,{stretchy:"false",children:")"}),(0,i.jsx)(e.mo,{children:"\xd7"}),(0,i.jsx)(e.mtext,{children:"1036800"}),(0,i.jsx)(e.mo,{children:"="}),(0,i.jsx)(e.mn,{children:"4976640000"})]}),(0,i.jsx)(e.annotation,{encoding:"application/x-tex",children:"(\\text{24000} \\div \\text{5}) \\times \\text{1036800} = 4976640000"})]})})}),(0,i.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"1em",verticalAlign:"-0.25em"}}),(0,i.jsx)(e.span,{className:"mopen",children:"("}),(0,i.jsx)(e.span,{className:"mord text",children:(0,i.jsx)(e.span,{className:"mord",children:"24000"})}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,i.jsx)(e.span,{className:"mbin",children:"\xf7"}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"1em",verticalAlign:"-0.25em"}}),(0,i.jsx)(e.span,{className:"mord text",children:(0,i.jsx)(e.span,{className:"mord",children:"5"})}),(0,i.jsx)(e.span,{className:"mclose",children:")"}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,i.jsx)(e.span,{className:"mbin",children:"\xd7"}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.6444em"}}),(0,i.jsx)(e.span,{className:"mord text",children:(0,i.jsx)(e.span,{className:"mord",children:"1036800"})}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,i.jsx)(e.span,{className:"mrel",children:"="}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.6444em"}}),(0,i.jsx)(e.span,{className:"mord",children:"4976640000"})]})]})]})}),"\n",(0,i.jsxs)(e.p,{children:["So we can use 4976640000 as our ",(0,i.jsx)(e.code,{children:"amount"})," value in order for our postage batch to store data for 12 days."]}),"\n",(0,i.jsx)(e.h2,{id:"batch-utilisation",children:"Batch Utilisation"}),"\n",(0,i.jsx)(e.p,{children:"There are two types of postage stamp batches: immutable and mutable. Immutable batches permanently store data, while mutable batches allow overwriting older data as new chunks are added."}),"\n",(0,i.jsx)(e.h3,{id:"immutable-batches",children:"Immutable Batches"}),"\n",(0,i.jsxs)(e.p,{children:["Utilisation of an immutable batch is computed using a hash map of size ",(0,i.jsxs)(e.span,{className:"katex",children:[(0,i.jsx)(e.span,{className:"katex-mathml",children:(0,i.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,i.jsxs)(e.semantics,{children:[(0,i.jsx)(e.mrow,{children:(0,i.jsxs)(e.msup,{children:[(0,i.jsx)(e.mn,{children:"2"}),(0,i.jsxs)(e.mrow,{children:[(0,i.jsx)(e.mi,{children:"b"}),(0,i.jsx)(e.mi,{children:"u"}),(0,i.jsx)(e.mi,{children:"c"}),(0,i.jsx)(e.mi,{children:"k"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"D"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"p"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"h"})]})]})}),(0,i.jsx)(e.annotation,{encoding:"application/x-tex",children:"2^{bucketDepth}"})]})})}),(0,i.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.8491em"}}),(0,i.jsxs)(e.span,{className:"mord",children:[(0,i.jsx)(e.span,{className:"mord",children:"2"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsx)(e.span,{className:"vlist-t",children:(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.8491em"},children:(0,i.jsxs)(e.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,i.jsxs)(e.span,{className:"mord mtight",children:[(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"b"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"u"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"c"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",style:{marginRight:"0.0315em"},children:"k"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"t"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",style:{marginRight:"0.0278em"},children:"D"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"pt"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"h"})]})})]})})})})})]})]})})]})," which is ",(0,i.jsxs)(e.span,{className:"katex",children:[(0,i.jsx)(e.span,{className:"katex-mathml",children:(0,i.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,i.jsxs)(e.semantics,{children:[(0,i.jsx)(e.mrow,{children:(0,i.jsxs)(e.msup,{children:[(0,i.jsx)(e.mn,{children:"2"}),(0,i.jsx)(e.mn,{children:"16"})]})}),(0,i.jsx)(e.annotation,{encoding:"application/x-tex",children:"2^{16}"})]})})}),(0,i.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.8141em"}}),(0,i.jsxs)(e.span,{className:"mord",children:[(0,i.jsx)(e.span,{className:"mord",children:"2"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsx)(e.span,{className:"vlist-t",children:(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.8141em"},children:(0,i.jsxs)(e.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,i.jsx)(e.span,{className:"mord mtight",children:(0,i.jsx)(e.span,{className:"mord mtight",children:"16"})})})]})})})})})]})]})})]})," for all batches, so 65536 total entries. For the keys of the key-value pairs of the hash map, the keys are 16 digit binary numbers from 0 to 65535, and the value is a counter."]}),"\n",(0,i.jsx)(e.p,{children:(0,i.jsx)(e.img,{src:t(41005).A+"",width:"2703",height:"963"})}),"\n",(0,i.jsxs)(e.p,{children:["As chunks are uploaded to Swarm, each chunk is assigned to a bucket based the first 16 binary digits of the ",(0,i.jsx)(e.a,{href:"/docs/concepts/DISC/#chunks",children:"chunk's hash"}),". The chunk will be assigned to whichever bucket's key matches the first 16 bits of its hash, and that bucket's counter will be incremented by 1."]}),"\n",(0,i.jsxs)(e.p,{children:['The batch is deemed "full" when ANY of these counters reach a certain max value. The max value is computed from the batch depth as such: ',(0,i.jsxs)(e.span,{className:"katex",children:[(0,i.jsx)(e.span,{className:"katex-mathml",children:(0,i.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,i.jsxs)(e.semantics,{children:[(0,i.jsx)(e.mrow,{children:(0,i.jsxs)(e.msup,{children:[(0,i.jsx)(e.mn,{children:"2"}),(0,i.jsxs)(e.mrow,{children:[(0,i.jsx)(e.mo,{stretchy:"false",children:"("}),(0,i.jsx)(e.mi,{children:"b"}),(0,i.jsx)(e.mi,{children:"a"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"c"}),(0,i.jsx)(e.mi,{children:"h"}),(0,i.jsx)(e.mi,{children:"D"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"p"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"h"}),(0,i.jsx)(e.mo,{children:"\u2212"}),(0,i.jsx)(e.mi,{children:"b"}),(0,i.jsx)(e.mi,{children:"u"}),(0,i.jsx)(e.mi,{children:"c"}),(0,i.jsx)(e.mi,{children:"k"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"D"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"p"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"h"}),(0,i.jsx)(e.mo,{stretchy:"false",children:")"})]})]})}),(0,i.jsx)(e.annotation,{encoding:"application/x-tex",children:"2^{(batchDepth-bucketDepth)}"})]})})}),(0,i.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.888em"}}),(0,i.jsxs)(e.span,{className:"mord",children:[(0,i.jsx)(e.span,{className:"mord",children:"2"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsx)(e.span,{className:"vlist-t",children:(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.888em"},children:(0,i.jsxs)(e.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,i.jsxs)(e.span,{className:"mord mtight",children:[(0,i.jsx)(e.span,{className:"mopen mtight",children:"("}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"ba"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"t"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"c"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"h"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",style:{marginRight:"0.0278em"},children:"D"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"pt"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"h"}),(0,i.jsx)(e.span,{className:"mbin mtight",children:"\u2212"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"b"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"u"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"c"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",style:{marginRight:"0.0315em"},children:"k"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"t"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",style:{marginRight:"0.0278em"},children:"D"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"pt"}),(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"h"}),(0,i.jsx)(e.span,{className:"mclose mtight",children:")"})]})})]})})})})})]})]})})]}),". For example with batch depth of 24, the max value is ",(0,i.jsxs)(e.span,{className:"katex",children:[(0,i.jsx)(e.span,{className:"katex-mathml",children:(0,i.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,i.jsxs)(e.semantics,{children:[(0,i.jsx)(e.mrow,{children:(0,i.jsxs)(e.msup,{children:[(0,i.jsx)(e.mn,{children:"2"}),(0,i.jsxs)(e.mrow,{children:[(0,i.jsx)(e.mo,{stretchy:"false",children:"("}),(0,i.jsx)(e.mn,{children:"24"}),(0,i.jsx)(e.mo,{children:"\u2212"}),(0,i.jsx)(e.mn,{children:"16"}),(0,i.jsx)(e.mo,{stretchy:"false",children:")"})]})]})}),(0,i.jsx)(e.annotation,{encoding:"application/x-tex",children:"2^{(24-16)}"})]})})}),(0,i.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.888em"}}),(0,i.jsxs)(e.span,{className:"mord",children:[(0,i.jsx)(e.span,{className:"mord",children:"2"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsx)(e.span,{className:"vlist-t",children:(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.888em"},children:(0,i.jsxs)(e.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,i.jsxs)(e.span,{className:"mord mtight",children:[(0,i.jsx)(e.span,{className:"mopen mtight",children:"("}),(0,i.jsx)(e.span,{className:"mord mtight",children:"24"}),(0,i.jsx)(e.span,{className:"mbin mtight",children:"\u2212"}),(0,i.jsx)(e.span,{className:"mord mtight",children:"16"}),(0,i.jsx)(e.span,{className:"mclose mtight",children:")"})]})})]})})})})})]})]})})]}),' or 256. A bucket can be thought of as have a number of "slots" equal to this maximum value, and every time the bucket\'s counter is incremented, one of its slots gets filled.']}),"\n",(0,i.jsxs)(e.p,{children:["In the diagram below, the batch depth is 18, so there are ",(0,i.jsxs)(e.span,{className:"katex",children:[(0,i.jsx)(e.span,{className:"katex-mathml",children:(0,i.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,i.jsxs)(e.semantics,{children:[(0,i.jsx)(e.mrow,{children:(0,i.jsxs)(e.msup,{children:[(0,i.jsx)(e.mn,{children:"2"}),(0,i.jsxs)(e.mrow,{children:[(0,i.jsx)(e.mo,{stretchy:"false",children:"("}),(0,i.jsx)(e.mn,{children:"18"}),(0,i.jsx)(e.mo,{children:"\u2212"}),(0,i.jsx)(e.mn,{children:"16"}),(0,i.jsx)(e.mo,{stretchy:"false",children:")"})]})]})}),(0,i.jsx)(e.annotation,{encoding:"application/x-tex",children:"2^{(18-16)}"})]})})}),(0,i.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.888em"}}),(0,i.jsxs)(e.span,{className:"mord",children:[(0,i.jsx)(e.span,{className:"mord",children:"2"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsx)(e.span,{className:"vlist-t",children:(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.888em"},children:(0,i.jsxs)(e.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,i.jsxs)(e.span,{className:"mord mtight",children:[(0,i.jsx)(e.span,{className:"mopen mtight",children:"("}),(0,i.jsx)(e.span,{className:"mord mtight",children:"18"}),(0,i.jsx)(e.span,{className:"mbin mtight",children:"\u2212"}),(0,i.jsx)(e.span,{className:"mord mtight",children:"16"}),(0,i.jsx)(e.span,{className:"mclose mtight",children:")"})]})})]})})})})})]})]})})]}),' or 4 slots for each bucket. The utilisation of a batch is simply the highest number of filled slots out of all 65536 entries or "buckets". In this batch, none of the slots in any of the buckets have yet been filled with 4 chunks, so the batch is not yet fully utilised. The most filled slots out of all buckets is 2, so the stamp batch\'s utilisation is 2 out of 4.']}),"\n",(0,i.jsx)(e.p,{children:(0,i.jsx)(e.img,{src:t(59382).A+"",width:"2703",height:"903"})}),"\n",(0,i.jsx)(e.p,{children:"As more chunks get uploaded and stamped, the bucket slots will begin to fill. As soon as the slots for any SINGLE bucket get filled, the entire batch is considered 100% utilised and can no longer be used to upload additional chunks."}),"\n",(0,i.jsx)(e.p,{children:(0,i.jsx)(e.img,{src:t(55711).A+"",width:"2703",height:"1023"})}),"\n",(0,i.jsx)(e.h3,{id:"mutable-batches",children:"Mutable Batches"}),"\n",(0,i.jsx)(e.p,{children:"Mutable batches use the same hash map structure as immutable batches, however its utilisation works very differently. In contrast with immutable batches, mutable batches are never considered fully utilised. Rather, at the point where an immutable batch would be considered fully utilised, a mutable batch can continue to stamp chunks. However, if any chunk's address lands in a bucket whose slots are already filled, rather than the batch becoming fully utilised, that bucket's counter gets reset, and the new chunk will replace the oldest chunk in that bucket."}),"\n",(0,i.jsx)(e.p,{children:(0,i.jsx)(e.img,{src:t(4384).A+"",width:"2703",height:"1113"})}),"\n",(0,i.jsx)(e.p,{children:"Therefore rather than speaking of the number of slots as determining the utilisation of a batch as with immutable batches, we can think of the slots as defining a limit to the amount of data which can be uploaded before old data starts to get overwritten."}),"\n",(0,i.jsx)(e.h3,{id:"which-type-of-batch-to-use",children:"Which Type of Batch to Use"}),"\n",(0,i.jsxs)(e.table,{children:[(0,i.jsx)(e.thead,{children:(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.th,{}),(0,i.jsx)(e.th,{children:"Immutable batch"}),(0,i.jsx)(e.th,{children:"Mutable batch"})]})}),(0,i.jsxs)(e.tbody,{children:[(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"Data retention"}),(0,i.jsx)(e.td,{children:"Uploaded data won't be overwritten by later uploads to the same batch"}),(0,i.jsx)(e.td,{children:"Older data may be overwritten once capacity is reached"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"When capacity is full"}),(0,i.jsx)(e.td,{children:"Additional uploads are not accepted"}),(0,i.jsx)(e.td,{children:"Keeps accepting uploads; overwrites the oldest chunks"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"Default?"}),(0,i.jsxs)(e.td,{children:["Yes (",(0,i.jsx)(e.code,{children:"immutable"})," unset)"]}),(0,i.jsxs)(e.td,{children:["No (set the ",(0,i.jsx)(e.code,{children:"immutable"})," header to ",(0,i.jsx)(e.code,{children:"false"}),")"]})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"Best for"}),(0,i.jsx)(e.td,{children:"Long-term or never-overwritten data (archives, legal documents, photos)"}),(0,i.jsx)(e.td,{children:"Frequently updated data (blogs, websites, messaging)"})]})]})]}),"\n",(0,i.jsx)(e.p,{children:"Immutable batches are suitable for long term storage of data or for data which otherwise does not need to be changed and should never be overwritten, such as records archival, legal documents, family photos, etc."}),"\n",(0,i.jsx)(e.p,{children:"Mutable batches are great for data which needs to be frequently updated and does not require a guarantee of immutability. For example, a blog, personal or company websites, ephemeral messaging app, etc."}),"\n",(0,i.jsxs)(e.p,{children:["The default batch type when unspecified is immutable. This can be modified through the Bee api by setting the ",(0,i.jsx)(e.code,{children:"immutable"})," header with the ",(0,i.jsxs)(e.a,{href:"https://docs.ethswarm.org/api/#tag/Transaction/paths/~1transactions~1%7BtxHash%7D/post",children:[(0,i.jsx)(e.code,{children:"\\stamps POST"})," endpoint"]})," to ",(0,i.jsx)(e.code,{children:"false"}),"."]}),"\n",(0,i.jsx)(e.h3,{id:"re-uploading",children:"Re-uploading"}),"\n",(0,i.jsx)(e.p,{children:"There are several nuances to how the re-uploading of previously uploaded data to Swarm affect stamp batch utilisation. For single chunks, the behaviour is relatively straightforward, however with files that must get split into multiple chunks, the behaviour is less straightforward."}),"\n",(0,i.jsx)(e.h4,{id:"single-chunks",children:"Single chunks"}),"\n",(0,i.jsx)(e.p,{children:"When a chunk which has previously been uploaded to Swarm is re-uploaded from the same node while the initial postage batch it was stamped by is still valid, no additional stamp will be utilised from the batch. However if the chunk comes from a different node than the original node, then a stamp WILL be utilised, and as long as at least one of the batches the chunk was stamped by is still valid, the chunk will be retained by storer nodes in its neighborhood."}),"\n",(0,i.jsx)(e.h4,{id:"files",children:"Files"}),"\n",(0,i.jsx)(e.p,{children:"When an identical file is re-uploaded then the stamp utilisation behaviour will be the same as with single chunks described in the section above. However, if part of the file has been modified and then re-uploaded, stamp utilisation behaviour will be different. This is due to how the chunking process works when a file is uploaded to Swarm. When uploaded to Swarm, files are split into 4kb sized chunks (2^12 bytes), and each chunk is assigned an address which is based on the content of the chunk. If even a single bit within the chunk is modified, then the address of the chunk will also be modified."}),"\n",(0,i.jsx)(e.p,{children:"When a file which was previously uploaded with a single bit flipped is again split into chunks by a node before being uploaded to Swarm, then only the chunk with the flipped bit will have an updated address and require the utilisation of another stamp. The content of all the other chunks will remain the same, and therefore will not require new stamps to be utilised."}),"\n",(0,i.jsx)(e.p,{children:"However, if rather than flipping a single bit we add some data to our file, this could cause changes in the content of every chunk of the file, meaning that every single chunk must be re-stamped. We can use a simplified example of why this is the case to more easily understand the stamp utilisation behaviour. Let us substitute a message containing letters of the alphabet rather than binary data."}),"\n",(0,i.jsx)(e.p,{children:"Our initial message consists of 16 letters:"}),"\n",(0,i.jsxs)(e.blockquote,{children:["\n",(0,i.jsx)(e.p,{children:"abcdefghijklmnop"}),"\n"]}),"\n",(0,i.jsx)(e.p,{children:"When initially uploaded, it will be split into four chunks of four letters each:"}),"\n",(0,i.jsxs)(e.blockquote,{children:["\n",(0,i.jsx)(e.p,{children:"abcdefghijklmnop => abcd | efgh | ijkl | mnop"}),"\n"]}),"\n",(0,i.jsx)(e.p,{children:"Let us look at what happens when a single letter is changed (here we change a to z):"}),"\n",(0,i.jsxs)(e.blockquote,{children:["\n",(0,i.jsx)(e.p,{children:"abcdefghijklmnop => zbcd | efgh | ijkl | mnop"}),"\n"]}),"\n",(0,i.jsx)(e.p,{children:"In this case, only the first chunk is affected, all the other chunks retain the same content."}),"\n",(0,i.jsxs)(e.blockquote,{children:["\n",(0,i.jsx)(e.p,{children:"Now let is examine the case where a new letter is added rather than simply modifying an already existing one. Here we add the number 1 at the start of the message:"}),"\n"]}),"\n",(0,i.jsxs)(e.blockquote,{children:["\n",(0,i.jsx)(e.p,{children:"1abcdefghijklmnop => 1abc | defg | hijk | lmno | p"}),"\n"]}),"\n",(0,i.jsx)(e.p,{children:"As you can see, by adding a single new letter at the start of the message, all the letters are shifted to the right by a single position, which a has caused EVERY chunk in the message to be modified rather than just a single chunk."}),"\n",(0,i.jsx)(e.h4,{id:"affect-on-batch-utilisation",children:"Affect on Batch Utilisation"}),"\n",(0,i.jsx)(e.p,{children:"The implications of this behaviour are that even a small change to the data of a file may cause every single chunk from the file to be changed, meaning that new stamps must be utilised for every chunk from that file. In practice, this could lead to high costs in data which is frequently changed, since for even a small change, every chunk from the file must be re-stamped."}),"\n",(0,i.jsx)(e.h3,{id:"implications-for-swarm-users",children:"Implications for Swarm Users"}),"\n",(0,i.jsx)(e.p,{children:"Because of how buckets fill during batch utilisation, batches are often fully utilised before reaching their theoretical maximum storage amount. However as the batch depth increases, the chance of a postage batch becoming fully utilised early decreases. At batch depth 24 (unencrypted, no erasure coding), there is a 0.1% chance that a batch will be fully utilised/start replacing old chunks before reaching 68.48% of its theoretical maximum."}),"\n",(0,i.jsxs)(e.p,{children:["Let's look at an example to make it clearer. Using the method of calculating the theoretical maximum storage amount ",(0,i.jsx)(e.a,{href:"/docs/concepts/incentives/postage-stamps#batch-depth",children:"outlined above"}),", we can see that for a batch depth of 24, the theoretical maximum amount which can be stored is 68.72 gb:"]}),"\n",(0,i.jsx)(e.span,{className:"katex-display",children:(0,i.jsxs)(e.span,{className:"katex",children:[(0,i.jsx)(e.span,{className:"katex-mathml",children:(0,i.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block",children:(0,i.jsxs)(e.semantics,{children:[(0,i.jsxs)(e.mrow,{children:[(0,i.jsxs)(e.msup,{children:[(0,i.jsx)(e.mn,{children:"2"}),(0,i.jsxs)(e.mrow,{children:[(0,i.jsx)(e.mn,{children:"24"}),(0,i.jsx)(e.mo,{children:"+"}),(0,i.jsx)(e.mn,{children:"12"})]})]}),(0,i.jsx)(e.mo,{children:"="}),(0,i.jsx)(e.mtext,{children:"68,719,476,736\xa0bytes"}),(0,i.jsx)(e.mo,{children:"="}),(0,i.jsx)(e.mtext,{children:"68.72\xa0gb"})]}),(0,i.jsx)(e.annotation,{encoding:"application/x-tex",children:"2^{24+12} = \\text{68,719,476,736 bytes} = \\text{68.72 gb}"})]})})}),(0,i.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.8641em"}}),(0,i.jsxs)(e.span,{className:"mord",children:[(0,i.jsx)(e.span,{className:"mord",children:"2"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsx)(e.span,{className:"vlist-t",children:(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.8641em"},children:(0,i.jsxs)(e.span,{style:{top:"-3.113em",marginRight:"0.05em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,i.jsxs)(e.span,{className:"mord mtight",children:[(0,i.jsx)(e.span,{className:"mord mtight",children:"24"}),(0,i.jsx)(e.span,{className:"mbin mtight",children:"+"}),(0,i.jsx)(e.span,{className:"mord mtight",children:"12"})]})})]})})})})})]}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,i.jsx)(e.span,{className:"mrel",children:"="}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.8889em",verticalAlign:"-0.1944em"}}),(0,i.jsx)(e.span,{className:"mord text",children:(0,i.jsx)(e.span,{className:"mord",children:"68,719,476,736\xa0bytes"})}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,i.jsx)(e.span,{className:"mrel",children:"="}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.8889em",verticalAlign:"-0.1944em"}}),(0,i.jsx)(e.span,{className:"mord text",children:(0,i.jsx)(e.span,{className:"mord",children:"68.72\xa0gb"})})]})]})]})}),"\n",(0,i.jsx)(e.p,{children:"Therefore we should use 68.48% the effective rate of usage for the stamp batch:"}),"\n",(0,i.jsx)(e.span,{className:"katex-display",children:(0,i.jsxs)(e.span,{className:"katex",children:[(0,i.jsx)(e.span,{className:"katex-mathml",children:(0,i.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block",children:(0,i.jsxs)(e.semantics,{children:[(0,i.jsxs)(e.mrow,{children:[(0,i.jsx)(e.mtext,{children:"68.72\xa0gb"}),(0,i.jsx)(e.mo,{children:"\xd7"}),(0,i.jsx)(e.mn,{children:"0.6848"}),(0,i.jsx)(e.mo,{children:"="}),(0,i.jsx)(e.mtext,{children:"47.06\xa0gb\xa0"})]}),(0,i.jsx)(e.annotation,{encoding:"application/x-tex",children:"\\text{68.72 gb} \\times{0.6848} = \\text{47.06 gb }"})]})})}),(0,i.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.8889em",verticalAlign:"-0.1944em"}}),(0,i.jsx)(e.span,{className:"mord text",children:(0,i.jsx)(e.span,{className:"mord",children:"68.72\xa0gb"})}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,i.jsx)(e.span,{className:"mbin",children:"\xd7"}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.6444em"}}),(0,i.jsx)(e.span,{className:"mord",children:(0,i.jsx)(e.span,{className:"mord",children:"0.6848"})}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,i.jsx)(e.span,{className:"mrel",children:"="}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.8889em",verticalAlign:"-0.1944em"}}),(0,i.jsx)(e.span,{className:"mord text",children:(0,i.jsx)(e.span,{className:"mord",children:"47.06\xa0gb\xa0"})})]})]})]})}),"\n",(0,i.jsxs)(e.p,{children:["Note that the effective volume also depends on the encryption and erasure coding settings used. The example above assumes unencrypted data with no erasure coding. See the ",(0,i.jsx)(e.a,{href:"#effective-utilisation-tables",children:"effective utilisation tables below"})," for the full set of effective volumes."]}),"\n",(0,i.jsx)(e.h2,{id:"effective-utilisation-tables",children:"Effective Utilisation Tables"}),"\n",(0,i.jsx)(e.p,{children:"When a user buys a batch of stamps they may make the naive assumption that they will be able to upload data equal to the sum total size of the maximum capacity of the batch. However, in practice this assumption is incorrect, so it is essential that Swarm users understand the relationship between batch depth and the theoretical and effective volumes of a batch."}),"\n",(0,i.jsx)(e.p,{children:"Columns:"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.strong,{children:"Theoretical Volume:"})," The theoretical maximum volume which can be reached if the batch is completely utilized."]}),"\n",(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.strong,{children:"Effective Volume:"})," The actual volume which a batch can be expected to store with a failure rate of less than or equal to 0.1% (1 in 1000)."]}),"\n",(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.strong,{children:"Batch Depth:"})," The batch depth value."]}),"\n"]}),"\n",(0,i.jsxs)(e.admonition,{type:"info",children:[(0,i.jsx)(e.p,{children:"The title of each table below states whether it is for encrypted or unencrypted uploads along with the erasure coding level."}),(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.a,{href:"/docs/concepts/DISC/erasure-coding",children:"Erasure coding"})," on Swarm has five named levels:"]}),(0,i.jsxs)(e.ol,{children:["\n",(0,i.jsx)(e.li,{children:"NONE"}),"\n",(0,i.jsx)(e.li,{children:"MEDIUM"}),"\n",(0,i.jsx)(e.li,{children:"STRONG"}),"\n",(0,i.jsx)(e.li,{children:"INSANE"}),"\n",(0,i.jsx)(e.li,{children:"PARANOID"}),"\n"]})]}),"\n",(0,i.jsx)(e.h3,{id:"unencrypted---none",children:"Unencrypted - NONE"}),"\n",(0,i.jsxs)(e.table,{children:[(0,i.jsx)(e.thead,{children:(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.th,{children:"Theoretical Volume"}),(0,i.jsx)(e.th,{children:"Effective Volume"}),(0,i.jsx)(e.th,{children:"Batch Depth"})]})}),(0,i.jsxs)(e.tbody,{children:[(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"536.87 MB"}),(0,i.jsx)(e.td,{children:"44.70 kB"}),(0,i.jsx)(e.td,{children:"17"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"1.07 GB"}),(0,i.jsx)(e.td,{children:"6.66 MB"}),(0,i.jsx)(e.td,{children:"18"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"2.15 GB"}),(0,i.jsx)(e.td,{children:"112.06 MB"}),(0,i.jsx)(e.td,{children:"19"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"4.29 GB"}),(0,i.jsx)(e.td,{children:"687.62 MB"}),(0,i.jsx)(e.td,{children:"20"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"8.59 GB"}),(0,i.jsx)(e.td,{children:"2.60 GB"}),(0,i.jsx)(e.td,{children:"21"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"17.18 GB"}),(0,i.jsx)(e.td,{children:"7.73 GB"}),(0,i.jsx)(e.td,{children:"22"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"34.36 GB"}),(0,i.jsx)(e.td,{children:"19.94 GB"}),(0,i.jsx)(e.td,{children:"23"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"68.72 GB"}),(0,i.jsx)(e.td,{children:"47.06 GB"}),(0,i.jsx)(e.td,{children:"24"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"137.44 GB"}),(0,i.jsx)(e.td,{children:"105.51 GB"}),(0,i.jsx)(e.td,{children:"25"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"274.88 GB"}),(0,i.jsx)(e.td,{children:"227.98 GB"}),(0,i.jsx)(e.td,{children:"26"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"549.76 GB"}),(0,i.jsx)(e.td,{children:"476.68 GB"}),(0,i.jsx)(e.td,{children:"27"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"1.10 TB"}),(0,i.jsx)(e.td,{children:"993.65 GB"}),(0,i.jsx)(e.td,{children:"28"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"2.20 TB"}),(0,i.jsx)(e.td,{children:"2.04 TB"}),(0,i.jsx)(e.td,{children:"29"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"4.40 TB"}),(0,i.jsx)(e.td,{children:"4.17 TB"}),(0,i.jsx)(e.td,{children:"30"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"8.80 TB"}),(0,i.jsx)(e.td,{children:"8.45 TB"}),(0,i.jsx)(e.td,{children:"31"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"17.59 TB"}),(0,i.jsx)(e.td,{children:"17.07 TB"}),(0,i.jsx)(e.td,{children:"32"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"35.18 TB"}),(0,i.jsx)(e.td,{children:"34.36 TB"}),(0,i.jsx)(e.td,{children:"33"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"70.37 TB"}),(0,i.jsx)(e.td,{children:"69.04 TB"}),(0,i.jsx)(e.td,{children:"34"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"140.74 TB"}),(0,i.jsx)(e.td,{children:"138.54 TB"}),(0,i.jsx)(e.td,{children:"35"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"281.47 TB"}),(0,i.jsx)(e.td,{children:"277.72 TB"}),(0,i.jsx)(e.td,{children:"36"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"562.95 TB"}),(0,i.jsx)(e.td,{children:"556.35 TB"}),(0,i.jsx)(e.td,{children:"37"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"1.13 PB"}),(0,i.jsx)(e.td,{children:"1.11 PB"}),(0,i.jsx)(e.td,{children:"38"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"2.25 PB"}),(0,i.jsx)(e.td,{children:"2.23 PB"}),(0,i.jsx)(e.td,{children:"39"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"4.50 PB"}),(0,i.jsx)(e.td,{children:"4.46 PB"}),(0,i.jsx)(e.td,{children:"40"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"9.01 PB"}),(0,i.jsx)(e.td,{children:"8.93 PB"}),(0,i.jsx)(e.td,{children:"41"})]})]})]}),"\n",(0,i.jsx)(e.h3,{id:"unencrypted---medium",children:"Unencrypted - MEDIUM"}),"\n",(0,i.jsxs)(e.table,{children:[(0,i.jsx)(e.thead,{children:(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.th,{children:"Theoretical Volume"}),(0,i.jsx)(e.th,{children:"Effective Volume"}),(0,i.jsx)(e.th,{children:"Batch Depth"})]})}),(0,i.jsxs)(e.tbody,{children:[(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"536.87 MB"}),(0,i.jsx)(e.td,{children:"41.56 kB"}),(0,i.jsx)(e.td,{children:"17"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"1.07 GB"}),(0,i.jsx)(e.td,{children:"6.19 MB"}),(0,i.jsx)(e.td,{children:"18"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"2.15 GB"}),(0,i.jsx)(e.td,{children:"104.18 MB"}),(0,i.jsx)(e.td,{children:"19"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"4.29 GB"}),(0,i.jsx)(e.td,{children:"639.27 MB"}),(0,i.jsx)(e.td,{children:"20"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"8.59 GB"}),(0,i.jsx)(e.td,{children:"2.41 GB"}),(0,i.jsx)(e.td,{children:"21"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"17.18 GB"}),(0,i.jsx)(e.td,{children:"7.18 GB"}),(0,i.jsx)(e.td,{children:"22"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"34.36 GB"}),(0,i.jsx)(e.td,{children:"18.54 GB"}),(0,i.jsx)(e.td,{children:"23"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"68.72 GB"}),(0,i.jsx)(e.td,{children:"43.75 GB"}),(0,i.jsx)(e.td,{children:"24"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"137.44 GB"}),(0,i.jsx)(e.td,{children:"98.09 GB"}),(0,i.jsx)(e.td,{children:"25"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"274.88 GB"}),(0,i.jsx)(e.td,{children:"211.95 GB"}),(0,i.jsx)(e.td,{children:"26"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"549.76 GB"}),(0,i.jsx)(e.td,{children:"443.16 GB"}),(0,i.jsx)(e.td,{children:"27"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"1.10 TB"}),(0,i.jsx)(e.td,{children:"923.78 GB"}),(0,i.jsx)(e.td,{children:"28"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"2.20 TB"}),(0,i.jsx)(e.td,{children:"1.90 TB"}),(0,i.jsx)(e.td,{children:"29"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"4.40 TB"}),(0,i.jsx)(e.td,{children:"3.88 TB"}),(0,i.jsx)(e.td,{children:"30"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"8.80 TB"}),(0,i.jsx)(e.td,{children:"7.86 TB"}),(0,i.jsx)(e.td,{children:"31"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"17.59 TB"}),(0,i.jsx)(e.td,{children:"15.87 TB"}),(0,i.jsx)(e.td,{children:"32"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"35.18 TB"}),(0,i.jsx)(e.td,{children:"31.94 TB"}),(0,i.jsx)(e.td,{children:"33"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"70.37 TB"}),(0,i.jsx)(e.td,{children:"64.19 TB"}),(0,i.jsx)(e.td,{children:"34"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"140.74 TB"}),(0,i.jsx)(e.td,{children:"128.80 TB"}),(0,i.jsx)(e.td,{children:"35"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"281.47 TB"}),(0,i.jsx)(e.td,{children:"258.19 TB"}),(0,i.jsx)(e.td,{children:"36"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"562.95 TB"}),(0,i.jsx)(e.td,{children:"517.23 TB"}),(0,i.jsx)(e.td,{children:"37"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"1.13 PB"}),(0,i.jsx)(e.td,{children:"1.04 PB"}),(0,i.jsx)(e.td,{children:"38"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"2.25 PB"}),(0,i.jsx)(e.td,{children:"2.07 PB"}),(0,i.jsx)(e.td,{children:"39"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"4.50 PB"}),(0,i.jsx)(e.td,{children:"4.15 PB"}),(0,i.jsx)(e.td,{children:"40"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"9.01 PB"}),(0,i.jsx)(e.td,{children:"8.30 PB"}),(0,i.jsx)(e.td,{children:"41"})]})]})]}),"\n",(0,i.jsx)(e.h3,{id:"unencrypted---strong",children:"Unencrypted - STRONG"}),"\n",(0,i.jsxs)(e.table,{children:[(0,i.jsx)(e.thead,{children:(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.th,{children:"Theoretical Volume"}),(0,i.jsx)(e.th,{children:"Effective Volume"}),(0,i.jsx)(e.th,{children:"Batch Depth"})]})}),(0,i.jsxs)(e.tbody,{children:[(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"536.87 MB"}),(0,i.jsx)(e.td,{children:"37.37 kB"}),(0,i.jsx)(e.td,{children:"17"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"1.07 GB"}),(0,i.jsx)(e.td,{children:"5.57 MB"}),(0,i.jsx)(e.td,{children:"18"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"2.15 GB"}),(0,i.jsx)(e.td,{children:"93.68 MB"}),(0,i.jsx)(e.td,{children:"19"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"4.29 GB"}),(0,i.jsx)(e.td,{children:"574.81 MB"}),(0,i.jsx)(e.td,{children:"20"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"8.59 GB"}),(0,i.jsx)(e.td,{children:"2.17 GB"}),(0,i.jsx)(e.td,{children:"21"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"17.18 GB"}),(0,i.jsx)(e.td,{children:"6.46 GB"}),(0,i.jsx)(e.td,{children:"22"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"34.36 GB"}),(0,i.jsx)(e.td,{children:"16.67 GB"}),(0,i.jsx)(e.td,{children:"23"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"68.72 GB"}),(0,i.jsx)(e.td,{children:"39.34 GB"}),(0,i.jsx)(e.td,{children:"24"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"137.44 GB"}),(0,i.jsx)(e.td,{children:"88.20 GB"}),(0,i.jsx)(e.td,{children:"25"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"274.88 GB"}),(0,i.jsx)(e.td,{children:"190.58 GB"}),(0,i.jsx)(e.td,{children:"26"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"549.76 GB"}),(0,i.jsx)(e.td,{children:"398.47 GB"}),(0,i.jsx)(e.td,{children:"27"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"1.10 TB"}),(0,i.jsx)(e.td,{children:"830.63 GB"}),(0,i.jsx)(e.td,{children:"28"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"2.20 TB"}),(0,i.jsx)(e.td,{children:"1.71 TB"}),(0,i.jsx)(e.td,{children:"29"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"4.40 TB"}),(0,i.jsx)(e.td,{children:"3.49 TB"}),(0,i.jsx)(e.td,{children:"30"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"8.80 TB"}),(0,i.jsx)(e.td,{children:"7.07 TB"}),(0,i.jsx)(e.td,{children:"31"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"17.59 TB"}),(0,i.jsx)(e.td,{children:"14.27 TB"}),(0,i.jsx)(e.td,{children:"32"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"35.18 TB"}),(0,i.jsx)(e.td,{children:"28.72 TB"}),(0,i.jsx)(e.td,{children:"33"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"70.37 TB"}),(0,i.jsx)(e.td,{children:"57.71 TB"}),(0,i.jsx)(e.td,{children:"34"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"140.74 TB"}),(0,i.jsx)(e.td,{children:"115.81 TB"}),(0,i.jsx)(e.td,{children:"35"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"281.47 TB"}),(0,i.jsx)(e.td,{children:"232.16 TB"}),(0,i.jsx)(e.td,{children:"36"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"562.95 TB"}),(0,i.jsx)(e.td,{children:"465.07 TB"}),(0,i.jsx)(e.td,{children:"37"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"1.13 PB"}),(0,i.jsx)(e.td,{children:"931.23 TB"}),(0,i.jsx)(e.td,{children:"38"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"2.25 PB"}),(0,i.jsx)(e.td,{children:"1.86 PB"}),(0,i.jsx)(e.td,{children:"39"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"4.50 PB"}),(0,i.jsx)(e.td,{children:"3.73 PB"}),(0,i.jsx)(e.td,{children:"40"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"9.01 PB"}),(0,i.jsx)(e.td,{children:"7.46 PB"}),(0,i.jsx)(e.td,{children:"41"})]})]})]}),"\n",(0,i.jsx)(e.h3,{id:"unencrypted---insane",children:"Unencrypted - INSANE"}),"\n",(0,i.jsxs)(e.table,{children:[(0,i.jsx)(e.thead,{children:(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.th,{children:"Theoretical Volume"}),(0,i.jsx)(e.th,{children:"Effective Volume"}),(0,i.jsx)(e.th,{children:"Batch Depth"})]})}),(0,i.jsxs)(e.tbody,{children:[(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"536.87 MB"}),(0,i.jsx)(e.td,{children:"33.88 kB"}),(0,i.jsx)(e.td,{children:"17"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"1.07 GB"}),(0,i.jsx)(e.td,{children:"5.05 MB"}),(0,i.jsx)(e.td,{children:"18"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"2.15 GB"}),(0,i.jsx)(e.td,{children:"84.92 MB"}),(0,i.jsx)(e.td,{children:"19"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"4.29 GB"}),(0,i.jsx)(e.td,{children:"521.09 MB"}),(0,i.jsx)(e.td,{children:"20"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"8.59 GB"}),(0,i.jsx)(e.td,{children:"1.97 GB"}),(0,i.jsx)(e.td,{children:"21"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"17.18 GB"}),(0,i.jsx)(e.td,{children:"5.86 GB"}),(0,i.jsx)(e.td,{children:"22"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"34.36 GB"}),(0,i.jsx)(e.td,{children:"15.11 GB"}),(0,i.jsx)(e.td,{children:"23"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"68.72 GB"}),(0,i.jsx)(e.td,{children:"35.66 GB"}),(0,i.jsx)(e.td,{children:"24"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"137.44 GB"}),(0,i.jsx)(e.td,{children:"79.96 GB"}),(0,i.jsx)(e.td,{children:"25"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"274.88 GB"}),(0,i.jsx)(e.td,{children:"172.77 GB"}),(0,i.jsx)(e.td,{children:"26"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"549.76 GB"}),(0,i.jsx)(e.td,{children:"361.23 GB"}),(0,i.jsx)(e.td,{children:"27"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"1.10 TB"}),(0,i.jsx)(e.td,{children:"753.00 GB"}),(0,i.jsx)(e.td,{children:"28"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"2.20 TB"}),(0,i.jsx)(e.td,{children:"1.55 TB"}),(0,i.jsx)(e.td,{children:"29"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"4.40 TB"}),(0,i.jsx)(e.td,{children:"3.16 TB"}),(0,i.jsx)(e.td,{children:"30"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"8.80 TB"}),(0,i.jsx)(e.td,{children:"6.41 TB"}),(0,i.jsx)(e.td,{children:"31"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"17.59 TB"}),(0,i.jsx)(e.td,{children:"12.93 TB"}),(0,i.jsx)(e.td,{children:"32"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"35.18 TB"}),(0,i.jsx)(e.td,{children:"26.04 TB"}),(0,i.jsx)(e.td,{children:"33"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"70.37 TB"}),(0,i.jsx)(e.td,{children:"52.32 TB"}),(0,i.jsx)(e.td,{children:"34"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"140.74 TB"}),(0,i.jsx)(e.td,{children:"104.99 TB"}),(0,i.jsx)(e.td,{children:"35"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"281.47 TB"}),(0,i.jsx)(e.td,{children:"210.46 TB"}),(0,i.jsx)(e.td,{children:"36"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"562.95 TB"}),(0,i.jsx)(e.td,{children:"421.61 TB"}),(0,i.jsx)(e.td,{children:"37"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"1.13 PB"}),(0,i.jsx)(e.td,{children:"844.20 TB"}),(0,i.jsx)(e.td,{children:"38"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"2.25 PB"}),(0,i.jsx)(e.td,{children:"1.69 PB"}),(0,i.jsx)(e.td,{children:"39"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"4.50 PB"}),(0,i.jsx)(e.td,{children:"3.38 PB"}),(0,i.jsx)(e.td,{children:"40"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"9.01 PB"}),(0,i.jsx)(e.td,{children:"6.77 PB"}),(0,i.jsx)(e.td,{children:"41"})]})]})]}),"\n",(0,i.jsx)(e.h3,{id:"unencrypted---paranoid",children:"Unencrypted - PARANOID"}),"\n",(0,i.jsxs)(e.table,{children:[(0,i.jsx)(e.thead,{children:(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.th,{children:"Theoretical Volume"}),(0,i.jsx)(e.th,{children:"Effective Volume"}),(0,i.jsx)(e.th,{children:"Batch Depth"})]})}),(0,i.jsxs)(e.tbody,{children:[(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"536.87 MB"}),(0,i.jsx)(e.td,{children:"13.27 kB"}),(0,i.jsx)(e.td,{children:"17"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"1.07 GB"}),(0,i.jsx)(e.td,{children:"1.98 MB"}),(0,i.jsx)(e.td,{children:"18"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"2.15 GB"}),(0,i.jsx)(e.td,{children:"33.27 MB"}),(0,i.jsx)(e.td,{children:"19"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"4.29 GB"}),(0,i.jsx)(e.td,{children:"204.14 MB"}),(0,i.jsx)(e.td,{children:"20"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"8.59 GB"}),(0,i.jsx)(e.td,{children:"771.13 MB"}),(0,i.jsx)(e.td,{children:"21"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"17.18 GB"}),(0,i.jsx)(e.td,{children:"2.29 GB"}),(0,i.jsx)(e.td,{children:"22"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"34.36 GB"}),(0,i.jsx)(e.td,{children:"5.92 GB"}),(0,i.jsx)(e.td,{children:"23"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"68.72 GB"}),(0,i.jsx)(e.td,{children:"13.97 GB"}),(0,i.jsx)(e.td,{children:"24"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"137.44 GB"}),(0,i.jsx)(e.td,{children:"31.32 GB"}),(0,i.jsx)(e.td,{children:"25"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"274.88 GB"}),(0,i.jsx)(e.td,{children:"67.68 GB"}),(0,i.jsx)(e.td,{children:"26"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"549.76 GB"}),(0,i.jsx)(e.td,{children:"141.51 GB"}),(0,i.jsx)(e.td,{children:"27"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"1.10 TB"}),(0,i.jsx)(e.td,{children:"294.99 GB"}),(0,i.jsx)(e.td,{children:"28"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"2.20 TB"}),(0,i.jsx)(e.td,{children:"606.90 GB"}),(0,i.jsx)(e.td,{children:"29"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"4.40 TB"}),(0,i.jsx)(e.td,{children:"1.24 TB"}),(0,i.jsx)(e.td,{children:"30"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"8.80 TB"}),(0,i.jsx)(e.td,{children:"2.51 TB"}),(0,i.jsx)(e.td,{children:"31"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"17.59 TB"}),(0,i.jsx)(e.td,{children:"5.07 TB"}),(0,i.jsx)(e.td,{children:"32"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"35.18 TB"}),(0,i.jsx)(e.td,{children:"10.20 TB"}),(0,i.jsx)(e.td,{children:"33"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"70.37 TB"}),(0,i.jsx)(e.td,{children:"20.50 TB"}),(0,i.jsx)(e.td,{children:"34"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"140.74 TB"}),(0,i.jsx)(e.td,{children:"41.13 TB"}),(0,i.jsx)(e.td,{children:"35"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"281.47 TB"}),(0,i.jsx)(e.td,{children:"82.45 TB"}),(0,i.jsx)(e.td,{children:"36"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"562.95 TB"}),(0,i.jsx)(e.td,{children:"165.17 TB"}),(0,i.jsx)(e.td,{children:"37"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"1.13 PB"}),(0,i.jsx)(e.td,{children:"330.72 TB"}),(0,i.jsx)(e.td,{children:"38"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"2.25 PB"}),(0,i.jsx)(e.td,{children:"661.97 TB"}),(0,i.jsx)(e.td,{children:"39"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"4.50 PB"}),(0,i.jsx)(e.td,{children:"1.32 PB"}),(0,i.jsx)(e.td,{children:"40"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"9.01 PB"}),(0,i.jsx)(e.td,{children:"2.65 PB"}),(0,i.jsx)(e.td,{children:"41"})]})]})]}),"\n",(0,i.jsx)(e.h3,{id:"encrypted---none",children:"Encrypted - NONE"}),"\n",(0,i.jsxs)(e.table,{children:[(0,i.jsx)(e.thead,{children:(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.th,{children:"Theoretical Volume"}),(0,i.jsx)(e.th,{children:"Effective Volume"}),(0,i.jsx)(e.th,{children:"Batch Depth"})]})}),(0,i.jsxs)(e.tbody,{children:[(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"536.87 MB"}),(0,i.jsx)(e.td,{children:"44.35 kB"}),(0,i.jsx)(e.td,{children:"17"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"1.07 GB"}),(0,i.jsx)(e.td,{children:"6.61 MB"}),(0,i.jsx)(e.td,{children:"18"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"2.15 GB"}),(0,i.jsx)(e.td,{children:"111.18 MB"}),(0,i.jsx)(e.td,{children:"19"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"4.29 GB"}),(0,i.jsx)(e.td,{children:"682.21 MB"}),(0,i.jsx)(e.td,{children:"20"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"8.59 GB"}),(0,i.jsx)(e.td,{children:"2.58 GB"}),(0,i.jsx)(e.td,{children:"21"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"17.18 GB"}),(0,i.jsx)(e.td,{children:"7.67 GB"}),(0,i.jsx)(e.td,{children:"22"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"34.36 GB"}),(0,i.jsx)(e.td,{children:"19.78 GB"}),(0,i.jsx)(e.td,{children:"23"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"68.72 GB"}),(0,i.jsx)(e.td,{children:"46.69 GB"}),(0,i.jsx)(e.td,{children:"24"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"137.44 GB"}),(0,i.jsx)(e.td,{children:"104.68 GB"}),(0,i.jsx)(e.td,{children:"25"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"274.88 GB"}),(0,i.jsx)(e.td,{children:"226.19 GB"}),(0,i.jsx)(e.td,{children:"26"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"549.76 GB"}),(0,i.jsx)(e.td,{children:"472.93 GB"}),(0,i.jsx)(e.td,{children:"27"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"1.10 TB"}),(0,i.jsx)(e.td,{children:"985.83 GB"}),(0,i.jsx)(e.td,{children:"28"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"2.20 TB"}),(0,i.jsx)(e.td,{children:"2.03 TB"}),(0,i.jsx)(e.td,{children:"29"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"4.40 TB"}),(0,i.jsx)(e.td,{children:"4.14 TB"}),(0,i.jsx)(e.td,{children:"30"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"8.80 TB"}),(0,i.jsx)(e.td,{children:"8.39 TB"}),(0,i.jsx)(e.td,{children:"31"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"17.59 TB"}),(0,i.jsx)(e.td,{children:"16.93 TB"}),(0,i.jsx)(e.td,{children:"32"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"35.18 TB"}),(0,i.jsx)(e.td,{children:"34.09 TB"}),(0,i.jsx)(e.td,{children:"33"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"70.37 TB"}),(0,i.jsx)(e.td,{children:"68.50 TB"}),(0,i.jsx)(e.td,{children:"34"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"140.74 TB"}),(0,i.jsx)(e.td,{children:"137.45 TB"}),(0,i.jsx)(e.td,{children:"35"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"281.47 TB"}),(0,i.jsx)(e.td,{children:"275.53 TB"}),(0,i.jsx)(e.td,{children:"36"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"562.95 TB"}),(0,i.jsx)(e.td,{children:"551.97 TB"}),(0,i.jsx)(e.td,{children:"37"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"1.13 PB"}),(0,i.jsx)(e.td,{children:"1.11 PB"}),(0,i.jsx)(e.td,{children:"38"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"2.25 PB"}),(0,i.jsx)(e.td,{children:"2.21 PB"}),(0,i.jsx)(e.td,{children:"39"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"4.50 PB"}),(0,i.jsx)(e.td,{children:"4.43 PB"}),(0,i.jsx)(e.td,{children:"40"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"9.01 PB"}),(0,i.jsx)(e.td,{children:"8.86 PB"}),(0,i.jsx)(e.td,{children:"41"})]})]})]}),"\n",(0,i.jsx)(e.h3,{id:"encrypted---medium",children:"Encrypted - MEDIUM"}),"\n",(0,i.jsxs)(e.table,{children:[(0,i.jsx)(e.thead,{children:(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.th,{children:"Theoretical Volume"}),(0,i.jsx)(e.th,{children:"Effective Volume"}),(0,i.jsx)(e.th,{children:"Batch Depth"})]})}),(0,i.jsxs)(e.tbody,{children:[(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"536.87 MB"}),(0,i.jsx)(e.td,{children:"40.89 kB"}),(0,i.jsx)(e.td,{children:"17"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"1.07 GB"}),(0,i.jsx)(e.td,{children:"6.09 MB"}),(0,i.jsx)(e.td,{children:"18"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"2.15 GB"}),(0,i.jsx)(e.td,{children:"102.49 MB"}),(0,i.jsx)(e.td,{children:"19"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"4.29 GB"}),(0,i.jsx)(e.td,{children:"628.91 MB"}),(0,i.jsx)(e.td,{children:"20"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"8.59 GB"}),(0,i.jsx)(e.td,{children:"2.38 GB"}),(0,i.jsx)(e.td,{children:"21"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"17.18 GB"}),(0,i.jsx)(e.td,{children:"7.07 GB"}),(0,i.jsx)(e.td,{children:"22"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"34.36 GB"}),(0,i.jsx)(e.td,{children:"18.24 GB"}),(0,i.jsx)(e.td,{children:"23"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"68.72 GB"}),(0,i.jsx)(e.td,{children:"43.04 GB"}),(0,i.jsx)(e.td,{children:"24"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"137.44 GB"}),(0,i.jsx)(e.td,{children:"96.50 GB"}),(0,i.jsx)(e.td,{children:"25"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"274.88 GB"}),(0,i.jsx)(e.td,{children:"208.52 GB"}),(0,i.jsx)(e.td,{children:"26"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"549.76 GB"}),(0,i.jsx)(e.td,{children:"435.98 GB"}),(0,i.jsx)(e.td,{children:"27"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"1.10 TB"}),(0,i.jsx)(e.td,{children:"908.81 GB"}),(0,i.jsx)(e.td,{children:"28"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"2.20 TB"}),(0,i.jsx)(e.td,{children:"1.87 TB"}),(0,i.jsx)(e.td,{children:"29"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"4.40 TB"}),(0,i.jsx)(e.td,{children:"3.81 TB"}),(0,i.jsx)(e.td,{children:"30"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"8.80 TB"}),(0,i.jsx)(e.td,{children:"7.73 TB"}),(0,i.jsx)(e.td,{children:"31"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"17.59 TB"}),(0,i.jsx)(e.td,{children:"15.61 TB"}),(0,i.jsx)(e.td,{children:"32"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"35.18 TB"}),(0,i.jsx)(e.td,{children:"31.43 TB"}),(0,i.jsx)(e.td,{children:"33"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"70.37 TB"}),(0,i.jsx)(e.td,{children:"63.15 TB"}),(0,i.jsx)(e.td,{children:"34"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"140.74 TB"}),(0,i.jsx)(e.td,{children:"126.71 TB"}),(0,i.jsx)(e.td,{children:"35"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"281.47 TB"}),(0,i.jsx)(e.td,{children:"254.01 TB"}),(0,i.jsx)(e.td,{children:"36"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"562.95 TB"}),(0,i.jsx)(e.td,{children:"508.85 TB"}),(0,i.jsx)(e.td,{children:"37"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"1.13 PB"}),(0,i.jsx)(e.td,{children:"1.02 PB"}),(0,i.jsx)(e.td,{children:"38"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"2.25 PB"}),(0,i.jsx)(e.td,{children:"2.04 PB"}),(0,i.jsx)(e.td,{children:"39"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"4.50 PB"}),(0,i.jsx)(e.td,{children:"4.08 PB"}),(0,i.jsx)(e.td,{children:"40"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"9.01 PB"}),(0,i.jsx)(e.td,{children:"8.17 PB"}),(0,i.jsx)(e.td,{children:"41"})]})]})]}),"\n",(0,i.jsx)(e.h3,{id:"encrypted---strong",children:"Encrypted - STRONG"}),"\n",(0,i.jsxs)(e.table,{children:[(0,i.jsx)(e.thead,{children:(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.th,{children:"Theoretical Volume"}),(0,i.jsx)(e.th,{children:"Effective Volume"}),(0,i.jsx)(e.th,{children:"Batch Depth"})]})}),(0,i.jsxs)(e.tbody,{children:[(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"536.87 MB"}),(0,i.jsx)(e.td,{children:"36.73 kB"}),(0,i.jsx)(e.td,{children:"17"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"1.07 GB"}),(0,i.jsx)(e.td,{children:"5.47 MB"}),(0,i.jsx)(e.td,{children:"18"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"2.15 GB"}),(0,i.jsx)(e.td,{children:"92.07 MB"}),(0,i.jsx)(e.td,{children:"19"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"4.29 GB"}),(0,i.jsx)(e.td,{children:"564.95 MB"}),(0,i.jsx)(e.td,{children:"20"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"8.59 GB"}),(0,i.jsx)(e.td,{children:"2.13 GB"}),(0,i.jsx)(e.td,{children:"21"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"17.18 GB"}),(0,i.jsx)(e.td,{children:"6.35 GB"}),(0,i.jsx)(e.td,{children:"22"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"34.36 GB"}),(0,i.jsx)(e.td,{children:"16.38 GB"}),(0,i.jsx)(e.td,{children:"23"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"68.72 GB"}),(0,i.jsx)(e.td,{children:"38.66 GB"}),(0,i.jsx)(e.td,{children:"24"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"137.44 GB"}),(0,i.jsx)(e.td,{children:"86.69 GB"}),(0,i.jsx)(e.td,{children:"25"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"274.88 GB"}),(0,i.jsx)(e.td,{children:"187.31 GB"}),(0,i.jsx)(e.td,{children:"26"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"549.76 GB"}),(0,i.jsx)(e.td,{children:"391.64 GB"}),(0,i.jsx)(e.td,{children:"27"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"1.10 TB"}),(0,i.jsx)(e.td,{children:"816.39 GB"}),(0,i.jsx)(e.td,{children:"28"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"2.20 TB"}),(0,i.jsx)(e.td,{children:"1.68 TB"}),(0,i.jsx)(e.td,{children:"29"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"4.40 TB"}),(0,i.jsx)(e.td,{children:"3.43 TB"}),(0,i.jsx)(e.td,{children:"30"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"8.80 TB"}),(0,i.jsx)(e.td,{children:"6.94 TB"}),(0,i.jsx)(e.td,{children:"31"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"17.59 TB"}),(0,i.jsx)(e.td,{children:"14.02 TB"}),(0,i.jsx)(e.td,{children:"32"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"35.18 TB"}),(0,i.jsx)(e.td,{children:"28.23 TB"}),(0,i.jsx)(e.td,{children:"33"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"70.37 TB"}),(0,i.jsx)(e.td,{children:"56.72 TB"}),(0,i.jsx)(e.td,{children:"34"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"140.74 TB"}),(0,i.jsx)(e.td,{children:"113.82 TB"}),(0,i.jsx)(e.td,{children:"35"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"281.47 TB"}),(0,i.jsx)(e.td,{children:"228.18 TB"}),(0,i.jsx)(e.td,{children:"36"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"562.95 TB"}),(0,i.jsx)(e.td,{children:"457.10 TB"}),(0,i.jsx)(e.td,{children:"37"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"1.13 PB"}),(0,i.jsx)(e.td,{children:"915.26 TB"}),(0,i.jsx)(e.td,{children:"38"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"2.25 PB"}),(0,i.jsx)(e.td,{children:"1.83 PB"}),(0,i.jsx)(e.td,{children:"39"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"4.50 PB"}),(0,i.jsx)(e.td,{children:"3.67 PB"}),(0,i.jsx)(e.td,{children:"40"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"9.01 PB"}),(0,i.jsx)(e.td,{children:"7.34 PB"}),(0,i.jsx)(e.td,{children:"41"})]})]})]}),"\n",(0,i.jsx)(e.h3,{id:"encrypted---insane",children:"Encrypted - INSANE"}),"\n",(0,i.jsxs)(e.table,{children:[(0,i.jsx)(e.thead,{children:(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.th,{children:"Theoretical Volume"}),(0,i.jsx)(e.th,{children:"Effective Volume"}),(0,i.jsx)(e.th,{children:"Batch Depth"})]})}),(0,i.jsxs)(e.tbody,{children:[(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"536.87 MB"}),(0,i.jsx)(e.td,{children:"33.26 kB"}),(0,i.jsx)(e.td,{children:"17"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"1.07 GB"}),(0,i.jsx)(e.td,{children:"4.96 MB"}),(0,i.jsx)(e.td,{children:"18"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"2.15 GB"}),(0,i.jsx)(e.td,{children:"83.38 MB"}),(0,i.jsx)(e.td,{children:"19"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"4.29 GB"}),(0,i.jsx)(e.td,{children:"511.65 MB"}),(0,i.jsx)(e.td,{children:"20"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"8.59 GB"}),(0,i.jsx)(e.td,{children:"1.93 GB"}),(0,i.jsx)(e.td,{children:"21"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"17.18 GB"}),(0,i.jsx)(e.td,{children:"5.75 GB"}),(0,i.jsx)(e.td,{children:"22"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"34.36 GB"}),(0,i.jsx)(e.td,{children:"14.84 GB"}),(0,i.jsx)(e.td,{children:"23"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"68.72 GB"}),(0,i.jsx)(e.td,{children:"35.02 GB"}),(0,i.jsx)(e.td,{children:"24"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"137.44 GB"}),(0,i.jsx)(e.td,{children:"78.51 GB"}),(0,i.jsx)(e.td,{children:"25"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"274.88 GB"}),(0,i.jsx)(e.td,{children:"169.64 GB"}),(0,i.jsx)(e.td,{children:"26"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"549.76 GB"}),(0,i.jsx)(e.td,{children:"354.69 GB"}),(0,i.jsx)(e.td,{children:"27"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"1.10 TB"}),(0,i.jsx)(e.td,{children:"739.37 GB"}),(0,i.jsx)(e.td,{children:"28"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"2.20 TB"}),(0,i.jsx)(e.td,{children:"1.52 TB"}),(0,i.jsx)(e.td,{children:"29"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"4.40 TB"}),(0,i.jsx)(e.td,{children:"3.10 TB"}),(0,i.jsx)(e.td,{children:"30"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"8.80 TB"}),(0,i.jsx)(e.td,{children:"6.29 TB"}),(0,i.jsx)(e.td,{children:"31"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"17.59 TB"}),(0,i.jsx)(e.td,{children:"12.70 TB"}),(0,i.jsx)(e.td,{children:"32"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"35.18 TB"}),(0,i.jsx)(e.td,{children:"25.57 TB"}),(0,i.jsx)(e.td,{children:"33"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"70.37 TB"}),(0,i.jsx)(e.td,{children:"51.37 TB"}),(0,i.jsx)(e.td,{children:"34"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"140.74 TB"}),(0,i.jsx)(e.td,{children:"103.08 TB"}),(0,i.jsx)(e.td,{children:"35"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"281.47 TB"}),(0,i.jsx)(e.td,{children:"206.65 TB"}),(0,i.jsx)(e.td,{children:"36"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"562.95 TB"}),(0,i.jsx)(e.td,{children:"413.98 TB"}),(0,i.jsx)(e.td,{children:"37"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"1.13 PB"}),(0,i.jsx)(e.td,{children:"828.91 TB"}),(0,i.jsx)(e.td,{children:"38"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"2.25 PB"}),(0,i.jsx)(e.td,{children:"1.66 PB"}),(0,i.jsx)(e.td,{children:"39"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"4.50 PB"}),(0,i.jsx)(e.td,{children:"3.32 PB"}),(0,i.jsx)(e.td,{children:"40"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"9.01 PB"}),(0,i.jsx)(e.td,{children:"6.64 PB"}),(0,i.jsx)(e.td,{children:"41"})]})]})]}),"\n",(0,i.jsx)(e.h3,{id:"encrypted---paranoid",children:"Encrypted - PARANOID"}),"\n",(0,i.jsxs)(e.table,{children:[(0,i.jsx)(e.thead,{children:(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.th,{children:"Theoretical Volume"}),(0,i.jsx)(e.th,{children:"Effective Volume"}),(0,i.jsx)(e.th,{children:"Batch Depth"})]})}),(0,i.jsxs)(e.tbody,{children:[(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"536.87 MB"}),(0,i.jsx)(e.td,{children:"13.17 kB"}),(0,i.jsx)(e.td,{children:"17"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"1.07 GB"}),(0,i.jsx)(e.td,{children:"1.96 MB"}),(0,i.jsx)(e.td,{children:"18"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"2.15 GB"}),(0,i.jsx)(e.td,{children:"33.01 MB"}),(0,i.jsx)(e.td,{children:"19"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"4.29 GB"}),(0,i.jsx)(e.td,{children:"202.53 MB"}),(0,i.jsx)(e.td,{children:"20"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"8.59 GB"}),(0,i.jsx)(e.td,{children:"765.05 MB"}),(0,i.jsx)(e.td,{children:"21"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"17.18 GB"}),(0,i.jsx)(e.td,{children:"2.28 GB"}),(0,i.jsx)(e.td,{children:"22"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"34.36 GB"}),(0,i.jsx)(e.td,{children:"5.87 GB"}),(0,i.jsx)(e.td,{children:"23"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"68.72 GB"}),(0,i.jsx)(e.td,{children:"13.86 GB"}),(0,i.jsx)(e.td,{children:"24"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"137.44 GB"}),(0,i.jsx)(e.td,{children:"31.08 GB"}),(0,i.jsx)(e.td,{children:"25"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"274.88 GB"}),(0,i.jsx)(e.td,{children:"67.15 GB"}),(0,i.jsx)(e.td,{children:"26"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"549.76 GB"}),(0,i.jsx)(e.td,{children:"140.40 GB"}),(0,i.jsx)(e.td,{children:"27"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"1.10 TB"}),(0,i.jsx)(e.td,{children:"292.67 GB"}),(0,i.jsx)(e.td,{children:"28"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"2.20 TB"}),(0,i.jsx)(e.td,{children:"602.12 GB"}),(0,i.jsx)(e.td,{children:"29"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"4.40 TB"}),(0,i.jsx)(e.td,{children:"1.23 TB"}),(0,i.jsx)(e.td,{children:"30"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"8.80 TB"}),(0,i.jsx)(e.td,{children:"2.49 TB"}),(0,i.jsx)(e.td,{children:"31"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"17.59 TB"}),(0,i.jsx)(e.td,{children:"5.03 TB"}),(0,i.jsx)(e.td,{children:"32"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"35.18 TB"}),(0,i.jsx)(e.td,{children:"10.12 TB"}),(0,i.jsx)(e.td,{children:"33"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"70.37 TB"}),(0,i.jsx)(e.td,{children:"20.34 TB"}),(0,i.jsx)(e.td,{children:"34"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"140.74 TB"}),(0,i.jsx)(e.td,{children:"40.80 TB"}),(0,i.jsx)(e.td,{children:"35"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"281.47 TB"}),(0,i.jsx)(e.td,{children:"81.80 TB"}),(0,i.jsx)(e.td,{children:"36"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"562.95 TB"}),(0,i.jsx)(e.td,{children:"163.87 TB"}),(0,i.jsx)(e.td,{children:"37"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"1.13 PB"}),(0,i.jsx)(e.td,{children:"328.11 TB"}),(0,i.jsx)(e.td,{children:"38"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"2.25 PB"}),(0,i.jsx)(e.td,{children:"656.76 TB"}),(0,i.jsx)(e.td,{children:"39"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"4.50 PB"}),(0,i.jsx)(e.td,{children:"1.31 PB"}),(0,i.jsx)(e.td,{children:"40"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:"9.01 PB"}),(0,i.jsx)(e.td,{children:"2.63 PB"}),(0,i.jsx)(e.td,{children:"41"})]})]})]})]})}function x(s={}){const{wrapper:e}={...(0,d.R)(),...s.components};return e?(0,i.jsx)(e,{...s,children:(0,i.jsx)(c,{...s})}):c(s)}},41005(s,e,t){t.d(e,{A:()=>n});const n=t.p+"assets/images/batches_01-e084efba3e803068f01309d12db9d7cb.png"},59382(s,e,t){t.d(e,{A:()=>n});const n=t.p+"assets/images/batches_02-b0d64e9f456ec3ced0720d7e923ab93e.png"},55711(s,e,t){t.d(e,{A:()=>n});const n=t.p+"assets/images/batches_03-d33365fe10a3274d74ddfdd0950bf610.png"},4384(s,e,t){t.d(e,{A:()=>n});const n=t.p+"assets/images/batches_04-82c8f844e94e1f8c2bdd58ec7c127780.png"},28453(s,e,t){t.d(e,{R:()=>l,x:()=>r});var n=t(96540);const i={},d=n.createContext(i);function l(s){const e=n.useContext(d);return n.useMemo(function(){return"function"==typeof s?s(e):{...e,...s}},[e,s])}function r(s){let e;return e=s.disableParentContext?"function"==typeof s.components?s.components(i):s.components||i:l(s.components),n.createElement(d.Provider,{value:e},s.children)}}}]); \ No newline at end of file diff --git a/assets/js/d84224c7.83a87f8a.js b/assets/js/d84224c7.83a87f8a.js new file mode 100644 index 000000000..b915c3c5a --- /dev/null +++ b/assets/js/d84224c7.83a87f8a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[3481],{96549(e,n,t){t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>c,frontMatter:()=>i,metadata:()=>o,toc:()=>l});const o=JSON.parse('{"id":"develop/multi-author-blog","title":"Multi-Author Blog","description":"Build a decentralized multi-author blog on Swarm using linked feeds \u2014 each author has their own feed, and a master index feed ties them together.","source":"@site/docs/develop/multi-author-blog.md","sourceDirName":"develop","slug":"/develop/multi-author-blog","permalink":"/docs/develop/multi-author-blog","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/develop/multi-author-blog.md","tags":[],"version":"current","frontMatter":{"title":"Multi-Author Blog","id":"multi-author-blog","sidebar_label":"Multi-Author Blog","description":"Build a decentralized multi-author blog on Swarm using linked feeds \u2014 each author has their own feed, and a master index feed ties them together."},"sidebar":"develop","previous":{"title":"Dynamic Content","permalink":"/docs/develop/dynamic-content"},"next":{"title":"Add Access Control","permalink":"/docs/develop/act"}}');var s=t(74848),a=t(28453);const i={title:"Multi-Author Blog",id:"multi-author-blog",sidebar_label:"Multi-Author Blog",description:"Build a decentralized multi-author blog on Swarm using linked feeds \u2014 each author has their own feed, and a master index feed ties them together."},r=void 0,d={},l=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Architecture",id:"architecture",level:2},{value:"Feeds Referencing Feeds",id:"feeds-referencing-feeds",level:2},{value:"Example Scripts",id:"example-scripts",level:2},{value:"Example Project \u2014 Multi-Author Blog",id:"example-project--multi-author-blog",level:2},{value:"Project Setup",id:"project-setup",level:3},{value:"Project Structure",id:"project-structure",level:3},{value:"Initialize the Blog",id:"initialize-the-blog",level:3},{value:"Add a Post",id:"add-a-post",level:3},{value:"Update the Homepage",id:"update-the-homepage",level:3},{value:"Read the Blog",id:"read-the-blog",level:3},{value:"Adding a New Author",id:"adding-a-new-author",level:3},{value:"Summary",id:"summary",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:["This guide extends the ",(0,s.jsx)(n.a,{href:"/docs/develop/dynamic-content",children:"Dynamic Content"})," pattern into a multi-author system. Instead of a single publisher managing one feed, each author independently controls their own feed, and an admin maintains an index feed that links them all together. This demonstrates the core architectural pattern needed for decentralized networks: ",(0,s.jsx)(n.strong,{children:"feeds that reference other feeds"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"The key insight is that a feed entry does not have to point to HTML content \u2014 it can point to any Swarm data, including a JSON manifest that describes other feeds. This creates a composable, decentralized publishing network without any central coordinator beyond a shared index feed."}),"\n",(0,s.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["A running Bee node (",(0,s.jsx)(n.a,{href:"/docs/bee/installation/quick-start",children:"install guide"}),")"]}),"\n",(0,s.jsxs)(n.li,{children:["A valid postage stamp batch (",(0,s.jsx)(n.a,{href:"/docs/develop/tools-and-features/buy-a-stamp-batch",children:"how to get one"}),")"]}),"\n",(0,s.jsxs)(n.li,{children:["Node.js 18+ and ",(0,s.jsx)(n.code,{children:"@ethersphere/bee-js"})," installed"]}),"\n",(0,s.jsxs)(n.li,{children:["Familiarity with the ",(0,s.jsx)(n.a,{href:"/docs/develop/dynamic-content",children:"Dynamic Content"})," guide and feeds"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"architecture",children:"Architecture"}),"\n",(0,s.jsx)(n.p,{children:"The multi-author blog consists of four feed layers:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:'Index Feed (admin key, topic: "blog-index")\n \u2514\u2500 points to \u2192 authors.json\n \u251c\u2500 { name: "Alice", topic: "alice-posts", owner: "0xAlice...", feedManifest: "3fa19c..." }\n \u2514\u2500 { name: "Bob", topic: "bob-posts", owner: "0xBob...", feedManifest: "7c244b..." }\n\nAlice\'s Feed (alice key, topic: "alice-posts")\n \u2514\u2500 points to \u2192 alice\'s blog page HTML\n\nBob\'s Feed (bob key, topic: "bob-posts")\n \u2514\u2500 points to \u2192 bob\'s blog page HTML\n\nHomepage Feed (admin key, topic: "blog-home")\n \u2514\u2500 points to \u2192 index.html (aggregated view reading all author feeds)\n'})}),"\n",(0,s.jsx)(n.p,{children:"Each author publishes independently to their own feed. The admin reads from all author feeds, assembles an aggregated homepage, and publishes it. The index feed stores the master list of authors \u2014 any new reader can discover all authors by reading the index."}),"\n",(0,s.jsx)(n.h2,{id:"feeds-referencing-feeds",children:"Feeds Referencing Feeds"}),"\n",(0,s.jsxs)(n.p,{children:["The Simple Blog example in the ",(0,s.jsx)(n.a,{href:"/docs/develop/dynamic-content#example-project--simple-blog",children:"Dynamic Content guide"})," demonstrated regenerate-and-publish: upload content, point a feed to it, update the feed manifest URL. The multi-author blog adds a new dimension: ",(0,s.jsx)(n.strong,{children:"feeds as data structures"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["When you store a JSON document inside a feed that contains the ",(0,s.jsx)(n.code,{children:"topic"})," and ",(0,s.jsx)(n.code,{children:"owner"})," of other feeds, you've created a directory of feeds \u2014 a linked network. The ",(0,s.jsx)(n.code,{children:"authors.json"})," file is not just content; it's a data structure that enumerates other feeds and their stable references (feed manifest hashes)."]}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsx)(n.p,{children:"A feed manifest hash is a stable, permanent reference to a feed. You can store feed manifest hashes inside your index feed's JSON payload, and readers just need that manifest hash to follow the link \u2014 they don't need the topic string or owner address separately. Manifest hashes are your \"URLs\" between feeds."})}),"\n",(0,s.jsxs)(n.p,{children:["This pattern scales. You can have hundreds of author feeds, all discovered through a single index feed. Add a new author by appending their entry to ",(0,s.jsx)(n.code,{children:"authors.json"})," and re-uploading to the index feed. Readers polling the index automatically discover the new author \u2014 no out-of-band notification needed."]}),"\n",(0,s.jsx)(n.h2,{id:"example-scripts",children:"Example Scripts"}),"\n",(0,s.jsxs)(n.p,{children:["The complete project is in the ",(0,s.jsx)(n.a,{href:"https://github.com/ethersphere/examples/tree/main/multi-author-blog",children:(0,s.jsx)(n.code,{children:"multi-author-blog"})})," directory of the ",(0,s.jsx)(n.a,{href:"https://github.com/ethersphere/examples",children:"examples"})," repo:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://github.com/ethersphere/examples/blob/main/multi-author-blog/init.js",children:(0,s.jsx)(n.code,{children:"init.js"})})," \u2014 One-time setup: create all feeds and manifests"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://github.com/ethersphere/examples/blob/main/multi-author-blog/add-post.js",children:(0,s.jsx)(n.code,{children:"add-post.js"})})," \u2014 Author publishes a new post"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://github.com/ethersphere/examples/blob/main/multi-author-blog/update-index.js",children:(0,s.jsx)(n.code,{children:"update-index.js"})})," \u2014 Admin aggregates author feeds and updates homepage"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://github.com/ethersphere/examples/blob/main/multi-author-blog/add-author.js",children:(0,s.jsx)(n.code,{children:"add-author.js"})})," \u2014 Add a new author to the blog"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://github.com/ethersphere/examples/blob/main/multi-author-blog/read.js",children:(0,s.jsx)(n.code,{children:"read.js"})})," \u2014 Read the feeds without private keys"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Clone the repo and set up the project:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"git clone https://github.com/ethersphere/examples.git\ncd examples/multi-author-blog\nnpm install\ncp .env.example .env\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Fill in your ",(0,s.jsx)(n.code,{children:"BATCH_ID"})," in ",(0,s.jsx)(n.code,{children:".env"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"BEE_URL=http://localhost:1633\nBATCH_ID=<YOUR_BATCH_ID>\n"})}),"\n",(0,s.jsx)(n.h2,{id:"example-project--multi-author-blog",children:"Example Project \u2014 Multi-Author Blog"}),"\n",(0,s.jsx)(n.p,{children:"This section builds a complete runnable project: a blog where multiple authors publish independently, and an admin maintains a homepage that aggregates all posts."}),"\n",(0,s.jsx)(n.h3,{id:"project-setup",children:"Project Setup"}),"\n",(0,s.jsxs)(n.p,{children:["Use the cloned examples repo (see ",(0,s.jsx)(n.a,{href:"#example-scripts",children:"Example Scripts"})," above):"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"cd examples/multi-author-blog\nnpm install\ncp .env.example .env\n# Fill in BEE_URL and BATCH_ID in .env\n"})}),"\n",(0,s.jsx)(n.h3,{id:"project-structure",children:"Project Structure"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"swarm-multiblog/\n\u251c\u2500\u2500 .env\n\u251c\u2500\u2500 config.json # Created by init.js \u2014 all keys and manifest hashes\n\u251c\u2500\u2500 authors.json # Created by init.js \u2014 directory of authors\n\u251c\u2500\u2500 alice-posts.json # Created by add-post.js \u2014 Alice's post list\n\u251c\u2500\u2500 bob-posts.json # Created by add-post.js \u2014 Bob's post list\n\u251c\u2500\u2500 init.js # One-time setup: create all feeds and manifests\n\u251c\u2500\u2500 add-post.js # Author publishes a new post\n\u251c\u2500\u2500 update-index.js # Admin aggregates author feeds and updates homepage\n\u2514\u2500\u2500 read.js # Read the feeds without private keys\n"})}),"\n",(0,s.jsx)(n.h3,{id:"initialize-the-blog",children:"Initialize the Blog"}),"\n",(0,s.jsxs)(n.p,{children:["This step generates keys for all authors and the admin, creates feeds for each author and for the homepage, builds the index feed with an ",(0,s.jsx)(n.code,{children:"authors.json"})," manifest, and saves everything to ",(0,s.jsx)(n.code,{children:"config.json"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["Create ",(0,s.jsx)(n.code,{children:"init.js"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",children:'import { Bee, Topic, PrivateKey } from "@ethersphere/bee-js";\nimport crypto from "crypto";\nimport { writeFileSync } from "fs";\nimport { config } from "dotenv";\nconfig();\n\nconst bee = new Bee(process.env.BEE_URL);\nconst batchId = process.env.BATCH_ID;\n\nfunction makeKey() {\n const hex = "0x" + crypto.randomBytes(32).toString("hex");\n return new PrivateKey(hex);\n}\n\n// Generate keys for admin, Alice, and Bob\nconst adminKey = makeKey();\nconst aliceKey = makeKey();\nconst bobKey = makeKey();\n\nconst adminOwner = adminKey.publicKey().address();\nconst aliceOwner = aliceKey.publicKey().address();\nconst bobOwner = bobKey.publicKey().address();\n\n// Topics \u2014 each feed has a unique topic\nconst aliceTopic = Topic.fromString("alice-posts");\nconst bobTopic = Topic.fromString("bob-posts");\nconst indexTopic = Topic.fromString("blog-index");\nconst homeTopic = Topic.fromString("blog-home");\n\n// --- Step 1: Upload initial author pages ---\nconst aliceHTML = generateAuthorHTML("Alice", []);\nconst bobHTML = generateAuthorHTML("Bob", []);\n\nconst aliceUpload = await bee.uploadFile(batchId, aliceHTML, "index.html", {\n contentType: "text/html",\n});\nconst bobUpload = await bee.uploadFile(batchId, bobHTML, "index.html", {\n contentType: "text/html",\n});\n\n// --- Step 2: Create author feeds ---\nconst aliceWriter = bee.makeFeedWriter(aliceTopic, aliceKey);\nconst bobWriter = bee.makeFeedWriter(bobTopic, bobKey);\n\nawait aliceWriter.upload(batchId, aliceUpload.reference);\nawait bobWriter.upload(batchId, bobUpload.reference);\n\n// --- Step 3: Create author feed manifests (stable references) ---\nconst aliceManifest = await bee.createFeedManifest(batchId, aliceTopic, aliceOwner);\nconst bobManifest = await bee.createFeedManifest(batchId, bobTopic, bobOwner);\n\nconsole.log("Alice feed manifest:", aliceManifest.toHex());\nconsole.log("Bob feed manifest: ", bobManifest.toHex());\n\n// --- Step 4: Build and upload the authors.json index ---\nconst authors = [\n {\n name: "Alice",\n topic: "alice-posts",\n owner: aliceOwner.toHex(),\n feedManifest: aliceManifest.toHex(),\n },\n {\n name: "Bob",\n topic: "bob-posts",\n owner: bobOwner.toHex(),\n feedManifest: bobManifest.toHex(),\n },\n];\nconst authorsJson = JSON.stringify(authors, null, 2);\nwriteFileSync("authors.json", authorsJson);\n\nconst indexUpload = await bee.uploadFile(batchId, authorsJson, "authors.json", {\n contentType: "application/json",\n});\n\n// --- Step 5: Create the index feed ---\nconst indexWriter = bee.makeFeedWriter(indexTopic, adminKey);\nawait indexWriter.upload(batchId, indexUpload.reference);\nconst indexManifest = await bee.createFeedManifest(batchId, indexTopic, adminOwner);\n\nconsole.log("Index feed manifest:", indexManifest.toHex());\n\n// --- Step 6: Generate and upload the homepage ---\nconst homeHTML = generateHomepageHTML(authors, []);\nconst homeUpload = await bee.uploadFile(batchId, homeHTML, "index.html", {\n contentType: "text/html",\n});\n\nconst homeWriter = bee.makeFeedWriter(homeTopic, adminKey);\nawait homeWriter.upload(batchId, homeUpload.reference);\nconst homeManifest = await bee.createFeedManifest(batchId, homeTopic, adminOwner);\n\n// --- Step 7: Save config ---\nconst cfg = {\n admin: { privateKey: adminKey.toHex(), owner: adminOwner.toHex() },\n alice: { privateKey: aliceKey.toHex(), owner: aliceOwner.toHex() },\n bob: { privateKey: bobKey.toHex(), owner: bobOwner.toHex() },\n topics: {\n alice: "alice-posts",\n bob: "bob-posts",\n index: "blog-index",\n home: "blog-home",\n },\n manifests: {\n alice: aliceManifest.toHex(),\n bob: bobManifest.toHex(),\n index: indexManifest.toHex(),\n home: homeManifest.toHex(),\n },\n};\nwriteFileSync("config.json", JSON.stringify(cfg, null, 2));\n\nconsole.log("\\nBlog initialized!");\nconsole.log("Homepage: " + `${process.env.BEE_URL}/bzz/${homeManifest.toHex()}/`);\nconsole.log("Alice\'s feed: " + `${process.env.BEE_URL}/bzz/${aliceManifest.toHex()}/`);\nconsole.log("Bob\'s feed: " + `${process.env.BEE_URL}/bzz/${bobManifest.toHex()}/`);\n\nfunction generateAuthorHTML(name, posts) {\n const items = posts\n .map(\n (p) => `\n <div style="border:1px solid #ddd; padding:12px; margin:8px 0; border-radius:4px;">\n <h2 style="margin:0 0 4px 0;">${p.title}</h2>\n <small style="color:#888;">${p.date}</small>\n <p>${p.body}</p>\n </div>`\n )\n .join("\\n");\n\n return `<!DOCTYPE html>\n<html>\n<head><meta charset="utf-8"><title>${name}\'s Blog\n\n

    ${name}\'s Blog

    \n

    ${posts.length} post${posts.length !== 1 ? "s" : ""}

    \n ${items || "

    No posts yet.

    "}\n\n`;\n}\n\nfunction generateHomepageHTML(authors, latestPosts) {\n const cards = authors\n .map(\n (a) => {\n const latest = latestPosts.find((p) => p.author === a.name);\n const preview = latest\n ? `

    ${latest.title} \u2014 ${latest.date}

    ${latest.body.slice(0, 120)}\u2026

    `\n : `

    No posts yet.

    `;\n return `
    \n

    ${a.name}

    \n ${preview}\n
    `;\n }\n )\n .join("\\n");\n\n return `\n\nMulti-Author Blog\n\n

    Multi-Author Blog

    \n

    ${authors.length} author${authors.length !== 1 ? "s" : ""}

    \n ${cards || "

    No authors yet.

    "}\n\n`;\n}\n'})}),"\n",(0,s.jsx)(n.p,{children:"Run it once to initialize the blog:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"node init.js\n# or: npm run init\n"})}),"\n",(0,s.jsx)(n.p,{children:"Example output:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"Alice feed manifest: 3fa19c...\nBob feed manifest: 7c244b...\nIndex feed manifest: a10be5...\n\nBlog initialized!\nHomepage: http://localhost:1633/bzz/d991f2.../\nAlice's feed: http://localhost:1633/bzz/3fa19c.../\nBob's feed: http://localhost:1633/bzz/7c244b.../\n"})}),"\n",(0,s.jsx)(n.h3,{id:"add-a-post",children:"Add a Post"}),"\n",(0,s.jsx)(n.p,{children:"Authors publish independently. Each author regenerates their blog page with the new post, uploads it, and updates their feed. The admin can then aggregate the latest posts into the homepage."}),"\n",(0,s.jsxs)(n.p,{children:["Create ",(0,s.jsx)(n.code,{children:"add-post.js"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",children:'import { Bee, Topic, PrivateKey } from "@ethersphere/bee-js";\nimport { readFileSync, writeFileSync } from "fs";\nimport { config } from "dotenv";\nconfig();\n\nconst [,, authorArg, title, ...bodyWords] = process.argv;\nconst body = bodyWords.join(" ");\n\nif (!authorArg || !title || !body) {\n console.error(\'Usage: node add-post.js "Post title" "Post body"\');\n process.exit(1);\n}\n\nconst bee = new Bee(process.env.BEE_URL);\nconst batchId = process.env.BATCH_ID;\nconst cfg = JSON.parse(readFileSync("config.json", "utf-8"));\n\nconst author = cfg[authorArg];\nif (!author) {\n console.error(`Unknown author: ${authorArg}`);\n process.exit(1);\n}\n\nconst pk = new PrivateKey(author.privateKey);\nconst topic = Topic.fromString(cfg.topics[authorArg]);\n\n// Load or initialize the author\'s post list\nconst postsFile = `${authorArg}-posts.json`;\nlet posts = [];\ntry {\n posts = JSON.parse(readFileSync(postsFile, "utf-8"));\n} catch {\n // First post \u2014 file doesn\'t exist yet\n}\n\nconst newPost = { title, body, date: new Date().toISOString() };\nposts.push(newPost);\nwriteFileSync(postsFile, JSON.stringify(posts, null, 2));\n\n// Regenerate the author\'s page HTML\nconst html = generateAuthorHTML(\n authorArg.charAt(0).toUpperCase() + authorArg.slice(1),\n posts\n);\n\n// Upload and update the author\'s feed\nconst upload = await bee.uploadFile(batchId, html, "index.html", {\n contentType: "text/html",\n});\nconst writer = bee.makeFeedWriter(topic, pk);\nawait writer.upload(batchId, upload.reference);\n\nconsole.log(`Post published by ${authorArg}! (${posts.length} total)`);\nconsole.log("View: " + `${process.env.BEE_URL}/bzz/${cfg.manifests[authorArg]}/`);\n\nfunction generateAuthorHTML(name, posts) {\n const items = posts\n .map(\n (p) => `\n
    \n

    ${p.title}

    \n ${p.date}\n

    ${p.body}

    \n
    `\n )\n .join("\\n");\n\n return `\n\n${name}\'s Blog\n\n

    ${name}\'s Blog

    \n

    ${posts.length} post${posts.length !== 1 ? "s" : ""}

    \n ${items}\n\n`;\n}\n'})}),"\n",(0,s.jsx)(n.p,{children:"Run it:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'node add-post.js alice "Hello Swarm" "My first post on a decentralized blog."\nnode add-post.js bob "Why Swarm?" "Censorship resistance matters."\n# or: npm run add-post -- alice "Hello Swarm" "My first post on a decentralized blog."\n'})}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsx)(n.p,{children:"Authors are fully independent. Bob can publish a post without Alice's involvement, without any coordination, and without running any admin script. Each author controls only their own private key and topic. The admin (homepage aggregator) runs separately and at their own discretion."})}),"\n",(0,s.jsx)(n.h3,{id:"update-the-homepage",children:"Update the Homepage"}),"\n",(0,s.jsx)(n.p,{children:"The admin aggregates all author feeds and publishes an updated homepage with previews of their latest posts. This is the key demonstration of feeds referencing feeds: the aggregator reads the index feed to discover authors, then reads each author's feed to fetch their latest content."}),"\n",(0,s.jsxs)(n.p,{children:["Create ",(0,s.jsx)(n.code,{children:"update-index.js"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",children:'import { Bee, Topic, EthAddress, PrivateKey } from "@ethersphere/bee-js";\nimport { readFileSync, writeFileSync } from "fs";\nimport { config } from "dotenv";\nconfig();\n\nconst bee = new Bee(process.env.BEE_URL);\nconst batchId = process.env.BATCH_ID;\nconst cfg = JSON.parse(readFileSync("config.json", "utf-8"));\nconst authors = JSON.parse(readFileSync("authors.json", "utf-8"));\n\n// Read each author\'s latest feed entry to confirm their feed is live\nconst latestPosts = [];\nfor (const author of authors) {\n const topic = Topic.fromString(author.topic);\n const owner = new EthAddress(author.owner);\n const reader = bee.makeFeedReader(topic, owner);\n\n try {\n const result = await reader.download();\n console.log(`${author.name}: feed index ${result.feedIndex.toBigInt()}`);\n\n // Load the local post sidecar to get post data for the preview\n const postsFile = `${author.name.toLowerCase()}-posts.json`;\n const posts = JSON.parse(readFileSync(postsFile, "utf-8"));\n const latest = posts.at(-1);\n if (latest) {\n latestPosts.push({ author: author.name, ...latest });\n }\n } catch {\n console.log(`${author.name}: no feed entries yet`);\n }\n}\n\n// Regenerate homepage with latest post previews from all authors\nconst homeHTML = generateHomepageHTML(authors, latestPosts);\nconst homeUpload = await bee.uploadFile(batchId, homeHTML, "index.html", {\n contentType: "text/html",\n});\n\nconst adminKey = new PrivateKey(cfg.admin.privateKey);\nconst homeTopic = Topic.fromString(cfg.topics.home);\nconst homeWriter = bee.makeFeedWriter(homeTopic, adminKey);\nawait homeWriter.upload(batchId, homeUpload.reference);\n\nconsole.log("\\nHomepage updated!");\nconsole.log("View: " + `${process.env.BEE_URL}/bzz/${cfg.manifests.home}/`);\n\nfunction generateHomepageHTML(authors, latestPosts) {\n const cards = authors\n .map(\n (a) => {\n const latest = latestPosts.find((p) => p.author === a.name);\n const preview = latest\n ? `

    ${latest.title} \u2014 ${latest.date}

    ${latest.body.slice(0, 120)}\u2026

    `\n : `

    No posts yet.

    `;\n return `
    \n

    ${a.name}

    \n ${preview}\n
    `;\n }\n )\n .join("\\n");\n\n return `\n\nMulti-Author Blog\n\n

    Multi-Author Blog

    \n

    ${authors.length} author${authors.length !== 1 ? "s" : ""}

    \n ${cards}\n\n`;\n}\n'})}),"\n",(0,s.jsx)(n.p,{children:"Run it after authors publish:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"node update-index.js\n# or: npm run update-index\n"})}),"\n",(0,s.jsxs)(n.p,{children:["The homepage now displays previews of the latest posts from all authors. The homepage feed manifest URL (",(0,s.jsx)(n.code,{children:"cfg.manifests.home"}),") always serves the aggregated view."]}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"update-index.js"})," script reads local JSON sidecars (",(0,s.jsx)(n.code,{children:"alice-posts.json"}),", ",(0,s.jsx)(n.code,{children:"bob-posts.json"}),") to populate post previews. In a production system, each post would be a separate Swarm upload, and the author's feed would store a JSON post-list reference (topic + manifest hash) instead of raw HTML. See ",(0,s.jsx)(n.a,{href:"https://github.com/ethersphere/etherjot",children:"Etherjot"})," for a full-featured example of this approach."]})}),"\n",(0,s.jsx)(n.h3,{id:"read-the-blog",children:"Read the Blog"}),"\n",(0,s.jsx)(n.p,{children:"Any third party can read the blog and discover all authors using only the index feed manifest hash. No private keys are needed."}),"\n",(0,s.jsxs)(n.p,{children:["Create ",(0,s.jsx)(n.code,{children:"read.js"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",children:'import { Bee, Topic, EthAddress } from "@ethersphere/bee-js";\nimport { readFileSync } from "fs";\nimport { config } from "dotenv";\nconfig();\n\nconst bee = new Bee(process.env.BEE_URL);\nconst cfg = JSON.parse(readFileSync("config.json", "utf-8"));\n\n// Read the index feed to get the current authors manifest\nconst indexTopic = Topic.fromString(cfg.topics.index);\nconst indexOwner = new EthAddress(cfg.admin.owner);\nconst indexReader = bee.makeFeedReader(indexTopic, indexOwner);\nconst indexResult = await indexReader.downloadReference();\nconsole.log("Index feed at index:", indexResult.feedIndex.toBigInt());\n\n// Download the authors.json manifest\nconst authorsData = await bee.downloadFile(indexResult.reference);\nconst authors = JSON.parse(authorsData.data.toUtf8());\n\nconsole.log(`\\n${authors.length} authors in blog:\\n`);\n\n// For each author, read their feed\nfor (const author of authors) {\n const topic = Topic.fromString(author.topic);\n const owner = new EthAddress(author.owner);\n const reader = bee.makeFeedReader(topic, owner);\n try {\n const result = await reader.download();\n console.log(`${author.name}`);\n console.log(` Feed index: ${result.feedIndex.toBigInt()}`);\n console.log(` URL: ${process.env.BEE_URL}/bzz/${author.feedManifest}/`);\n } catch {\n console.log(`${author.name}: feed not yet populated`);\n }\n}\n\n// Read the homepage feed\nconst homeTopic = Topic.fromString(cfg.topics.home);\nconst homeOwner = new EthAddress(cfg.admin.owner);\nconst homeReader = bee.makeFeedReader(homeTopic, homeOwner);\nconst homeResult = await homeReader.downloadReference();\nconsole.log(`\\nHomepage feed at index: ${homeResult.feedIndex.toBigInt()}`);\nconsole.log(`Homepage URL: ${process.env.BEE_URL}/bzz/${cfg.manifests.home}/`);\n'})}),"\n",(0,s.jsx)(n.p,{children:"Run it:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"node read.js\n# or: npm run read\n"})}),"\n",(0,s.jsx)(n.h3,{id:"adding-a-new-author",children:"Adding a New Author"}),"\n",(0,s.jsxs)(n.p,{children:["Extending the system with a new author is straightforward. The new author gets their own key and topic. Their entry is appended to ",(0,s.jsx)(n.code,{children:"authors.json"}),". Readers automatically discover them."]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.a,{href:"https://github.com/ethersphere/examples/blob/main/multi-author-blog/add-author.js",children:(0,s.jsx)(n.code,{children:"add-author.js"})})," script from the examples repo handles everything in one step. From the project directory (after running ",(0,s.jsx)(n.code,{children:"init.js"}),"):"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"node add-author.js charlie\n# or: npm run add-author -- charlie\n"})}),"\n",(0,s.jsx)(n.p,{children:"This will:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Generate a new private key for Charlie"}),"\n",(0,s.jsx)(n.li,{children:"Upload an initial empty blog page for them"}),"\n",(0,s.jsx)(n.li,{children:"Create their feed and feed manifest"}),"\n",(0,s.jsxs)(n.li,{children:["Append their entry to ",(0,s.jsx)(n.code,{children:"authors.json"})," and re-upload to the index feed"]}),"\n",(0,s.jsxs)(n.li,{children:["Update ",(0,s.jsx)(n.code,{children:"config.json"})," so Charlie can use ",(0,s.jsx)(n.code,{children:"add-post.js"})]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Then run ",(0,s.jsx)(n.code,{children:"update-index.js"})," to refresh the homepage with the new author."]}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:["Because the index feed always points to the ",(0,s.jsx)(n.em,{children:"latest"})," ",(0,s.jsx)(n.code,{children:"authors.json"}),", any reader who polls the index feed automatically discovers newly added authors. You don't need to notify readers through a separate channel \u2014 the feed is the notification channel."]})}),"\n",(0,s.jsx)(n.h2,{id:"summary",children:"Summary"}),"\n",(0,s.jsxs)(n.p,{children:["The multi-author blog demonstrates the key architectural pattern of large-scale Swarm applications: ",(0,s.jsx)(n.strong,{children:"composable feeds"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"Key takeaways:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"A feed entry can point to any Swarm content \u2014 HTML, JSON, images, or even the feed manifest hash of another feed."}),"\n",(0,s.jsx)(n.li,{children:"Storing topic + owner + manifest hashes in a JSON document creates a directory of feeds \u2014 a linked feed network."}),"\n",(0,s.jsx)(n.li,{children:"Feed manifest hashes are stable, permanent references. Use them as links between feeds."}),"\n",(0,s.jsx)(n.li,{children:"Authors are independent. Each controls their own key and topic. Publishing a new post requires no coordination with other authors or the admin."}),"\n",(0,s.jsx)(n.li,{children:"The homepage aggregator is a separate concern. It reads the index to discover authors, queries each author's feed for their latest content, and publishes the aggregated result."}),"\n",(0,s.jsx)(n.li,{children:"Adding new authors does not break existing URLs. The index feed is updatable; readers poll it and automatically discover new entries."}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"This architecture scales to hundreds of feeds and can represent complex data structures (threaded discussions, version hierarchies, category trees) \u2014 all composed from simple feed primitives and content-addressed storage."})]})}function c(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},28453(e,n,t){t.d(n,{R:()=>i,x:()=>r});var o=t(96540);const s={},a=o.createContext(s);function i(e){const n=o.useContext(a);return o.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d96f5c99.09bfa0d5.js b/assets/js/d96f5c99.09bfa0d5.js new file mode 100644 index 000000000..7de0c0d4d --- /dev/null +++ b/assets/js/d96f5c99.09bfa0d5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[1792],{70149(e,t,n){n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"develop/act","title":"Add Access Control","description":"Guide for implementing encryption and access control in decentralized applications using Bee.","source":"@site/docs/develop/access-control.md","sourceDirName":"develop","slug":"/develop/act","permalink":"/docs/develop/act","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/develop/access-control.md","tags":[],"version":"current","frontMatter":{"title":"Add Access Control","id":"act","description":"Guide for implementing encryption and access control in decentralized applications using Bee."},"sidebar":"develop","previous":{"title":"Multi-Author Blog","permalink":"/docs/develop/multi-author-blog"},"next":{"title":"Developer Resources","permalink":"/docs/develop/resources"}}');var a=n(74848),r=n(28453);const i={title:"Add Access Control",id:"act",description:"Guide for implementing encryption and access control in decentralized applications using Bee."},o=void 0,d={},c=[{value:"Upload",id:"upload",level:2},{value:"Download",id:"download",level:2},{value:"Grantee management",id:"grantee-management",level:2},{value:"Create",id:"create",level:3},{value:"Patch",id:"patch",level:3},{value:"Get",id:"get",level:3}];function l(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",p:"p",pre:"pre",strong:"strong",...(0,r.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.admonition,{type:"info",children:(0,a.jsxs)(t.p,{children:["This is guide contains a detailed explanation of how to use the ACT feature, but does not cover its higher level concepts. To better understand how ACT works and why to use it, read ",(0,a.jsx)(t.a,{href:"/docs/concepts/access-control",children:'the ACT page in the "Concepts" section'}),"."]})}),"\n",(0,a.jsxs)(t.p,{children:["In this section we'll provide information on how to use the ",(0,a.jsx)(t.strong,{children:"swarm-cli"})," to upload, download data with ACT or update the grantee list."]}),"\n",(0,a.jsx)(t.h2,{id:"upload",children:"Upload"}),"\n",(0,a.jsx)(t.p,{children:"Uploading data without ACT to the network remains unchanged."}),"\n",(0,a.jsxs)(t.p,{children:["To upload with ACT use the ",(0,a.jsx)(t.strong,{children:"act"})," and ",(0,a.jsx)(t.strong,{children:"act-history-address"})," flags following the ",(0,a.jsx)(t.strong,{children:"upload"})," command:"]}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:"swarm-cli upload test.txt --act --stamp $stamp_id --act-history-address $swarm_history_address\n"})}),"\n",(0,a.jsxs)(t.p,{children:["Here ",(0,a.jsx)(t.strong,{children:"act"})," indicates that the file provided shall be uploaded using ACT.\nThe ",(0,a.jsx)(t.strong,{children:"act-history-address"})," flag is the reference of the historical version of the ACT. It can be omitted, in which case the data is uploaded to a new history. If provided, then the data will be uploaded to that history as the latest version. In both cases the timestamp of the upload is taken as the key of the history entry.\nIf the provided ",(0,a.jsx)(t.strong,{children:"act-history-address"})," is invalid then the request will fail with a not found error."]}),"\n",(0,a.jsx)(t.p,{children:"The response returns the newly created reference encrypted with ACT and the header contains history reference."}),"\n",(0,a.jsx)(t.h2,{id:"download",children:"Download"}),"\n",(0,a.jsx)(t.p,{children:"Downloading data which was uploaded without ACT from the network remains unchanged."}),"\n",(0,a.jsxs)(t.p,{children:["To download with ACT use the ",(0,a.jsx)(t.strong,{children:"act"}),", ",(0,a.jsx)(t.strong,{children:"act-publisher"}),", ",(0,a.jsx)(t.strong,{children:"act-timestamp"})," and ",(0,a.jsx)(t.strong,{children:"act-history-address"})," flags following the ",(0,a.jsx)(t.strong,{children:"download"})," command:"]}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:"swarm-cli download $swarm_hash test.txt --act --act-history-address $swarm_history_address --act-publisher $public_key --timestamp $timestamp\n"})}),"\n",(0,a.jsxs)(t.p,{children:["Here ",(0,a.jsx)(t.strong,{children:"act"})," indicates that the ",(0,a.jsx)(t.strong,{children:"swarm_hash"})," shall be decrypted using the content publisher's public key as ",(0,a.jsx)(t.strong,{children:"act-publisher"})," and the lookup table mentioned above. The ",(0,a.jsx)(t.strong,{children:"act-history-address"})," flag is the reference of the historical version of the ACT based on the timestamp provided, however the ",(0,a.jsx)(t.strong,{children:"act-timestamp"})," flag can be omitted in which case the current timestamp is used."]}),"\n",(0,a.jsxs)(t.p,{children:["If the ",(0,a.jsx)(t.strong,{children:"act-history-address"})," or ",(0,a.jsx)(t.strong,{children:"act-publisher"}),' flags are omitted then the request is treated as a "usual" download.\nIf the data was uploaded with ACT and we try to download it without the ACT flags then the request will fail with a not found error.']}),"\n",(0,a.jsx)(t.h2,{id:"grantee-management",children:"Grantee management"}),"\n",(0,a.jsx)(t.p,{children:"Updating a grantee list literally means patching a json file containing the list of grantee swarm public keys."}),"\n",(0,a.jsx)(t.h3,{id:"create",children:"Create"}),"\n",(0,a.jsx)(t.p,{children:"A brand new grantee list can be created using the following command:"}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:"swarm-cli grantee create grantees.json --stamp $stamp_id\n"})}),"\n",(0,a.jsxs)(t.p,{children:["where ",(0,a.jsx)(t.strong,{children:"grantees.json"})," shall contain the key ",(0,a.jsx)(t.strong,{children:"grantees"})," with the list of public keys:"]}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-json",children:'{\n "grantees": [\n "03ec55e9fb2aefb8600f69142abaad79311516c232b28919d66efb4d41bce15bfa",\n "03fdcab22b455ce08a481d929a4cb9f447752545818eded1ad1785c51581e822c6"\n ]\n}\n'})}),"\n",(0,a.jsxs)(t.p,{children:["The response returns the newly created and encrypted grantee list and the history reference. Only the publisher can decrypt and therefore access the list.\nIf ",(0,a.jsx)(t.strong,{children:"act-history-address"})," is provided then the grantee list is uploaded as the newest version under that history."]}),"\n",(0,a.jsx)(t.h3,{id:"patch",children:"Patch"}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:"swarm-cli grantee patch grantees-patch.json --reference $grantee_reference --history $grantee_history_reference --stamp $stamp_id\n"})}),"\n",(0,a.jsxs)(t.p,{children:["where ",(0,a.jsx)(t.strong,{children:"grantees.json"})," shall contain the keys ",(0,a.jsx)(t.strong,{children:"add"})," and ",(0,a.jsx)(t.strong,{children:"revoke"})," with the list of public keys for granting and revoking access, respectively:"]}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-json",children:'{\n "add": ["03fdcab22b455ce08a481d929a4cb9f447752545818eded1ad1785c51581e822c6"],\n "revoke": [\n "03ec55e9fb2aefb8600f69142abaad79311516c232b28919d66efb4d41bce15bfa"\n ]\n}\n'})}),"\n",(0,a.jsxs)(t.p,{children:["The ",(0,a.jsx)(t.strong,{children:"reference"})," flag indicates the already existing encrypted grantee list reference that needs to be updated.\nThe ",(0,a.jsx)(t.strong,{children:"grantee_history_reference"})," indicates the reference of historical version of the list, where the encrypted list reference is added as a metadata to the history entry with the key ",(0,a.jsx)(t.strong,{children:'"encryptedglref"'})]}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.strong,{children:"Limitation"}),": If an update is called again within a second from the latest upload/update of a grantee list, then mantaray save fails with an invalid input error, because the key (timestamp) already exists, hence a new fork is not created."]}),"\n",(0,a.jsx)(t.h3,{id:"get",children:"Get"}),"\n",(0,a.jsx)(t.p,{children:"As stated above, only the publisher can decrypt and therefore access the list with the following command:"}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:"swarm-cli grantee get $grantee_reference\n"})}),"\n",(0,a.jsx)(t.p,{children:"which simply returns the latest version of the list."}),"\n",(0,a.jsxs)(t.p,{children:["Non-authorized access causes the request to fail with a not found error.\nFor each of the above operations, if the provided ",(0,a.jsx)(t.strong,{children:"act-history-address"})," or ",(0,a.jsx)(t.strong,{children:"reference"})," is invalid then the request will fail with a not found error."]})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(l,{...e})}):l(e)}},28453(e,t,n){n.d(t,{R:()=>i,x:()=>o});var s=n(96540);const a={},r=s.createContext(a);function i(e){const t=s.useContext(r);return s.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/da92f910.8a941187.js b/assets/js/da92f910.8a941187.js new file mode 100644 index 000000000..8f903895a --- /dev/null +++ b/assets/js/da92f910.8a941187.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[5411],{95641(e,n,t){t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>h,frontMatter:()=>r,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"bee/working-with-bee/swarm-cli","title":"Swarm CLI","description":"Introduces swarm-cli command-line tool that simplifies node interaction uploads downloads and batch management.","source":"@site/docs/bee/working-with-bee/swarm-cli.md","sourceDirName":"bee/working-with-bee","slug":"/bee/working-with-bee/swarm-cli","permalink":"/docs/bee/working-with-bee/swarm-cli","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/bee/working-with-bee/swarm-cli.md","tags":[],"version":"current","frontMatter":{"title":"Swarm CLI","id":"swarm-cli","description":"Introduces swarm-cli command-line tool that simplifies node interaction uploads downloads and batch management."},"sidebar":"bee","previous":{"title":"Logging in Bee","permalink":"/docs/bee/working-with-bee/logs-and-files"},"next":{"title":"Staking","permalink":"/docs/bee/working-with-bee/staking"}}');var i=t(74848),o=t(28453);const r={title:"Swarm CLI",id:"swarm-cli",description:"Introduces swarm-cli command-line tool that simplifies node interaction uploads downloads and batch management."},c=void 0,a={},d=[];function l(e){const n={a:"a",admonition:"admonition",code:"code",li:"li",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Swarm\u2011CLI"})," is a command\u2011line tool powered by ",(0,i.jsx)(n.code,{children:"bee-js"})," that makes it easy to interact with your Bee node directly from the command line. It\u2019s friendlier than working with the raw Bee HTTP API and faster than writing a custom ",(0,i.jsx)(n.code,{children:"bee-js"})," script when you just want to perform an action from the terminal."]}),"\n",(0,i.jsx)(n.admonition,{type:"tip",children:(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"swarm-cli"})," is the recommended method for interaction with your Bee node from the command line. Unless you have explicit need to use the Bee API directly, ",(0,i.jsx)(n.code,{children:"swarm-cli"})," is generally the better option."]})}),"\n",(0,i.jsx)(n.p,{children:"Common uses:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Check your node: ",(0,i.jsx)(n.code,{children:"swarm-cli status"})]}),"\n",(0,i.jsx)(n.li,{children:"Add stake:"}),"\n",(0,i.jsxs)(n.li,{children:["Upload files or a static site: ",(0,i.jsx)(n.code,{children:"swarm-cli upload "})," (will prompt to pick or create a postage batch)"]}),"\n",(0,i.jsxs)(n.li,{children:["Download content: ",(0,i.jsx)(n.code,{children:"swarm-cli download -o "})]}),"\n",(0,i.jsxs)(n.li,{children:["Inspect and manage postage batches: ",(0,i.jsx)(n.code,{children:"swarm-cli ..."})," (use ",(0,i.jsx)(n.code,{children:"--help"})," to see stamp-related commands)"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Why use it?"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"No scaffolding needed"})," \u2014 run direct commands without creating a project"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Interactive prompts"})," \u2014 it guides you through common tasks such as stamp purchasing and selection using interactive prompts"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Smart option inference"})," \u2014 it infers options based on your input (e.g., batch selection, index page, content type) so you don\u2019t need deep Bee API knowledge"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsxs)(n.strong,{children:["Powered by ",(0,i.jsx)(n.code,{children:"bee-js"})]})," \u2014 stays aligned with the latest Bee features"]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["It also greatly simplifies certain more complex tasks, such as as the management of ",(0,i.jsx)(n.a,{href:"/docs/develop/tools-and-features/feeds",children:"feeds"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["For installation and usage instructions, ",(0,i.jsx)(n.a,{href:"https://github.com/ethersphere/swarm-cli/blob/master/README.md",children:"see the README"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["To check the latest version, see the Swarm CLI ",(0,i.jsx)(n.a,{href:"https://github.com/ethersphere/swarm-cli/releases",children:"releases page"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["For further support and information, ",(0,i.jsx)(n.a,{href:"https://discord.com/invite/GU22h2utj6",children:"join the Swarm Discord server"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},28453(e,n,t){t.d(n,{R:()=>r,x:()=>c});var s=t(96540);const i={},o=s.createContext(i);function r(e){const n=s.useContext(o);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/dca20b09.46a520f4.js b/assets/js/dca20b09.46a520f4.js new file mode 100644 index 000000000..1f39a0681 --- /dev/null +++ b/assets/js/dca20b09.46a520f4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[3594],{76223(e,n,t){t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>d,default:()=>h,frontMatter:()=>s,metadata:()=>o,toc:()=>l});const o=JSON.parse('{"id":"develop/ultra-light-nodes","title":"Ultra Light Nodes","description":"Guide for running minimal ultra-light nodes with limited functionality and resource requirements.","source":"@site/docs/develop/ultra-light-nodes.md","sourceDirName":"develop","slug":"/develop/ultra-light-nodes","permalink":"/docs/develop/ultra-light-nodes","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/develop/ultra-light-nodes.md","tags":[],"version":"current","frontMatter":{"title":"Ultra Light Nodes","id":"ultra-light-nodes","description":"Guide for running minimal ultra-light nodes with limited functionality and resource requirements."}}');var i=t(74848),r=t(28453);const s={title:"Ultra Light Nodes",id:"ultra-light-nodes",description:"Guide for running minimal ultra-light nodes with limited functionality and resource requirements."},d=void 0,a={},l=[{value:"Configuration",id:"configuration",level:2},{value:"Mode of Operation",id:"mode-of-operation",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",p:"p",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.admonition,{type:"danger",children:(0,i.jsx)(n.p,{children:"When running without a blockchain connection, bandwidth incentive payments (SWAP) cannot be made so there is a risk of getting blocklisted by other peers for unpaid services."})}),"\n",(0,i.jsx)(n.h2,{id:"configuration",children:"Configuration"}),"\n",(0,i.jsxs)(n.p,{children:["To run Bee as an ultra-light node ",(0,i.jsx)(n.code,{children:"full-node"})," and ",(0,i.jsx)(n.code,{children:"swap-enable"})," must both be set to ",(0,i.jsx)(n.code,{children:"false"}),", and the ",(0,i.jsx)(n.code,{children:"blockchain-rpc-endpoint"})," value should be set to an empty string ",(0,i.jsx)(n.code,{children:'""'})," or commented out in the ",(0,i.jsx)(n.a,{href:"/docs/bee/working-with-bee/configuration",children:"configuration"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"mode-of-operation",children:"Mode of Operation"}),"\n",(0,i.jsxs)(n.p,{children:["The target audience for this mode of operations are users who want to try out running a node but don't\nwant to go through the hassle of blockchain onboarding. Ultra-light nodes will be able to download data as long as the data consumed does not exceed the payment threshold (",(0,i.jsx)(n.code,{children:"payment-threshold"})," in ",(0,i.jsx)(n.a,{href:"/docs/bee/working-with-bee/configuration",children:"configuration"}),") set by peers they connect to."]}),"\n",(0,i.jsx)(n.p,{children:"Running Bee without a connected blockchain backend, however, imposes some limitations:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Can't do overlay verification"}),"\n",(0,i.jsx)(n.li,{children:"Can't do SWAP settlements"}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Since we can't buy postage stamps:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Can't send PSS messages"}),"\n",(0,i.jsx)(n.li,{children:"Can't upload data to the network"}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},28453(e,n,t){t.d(n,{R:()=>s,x:()=>d});var o=t(96540);const i={},r=o.createContext(i);function s(e){const n=o.useContext(r);return o.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),o.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/df724892.d6e74a64.js b/assets/js/df724892.d6e74a64.js new file mode 100644 index 000000000..916d245d6 --- /dev/null +++ b/assets/js/df724892.d6e74a64.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[8539],{63276(e,t,n){n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>p,frontMatter:()=>i,metadata:()=>o,toc:()=>h});const o=JSON.parse('{"id":"bee/working-with-bee/bcrypt","title":"Bcrypt hashing utility","description":"Shows how to generate and validate bcrypt password hashes using Bee\'s built-in utilities or external tools.","source":"@site/docs/bee/working-with-bee/bcrypt.md","sourceDirName":"bee/working-with-bee","slug":"/bee/working-with-bee/bcrypt","permalink":"/docs/bee/working-with-bee/bcrypt","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/bee/working-with-bee/bcrypt.md","tags":[],"version":"current","frontMatter":{"title":"Bcrypt hashing utility","id":"bcrypt","description":"Shows how to generate and validate bcrypt password hashes using Bee\'s built-in utilities or external tools."}}');var r=n(74848),s=n(28453);const i={title:"Bcrypt hashing utility",id:"bcrypt",description:"Shows how to generate and validate bcrypt password hashes using Bee's built-in utilities or external tools."},a=void 0,c={},h=[];function d(e){const t={a:"a",admonition:"admonition",code:"code",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(t.p,{children:["In order to generate a valid admin password hash you can use any available bcrypt compatible tools, both ",(0,r.jsx)(t.a,{href:"https://bcrypt-generator.com/",children:"online"})," and offline (htpasswd)."]}),"\n",(0,r.jsx)(t.p,{children:"For convenience Bee also provides a method to generate and validate password hashes:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:"$ bee bcrypt super$ecret\n$2a$10$eZP5YuhJq2k8DFmj9UJGWOIjDtXu6NcAQMrz7Zj1bgIVBcHA3bU5u\n$ bee bcrypt --check super$ecret '$2a$10$eZP5YuhJq2k8DFmj9UJGWOIjDtXu6NcAQMrz7Zj1bgIVBcHA3bU5u'\nOK: password hash matches provided plain text\n"})}),"\n",(0,r.jsx)(t.admonition,{type:"info",children:(0,r.jsx)(t.p,{children:"When validating a hash don't forget about quotes - the ($) hash prefix might interfere with your terminal."})})]})}function p(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},28453(e,t,n){n.d(t,{R:()=>i,x:()=>a});var o=n(96540);const r={},s=o.createContext(r);function i(e){const t=o.useContext(s);return o.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e4170b6f.fd7dc0ca.js b/assets/js/e4170b6f.fd7dc0ca.js new file mode 100644 index 000000000..f23392bc6 --- /dev/null +++ b/assets/js/e4170b6f.fd7dc0ca.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[2854],{48285(e,t,s){s.r(t),s.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>h,frontMatter:()=>r,metadata:()=>n,toc:()=>l});const n=JSON.parse('{"id":"develop/tools-and-features/feeds","title":"Feeds","description":"Explains mutable content feeds allowing for updating content while maintaining a static address.","source":"@site/docs/develop/tools-and-features/feeds.md","sourceDirName":"develop/tools-and-features","slug":"/develop/tools-and-features/feeds","permalink":"/docs/develop/tools-and-features/feeds","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/develop/tools-and-features/feeds.md","tags":[],"version":"current","frontMatter":{"title":"Feeds","id":"feeds","description":"Explains mutable content feeds allowing for updating content while maintaining a static address."},"sidebar":"develop","previous":{"title":"Chunk Types","permalink":"/docs/develop/tools-and-features/chunk-types"},"next":{"title":"Manifests","permalink":"/docs/develop/tools-and-features/manifests"}}');var a=s(74848),o=s(28453);const r={title:"Feeds",id:"feeds",description:"Explains mutable content feeds allowing for updating content while maintaining a static address."},i=void 0,d={},l=[{value:"What are Feeds?",id:"what-are-feeds",level:2},{value:"Creating and Updating a Feed",id:"creating-and-updating-a-feed",level:2},{value:"No More ENS Transaction Charges",id:"no-more-ens-transaction-charges",level:2},{value:"Use Cases for Feeds",id:"use-cases-for-feeds",level:2}];function c(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",p:"p",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(t.p,{children:["Swarm feeds cleverly combine\n",(0,a.jsx)(t.a,{href:"/docs/develop/tools-and-features/chunk-types",children:"single owner chunks"}),"\ninto a data structure which enables you to have static addresses for\nyour mutable content. This means that you can signpost your data for\nother Bees, and then update it at will."]}),"\n",(0,a.jsx)(t.admonition,{type:"info",children:(0,a.jsxs)(t.p,{children:["Although it's possible to interact with feeds directly, it can involve\na little data juggling and crypto magic. For the easiest route, see\n",(0,a.jsx)(t.a,{href:"/docs/develop/tools-and-features/bee-js",children:"the bee-js feeds functionality"})," and\n",(0,a.jsx)(t.a,{href:"/docs/bee/working-with-bee/swarm-cli",children:"swarm-cli"}),", or for the super 1337,\nshare your implementations in other languages in the\n",(0,a.jsx)(t.a,{href:"https://discord.gg/8SMCfvm3kw",children:"#builders"})," channel of our\n",(0,a.jsx)(t.a,{href:"https://discord.gg/kHRyMNpw7t",children:"Discord Server"}),"."]})}),"\n",(0,a.jsx)(t.h2,{id:"what-are-feeds",children:"What are Feeds?"}),"\n",(0,a.jsxs)(t.p,{children:["A feed is a collection of Single Owner Chunks with predicatable addresses. This enables creators to upload pointers to data so that consumers of the feed are able to find the data in Swarm using only an ",(0,a.jsx)(t.em,{children:"Ethereum address"})," and ",(0,a.jsx)(t.em,{children:"Topic ID"}),"."]}),"\n",(0,a.jsx)(t.h2,{id:"creating-and-updating-a-feed",children:"Creating and Updating a Feed"}),"\n",(0,a.jsxs)(t.p,{children:["In order to edit a feed, you will need to sign your chunks using an\nEthereum keypair. For the intrepid, check out the ",(0,a.jsx)(t.a,{href:"https://www.ethswarm.org/the-book-of-swarm-2.pdf",children:"The Book of Swarm"})," on precise details on how to do\nthis. For the rest of us, both ",(0,a.jsx)(t.a,{href:"/docs/develop/tools-and-features/bee-js",children:"bee-js"}),"\nand ",(0,a.jsx)(t.a,{href:"/docs/bee/working-with-bee/swarm-cli",children:"swarm-cli"})," provide facilities\nto achieve this using JavaScript and a node-js powered command line\ntool respectively."]}),"\n",(0,a.jsx)(t.h2,{id:"no-more-ens-transaction-charges",children:"No More ENS Transaction Charges"}),"\n",(0,a.jsxs)(t.p,{children:["Swarm's feeds provide the ability to update your immutable content in a mutable world. Simply reference your feed's ",(0,a.jsx)(t.code,{children:"manifest address"})," as the ",(0,a.jsx)(t.code,{children:"content hash"})," in your ENS domain's resolver, and Bee will automatically provide the latest version of your website."]}),"\n",(0,a.jsx)(t.h2,{id:"use-cases-for-feeds",children:"Use Cases for Feeds"}),"\n",(0,a.jsx)(t.p,{children:"Feeds are a hugely versatile data structure. They allow you to host frequently updated content such as websites, RSS feeds (for podcasts, news, etc.), or even a DNS style architecture on top of Swarm's decentralized DISC."})]})}function h(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(c,{...e})}):c(e)}},28453(e,t,s){s.d(t,{R:()=>r,x:()=>i});var n=s(96540);const a={},o=n.createContext(a);function r(e){const t=n.useContext(o);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),n.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e694b58a.ee907f97.js b/assets/js/e694b58a.ee907f97.js new file mode 100644 index 000000000..cbfd53948 --- /dev/null +++ b/assets/js/e694b58a.ee907f97.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[8883],{66799(e){e.exports=JSON.parse('{"url":"redocusaurus/plugin-redoc-0.yaml","themeId":"theme-redoc","isSpecFile":true,"normalizeUrl":true,"spec":{"openapi":"3.0.3","info":{"version":"8.1.0","title":"Bee API","description":"API endpoints for interacting with the Swarm network, supporting file operations, messaging, and node management"},"externalDocs":{"description":"Browse the documentation at the Swarm Docs","url":"https://docs.ethswarm.org"},"servers":[{"url":"http://{apiRoot}:{port}/v1","variables":{"apiRoot":{"default":"localhost","description":"Base address of the local bee node main API"},"port":{"default":"1633","description":"Service port provided in bee node config"}}},{"url":"http://{apiRoot}:{port}","variables":{"apiRoot":{"default":"localhost","description":"Base address of the local bee node main API"},"port":{"default":"1633","description":"Service port provided in bee node config"}}}],"paths":{"/grantee":{"post":{"summary":"Create a grantee list","tags":["ACT"],"parameters":[{"in":"header","schema":{"$ref":"#/components/schemas/SwarmPostageBatchId"},"name":"swarm-postage-batch-id","required":true},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmTagParameter"},"name":"swarm-tag","required":false},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmPinParameter"},"name":"swarm-pin","required":false},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmDeferredUpload"},"name":"swarm-deferred-upload","required":false},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmActHistoryAddress"},"name":"swarm-act-history-address","required":false},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmRedundancyLevelParameter"},"name":"swarm-redundancy-level","required":false}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActGranteesCreateRequest"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActGranteesOperationResponse"}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"}}}},"/grantee/{address}":{"get":{"summary":"Get the grantee list","tags":["ACT"],"parameters":[{"in":"path","name":"address","schema":{"$ref":"#/components/schemas/SwarmEncryptedReference"},"required":true,"description":"Grantee list reference"},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmRedundancyLevelParameter"},"name":"swarm-redundancy-level","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicKey"}}}}},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}},"patch":{"summary":"Update the grantee list","description":"Add or remove grantees from an existing grantee list","tags":["ACT"],"parameters":[{"in":"path","name":"address","schema":{"$ref":"#/components/schemas/SwarmEncryptedReference"},"required":true,"description":"Grantee list reference"},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmActHistoryAddress"},"name":"swarm-act-history-address","required":true},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmPostageBatchId"},"name":"swarm-postage-batch-id","required":true},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmTagParameter"},"name":"swarm-tag","required":false},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmPinParameter"},"name":"swarm-pin","required":false},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmDeferredUpload"},"name":"swarm-deferred-upload","required":false},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmRedundancyLevelParameter"},"name":"swarm-redundancy-level","required":false}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActGranteesPatchRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActGranteesOperationResponse"}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"}}}},"/bytes":{"post":{"summary":"Upload data","tags":["Bytes"],"parameters":[{"$ref":"#/components/parameters/SwarmPostageBatchId"},{"$ref":"#/components/parameters/SwarmTagParameter"},{"$ref":"#/components/parameters/SwarmPinParameter"},{"$ref":"#/components/parameters/SwarmDeferredUpload"},{"$ref":"#/components/parameters/SwarmEncryptParameter"},{"$ref":"#/components/parameters/SwarmRedundancyLevelParameter"},{"$ref":"#/components/parameters/SwarmAct"},{"$ref":"#/components/parameters/SwarmActHistoryAddress"}],"requestBody":{"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"OK","headers":{"swarm-tag":{"$ref":"#/components/headers/SwarmTag"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceResponse"}}}},"400":{"$ref":"#/components/responses/400"},"402":{"$ref":"#/components/responses/402"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/bytes/{address}":{"get":{"summary":"Retrieve data by reference","tags":["Bytes"],"parameters":[{"in":"path","name":"address","schema":{"$ref":"#/components/schemas/SwarmReference"},"required":true,"description":"Swarm address reference to content"},{"$ref":"#/components/parameters/SwarmCache"},{"$ref":"#/components/parameters/SwarmRedundancyStrategyParameter"},{"$ref":"#/components/parameters/SwarmRedundancyFallbackModeParameter"},{"$ref":"#/components/parameters/SwarmRedundancyLevelParameter"},{"$ref":"#/components/parameters/SwarmChunkRetrievalTimeoutParameter"},{"$ref":"#/components/parameters/SwarmLookaheadBufferSizeParameter"},{"$ref":"#/components/parameters/SwarmActTimestamp"},{"$ref":"#/components/parameters/SwarmActPublisher"},{"$ref":"#/components/parameters/SwarmActHistoryAddress"}],"responses":{"200":{"description":"Retrieved content specified by reference","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/400"},"default":{"description":"Default response"}}},"head":{"summary":"Retrieve headers containing the content type and length for the reference","tags":["Bytes"],"parameters":[{"in":"path","name":"address","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":true,"description":"Swarm address of chunk"},{"$ref":"#/components/parameters/SwarmActTimestamp"},{"$ref":"#/components/parameters/SwarmActPublisher"},{"$ref":"#/components/parameters/SwarmActHistoryAddress"}],"responses":{"200":{"description":"The chunk exists.","headers":{"Content-Type":{"description":"The MIME type of the resource (e.g., application/octet-stream).","schema":{"type":"string","example":"application/octet-stream"}},"Content-Length":{"description":"The size of the chunk in bytes.","schema":{"type":"integer","example":1024}},"Access-Control-Expose-Headers":{"description":"Headers exposed for CORS.","schema":{"type":"string","example":"Accept-Ranges, Content-Encoding"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"default":{"description":"Default response"}}}},"/chunks":{"post":{"summary":"Upload a chunk","tags":["Chunk"],"parameters":[{"$ref":"#/components/parameters/SwarmTagParameter"},{"in":"header","name":"swarm-postage-batch-id","schema":{"$ref":"#/components/schemas/SwarmPostageBatchId"},"required":false},{"$ref":"#/components/parameters/SwarmPostageStamp"},{"$ref":"#/components/parameters/SwarmAct"},{"$ref":"#/components/parameters/SwarmActHistoryAddress"}],"requestBody":{"description":"Chunk binary data containing at least 8 bytes.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"OK","headers":{"swarm-tag":{"description":"Tag UID from the request `swarm-tag` header if provided.","schema":{"$ref":"#/components/schemas/Uid"}},"swarm-act-history-address":{"$ref":"#/components/headers/SwarmActHistoryAddress"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceResponse"}}}},"400":{"$ref":"#/components/responses/400"},"402":{"$ref":"#/components/responses/402"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/chunks/stream":{"get":{"summary":"Stream chunks for upload","description":"Establishes a WebSocket connection for streaming chunks. Each uploaded chunk receives a binary acknowledgment (`0`). Chunks are sent as binary messages. When a tag is specified, chunks are stored locally and uploaded to the network after the stream closes. Without a tag, chunks are directly uploaded to the network as they arrive.","tags":["Chunk"],"parameters":[{"$ref":"#/components/parameters/SwarmTagParameter"},{"in":"query","name":"swarm-tag","schema":{"$ref":"#/components/schemas/Uid"},"required":false,"description":"Associate upload with an existing Tag UID (use when WebSocket client cannot set custom headers)"},{"in":"header","name":"swarm-postage-batch-id","description":"ID of Postage Batch that is used to upload data with. Optional when chunks include pre-signed postage stamps.","required":false,"schema":{"$ref":"#/components/schemas/SwarmAddress"}}],"responses":{"200":{"description":"Connection established"},"400":{"$ref":"#/components/responses/400"},"default":{"description":"Default response"}}}},"/bzz":{"post":{"summary":"Upload a file or collection of files","description":"Upload single files or collections of files. For a single file, `Content-Type` is optional: when present it is stored as metadata as-is; when absent the server infers a type from the start of the body. To upload a collection, send a multipart request with files in the form data with appropriate headers. Tar files can be uploaded with the `swarm-collection` header to extract and upload the directory structure. Without the `swarm-collection` header, requests are treated as single file uploads. Multipart requests are always treated as collections; use the `swarm-index-document` header to specify a single file to serve.","tags":["BZZ"],"parameters":[{"in":"query","name":"name","schema":{"$ref":"#/components/schemas/FileName"},"required":false,"description":"Filename when uploading single file"},{"$ref":"#/components/parameters/SwarmTagParameter"},{"$ref":"#/components/parameters/SwarmPinParameter"},{"$ref":"#/components/parameters/SwarmEncryptParameter"},{"$ref":"#/components/parameters/ContentTypePreserved"},{"$ref":"#/components/parameters/SwarmCollection"},{"$ref":"#/components/parameters/SwarmIndexDocumentParameter"},{"$ref":"#/components/parameters/SwarmErrorDocumentParameter"},{"$ref":"#/components/parameters/SwarmPostageBatchId"},{"$ref":"#/components/parameters/SwarmDeferredUpload"},{"$ref":"#/components/parameters/SwarmRedundancyLevelParameter"},{"$ref":"#/components/parameters/SwarmAct"},{"$ref":"#/components/parameters/SwarmActHistoryAddress"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"type":"array","items":{"type":"string","format":"binary"}}}}},"application/octet-stream":{"schema":{"type":"string","format":"binary"}},"application/x-tar":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"OK","headers":{"swarm-tag":{"$ref":"#/components/headers/SwarmTag"},"etag":{"$ref":"#/components/headers/ETag"},"swarm-act-history-address":{"$ref":"#/components/headers/SwarmActHistoryAddress"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceResponse"}}}},"400":{"$ref":"#/components/responses/400"},"402":{"$ref":"#/components/responses/402"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/bzz/{address}":{"get":{"summary":"Retrieve a file or index document from a collection","tags":["BZZ"],"parameters":[{"in":"path","name":"address","schema":{"$ref":"#/components/schemas/SwarmReference"},"required":true,"description":"Swarm address of content"},{"$ref":"#/components/parameters/SwarmCache"},{"$ref":"#/components/parameters/SwarmRedundancyStrategyParameter"},{"$ref":"#/components/parameters/SwarmRedundancyFallbackModeParameter"},{"$ref":"#/components/parameters/SwarmRedundancyLevelParameter"},{"$ref":"#/components/parameters/SwarmChunkRetrievalTimeoutParameter"},{"$ref":"#/components/parameters/SwarmLookaheadBufferSizeParameter"},{"$ref":"#/components/parameters/SwarmActTimestamp"},{"$ref":"#/components/parameters/SwarmActPublisher"},{"$ref":"#/components/parameters/SwarmActHistoryAddress"}],"responses":{"200":{"description":"OK","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}},"headers":{"swarm-feed-resolved-version":{"$ref":"#/components/headers/SwarmFeedResolvedVersion"}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"head":{"summary":"Retrieve headers with content type and length for the reference","tags":["BZZ"],"parameters":[{"in":"path","name":"address","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":true,"description":"Swarm address of chunk"},{"$ref":"#/components/parameters/SwarmActTimestamp"},{"$ref":"#/components/parameters/SwarmActPublisher"},{"$ref":"#/components/parameters/SwarmActHistoryAddress"}],"responses":{"200":{"description":"Chunk exists"},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"default":{"description":"Default response"}}}},"/bzz/{address}/{path}":{"get":{"summary":"Retrieve a file from a collection by path","tags":["BZZ"],"parameters":[{"in":"path","name":"address","schema":{"$ref":"#/components/schemas/SwarmReference"},"required":true,"description":"Swarm address of content"},{"in":"path","name":"path","schema":{"type":"string"},"required":true,"description":"Path to the file in the collection."},{"$ref":"#/components/parameters/SwarmRedundancyStrategyParameter"},{"$ref":"#/components/parameters/SwarmRedundancyFallbackModeParameter"},{"$ref":"#/components/parameters/SwarmChunkRetrievalTimeoutParameter"},{"$ref":"#/components/parameters/SwarmRedundancyLevelParameter"},{"$ref":"#/components/parameters/SwarmCache"},{"$ref":"#/components/parameters/SwarmLookaheadBufferSizeParameter"}],"responses":{"200":{"description":"OK","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}},"headers":{"swarm-feed-resolved-version":{"$ref":"#/components/headers/SwarmFeedResolvedVersion"}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/tags":{"get":{"summary":"Get list of tags","tags":["Tag"],"parameters":[{"in":"query","name":"offset","schema":{"type":"integer","minimum":0,"default":0},"required":false,"description":"The number of items to skip before starting to collect the result set."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":1000,"default":100},"required":false,"description":"The numbers of items to return."}],"responses":{"200":{"description":"List of tags","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagsList"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"post":{"summary":"Create Tag","tags":["Tag"],"description":"Tags can be thought of as upload sessions which can be tracked using the tags endpoint. It will keep track of the chunks that are uploaded as part of the tag and will push them out to the network once a done split is called on the Tag. This happens internally if you use the `Swarm-Deferred-Upload` header.","responses":{"201":{"description":"New Tag Info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewTagResponse"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/tags/{id}":{"get":{"summary":"Get Tag information using Uid","tags":["Tag"],"parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/Uid"},"required":true,"description":"Uid"}],"responses":{"200":{"description":"Tag info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewTagResponse"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"delete":{"summary":"Delete Tag information using Uid","tags":["Tag"],"parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/Uid"},"required":true,"description":"Uid"}],"responses":{"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"patch":{"summary":"Update Total Count and swarm hash for a tag of an input stream of unknown size using Uid","tags":["Tag"],"parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/Uid"},"required":true,"description":"Uid"}],"requestBody":{"description":"Can contain swarm hash to use for the tag","required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Address"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/pins/{reference}":{"parameters":[{"in":"path","name":"reference","schema":{"$ref":"#/components/schemas/SwarmOnlyReference"},"required":true,"description":"Swarm reference of the root hash"}],"post":{"summary":"Pin a root hash by reference","tags":["Pinning"],"parameters":[{"in":"header","schema":{"$ref":"#/components/schemas/SwarmRedundancyLevelParameter"},"name":"swarm-redundancy-level","required":false}],"responses":{"200":{"description":"Pin already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"201":{"description":"New pin with root reference was created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"delete":{"summary":"Unpin a root hash by reference","tags":["Pinning"],"responses":{"200":{"description":"Root hash has been unpinned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"get":{"summary":"Get the pinning status of a root hash","tags":["Pinning"],"responses":{"200":{"description":"The pinned root hash reference","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwarmOnlyReference"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/pins":{"get":{"summary":"Get the list of pinned root hash references","tags":["Pinning"],"responses":{"200":{"description":"List of pinned root hash references","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwarmOnlyReferencesList"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/pins/check":{"get":{"summary":"Validate pinned chunks integrity","description":"Returns a stream of newline-delimited JSON objects (NDJSON), one per pinned reference checked.\\nThe response uses chunked transfer encoding; clients should parse each line as an independent\\n`PinIntegrityResponse` object rather than buffering the body into a single JSON value.\\n","tags":["Pinning"],"parameters":[{"in":"query","name":"ref","schema":{"$ref":"#/components/schemas/SwarmOnlyReference"},"required":false,"description":"Optional reference to check; if not provided, all pinned references are checked"}],"responses":{"200":{"description":"NDJSON stream of integrity results, one object per line","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PinCheckResponse"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/pss/send/{topic}/{targets}":{"post":{"summary":"Send a message using the Postal Service for Swarm","tags":["Postal Service for Swarm"],"parameters":[{"in":"path","name":"topic","schema":{"$ref":"#/components/schemas/PssTopic"},"required":true,"description":"Topic name"},{"in":"path","name":"targets","schema":{"$ref":"#/components/schemas/PssTargets"},"required":true,"description":"Target message address prefix. If multiple targets are specified, only one would be matched."},{"in":"query","name":"recipient","schema":{"$ref":"#/components/schemas/PssRecipient"},"required":false,"description":"Recipient publickey"},{"$ref":"#/components/parameters/SwarmPostageBatchId"}],"responses":{"201":{"description":"Subscribed to topic"},"400":{"$ref":"#/components/responses/400"},"402":{"$ref":"#/components/responses/402"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/pss/subscribe/{topic}":{"get":{"summary":"Subscribe to messages on a topic","tags":["Postal Service for Swarm"],"parameters":[{"in":"path","name":"topic","schema":{"$ref":"#/components/schemas/PssTopic"},"required":true,"description":"Topic name"}],"responses":{"200":{"description":"Establishes a WebSocket subscription for incoming messages on the topic"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/gsoc/subscribe/{address}":{"get":{"summary":"Subscribe to GSOC payloads","tags":["GSOC"],"parameters":[{"in":"path","name":"address","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":true,"description":"Single Owner Chunk address (which may have multiple payloads)"}],"responses":{"200":{"description":"Establishes a WebSocket subscription for incoming messages on the Single Owner Chunk address"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/soc/{owner}/{id}":{"post":{"summary":"Upload a Single Owner Chunk","tags":["Single owner chunk"],"parameters":[{"in":"path","name":"owner","schema":{"$ref":"#/components/schemas/EthereumAddress"},"required":true,"description":"Ethereum address of the chunk owner"},{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/HexString"},"required":true,"description":"Unique identifier for the chunk"},{"in":"query","name":"sig","schema":{"$ref":"#/components/schemas/HexString"},"required":true,"description":"Signature"},{"in":"header","name":"swarm-postage-batch-id","schema":{"$ref":"#/components/schemas/SwarmPostageBatchId"},"required":false,"description":"ID of the postage batch to use. Either this or `swarm-postage-stamp` must be supplied."},{"$ref":"#/components/parameters/SwarmPostageStamp"},{"$ref":"#/components/parameters/SwarmTagParameter"},{"$ref":"#/components/parameters/SwarmPinParameter"},{"$ref":"#/components/parameters/SwarmDeferredUpload"},{"$ref":"#/components/parameters/SwarmAct"},{"$ref":"#/components/parameters/SwarmActHistoryAddress"}],"requestBody":{"required":true,"description":"The SOC binary data, composed of the span (8 bytes) and up to 4KB of payload.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceResponse"}}},"headers":{"swarm-tag":{"description":"Tag UID, returned when an upload session is in use (either because `swarm-tag` was supplied, `swarm-deferred-upload` requested deferred mode, or `swarm-pin` was set).","schema":{"$ref":"#/components/schemas/Uid"}},"swarm-act-history-address":{"$ref":"#/components/headers/SwarmActHistoryAddress"}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"402":{"$ref":"#/components/responses/402"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"get":{"summary":"Retrieve Single Owner Chunk data","tags":["Single owner chunk"],"parameters":[{"in":"path","name":"owner","schema":{"$ref":"#/components/schemas/EthereumAddress"},"required":true,"description":"Ethereum address of the Owner of the SOC"},{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/HexString"},"required":true,"description":"Unique identifier for the chunk data"},{"$ref":"#/components/parameters/SwarmOnlyRootChunkParameter"},{"$ref":"#/components/parameters/SwarmCache"},{"$ref":"#/components/parameters/SwarmRedundancyStrategyParameter"},{"$ref":"#/components/parameters/SwarmRedundancyFallbackModeParameter"},{"$ref":"#/components/parameters/SwarmChunkRetrievalTimeoutParameter"}],"responses":{"200":{"description":"Related Single Owner Chunk data","headers":{"swarm-soc-signature":{"$ref":"#/components/headers/SwarmSocSignature"}},"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/feeds/{owner}/{topic}":{"post":{"summary":"Create a feed root manifest","tags":["Feed"],"parameters":[{"in":"path","name":"owner","schema":{"$ref":"#/components/schemas/EthereumAddress"},"required":true,"description":"Ethereum address of the feed owner"},{"in":"path","name":"topic","schema":{"$ref":"#/components/schemas/HexString"},"required":true,"description":"Topic identifier for the feed"},{"in":"query","name":"type","schema":{"$ref":"#/components/schemas/FeedType"},"required":false,"description":"Feed indexing scheme (default: sequence)"},{"$ref":"#/components/parameters/SwarmPinParameter"},{"$ref":"#/components/parameters/SwarmPostageBatchId"},{"$ref":"#/components/parameters/SwarmAct"},{"$ref":"#/components/parameters/SwarmActHistoryAddress"},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmRedundancyLevelParameter"},"name":"swarm-redundancy-level","required":false,"description":"Redundancy level for the feed manifest upload pipeline and ACT encryption"}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceResponse"}}},"headers":{"swarm-act-history-address":{"$ref":"#/components/headers/SwarmActHistoryAddress"}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"402":{"$ref":"#/components/responses/402"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"get":{"summary":"Retrieve the latest feed update","tags":["Feed"],"parameters":[{"in":"path","name":"owner","schema":{"$ref":"#/components/schemas/EthereumAddress"},"required":true,"description":"Ethereum address of the feed owner"},{"in":"path","name":"topic","schema":{"$ref":"#/components/schemas/HexString"},"required":true,"description":"Topic identifier for the feed"},{"in":"query","name":"at","schema":{"type":"integer"},"required":false,"description":"Timestamp of the update (default: now)"},{"in":"query","name":"after","schema":{"type":"integer"},"required":false,"description":"Start index (default: 0)"},{"in":"query","name":"type","schema":{"$ref":"#/components/schemas/FeedType"},"required":false,"description":"Feed indexing scheme (default: sequence)"},{"$ref":"#/components/parameters/SwarmOnlyRootChunkParameter"},{"$ref":"#/components/parameters/SwarmCache"},{"$ref":"#/components/parameters/SwarmRedundancyStrategyParameter"},{"$ref":"#/components/parameters/SwarmRedundancyFallbackModeParameter"},{"$ref":"#/components/parameters/SwarmChunkRetrievalTimeoutParameter"}],"responses":{"200":{"description":"Latest feed update","headers":{"swarm-soc-signature":{"$ref":"#/components/headers/SwarmSocSignature"},"swarm-feed-index":{"$ref":"#/components/headers/SwarmFeedIndex"},"swarm-feed-index-next":{"$ref":"#/components/headers/SwarmFeedIndexNext"},"swarm-feed-resolved-version":{"$ref":"#/components/headers/SwarmFeedResolvedVersion"}},"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/stewardship/{address}":{"get":{"summary":"Check content availability","tags":["Stewardship"],"parameters":[{"in":"path","name":"address","schema":{"$ref":"#/components/schemas/SwarmReference"},"required":true,"description":"Root hash of content (can be of any type: collection, file, chunk)"},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmRedundancyLevelParameter"},"name":"swarm-redundancy-level","required":false}],"responses":{"200":{"description":"Returns if the content is retrievable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IsRetrievableResponse"}}}},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"put":{"summary":"Re-upload content by reference","tags":["Stewardship"],"parameters":[{"in":"path","name":"address","schema":{"$ref":"#/components/schemas/SwarmReference"},"required":true,"description":"Re-uploads content for specified root hash (can be of any type: collection, file, chunk, etc.)"},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmPostageBatchId"},"name":"swarm-postage-batch-id","required":true,"description":"Postage batch to use for re-upload. The chunks are re-stamped with this batch."},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmRedundancyLevelParameter"},"name":"swarm-redundancy-level","required":false}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/addresses":{"get":{"summary":"Get overlay and underlay addresses of the node","tags":["Connectivity"],"responses":{"200":{"description":"Own node underlay and overlay addresses","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Addresses"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/health":{"get":{"summary":"Get the overall health status of the node","description":"Health Status will indicate node healthiness.\\n\\nIf node is unhealthy please check node logs for errors.\\n","tags":["Status"],"responses":{"200":{"description":"Health Status of node","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}},"default":{"description":"Default response"}}}},"/readiness":{"get":{"summary":"Check if the node is ready to accept traffic","tags":["Status"],"responses":{"200":{"description":"Indicates that node is ready","$ref":"#/components/responses/200"},"400":{"description":"Indicates that node is not ready","$ref":"#/components/responses/400"},"default":{"description":"Default response"}}}},"/balances":{"get":{"summary":"Get balances with all known peers","tags":["Balance"],"responses":{"200":{"description":"Own balances with all known peers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Balances"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/balances/{peer}":{"get":{"summary":"Get the balance with a specific peer","tags":["Balance"],"parameters":[{"in":"path","name":"peer","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":true,"description":"Swarm address of peer"}],"responses":{"200":{"description":"Balance with the specific peer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Balance"}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/blocklist":{"get":{"summary":"Get a list of blocklisted peers","tags":["Connectivity"],"responses":{"200":{"description":"Returns overlay addresses of blocklisted peers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockListedPeers"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/consumed":{"get":{"summary":"Get past due consumption balances with all known peers","tags":["Balance"],"responses":{"200":{"description":"Own past due consumption balances with all known peers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Balances"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/consumed/{peer}":{"get":{"summary":"Get past due consumption balance with a specific peer","tags":["Balance"],"parameters":[{"in":"path","name":"peer","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":true,"description":"Swarm address of peer"}],"responses":{"200":{"description":"Past-due consumption balance with the specific peer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Balance"}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/chequebook/address":{"get":{"summary":"Get the chequebook contract address","tags":["Chequebook"],"responses":{"200":{"description":"Ethereum address of chequebook contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChequebookAddress"}}}}}}},"/chequebook/balance":{"get":{"summary":"Get the balance of the chequebook","tags":["Chequebook"],"responses":{"200":{"description":"Balance of the chequebook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChequebookBalance"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/chunks/{address}":{"get":{"summary":"Retrieve a chunk","tags":["Chunk"],"parameters":[{"in":"path","name":"address","schema":{"$ref":"#/components/schemas/SwarmReference"},"required":true,"description":"Swarm address of chunk"},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmCache"},"name":"swarm-cache","required":false},{"$ref":"#/components/parameters/SwarmActTimestamp"},{"$ref":"#/components/parameters/SwarmActPublisher"},{"$ref":"#/components/parameters/SwarmActHistoryAddress"}],"responses":{"200":{"description":"Retrieved chunk content","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"head":{"summary":"Check if a chunk exists locally","tags":["Chunk"],"parameters":[{"in":"path","name":"address","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":true,"description":"Swarm address of chunk"},{"$ref":"#/components/parameters/SwarmActTimestamp"},{"$ref":"#/components/parameters/SwarmActPublisher"},{"$ref":"#/components/parameters/SwarmActHistoryAddress"}],"responses":{"200":{"description":"Chunk exists"},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"default":{"description":"Default response"}}}},"/envelope/{address}":{"post":{"summary":"Create a postage stamp for a chunk","tags":["Envelope"],"parameters":[{"in":"path","name":"address","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":true,"description":"Swarm address of the chunk to stamp"},{"in":"header","name":"swarm-postage-batch-id","schema":{"$ref":"#/components/schemas/SwarmPostageBatchId"},"required":true}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostEnvelopeResponse"}}}},"400":{"$ref":"#/components/responses/400"},"402":{"$ref":"#/components/responses/402"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/connect/{multi-address}":{"post":{"summary":"Connect to a peer address","tags":["Connectivity"],"parameters":[{"in":"path","allowReserved":true,"name":"multi-address","schema":{"$ref":"#/components/schemas/MultiAddress"},"required":true,"description":"Underlay address of peer"}],"responses":{"200":{"description":"Returns overlay address of connected peer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Address"}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/reservestate":{"get":{"summary":"Get the reserve state","tags":["Status"],"responses":{"200":{"description":"Reserve State","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReserveState"}}}},"default":{"description":"Default response"}}}},"/chainstate":{"get":{"summary":"Get the chain state","tags":["Status"],"responses":{"200":{"description":"Chain State","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChainState"}}}},"default":{"description":"Default response"}}}},"/debugstore":{"get":{"summary":"Get a snapshot of local storage debug info","tags":["Status"],"responses":{"200":{"description":"Local storage debug info","content":{"application/json":{"schema":{"type":"object","properties":{"Upload":{"type":"object","properties":{"TotalUploaded":{"type":"integer"},"TotalSynced":{"type":"integer"},"PendingUpload":{"type":"integer"}}},"Pinning":{"type":"object","properties":{"TotalCollections":{"type":"integer"},"TotalChunks":{"type":"integer"}}},"Cache":{"type":"object","properties":{"Size":{"type":"integer"},"Capacity":{"type":"integer"}}},"Reserve":{"type":"object","properties":{"SizeWithinRadius":{"type":"integer"},"TotalSize":{"type":"integer"},"Capacity":{"type":"integer"},"LastBinIDs":{"type":"array","items":{"type":"integer"}},"Epoch":{"type":"integer"}}},"ChunkStore":{"type":"object","properties":{"TotalChunks":{"type":"integer"},"SharedSlots":{"type":"integer"},"ReferenceCount":{"type":"integer"}}}}}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/node":{"get":{"summary":"Get node information","tags":["Status"],"responses":{"200":{"description":"Information about the node","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Node"}}}},"default":{"description":"Default response"}}}},"/peers":{"get":{"summary":"Get the list of connected peers","tags":["Connectivity"],"responses":{"200":{"description":"Returns overlay addresses of connected peers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Peers"}}}},"default":{"description":"Default response"}}}},"/peers/{address}":{"delete":{"summary":"Disconnect from a peer","tags":["Connectivity"],"parameters":[{"in":"path","name":"address","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":true,"description":"Swarm address of peer"}],"responses":{"200":{"description":"Peer has been disconnected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/pingpong/{address}":{"post":{"summary":"Ping a peer to measure latency","tags":["Connectivity"],"parameters":[{"in":"path","name":"address","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":true,"description":"Swarm address of peer"}],"responses":{"200":{"description":"Returns round trip time for given peer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RttMs"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/settlements/{peer}":{"get":{"summary":"Get settlement amounts sent and received with a peer","tags":["Settlements"],"parameters":[{"in":"path","name":"peer","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":true,"description":"Swarm address of peer"}],"responses":{"200":{"description":"Settlement amounts sent and received with the peer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settlement"}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/settlements":{"get":{"summary":"Get settlements with all known peers and totals","tags":["Settlements"],"responses":{"200":{"description":"Settlements with all known peers and total amount sent or received","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settlements"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/timesettlements":{"get":{"summary":"Get time-based settlements with all known peers and totals","tags":["Settlements"],"responses":{"200":{"description":"Time based settlements with all known peers and total amount sent or received","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settlements"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/topology":{"get":{"summary":"Get the network topology","tags":["Connectivity"],"responses":{"200":{"description":"Swarm topology of the bee node","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BzzTopology"}}}}}}},"/welcome-message":{"get":{"summary":"Get the P2P welcome message","tags":["Connectivity"],"responses":{"200":{"description":"Welcome message","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WelcomeMessage"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"post":{"summary":"Set the P2P welcome message","tags":["Connectivity"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WelcomeMessage"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/chequebook/cashout/{peer}":{"get":{"summary":"Get the last cashout status for a peer","parameters":[{"in":"path","name":"peer","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":true,"description":"Swarm address of peer"}],"tags":["Chequebook"],"responses":{"200":{"description":"Cashout status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwapCashoutStatus"}}}},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"post":{"summary":"Cash out the last cheque for a peer","parameters":[{"in":"path","name":"peer","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":true,"description":"Swarm address of peer"},{"$ref":"#/components/parameters/GasPriceParameter"},{"$ref":"#/components/parameters/GasLimitParameter"}],"tags":["Chequebook"],"responses":{"201":{"description":"Cheque has been cashed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponse"}}}},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/chequebook/cheque/{peer}":{"get":{"summary":"Get the last cheques for a peer","parameters":[{"in":"path","name":"peer","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":true,"description":"Swarm address of peer"}],"tags":["Chequebook"],"responses":{"200":{"description":"The last cheques for the peer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChequePeerResponse"}}}},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/chequebook/cheque":{"get":{"summary":"Get the last cheques for all peers","tags":["Chequebook"],"responses":{"200":{"description":"The last cheques for all peers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChequeAllPeersResponse"}}}},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/chequebook/deposit":{"post":{"summary":"Deposit tokens into the chequebook","parameters":[{"in":"query","name":"amount","schema":{"type":"integer"},"required":true,"description":"Amount of tokens to deposit"},{"$ref":"#/components/parameters/GasPriceParameter"}],"tags":["Chequebook"],"responses":{"200":{"description":"Transaction hash of the deposit transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponse"}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/chequebook/withdraw":{"post":{"summary":"Withdraw tokens from the chequebook","parameters":[{"in":"query","name":"amount","schema":{"type":"integer"},"required":true,"description":"Amount of tokens to withdraw"},{"$ref":"#/components/parameters/GasPriceParameter"}],"tags":["Chequebook"],"responses":{"200":{"description":"Transaction hash of the withdraw transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponse"}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/transactions":{"get":{"summary":"Get list of pending transactions","tags":["Transaction"],"responses":{"200":{"description":"List of pending transactions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingTransactionsResponse"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/transactions/{hash}":{"get":{"summary":"Retrieve transaction information","parameters":[{"in":"path","name":"hash","schema":{"$ref":"#/components/schemas/TransactionHash"},"required":true,"description":"Hash of the transaction"}],"tags":["Transaction"],"responses":{"200":{"description":"Transaction information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionInfo"}}}},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"post":{"summary":"Rebroadcast a transaction","parameters":[{"in":"path","name":"hash","schema":{"$ref":"#/components/schemas/TransactionHash"},"required":true,"description":"Hash of the transaction"}],"tags":["Transaction"],"responses":{"200":{"description":"Hash of the transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponse"}}}},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"delete":{"summary":"Cancel existing transaction","parameters":[{"in":"path","name":"hash","schema":{"$ref":"#/components/schemas/TransactionHash"},"required":true,"description":"Hash of the transaction"},{"$ref":"#/components/parameters/GasPriceParameter"}],"tags":["Transaction"],"responses":{"200":{"description":"Hash of the transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponse"}}}},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/stamps":{"get":{"summary":"Get postage stamps for this node","tags":["Postage Stamps"],"responses":{"200":{"description":"An array of postage stamps","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DebugPostageBatchesResponse"}}}},"404":{"$ref":"#/components/responses/404"},"default":{"description":"Default response"}}}},"/stamps/{batch_id}":{"parameters":[{"in":"path","name":"batch_id","schema":{"$ref":"#/components/schemas/BatchID"},"required":true,"description":"Swarm address of the stamp"}],"get":{"summary":"Get an individual postage batch status","tags":["Postage Stamps"],"responses":{"200":{"description":"Returns an individual postage batch state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DebugPostageBatch"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"default":{"description":"Default response"}}},"patch":{"summary":"Update the label of an existing postage batch","tags":["Postage Stamps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","description":"New label for the postage batch"}},"required":["label"]}}}},"responses":{"200":{"description":"Label updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/stamps/{batch_id}/buckets":{"parameters":[{"in":"path","name":"batch_id","schema":{"$ref":"#/components/schemas/BatchID"},"required":true,"description":"Swarm address of the stamp"}],"get":{"summary":"Get extended bucket data of a batch","tags":["Postage Stamps"],"responses":{"200":{"description":"Returns extended bucket data of the provided batch ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostageStampBuckets"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"default":{"description":"Default response"}}}},"/stamps/{amount}/{depth}":{"post":{"summary":"Buy a new postage batch.","description":"Be aware, this endpoint creates an on-chain transaction and transfers BZZ from the node\'s Ethereum account, directly affecting the wallet balance!\\n","tags":["Postage Stamps"],"parameters":[{"in":"path","name":"amount","schema":{"$ref":"#/components/schemas/BigInt"},"required":true,"description":"Amount of BZZ added that the postage batch will have."},{"in":"path","name":"depth","schema":{"type":"integer"},"required":true,"description":"Batch depth (logarithm) specifying the maximum number of chunks this stamp can cover. Must be greater than the default bucket depth (16)"},{"in":"query","name":"label","schema":{"type":"string"},"required":false,"description":"An optional label for this batch"},{"in":"header","name":"immutable","schema":{"type":"boolean"},"required":false},{"$ref":"#/components/parameters/GasPriceParameter"},{"$ref":"#/components/parameters/GasLimitParameter"}],"responses":{"201":{"description":"Returns the newly created postage batch ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchIDResponse"}}}},"400":{"$ref":"#/components/responses/400"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/stamps/topup/{batch_id}/{amount}":{"patch":{"summary":"Top up an existing postage batch.","description":"Be aware, this endpoint creates an on-chain transaction and transfers BZZ from the node\'s Ethereum account, directly affecting the wallet balance!\\n","tags":["Postage Stamps"],"parameters":[{"in":"path","name":"batch_id","schema":{"$ref":"#/components/schemas/BatchID"},"required":true,"description":"Batch ID to top up"},{"in":"path","name":"amount","schema":{"type":"integer"},"required":true,"description":"Amount of BZZ per chunk to top up to an existing postage batch."},{"$ref":"#/components/parameters/GasPriceParameter"},{"$ref":"#/components/parameters/GasLimitParameter"}],"responses":{"202":{"description":"Returns the postage batch ID that was topped up","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchIDResponse"}}}},"400":{"$ref":"#/components/responses/400"},"402":{"$ref":"#/components/responses/402"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/stamps/dilute/{batch_id}/{depth}":{"patch":{"summary":"Dilute an existing postage batch.","description":"Be aware, this endpoint creates an on-chain transaction and transfers BZZ from the node\'s Ethereum account, directly affecting the wallet balance!\\n","tags":["Postage Stamps"],"parameters":[{"in":"path","name":"batch_id","schema":{"$ref":"#/components/schemas/BatchID"},"required":true,"description":"Batch ID to dilute"},{"in":"path","name":"depth","schema":{"type":"integer"},"required":true,"description":"The new batch depth, which must be greater than the current depth"},{"$ref":"#/components/parameters/GasPriceParameter"},{"$ref":"#/components/parameters/GasLimitParameter"}],"responses":{"202":{"description":"Returns the postage batch ID that was diluted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchIDResponse"}}}},"400":{"$ref":"#/components/responses/400"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/batches":{"get":{"summary":"Get all globally available postage batches","tags":["Postage Stamps"],"responses":{"200":{"description":"An array of all available and valid postage batches","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DebugPostageAllBatchesResponse"}}}},"default":{"description":"Default response"}}}},"/batches/{batch_id}":{"parameters":[{"in":"path","name":"batch_id","schema":{"$ref":"#/components/schemas/BatchID"},"required":true,"description":"ID of the postage batch"}],"get":{"summary":"Get a single globally available postage batch by ID","tags":["Postage Stamps"],"responses":{"200":{"description":"The postage batch state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostageBatchShort"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"default":{"description":"Default response"}}}},"/rchash/{depth}/{anchor1}/{anchor2}":{"get":{"summary":"Get reserve commitment hash with sample proofs","tags":["RChash"],"parameters":[{"in":"path","name":"depth","schema":{"type":"integer","minimum":0,"default":0},"required":true,"description":"The storage depth."},{"in":"path","name":"anchor1","schema":{"$ref":"#/components/schemas/HexString"},"required":true,"description":"The first anchor."},{"in":"path","name":"anchor2","schema":{"$ref":"#/components/schemas/HexString"},"required":true,"description":"The second anchor."}],"responses":{"200":{"description":"Reserve sample response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiRCHashResponse"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/accounting":{"get":{"summary":"Get accounting values for all known peers","tags":["Balance"],"responses":{"200":{"description":"Own accounting associated values with all known peers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeerAccountingData"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/redistributionstate":{"get":{"summary":"Get the node\'s redistribution game status","tags":["RedistributionState"],"responses":{"200":{"description":"Redistribution status info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedistributionStatusResponse"}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/wallet":{"get":{"summary":"Get wallet balance for BZZ and xDAI","tags":["Wallet"],"responses":{"200":{"description":"Wallet balance info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletResponse"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/wallet/withdraw/{coin}":{"post":{"summary":"Withdraw BZZ or xDAI to a whitelisted address","tags":["Wallet"],"parameters":[{"in":"query","name":"amount","required":true,"schema":{"$ref":"#/components/schemas/BigInt"}},{"in":"query","name":"address","required":true,"schema":{"$ref":"#/components/schemas/EthereumAddress"}},{"in":"path","name":"coin","required":true,"schema":{"$ref":"#/components/schemas/WithdrawCoin"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletTxResponse"}}},"description":"OK"},"400":{"$ref":"#/components/responses/400","description":"Amount greater than balance or coin is other than BZZ/xDAI"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/stake/withdrawable":{"get":{"summary":"Get the withdrawable staked amount.","description":"This endpoint fetches any amount that is possible to withdraw as surplus.","tags":["Staking"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWithdrawableResponse"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"delete":{"summary":"Withdraw the extra withdrawable staked amount.","description":"This endpoint withdraws any amount that is possible to withdraw as surplus.","tags":["Staking"],"parameters":[{"$ref":"#/components/parameters/GasPriceParameter"},{"$ref":"#/components/parameters/GasLimitParameter"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StakeTransactionResponse"}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/stake/{amount}":{"post":{"summary":"Deposit an amount for staking.","description":"Be aware, this endpoint creates an on-chain transaction and transfers BZZ from the node\'s Ethereum account, directly affecting the wallet balance.","tags":["Staking"],"parameters":[{"in":"path","name":"amount","schema":{"type":"string"},"required":true,"description":"Amount of BZZ added that will be deposited for staking."},{"$ref":"#/components/parameters/GasPriceParameter"},{"$ref":"#/components/parameters/GasLimitParameter"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StakeTransactionResponse"}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/stake":{"get":{"summary":"Get the staked amount.","description":"This endpoint fetches the total staked amount from the blockchain.","tags":["Staking"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetStakeResponse"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"delete":{"summary":"Withdraw all previously staked amounts.","description":"Be aware, this endpoint can only be called when the contract is paused and undergoing migration to a new contract.","tags":["Staking"],"parameters":[{"$ref":"#/components/parameters/GasPriceParameter"},{"$ref":"#/components/parameters/GasLimitParameter"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StakeTransactionResponse"}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/loggers":{"get":{"summary":"Get all available loggers.","tags":["Logging"],"responses":{"200":{"description":"Returns an array of all available loggers, also represented in short form in a tree.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoggerResponse"}}}},"400":{"$ref":"#/components/responses/400"},"default":{"description":"Default response"}}}},"/loggers/{exp}":{"get":{"summary":"Get all available loggers that match the specified expression.","parameters":[{"in":"path","name":"exp","schema":{"$ref":"#/components/schemas/LoggerExp"},"required":true,"description":"Regular expression or a subsystem that matches the logger(s)."}],"tags":["Logging"],"responses":{"200":{"description":"Returns an array of all available loggers that matches given expression, also represented in short form in a tree.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoggerResponse"}}}},"400":{"$ref":"#/components/responses/400"},"default":{"description":"Default response"}}}},"/loggers/{exp}/{verbosity}":{"put":{"summary":"Set logger(s) verbosity level.","parameters":[{"in":"path","name":"exp","schema":{"$ref":"#/components/schemas/LoggerExp"},"required":true,"description":"Regular expression or a subsystem that matches the logger(s)."},{"in":"path","name":"verbosity","schema":{"type":"string","enum":["none","error","warning","info","debug","all"]},"required":true,"description":"Verbosity level to apply to the matching logger(s)."}],"tags":["Logging"],"responses":{"200":{"description":"The verbosity was changed successfully."},"400":{"$ref":"#/components/responses/400"},"default":{"description":"Default response"}}}},"/status":{"get":{"summary":"Get the current status snapshot of this node.","tags":["Node Status"],"responses":{"200":{"description":"Returns the current node status snapshot.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusSnapshotResponse"}}}},"400":{"$ref":"#/components/responses/400"},"default":{"description":"Default response."}}}},"/status/peers":{"get":{"summary":"Get the current status snapshot of this node connected peers.","tags":["Node Status"],"responses":{"200":{"description":"Returns the status snapshot of this node connected peers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusPeersResponse"}}}},"400":{"$ref":"#/components/responses/400"},"default":{"description":"Default response."}}}},"/status/neighborhoods":{"get":{"summary":"Get the current neighborhoods status of this node.","tags":["Node Status"],"responses":{"200":{"description":"Returns the neighborhoods status of this node","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusNeighborhoodsResponse"}}}},"400":{"$ref":"#/components/responses/400"},"default":{"description":"Default response."}}}}},"components":{"schemas":{"SwarmPostageBatchId":{"in":"header","name":"swarm-postage-batch-id","description":"ID of Postage Batch that is used to upload data with","required":true,"schema":{"$ref":"#/components/schemas/SwarmAddress"}},"SwarmTagParameter":{"in":"header","name":"swarm-tag","schema":{"$ref":"#/components/schemas/Uid"},"required":false,"description":"Associate upload with an existing Tag UID"},"SwarmPinParameter":{"in":"header","name":"swarm-pin","schema":{"type":"boolean"},"required":false,"description":"Indicates whether the uploaded data should also be locally pinned on this node\\n"},"SwarmDeferredUpload":{"in":"header","name":"swarm-deferred-upload","schema":{"type":"boolean","default":"true"},"required":false,"description":"Indicates whether the uploaded data should be sent to the network immediately or deferred. Default: deferred (true)\\n"},"SwarmActHistoryAddress":{"in":"header","name":"swarm-act-history-address","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":false,"description":"ACT history reference address"},"SwarmRedundancyLevelParameter":{"in":"header","name":"swarm-redundancy-level","schema":{"type":"integer","enum":[0,1,2,3,4]},"required":false,"description":"Add redundancy to the data being uploaded so that downloaders can download it with better UX. 0 value is default and does not add any redundancy to the file.\\n"},"PublicKey":{"type":"string","pattern":"^[A-Fa-f0-9]{66}$","example":"02ab7473879005929d10ce7d4f626412dad9fe56b0a6622038931d26bd79abf0a4"},"ActGranteesCreateRequest":{"type":"object","properties":{"grantees":{"type":"array","items":{"$ref":"#/components/schemas/PublicKey"}}}},"SwarmEncryptedReference":{"type":"string","pattern":"^[A-Fa-f0-9]{128}$","example":"36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f2d2810619d29b5dbefd5d74abce25d58b81b251baddb9c3871cf0d6967deaae2"},"ActGranteesOperationResponse":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/SwarmEncryptedReference"},"historyref":{"$ref":"#/components/schemas/SwarmEncryptedReference"}}},"ProblemDetails":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"reasons":{"type":"array","nullable":true,"description":"List of reasons for the error message.","items":{"type":"string"}}}},"ActGranteesPatchRequest":{"type":"object","properties":{"add":{"type":"array","items":{"$ref":"#/components/schemas/PublicKey"},"description":"List of grantees to add"},"revoke":{"type":"array","items":{"$ref":"#/components/schemas/PublicKey"},"description":"List of grantees to revoke future access from"}}},"SwarmAddress":{"type":"string","pattern":"^[A-Fa-f0-9]{64}$","example":"36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f"},"Uid":{"type":"integer"},"DomainName":{"type":"string","pattern":"^[A-Za-z0-9]+\\\\.[A-Za-z0-9]+$","example":"swarm.eth"},"SwarmReference":{"oneOf":[{"$ref":"#/components/schemas/SwarmAddress"},{"$ref":"#/components/schemas/SwarmEncryptedReference"},{"$ref":"#/components/schemas/DomainName"}]},"ReferenceResponse":{"type":"object","properties":{"reference":{"$ref":"#/components/schemas/SwarmReference"}}},"Duration":{"description":"Time duration in Go time.Duration format (e.g., 5.0018ms)","type":"string","example":"5.0018ms"},"HexString":{"type":"string","pattern":"^([A-Fa-f0-9]+)$","example":"cf880b8eeac5093fa27b0825906c600685"},"FileName":{"type":"string"},"DateTime":{"type":"string","format":"date-time","example":"2020-06-11T11:26:42.6969797+02:00"},"NewTagResponse":{"type":"object","properties":{"uid":{"$ref":"#/components/schemas/Uid"},"address":{"$ref":"#/components/schemas/SwarmAddress","description":"Root reference associated with the tag once the upload is finalized; zero value before that."},"startedAt":{"$ref":"#/components/schemas/DateTime"},"split":{"type":"integer","description":"Number of chunks created by the splitter."},"seen":{"type":"integer","description":"Number of chunks that are already uploaded with same reference and same postage batch. These don\'t need to be synced again."},"stored":{"type":"integer","description":"Number of chunks that were stored locally as they lie in the uploader node\'s neighborhood. This is only applicable for full nodes."},"sent":{"type":"integer","description":"Number of chunks sent on the network to peers as a part of the upload. Chunks could be sent multiple times because of failures or replication."},"synced":{"type":"integer","description":"Number of chunks that were pushed with a valid receipt. The receipt will also show if they were stored at the correct depth."}}},"TagsList":{"type":"object","properties":{"tags":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/NewTagResponse"}}}},"Address":{"type":"object","properties":{"address":{"$ref":"#/components/schemas/SwarmAddress"}}},"Response":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}}},"SwarmOnlyReference":{"oneOf":[{"$ref":"#/components/schemas/SwarmAddress"},{"$ref":"#/components/schemas/SwarmEncryptedReference"}]},"SwarmOnlyReferencesList":{"type":"object","properties":{"references":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/SwarmOnlyReference"}}}},"PinCheckResponse":{"type":"object","properties":{"reference":{"$ref":"#/components/schemas/SwarmOnlyReference"},"total":{"type":"integer"},"missing":{"type":"integer"},"invalid":{"type":"integer"}}},"PssTopic":{"type":"string"},"PssTargets":{"pattern":"^[0-9a-fA-F]{1,6}(,[0-9a-fA-F]{1,6})*$","description":"List of hex string targets that are comma separated and can have maximum length of 6","type":"string"},"PssRecipient":{"type":"string"},"EthereumAddress":{"type":"string","pattern":"^[A-Fa-f0-9]{40}$","example":"36b7efd913ca4cf880b8eeac5093fa27b0825906"},"FeedType":{"type":"string","pattern":"^(sequence|epoch)$"},"IsRetrievableResponse":{"type":"object","properties":{"isRetrievable":{"type":"boolean"}}},"P2PUnderlay":{"type":"string","example":"/ip4/127.0.0.1/tcp/1634/p2p/16Uiu2HAmTm17toLDaPYzRyjKn27iCB76yjKnJ5DjQXneFmifFvaX"},"Addresses":{"type":"object","properties":{"overlay":{"$ref":"#/components/schemas/SwarmAddress"},"underlay":{"type":"array","items":{"$ref":"#/components/schemas/P2PUnderlay"}},"ethereum":{"$ref":"#/components/schemas/EthereumAddress"},"chain_address":{"$ref":"#/components/schemas/EthereumAddress"},"publicKey":{"$ref":"#/components/schemas/PublicKey"},"pssPublicKey":{"$ref":"#/components/schemas/PublicKey"}}},"HealthStatus":{"type":"object","properties":{"status":{"type":"string","enum":["ok","nok","unknown"],"description":"Indicates health state of node * `ok` - node is healthy * `nok` - node is not healthy * `unknown` - health status is unknown\\n"},"version":{"type":"string"},"apiVersion":{"type":"string","default":"0.0.0","description":"The default value is set in case the bee binary was not build correctly."}}},"BigInt":{"description":"Numeric string representing an integer that may exceed `Number.MAX_SAFE_INTEGER` (2^53-1)","type":"string","example":"1000000000000000000"},"Balance":{"type":"object","properties":{"peer":{"$ref":"#/components/schemas/SwarmAddress"},"balance":{"$ref":"#/components/schemas/BigInt"},"thresholdreceived":{"$ref":"#/components/schemas/BigInt"},"thresholdgiven":{"$ref":"#/components/schemas/BigInt"}}},"Balances":{"type":"object","properties":{"balances":{"type":"array","items":{"$ref":"#/components/schemas/Balance"}}}},"BlockListedPeers":{"type":"object","properties":{"peers":{"type":"array","nullable":false,"items":{"type":"object","properties":{"address":{"$ref":"#/components/schemas/SwarmAddress"},"fullNode":{"type":"boolean"},"reason":{"type":"string"},"duration":{"type":"integer","description":"Block duration in seconds"}}}}}},"ChequebookAddress":{"type":"object","properties":{"chequebookAddress":{"$ref":"#/components/schemas/EthereumAddress"}}},"ChequebookBalance":{"type":"object","properties":{"totalBalance":{"$ref":"#/components/schemas/BigInt"},"availableBalance":{"$ref":"#/components/schemas/BigInt"}}},"SwarmCache":{"in":"header","name":"swarm-cache","schema":{"type":"boolean","default":"true"},"required":false,"description":"Indicates whether downloaded data should be cached on the node. Default: cached (true)"},"Hex8Bytes":{"description":"Hexadecimal string representation of 8 bytes","type":"string","pattern":"^([0-9a-fA-F]{16})$","example":"1a2b3c4d5e6f7a8b"},"Signature":{"description":"Hexadecimal string representation of cryptographic signature","type":"string","pattern":"^([0-9a-fA-F]{130})$","example":"1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e"},"PostEnvelopeResponse":{"type":"object","properties":{"issuer":{"$ref":"#/components/schemas/EthereumAddress"},"index":{"$ref":"#/components/schemas/Hex8Bytes"},"timestamp":{"$ref":"#/components/schemas/Hex8Bytes"},"signature":{"$ref":"#/components/schemas/Signature"}}},"MultiAddress":{"type":"string"},"ReserveState":{"type":"object","properties":{"radius":{"type":"integer"},"storageRadius":{"type":"integer"},"commitment":{"type":"integer"},"reserveCapacityDoubling":{"type":"integer"}}},"ChainState":{"type":"object","properties":{"chainTip":{"type":"integer"},"block":{"type":"integer"},"totalAmount":{"$ref":"#/components/schemas/BigInt"},"currentPrice":{"$ref":"#/components/schemas/BigInt"},"minimumValidityBlocks":{"type":"integer"}}},"Node":{"type":"object","properties":{"beeMode":{"type":"string","enum":["light","full","ultra-light","unknown"],"description":"Gives back in what mode the Bee client has been started. The modes are mutually exclusive * `light` - light node; does not participate in forwarding or storing chunks * `full` - full node * `ultra-light` - ultra-light node; a light node with chain disabled * `unknown` - unknown mode\\n"},"chequebookEnabled":{"type":"boolean"},"swapEnabled":{"type":"boolean"}}},"Peers":{"type":"object","properties":{"peers":{"type":"array","nullable":false,"items":{"type":"object","properties":{"address":{"$ref":"#/components/schemas/SwarmAddress"},"fullNode":{"type":"boolean"}}}}}},"RttMs":{"type":"object","properties":{"rtt":{"$ref":"#/components/schemas/Duration"}}},"Settlement":{"type":"object","properties":{"peer":{"$ref":"#/components/schemas/SwarmAddress"},"received":{"$ref":"#/components/schemas/BigInt"},"sent":{"$ref":"#/components/schemas/BigInt"}}},"Settlements":{"type":"object","properties":{"totalReceived":{"$ref":"#/components/schemas/BigInt"},"totalSent":{"$ref":"#/components/schemas/BigInt"},"settlements":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/Settlement"}}}},"PeerMetricsView":{"type":"object","properties":{"lastSeenTimestamp":{"type":"integer","nullable":false},"sessionConnectionRetry":{"type":"integer","nullable":false},"connectionTotalDuration":{"type":"number","nullable":false},"sessionConnectionDuration":{"type":"number","nullable":false},"sessionConnectionDirection":{"type":"string","nullable":false},"latencyEWMA":{"type":"integer","nullable":false},"reachability":{"type":"string"},"healthy":{"type":"boolean"}}},"BzzTopology":{"type":"object","properties":{"baseAddr":{"$ref":"#/components/schemas/SwarmAddress"},"population":{"type":"integer"},"connected":{"type":"integer"},"timestamp":{"type":"string"},"nnLowWatermark":{"type":"integer"},"depth":{"type":"integer"},"reachability":{"type":"string","enum":["Unknown","Public","Private"]},"networkAvailability":{"type":"string","enum":["Unknown","Available","Unavailable"]},"bins":{"type":"object","additionalProperties":{"type":"object","properties":{"population":{"type":"integer"},"connected":{"type":"integer"},"disconnectedPeers":{"type":"array","items":{"type":"object","properties":{"address":{"$ref":"#/components/schemas/SwarmAddress"},"metrics":{"$ref":"#/components/schemas/PeerMetricsView"}}}},"connectedPeers":{"type":"array","items":{"type":"object","properties":{"address":{"$ref":"#/components/schemas/SwarmAddress"},"metrics":{"$ref":"#/components/schemas/PeerMetricsView"}}}}}}}}},"WelcomeMessage":{"type":"object","properties":{"welcomeMessage":{"type":"string"}}},"Cheque":{"type":"object","properties":{"beneficiary":{"$ref":"#/components/schemas/EthereumAddress"},"chequebook":{"$ref":"#/components/schemas/EthereumAddress"},"payout":{"$ref":"#/components/schemas/BigInt"}}},"TransactionHash":{"type":"string","pattern":"^0x[A-Fa-f0-9]{64}$","example":"0x780cb6a37d1946978087896e1e489c37e30fe3e329510fff8d97360f73529f5a"},"SwapCashoutResult":{"type":"object","properties":{"recipient":{"$ref":"#/components/schemas/EthereumAddress"},"lastPayout":{"$ref":"#/components/schemas/BigInt"},"bounced":{"type":"boolean"}}},"SwapCashoutStatus":{"type":"object","properties":{"peer":{"$ref":"#/components/schemas/SwarmAddress"},"lastCashedCheque":{"$ref":"#/components/schemas/Cheque"},"transactionHash":{"$ref":"#/components/schemas/TransactionHash"},"result":{"$ref":"#/components/schemas/SwapCashoutResult"},"uncashedAmount":{"$ref":"#/components/schemas/BigInt"}}},"GasPrice":{"description":"Gas price refers to the amount you\u2019re willing to pay for every unit of gas.","type":"integer"},"GasLimit":{"description":"Gas limit refers to the maximum amount of gas you\u2019re willing to spend on a particular transaction.","type":"integer","minimum":0,"maximum":18446744073709552000},"TransactionResponse":{"type":"object","properties":{"transactionHash":{"$ref":"#/components/schemas/TransactionHash"}}},"ChequePeerResponse":{"type":"object","properties":{"peer":{"$ref":"#/components/schemas/SwarmAddress"},"lastreceived":{"$ref":"#/components/schemas/Cheque"},"lastsent":{"$ref":"#/components/schemas/Cheque"}}},"ChequeAllPeersResponse":{"type":"object","properties":{"lastcheques":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/ChequePeerResponse"}}}},"TransactionInfo":{"type":"object","properties":{"transactionHash":{"$ref":"#/components/schemas/TransactionHash"},"to":{"$ref":"#/components/schemas/EthereumAddress"},"nonce":{"type":"integer"},"gasPrice":{"$ref":"#/components/schemas/BigInt"},"gasLimit":{"type":"integer"},"gasTipCap":{"$ref":"#/components/schemas/BigInt"},"gasTipBoost":{"type":"integer"},"gasFeeCap":{"$ref":"#/components/schemas/BigInt"},"data":{"type":"string"},"created":{"$ref":"#/components/schemas/DateTime"},"description":{"type":"string"},"value":{"$ref":"#/components/schemas/BigInt"}}},"PendingTransactionsResponse":{"type":"object","properties":{"pendingTransactions":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/TransactionInfo"}}}},"BatchID":{"type":"string","pattern":"^[A-Fa-f0-9]{64}$","example":"36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f"},"PostageBatch":{"type":"object","properties":{"batchID":{"$ref":"#/components/schemas/BatchID"},"utilization":{"type":"integer","description":"Raw batch fullness indicator: the highest write count among the `2^bucketDepth` collision buckets of the batch. This is **not** a percentage; one unit corresponds to one chunk written into the fullest bucket. Total batch capacity is `2^depth` chunks, while the fullest bucket caps at `2^(depth - bucketDepth)` chunks, so the fractional usage of the batch is `utilization / 2^(depth - bucketDepth)` (also exposed directly as `utilizationRatio`). When the value reaches `2^(depth - bucketDepth)` the batch is effectively full and any further write to the fullest bucket would overflow it.\\n"},"utilizationRatio":{"type":"number","format":"double","minimum":0,"maximum":1,"description":"Fractional batch fullness in the range `[0, 1]`, computed as `utilization / 2^(depth - bucketDepth)`. A value of `1` means the fullest bucket has reached its capacity and the batch can no longer accept writes that would land in that bucket.\\n"},"usable":{"description":"Indicates whether the batch was discovered by the Bee node and has received sufficient on-chain confirmations","type":"boolean"},"label":{"type":"string"},"depth":{"type":"integer"},"amount":{"$ref":"#/components/schemas/BigInt"},"bucketDepth":{"type":"integer"},"blockNumber":{"type":"integer"},"immutableFlag":{"type":"boolean"},"exists":{"type":"boolean"},"batchTTL":{"type":"integer"}}},"PostageBatchNoIssuer":{"type":"object","properties":{"batchID":{"$ref":"#/components/schemas/BatchID"},"exists":{"type":"boolean"},"batchTTL":{"type":"integer"}}},"DebugPostageBatch":{"anyOf":[{"$ref":"#/components/schemas/PostageBatch"},{"$ref":"#/components/schemas/PostageBatchNoIssuer"}]},"DebugPostageBatchesResponse":{"type":"object","properties":{"stamps":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/DebugPostageBatch"}}}},"StampBucketData":{"type":"object","properties":{"bucketID":{"type":"integer"},"collisions":{"type":"integer"}}},"PostageStampBuckets":{"type":"object","properties":{"depth":{"type":"integer"},"bucketDepth":{"type":"integer"},"bucketUpperBound":{"type":"integer"},"buckets":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/StampBucketData"}}}},"BatchIDResponse":{"type":"object","properties":{"batchID":{"$ref":"#/components/schemas/BatchID"},"txHash":{"$ref":"#/components/schemas/TransactionHash"}}},"PostageBatchShort":{"type":"object","properties":{"batchID":{"$ref":"#/components/schemas/BatchID"},"value":{"$ref":"#/components/schemas/BigInt"},"start":{"type":"integer"},"owner":{"$ref":"#/components/schemas/EthereumAddress"},"depth":{"type":"integer"},"bucketDepth":{"type":"integer"},"immutable":{"type":"boolean"},"batchTTL":{"type":"integer"}}},"DebugPostageAllBatchesResponse":{"type":"object","properties":{"batches":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/PostageBatchShort"}}}},"Seconds":{"description":"Time duration in seconds (Go time.Duration format)","type":"number","example":30.5},"ApiPostageProof":{"type":"object","properties":{"index":{"type":"string"},"postageId":{"type":"string"},"signature":{"type":"string"},"timeStamp":{"type":"string"}}},"ApiSOCProof":{"type":"object","properties":{"chunkAddr":{"type":"string"},"identifier":{"type":"string"},"signature":{"type":"string"},"signer":{"type":"string"}}},"ApiChunkInclusionProof":{"type":"object","properties":{"chunkSpan":{"minimum":0,"type":"integer"},"postageProof":{"$ref":"#/components/schemas/ApiPostageProof"},"proofSegments":{"items":{"type":"string"},"nullable":true,"type":"array"},"proofSegments2":{"items":{"type":"string"},"nullable":true,"type":"array"},"proofSegments3":{"items":{"type":"string"},"nullable":true,"type":"array"},"proveSegment":{"type":"string"},"proveSegment2":{"type":"string"},"socProof":{"items":{"$ref":"#/components/schemas/ApiSOCProof"},"nullable":true,"type":"array"}}},"ApiChunkInclusionProofs":{"type":"object","properties":{"proof1":{"$ref":"#/components/schemas/ApiChunkInclusionProof"},"proof2":{"$ref":"#/components/schemas/ApiChunkInclusionProof"},"proofLast":{"$ref":"#/components/schemas/ApiChunkInclusionProof"}}},"ApiRCHashResponse":{"type":"object","properties":{"durationSeconds":{"$ref":"#/components/schemas/Seconds"},"hash":{"$ref":"#/components/schemas/SwarmAddress"},"proofs":{"$ref":"#/components/schemas/ApiChunkInclusionProofs"}}},"AccountingInfo":{"type":"object","properties":{"balance":{"$ref":"#/components/schemas/BigInt"},"consumedBalance":{"$ref":"#/components/schemas/BigInt"},"thresholdReceived":{"$ref":"#/components/schemas/BigInt"},"thresholdGiven":{"$ref":"#/components/schemas/BigInt"},"currentThresholdReceived":{"$ref":"#/components/schemas/BigInt"},"currentThresholdGiven":{"$ref":"#/components/schemas/BigInt"},"surplusBalance":{"$ref":"#/components/schemas/BigInt"},"reservedBalance":{"$ref":"#/components/schemas/BigInt"},"shadowReservedBalance":{"$ref":"#/components/schemas/BigInt"},"ghostBalance":{"$ref":"#/components/schemas/BigInt"}}},"PeerAccountingData":{"type":"object","properties":{"peerData":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AccountingInfo"}}}},"RedistributionStatusResponse":{"type":"object","properties":{"minimumGasFunds":{"$ref":"#/components/schemas/BigInt"},"hasSufficientFunds":{"type":"boolean"},"isFrozen":{"type":"boolean"},"isFullySynced":{"type":"boolean"},"isHealthy":{"type":"boolean"},"phase":{"type":"string"},"round":{"type":"integer"},"lastWonRound":{"type":"integer"},"lastPlayedRound":{"type":"integer"},"lastFrozenRound":{"type":"integer"},"lastSelectedRound":{"type":"integer"},"lastSampleDurationSeconds":{"type":"number"},"block":{"type":"integer"},"reward":{"$ref":"#/components/schemas/BigInt"},"fees":{"$ref":"#/components/schemas/BigInt"}}},"WalletResponse":{"type":"object","properties":{"bzzBalance":{"$ref":"#/components/schemas/BigInt"},"nativeTokenBalance":{"$ref":"#/components/schemas/BigInt"},"chainID":{"type":"integer"},"chequebookContractAddress":{"$ref":"#/components/schemas/EthereumAddress"},"walletAddress":{"$ref":"#/components/schemas/EthereumAddress"}}},"WithdrawCoin":{"type":"string","enum":["bzz","nativetoken"]},"WalletTxResponse":{"type":"object","properties":{"transactionHash":{"$ref":"#/components/schemas/TransactionHash"}}},"GetWithdrawableResponse":{"type":"object","properties":{"withdrawableAmount":{"$ref":"#/components/schemas/BigInt"}}},"StakeTransactionResponse":{"type":"object","properties":{"txHash":{"$ref":"#/components/schemas/TransactionHash"}}},"GetStakeResponse":{"type":"object","properties":{"stakedAmount":{"$ref":"#/components/schemas/BigInt"}}},"LoggerTreeNode":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/LoggerTreeData"}},"LoggerTreeData":{"type":"object","nullable":true,"properties":{"/":{"$ref":"#/components/schemas/LoggerTreeNode"},"+":{"type":"array","items":{"type":"string"},"description":"The combination of the logger verbosity and its subsystem separated by |.","example":"warning|one/name[0][]>>824634860360"}}},"Logger":{"type":"object","properties":{"logger":{"type":"string"},"verbosity":{"type":"string"},"subsystem":{"type":"string"},"id":{"type":"string"}}},"LoggerResponse":{"type":"object","properties":{"tree":{"$ref":"#/components/schemas/LoggerTreeNode"},"loggers":{"type":"array","items":{"$ref":"#/components/schemas/Logger"}}}},"LoggerExp":{"type":"string","description":"Base64-encoded regular expression or subsystem string","pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$","example":"b25lL25hbWU="},"StatusSnapshotResponse":{"type":"object","properties":{"overlay":{"$ref":"#/components/schemas/SwarmAddress"},"proximity":{"type":"integer"},"beeMode":{"type":"string","enum":["light","full","ultra-light","unknown"]},"reserveSize":{"type":"integer"},"reserveSizeWithinRadius":{"type":"integer"},"pullsyncRate":{"type":"number"},"storageRadius":{"type":"integer"},"connectedPeers":{"type":"integer"},"neighborhoodSize":{"type":"integer"},"requestFailed":{"nullable":true,"type":"boolean"},"batchCommitment":{"type":"integer"},"isReachable":{"type":"boolean"},"lastSyncedBlock":{"type":"integer"},"committedDepth":{"type":"integer"},"isWarmingUp":{"type":"boolean"}}},"StatusPeersResponse":{"type":"object","properties":{"snapshots":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/StatusSnapshotResponse"}}}},"Neighborhood":{"type":"string","description":"Swarm address of a neighborhood in string binary format, usually limited to as many bits as the current storage radius.","example":"011010111"},"StatusNeighborhoodResponse":{"type":"object","properties":{"neighborhood":{"$ref":"#/components/schemas/Neighborhood"},"reserveSizeWithinRadius":{"type":"integer"},"proximity":{"type":"integer"}}},"StatusNeighborhoodsResponse":{"type":"object","properties":{"neighborhoods":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/StatusNeighborhoodResponse"}}}}},"responses":{"200":{"description":"Success"},"204":{"description":"The resource was deleted successfully."},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"402":{"description":"Payment Required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"parameters":{"SwarmPostageBatchId":{"in":"header","name":"swarm-postage-batch-id","description":"ID of Postage Batch that is used to upload data with","required":true,"schema":{"$ref":"#/components/schemas/SwarmAddress"}},"SwarmTagParameter":{"in":"header","name":"swarm-tag","schema":{"$ref":"#/components/schemas/Uid"},"required":false,"description":"Associate upload with an existing Tag UID"},"SwarmPinParameter":{"in":"header","name":"swarm-pin","schema":{"type":"boolean"},"required":false,"description":"Indicates whether the uploaded data should also be locally pinned on this node\\n"},"SwarmDeferredUpload":{"in":"header","name":"swarm-deferred-upload","schema":{"type":"boolean","default":"true"},"required":false,"description":"Indicates whether the uploaded data should be sent to the network immediately or deferred. Default: deferred (true)\\n"},"SwarmEncryptParameter":{"in":"header","name":"swarm-encrypt","schema":{"type":"boolean"},"required":false,"description":"Indicates whether the file should be encrypted\\n"},"SwarmRedundancyLevelParameter":{"in":"header","name":"swarm-redundancy-level","schema":{"type":"integer","enum":[0,1,2,3,4]},"required":false,"description":"Add redundancy to the data being uploaded so that downloaders can download it with better UX. 0 value is default and does not add any redundancy to the file.\\n"},"SwarmAct":{"in":"header","name":"swarm-act","schema":{"type":"boolean","default":"false"},"required":false,"description":"Determines if the uploaded data should be treated as ACT content"},"SwarmActHistoryAddress":{"in":"header","name":"swarm-act-history-address","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":false,"description":"ACT history reference address"},"SwarmCache":{"in":"header","name":"swarm-cache","schema":{"type":"boolean","default":"true"},"required":false,"description":"Indicates whether downloaded data should be cached on the node. Default: cached (true)"},"SwarmRedundancyStrategyParameter":{"in":"header","name":"swarm-redundancy-strategy","schema":{"type":"integer","enum":[0,1,2,3]},"required":false,"description":"Specify the retrieval strategy for redundant data. Values represent: NONE (0), DATA (1), PROX (2), RACE (3). NONE: no prefetching. DATA: prefetch only data chunks. PROX: prefetch chunks near this node. RACE: prefetch all chunks and use the first n to arrive. Multiple strategies can be cascaded if fallback mode is enabled. Default: NONE > DATA > PROX > RACE\\n"},"SwarmRedundancyFallbackModeParameter":{"in":"header","name":"swarm-redundancy-fallback-mode","schema":{"type":"boolean"},"required":false,"description":"Specify if the retrieve strategies (chunk prefetching on redundant data) are used in a fallback cascade. The default is true.\\n"},"SwarmChunkRetrievalTimeoutParameter":{"in":"header","name":"swarm-chunk-retrieval-timeout","schema":{"$ref":"#/components/schemas/Duration"},"required":false,"description":"Specify the timeout for chunk retrieval. The default is 30 seconds.\\n"},"SwarmLookaheadBufferSizeParameter":{"in":"header","name":"swarm-lookahead-buffer-size","schema":{"type":"integer"},"required":false,"description":"Override the lookahead buffer size used during retrieval, in bytes. When unset the node picks 8x or 16x the io.Copy default buffer (32 kB) depending on file size.\\n"},"SwarmActTimestamp":{"in":"header","name":"swarm-act-timestamp","schema":{"type":"integer","format":"int64"},"required":false,"description":"ACT history Unix timestamp"},"SwarmActPublisher":{"in":"header","name":"swarm-act-publisher","schema":{"$ref":"#/components/schemas/PublicKey"},"required":false,"description":"ACT content publisher\'s public key"},"SwarmPostageStamp":{"in":"header","name":"swarm-postage-stamp","description":"Postage stamp for the corresponding chunk in the request. \\\\\\nIt is required if Swarm-Postage-Batch-Id header is missing \\\\\\nIt consists of: \\\\\\n- batch ID - 0:32 bytes \\\\\\n- postage index (bucket and bucket index) - 32:40 bytes \\\\\\n- timestamp - 40:48 bytes \\\\\\n- signature - 48:113 bytes\\n","schema":{"$ref":"#/components/schemas/HexString"}},"ContentTypePreserved":{"in":"header","name":"Content-Type","schema":{"type":"string"},"description":"Single file: trimmed Content-Type is stored as-is or, if omitted or empty, inferred from the first bytes without validating against the body; tar (`swarm-collection`) and multipart collection uploads still need a full-body Content-Type (e.g. `application/x-tar` or `multipart/form-data` with boundary) so the request can be parsed."},"SwarmCollection":{"in":"header","name":"swarm-collection","schema":{"type":"boolean"},"required":false,"description":"Upload file/files as a collection"},"SwarmIndexDocumentParameter":{"in":"header","name":"swarm-index-document","schema":{"type":"string","example":"index.html"},"required":false,"description":"Default file to serve when a directory path is accessed"},"SwarmErrorDocumentParameter":{"in":"header","name":"swarm-error-document","schema":{"type":"string","example":"error.html"},"required":false,"description":"Custom error document to return when a path is not found in the collection"},"SwarmOnlyRootChunkParameter":{"in":"header","name":"swarm-only-root-chunk","schema":{"type":"boolean"},"required":false,"description":"Returns only the root chunk of the content"},"GasPriceParameter":{"in":"header","name":"gas-price","schema":{"$ref":"#/components/schemas/GasPrice"},"required":false,"description":"Gas price for transaction"},"GasLimitParameter":{"in":"header","name":"gas-limit","schema":{"$ref":"#/components/schemas/GasLimit"},"required":false,"description":"Gas limit for transaction"}},"headers":{"SwarmTag":{"description":"Tag UID","schema":{"$ref":"#/components/schemas/Uid"}},"SwarmActHistoryAddress":{"description":"Swarm address reference to the new ACT history entry","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":false},"ETag":{"description":"The RFC7232 ETag header field in a response provides the current entity-\\ntag for the selected resource. An entity-tag is an opaque identifier for\\ndifferent versions of a resource over time, regardless whether multiple\\nversions are valid at the same time. An entity-tag consists of an opaque\\nquoted string, possibly prefixed by a weakness indicator.\\n","schema":{"type":"string"}},"SwarmFeedResolvedVersion":{"schema":{"type":"string"},"required":false,"description":"Indicates which feed version was resolved (v1 or v2)"},"SwarmSocSignature":{"description":"Attached digital signature of the Single Owner Chunk","schema":{"$ref":"#/components/schemas/HexString"}},"SwarmFeedIndex":{"description":"The index of the found update","schema":{"$ref":"#/components/schemas/HexString"}},"SwarmFeedIndexNext":{"description":"The index of the next possible update","schema":{"$ref":"#/components/schemas/HexString"}}}}}}')}}]); \ No newline at end of file diff --git a/assets/js/e75f3413.ee04612d.js b/assets/js/e75f3413.ee04612d.js new file mode 100644 index 000000000..fabc44870 --- /dev/null +++ b/assets/js/e75f3413.ee04612d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[1927],{68714(e,n,s){s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>d,default:()=>p,frontMatter:()=>l,metadata:()=>o,toc:()=>h});const o=JSON.parse('{"id":"bee/working-with-bee/bee-api","title":"Bee API","description":"Comprehensive reference for Bee\'s HTTP API endpoints enabling programmatic access to node management uploads downloads and monitoring.","source":"@site/docs/bee/working-with-bee/bee-api.md","sourceDirName":"bee/working-with-bee","slug":"/bee/working-with-bee/bee-api","permalink":"/docs/bee/working-with-bee/bee-api","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/bee/working-with-bee/bee-api.md","tags":[],"version":"current","frontMatter":{"title":"Bee API","id":"bee-api","description":"Comprehensive reference for Bee\'s HTTP API endpoints enabling programmatic access to node management uploads downloads and monitoring."},"sidebar":"bee","previous":{"title":"Node Types","permalink":"/docs/bee/working-with-bee/node-types"},"next":{"title":"Logging in Bee","permalink":"/docs/bee/working-with-bee/logs-and-files"}}');var r=s(74848),i=s(28453),t=s(4865),a=s(19365);const l={title:"Bee API",id:"bee-api",description:"Comprehensive reference for Bee's HTTP API endpoints enabling programmatic access to node management uploads downloads and monitoring."},d=void 0,c={},h=[{value:"Interacting With the API",id:"interacting-with-the-api",level:2},{value:"Alternatives for Working with the API",id:"alternatives-for-working-with-the-api",level:3},{value:"Exploring Node Status",id:"exploring-node-status",level:2},{value:"/status",id:"status",level:3},{value:"/status/peers",id:"statuspeers",level:3},{value:"/redistributionstate",id:"redistributionstate",level:3},{value:"/reservestate",id:"reservestate",level:3},{value:"/chainstate",id:"chainstate",level:3},{value:"/topology",id:"topology",level:3},{value:"/node",id:"node",level:3},{value:"/rchash",id:"rchash",level:3},{value:"/health",id:"health",level:3}];function u(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:["The Bee HTTP API is the primary interface to a running Bee node. API-endpoints can be queried using familiar HTTP requests, and will respond with semantically accurate ",(0,r.jsx)(n.a,{href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status",children:"HTTP status and error codes"})," as well as data payloads in ",(0,r.jsx)(n.a,{href:"https://www.json.org/json-en.html",children:"JSON"})," format where appropriate."]}),"\n",(0,r.jsxs)(n.p,{children:["The Bee API provides full access to all core functionalities of a Bee node, including uploading, downloading, staking, postage stamp batch purchasing and management, and node monitoring. By default, it runs on port ",(0,r.jsx)(n.code,{children:":1633"}),"."]}),"\n",(0,r.jsxs)(n.admonition,{type:"danger",children:[(0,r.jsxs)(n.p,{children:["Make sure that your api-addr (default 1633) is never exposed to the internet. If you do not have a firewall or other security measures in place, manually setting your Bee API address from the default ",(0,r.jsx)(n.code,{children:"1633"})," to ",(0,r.jsx)(n.code,{children:"127.0.0.1:1633"})," is strongly recommended to prevent unauthorized access."]}),(0,r.jsxs)(n.p,{children:["You may also consider using the ",(0,r.jsx)(n.a,{href:"/docs/develop/tools-and-features/gateway-proxy",children:"Gateway Proxy tool"})," to protect your node's API endpoint."]})]}),"\n",(0,r.jsxs)(n.p,{children:["Detailed information about Bee API endpoints can be found in the ",(0,r.jsx)(n.a,{href:"/api/",children:"API reference docs"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"interacting-with-the-api",children:"Interacting With the API"}),"\n",(0,r.jsxs)(n.p,{children:["You can interact with the Bee API using standard HTTP requests, allowing you to programmatically access all of your Bee node's various functions such as ",(0,r.jsx)(n.a,{href:"/docs/develop/tools-and-features/buy-a-stamp-batch",children:"purchasing stamp batches"}),", ",(0,r.jsx)(n.a,{href:"/docs/develop/upload-and-download",children:"uploading and downloading"}),", ",(0,r.jsx)(n.a,{href:"/docs/bee/working-with-bee/staking",children:"staking"}),", and more."]}),"\n",(0,r.jsx)(n.h3,{id:"alternatives-for-working-with-the-api",children:"Alternatives for Working with the API"}),"\n",(0,r.jsxs)(n.p,{children:["For developers, the ",(0,r.jsx)(n.a,{href:"/docs/develop/tools-and-features/bee-js",children:"Bee JS library"})," offers a more convenient way to interact with the API in a NodeJS environment."]}),"\n",(0,r.jsxs)(n.p,{children:["For many other common use cases, you may prefer to make use of the ",(0,r.jsx)(n.a,{href:"/docs/bee/working-with-bee/swarm-cli",children:"Swarm CLI"})," tool, as it offers a convenient command line based interface for interacting with your node's API."]}),"\n",(0,r.jsx)(n.h2,{id:"exploring-node-status",children:"Exploring Node Status"}),"\n",(0,r.jsx)(n.p,{children:"After installing and starting up your node, we can begin to understand the node's status by interacting with the API."}),"\n",(0,r.jsx)(n.p,{children:"For example, to determine how many nodes your Bee node is currently connected to, run:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"curl -s http://localhost:1633/peers | jq '.peers | length'\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"23\n"})}),"\n",(0,r.jsx)(n.p,{children:"Great! We can see that we are currently connected with 23 other nodes!"}),"\n",(0,r.jsx)(n.admonition,{type:"info",children:(0,r.jsxs)(n.p,{children:["Here we are using the ",(0,r.jsx)(n.code,{children:"jq"})," command line utility to count the amount of objects in the ",(0,r.jsx)(n.code,{children:"peers"})," array in the JSON response we have received from our API, learn more about how to install and use ",(0,r.jsx)(n.code,{children:"jq"})," ",(0,r.jsx)(n.a,{href:"https://jqlang.org/",children:"here"}),"."]})}),"\n",(0,r.jsx)(n.p,{children:"Let's review a handful of endpoints which will provide you with important information relevant to detecting and diagnosing problems with your nodes."}),"\n",(0,r.jsx)(n.h3,{id:"status",children:(0,r.jsx)(n.em,{children:"/status"})}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"/status"})," endpoint returns a quick summary of some important metrics for your node."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"curl -s http://localhost:1633/status | jq\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "overlay": "1e2054bec3e681aeb0b365a1f9a574a03782176bd3ec0bcf810ebcaf551e4070",\n "proximity": 256,\n "beeMode": "full",\n "reserveSize": 3215597,\n "reserveSizeWithinRadius": 3215806,\n "pullsyncRate": 1.5622222222222222,\n "storageRadius": 10,\n "connectedPeers": 89,\n "neighborhoodSize": 12,\n "batchCommitment": 11615207424,\n "isReachable": true,\n "lastSyncedBlock": 41786200,\n "committedDepth": 10,\n "isWarmingUp": false\n}\n'})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"overlay"'})," - Your node's overlay address."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"proximity"'})," - The proximity order (PO), representing how closely related this node is to your own node in Swarm's Kademlia network."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"beeMode"'})," - The mode of your node, can be ",(0,r.jsx)(n.code,{children:'"full"'}),", ",(0,r.jsx)(n.code,{children:'"light"'}),", or ",(0,r.jsx)(n.code,{children:'"ultraLight"'}),"."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"reserveSize"'})," - The number of chunks your node is currently storing in its reserve. This value should be roughly similar across nodes in the network. It should be identical for nodes within the same neighborhood."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"reserveSizeWithinRadius"'})," - The number of chunks your node is currently storing which fall within its storage radius."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"pullsyncRate"'})," - The rate at which your node is currently syncing chunks from other nodes in the network."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"storageRadius"'})," - The storage radius (radius of responsibility ) is the proximity order of chunks for which your node is responsible for storing. It should generally match the radius shown on ",(0,r.jsx)(n.a,{href:"https://swarmscan.io/neighborhoods",children:"Swarmscan"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"connectedPeers"'})," - The number of peers your node is connected to."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"neighborhoodSize"'})," - The number of total neighbors in your neighborhood, not including your own node. The more nodes in your neighborhood, the lower your chance of winning rewards as a staking node."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"batchCommitment"'})," - The total number of chunks which would be stored on the Swarm network if 100% of all postage batches were fully utilised."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"isReachable"'})," - Whether or not your node is reachable on the p2p API by other nodes on the Swarm network (port 1634 by default)."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"lastSyncedBlock"'})," - The last block number from the connected blockchain that your node has synced up to."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"committedDepth"'})," - The storage depth currently committed by your node, which defines how much of your reserve is actually being used to store chunks. Is equal to ",(0,r.jsx)(n.code,{children:'"storageRadius"'})," plus the ",(0,r.jsx)(n.a,{href:"/docs/bee/working-with-bee/staking#reserve-doubling",children:"doubling factor"})," specified in the ",(0,r.jsx)(n.code,{children:"reserve-capacity-doubling"})," option (which is zero by default)."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"isWarmingUp"'})," - Indicates whether your node is still in the warm-up phase (building up its reserve and syncing with the network) or has reached normal operation."]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"statuspeers",children:(0,r.jsx)(n.em,{children:"/status/peers"})}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"/status/peers"})," endpoint returns information about all the peers of the node making the request. The type of the object returned is the same as that returned from the ",(0,r.jsx)(n.code,{children:"/status"})," endpoint. This endpoint is useful for diagnosing syncing / availability issues with your node."]}),"\n",(0,r.jsx)(n.p,{children:"The list is sorted by Kademlia proximity, not geographical distance. Nodes with lower PO values are further away, while higher PO values indicate closer neighbors. The most distant nodes with PO (proximity order) of zero are at the top of the list and the closest nodes with higher POs at the bottom of the list. The nodes at the bottom of the list with a PO equal or greater than the storage depth make up the nodes in your own node's neighborhood. It's possible that not all nodes in your neighborhood will appear in this list each time you call the endpoint if the connection between your nodes and the rest of the nodes in the neighborhood is not stable."}),"\n",(0,r.jsx)(n.p,{children:"Here are the last few entries:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:" curl -s http://localhost:1633/status/peers | jq\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:' ...\n {\n "overlay": "1e1547d0d629469ff0d8fd2cbb6435df8fd913f2e948f177d733356d784b7ea4",\n "proximity": 10,\n "beeMode": "full",\n "reserveSize": 3217677,\n "reserveSizeWithinRadius": 3215613,\n "pullsyncRate": 0,\n "storageRadius": 10,\n "connectedPeers": 153,\n "neighborhoodSize": 12,\n "batchCommitment": 11615207424,\n "isReachable": true,\n "lastSyncedBlock": 41786375,\n "committedDepth": 10,\n "isWarmingUp": false\n },\n {\n "overlay": "1e09531ee3d8031b130b1c7d530dac26f57d2b9cfd368a979ef227331deb2ae5",\n "proximity": 10,\n "beeMode": "full",\n "reserveSize": 3215934,\n "reserveSizeWithinRadius": 3215613,\n "pullsyncRate": 0,\n "storageRadius": 10,\n "connectedPeers": 166,\n "neighborhoodSize": 12,\n "batchCommitment": 11615207424,\n "isReachable": true,\n "lastSyncedBlock": 41786375,\n "committedDepth": 10,\n "isWarmingUp": false\n },\n {\n "overlay": "1e1ad7975d88430b8ede359ca231e73aaffaeefe35d6f32e709ff37dc3028eaa",\n "proximity": 10,\n "beeMode": "full",\n "reserveSize": 3215364,\n "reserveSizeWithinRadius": 3215344,\n "pullsyncRate": 0,\n "storageRadius": 10,\n "connectedPeers": 150,\n "neighborhoodSize": 12,\n "batchCommitment": 11614158848,\n "isReachable": true,\n "lastSyncedBlock": 41786375,\n "committedDepth": 10,\n "isWarmingUp": false\n },\n {\n "overlay": "1e30c8fe93339f8637a339b5d4d85ec42731a193be8987c6457f4ea72c93cfb7",\n "proximity": 11,\n "beeMode": "full",\n "reserveSize": 3218783,\n "reserveSizeWithinRadius": 3215613,\n "pullsyncRate": 0,\n "storageRadius": 10,\n "connectedPeers": 165,\n "neighborhoodSize": 12,\n "batchCommitment": 11615207424,\n "isReachable": true,\n "lastSyncedBlock": 41786375,\n "committedDepth": 10,\n "isWarmingUp": false\n },\n {\n "overlay": "1e3c168d12e0f590640454c01e2825522ca60eb0a1c7dfaac9da2329e9d87300",\n "proximity": 11,\n "beeMode": "full",\n "reserveSize": 3215635,\n "reserveSizeWithinRadius": 3215613,\n "pullsyncRate": 0,\n "storageRadius": 10,\n "connectedPeers": 169,\n "neighborhoodSize": 12,\n "batchCommitment": 11615207424,\n "isReachable": true,\n "lastSyncedBlock": 41786375,\n "committedDepth": 10,\n "isWarmingUp": false\n },\n {\n "overlay": "1e3f2e9b0f6d45aa1fd710e7fca4a7890d2cbde829cd2722674ab120544e3772",\n "proximity": 11,\n "beeMode": "full",\n "reserveSize": 3215645,\n "reserveSizeWithinRadius": 3215613,\n "pullsyncRate": 0,\n "storageRadius": 10,\n "connectedPeers": 163,\n "neighborhoodSize": 12,\n "batchCommitment": 11615207424,\n "isReachable": true,\n "lastSyncedBlock": 41786375,\n "committedDepth": 10,\n "isWarmingUp": false\n },\n {\n "overlay": "1e288371f2e3c3325c1a3af5008d7c81fa4ab1d176e1c6bbb3f9ace4655dc05d",\n "proximity": 12,\n "beeMode": "full",\n "reserveSize": 3215644,\n "reserveSizeWithinRadius": 3215613,\n "pullsyncRate": 0,\n "storageRadius": 10,\n "connectedPeers": 165,\n "neighborhoodSize": 12,\n "batchCommitment": 11615207424,\n "isReachable": true,\n "lastSyncedBlock": 41786375,\n "committedDepth": 10,\n "isWarmingUp": false\n },\n {\n "overlay": "1e2c2b11a118a0be240af19421a8a323610869247625fa28a7590d765a21c566",\n "proximity": 12,\n "beeMode": "full",\n "reserveSize": 3215633,\n "reserveSizeWithinRadius": 3215613,\n "pullsyncRate": 0,\n "storageRadius": 10,\n "connectedPeers": 172,\n "neighborhoodSize": 12,\n "batchCommitment": 11615207424,\n "isReachable": true,\n "lastSyncedBlock": 41786370,\n "committedDepth": 10,\n "isWarmingUp": false\n },\n {\n "overlay": "1e20ef01ddab9112a9a26618d901c761f20d8bcb8328c143ab13e9846be9ad82",\n "proximity": 16,\n "beeMode": "full",\n "reserveSize": 3215652,\n "reserveSizeWithinRadius": 3215613,\n "pullsyncRate": 0,\n "storageRadius": 10,\n "connectedPeers": 164,\n "neighborhoodSize": 12,\n "batchCommitment": 11615207424,\n "isReachable": true,\n "lastSyncedBlock": 41786375,\n "committedDepth": 10,\n "isWarmingUp": false\n }\n ]\n}\n'})}),"\n",(0,r.jsxs)(n.p,{children:["And we can compare these entries to our own node's ",(0,r.jsx)(n.code,{children:"/status"})," results for diagnostic purposes:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:" curl -s http://localhost:1633/status | jq\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "overlay": "1e2054bec3e681aeb0b365a1f9a574a03782176bd3ec0bcf810ebcaf551e4070",\n "proximity": 256,\n "beeMode": "full",\n "reserveSize": 3215597,\n "reserveSizeWithinRadius": 3215806,\n "pullsyncRate": 1.5622222222222222,\n "storageRadius": 10,\n "connectedPeers": 89,\n "neighborhoodSize": 12,\n "batchCommitment": 11615207424,\n "isReachable": true,\n "lastSyncedBlock": 41786200,\n "committedDepth": 10,\n "isWarmingUp": false\n}\n'})}),"\n",(0,r.jsx)(n.p,{children:"From the results we can see that our node's neighborhood size and batch commitment are generally in line with other nodes in the same neighborhood. Any significant discrepancy may indicate a problem with your node."}),"\n",(0,r.jsx)(n.h3,{id:"redistributionstate",children:(0,r.jsx)(n.em,{children:"/redistributionstate"})}),"\n",(0,r.jsx)(n.p,{children:"This endpoint provides an overview of values related to storage fee redistribution game (in other words, staking rewards). You can use this endpoint to check whether or not your node is participating properly in the redistribution game."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"curl -s http://localhost:1633/redistributionstate | jq\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "minimumGasFunds": "11080889201250000",\n "hasSufficientFunds": true,\n "isFrozen": false,\n "isFullySynced": true,\n "phase": "claim",\n "round": 212859,\n "lastWonRound": 207391,\n "lastPlayedRound": 210941,\n "lastFrozenRound": 210942,\n "lastSelectedRound": 212553,\n "lastSampleDuration": 491687776653,\n "block": 32354719,\n "reward": "1804537795127017472",\n "fees": "592679945236926714",\n "isHealthy": true\n}\n'})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"minimumGasFunds"'})," - The minimum required xDAI denominated in wei (1 xDAI = 10^18 wei) required for a node to participate in the redistribution game."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"hasSufficientFunds"'})," - Whether your node has at least the ",(0,r.jsx)(n.code,{children:'"minimumGasFunds"'})," amount of xDAI."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"isFrozen"'})," - Indicates if your node is frozen, which may occur for ",(0,r.jsx)(n.a,{href:"/docs/bee/working-with-bee/staking#diagnosing-freezing-issues",children:"several reasons"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"isFullySynced"'})," - Whether your node has fully synced all the chunks in its ",(0,r.jsx)(n.code,{children:'"storageRadius"'})," (the value returned from the ",(0,r.jsx)(n.code,{children:"/reservestate"})," endpoint.)"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"phase"'})," - The current phase of the redistribution game (this does not indicate whether or not your node is participating in the current phase)."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"round"'})," - The current number of the round of the redistribution game."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"lastWonRound"'})," - The last round number in which your node won the redistribution game."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"lastPlayedRound"'})," - The last round number in which your node participating in the redistribution game. If this number matches the number of the current round shown in ",(0,r.jsx)(n.code,{children:'"round"'}),", then your node is participating in the current round."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"lastFrozenRound"'})," - The last round in which your node was frozen."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"lastSelectedRound"'})," - The last round in which your node's neighborhood was selected. Note that it is possible for your node's neighborhood to be selected without your node playing in the redistribution game. This may potentially indicate your node's hardware is not sufficient to calculate the commitment hash fast enough. See ",(0,r.jsxs)(n.a,{href:"#rchash",children:["section on the ",(0,r.jsx)(n.code,{children:"/rchash"})," endpoint"]})," for more information."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"lastSampleDuration"'})," - The time it took for your node to calculate the sample commitment hash in nanoseconds."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"block"'})," - current Gnosis block number"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"reward"'})," - The total all-time reward in PLUR earned by your node."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"fees"'})," - The total amount in fees paid by your node denominated in xDAI wei."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"isHealthy"'})," - a check of whether your node\u2019s storage radius is the same as the most common radius from among its peer nodes"]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"reservestate",children:(0,r.jsx)(n.em,{children:"/reservestate"})}),"\n",(0,r.jsx)(n.p,{children:"This endpoint shows key information about the reserve state of your node. You can use it to identify problems with your node related to its reserve (whether it is syncing chunks properly into its reserve for example)."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"curl -s http://localhost:1633/reservestate | jq\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "radius": 15,\n "storageRadius": 10,\n "commitment": 134121783296,\n "reserveCapacityDoubling": 0\n}\n'})}),"\n",(0,r.jsx)(n.p,{children:"Let's take a look at each of these values:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"radius"'})," - Represents the maximum storage radius assuming all postage stamp batches are fully utilized."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"storageRadius"'})," - The radius of responsibility - the proximity order of chunks for which your node is responsible for storing. It should generally match the radius shown on ",(0,r.jsx)(n.a,{href:"https://swarmscan.io/neighborhoods",children:"Swarmscan"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"commitment"'})," - The total number of chunks which would be stored on the Swarm network if 100% of all postage batches were fully utilised."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"reserveCapacityDoubling"'})," - Indicates whether your node is currently using the reserve doubling mechanism. See ",(0,r.jsx)(n.a,{href:"/docs/bee/working-with-bee/staking#reserve-doubling",children:"Reserve Doubling"})," for details."]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"chainstate",children:(0,r.jsx)(n.em,{children:"/chainstate"})}),"\n",(0,r.jsx)(n.p,{children:"This endpoint relates to your node's interactions with the Swarm Smart contracts on the Gnosis Chain."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:' curl -s http://localhost:1633/chainstate | jq\n\n{\n "chainTip": 41786513,\n "block": 41786505,\n "totalAmount": "293796491451",\n "currentPrice": "56774"\n}\n'})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"chainTip"'})," - The latest Gnosis Chain block number. Should be as high as or almost as high as the block number shown at ",(0,r.jsx)(n.a,{href:"https://gnosisscan.io/",children:"GnosisScan"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"block"'})," - The latest block your node has fully synced from Gnosis Chain. If significantly behind ",(0,r.jsx)(n.code,{children:'"chainTip"'}),", your node may still be catching up. Should be very close to ",(0,r.jsx)(n.code,{children:'"chainTip"'})," if your node has already been operating for a while."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"totalAmount"'})," - Cumulative value of all prices per chunk in PLUR for each block."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"currentPrice"'})," - The price in PLUR to store a single chunk for each Gnosis Chain block."]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"topology",children:(0,r.jsx)(n.em,{children:"/topology"})}),"\n",(0,r.jsx)(n.p,{children:"This endpoint allows you to explore the topology of your node within the Kademlia network. The results are split into 32 bins from bin_0 to bin_32. Each bin represents the nodes in the same neighborhood as your node at each proximity order from PO 0 to PO 32."}),"\n",(0,r.jsxs)(n.p,{children:["As the output of this file can be very large, we save it to the ",(0,r.jsx)(n.code,{children:"topology.json"})," file for easier inspection:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:" curl -s http://localhost:1633/topology | jq '.' > topology.json\n"})}),"\n",(0,r.jsx)(n.p,{children:"We open the file in vim for inspection:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"vim topology.json\n"})}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"/topology"})," endpoint provides insights into how your node is positioned within the Swarm network. The response starts with global network statistics, followed by detailed bin-by-bin peer connections (for 32 bins). Lets first look at the global stats:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:' "baseAddr": "da7e5cc3ed9a46b6e7491d3bf738535d98112641380cbed2e9ddfe4cf4fc01c4",\n "population": 20514,\n "connected": 176,\n "timestamp": "2024-02-08T20:57:03.815537925Z",\n "nnLowWatermark": 3,\n "depth": 10,\n "reachability": "Public",\n "networkAvailability": "Available",\n ...\n'})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"baseAddr"'})," - Your node's overlay address."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"population"'})," - The total number of nodes your node has collected information about. This number should be around ####. If it is far higher or lower it likely indicates a problem."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"connected"'})," - The total number of nodes your node is currently connected to."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"timestamp"'})," - The time at which this topology snapshot was taken."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"nnLowWatermark"'})," - ???"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"depth"'})," -"]}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:'"reachability"'})}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"networkAvailability"'}),"\nAfter the first section are 32 sections, one for each bin. At the front of each of these sections is a summary of information about the respective bin followed two list, one of disconnected peers and the other of connected peers. Let's take a look at bin_10 as an example:"]}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'...\n "bin_10": {\n "population": 3, // The total number of peers in this bin including both connected and disconnected peers.\n "connected": 2, // Number of connected peers\n "disconnectedPeers": [ //List of all disconnected peers\n {\n "address": "3e06e4667260c761f1b6a8539a99621c1af1f945e97667376c13b5f84984bcbc",\n "metrics": {\n "lastSeenTimestamp": 1707426772,\n "sessionConnectionRetry": 2,\n "connectionTotalDuration": 104619,\n "sessionConnectionDuration": 72,\n "sessionConnectionDirection": "outbound",\n "latencyEWMA": 849,\n "reachability": "Public",\n "healthy": true\n }\n }\n ],\n "connectedPeers": [ // List of all connected peers\n {\n "address": "3e09deca28d24a4c6dab9350dd0fb27a2333f03120b9f92f0ac0fd245707c9e3",\n "metrics": {\n "lastSeenTimestamp": 1707426766,\n "sessionConnectionRetry": 2,\n "connectionTotalDuration": 105059,\n "sessionConnectionDuration": 33,\n "sessionConnectionDirection": "outbound",\n "latencyEWMA": 899,\n "reachability": "Public",\n "healthy": true\n }\n },\n {\n "address": "3e1cdf7b1072fcde264c75f70635b9c1e9c1623eab2de55a0380f17b07751955",\n "metrics": {\n "lastSeenTimestamp": 1707426741,\n "sessionConnectionRetry": 1,\n "connectionTotalDuration": 109216,\n "sessionConnectionDuration": 59,\n "sessionConnectionDirection": "outbound",\n "latencyEWMA": 948,\n "reachability": "Public",\n "healthy": true\n }\n }\n ]\n },\n'})}),"\n",(0,r.jsx)(n.h3,{id:"node",children:(0,r.jsx)(n.em,{children:"/node"})}),"\n",(0,r.jsx)(n.p,{children:"This endpoint returns info about options related to your node type and also displays your current node type."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"curl -s http://localhost:1633/node | jq\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "beeMode": "full",\n "chequebookEnabled": true,\n "swapEnabled": true\n}\n'})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"beeMode"'})," - The mode of your node, can be ",(0,r.jsx)(n.code,{children:'"full"'}),", ",(0,r.jsx)(n.code,{children:'"light"'}),", or ",(0,r.jsx)(n.code,{children:'"ultraLight"'}),"."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"chequebookEnabled"'})," - Whether or not your node's ",(0,r.jsx)(n.code,{children:"chequebook-enable"})," option is set to ",(0,r.jsx)(n.code,{children:"true"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"swapEnabled"'})," - Whether or not your node's ",(0,r.jsx)(n.code,{children:"swap-enable"})," option is set to ",(0,r.jsx)(n.code,{children:"true"}),"."]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"If your node is not operating in the correct mode, this can help you to diagnose whether you have set your options correctly."}),"\n",(0,r.jsx)(n.h3,{id:"rchash",children:(0,r.jsx)(n.em,{children:"/rchash"})}),"\n",(0,r.jsxs)(n.p,{children:["Calling the ",(0,r.jsx)(n.code,{children:"/rchash"})," endpoint triggers the generation of a reserve commitment hash, which is used in the ",(0,r.jsx)(n.a,{href:"/docs/concepts/incentives/redistribution-game",children:"redistribution game"}),", and will report the amount of time it took to generate the hash.\nThis is useful for getting a performance benchmark to ensure that your node's processor and disk are fast enough."]}),"\n",(0,r.jsxs)(t.A,{defaultValue:"swarm-cli",values:[{label:"Swarm CLI",value:"swarm-cli"},{label:"API",value:"api"}],children:[(0,r.jsxs)(a.A,{value:"swarm-cli",children:[(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.a,{href:"/docs/bee/working-with-bee/swarm-cli",children:(0,r.jsx)(n.code,{children:"swarm-cli"})})," command doesn't require arguments.\nIt reads the node's overlay address and committed depth, and derives the anchor and depth parameters from them."]}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"swarm-cli utility rchash\n"})}),(0,r.jsxs)(n.p,{children:["Pass ",(0,r.jsx)(n.code,{children:"--depth"})," to benchmark against a depth other than the node's current one."]}),(0,r.jsx)(n.p,{children:"The command gives as a result the time it took to generate the reserve commitment hash."}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"Reserve sampling duration: 360.37808911 seconds\n"})})]}),(0,r.jsxs)(a.A,{value:"api",children:[(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"/rchash"})," endpoint has 3 parameters: ",(0,r.jsx)(n.code,{children:"depth"}),", ",(0,r.jsx)(n.code,{children:"anchor1"}),", and ",(0,r.jsx)(n.code,{children:"anchor2"}),".\nFor both anchor parameters, use the first 4 hex digits from your node's overlay address (which you can find from the ",(0,r.jsx)(n.code,{children:"/addresses"})," endpoint).\nFor depth, use your node's ",(0,r.jsx)(n.code,{children:"committedDepth"})," from the ",(0,r.jsx)(n.code,{children:"/status"})," endpoint.\nFor nodes which do not use ",(0,r.jsx)(n.a,{href:"/docs/bee/working-with-bee/staking#reserve-doubling",children:"reserve doubling"}),", ",(0,r.jsx)(n.code,{children:"committedDepth"})," is equal to ",(0,r.jsx)(n.code,{children:"storageRadius"}),":"]}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-text",children:"/rchash/{depth}/{anchor1}/{anchor2}\n"})}),(0,r.jsxs)(n.admonition,{title:"anchor parameter details",type:"info",children:[(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"The anchor parameters must match the prefix bits of the node's overlay address\nup to at least the current storage depth (with each hex digit equal to 4 bits)."}),"\n",(0,r.jsx)(n.li,{children:"The anchor parameters also must have an even number of digits."}),"\n"]}),(0,r.jsx)(n.p,{children:"Therefore you can use the first four digits of your node's overlay address since\nit will work for depths up to depth 16, which will not be approached unless the\ndepth increases up to depth 17, which is not likely to happen in the near future.\nIf it does increase to depth 17, then the first 6 overlay digits should be used."})]}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"curl -sX GET http://localhost:1633/rchash/10/1e20/1e20 | jq\n"})}),(0,r.jsxs)(n.p,{children:["The response includes a ",(0,r.jsx)(n.code,{children:"hash"}),", ",(0,r.jsx)(n.code,{children:"proofs"})," (used by the redistribution smart contract),\nand ",(0,r.jsx)(n.code,{children:"durationSeconds"})," which is the benchmark metric. Here is an example of a\nsuccessful result:"]}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "hash": "a1d6e1700dff0c5259029c8a58904251855911eb298b45fab4b0c26d4de0fa5f",\n "proofs": { "proof1": { ... }, "proof2": { ... }, "proofLast": { ... } },\n "durationSeconds": 287.52\n}\n'})})]})]}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"durationSeconds"})," value should not exceed roughly 6 minutes (360 seconds)."]}),"\n",(0,r.jsx)(n.admonition,{title:"A single measurement is not a guarantee",type:"caution",children:(0,r.jsx)(n.p,{children:"Sampling time scales with how full the node's reserve is within its radius, since the sampler walks every chunk in radius.\nReserve occupancy depends on network conditions rather than on anything the operator sets, so a result measured against a half-full reserve says little about the same node once the reserve fills up.\nA node holding around 2M chunks can complete a sample in roughly half the time of one at the full default reserve capacity of about 4M chunks.\nAim for a comfortable margin below 360 seconds; a marginal pass is not enough."})}),"\n",(0,r.jsx)(n.admonition,{title:"Slow results",type:"warning",children:(0,r.jsxs)(n.p,{children:["If ",(0,r.jsx)(n.code,{children:"durationSeconds"})," is much longer than 360 seconds (for example, 1191 seconds / ~20 minutes), the node will likely fail to submit proofs in time during the redistribution game, resulting in missed rewards or freezing.\nThe sampler reads every chunk in radius from local storage, so disk and processor speed are typically the bottlenecks.\nUpgrade to a faster SSD first, then consider a faster processor or more cores."]})}),"\n",(0,r.jsxs)(n.p,{children:["If while running the ",(0,r.jsx)(n.code,{children:"/rchash"})," command there is an evictions related error such\nas the one below, try running the call to the ",(0,r.jsx)(n.code,{children:"/rchash"})," endpoint again."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-text",children:'error: "level"="error" "logger"="node/storageincentives" "msg"="make sample" "error"="sampler: failed creating sample: sampler stopped due to ongoing evictions"\n'})}),"\n",(0,r.jsx)(n.p,{children:"While evictions are a normal part of Bee's standard operation, the event of an\neviction will interrupt the sampler process."}),"\n",(0,r.jsx)(n.h3,{id:"health",children:(0,r.jsx)(n.em,{children:"/health"})}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"/health"})," endpoint provides a quick status check for your Bee node which simply indicates whether the node is operating or not. It is often used in tools like Docker and Kubernetes."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"curl -s http://localhost:1633/health | jq\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "status": "ok",\n "version": "2.8.1-7cf53193",\n "apiVersion": "8.1.0"\n}\n'})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"status"'}),' - "ok" if the server is responsive.']}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:'"version"'})," - The version of your Bee node. You can find latest version by checking the ",(0,r.jsx)(n.a,{href:"https://github.com/ethersphere/bee",children:"Bee github repo"}),"."]}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:'"apiVersion"'})}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}},19365(e,n,s){s.d(n,{A:()=>l});s(96540);var o=s(34164),r=s(47751);const i="tabItem_Ymn6";var t=s(74848);function a(e){let n=e.children,s=e.className,r=e.hidden;return(0,t.jsx)("div",{role:"tabpanel",className:(0,o.A)(i,s),hidden:r,children:n})}function l(e){let n=e.children,s=e.className,o=e.value;const i=(0,r.uc)(),l=i.selectedValue,d=i.lazy,c=o===l;return!c&&d?null:(0,t.jsx)(a,{className:s,hidden:!c,children:n})}},4865(e,n,s){s.d(n,{A:()=>m});s(96540);var o=s(34164),r=s(17559),i=s(47751),t=s(23104),a=s(92303);const l="tabList__CuJ",d="tabItem_LNqP";var c=s(74848);function h(e){let n=e.className;const s=(0,i.uc)(),r=s.selectedValue,a=s.selectValue,l=s.tabValues,h=s.block,u=[],p=(0,t.a_)().blockElementScrollPositionUntilNextRender,m=e=>{const n=e.currentTarget,s=u.indexOf(n),o=l[s].value;o!==r&&(p(n),a(o))},b=e=>{var n;let s=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{var o;const n=u.indexOf(e.currentTarget)+1;s=null!=(o=u[n])?o:u[0];break}case"ArrowLeft":{var r;const n=u.indexOf(e.currentTarget)-1;s=null!=(r=u[n])?r:u[u.length-1];break}}null==(n=s)||n.focus()};return(0,c.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.A)("tabs",{"tabs--block":h},n),children:l.map(e=>{let n=e.value,s=e.label,i=e.attributes;return(0,c.jsx)("li",Object.assign({role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:e=>{u.push(e)},onKeyDown:b,onClick:m},i,{className:(0,o.A)("tabs__item",d,null==i?void 0:i.className,{"tabs__item--active":r===n}),children:null!=s?s:n}),n)})})}function u(e){let n=e.children;return(0,c.jsx)("div",{className:"margin-top--md",children:n})}function p(e){let n=e.className,s=e.children;return(0,c.jsxs)("div",{className:(0,o.A)(r.G.tabs.container,"tabs-container",l),children:[(0,c.jsx)(h,{className:n}),(0,c.jsx)(u,{children:s})]})}function m(e){const n=(0,a.A)(),s=(0,i.OC)(e);return(0,c.jsx)(i.O_,{value:s,children:(0,c.jsx)(p,{className:e.className,children:(0,i.vT)(e.children)})},String(n))}},47751(e,n,s){s.d(n,{OC:()=>m,O_:()=>x,uc:()=>f,vT:()=>c});var o=s(96540),r=s(56347),i=s(205),t=s(57485),a=s(70679),l=s(31682),d=s(74848);function c(e){return o.Children.toArray(e).filter(e=>"\n"!==e)}function h(e){const n=e.values,s=e.children;return(0,o.useMemo)(()=>{const e=null!=n?n:function(e){return o.Children.toArray(e).flatMap(e=>{if(!e)return[];if((0,o.isValidElement)(e)&&function(e){const n=e.props;return!!n&&"object"==typeof n&&"value"in n}(e))return[e];const n="string"==typeof e.type?e.type:e.type.name;throw new Error("Docusaurus error: Bad child <"+n+'>: all children of the component should be , and every should have a unique "value" prop.\nIf you do not want to pass on a "value" prop to the direct children of , you can also pass an explicit prop.')}).map(e=>{let n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}})}(s);return function(e){const n=(0,l.XI)(e,(e,n)=>e.value===n.value);if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map(e=>"'"+e.value+"'").join(", ")+'" found in . Every value needs to be unique.')}(e),e},[n,s])}function u(e){let n=e.value;return e.tabValues.some(e=>e.value===n)}function p(e){let n=e.queryString,s=void 0!==n&&n,i=e.groupId;const a=(0,r.W6)(),l=function(e){let n=e.queryString,s=void 0!==n&&n,o=e.groupId;if("string"==typeof s)return s;if(!1===s)return null;if(!0===s&&!o)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=o?o:null}({queryString:s,groupId:i});return[(0,t.aZ)(l),(0,o.useCallback)(e=>{if(!l)return;const n=new URLSearchParams(a.location.search);n.set(l,e),a.replace(Object.assign({},a.location,{search:n.toString()}))},[l,a])]}function m(e){var n,s;const r=e.defaultValue,t=e.queryString,l=void 0!==t&&t,d=e.groupId,c=h(e),m=(0,o.useState)(()=>function(e){var n;let s=e.defaultValue,o=e.tabValues;if(0===o.length)throw new Error("Docusaurus error: the component requires at least one children component");if(s){if(!u({value:s,tabValues:o}))throw new Error('Docusaurus error: The has a defaultValue "'+s+'" but none of its children has the corresponding value. Available values are: '+o.map(e=>e.value).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return s}const r=null!=(n=o.find(e=>e.default))?n:o[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:r,tabValues:c})),b=m[0],f=m[1],x=p({queryString:l,groupId:d}),g=x[0],j=x[1],y=function(e){const n=function(e){return e?"docusaurus.tab."+e:null}(e.groupId),s=(0,a.Dv)(n),r=s[0],i=s[1];return[r,(0,o.useCallback)(e=>{n&&i.set(e)},[n,i])]}({groupId:d}),w=y[0],v=y[1],k=(()=>{const e=null!=g?g:w;return u({value:e,tabValues:c})?e:null})();(0,i.A)(()=>{k&&f(k)},[k]);return{selectedValue:b,selectValue:(0,o.useCallback)(e=>{if(!u({value:e,tabValues:c}))throw new Error("Can't select invalid tab value="+e);f(e),j(e),v(e)},[j,v,c]),tabValues:c,lazy:null!=(n=e.lazy)&&n,block:null!=(s=e.block)&&s}}const b=(0,o.createContext)(null);function f(){const e=o.useContext(b);if(!e)throw new Error("useTabsContext() must be used within a Tabs component");return e}function x(e){return(0,d.jsx)(b.Provider,{value:e.value,children:e.children})}},28453(e,n,s){s.d(n,{R:()=>t,x:()=>a});var o=s(96540);const r={},i=o.createContext(r);function t(e){const n=o.useContext(i);return o.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:t(e.components),o.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e76d947a.dc1e37b0.js b/assets/js/e76d947a.dc1e37b0.js new file mode 100644 index 000000000..a8d87a86d --- /dev/null +++ b/assets/js/e76d947a.dc1e37b0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[9030],{62645(e,n,i){i.r(n),i.d(n,{assets:()=>a,contentTitle:()=>d,default:()=>l,frontMatter:()=>s,metadata:()=>o,toc:()=>c});const o=JSON.parse('{"id":"bee/working-with-bee/introduction","title":"Introduction","description":"Overview of node operation topics including configuration API access backups monitoring and upgrade procedures.","source":"@site/docs/bee/working-with-bee/introduction.md","sourceDirName":"bee/working-with-bee","slug":"/bee/working-with-bee/introduction","permalink":"/docs/bee/working-with-bee/introduction","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/bee/working-with-bee/introduction.md","tags":[],"version":"current","frontMatter":{"title":"Introduction","id":"introduction","description":"Overview of node operation topics including configuration API access backups monitoring and upgrade procedures."},"sidebar":"bee","previous":{"title":"Fund Your Node","permalink":"/docs/bee/installation/fund-your-node"},"next":{"title":"Configuration","permalink":"/docs/bee/working-with-bee/configuration"}}');var t=i(74848),r=i(28453);const s={title:"Introduction",id:"introduction",description:"Overview of node operation topics including configuration API access backups monitoring and upgrade procedures."},d=void 0,a={},c=[{value:"Configuration",id:"configuration",level:2},{value:"Bee API",id:"bee-api",level:2},{value:"Logs and Files",id:"logs-and-files",level:2},{value:"Swarm CLI",id:"swarm-cli",level:2},{value:"Cashing Out",id:"cashing-out",level:2},{value:"Monitoring and Metrics",id:"monitoring-and-metrics",level:2},{value:"Backups",id:"backups",level:2},{value:"Upgrading",id:"upgrading",level:2},{value:"Uninstalling Bee",id:"uninstalling-bee",level:2}];function u(e){const n={a:"a",code:"code",h2:"h2",p:"p",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"In this section we cover everything a node operator needs to know about working with Bee:"}),"\n",(0,t.jsx)(n.h2,{id:"configuration",children:"Configuration"}),"\n",(0,t.jsxs)(n.p,{children:["Learn how to ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/configuration",children:"configure your node"}),", and the details behind all the configuration options Bee provides."]}),"\n",(0,t.jsx)(n.h2,{id:"bee-api",children:"Bee API"}),"\n",(0,t.jsxs)(n.p,{children:["Access the HTTP API directly for ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/bee-api",children:"detailed information about your Bee"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"logs-and-files",children:"Logs and Files"}),"\n",(0,t.jsxs)(n.p,{children:["Find out where Bee stores your ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/logs-and-files",children:"logs and files"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"swarm-cli",children:"Swarm CLI"}),"\n",(0,t.jsxs)(n.p,{children:["You can use the ",(0,t.jsxs)(n.a,{href:"/docs/bee/working-with-bee/swarm-cli",children:[(0,t.jsx)(n.code,{children:"swarm-cli"}),"command line tool"]})," to monitor your Bee's status, cash out your cheques, upload data to the swarm and more!"]}),"\n",(0,t.jsx)(n.h2,{id:"cashing-out",children:"Cashing Out"}),"\n",(0,t.jsxs)(n.p,{children:["Get your cheques cashed and bank your xBZZ. ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/cashing-out",children:"See this guide"})," to receiving payments from your peers."]}),"\n",(0,t.jsx)(n.h2,{id:"monitoring-and-metrics",children:"Monitoring and Metrics"}),"\n",(0,t.jsxs)(n.p,{children:["There is a lot going on inside Bee, we provide tools and metrics to help you ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/monitoring",children:"find out what's going on"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"backups",children:"Backups"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/backups",children:"Keep your important data safe"}),", Bee stores important state and key information on your hardrive, make sure you keep a secure copy in case of disaster."]}),"\n",(0,t.jsx)(n.h2,{id:"upgrading",children:"Upgrading"}),"\n",(0,t.jsxs)(n.p,{children:["Find out how to ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/upgrading-bee",children:"keep your Bee up to date"})," with the latest and greatest releases, and make sure you're tuned into our release announcements."]}),"\n",(0,t.jsx)(n.h2,{id:"uninstalling-bee",children:"Uninstalling Bee"}),"\n",(0,t.jsxs)(n.p,{children:["We hope you won't need to remove Bee. If you do, please let us know if you had issues so we can help resolve them for our beloved network. Here's the guide to ",(0,t.jsx)(n.a,{href:"/docs/bee/working-with-bee/uninstalling-bee",children:"removing Bee from your system"}),"."]})]})}function l(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(u,{...e})}):u(e)}},28453(e,n,i){i.d(n,{R:()=>s,x:()=>d});var o=i(96540);const t={},r=o.createContext(t);function s(e){const n=o.useContext(r);return o.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:s(e.components),o.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e88c9444.d30fcc42.js b/assets/js/e88c9444.d30fcc42.js new file mode 100644 index 000000000..f4968eaea --- /dev/null +++ b/assets/js/e88c9444.d30fcc42.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[5452],{8354(e,t,n){n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>u,frontMatter:()=>s,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"concepts/introduction","title":"Introduction","description":"Overview of Swarm\'s peer-to-peer infrastructure the Bee client and the Swarm Foundation\'s mission for decentralized storage.","source":"@site/docs/concepts/introduction.md","sourceDirName":"concepts","slug":"/concepts/introduction","permalink":"/docs/concepts/introduction","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/concepts/introduction.md","tags":[],"version":"current","frontMatter":{"title":"Introduction","id":"introduction","description":"Overview of Swarm\'s peer-to-peer infrastructure the Bee client and the Swarm Foundation\'s mission for decentralized storage."},"sidebar":"concepts","next":{"title":"What is Swarm?","permalink":"/docs/concepts/what-is-swarm"}}');var i=n(74848),r=n(28453);const s={title:"Introduction",id:"introduction",description:"Overview of Swarm's peer-to-peer infrastructure the Bee client and the Swarm Foundation's mission for decentralized storage."},a=void 0,c={},d=[{value:"Bee Client",id:"bee-client",level:2},{value:"Swarm Foundation",id:"swarm-foundation",level:2}];function l(e){const t={a:"a",h2:"h2",p:"p",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.p,{children:"Swarm is a peer-to-peer network of Bee nodes that collectively provide censorship-resistant decentralised storage and communication services. Swarm's mission is to enable a self-sovereign global society and permissionless open markets by providing scalable decentralized storage infrastructure for Web3. Its incentive system is enforced through smart contracts on the Gnosis Chain blockchain and powered by the xBZZ token, making it economically self-sustaining."}),"\n",(0,i.jsx)(t.h2,{id:"bee-client",children:"Bee Client"}),"\n",(0,i.jsxs)(t.p,{children:["Bee is a Swarm client implemented in Go and serves as the foundation of the Swarm network. Bee nodes form a private, decentralized, and self-sustaining network for permissionless publishing and data storage. You can learn more about how Bee clients work by reading about the ",(0,i.jsx)(t.a,{href:"/docs/concepts/what-is-swarm",children:"concepts and protocols"})," which underpin the Swarm network. To get hands on experience working with Swarm, you can start by learning how to ",(0,i.jsx)(t.a,{href:"/docs/bee/installation/getting-started",children:"install and operate a Bee node"}),"."]}),"\n",(0,i.jsx)(t.h2,{id:"swarm-foundation",children:"Swarm Foundation"}),"\n",(0,i.jsxs)(t.p,{children:["The ",(0,i.jsx)(t.a,{href:"https://www.ethswarm.org/foundation",children:"Swarm Foundation"})," is dedicated to advancing open-source technology for decentralized data storage and exchange. It fosters a sustainable, independent ecosystem by supporting the development of free and open-source software (FLOSS) and empowering a community built around crypto-economic incentives for processing, distributing, and storing data."]}),"\n",(0,i.jsx)(t.p,{children:"Its mission is to champion digital freedom by promoting the Swarm network as the foundational layer of the fair data economy, while nurturing the community that sustains it."}),"\n",(0,i.jsx)(t.p,{children:"To achieve this, the foundation provides financial grants and other forms of support, evaluated on a case-by-case basis."})]})}function u(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},28453(e,t,n){n.d(t,{R:()=>s,x:()=>a});var o=n(96540);const i={},r=o.createContext(i);function s(e){const t=o.useContext(r);return o.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),o.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/eae929fd.1a963f23.js b/assets/js/eae929fd.1a963f23.js new file mode 100644 index 000000000..462e79d69 --- /dev/null +++ b/assets/js/eae929fd.1a963f23.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[5878],{99909(e,s,n){n.r(s),n.d(s,{assets:()=>d,contentTitle:()=>o,default:()=>c,frontMatter:()=>r,metadata:()=>t,toc:()=>h});const t=JSON.parse('{"id":"references/glossary","title":"Glossary","description":"Comprehensive glossary of terms and concepts used throughout Swarm documentation.","source":"@site/docs/references/glossary.md","sourceDirName":"references","slug":"/references/glossary","permalink":"/docs/references/glossary","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/references/glossary.md","tags":[],"version":"current","frontMatter":{"title":"Glossary","id":"glossary","description":"Comprehensive glossary of terms and concepts used throughout Swarm documentation."},"sidebar":"References","previous":{"title":"Tokens","permalink":"/docs/references/tokens"},"next":{"title":"Community","permalink":"/docs/references/community"}}');var a=n(74848),i=n(28453);const r={title:"Glossary",id:"glossary",description:"Comprehensive glossary of terms and concepts used throughout Swarm documentation."},o=void 0,d={},h=[{value:"Swarm",id:"swarm",level:2},{value:"Gnosis Chain",id:"gnosis-chain",level:2},{value:"Smart Contracts",id:"smart-contracts",level:2},{value:"Bee",id:"bee",level:2},{value:"Overlay",id:"overlay",level:2},{value:"Overlay Address",id:"overlay-address",level:2},{value:"Neighborhood",id:"neighborhood",level:2},{value:"Sister Neighborhood",id:"sister-neighborhood",level:2},{value:"Parent Neighborhood",id:"parent-neighborhood",level:2},{value:"Underlay",id:"underlay",level:2},{value:"Swap",id:"swap",level:2},{value:"Cheques & Chequebook",id:"cheques--chequebook",level:2},{value:"Postage Stamps",id:"postage-stamps",level:2},{value:"Kademlia",id:"kademlia",level:2},{value:"Kademlia distance",id:"kademlia-distance",level:2},{value:"Chunk",id:"chunk",level:2},{value:"Proximity Order (PO)",id:"proximity-order-po",level:2},{value:"Depth types",id:"depth-types",level:2},{value:"1. Topology related depth",id:"1-topology-related-depth",level:3},{value:"2. Area of responsibility related depths",id:"2-area-of-responsibility-related-depths",level:3},{value:"2a. Reserve Depth",id:"2a-reserve-depth",level:3},{value:"2b. Storage Depth",id:"2b-storage-depth",level:3},{value:"3. Postage stamp batch and chunk related depths",id:"3-postage-stamp-batch-and-chunk-related-depths",level:3},{value:"3a. Batch depth",id:"3a-batch-depth",level:3},{value:"3b. Bucket depth",id:"3b-bucket-depth",level:3},{value:"PLUR",id:"plur",level:2},{value:"Bridged Tokens",id:"bridged-tokens",level:2},{value:"BZZ Token",id:"bzz-token",level:2},{value:"xBZZ Token",id:"xbzz-token",level:2},{value:"DAI Token",id:"dai-token",level:2},{value:"xDAI Token",id:"xdai-token",level:2},{value:"Sepolia",id:"sepolia",level:2},{value:"Faucet",id:"faucet",level:2},{value:"RPC Endpoint",id:"rpc-endpoint",level:2}];function l(e){const s={a:"a",annotation:"annotation",blockquote:"blockquote",br:"br",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",math:"math",mi:"mi",mn:"mn",mrow:"mrow",msup:"msup",p:"p",semantics:"semantics",span:"span",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.h2,{id:"swarm",children:"Swarm"}),"\n",(0,a.jsxs)(s.p,{children:["The Swarm network consists of a collection of ",(0,a.jsx)(s.a,{href:"#bee",children:"Bee nodes"})," which work together to enable decentralised data storage for the next generation of censorship-resistant, unstoppable, serverless dapps."]}),"\n",(0,a.jsxs)(s.p,{children:["Swarm is also the name of the core organization that oversees the development and success of the Bee Swarm as a whole. They can be found at ",(0,a.jsx)(s.a,{href:"https://www.ethswarm.org/",children:"ethswarm.org"}),"."]}),"\n",(0,a.jsx)(s.h2,{id:"gnosis-chain",children:"Gnosis Chain"}),"\n",(0,a.jsxs)(s.p,{children:[(0,a.jsx)(s.a,{href:"https://www.gnosis.io/",children:"Gnosis Chain"})," (previously known as xDai chain) is a ",(0,a.jsx)(s.a,{href:"https://www.validategnosis.com/",children:"PoS"}),", ",(0,a.jsx)(s.a,{href:"https://ethereum.org/developers/docs/evm/",children:"EVM"})," compatible Ethereum ",(0,a.jsx)(s.a,{href:"https://ethereum.org/developers/docs/scaling/sidechains/",children:"sidechain"})," which uses the same addressing scheme as Ethereum. Swarm's smart contracts have been issued on Gnosis Chain."]}),"\n",(0,a.jsx)(s.h2,{id:"smart-contracts",children:"Smart Contracts"}),"\n",(0,a.jsxs)(s.p,{children:["Smart contracts are automatically executable code which can be published on a blockchain to ensure immutability. Swarm uses smart contracts on Gnosis Chain for a variety of key aspects of the network including ",(0,a.jsx)(s.a,{href:"#xbzz-token",children:"incentivization"}),", ",(0,a.jsx)(s.a,{href:"#swap",children:"inter-node accounting"}),", and ",(0,a.jsx)(s.a,{href:"#postage-stamps",children:"payments for storage"}),"."]}),"\n",(0,a.jsx)(s.h2,{id:"bee",children:"Bee"}),"\n",(0,a.jsx)(s.p,{children:'Swarm nodes are referred to as "Bee" nodes. Bee nodes can run on a wide variety of computer types including desktop computers, hobbyist computers like Raspberry Pi 4 (for light or ultralight nodes), remotely hosted virtual machines, and much more. When running, Bee nodes interact with Swarm smart contracts on Gnosis Chain and connect with other Bee nodes to form the Swarm network.'}),"\n",(0,a.jsx)(s.p,{children:"Bee nodes can act as both client and service provider, or solely as client or service provider, depending on the needs of the node operator. Bee nodes pay each other for services on the Swarm network with the xBZZ token."}),"\n",(0,a.jsx)(s.h2,{id:"overlay",children:"Overlay"}),"\n",(0,a.jsx)(s.p,{children:'An overlay network is a virtual or logical network built on top of some lower level "underlay" network. Examples include the Internet as an overlay network built on top of the telephone network, and the p2p Bittorent network built on top of the Internet.'}),"\n",(0,a.jsxs)(s.p,{children:["With Swarm, the overlay network is based on a ",(0,a.jsx)(s.a,{href:"https://en.wikipedia.org/wiki/Kademlia",children:"Kademlia DHT"})," with overlay addresses derived from each node's ",(0,a.jsx)(s.a,{href:"#gnosis-chain",children:"Gnosis"})," address. Swarm's overlay network addresses are permanent identifiers for each node and do not change over time."]}),"\n",(0,a.jsx)(s.h2,{id:"overlay-address",children:"Overlay Address"}),"\n",(0,a.jsx)(s.p,{children:'Overlay addresses are a Keccak256 hash of a node\u2019s Gnosis Chain address and the Swarm network ID (the Swarm network ID is included to prevent address collisions). The overlay address for a node does not change over time and is a permanent identifier for the node. Overlay addresses are used to group nodes into neighborhoods which are responsible for storing the same chunks of data. If not otherwise specified, when referring to a "node address", it typically is referring to the overlay address, not the underlay address. The overlay address is the address used to determine which nodes connect to each other and which chunks nodes are responsible for.'}),"\n",(0,a.jsx)(s.h2,{id:"neighborhood",children:"Neighborhood"}),"\n",(0,a.jsxs)(s.p,{children:[(0,a.jsx)(s.a,{href:"/docs/concepts/DISC/neighborhoods",children:"Neighborhoods"})," are nodes which are grouped together based on their overlay addresses and are responsible for storing the same chunks of data. The chunks which each neighborhood are responsible for storing are defined by the proximity order of the nodes and the chunks."]}),"\n",(0,a.jsx)(s.h2,{id:"sister-neighborhood",children:"Sister Neighborhood"}),"\n",(0,a.jsx)(s.p,{children:"A sister neighborhood is composed of nodes in the other half of an old neighborhood after a neighborhood split."}),"\n",(0,a.jsx)(s.h2,{id:"parent-neighborhood",children:"Parent Neighborhood"}),"\n",(0,a.jsx)(s.p,{children:"A parent neighborhood is the neighborhood one proximity order shallower than the two sister neighborhoods it contains. For example, given a neighborhood at depth 5 of 01011 and its sister neighborhood of 01010, their parent neighborhood is 0101 at depth 4."}),"\n",(0,a.jsx)(s.h2,{id:"underlay",children:"Underlay"}),"\n",(0,a.jsxs)(s.p,{children:["An underlay network is the low level network on which an overlay network is built. It allows nodes to find each other, communicate, and transfer data. Swarm's underlay network is a p2p network built with ",(0,a.jsx)(s.a,{href:"https://libp2p.io/",children:"libp2p"}),". Nodes are assigned underlay addresses which in contrast to their overlay addresses are not permanent and may change over time."]}),"\n",(0,a.jsx)(s.h2,{id:"swap",children:"Swap"}),"\n",(0,a.jsxs)(s.p,{children:["Swap is the p2p accounting protocol used for Bee nodes. It allows for the automated accounting and settlement of services between Bee nodes in the Swarm network. In the case that services exchanged between nodes is balanced equally, no settlement is necessary. In the case that one node is unequally indebted to another, settlement is made to clear the node's debts. Two key elements of the Swap protocol are ",(0,a.jsx)(s.a,{href:"#cheques--chequebook",children:"cheques and the chequebook contract"}),"."]}),"\n",(0,a.jsx)(s.h2,{id:"cheques--chequebook",children:"Cheques & Chequebook"}),"\n",(0,a.jsx)(s.p,{children:"Cheques are the off-chain method of accounting used by the Swap protocol where the issuing node signs a cheque specifying a beneficiary, a date, and an amount, and gives it to the recipient node as a token of promise to pay at a later date."}),"\n",(0,a.jsx)(s.p,{children:"The chequebook is the smart contract where the cheque issuer's funds are stored and where the beneficiary can cash the cheque received."}),"\n",(0,a.jsx)(s.p,{children:"The cheque and chequebook system reduces the number of required on-chain transactions by allowing multiple cheques to accumulate and be settled together as a group, and in the case that the balance of cheques between nodes is equal, no settlement transaction is required at all."}),"\n",(0,a.jsx)(s.h2,{id:"postage-stamps",children:"Postage Stamps"}),"\n",(0,a.jsxs)(s.p,{children:["Postage stamps can be purchased with ",(0,a.jsx)(s.a,{href:"#xbzz-token",children:"xBZZ"})," and represent the right to store data on the Swarm network. In order to upload data to Swarm, a user must purchase a batch of stamps which they can then use to upload an equivalent amount of data to the network."]}),"\n",(0,a.jsx)(s.h2,{id:"kademlia",children:"Kademlia"}),"\n",(0,a.jsx)(s.p,{children:'Kademlia is a distributed hash table (DHT) which is commonly used in distributed peer-to-peer networks. A distributed hash table is a type of hash table which is designed to be stored across a decentralized group of nodes in order to be persistent and fault tolerant. It is designed so that each node is only required to store a subset of the total set of key / value pairs. One of the unique features of the Kademlia DHT design is a distance metric based on the XOR bitwise operation. It is referred to as "Kademlia distance" or just "distance". Swarm\u2019s DISC uses a modified version of Kademlia which has been specialized for storage purposes, and understanding the concepts behind Kademlia is necessary for understanding Swarm.'}),"\n",(0,a.jsx)(s.h2,{id:"kademlia-distance",children:"Kademlia distance"}),"\n",(0,a.jsx)(s.p,{children:"Kademlia introduces an XOR based distance metric to define the relatedness of two addresses. In Kademlia nodes have numeric ids with the same length and format taken from the same namespace as the keys of the key/value pairs. Kademlia distance between node ids and keys is calculated through the XOR bitwise operation done over any ids or keys."}),"\n",(0,a.jsx)(s.p,{children:"Note: For a Kademlia DHT, any standardized numerical format can be used for ids. However, within Swarm, ids are derived from a Keccak256 digest and are represented as 256 bit hexadecimal numbers. They are referred to as addresses or hashes."}),"\n",(0,a.jsx)(s.p,{children:"Swarm hash:"}),"\n",(0,a.jsxs)(s.blockquote,{children:["\n",(0,a.jsx)(s.p,{children:"eada6722670c6de6da7d0470167bf14f6e4dc1b98476da94a7330041adec26a3"}),"\n"]}),"\n",(0,a.jsx)(s.p,{children:"In the examples which follow, we use short binary numbers to increase example clarity rather than the actual Swarm hash format."}),"\n",(0,a.jsx)(s.p,{children:"Example: We have a Kademlia DHT consisting of only ten nodes with ids of 1 - 10. We want to find the distance between node 4 and 7. In order to do that, we perform the XOR bitwise operation:"}),"\n",(0,a.jsxs)(s.p,{children:["4 | 0100",(0,a.jsx)(s.br,{}),"\n","7 | 0111",(0,a.jsx)(s.br,{}),"\n","\u2014\u2014\u2014\u2014XOR",(0,a.jsx)(s.br,{}),"\n","3 | 0011"]}),"\n",(0,a.jsx)(s.p,{children:"And we find that the distance between the two nodes is 3."}),"\n",(0,a.jsx)(s.h2,{id:"chunk",children:"Chunk"}),"\n",(0,a.jsxs)(s.p,{children:["When data is uploaded to Swarm, it is broken down into 4kb sized pieces which are each assigned an address in the same format as node\u2019s overlay addresses. Chunk addresses are formed by taking the BMT hash of the chunk content along with an 8 byte measure of the number of the chunk\u2019s child chunks, the ",(0,a.jsx)(s.code,{children:"span"}),". The BMT hashing algorithm is based on the Keccac256 hashing algorithm, so it produces an address with the same format as that for the node overlay addresses."]}),"\n",(0,a.jsx)(s.h2,{id:"proximity-order-po",children:"Proximity Order (PO)"}),"\n",(0,a.jsx)(s.p,{children:'Proximity Order is a concept defined in The Book of Swarm and is closely related to Kademlia distance. In contrast to distance which is an exact measure of the relatedness of two nodes, PO is a discrete measure relatedness between two nodes. By "discrete", we mean that PO is a general measure of relatedness rather than an exact measure of relatedness like the XOR distance metric of Kademlia.'}),"\n",(0,a.jsx)(s.p,{children:"Proximity order is defined as the number of shared prefix bits of any two addresses. It is found by performing the XOR bitwise operation on the two addresses and counting how many leading 0 there are before the first 1."}),"\n",(0,a.jsx)(s.p,{children:"Taking the previous example used in the Kademlia distance definition:"}),"\n",(0,a.jsxs)(s.p,{children:["4 | 0100",(0,a.jsx)(s.br,{}),"\n","7 | 0111",(0,a.jsx)(s.br,{}),"\n","\u2014\u2014\u2014\u2014XOR",(0,a.jsx)(s.br,{}),"\n","3 | 0011"]}),"\n",(0,a.jsx)(s.p,{children:"In the result we find that the distance is 3, and that there are two leading zeros. Therefore for the PO of these two nodes is 2."}),"\n",(0,a.jsx)(s.p,{children:"Both Proximity Order and distance are measures of the relatedness of ids, however Kademlia distance is a more exact measurement."}),"\n",(0,a.jsx)(s.p,{children:"Taking the previous example used in the Kademlia distance definition:"}),"\n",(0,a.jsxs)(s.p,{children:["5 | 0101",(0,a.jsx)(s.br,{}),"\n","7 | 0111",(0,a.jsx)(s.br,{}),"\n","\u2014\u2014\u2014\u2014XOR",(0,a.jsx)(s.br,{}),"\n","2 | 0010"]}),"\n",(0,a.jsx)(s.p,{children:"Here we find that the distance between 5 and 7 is 2, and the PO is also two. Although 5 is closer to 7 than 4 is to 7, they both fall within the same PO, since PO is only concerned with the shared leading bits. PO is a fundamental concept to Swarm\u2019s design and is used as the basic unit of relatedness when discussing the addresses of chunks and nodes. PO is also closely related to the concept of depth."}),"\n",(0,a.jsx)(s.h2,{id:"depth-types",children:"Depth types"}),"\n",(0,a.jsx)(s.p,{children:"There are three fundamental categories of depth:"}),"\n",(0,a.jsx)(s.h3,{id:"1-topology-related-depth",children:"1. Topology related depth"}),"\n",(0,a.jsx)(s.p,{children:"Topology-related depth is defined in relation to the connection topology of a single node, as the subject in relation to all the other nodes it is connected to. It is referred to using several different terms which all refer to the same concept (Connectivity depth / Kademlia depth / neighborhood depth / physical depth)"}),"\n",(0,a.jsx)(s.p,{children:"Connectivity depth refers to the saturation level of the node\u2019s topology - the level to which the topology of a node\u2019s connections has Kademlia connectivity. Defined as one level deeper than the deepest fully saturated level. A PO is defined as saturated if it has at least the minimum required level of connected nodes, which is set at 8 nodes in the current implementation of Swarm."}),"\n",(0,a.jsxs)(s.p,{children:["The output from the Bee API's ",(0,a.jsx)(s.code,{children:"topology"})," endpoint:"]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{src:n(62748).A+"",width:"1213",height:"736"})}),"\n",(0,a.jsx)(s.p,{children:"Here we can see the depth is 8, meaning that PO bin 7 is the deepest fully saturated PO bin:"}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{src:n(51479).A+"",width:"913",height:"835"})}),"\n",(0,a.jsx)(s.p,{children:"Here we can confirm that at least 8 nodes are connected in bin 7."}),"\n",(0,a.jsx)(s.p,{children:"Connectivity depth is defined from the point of view of individual nodes, it is not defined as characteristic of the entire network. However, given a uniform distribution of node ids within the namespace and given enough nodes, all nodes should converge towards the same connectivity depth."}),"\n",(0,a.jsx)(s.p,{children:"While this is sometimes referred to as Kademlia depth, the term \u201cKademlia depth\u201d is not defined within the original Kademlia paper, rather it refers to the depth at which the network in question (Swarms) has the characteristics which fulfill the requirements described in the Kademlia paper."}),"\n",(0,a.jsx)(s.h3,{id:"2-area-of-responsibility-related-depths",children:"2. Area of responsibility related depths"}),"\n",(0,a.jsx)(s.p,{children:"Area of responsibility refers to which chunks a node is responsible for storing. There are two concepts of depth related to a node\u2019s area of responsibility - storage depth and reserve depth. Both reserve depth and storage depth are measures of PO which define the chunks a node is responsible for storing."}),"\n",(0,a.jsx)(s.h3,{id:"2a-reserve-depth",children:"2a. Reserve Depth"}),"\n",(0,a.jsx)(s.p,{children:"The PO which measures the node\u2019s area of responsibility based on the theoretical 100% utilisation of all postage stamp batches (all the chunks which are eligible to be uploaded and stored are uploaded and stored). Has an inverse relationship with area of responsibility - as depth grows, area of responsibility gets smaller."}),"\n",(0,a.jsx)(s.h3,{id:"2b-storage-depth",children:"2b. Storage Depth"}),"\n",(0,a.jsx)(s.p,{children:"The PO which measures the node\u2019s effective area of responsibility. Storage depth will equal reserve depth in the case of 100% utilisation - however 100% utilisation is uncommon. If after syncing all the chunks within the node\u2019s area of responsibility at its reserve depth and the node still has sufficient space left, then the storage depth will decrease so that the area of responsibility doubles."}),"\n",(0,a.jsx)(s.h3,{id:"3-postage-stamp-batch-and-chunk-related-depths",children:"3. Postage stamp batch and chunk related depths"}),"\n",(0,a.jsx)(s.h3,{id:"3a-batch-depth",children:"3a. Batch depth"}),"\n",(0,a.jsxs)(s.p,{children:["Batch depth is the value ",(0,a.jsx)(s.code,{children:"d"})," which is defined in relation to the size of a postage stamp batch. The size of a batch is defined as the number of chunks which can be stamped by that batch (also referred to as the number of slots per batch, with one chunk per slot). The size is calculated by:"]}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsx)(s.li,{children:(0,a.jsxs)(s.span,{className:"katex",children:[(0,a.jsx)(s.span,{className:"katex-mathml",children:(0,a.jsx)(s.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,a.jsxs)(s.semantics,{children:[(0,a.jsx)(s.mrow,{children:(0,a.jsxs)(s.msup,{children:[(0,a.jsx)(s.mn,{children:"2"}),(0,a.jsx)(s.mi,{children:"d"})]})}),(0,a.jsx)(s.annotation,{encoding:"application/x-tex",children:"2^{d}"})]})})}),(0,a.jsx)(s.span,{className:"katex-html","aria-hidden":"true",children:(0,a.jsxs)(s.span,{className:"base",children:[(0,a.jsx)(s.span,{className:"strut",style:{height:"0.8491em"}}),(0,a.jsxs)(s.span,{className:"mord",children:[(0,a.jsx)(s.span,{className:"mord",children:"2"}),(0,a.jsx)(s.span,{className:"msupsub",children:(0,a.jsx)(s.span,{className:"vlist-t",children:(0,a.jsx)(s.span,{className:"vlist-r",children:(0,a.jsx)(s.span,{className:"vlist",style:{height:"0.8491em"},children:(0,a.jsxs)(s.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,a.jsx)(s.span,{className:"pstrut",style:{height:"2.7em"}}),(0,a.jsx)(s.span,{className:"sizing reset-size6 size3 mtight",children:(0,a.jsx)(s.span,{className:"mord mtight",children:(0,a.jsx)(s.span,{className:"mord mathnormal mtight",children:"d"})})})]})})})})})]})]})})]})}),"\n",(0,a.jsxs)(s.li,{children:[(0,a.jsxs)(s.span,{className:"katex",children:[(0,a.jsx)(s.span,{className:"katex-mathml",children:(0,a.jsx)(s.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,a.jsxs)(s.semantics,{children:[(0,a.jsx)(s.mrow,{children:(0,a.jsx)(s.mi,{children:"d"})}),(0,a.jsx)(s.annotation,{encoding:"application/x-tex",children:"d"})]})})}),(0,a.jsx)(s.span,{className:"katex-html","aria-hidden":"true",children:(0,a.jsxs)(s.span,{className:"base",children:[(0,a.jsx)(s.span,{className:"strut",style:{height:"0.6944em"}}),(0,a.jsx)(s.span,{className:"mord mathnormal",children:"d"})]})})]})," is a value selected by the batch issuer which determines how much data can be stamped with the batch"]}),"\n"]}),"\n",(0,a.jsx)(s.h3,{id:"3b-bucket-depth",children:"3b. Bucket depth"}),"\n",(0,a.jsxs)(s.p,{children:["Bucket depth is the constant value which defines how many buckets the address space for chunks is divided into for postage stamp batches. Bucket depth is set to 16, and the number of buckets is defined as ",(0,a.jsxs)(s.span,{className:"katex",children:[(0,a.jsx)(s.span,{className:"katex-mathml",children:(0,a.jsx)(s.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,a.jsxs)(s.semantics,{children:[(0,a.jsx)(s.mrow,{children:(0,a.jsxs)(s.msup,{children:[(0,a.jsx)(s.mn,{children:"2"}),(0,a.jsxs)(s.mrow,{children:[(0,a.jsx)(s.mi,{children:"b"}),(0,a.jsx)(s.mi,{children:"u"}),(0,a.jsx)(s.mi,{children:"c"}),(0,a.jsx)(s.mi,{children:"k"}),(0,a.jsx)(s.mi,{children:"e"}),(0,a.jsx)(s.mi,{children:"t"}),(0,a.jsx)(s.mi,{children:"d"}),(0,a.jsx)(s.mi,{children:"e"}),(0,a.jsx)(s.mi,{children:"p"}),(0,a.jsx)(s.mi,{children:"t"}),(0,a.jsx)(s.mi,{children:"h"})]})]})}),(0,a.jsx)(s.annotation,{encoding:"application/x-tex",children:"2^{bucket depth}"})]})})}),(0,a.jsx)(s.span,{className:"katex-html","aria-hidden":"true",children:(0,a.jsxs)(s.span,{className:"base",children:[(0,a.jsx)(s.span,{className:"strut",style:{height:"0.8491em"}}),(0,a.jsxs)(s.span,{className:"mord",children:[(0,a.jsx)(s.span,{className:"mord",children:"2"}),(0,a.jsx)(s.span,{className:"msupsub",children:(0,a.jsx)(s.span,{className:"vlist-t",children:(0,a.jsx)(s.span,{className:"vlist-r",children:(0,a.jsx)(s.span,{className:"vlist",style:{height:"0.8491em"},children:(0,a.jsxs)(s.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,a.jsx)(s.span,{className:"pstrut",style:{height:"2.7em"}}),(0,a.jsx)(s.span,{className:"sizing reset-size6 size3 mtight",children:(0,a.jsxs)(s.span,{className:"mord mtight",children:[(0,a.jsx)(s.span,{className:"mord mathnormal mtight",children:"b"}),(0,a.jsx)(s.span,{className:"mord mathnormal mtight",children:"u"}),(0,a.jsx)(s.span,{className:"mord mathnormal mtight",children:"c"}),(0,a.jsx)(s.span,{className:"mord mathnormal mtight",style:{marginRight:"0.0315em"},children:"k"}),(0,a.jsx)(s.span,{className:"mord mathnormal mtight",children:"e"}),(0,a.jsx)(s.span,{className:"mord mathnormal mtight",children:"t"}),(0,a.jsx)(s.span,{className:"mord mathnormal mtight",children:"d"}),(0,a.jsx)(s.span,{className:"mord mathnormal mtight",children:"e"}),(0,a.jsx)(s.span,{className:"mord mathnormal mtight",children:"pt"}),(0,a.jsx)(s.span,{className:"mord mathnormal mtight",children:"h"})]})})]})})})})})]})]})})]})]}),"\n",(0,a.jsx)(s.h2,{id:"plur",children:"PLUR"}),"\n",(0,a.jsxs)(s.p,{children:["PLUR (name inspired by the ",(0,a.jsx)(s.a,{href:"https://en.wikipedia.org/wiki/PLUR",children:"PLUR principles"}),") is the smallest denomination of BZZ. 1 PLUR is equal to 1e-16 BZZ."]}),"\n",(0,a.jsx)(s.h2,{id:"bridged-tokens",children:"Bridged Tokens"}),"\n",(0,a.jsxs)(s.p,{children:["Bridged tokens are tokens from one blockchain which have been ",(0,a.jsx)(s.em,{children:"bridged"})," to another chain through a smart contract powered bridge. For example, xDAI and xBZZ on Gnosis Chain are the bridged version of DAI and BZZ on Ethereum."]}),"\n",(0,a.jsx)(s.h2,{id:"bzz-token",children:"BZZ Token"}),"\n",(0,a.jsxs)(s.p,{children:["BZZ is Swarm's ",(0,a.jsx)(s.a,{href:"https://ethereum.org/developers/docs/standards/tokens/erc-20/",children:"ERC-20"})," token issued on Ethereum."]}),"\n",(0,a.jsx)(s.h2,{id:"xbzz-token",children:"xBZZ Token"}),"\n",(0,a.jsxs)(s.p,{children:["xBZZ is BZZ bridged to the ",(0,a.jsx)(s.a,{href:"https://www.gnosis.io/",children:"Gnosis Chain"})," using the ",(0,a.jsx)(s.a,{href:"https://bridge.gnosischain.com/",children:"Gnosis Chain Bridge"}),"."]}),"\n",(0,a.jsxs)(s.p,{children:["It is used as payment for ",(0,a.jsx)(s.a,{href:"#postage-stamps",children:"postage stamps"})," and as the unit of accounting between the nodes. It is used to incentivize nodes to provide resources to the Swarm."]}),"\n",(0,a.jsx)(s.h2,{id:"dai-token",children:"DAI Token"}),"\n",(0,a.jsxs)(s.p,{children:[(0,a.jsx)(s.a,{href:"https://docs.gnosischain.com/about/tokens/xdai",children:"DAI"})," is an ",(0,a.jsx)(s.a,{href:"https://ethereum.org/developers/docs/standards/tokens/erc-20/",children:"ERC-20"})," stable token issued on the Ethereum blockchain, tracking USD."]}),"\n",(0,a.jsx)(s.h2,{id:"xdai-token",children:"xDAI Token"}),"\n",(0,a.jsxs)(s.p,{children:["xDAI is ",(0,a.jsx)(s.a,{href:"https://docs.gnosischain.com/about/tokens/xdai",children:"DAI"})," ",(0,a.jsx)(s.a,{href:"#bridged-tokens",children:"bridged"})," to the ",(0,a.jsx)(s.a,{href:"https://www.gnosis.io",children:"Gnosis Chain"})," using ",(0,a.jsx)(s.a,{href:"https://bridge.gnosischain.com/",children:"xDai Bridge"}),". It is also the native token of the Gnosis Chain, i.e. transaction fees are paid in xDai."]}),"\n",(0,a.jsx)(s.h2,{id:"sepolia",children:"Sepolia"}),"\n",(0,a.jsx)(s.p,{children:"Sepolia is an Ethereum testnet. It is an environment where smart contracts can be developed and tested without spending cryptocurrency with real value, and without putting valuable assets at risk. Tokens on Sepolia are often prefixed with a lower-case 's', example: 'sBZZ' and because this is a test network carry no monetary value. It is an environment where Bee smart contracts can be tested and interacted with without any risk of monetary loss."}),"\n",(0,a.jsx)(s.h2,{id:"faucet",children:"Faucet"}),"\n",(0,a.jsx)(s.p,{children:"A cryptocurrency faucet supplies small amounts of cryptocurrency to requestors (typically for testing purposes)."}),"\n",(0,a.jsxs)(s.p,{children:["Check out the ",(0,a.jsx)(s.a,{href:"/docs/bee/installation/fund-your-node",children:"Fund Your Node"})," page for more information."]}),"\n",(0,a.jsx)(s.h2,{id:"rpc-endpoint",children:"RPC Endpoint"}),"\n",(0,a.jsx)(s.p,{children:"An RPC (Remote Procedure Call) endpoint is a URL that allows applications to communicate with a remote server by sending requests and receiving responses. It is commonly used to interact with decentralized networks, enabling applications to query data or send transactions without running a full node."}),"\n",(0,a.jsx)(s.p,{children:"In the context of Swarm, a Blockchain RPC endpoint refers specifically to a connection to Gnosis Chain, which is required for transactions such as purchasing postage stamps and staking xBZZ. Bee nodes rely on an RPC endpoint to facilitate these blockchain interactions."})]})}function c(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(l,{...e})}):l(e)}},62748(e,s,n){n.d(s,{A:()=>t});const t=n.p+"assets/images/depths1-8a24cd0e7d48a97d931886cc15993aa7.png"},51479(e,s,n){n.d(s,{A:()=>t});const t=n.p+"assets/images/depths2-ee3b2aff2abd65415281e47f3ef42731.png"},28453(e,s,n){n.d(s,{R:()=>r,x:()=>o});var t=n(96540);const a={},i=t.createContext(a);function r(e){const s=t.useContext(i);return t.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),t.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/eb7fccc7.f696a7c5.js b/assets/js/eb7fccc7.f696a7c5.js new file mode 100644 index 000000000..3d7c981f5 --- /dev/null +++ b/assets/js/eb7fccc7.f696a7c5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[1789],{74025(e,n,t){t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>a,metadata:()=>i,toc:()=>d});const i=JSON.parse('{"id":"bee/working-with-bee/node-types","title":"Node Types","description":"Compares full light and ultra-light node types with their features requirements and configuration for different use cases.","source":"@site/docs/bee/working-with-bee/node-types.md","sourceDirName":"bee/working-with-bee","slug":"/bee/working-with-bee/node-types","permalink":"/docs/bee/working-with-bee/node-types","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/bee/working-with-bee/node-types.md","tags":[],"version":"current","frontMatter":{"title":"Node Types","id":"node-types","description":"Compares full light and ultra-light node types with their features requirements and configuration for different use cases."},"sidebar":"bee","previous":{"title":"Configuration","permalink":"/docs/bee/working-with-bee/configuration"},"next":{"title":"Bee API","permalink":"/docs/bee/working-with-bee/bee-api"}}');var r=t(74848),s=t(28453);t(4865),t(19365);const a={title:"Node Types",id:"node-types",description:"Compares full light and ultra-light node types with their features requirements and configuration for different use cases."},o=void 0,l={},d=[{value:"What are the Bee node types?",id:"node-types-overview",level:2},{value:"What is a full node?",id:"full-node",level:2},{value:"Full node specifications",id:"full-node-specifications",level:3},{value:"Full node configuration",id:"full-node-configuration",level:3},{value:"What is a light node?",id:"light-node",level:2},{value:"Light node specifications",id:"light-node-specifications",level:3},{value:"Light node configuration",id:"light-node-configuration",level:3},{value:"What is an ultra-light node?",id:"ultra-light-node",level:2},{value:"Ultra-light node specifications",id:"ultra-light-node-specifications",level:3},{value:"Ultra-light node configuration",id:"ultra-light-node-configuration",level:3}];function c(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:["Bee nodes can operate in three different modes depending on the user's needs, ranging from full-featured nodes that contribute storage to the network and earn incentives to simpler modes that only download and upload data.\nThis guide outlines the three primary node types \u2014 ",(0,r.jsx)(n.strong,{children:(0,r.jsx)(n.em,{children:"Full"})}),", ",(0,r.jsx)(n.strong,{children:(0,r.jsx)(n.em,{children:"Light"})}),", and ",(0,r.jsx)(n.strong,{children:(0,r.jsx)(n.em,{children:"Ultra-Light"})})," \u2014 along with their configurations, capabilities, and limitations."]}),"\n",(0,r.jsx)(n.p,{children:"All three modes can run on ordinary consumer computers, without requiring any extraordinary hardware.\nWhat differs between them is the feature set, how much disk space and bandwidth the node uses, and whether it needs a blockchain connection and funds."}),"\n",(0,r.jsx)(n.p,{children:"Choosing the right node type depends on your goals, whether it's participating in the Swarm network as a storage provider, developing applications that use Swarm's decentralized storage and messaging, or simply exploring the technology with minimal setup."}),"\n",(0,r.jsx)(n.h2,{id:"node-types-overview",children:"What are the Bee node types?"}),"\n",(0,r.jsx)(n.p,{children:"Bee can operate in different modes, each tailored to specific use cases:"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Feature"}),(0,r.jsx)(n.th,{children:"Full Node"}),(0,r.jsx)(n.th,{children:"Light Node"}),(0,r.jsx)(n.th,{children:"Ultra-Light Node"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsxs)(n.td,{children:["Free tier ",(0,r.jsx)(n.a,{href:"/docs/develop/upload-and-download",children:"downloads"})]}),(0,r.jsx)(n.td,{children:"\u2705"}),(0,r.jsx)(n.td,{children:"\u2705"}),(0,r.jsx)(n.td,{children:"\u2705"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsxs)(n.td,{children:[(0,r.jsx)(n.a,{href:"/docs/develop/upload-and-download",children:"Uploading"})," (Can purchase ",(0,r.jsx)(n.a,{href:"/docs/develop/tools-and-features/buy-a-stamp-batch",children:"postage stamp batches"}),")"]}),(0,r.jsx)(n.td,{children:"\u2705"}),(0,r.jsx)(n.td,{children:"\u2705"}),(0,r.jsx)(n.td,{children:"\u274c"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Can exceed free tier downloads"}),(0,r.jsx)(n.td,{children:"\u2705"}),(0,r.jsx)(n.td,{children:"\u2705"}),(0,r.jsx)(n.td,{children:"\u274c"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Storage sharing"}),(0,r.jsx)(n.td,{children:"\u2705"}),(0,r.jsx)(n.td,{children:"\u274c"}),(0,r.jsx)(n.td,{children:"\u274c"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.a,{href:"/docs/bee/working-with-bee/staking",children:"Storage incentives"})}),(0,r.jsx)(n.td,{children:"\u2705"}),(0,r.jsx)(n.td,{children:"\u274c"}),(0,r.jsx)(n.td,{children:"\u274c"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.a,{href:"/docs/concepts/incentives/bandwidth-incentives",children:"Bandwidth incentives"})}),(0,r.jsx)(n.td,{children:"\u2705"}),(0,r.jsx)(n.td,{children:"\u274c"}),(0,r.jsx)(n.td,{children:"\u274c"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.a,{href:"/docs/develop/tools-and-features/pss",children:"PSS messaging"})}),(0,r.jsx)(n.td,{children:"\u2705"}),(0,r.jsx)(n.td,{children:"\u274c"}),(0,r.jsx)(n.td,{children:"\u274c"})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"full-node",children:"What is a full node?"}),"\n",(0,r.jsx)(n.p,{children:"Full nodes are the most feature-rich nodes in the Swarm network.\nThey provide full upload and download capabilities, store and serve data, and participate in storage and bandwidth incentives.\nA full node uses more disk space and bandwidth than the lighter modes and needs a funded blockchain connection, but its CPU and memory requirements stay low enough for everyday consumer hardware."}),"\n",(0,r.jsx)(n.p,{children:"Full nodes are ideal for users who want to contribute to the Swarm network and earn incentives, as well as developers who require access to all Bee features including messaging features such as PSS and GSOC."}),"\n",(0,r.jsx)(n.h3,{id:"full-node-specifications",children:"Full node specifications"}),"\n",(0,r.jsxs)(n.p,{children:["A full node does not need powerful hardware.\nThe requirements below are met by most laptops and desktops, and even single-board computers such as a ",(0,r.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Raspberry_Pi",children:"Raspberry Pi"})," with an attached SSD.\nDisk space and sustained bandwidth are the main differences from the lighter node types:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Processor"}),": Recent 2 GHz dual-core (2+ cores). 4-cores is comfortable if you intend to take part in the redistribution game."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"RAM"}),": 500 MB."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Storage"}),": 20~30 GB SSD, ideally NVMe (HDD not recommended)."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Internet"}),": High-speed and stable connection."]}),"\n"]}),"\n",(0,r.jsxs)(n.admonition,{type:"info",children:[(0,r.jsx)(n.p,{children:"Staking means taking part in the redistribution game, which raises CPU demand and disk I/O.\nThis calls for more than 2 processor cores and SSD storage rather than an HDD."}),(0,r.jsxs)(n.p,{children:["Before staking, test your setup using ",(0,r.jsxs)(n.a,{href:"/docs/bee/working-with-bee/bee-api#rchash",children:["the ",(0,r.jsx)(n.code,{children:"/rchash"})," endpoint"]})," to confirm your node can complete a sample in time."]})]}),"\n",(0,r.jsx)(n.p,{children:"A full node must also be connected to Gnosis Chain and hold enough funds to cover its on-chain operations:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"RPC endpoint"}),": A connection to Gnosis Chain (see ",(0,r.jsx)(n.a,{href:"/docs/bee/working-with-bee/configuration#setting-blockchain-rpc-endpoint",children:"setting the blockchain RPC endpoint"}),")."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"xDAI"}),": Minimum 0.1 xDAI for Gnosis Chain gas fees."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"(optional) xBZZ for staking"}),": 10 xBZZ, required only to participate in ",(0,r.jsx)(n.a,{href:"/docs/bee/working-with-bee/staking",children:"storage incentives"}),"."]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"full-node-configuration",children:"Full node configuration"}),"\n",(0,r.jsx)(n.p,{children:"To run Bee as a full node, set:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"full-node: true"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"swap-enable: true"})}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"blockchain-rpc-endpoint"})," to a valid Gnosis Chain RPC URL"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Key characteristics:"})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Can upload and download data."}),"\n",(0,r.jsx)(n.li,{children:"Can purchase and manage postage stamp batches in order to pay for uploading data."}),"\n",(0,r.jsx)(n.li,{children:"Can share disk space with the network and store chunks from Swarm uploaders."}),"\n",(0,r.jsx)(n.li,{children:"Can participate in the storage incentives system by sharing disk space for a chance to earn xBZZ."}),"\n",(0,r.jsx)(n.li,{children:"Can participate in the bandwidth incentives system and earn xBZZ by forwarding chunks for other nodes."}),"\n",(0,r.jsx)(n.li,{children:"Requires a Gnosis Chain RPC endpoint for blockchain connectivity."}),"\n",(0,r.jsx)(n.li,{children:"Supports full PSS messaging and GSOC."}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"light-node",children:"What is a light node?"}),"\n",(0,r.jsx)(n.p,{children:"Light nodes provide a balance between functionality and resource efficiency. They can upload and download data but do not participate in chunk forwarding or storage for other nodes."}),"\n",(0,r.jsx)(n.p,{children:"Light nodes are suited for users who want to interact with Swarm without contributing storage to the network or maintaining a reserve. They can serve the needs of developers who need to access Swarm's download / upload features but do not need advanced messaging features such as PSS and GSOC which are available only in full nodes."}),"\n",(0,r.jsx)(n.p,{children:"Light node operators cannot earn xBZZ by participating in Swarm's incentives systems, as they do not participate in chunk forwarding or storage but only consume services, paying xBZZ for downloading data from full nodes and buying postage stamp batches for uploading data."}),"\n",(0,r.jsx)(n.admonition,{type:"info",children:(0,r.jsx)(n.p,{children:"Light nodes do not benefit from plausible deniability when requesting data from the network. They are always the originator of requests."})}),"\n",(0,r.jsx)(n.h3,{id:"light-node-specifications",children:"Light node specifications"}),"\n",(0,r.jsxs)(n.p,{children:["No specific hardware is required to run a light node. It can run well on practically any commercially available computer released in recent years, including lightweight single-board computers such as ",(0,r.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Raspberry_Pi",children:"Raspberry Pi"}),". Your downloads / uploads may be limited by your network speed, however, so if you plan on interacting extensively with the Swarm network, you should take your connection speed into consideration."]}),"\n",(0,r.jsx)(n.h3,{id:"light-node-configuration",children:"Light node configuration"}),"\n",(0,r.jsx)(n.p,{children:"To run Bee as a light node, set:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"full-node: false"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"swap-enable: true"})}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"blockchain-rpc-endpoint"})," to a valid Gnosis Chain RPC URL"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Key characteristics:"})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Can upload and download data."}),"\n",(0,r.jsx)(n.li,{children:"Can purchase and manage postage stamp batches in order to pay for uploading data."}),"\n",(0,r.jsx)(n.li,{children:"Requires a Gnosis Chain RPC endpoint for blockchain connectivity."}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Limitations:"})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Cannot share disk space with the network and store chunks from Swarm uploaders."}),"\n",(0,r.jsx)(n.li,{children:"Cannot earn xBZZ by staking xBZZ and participating in the storage incentive system."}),"\n",(0,r.jsx)(n.li,{children:"Cannot earn xBZZ by participating in the bandwidth incentives system."}),"\n",(0,r.jsxs)(n.li,{children:["Can send PSS messages but ",(0,r.jsx)(n.em,{children:(0,r.jsx)(n.strong,{children:"cannot"})})," receive them."]}),"\n",(0,r.jsxs)(n.li,{children:["Can send outgoing GSOC updates but ",(0,r.jsx)(n.em,{children:(0,r.jsx)(n.strong,{children:"cannot"})})," receive them."]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"ultra-light-node",children:"What is an ultra-light node?"}),"\n",(0,r.jsxs)(n.p,{children:["Ultra-light nodes allow users to run a node without requiring a blockchain RPC endpoint. These nodes can download data within the free consumption threshold set by full nodes (this threshold may vary since it is ",(0,r.jsx)(n.a,{href:"/docs/bee/working-with-bee/configuration",children:"configurable"})," by full node operators using the ",(0,r.jsx)(n.code,{children:"payment-tolerance-percent"})," and ",(0,r.jsx)(n.code,{children:"payment-threshold"})," options)."]}),"\n",(0,r.jsx)(n.p,{children:"Ultra-light nodes are designed for users who want to access the Swarm network with minimal resource requirements. These nodes can download data within the free consumption threshold but do not support uploads and cannot earn xBZZ by participating in Swarm's incentives systems."}),"\n",(0,r.jsx)(n.p,{children:"As with light nodes, your node's download speed will be limited by your network speed (however this may be less important of a consideration given that an ultra-light node is restricted to downloading within free tier limits anyway)."}),"\n",(0,r.jsxs)(n.admonition,{type:"warning",children:[(0,r.jsx)(n.p,{children:"As with light nodes, ultra-light nodes do not benefit from plausible deniability when requesting data from the network."}),(0,r.jsxs)(n.p,{children:["When running without a blockchain connection, ",(0,r.jsx)(n.a,{href:"/docs/concepts/incentives/bandwidth-incentives",children:"bandwidth incentive payments (SWAP)"})," cannot be made, increasing the risk of being blocklisted by other peers for exceeding their free-tier download limits."]})]}),"\n",(0,r.jsx)(n.h3,{id:"ultra-light-node-specifications",children:"Ultra-light node specifications"}),"\n",(0,r.jsx)(n.p,{children:"As with the light node, there are no specific requirements to run an ultra-light node, and it will run on practically any commercially available hardware from recent years."}),"\n",(0,r.jsx)(n.h3,{id:"ultra-light-node-configuration",children:"Ultra-light node configuration"}),"\n",(0,r.jsx)(n.p,{children:"Bee will start in ultra-light mode by default, but in order to explicitly configure your node to run as an ultra-light node, use the following options:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Set ",(0,r.jsx)(n.code,{children:"full-node: false"})]}),"\n",(0,r.jsxs)(n.li,{children:["Set ",(0,r.jsx)(n.code,{children:"blockchain-rpc-endpoint"}),' to an empty string "" (or comment it out / remove it).']}),"\n",(0,r.jsxs)(n.li,{children:["Set ",(0,r.jsx)(n.code,{children:"swap-enable: false"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Key characteristics:"})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Can download limited amounts of data."}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Limitations:"})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Cannot upload data."}),"\n",(0,r.jsx)(n.li,{children:"Cannot purchase postage stamps."}),"\n",(0,r.jsx)(n.li,{children:"Cannot share disk space with the network and store chunks from Swarm uploaders."}),"\n",(0,r.jsx)(n.li,{children:"Cannot earn xBZZ by staking xBZZ and participating in the storage incentive system."}),"\n",(0,r.jsx)(n.li,{children:"Cannot earn xBZZ by participating in the bandwidth incentives system."}),"\n",(0,r.jsx)(n.li,{children:"Cannot use PSS or GSOC for sending or receiving."}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},19365(e,n,t){t.d(n,{A:()=>l});t(96540);var i=t(34164),r=t(47751);const s="tabItem_Ymn6";var a=t(74848);function o(e){let n=e.children,t=e.className,r=e.hidden;return(0,a.jsx)("div",{role:"tabpanel",className:(0,i.A)(s,t),hidden:r,children:n})}function l(e){let n=e.children,t=e.className,i=e.value;const s=(0,r.uc)(),l=s.selectedValue,d=s.lazy,c=i===l;return!c&&d?null:(0,a.jsx)(o,{className:t,hidden:!c,children:n})}},4865(e,n,t){t.d(n,{A:()=>g});t(96540);var i=t(34164),r=t(17559),s=t(47751),a=t(23104),o=t(92303);const l="tabList__CuJ",d="tabItem_LNqP";var c=t(74848);function h(e){let n=e.className;const t=(0,s.uc)(),r=t.selectedValue,o=t.selectValue,l=t.tabValues,h=t.block,u=[],p=(0,a.a_)().blockElementScrollPositionUntilNextRender,g=e=>{const n=e.currentTarget,t=u.indexOf(n),i=l[t].value;i!==r&&(p(n),o(i))},f=e=>{var n;let t=null;switch(e.key){case"Enter":g(e);break;case"ArrowRight":{var i;const n=u.indexOf(e.currentTarget)+1;t=null!=(i=u[n])?i:u[0];break}case"ArrowLeft":{var r;const n=u.indexOf(e.currentTarget)-1;t=null!=(r=u[n])?r:u[u.length-1];break}}null==(n=t)||n.focus()};return(0,c.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.A)("tabs",{"tabs--block":h},n),children:l.map(e=>{let n=e.value,t=e.label,s=e.attributes;return(0,c.jsx)("li",Object.assign({role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:e=>{u.push(e)},onKeyDown:f,onClick:g},s,{className:(0,i.A)("tabs__item",d,null==s?void 0:s.className,{"tabs__item--active":r===n}),children:null!=t?t:n}),n)})})}function u(e){let n=e.children;return(0,c.jsx)("div",{className:"margin-top--md",children:n})}function p(e){let n=e.className,t=e.children;return(0,c.jsxs)("div",{className:(0,i.A)(r.G.tabs.container,"tabs-container",l),children:[(0,c.jsx)(h,{className:n}),(0,c.jsx)(u,{children:t})]})}function g(e){const n=(0,o.A)(),t=(0,s.OC)(e);return(0,c.jsx)(s.O_,{value:t,children:(0,c.jsx)(p,{className:e.className,children:(0,s.vT)(e.children)})},String(n))}},47751(e,n,t){t.d(n,{OC:()=>g,O_:()=>m,uc:()=>x,vT:()=>c});var i=t(96540),r=t(56347),s=t(205),a=t(57485),o=t(70679),l=t(31682),d=t(74848);function c(e){return i.Children.toArray(e).filter(e=>"\n"!==e)}function h(e){const n=e.values,t=e.children;return(0,i.useMemo)(()=>{const e=null!=n?n:function(e){return i.Children.toArray(e).flatMap(e=>{if(!e)return[];if((0,i.isValidElement)(e)&&function(e){const n=e.props;return!!n&&"object"==typeof n&&"value"in n}(e))return[e];const n="string"==typeof e.type?e.type:e.type.name;throw new Error("Docusaurus error: Bad child <"+n+'>: all children of the component should be , and every should have a unique "value" prop.\nIf you do not want to pass on a "value" prop to the direct children of , you can also pass an explicit prop.')}).map(e=>{let n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}})}(t);return function(e){const n=(0,l.XI)(e,(e,n)=>e.value===n.value);if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map(e=>"'"+e.value+"'").join(", ")+'" found in . Every value needs to be unique.')}(e),e},[n,t])}function u(e){let n=e.value;return e.tabValues.some(e=>e.value===n)}function p(e){let n=e.queryString,t=void 0!==n&&n,s=e.groupId;const o=(0,r.W6)(),l=function(e){let n=e.queryString,t=void 0!==n&&n,i=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!i)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=i?i:null}({queryString:t,groupId:s});return[(0,a.aZ)(l),(0,i.useCallback)(e=>{if(!l)return;const n=new URLSearchParams(o.location.search);n.set(l,e),o.replace(Object.assign({},o.location,{search:n.toString()}))},[l,o])]}function g(e){var n,t;const r=e.defaultValue,a=e.queryString,l=void 0!==a&&a,d=e.groupId,c=h(e),g=(0,i.useState)(()=>function(e){var n;let t=e.defaultValue,i=e.tabValues;if(0===i.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!u({value:t,tabValues:i}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+i.map(e=>e.value).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}const r=null!=(n=i.find(e=>e.default))?n:i[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:r,tabValues:c})),f=g[0],x=g[1],m=p({queryString:l,groupId:d}),b=m[0],j=m[1],w=function(e){const n=function(e){return e?"docusaurus.tab."+e:null}(e.groupId),t=(0,o.Dv)(n),r=t[0],s=t[1];return[r,(0,i.useCallback)(e=>{n&&s.set(e)},[n,s])]}({groupId:d}),y=w[0],v=w[1],k=(()=>{const e=null!=b?b:y;return u({value:e,tabValues:c})?e:null})();(0,s.A)(()=>{k&&x(k)},[k]);return{selectedValue:f,selectValue:(0,i.useCallback)(e=>{if(!u({value:e,tabValues:c}))throw new Error("Can't select invalid tab value="+e);x(e),j(e),v(e)},[j,v,c]),tabValues:c,lazy:null!=(n=e.lazy)&&n,block:null!=(t=e.block)&&t}}const f=(0,i.createContext)(null);function x(){const e=i.useContext(f);if(!e)throw new Error("useTabsContext() must be used within a Tabs component");return e}function m(e){return(0,d.jsx)(f.Provider,{value:e.value,children:e.children})}},28453(e,n,t){t.d(n,{R:()=>a,x:()=>o});var i=t(96540);const r={},s=i.createContext(r);function a(e){const n=i.useContext(s);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f0ad3fbb.a28fc7b2.js b/assets/js/f0ad3fbb.a28fc7b2.js new file mode 100644 index 000000000..fa3011d49 --- /dev/null +++ b/assets/js/f0ad3fbb.a28fc7b2.js @@ -0,0 +1 @@ +(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[2969],{67992(){},28825(){},7411(){},93290(){},92441(){}}]); \ No newline at end of file diff --git a/assets/js/f2d3331a.2cbd7a13.js b/assets/js/f2d3331a.2cbd7a13.js new file mode 100644 index 000000000..c204f97af --- /dev/null +++ b/assets/js/f2d3331a.2cbd7a13.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[7432],{92475(e,n,a){a.r(n),a.d(n,{assets:()=>c,contentTitle:()=>d,default:()=>g,frontMatter:()=>l,metadata:()=>t,toc:()=>h});const t=JSON.parse('{"id":"bee/installation/package-manager-install","title":"Package Manager Install","description":"Guides installation using system package managers (APT RPM Homebrew) with background service configuration and management.","source":"@site/docs/bee/installation/package-manager.md","sourceDirName":"bee/installation","slug":"/bee/installation/package-manager-install","permalink":"/docs/bee/installation/package-manager-install","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/bee/installation/package-manager.md","tags":[],"version":"current","frontMatter":{"title":"Package Manager Install","id":"package-manager-install","description":"Guides installation using system package managers (APT RPM Homebrew) with background service configuration and management."},"sidebar":"bee","previous":{"title":"Docker Install","permalink":"/docs/bee/installation/docker"},"next":{"title":"Build from Source","permalink":"/docs/bee/installation/build-from-source"}}');var s=a(74848),r=a(28453),i=a(4865),o=a(19365);const l={title:"Package Manager Install",id:"package-manager-install",description:"Guides installation using system package managers (APT RPM Homebrew) with background service configuration and management."},d=void 0,c={},h=[{value:"Install Bee",id:"install-bee",level:2},{value:"Configure Bee",id:"configure-bee",level:2},{value:"Set Node Type",id:"set-node-type",level:3},{value:"Set Target Neighborhood",id:"set-target-neighborhood",level:3},{value:"Start Node",id:"start-node",level:2},{value:"Fund Node",id:"fund-node",level:2},{value:"Restart and Wait for Initialisation",id:"restart-and-wait-for-initialisation",level:3},{value:"Check if Bee is Working",id:"check-if-bee-is-working",level:2},{value:"Back Up Keys",id:"back-up-keys",level:2},{value:"Deposit Stake (Optional)",id:"deposit-stake-optional",level:2},{value:"Next Steps to Consider",id:"next-steps-to-consider",level:2},{value:"Access the Swarm",id:"access-the-swarm",level:3},{value:"Explore the API",id:"explore-the-api",level:3},{value:"Run a hive!",id:"run-a-hive",level:3},{value:"Start building DAPPs on Swarm",id:"start-building-dapps-on-swarm",level:3}];function u(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",p:"p",pre:"pre",strong:"strong",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:["The Bee client can be ",(0,s.jsx)(n.a,{href:"/docs/bee/installation/package-manager-install",children:"installed through a variety of package managers,"})," including ",(0,s.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/APT_(software)",children:"APT"}),", ",(0,s.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/RPM_Package_Manager",children:"RPM"}),", and ",(0,s.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Homebrew_(package_manager)",children:"Homebrew"}),"."]}),"\n",(0,s.jsxs)(n.admonition,{type:"caution",children:[(0,s.jsxs)(n.p,{children:["When installed using a package manager, Bee is set up so it can be started to run as a background service using ",(0,s.jsx)(n.code,{children:"systemctl"})," or ",(0,s.jsx)(n.code,{children:"brew services"})," (depending on the package manager used)."]}),(0,s.jsxs)(n.p,{children:["However, Bee node installed via a package manager can also be started using the standard ",(0,s.jsx)(n.code,{children:"bee start"})," command."]}),(0,s.jsxs)(n.p,{children:["When a node is started using the ",(0,s.jsx)(n.code,{children:"bee start"})," command the node process will be bound to the terminal session and will exit if the terminal is closed."]}),(0,s.jsxs)(n.p,{children:["Furthermore, depending on which of these startup methods was used, ",(0,s.jsx)(n.a,{href:"/docs/bee/working-with-bee/configuration#default-data-and-config-directories",children:(0,s.jsx)(n.em,{children:"the default Bee directories will be different"})}),". For each startup method, a different default data directory is used, so each startup method will essentially be spinning up a totally different node."]})]}),"\n",(0,s.jsx)(n.h2,{id:"install-bee",children:"Install Bee"}),"\n",(0,s.jsxs)(n.p,{children:["Bee is available for Linux in .rpm and .deb package format for a variety of system architectures, and is available for MacOS through Homebrew. See the ",(0,s.jsx)(n.a,{href:"https://github.com/ethersphere/bee/releases",children:"releases"})," page of the Bee repo for all available packages. One of the advantages of this method is that it automatically configures Bee to run as a background service during installation."]}),"\n",(0,s.jsxs)(i.A,{defaultValue:"debian",values:[{label:"Debian",value:"debian"},{label:"RPM",value:"rpm"},{label:"MacOS",value:"macos"}],children:[(0,s.jsxs)(o.A,{value:"debian",children:[(0,s.jsx)(n.p,{children:"Get GPG key:"}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"curl -fsSL https://repo.ethswarm.org/apt/gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/ethersphere-apt-keyring.gpg\n"})}),(0,s.jsx)(n.p,{children:"Set up repo inside apt-get sources:"}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'echo \\\n "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ethersphere-apt-keyring.gpg] https://repo.ethswarm.org/apt \\\n * *" | sudo tee /etc/apt/sources.list.d/ethersphere.list > /dev/null\n'})}),(0,s.jsx)(n.p,{children:"Install package:"}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"sudo apt-get update\nsudo apt-get install bee\n"})})]}),(0,s.jsxs)(o.A,{value:"rpm",children:[(0,s.jsx)(n.p,{children:"Set up repo:"}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'echo "[ethersphere]\nname=Ethersphere Repo\nbaseurl=https://repo.ethswarm.org/yum/\nenabled=1\ngpgcheck=0" | sudo tee /etc/yum.repos.d/ethersphere.repo\n'})}),(0,s.jsx)(n.p,{children:"Install package:"}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"yum install bee\n"})})]}),(0,s.jsx)(o.A,{value:"macos",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"brew tap ethersphere/tap\nbrew install swarm-bee\n"})})})]}),"\n",(0,s.jsx)(n.p,{children:"You should see the following output to your terminal after a successful install (your default 'Config' location will vary depending on your operating system):"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"Reading package lists... Done\nBuilding dependency tree... Done\nReading state information... Done\nThe following NEW packages will be installed:\n bee\n0 upgraded, 1 newly installed, 0 to remove and 37 not upgraded.\nNeed to get 0 B/27.2 MB of archives.\nAfter this operation, 50.8 MB of additional disk space will be used.\nSelecting previously unselected package bee.\n(Reading database ... 82381 files and directories currently installed.)\nPreparing to unpack .../archives/bee_2.3.0_amd64.deb ...\nUnpacking bee (2.3.0) ...\nSetting up bee (2.3.0) ...\n\nLogs: journalctl -f -u bee.service\nConfig: /etc/bee/bee.yaml\n\nBee requires a Gnosis Chain RPC endpoint to function. By default this is expected to be found at ws://localhost:8546.\n\nPlease see https://docs.ethswarm.org/docs/bee/installation/getting-started for more details on how to configure your node.\n\nAfter you finish configuration run 'sudo bee-get-addr' and fund your node with XDAI, and also XBZZ if so desired.\n\nCreated symlink /etc/systemd/system/multi-user.target.wants/bee.service \u2192 /lib/systemd/system/bee.service.\n"})}),"\n",(0,s.jsx)(n.h2,{id:"configure-bee",children:"Configure Bee"}),"\n",(0,s.jsxs)(n.p,{children:["When Bee is installed using a package manager, a ",(0,s.jsx)(n.code,{children:"bee.yaml"})," file containing the default configuration will be generated."]}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:["While this package manager install guide uses the ",(0,s.jsx)(n.code,{children:"bee.yaml"})," file for setting configuration options, there are ",(0,s.jsx)(n.a,{href:"/docs/bee/working-with-bee/configuration",children:"several other available methods for setting node options"}),"."]})}),"\n",(0,s.jsxs)(n.p,{children:["After installation, you can check that the file was successfully generated and contains the ",(0,s.jsx)(n.a,{href:"https://github.com/ethersphere/bee/tree/master/packaging",children:"default configuration"})," for your system:"]}),"\n",(0,s.jsxs)(i.A,{defaultValue:"linux",values:[{label:"Linux",value:"linux"},{label:"macOS arm64 (Apple Silicon)",value:"macos-arm64"},{label:"macOS amd64 (Intel)",value:"macos-amd64"}],children:[(0,s.jsx)(o.A,{value:"linux",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:' test -f /etc/bee/bee.yaml && echo "bee.yaml exists."\n cat /etc/bee/bee.yaml\n'})})}),(0,s.jsx)(o.A,{value:"macos-arm64",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:' test -f /opt/homebrew/etc/swarm-bee/bee.yaml && echo "$FILE exists."\n cat /opt/homebrew/etc/swarm-bee/bee.yaml\n'})})}),(0,s.jsx)(o.A,{value:"macos-amd64",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:' test -f /usr/local/etc/swarm-bee/bee.yaml && echo "$FILE exists."\n cat /usr/local/etc/swarm-bee/bee.yaml\n'})})})]}),"\n",(0,s.jsxs)(n.p,{children:["The configuration printed to the terminal should match the default configuration for your operating system. See the ",(0,s.jsx)(n.a,{href:"https://github.com/ethersphere/bee/tree/master/packaging",children:"the packaging section of the Bee repo"})," for the default configurations for a variety of systems. In particular, pay attention to the ",(0,s.jsx)(n.code,{children:"config"})," and ",(0,s.jsx)(n.code,{children:"data-dir"})," values, as these differ depending on your system."]}),"\n",(0,s.jsx)(n.p,{children:"If your config file is missing you will need to create it yourself."}),"\n",(0,s.jsxs)(i.A,{defaultValue:"linux",values:[{label:"Linux",value:"linux"},{label:"MacOS arm64 (Apple Silicon)",value:"macos-arm64"},{label:"MacOS amd64 (Intel)",value:"macos-amd64"}],children:[(0,s.jsxs)(o.A,{value:"linux",children:[(0,s.jsxs)(n.p,{children:["Create the ",(0,s.jsx)(n.code,{children:"bee.yaml"})," config file and save it with ",(0,s.jsx)(n.a,{href:"https://github.com/ethersphere/bee/blob/master/packaging/bee.yaml",children:"the default configuration"}),"."]}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"sudo touch /etc/bee/bee.yaml\nsudo vi /etc/bee/bee.yaml\n"})})]}),(0,s.jsxs)(o.A,{value:"macos-arm64",children:[(0,s.jsxs)(n.p,{children:["Create the ",(0,s.jsx)(n.code,{children:"bee.yaml"})," config file and save it with the ",(0,s.jsx)(n.a,{href:"https://github.com/ethersphere/bee/blob/master/packaging/homebrew-arm64/bee.yaml",children:"the default configuration"}),"."]}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"sudo touch /opt/homebrew/etc/swarm-bee/bee.yaml\nsudo sudo vi /opt/homebrew/etc/swarm-bee/bee.yaml\n"})})]}),(0,s.jsxs)(o.A,{value:"macos-amd64",children:[(0,s.jsxs)(n.p,{children:["Create the ",(0,s.jsx)(n.code,{children:"bee.yaml"})," config file and save it with the ",(0,s.jsx)(n.a,{href:"https://github.com/ethersphere/bee/blob/master/packaging/homebrew-amd64/bee.yaml",children:"the default configuration"}),"."]}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"sudo touch /usr/local/etc/swarm-bee/bee.yaml\nsudo vi /usr/local/etc/swarm-bee/bee.yaml\n"})})]})]}),"\n",(0,s.jsx)(n.h3,{id:"set-node-type",children:"Set Node Type"}),"\n",(0,s.jsxs)(n.p,{children:["See the ",(0,s.jsx)(n.a,{href:"/docs/bee/installation/getting-started#choosing-a-node-type",children:"Getting Started guide"})," if you're not sure which type of node to run."]}),"\n",(0,s.jsxs)(n.p,{children:["Once you've decided which node type is appropriate for you, refer to the ",(0,s.jsx)(n.a,{href:"/docs/bee/working-with-bee/configuration#node-types",children:"configuration section"})," for instructions on setting the options for your preferred node type."]}),"\n",(0,s.jsx)(n.h3,{id:"set-target-neighborhood",children:"Set Target Neighborhood"}),"\n",(0,s.jsxs)(n.p,{children:["When installing your Bee node it will automatically be assigned a neighborhood. However, when running a full node with staking there are benefits to periodically updating your node's neighborhood. Learn more about why and how to set your node's target neighborhood ",(0,s.jsx)(n.a,{href:"/docs/bee/installation/set-target-neighborhood",children:"here"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"start-node",children:"Start Node"}),"\n",(0,s.jsx)(n.p,{children:"Use the appropriate command for your system to start your node:"}),"\n",(0,s.jsxs)(i.A,{defaultValue:"linux",values:[{label:"Linux",value:"linux"},{label:"MacOS",value:"macos"}],children:[(0,s.jsx)(o.A,{value:"linux",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"sudo systemctl start bee\n"})})}),(0,s.jsx)(o.A,{value:"macos",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"brew services start swarm-bee\n"})})})]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'Welcome to Swarm.... Bzzz Bzzzz Bzzzz\n \\ /\n \\ o ^ o /\n \\ ( ) /\n ____________(%%%%%%%)____________\n ( / / )%%%%%%%( \\ \\ )\n (___/___/__/ \\__\\___\\___)\n ( / /(%%%%%%%)\\ \\ )\n (__/___/ (%%%%%%%) \\___\\__)\n /( )\\\n / (%%%%%) \\\n (%%%)\n !\n\nDISCLAIMER:\nThis software is provided to you "as is", use at your own risk and without warranties of any kind.\nIt is your responsibility to read and understand how Swarm works and the implications of running this software.\nThe usage of Bee involves various risks, including, but not limited to:\ndamage to hardware or loss of funds associated with the Ethereum account connected to your node.\nNo developers or entity involved will be liable for any claims and damages associated with your use,\ninability to use, or your interaction with other nodes or the software.\n\nversion: 2.2.0-06a0aca7 - planned to be supported until 11 December 2024, please follow https://ethswarm.org/\n\n"time"="2024-09-24 18:15:34.383102" "level"="info" "logger"="node" "msg"="bee version" "version"="2.2.0-06a0aca7"\n"time"="2024-09-24 18:15:34.428546" "level"="info" "logger"="node" "msg"="swarm public key" "public_key"="0373fe2ab33ab836635fc35864cf708fa0f4a775c0cf76ca851551e7787b58d040"\n"time"="2024-09-24 18:15:34.520686" "level"="info" "logger"="node" "msg"="pss public key" "public_key"="03a341032724f1f9bb04f1d9b22607db485cccd74174331c701f3a6957d94d95c1"\n"time"="2024-09-24 18:15:34.520716" "level"="info" "logger"="node" "msg"="using ethereum address" "address"="0x1A801dd3ec955E905ca424a85C3423599bfb0E66"\n"time"="2024-09-24 18:15:34.533789" "level"="info" "logger"="node" "msg"="fetching target neighborhood from suggester" "url"="https://api.swarmscan.io/v1/network/neighborhoods/suggestion"\n"time"="2024-09-24 18:15:36.773501" "level"="info" "logger"="node" "msg"="mining a new overlay address to target the selected neighborhood" "target"="00100010110"\n"time"="2024-09-24 18:15:36.776550" "level"="info" "logger"="node" "msg"="using overlay address" "address"="22d502d022de0f8e9d477bc61144d0d842d9d82b8241568c6fe4e41f0b466615"\n"time"="2024-09-24 18:15:36.776576" "level"="info" "logger"="node" "msg"="starting with an enabled chain backend"\n"time"="2024-09-24 18:15:37.388997" "level"="info" "logger"="node" "msg"="connected to blockchain backend" "version"="erigon/2.60.7/linux-amd64/go1.21.5"\n"time"="2024-09-24 18:15:37.577840" "level"="info" "logger"="node" "msg"="using chain with network network" "chain_id"=100 "network_id"=1\n"time"="2024-09-24 18:15:37.593747" "level"="info" "logger"="node" "msg"="starting debug & api server" "address"="127.0.0.1:1633"\n"time"="2024-09-24 18:15:37.969782" "level"="info" "logger"="node" "msg"="using default factory address" "chain_id"=100 "factory_address"="0xC2d5A532cf69AA9A1378737D8ccDEF884B6E7420"\n"time"="2024-09-24 18:15:38.160249" "level"="info" "logger"="node/chequebook" "msg"="no chequebook found, deploying new one."\n"time"="2024-09-24 18:15:38.728534" "level"="warning" "logger"="node/chequebook" "msg"="cannot continue until there is at least min xDAI (for Gas) available on address" "min_amount"="0.0003750000017" "address"="0x1A801dd3ec955E905ca424a85C3423599bfb0E66"\n'})}),"\n",(0,s.jsx)(n.p,{children:"Take note of the lines:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'"time"="2024-09-24 18:15:34.520716" "level"="info" "logger"="node" "msg"="using ethereum address" "address"="0x1A801dd3ec955E905ca424a85C3423599bfb0E66"\n'})}),"\n",(0,s.jsx)(n.p,{children:"and"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'"time"="2024-09-24 18:15:38.728534" "level"="warning" "logger"="node/chequebook" "msg"="cannot continue until there is at least min xDAI (for Gas) available on address" "min_amount"="0.0003750000017" "address"="0x1A801dd3ec955E905ca424a85C3423599bfb0E66"\n'})}),"\n",(0,s.jsxs)(n.p,{children:["The address referred to in both of these lines is your node's Gnosis Chain address. The second one indicates that the address does not have enough xDAI in order to deploy your node's chequebook contract which is used to pay for bandwidth incentives. You will see this warning if you have configured your node to run as a ",(0,s.jsx)(n.code,{children:"full"})," or ",(0,s.jsx)(n.code,{children:"light"})," node, but it should be absent for ",(0,s.jsx)(n.code,{children:"ultra-light"})," nodes."]}),"\n",(0,s.jsx)(n.h2,{id:"fund-node",children:"Fund Node"}),"\n",(0,s.jsxs)(n.p,{children:["Depending on your chosen node type, (full, light, or ultra-light), you will want to fund your node with differing amounts of xBZZ and xDAI. See ",(0,s.jsx)(n.a,{href:"/docs/bee/installation/fund-your-node",children:"this section"})," for more information on how to fund your node."]}),"\n",(0,s.jsx)(n.h3,{id:"restart-and-wait-for-initialisation",children:"Restart and Wait for Initialisation"}),"\n",(0,s.jsx)(n.p,{children:"After funding your node, use the appropriate command for your system below and wait for it to initialize:"}),"\n",(0,s.jsxs)(i.A,{defaultValue:"linux",values:[{label:"Linux",value:"linux"},{label:"MacOS",value:"macos"}],children:[(0,s.jsx)(o.A,{value:"linux",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"sudo systemctl start bee\n"})})}),(0,s.jsx)(o.A,{value:"macos",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"brew services start swarm-bee\n"})})})]}),"\n",(0,s.jsx)(n.p,{children:"When first started in full or light mode, Bee must deploy a chequebook to the Gnosis Chain blockchain, and sync the postage stamp batch store so that it can check chunks for validity when storing or forwarding them. This can take a while, so please be patient! Once this is complete, you will see Bee starting to add peers and connect to the network."}),"\n",(0,s.jsx)(n.p,{children:"You can keep an eye on progress by watching the logs while this is taking place."}),"\n",(0,s.jsxs)(i.A,{defaultValue:"linux",values:[{label:"Linux",value:"linux"},{label:"MacOS arm64 (Apple Silicon)",value:"macos-arm64"},{label:"MacOS amd64 (Intel)",value:"macos-amd64"}],children:[(0,s.jsx)(o.A,{value:"linux",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"sudo journalctl --lines=100 --follow --unit bee\n"})})}),(0,s.jsx)(o.A,{value:"macos-arm64",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"tail -f /opt/homebrew/var/log/swarm-bee/bee.log\n"})})}),(0,s.jsx)(o.A,{value:"macos-amd64",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"tail -f /usr/local/var/log/swarm-bee/bee.log\n"})})})]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsxs)(n.em,{children:["If you've started your node with ",(0,s.jsx)(n.code,{children:"bee start"}),", simply observe the logs printed to your terminal."]})}),"\n",(0,s.jsx)(n.p,{children:"If all goes well, you will see your node automatically begin to connect to other Bee nodes all over the world."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"INFO[2020-08-29T11:55:16Z] greeting from peer: b6ae5b22d4dc93ce5ee46a9799ef5975d436eb63a4b085bfc104fcdcbda3b82c\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Now your node will begin to request chunks of data that fall within your ",(0,s.jsx)(n.em,{children:"radius of responsibilty"}),"\u2014data that you will then serve to other p2p clients running in the swarm. Your node will then begin to\nrespond to requests for these chunks from other peers."]}),"\n",(0,s.jsx)(n.admonition,{title:"Incentivisation",type:"tip",children:(0,s.jsxs)(n.p,{children:["In Swarm, storing, serving and forwarding chunks of data to other nodes can earn you rewards! Follow ",(0,s.jsx)(n.a,{href:"/docs/bee/working-with-bee/cashing-out",children:"this guide"})," to learn how to regularly cash out cheques other nodes send you in return for your services so that you can get your xBZZ!"]})}),"\n",(0,s.jsxs)(n.p,{children:["Your Bee client has now generated an elliptic curve key pair similar to an Ethereum wallet. These are stored in your ",(0,s.jsx)(n.a,{href:"/docs/bee/working-with-bee/configuration",children:"data directory"}),", in the ",(0,s.jsx)(n.code,{children:"keys"})," folder."]}),"\n",(0,s.jsx)(n.admonition,{title:"Keep Your Keys and Password Safe!",type:"danger",children:(0,s.jsxs)(n.p,{children:["Your keys and password are very important, back up these files and\nstore them in a secure place that only you have access to. With great\nprivacy comes great responsibility - while no-one will ever be able to\nguess your key - you will not be able to recover them if you lose them\neither, so be sure to look after them well and ",(0,s.jsx)(n.a,{href:"/docs/bee/working-with-bee/backups",children:"keep secure\nbackups"}),"."]})}),"\n",(0,s.jsx)(n.h2,{id:"check-if-bee-is-working",children:"Check if Bee is Working"}),"\n",(0,s.jsx)(n.p,{children:"First check that the correct version of Bee is installed:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"bee version\n"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"2.3.0\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Once the Bee node has been funded, the chequebook deployed, and postage stamp\nbatch store synced, its HTTP ",(0,s.jsx)(n.a,{href:"/docs/bee/working-with-bee/bee-api",children:"API"}),"\nwill start listening at ",(0,s.jsx)(n.code,{children:"localhost:1633"})," (for ",(0,s.jsx)(n.code,{children:"full"})," or ",(0,s.jsx)(n.code,{children:"light"})," nodes - for an ",(0,s.jsx)(n.code,{children:"ultra-light"})," node, it should be initialized and the API should be available more rapidly)."]}),"\n",(0,s.jsx)(n.p,{children:"To check everything is working as expected, send a GET request to localhost port 1633."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"curl localhost:1633\n"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"Ethereum Swarm Bee\n"})}),"\n",(0,s.jsx)(n.p,{children:"Success! The Bee API is now listening!"}),"\n",(0,s.jsxs)(n.p,{children:["Next, let's see if we have connected with any peers by sending a query to the Bee API (port 1633 by default - ",(0,s.jsx)(n.code,{children:"localhost:1633"}),")."]}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:["Here we are using the ",(0,s.jsx)(n.code,{children:"jq"})," ",(0,s.jsx)(n.a,{href:"https://jqlang.org/",children:"utility"})," to parse our javascript. Use your package manager to install ",(0,s.jsx)(n.code,{children:"jq"}),", or simply remove everything after and including the first ",(0,s.jsx)(n.code,{children:"|"})," to view the raw json without it."]})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'curl -s localhost:1633/peers | jq ".peers | length"\n'})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"87\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Perfect! We are accumulating peers, this means you are connected to\nthe network, and ready to start ",(0,s.jsx)(n.a,{href:"/docs/develop/introduction",children:"using\nBee"})," to ",(0,s.jsx)(n.a,{href:"/docs/develop/upload-and-download",children:"upload and\ndownload"})," content or host\nand browse ",(0,s.jsx)(n.a,{href:"/docs/develop/host-your-website",children:"websites"})," hosted\non the Swarm network."]}),"\n",(0,s.jsx)(n.p,{children:"Welcome to the swarm! \ud83d\udc1d\xa0\ud83d\udc1d\xa0\ud83d\udc1d\xa0\ud83d\udc1d\xa0\ud83d\udc1d"}),"\n",(0,s.jsx)(n.h2,{id:"back-up-keys",children:"Back Up Keys"}),"\n",(0,s.jsxs)(n.p,{children:["Once your node is up and running, make sure to ",(0,s.jsx)(n.a,{href:"/docs/bee/working-with-bee/backups",children:"back up your keys"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"deposit-stake-optional",children:"Deposit Stake (Optional)"}),"\n",(0,s.jsxs)(n.p,{children:["While depositing stake is not required to run a Bee node, it is required in order for a node to receive rewards for sharing storage with the network. You will need to ",(0,s.jsx)(n.a,{href:"/docs/bee/working-with-bee/staking",children:"deposit xBZZ to the staking contract"})," for your node. To do this, send a minimum of 10 xBZZ to your nodes' wallet and run:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"curl -X POST localhost:1633/stake/100000000000000000\n"})}),"\n",(0,s.jsx)(n.p,{children:"This will initiate a transaction on-chain which deposits the specified amount of xBZZ into the staking contract."}),"\n",(0,s.jsx)(n.p,{children:"Storage incentive rewards are only available for full nodes which are providing storage capacity to the network."}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsxs)(n.em,{children:["Note that SWAP rewards (bandwidth incentives paid for forwarding chunks) are available to all ",(0,s.jsx)(n.strong,{children:"full"})," nodes, regardless of whether or not they stake xBZZ in order to participate in the storage incentives system."]})}),"\n",(0,s.jsx)(n.h2,{id:"next-steps-to-consider",children:"Next Steps to Consider"}),"\n",(0,s.jsx)(n.h3,{id:"access-the-swarm",children:"Access the Swarm"}),"\n",(0,s.jsxs)(n.p,{children:["If you'd like to start uploading or downloading files to Swarm, ",(0,s.jsx)(n.a,{href:"/docs/develop/introduction",children:"start here"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"explore-the-api",children:"Explore the API"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.a,{href:"/docs/bee/working-with-bee/bee-api",children:"Bee API"})," is the primary method for interacting with Bee and getting information about Bee. After installing Bee and getting it up and running, it's a good idea to start getting familiar with the API."]}),"\n",(0,s.jsx)(n.h3,{id:"run-a-hive",children:"Run a hive!"}),"\n",(0,s.jsxs)(n.p,{children:["If you would like to run a hive of many Bees, check out the ",(0,s.jsx)(n.a,{href:"/docs/bee/installation/hive",children:"hive operators"})," section for information on how to operate and monitor many Bees at once."]}),"\n",(0,s.jsx)(n.h3,{id:"start-building-dapps-on-swarm",children:"Start building DAPPs on Swarm"}),"\n",(0,s.jsxs)(n.p,{children:["If you would like to start building decentralised applications on Swarm, check out our section for ",(0,s.jsx)(n.a,{href:"/docs/develop/introduction",children:"developing with Bee"}),"."]})]})}function g(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}},19365(e,n,a){a.d(n,{A:()=>l});a(96540);var t=a(34164),s=a(47751);const r="tabItem_Ymn6";var i=a(74848);function o(e){let n=e.children,a=e.className,s=e.hidden;return(0,i.jsx)("div",{role:"tabpanel",className:(0,t.A)(r,a),hidden:s,children:n})}function l(e){let n=e.children,a=e.className,t=e.value;const r=(0,s.uc)(),l=r.selectedValue,d=r.lazy,c=t===l;return!c&&d?null:(0,i.jsx)(o,{className:a,hidden:!c,children:n})}},4865(e,n,a){a.d(n,{A:()=>p});a(96540);var t=a(34164),s=a(17559),r=a(47751),i=a(23104),o=a(92303);const l="tabList__CuJ",d="tabItem_LNqP";var c=a(74848);function h(e){let n=e.className;const a=(0,r.uc)(),s=a.selectedValue,o=a.selectValue,l=a.tabValues,h=a.block,u=[],g=(0,i.a_)().blockElementScrollPositionUntilNextRender,p=e=>{const n=e.currentTarget,a=u.indexOf(n),t=l[a].value;t!==s&&(g(n),o(t))},b=e=>{var n;let a=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{var t;const n=u.indexOf(e.currentTarget)+1;a=null!=(t=u[n])?t:u[0];break}case"ArrowLeft":{var s;const n=u.indexOf(e.currentTarget)-1;a=null!=(s=u[n])?s:u[u.length-1];break}}null==(n=a)||n.focus()};return(0,c.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,t.A)("tabs",{"tabs--block":h},n),children:l.map(e=>{let n=e.value,a=e.label,r=e.attributes;return(0,c.jsx)("li",Object.assign({role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:e=>{u.push(e)},onKeyDown:b,onClick:p},r,{className:(0,t.A)("tabs__item",d,null==r?void 0:r.className,{"tabs__item--active":s===n}),children:null!=a?a:n}),n)})})}function u(e){let n=e.children;return(0,c.jsx)("div",{className:"margin-top--md",children:n})}function g(e){let n=e.className,a=e.children;return(0,c.jsxs)("div",{className:(0,t.A)(s.G.tabs.container,"tabs-container",l),children:[(0,c.jsx)(h,{className:n}),(0,c.jsx)(u,{children:a})]})}function p(e){const n=(0,o.A)(),a=(0,r.OC)(e);return(0,c.jsx)(r.O_,{value:a,children:(0,c.jsx)(g,{className:e.className,children:(0,r.vT)(e.children)})},String(n))}},47751(e,n,a){a.d(n,{OC:()=>p,O_:()=>f,uc:()=>m,vT:()=>c});var t=a(96540),s=a(56347),r=a(205),i=a(57485),o=a(70679),l=a(31682),d=a(74848);function c(e){return t.Children.toArray(e).filter(e=>"\n"!==e)}function h(e){const n=e.values,a=e.children;return(0,t.useMemo)(()=>{const e=null!=n?n:function(e){return t.Children.toArray(e).flatMap(e=>{if(!e)return[];if((0,t.isValidElement)(e)&&function(e){const n=e.props;return!!n&&"object"==typeof n&&"value"in n}(e))return[e];const n="string"==typeof e.type?e.type:e.type.name;throw new Error("Docusaurus error: Bad child <"+n+'>: all children of the component should be , and every should have a unique "value" prop.\nIf you do not want to pass on a "value" prop to the direct children of , you can also pass an explicit prop.')}).map(e=>{let n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}})}(a);return function(e){const n=(0,l.XI)(e,(e,n)=>e.value===n.value);if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map(e=>"'"+e.value+"'").join(", ")+'" found in . Every value needs to be unique.')}(e),e},[n,a])}function u(e){let n=e.value;return e.tabValues.some(e=>e.value===n)}function g(e){let n=e.queryString,a=void 0!==n&&n,r=e.groupId;const o=(0,s.W6)(),l=function(e){let n=e.queryString,a=void 0!==n&&n,t=e.groupId;if("string"==typeof a)return a;if(!1===a)return null;if(!0===a&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=t?t:null}({queryString:a,groupId:r});return[(0,i.aZ)(l),(0,t.useCallback)(e=>{if(!l)return;const n=new URLSearchParams(o.location.search);n.set(l,e),o.replace(Object.assign({},o.location,{search:n.toString()}))},[l,o])]}function p(e){var n,a;const s=e.defaultValue,i=e.queryString,l=void 0!==i&&i,d=e.groupId,c=h(e),p=(0,t.useState)(()=>function(e){var n;let a=e.defaultValue,t=e.tabValues;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(a){if(!u({value:a,tabValues:t}))throw new Error('Docusaurus error: The has a defaultValue "'+a+'" but none of its children has the corresponding value. Available values are: '+t.map(e=>e.value).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return a}const s=null!=(n=t.find(e=>e.default))?n:t[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:s,tabValues:c})),b=p[0],m=p[1],f=g({queryString:l,groupId:d}),x=f[0],v=f[1],w=function(e){const n=function(e){return e?"docusaurus.tab."+e:null}(e.groupId),a=(0,o.Dv)(n),s=a[0],r=a[1];return[s,(0,t.useCallback)(e=>{n&&r.set(e)},[n,r])]}({groupId:d}),j=w[0],y=w[1],k=(()=>{const e=null!=x?x:j;return u({value:e,tabValues:c})?e:null})();(0,r.A)(()=>{k&&m(k)},[k]);return{selectedValue:b,selectValue:(0,t.useCallback)(e=>{if(!u({value:e,tabValues:c}))throw new Error("Can't select invalid tab value="+e);m(e),v(e),y(e)},[v,y,c]),tabValues:c,lazy:null!=(n=e.lazy)&&n,block:null!=(a=e.block)&&a}}const b=(0,t.createContext)(null);function m(){const e=t.useContext(b);if(!e)throw new Error("useTabsContext() must be used within a Tabs component");return e}function f(e){return(0,d.jsx)(b.Provider,{value:e.value,children:e.children})}},28453(e,n,a){a.d(n,{R:()=>i,x:()=>o});var t=a(96540);const s={},r=t.createContext(s);function i(e){const n=t.useContext(r);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f375a06e.be1bcac7.js b/assets/js/f375a06e.be1bcac7.js new file mode 100644 index 000000000..80ad0888d --- /dev/null +++ b/assets/js/f375a06e.be1bcac7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[106],{52481(e,t,s){s.r(t),s.d(t,{assets:()=>i,contentTitle:()=>a,default:()=>p,frontMatter:()=>r,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"desktop/access-content","title":"Access Content","description":"Download and retrieve content from Swarm using the Swarm Desktop app.","source":"@site/docs/desktop/access-content.md","sourceDirName":"desktop","slug":"/desktop/access-content","permalink":"/docs/desktop/access-content","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/desktop/access-content.md","tags":[],"version":"current","frontMatter":{"title":"Access Content","id":"access-content","description":"Download and retrieve content from Swarm using the Swarm Desktop app."},"sidebar":"desktop","previous":{"title":"Configuration","permalink":"/docs/desktop/configuration"},"next":{"title":"Postage Stamps","permalink":"/docs/desktop/postage-stamps"}}');var o=s(74848),c=s(28453);const r={title:"Access Content",id:"access-content",description:"Download and retrieve content from Swarm using the Swarm Desktop app."},a=void 0,i={},d=[];function h(e){const t={a:"a",code:"code",em:"em",img:"img",p:"p",strong:"strong",...(0,c.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(t.p,{children:["Accessing content on Swarm using Swarm Desktop is easy. All you need to get started is the Swarm hash for the content you wish to access. Whenever content is ",(0,o.jsx)(t.a,{href:"/docs/desktop/upload-content",children:"uploaded to Swarm"})," a Swarm hash is generated as a reference to that content."]}),"\n",(0,o.jsxs)(t.p,{children:["To access content on Swarm go to the ",(0,o.jsx)(t.em,{children:(0,o.jsx)(t.strong,{children:"Files"})})," tab and click ",(0,o.jsx)(t.em,{children:(0,o.jsx)(t.strong,{children:"Download"})}),":"]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:s(43228).A+"",width:"2538",height:"1167"})}),"\n",(0,o.jsxs)(t.p,{children:["From there, paste the Swarm hash for the content you want to access, and click ",(0,o.jsx)(t.em,{children:(0,o.jsx)(t.strong,{children:"Find"})}),". We'll use the hash for a Swarm blog post explaining how to upload a website to Swarm:"]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.code,{children:"bc9b942212421e2a19fe1ffdf0add641ae530923041ea8f549381747b14b2f2d"})}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:s(31959).A+"",width:"2552",height:"1178"})}),"\n",(0,o.jsx)(t.p,{children:"On the following screen you will see the data associated with the Swarm hash and see options for downloading (or browsing if it is a hash for a website):"}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:s(58318).A+"",width:"2531",height:"1195"})}),"\n",(0,o.jsxs)(t.p,{children:["Click ",(0,o.jsx)(t.em,{children:(0,o.jsx)(t.strong,{children:"View Website"})})," to see the site in your browser, or ",(0,o.jsx)(t.em,{children:(0,o.jsx)(t.strong,{children:"Download"})})," to download the files:"]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:s(25057).A+"",width:"3341",height:"1724"})})]})}function p(e={}){const{wrapper:t}={...(0,c.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},43228(e,t,s){s.d(t,{A:()=>n});const n=s.p+"assets/images/access1-023820d77b25ddf28907dadf20b85315.png"},31959(e,t,s){s.d(t,{A:()=>n});const n=s.p+"assets/images/access2-0886d7d2a22cbc71908485211ae09103.png"},58318(e,t,s){s.d(t,{A:()=>n});const n=s.p+"assets/images/access3-19f273c5809c125816ccbc8dc400fd62.png"},25057(e,t,s){s.d(t,{A:()=>n});const n=s.p+"assets/images/access4-e7497835207464557454101f2e858dc7.png"},28453(e,t,s){s.d(t,{R:()=>r,x:()=>a});var n=s(96540);const o={},c=n.createContext(o);function r(e){const t=n.useContext(c);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),n.createElement(c.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f6879adf.936e8710.js b/assets/js/f6879adf.936e8710.js new file mode 100644 index 000000000..57f80f6f0 --- /dev/null +++ b/assets/js/f6879adf.936e8710.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[272],{55116(e,s,a){a.r(s),a.d(s,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>r,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"develop/introduction","title":"Building on Swarm","description":"Swarm lets developers store data, host websites, and build decentralised apps using the Bee HTTP API and the bee-js SDK.","source":"@site/docs/develop/introduction.md","sourceDirName":"develop","slug":"/develop/introduction","permalink":"/docs/develop/introduction","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/develop/introduction.md","tags":[],"version":"current","frontMatter":{"title":"Building on Swarm","id":"introduction","sidebar_label":"Start Building","hide_table_of_contents":false,"pagination_prev":null,"pagination_next":null,"description":"Swarm lets developers store data, host websites, and build decentralised apps using the Bee HTTP API and the bee-js SDK."},"sidebar":"develop"}');var n=a(74848),d=a(28453);const r={title:"Building on Swarm",id:"introduction",sidebar_label:"Start Building",hide_table_of_contents:!1,pagination_prev:null,pagination_next:null,description:"Swarm lets developers store data, host websites, and build decentralised apps using the Bee HTTP API and the bee-js SDK."},i=void 0,c={},l=[{value:"Setup",id:"setup",level:2},{value:"Guides",id:"guides",level:2}];function o(e){const s={h2:"h2",p:"p",...(0,d.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.p,{children:"This is the go-to starting point for web3 developers who want to build with Swarm. The guides on this page will help you get started with setting up a Bee node, using that node to integrate your dApp with Swarm, and to begin exploring some example applications to better understand the possibilities of building on Swarm."}),"\n",(0,n.jsx)(s.h2,{id:"setup",children:"Setup"}),"\n",(0,n.jsx)("div",{class:"hub-wrap",children:(0,n.jsx)("div",{class:"container",children:(0,n.jsxs)("ul",{class:"hub-grid",children:[(0,n.jsx)("li",{class:"hub-card",children:(0,n.jsxs)("a",{class:"hub-card__link",href:"/docs/bee/installation/quick-start",children:[(0,n.jsx)("h3",{class:"hub-card__title",children:"Install Bee"}),(0,n.jsx)("p",{class:"hub-card__desc",children:(0,n.jsx)(s.p,{children:"Install and run a Bee node \u2014 your entry point for development on the Swarm network."})}),(0,n.jsx)("span",{class:"hub-card__cta",children:"Get started"})]})}),(0,n.jsx)("li",{class:"hub-card",children:(0,n.jsxs)("a",{class:"hub-card__link",target:"_blank",href:"https://bee-js.ethswarm.org/docs/getting-started/#installation",children:[(0,n.jsx)("h3",{class:"hub-card__title",children:"Connect Your App"}),(0,n.jsx)("p",{class:"hub-card__desc",children:(0,n.jsxs)(s.p,{children:["Use the official ",(0,n.jsx)("code",{children:"bee-js"})," SDK to connect your app to your Bee node and integrate Swarm based storage, feeds, and more."]})}),(0,n.jsx)("span",{class:"hub-card__cta",children:"Connect dApp"})]})}),(0,n.jsx)("li",{class:"hub-card",children:(0,n.jsxs)("a",{class:"hub-card__link",href:"/docs/develop/tools-and-features/ai-agent-skills",children:[(0,n.jsx)("h3",{class:"hub-card__title",children:"Onboard with AI Skills"}),(0,n.jsx)("p",{class:"hub-card__desc",children:(0,n.jsxs)(s.p,{children:["Use the Swarm Quickstart Skills in Claude Code \u2014 type ",(0,n.jsx)("code",{children:"/swarm"})," for guided, prerequisite-checking steps to set up a node and start building."]})}),(0,n.jsx)("span",{class:"hub-card__cta",children:"Start with AI"})]})}),(0,n.jsx)("li",{class:"hub-card",children:(0,n.jsxs)("a",{class:"hub-card__link",href:"/docs/develop/tools-and-features/cheatsheets",children:[(0,n.jsx)("h3",{class:"hub-card__title",children:"Swarm Cheatsheet"}),(0,n.jsx)("p",{class:"hub-card__desc",children:(0,n.jsx)(s.p,{children:"A dense, printable quick-reference for building on Swarm \u2014 what it is, its limits, and curated links to get started fast."})}),(0,n.jsx)("span",{class:"hub-card__cta",children:"View cheatsheet"})]})})]})})}),"\n",(0,n.jsx)(s.h2,{id:"guides",children:"Guides"}),"\n",(0,n.jsx)("div",{class:"hub-wrap",children:(0,n.jsx)("div",{class:"container",children:(0,n.jsxs)("ul",{class:"hub-grid",children:[(0,n.jsx)("li",{class:"hub-card",children:(0,n.jsxs)("a",{class:"hub-card__link",href:"/docs/develop/upload-and-download",children:[(0,n.jsx)("h3",{class:"hub-card__title",children:"Upload and Download"}),(0,n.jsx)("p",{class:"hub-card__desc",children:(0,n.jsx)(s.p,{children:"Learn how to upload and download a variety of data types from Swarm (with support for both browser and Node.js environments)."})}),(0,n.jsx)("span",{class:"hub-card__cta",children:"Open guide"})]})}),(0,n.jsx)("li",{class:"hub-card",children:(0,n.jsxs)("a",{class:"hub-card__link",href:"/docs/develop/host-your-website",children:[(0,n.jsx)("h3",{class:"hub-card__title",children:"Host a Webpage"}),(0,n.jsx)("p",{class:"hub-card__desc",children:(0,n.jsx)(s.p,{children:"Host a website on Swarm and link it to your ENS domain for easy access at through gateways and Bee nodes."})}),(0,n.jsx)("span",{class:"hub-card__cta",children:"Open guide"})]})}),(0,n.jsx)("li",{class:"hub-card",children:(0,n.jsxs)("a",{class:"hub-card__link",href:"/docs/develop/files",children:[(0,n.jsx)("h3",{class:"hub-card__title",children:"Manage Files"}),(0,n.jsx)("p",{class:"hub-card__desc",children:(0,n.jsx)(s.p,{children:'Learn about how manifests enable a virtual "filesystem" on Swarm, and how to manipulate the manifest to re-write virtual paths to add, remove, or move content.'})}),(0,n.jsx)("span",{class:"hub-card__cta",children:"Open Guide"})]})}),(0,n.jsx)("li",{class:"hub-card",children:(0,n.jsxs)("a",{class:"hub-card__link",href:"/docs/develop/routing",children:[(0,n.jsx)("h3",{class:"hub-card__title",children:"Website Routing"}),(0,n.jsx)("p",{class:"hub-card__desc",children:(0,n.jsx)(s.p,{children:"Learn about routing on Swarm and the various options at your disposal for approaching website routing."})}),(0,n.jsx)("span",{class:"hub-card__cta",children:"Open Guide"})]})}),(0,n.jsx)("li",{class:"hub-card",children:(0,n.jsxs)("a",{class:"hub-card__link",href:"/docs/develop/gateway-proxy",children:[(0,n.jsx)("h3",{class:"hub-card__title",children:"Run a Gateway"}),(0,n.jsx)("p",{class:"hub-card__desc",children:(0,n.jsx)(s.p,{children:"Run your own Swarm HTTP gateway to serve content from the network and make it accessible to browsers and other HTTP clients."})}),(0,n.jsx)("span",{class:"hub-card__cta",children:"Open guide"})]})}),(0,n.jsx)("li",{class:"hub-card",children:(0,n.jsxs)("a",{class:"hub-card__link",href:"/docs/develop/dynamic-content",children:[(0,n.jsx)("h3",{class:"hub-card__title",children:"Dynamic Content"}),(0,n.jsx)("p",{class:"hub-card__desc",children:(0,n.jsx)(s.p,{children:"Learn how to use feeds to create updatable content on Swarm \u2014 with a complete example project that builds a dynamic note board."})}),(0,n.jsx)("span",{class:"hub-card__cta",children:"Open guide"})]})}),(0,n.jsx)("li",{class:"hub-card",children:(0,n.jsxs)("a",{class:"hub-card__link",href:"/docs/develop/multi-author-blog",children:[(0,n.jsx)("h3",{class:"hub-card__title",children:"Multi-Author Blog"}),(0,n.jsx)("p",{class:"hub-card__desc",children:(0,n.jsx)(s.p,{children:"Build a decentralized multi-author blog where each author controls their own feed and an admin index feed links them all together."})}),(0,n.jsx)("span",{class:"hub-card__cta",children:"Open guide"})]})})]})})})]})}function h(e={}){const{wrapper:s}={...(0,d.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(o,{...e})}):o(e)}},28453(e,s,a){a.d(s,{R:()=>r,x:()=>i});var t=a(96540);const n={},d=t.createContext(n);function r(e){const s=t.useContext(d);return t.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function i(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:r(e.components),t.createElement(d.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f7f0193b.80dfc3eb.js b/assets/js/f7f0193b.80dfc3eb.js new file mode 100644 index 000000000..05709365b --- /dev/null +++ b/assets/js/f7f0193b.80dfc3eb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[2433],{91867(e,s,n){n.r(s),n.d(s,{assets:()=>i,contentTitle:()=>c,default:()=>h,frontMatter:()=>r,metadata:()=>a,toc:()=>d});const a=JSON.parse('{"id":"develop/tools-and-features/pss","title":"PSS Messaging","description":"Guide for using Postal Service over Swarm for private messaging between nodes.","source":"@site/docs/develop/tools-and-features/pss.md","sourceDirName":"develop/tools-and-features","slug":"/develop/tools-and-features/pss","permalink":"/docs/develop/tools-and-features/pss","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/develop/tools-and-features/pss.md","tags":[],"version":"current","frontMatter":{"title":"PSS Messaging","id":"pss","description":"Guide for using Postal Service over Swarm for private messaging between nodes."},"sidebar":"develop","previous":{"title":"Manifests","permalink":"/docs/develop/tools-and-features/manifests"},"next":{"title":"GSOC","permalink":"/docs/develop/tools-and-features/gsoc"}}');var t=n(74848),o=n(28453);const r={title:"PSS Messaging",id:"pss",description:"Guide for using Postal Service over Swarm for private messaging between nodes."},c=void 0,i={},d=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Subscribe and Receive Messages",id:"subscribe-and-receive-messages",level:3},{value:"Send Messages",id:"send-messages",level:3},{value:"Send Messages in a Test Network",id:"send-messages-in-a-test-network",level:3}];function l(e){const s={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.p,{children:"Out of the ashes of Ethereum's vision for a leak-proof decentralised anonymous messaging system - Whisper - comes PSS (or BZZ, whispered! \ud83e\udd2b). Swarm provides the ability to send messages that appear to be normal Swarm traffic, but are in fact messages that may be received and decrypted to reveal their content only by the specific nodes they were intended to be received by."}),"\n",(0,t.jsx)(s.p,{children:"PSS provides a pub-sub facility that can be used for a variety of tasks. Nodes are able to listen to messages received for a specific topic in their nearest neighborhood and create messages destined for another neighborhood which are sent over the network using Swarm's usual data dissemination protocols."}),"\n",(0,t.jsx)(s.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,t.jsx)(s.admonition,{type:"warning",children:(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"You must be running a full node to receive PSS messages."})," Ultra-light and light nodes cannot subscribe to or receive messages. Full nodes connected to a blockchain RPC endpoint are required for PSS functionality."]})}),"\n",(0,t.jsx)(s.p,{children:"Additionally, to send PSS messages, you will need:"}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsx)(s.li,{children:"A postage stamp batch with sufficient xBZZ balance"}),"\n",(0,t.jsx)(s.li,{children:"The recipient's Swarm address prefix (at least 2 bytes)"}),"\n",(0,t.jsx)(s.li,{children:"The recipient's public key"}),"\n"]}),"\n",(0,t.jsx)(s.h3,{id:"subscribe-and-receive-messages",children:"Subscribe and Receive Messages"}),"\n",(0,t.jsxs)(s.p,{children:["Once your Bee node is up and running, you will be able to subscribe to feeds using WebSockets. For testing, it is useful to use the ",(0,t.jsx)(s.a,{href:"https://docs.rs/crate/websocat/1.0.1",children:"websocat"})," command line utility."]}),"\n",(0,t.jsxs)(s.p,{children:["Here we subscribe to the topic ",(0,t.jsx)(s.code,{children:"test-topic"})]}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-bash",children:"websocat ws://localhost:1633/pss/subscribe/test-topic\n"})}),"\n",(0,t.jsx)(s.p,{children:"Our node is now watching for new messages received in its nearest neighborhood."}),"\n",(0,t.jsx)(s.admonition,{type:"info",children:(0,t.jsx)(s.p,{children:"Because a message is disguised as a normal chunk in Swarm, you will receive the message upon syncing the chunk, even if your node is not online at the moment when the message was send to you."})}),"\n",(0,t.jsx)(s.h3,{id:"send-messages",children:"Send Messages"}),"\n",(0,t.jsxs)(s.p,{children:["Messages can be sent simply by sending a ",(0,t.jsx)(s.code,{children:"POST"})," request to the PSS API endpoint."]}),"\n",(0,t.jsx)(s.p,{children:"When sending messages, we must specify a 'target' prefix of the\nrecipient's Swarm address, a partial address representing their\nneighborhood. Currently the length of this prefix is recommended to\nbe two bytes, which will work well until the network has grown to a\nsize of ca. 20-50K nodes. We must also provide the public key, so that\nBee can encrypt the message in such a way that it may only be read by\nthe intended recipient."}),"\n",(0,t.jsxs)(s.p,{children:["For example, if we want to send a PSS message with ",(0,t.jsx)(s.strong,{children:"topic"})," ",(0,t.jsx)(s.code,{children:"test-topic"})," to a node with address..."]}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.code,{children:"7bc50a5d79cb69fa5a0df519c6cc7b420034faaa61c175b88fc4c683f7c79d96"})}),"\n",(0,t.jsx)(s.p,{children:"...and public key..."}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.code,{children:"0349f7b9a6fa41b3a123c64706a072014d27f56accd9a0e92b06fe8516e470d8dd"})}),"\n",(0,t.jsxs)(s.p,{children:["...we must include the ",(0,t.jsx)(s.strong,{children:"target"})," ",(0,t.jsx)(s.code,{children:"7bc5"})," and the public key itself as a query argument."]}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-bash",children:'curl -H "Swarm-Postage-Batch-Id: 78a26be9b42317fe6f0cbea3e47cbd0cf34f533db4e9c91cf92be40eb2968264" -X POST \\\nlocalhost:1833/pss/send/test-topic/7bc5?recipient=0349f7b9a6fa41b3a123c64706a072014d27f56accd9a0e92b06fe8516e470d8dd \\\n--data "Hello Swarm"\n'})}),"\n",(0,t.jsxs)(s.p,{children:["More information on how to buy a postage stamp batch and get its batch id can be found ",(0,t.jsx)(s.a,{href:"/docs/develop/tools-and-features/buy-a-stamp-batch",children:"here"}),"."]}),"\n",(0,t.jsx)(s.h3,{id:"send-messages-in-a-test-network",children:"Send Messages in a Test Network"}),"\n",(0,t.jsx)(s.p,{children:"Now, let's see this in action by setting up two Bee nodes on a test network, connecting them, and sending PSS messages from one to the other."}),"\n",(0,t.jsx)(s.p,{children:"First start two Bee nodes. We will start them with distinct ports for\nthe API and p2p ports, since they will be running on the\nsame computer."}),"\n",(0,t.jsxs)(s.p,{children:["Run the following command to start the first node. Note that we are passing ",(0,t.jsx)(s.code,{children:'""'})," to the ",(0,t.jsx)(s.code,{children:"--bootnode"})," argument so that our nodes will not connect to a network."]}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-bash",children:'bee start \\\n --api-addr=:1833 \\\n --data-dir=/tmp/bee2 \\\n --bootnode="" \\\n --p2p-addr=:1834 \\\n --blockchain-rpc-endpoint=http://localhost:8545\n'})}),"\n",(0,t.jsxs)(s.p,{children:["We must make a note of the Swarm overlay address, underlay address and public key which are created once each node has started. We find this information from the ",(0,t.jsx)(s.code,{children:"/addresses"})," endpoint of the API."]}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-bash",children:"curl -s localhost:1833/addresses | jq\n"})}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-json",children:'{\n "overlay": "46275b02b644a81c8776e2459531be2b2f34a94d47947feb03bc1e209678176c",\n "underlay": [\n "/ip4/127.0.0.1/tcp/7072/p2p/16Uiu2HAmTbaZndBa43PdBHEekjQQEdHqcyPgPc3oQwLoB2hRf1jq",\n "/ip4/192.168.0.10/tcp/7072/p2p/16Uiu2HAmTbaZndBa43PdBHEekjQQEdHqcyPgPc3oQwLoB2hRf1jq",\n "/ip6/::1/tcp/7072/p2p/16Uiu2HAmTbaZndBa43PdBHEekjQQEdHqcyPgPc3oQwLoB2hRf1jq"\n ],\n "ethereum": "0x0b546f2817d0d889bd70e244c1227f331f2edf74",\n "public_key": "03660e8dbcf3fda791e8e2e50bce658a96d766e68eb6caa00ce2bb87c1937f02a5"\n}\n'})}),"\n",(0,t.jsx)(s.p,{children:"Now the same for the second node."}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-bash",children:'bee start \\\n --api-addr=:1933 \\\n --data-dir=/tmp/bee3 \\\n --bootnode="" \\\n --p2p-addr=:1934 \\\n --blockchain-rpc-endpoint=http://localhost:8545\n'})}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-bash",children:"curl -s localhost:1935/addresses | jq\n"})}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-json",children:'{\n "overlay": "085b5cf15a08f59b9d64e8ce3722a95b2c150bb6a2cef4ac8b612ee8b7872253",\n "underlay": [\n "/ip4/127.0.0.1/tcp/7073/p2p/16Uiu2HAm5RwRgkZWxDMAff2io6L4Qd1uL9yNgZSNTCdPsukcg5Qr",\n "/ip4/192.168.0.10/tcp/7073/p2p/16Uiu2HAm5RwRgkZWxDMAff2io6L4Qd1uL9yNgZSNTCdPsukcg5Qr",\n "/ip6/::1/tcp/7073/p2p/16Uiu2HAm5RwRgkZWxDMAff2io6L4Qd1uL9yNgZSNTCdPsukcg5Qr"\n ],\n "ethereum": "0x9ec47bd86a82276fba57f3009c2f6b3ace4286bf",\n "public_key": "0289634662d3ed7c9fb1d7d2a3690b69b4075cf138b683380023d2edc2e6847826"\n}\n'})}),"\n",(0,t.jsx)(s.p,{children:"Because we configured the nodes to start with no bootnodes, neither node should have peers yet."}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-bash",children:"curl -s localhost:1833/peers | jq\n"})}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-bash",children:"curl -s localhost:1935/peers | jq\n"})}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-json",children:'{\n "peers": []\n}\n'})}),"\n",(0,t.jsx)(s.p,{children:"Let's connect node 2 to node 1 using the localhost (127.0.0.1) underlay address for node 1 that we have noted earlier."}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-bash",children:"curl -X POST \\\n localhost:1935/connect/ip4/127.0.0.1/tcp/1834/p2p/16Uiu2HAmP9i7VoEcaGtHiyB6v7HieoiB9v7GFVZcL2VkSRnFwCHr\n"})}),"\n",(0,t.jsx)(s.p,{children:"Now, if we check our peers endpoint for node 1, we can see our nodes are now peered together."}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-bash",children:"curl -s localhost:1833/peers | jq\n"})}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-json",children:'{\n "peers": [\n {\n "address": "a231764383d7c46c60a6571905e72021a90d506ef8db06750f8a708d93fe706e"\n }\n ]\n}\n'})}),"\n",(0,t.jsx)(s.p,{children:"Of course, since we are p2p, node 2 will show node 1 as a peer too."}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-bash",children:"curl -s localhost:1935/peers | jq\n"})}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-json",children:'{\n "peers": [\n {\n "address": "7bc50a5d79cb69fa5a0df519c6cc7b420034faaa61c175b88fc4c683f7c79d96"\n }\n ]\n}\n'})}),"\n",(0,t.jsxs)(s.p,{children:["We will use ",(0,t.jsx)(s.code,{children:"websocat"})," to listen for the PSS messages' Topic ID\n",(0,t.jsx)(s.code,{children:"test-topic"})," on our first node."]}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-bash",children:"websocat ws://localhost:1833/pss/subscribe/test-topic\n"})}),"\n",(0,t.jsx)(s.p,{children:"Now we can use PSS to send a message from our second node to our first node."}),"\n",(0,t.jsxs)(s.p,{children:["Since our first node has a 2 byte address prefix of ",(0,t.jsx)(s.code,{children:"a231"}),", we will specify this as the ",(0,t.jsx)(s.code,{children:"targets"})," section in our POST request's URL. We must also include the public key of the recipient as a query parameter so that the message can be encrypted in a way only our recipient can decrypt."]}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-bash",children:'curl \\\n -H "Swarm-Postage-Batch-Id: 78a26be9b42317fe6f0cbea3e47cbd0cf34f533db4e9c91cf92be40eb2968264"\n -X POST "localhost:1933/pss/send/test-topic/7bc5?recipient=0349f7b9a6fa41b3a123c64706a072014d27f56accd9a0e92b06fe8516e470d8dd" \\\n --data "Hello Swarm"\n'})}),"\n",(0,t.jsxs)(s.p,{children:["The PSS API endpoint will now create a PSS message for its recipient\nin the form of a 'Trojan Chunk' and send this into the network so that\nit may be pushed to the correct neighborhood. Once it is received by\nits recipient it will be decrypted and determined to be a message with\nthe topic we are listening for. Our second node will decrypt the data\nand we'll see a message pop up in our ",(0,t.jsx)(s.code,{children:"websocat"})," console!"]}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-bash",children:"websocat ws://localhost:1833/pss/subscribe/test-topic\n"})}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{children:"Hello Swarm\n"})}),"\n",(0,t.jsx)(s.p,{children:"Congratulations! \ud83c\udf89 You have sent your first encrypted, zero leak message over Swarm!"})]})}function h(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},28453(e,s,n){n.d(s,{R:()=>r,x:()=>c});var a=n(96540);const t={},o=a.createContext(t);function r(e){const s=a.useContext(o);return a.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function c(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),a.createElement(o.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ff1e3514.6bee7be1.js b/assets/js/ff1e3514.6bee7be1.js new file mode 100644 index 000000000..8852c33a8 --- /dev/null +++ b/assets/js/ff1e3514.6bee7be1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[1678],{53691(e,t,n){n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>l,frontMatter:()=>i,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"bee/working-with-bee/monitoring","title":"Monitoring Your Node","description":"Explains how to monitor Bee node metrics using Prometheus and Grafana for tracking cheque rates and network performance.","source":"@site/docs/bee/working-with-bee/monitoring.md","sourceDirName":"bee/working-with-bee","slug":"/bee/working-with-bee/monitoring","permalink":"/docs/bee/working-with-bee/monitoring","draft":false,"unlisted":false,"editUrl":"https://github.com/ethersphere/docs.github.io/blob/master/docs/bee/working-with-bee/monitoring.md","tags":[],"version":"current","frontMatter":{"title":"Monitoring Your Node","id":"monitoring","description":"Explains how to monitor Bee node metrics using Prometheus and Grafana for tracking cheque rates and network performance."},"sidebar":"bee","previous":{"title":"Cashing Out","permalink":"/docs/bee/working-with-bee/cashing-out"},"next":{"title":"Backups","permalink":"/docs/bee/working-with-bee/backups"}}');var r=n(74848),s=n(28453);const i={title:"Monitoring Your Node",id:"monitoring",description:"Explains how to monitor Bee node metrics using Prometheus and Grafana for tracking cheque rates and network performance."},a=void 0,c={},d=[];function h(e){const t={a:"a",code:"code",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.p,{children:"Bee nodes expose runtime metrics in Prometheus format, which you can collect and visualise with Grafana to understand what your Bee has been up to."}),"\n",(0,r.jsxs)(t.p,{children:["Navigate to ",(0,r.jsx)(t.code,{children:"http://localhost:1633/metrics"}),"."]}),"\n",(0,r.jsx)(t.p,{children:"The /metrics page shows a snapshot of your Bee node's metrics at the moment you load it."}),"\n",(0,r.jsx)(t.p,{children:"To make these raw metrics useful, you need to record them over time."}),"\n",(0,r.jsxs)(t.p,{children:["To record Bee's metrics over time, we will use ",(0,r.jsx)(t.a,{href:"https://prometheus.io/docs/introduction/overview/",children:"Prometheus"}),". Simply install, configure as follows, and restart!"]}),"\n",(0,r.jsxs)(t.p,{children:["For Ubuntu and other Debian based Linux distributions install using ",(0,r.jsx)(t.code,{children:"apt"}),":"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"sudo apt install prometheus\n"})}),"\n",(0,r.jsxs)(t.p,{children:["And configure ",(0,r.jsx)(t.code,{children:"localhost:1633"})," as a ",(0,r.jsx)(t.code,{children:"target"})," in the ",(0,r.jsx)(t.code,{children:"static_configs"}),"."]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"sudo vim /etc/prometheus/prometheus.yml\n"})}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-yaml",children:'static_configs:\n - targets: ["localhost:9090", "localhost:1633"]\n'})}),"\n",(0,r.jsxs)(t.p,{children:["Navigate to ",(0,r.jsx)(t.a,{href:"http://localhost:9090",children:"http://localhost:9090"})," to see the Prometheus user interface."]}),"\n",(0,r.jsxs)(t.p,{children:["Now that our metrics are being scraped into Prometheus' database, we can use it as a data source which is used by ",(0,r.jsx)(t.a,{href:"https://grafana.com/oss/grafana/",children:"Grafana"})," to display the metrics as a time series graph on the dashboard."]}),"\n",(0,r.jsxs)(t.p,{children:["Type ",(0,r.jsx)(t.code,{children:"bee_"})," in the 'expression' or 'metrics' field in Prometheus or Grafana respectively to see the list of metrics available. Here's a few to get you started!"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{children:"rate(bee_swap_cheques_received[1d])\nrate(bee_swap_cheques_sent[1d])\nrate(bee_swap_cheques_rejected[1d])\n"})}),"\n",(0,r.jsxs)(t.p,{children:["Share your creations in the ",(0,r.jsx)(t.a,{href:"https://discord.gg/kHRyMNpw7t",children:"#node-operators"})," channel of our Discord server!"]})]})}function l(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},28453(e,t,n){n.d(t,{R:()=>i,x:()=>a});var o=n(96540);const r={},s=o.createContext(r);function i(e){const t=o.useContext(s);return o.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/main.fc376a4a.js b/assets/js/main.fc376a4a.js new file mode 100644 index 000000000..1ebca9f8d --- /dev/null +++ b/assets/js/main.fc376a4a.js @@ -0,0 +1,2 @@ +/*! For license information please see main.fc376a4a.js.LICENSE.txt */ +(self.webpackChunkbee_docs=self.webpackChunkbee_docs||[]).push([[8792],{35947(e,t,n){"use strict";n.d(t,{A:()=>p});n(96540);var r=n(53259),o=n.n(r),a=n(84054);const s={"000d6678":[()=>n.e(714).then(n.bind(n,69369)),"@site/docs/bee/working-with-bee/logs-and-files.md",69369],"0058b4c6":[()=>n.e(849).then(n.t.bind(n,86164,19)),"@generated/docusaurus-plugin-content-docs/default/p/docs-175.json",86164],"032f5f3f":[()=>n.e(2426).then(n.bind(n,91983)),"@site/docs/desktop/postage-stamps.md",91983],"0665e5d4":[()=>n.e(3108).then(n.bind(n,80329)),"@site/docs/bee/working-with-bee/upgrade.md",80329],"06809660":[()=>n.e(2034).then(n.bind(n,74437)),"@site/docs/develop/tools-and-features/dev-mode.md",74437],"098f45c6":[()=>n.e(2774).then(n.bind(n,82944)),"@site/docs/develop/tools-and-features/chunk-types.md",82944],"0c14f1c3":[()=>n.e(9566).then(n.bind(n,64664)),"@site/docs/develop/host-your-website.md",64664],"10af94c2":[()=>n.e(3269).then(n.bind(n,97267)),"@site/docs/desktop/configuration.md",97267],"1783be55":[()=>n.e(769).then(n.bind(n,2306)),"@site/docs/concepts/DISC/erasure-coding.md",2306],17896441:[()=>Promise.all([n.e(1869),n.e(3086),n.e(8401)]).then(n.bind(n,53913)),"@theme/DocItem",53913],"191458e8":[()=>n.e(9750).then(n.bind(n,86711)),"@site/docs/references/community.md",86711],"1a4e3797":[()=>Promise.all([n.e(1869),n.e(2138)]).then(n.bind(n,80851)),"@theme/SearchPage",80851],"1b1c4260":[()=>n.e(1406).then(n.bind(n,14178)),"@site/docs/develop/tools-and-features/ai-agent-skills.md",14178],"1c690199":[()=>Promise.all([n.e(1869),n.e(3047)]).then(n.bind(n,51340)),"@site/docs/bee/working-with-bee/backups.md",51340],"211ef201":[()=>n.e(6635).then(n.bind(n,87396)),"@site/docs/desktop/backup-restore.md",87396],"243e784f":[()=>n.e(1914).then(n.bind(n,51022)),"@site/docs/concepts/incentives/overview.mdx",51022],26592542:[()=>Promise.all([n.e(1869),n.e(1612)]).then(n.bind(n,29831)),"@site/docs/bee/installation/shell-script.md",29831],"275a8dd8":[()=>n.e(4304).then(n.bind(n,95617)),"@site/docs/concepts/DISC/kademlia.mdx",95617],"28daae68":[()=>n.e(6572).then(n.bind(n,43240)),"@site/docs/develop/gateway.md",43240],"2fb51a8e":[()=>n.e(2563).then(n.bind(n,75832)),"@site/docs/concepts/access-control.md",75832],"32282be6":[()=>n.e(7231).then(n.bind(n,77728)),"@site/docs/develop/files.md",77728],"35bdca39":[()=>n.e(7473).then(n.bind(n,26336)),"@site/docs/references/tokens.md",26336],"36994c47":[()=>n.e(9858).then(n.t.bind(n,45516,19)),"@generated/docusaurus-plugin-content-blog/default/__plugin.json",45516],"3aa86a4e":[()=>n.e(9346).then(n.bind(n,69629)),"@site/docs/references/smart-contracts.mdx",69629],"3c3a6abf":[()=>n.e(8846).then(n.bind(n,51659)),"@site/docs/bee/installation/docker.md",51659],"45d8935a":[()=>n.e(8932).then(n.bind(n,82057)),"@site/docs/develop/tools-and-features/bee-js.md",82057],"4b8a4e95":[()=>n.e(2187).then(n.bind(n,27638)),"@site/docs/develop/tools-and-features/manifests.md",27638],"4cb53170":[()=>n.e(4590).then(n.bind(n,66475)),"@site/docs/develop/contribute/introduction.md",66475],"4d578846":[()=>n.e(5957).then(n.bind(n,21559)),"@site/docs/desktop/upload-content.md",21559],"51e16090":[()=>n.e(2074).then(n.t.bind(n,74632,19)),"/home/runner/work/bee-docs/bee-docs/.docusaurus/docusaurus-plugin-redoc/plugin-redoc-0/redocApiLayoutV1-plugin-redoc-0.json",74632],"5292c32b":[()=>n.e(593).then(n.bind(n,97273)),"@site/docs/develop/tools-and-features/introduction.md",97273],"59713e80":[()=>n.e(5929).then(n.bind(n,76820)),"@site/docs/develop/contribute/protocols.md",76820],"5bb09754":[()=>n.e(4179).then(n.bind(n,8815)),"@site/docs/references/fair-data-society.md",8815],"5e95c892":[()=>n.e(9647).then(n.bind(n,7121)),"@theme/DocsRoot",7121],"5e9f5e1a":[()=>Promise.resolve().then(n.bind(n,4784)),"@generated/docusaurus.config",4784],"5ee72a4b":[()=>n.e(1628).then(n.bind(n,5185)),"@site/docs/bee/working-with-bee/staking.md",5185],"5f58f78d":[()=>n.e(4536).then(n.bind(n,4688)),"@site/docs/concepts/DISC/neighborhoods.md",4688],"60fe9a3b":[()=>n.e(8911).then(n.bind(n,57981)),"@site/docs/develop/tools-and-features/cheatsheets.md",57981],"6ba57622":[()=>n.e(9130).then(n.t.bind(n,21258,19)),"@generated/docusaurus-plugin-redoc/plugin-redoc-0/__plugin.json",21258],"6bac647a":[()=>n.e(877).then(n.bind(n,70185)),"@site/docs/develop/tools-and-features/gateway-proxy.md",70185],"6f20431d":[()=>n.e(7121).then(n.bind(n,33035)),"@site/docs/concepts/incentives/redistribution-game.md",33035],"78008a53":[()=>n.e(6699).then(n.bind(n,16812)),"@site/docs/bee/working-with-bee/uninstalling-bee.md",16812],"80c82b62":[()=>n.e(1870).then(n.bind(n,78931)),"@site/docs/develop/tools-and-features/erasure-coding.md",78931],"814f3328":[()=>n.e(7472).then(n.t.bind(n,55513,19)),"~blog/default/blog-post-list-prop-default.json",55513],"8497dad5":[()=>n.e(3115).then(n.bind(n,76526)),"@site/docs/bee/installation/build-from-source.md",76526],"88edeb39":[()=>n.e(2974).then(n.bind(n,2726)),"@site/docs/concepts/incentives/bandwidth-incentives.md",2726],"8932e155":[()=>n.e(8241).then(n.bind(n,1867)),"@site/docs/concepts/what-is-swarm.mdx",1867],"89aa0649":[()=>n.e(4595).then(n.bind(n,93984)),"@site/docs/concepts/pss.md",93984],"8c5f7849":[()=>Promise.all([n.e(1869),n.e(3829)]).then(n.bind(n,57777)),"@site/docs/bee/working-with-bee/configuration.md",57777],"8e1fb12b":[()=>n.e(1108).then(n.bind(n,88353)),"@site/docs/bee/installation/getting-started.md",88353],"9111841d":[()=>Promise.all([n.e(1869),n.e(4464)]).then(n.bind(n,60396)),"@site/docs/develop/tools-and-features/buy-a-stamp-batch.md",60396],"9594edf7":[()=>n.e(2396).then(n.bind(n,14379)),"@site/docs/bee/working-with-bee/cashing-out.md",14379],"99b6ceef":[()=>n.e(7824).then(n.bind(n,65132)),"@site/docs/references/awesome-list.mdx",65132],"99fbaaba":[()=>n.e(5908).then(n.bind(n,49960)),"@site/docs/develop/tools-and-features/gsoc.md",49960],a0798b91:[()=>n.e(596).then(n.bind(n,44245)),"@site/docs/bee/installation/hive.md",44245],a23930e7:[()=>n.e(3623).then(n.bind(n,39600)),"@site/docs/desktop/publish-a-website.md",39600],a670bcb3:[()=>n.e(3615).then(n.bind(n,1448)),"@site/docs/bee/installation/set-target-neighborhood.md",1448],a68c8598:[()=>n.e(7183).then(n.bind(n,27981)),"@site/docs/concepts/DISC/DISC.mdx",27981],a6aa9e1f:[()=>Promise.all([n.e(1869),n.e(3086),n.e(7643)]).then(n.bind(n,25625)),"@theme/BlogListPage",25625],a7456010:[()=>n.e(1235).then(n.t.bind(n,88552,19)),"@generated/docusaurus-plugin-content-pages/default/__plugin.json",88552],a7bd4aaa:[()=>n.e(7098).then(n.bind(n,74532)),"@theme/DocVersionRoot",74532],a7d5385f:[()=>n.e(766).then(n.bind(n,24182)),"@site/docs/references/faq.md",24182],a7e6bfea:[()=>n.e(6440).then(n.bind(n,6056)),"@site/docs/desktop/introduction.md",6056],a94703ab:[()=>Promise.all([n.e(1869),n.e(9048)]).then(n.bind(n,78115)),"@theme/DocRoot",78115],ab99809b:[()=>n.e(9).then(n.bind(n,70894)),"@site/docs/develop/upload-and-download.md",70894],aba21aa0:[()=>n.e(5742).then(n.t.bind(n,27093,19)),"@generated/docusaurus-plugin-content-docs/default/__plugin.json",27093],b0c952a3:[()=>n.e(3460).then(n.bind(n,64666)),"@site/docs/develop/tools-and-features/starting-a-test-network.md",64666],b0d08c50:[()=>n.e(7233).then(n.bind(n,43805)),"@site/docs/concepts/incentives/price-oracle.md",43805],b2147b80:[()=>n.e(4311).then(n.bind(n,49663)),"@site/docs/bee/installation/fund-your-node.md",49663],b35a7c50:[()=>n.e(3230).then(n.bind(n,34419)),"@site/docs/desktop/install.md",34419],b57c29d7:[()=>n.e(4154).then(n.bind(n,73178)),"@site/docs/bee/installation/connectivity.md",73178],b57ec343:[()=>n.e(9429).then(n.bind(n,95844)),"@site/docs/desktop/start-a-blog.md",95844],b60aa269:[()=>n.e(5608).then(n.bind(n,32547)),"@site/docs/develop/tools-and-features/store-with-encryption.md",32547],b616cb30:[()=>n.e(632).then(n.bind(n,73517)),"@site/docs/develop/routing.md",73517],be94df29:[()=>n.e(9622).then(n.bind(n,65621)),"@site/docs/develop/dynamic-content.md",65621],c141421f:[()=>n.e(957).then(n.t.bind(n,40936,19)),"@generated/docusaurus-theme-search-algolia/default/__plugin.json",40936],c15d9823:[()=>n.e(8146).then(n.t.bind(n,29328,19)),"@generated/docusaurus-plugin-content-blog/default/p/blog-bd9.json",29328],c34c2406:[()=>n.e(626).then(n.bind(n,62625)),"@site/docs/develop/tools-and-features/pinning.md",62625],c4f5d8e4:[()=>Promise.all([n.e(1869),n.e(2634)]).then(n.bind(n,62468)),"@site/src/pages/index.js",62468],c5b6ac1f:[()=>n.e(3302).then(n.bind(n,26153)),"@site/docs/develop/resources-md.md",26153],d181d228:[()=>n.e(3583).then(n.bind(n,98155)),"@site/docs/bee/faq.md",98155],d643000e:[()=>n.e(7519).then(n.bind(n,83486)),"@site/docs/bee/installation/quick-start.md",83486],d6644dbd:[()=>n.e(6673).then(n.bind(n,19514)),"@site/docs/concepts/incentives/postage-stamps.md",19514],d84224c7:[()=>n.e(3481).then(n.bind(n,96549)),"@site/docs/develop/multi-author-blog.md",96549],d96f5c99:[()=>n.e(1792).then(n.bind(n,70149)),"@site/docs/develop/access-control.md",70149],da92f910:[()=>n.e(5411).then(n.bind(n,95641)),"@site/docs/bee/working-with-bee/swarm-cli.md",95641],dca20b09:[()=>n.e(3594).then(n.bind(n,76223)),"@site/docs/develop/ultra-light-nodes.md",76223],df724892:[()=>n.e(8539).then(n.bind(n,63276)),"@site/docs/bee/working-with-bee/bcrypt.md",63276],e4170b6f:[()=>n.e(2854).then(n.bind(n,48285)),"@site/docs/develop/tools-and-features/feeds.md",48285],e694b58a:[()=>n.e(8883).then(n.t.bind(n,66799,19)),"/home/runner/work/bee-docs/bee-docs/.docusaurus/docusaurus-plugin-redoc/plugin-redoc-0/redocApiSpecV1.2-plugin-redoc-0.json",66799],e75f3413:[()=>Promise.all([n.e(1869),n.e(1927)]).then(n.bind(n,68714)),"@site/docs/bee/working-with-bee/bee-api.md",68714],e76d947a:[()=>n.e(9030).then(n.bind(n,62645)),"@site/docs/bee/working-with-bee/introduction.md",62645],e88c9444:[()=>n.e(5452).then(n.bind(n,8354)),"@site/docs/concepts/introduction.md",8354],eae929fd:[()=>n.e(5878).then(n.bind(n,99909)),"@site/docs/references/glossary.md",99909],eb7fccc7:[()=>Promise.all([n.e(1869),n.e(1789)]).then(n.bind(n,74025)),"@site/docs/bee/working-with-bee/node-types.md",74025],f0ad3fbb:[()=>Promise.all([n.e(1869),n.e(8664),n.e(4307),n.e(2969)]).then(n.bind(n,14307)),"@theme/ApiDoc",14307],f2d3331a:[()=>Promise.all([n.e(1869),n.e(7432)]).then(n.bind(n,92475)),"@site/docs/bee/installation/package-manager.md",92475],f375a06e:[()=>n.e(106).then(n.bind(n,52481)),"@site/docs/desktop/access-content.md",52481],f6879adf:[()=>n.e(272).then(n.bind(n,55116)),"@site/docs/develop/introduction.md",55116],f7f0193b:[()=>n.e(2433).then(n.bind(n,91867)),"@site/docs/develop/tools-and-features/pss.md",91867],ff1e3514:[()=>n.e(1678).then(n.bind(n,53691)),"@site/docs/bee/working-with-bee/monitoring.md",53691]};var i=n(74848);function l(e){let t=e.error,n=e.retry,r=e.pastDelay;return t?(0,i.jsxs)("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"},children:[(0,i.jsx)("p",{children:String(t)}),(0,i.jsx)("div",{children:(0,i.jsx)("button",{type:"button",onClick:n,children:"Retry"})})]}):r?(0,i.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,i.jsx)("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb",children:(0,i.jsxs)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2",children:[(0,i.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,i.jsx)("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,i.jsx)("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,i.jsx)("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,i.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,i.jsx)("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,i.jsx)("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,i.jsx)("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,i.jsx)("circle",{cx:"22",cy:"22",r:"8",children:(0,i.jsx)("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"})})]})})}):null}var c=n(86921),u=n(53102);function d(e,t){if("*"===e)return o()({loading:l,loader:()=>n.e(2237).then(n.bind(n,82237)),modules:["@theme/NotFound"],webpack:()=>[82237],render(e,t){const n=e.default;return(0,i.jsx)(u.W,{value:{plugin:{name:"native",id:"default"}},children:(0,i.jsx)(n,Object.assign({},t))})}});const r=a[e+"-"+t],d={},p=[],f=[],m=(0,c.A)(r);return Object.entries(m).forEach(e=>{let t=e[0],n=e[1];const r=s[n];r&&(d[t]=r[0],p.push(r[1]),f.push(r[2]))}),o().Map({loading:l,loader:d,modules:p,webpack:()=>f,render(t,n){const o=JSON.parse(JSON.stringify(r));Object.entries(t).forEach(t=>{let n=t[0],r=t[1];const a=r.default;if(!a)throw new Error("The page component at "+e+" doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.");"object"!=typeof a&&"function"!=typeof a||Object.keys(r).filter(e=>"default"!==e).forEach(e=>{a[e]=r[e]});let s=o;const i=n.split(".");i.slice(0,-1).forEach(e=>{s=s[e]}),s[i[i.length-1]]=a});const a=o.__comp;delete o.__comp;const s=o.__context;delete o.__context;const l=o.__props;return delete o.__props,(0,i.jsx)(u.W,{value:s,children:(0,i.jsx)(a,Object.assign({},o,l,n))})}})}const p=[{path:"/api/",component:d("/api/","187"),exact:!0},{path:"/blog",component:d("/blog","98b"),exact:!0},{path:"/search",component:d("/search","5de"),exact:!0},{path:"/docs",component:d("/docs","cfd"),routes:[{path:"/docs",component:d("/docs","1b3"),routes:[{path:"/docs",component:d("/docs","316"),routes:[{path:"/docs/bee/bee-faq",component:d("/docs/bee/bee-faq","778"),exact:!0,sidebar:"bee"},{path:"/docs/bee/installation/build-from-source",component:d("/docs/bee/installation/build-from-source","e77"),exact:!0,sidebar:"bee"},{path:"/docs/bee/installation/connectivity",component:d("/docs/bee/installation/connectivity","559"),exact:!0,sidebar:"bee"},{path:"/docs/bee/installation/docker",component:d("/docs/bee/installation/docker","e8f"),exact:!0,sidebar:"bee"},{path:"/docs/bee/installation/fund-your-node",component:d("/docs/bee/installation/fund-your-node","c09"),exact:!0,sidebar:"bee"},{path:"/docs/bee/installation/getting-started",component:d("/docs/bee/installation/getting-started","200"),exact:!0,sidebar:"bee"},{path:"/docs/bee/installation/hive",component:d("/docs/bee/installation/hive","239"),exact:!0,sidebar:"bee"},{path:"/docs/bee/installation/package-manager-install",component:d("/docs/bee/installation/package-manager-install","586"),exact:!0,sidebar:"bee"},{path:"/docs/bee/installation/quick-start",component:d("/docs/bee/installation/quick-start","729"),exact:!0,sidebar:"bee"},{path:"/docs/bee/installation/set-target-neighborhood",component:d("/docs/bee/installation/set-target-neighborhood","7e1"),exact:!0,sidebar:"bee"},{path:"/docs/bee/installation/shell-script-install",component:d("/docs/bee/installation/shell-script-install","127"),exact:!0,sidebar:"bee"},{path:"/docs/bee/working-with-bee/backups",component:d("/docs/bee/working-with-bee/backups","31e"),exact:!0,sidebar:"bee"},{path:"/docs/bee/working-with-bee/bcrypt",component:d("/docs/bee/working-with-bee/bcrypt","bce"),exact:!0},{path:"/docs/bee/working-with-bee/bee-api",component:d("/docs/bee/working-with-bee/bee-api","63f"),exact:!0,sidebar:"bee"},{path:"/docs/bee/working-with-bee/cashing-out",component:d("/docs/bee/working-with-bee/cashing-out","de7"),exact:!0,sidebar:"bee"},{path:"/docs/bee/working-with-bee/configuration",component:d("/docs/bee/working-with-bee/configuration","56a"),exact:!0,sidebar:"bee"},{path:"/docs/bee/working-with-bee/introduction",component:d("/docs/bee/working-with-bee/introduction","a06"),exact:!0,sidebar:"bee"},{path:"/docs/bee/working-with-bee/logs-and-files",component:d("/docs/bee/working-with-bee/logs-and-files","a79"),exact:!0,sidebar:"bee"},{path:"/docs/bee/working-with-bee/monitoring",component:d("/docs/bee/working-with-bee/monitoring","9d3"),exact:!0,sidebar:"bee"},{path:"/docs/bee/working-with-bee/node-types",component:d("/docs/bee/working-with-bee/node-types","1a2"),exact:!0,sidebar:"bee"},{path:"/docs/bee/working-with-bee/staking",component:d("/docs/bee/working-with-bee/staking","140"),exact:!0,sidebar:"bee"},{path:"/docs/bee/working-with-bee/swarm-cli",component:d("/docs/bee/working-with-bee/swarm-cli","a95"),exact:!0,sidebar:"bee"},{path:"/docs/bee/working-with-bee/uninstalling-bee",component:d("/docs/bee/working-with-bee/uninstalling-bee","78b"),exact:!0,sidebar:"bee"},{path:"/docs/bee/working-with-bee/upgrading-bee",component:d("/docs/bee/working-with-bee/upgrading-bee","7dc"),exact:!0,sidebar:"bee"},{path:"/docs/concepts/access-control",component:d("/docs/concepts/access-control","eaa"),exact:!0,sidebar:"concepts"},{path:"/docs/concepts/DISC/",component:d("/docs/concepts/DISC/","e48"),exact:!0,sidebar:"concepts"},{path:"/docs/concepts/DISC/erasure-coding",component:d("/docs/concepts/DISC/erasure-coding","4bd"),exact:!0,sidebar:"concepts"},{path:"/docs/concepts/DISC/kademlia",component:d("/docs/concepts/DISC/kademlia","787"),exact:!0,sidebar:"concepts"},{path:"/docs/concepts/DISC/neighborhoods",component:d("/docs/concepts/DISC/neighborhoods","7e5"),exact:!0,sidebar:"concepts"},{path:"/docs/concepts/incentives/bandwidth-incentives",component:d("/docs/concepts/incentives/bandwidth-incentives","b5e"),exact:!0,sidebar:"concepts"},{path:"/docs/concepts/incentives/overview",component:d("/docs/concepts/incentives/overview","048"),exact:!0,sidebar:"concepts"},{path:"/docs/concepts/incentives/postage-stamps",component:d("/docs/concepts/incentives/postage-stamps","738"),exact:!0,sidebar:"concepts"},{path:"/docs/concepts/incentives/price-oracle",component:d("/docs/concepts/incentives/price-oracle","565"),exact:!0,sidebar:"concepts"},{path:"/docs/concepts/incentives/redistribution-game",component:d("/docs/concepts/incentives/redistribution-game","ae4"),exact:!0,sidebar:"concepts"},{path:"/docs/concepts/introduction",component:d("/docs/concepts/introduction","21e"),exact:!0,sidebar:"concepts"},{path:"/docs/concepts/pss",component:d("/docs/concepts/pss","830"),exact:!0,sidebar:"concepts"},{path:"/docs/concepts/what-is-swarm",component:d("/docs/concepts/what-is-swarm","10d"),exact:!0,sidebar:"concepts"},{path:"/docs/desktop/access-content",component:d("/docs/desktop/access-content","7b3"),exact:!0,sidebar:"desktop"},{path:"/docs/desktop/backup-restore",component:d("/docs/desktop/backup-restore","6d6"),exact:!0,sidebar:"desktop"},{path:"/docs/desktop/configuration",component:d("/docs/desktop/configuration","91f"),exact:!0,sidebar:"desktop"},{path:"/docs/desktop/install",component:d("/docs/desktop/install","2cd"),exact:!0,sidebar:"desktop"},{path:"/docs/desktop/introduction",component:d("/docs/desktop/introduction","82b"),exact:!0,sidebar:"desktop"},{path:"/docs/desktop/postage-stamps",component:d("/docs/desktop/postage-stamps","fee"),exact:!0,sidebar:"desktop"},{path:"/docs/desktop/publish-a-website",component:d("/docs/desktop/publish-a-website","3ea"),exact:!0,sidebar:"desktop"},{path:"/docs/desktop/start-a-blog",component:d("/docs/desktop/start-a-blog","437"),exact:!0,sidebar:"desktop"},{path:"/docs/desktop/upload-content",component:d("/docs/desktop/upload-content","ac2"),exact:!0,sidebar:"desktop"},{path:"/docs/develop/act",component:d("/docs/develop/act","d0d"),exact:!0,sidebar:"develop"},{path:"/docs/develop/contribute/introduction",component:d("/docs/develop/contribute/introduction","b91"),exact:!0,sidebar:"develop"},{path:"/docs/develop/contribute/protocols",component:d("/docs/develop/contribute/protocols","384"),exact:!0,sidebar:"develop"},{path:"/docs/develop/dynamic-content",component:d("/docs/develop/dynamic-content","e38"),exact:!0,sidebar:"develop"},{path:"/docs/develop/files",component:d("/docs/develop/files","7b7"),exact:!0,sidebar:"develop"},{path:"/docs/develop/gateway-proxy",component:d("/docs/develop/gateway-proxy","234"),exact:!0,sidebar:"develop"},{path:"/docs/develop/host-your-website",component:d("/docs/develop/host-your-website","eeb"),exact:!0,sidebar:"develop"},{path:"/docs/develop/introduction",component:d("/docs/develop/introduction","6fe"),exact:!0,sidebar:"develop"},{path:"/docs/develop/multi-author-blog",component:d("/docs/develop/multi-author-blog","fae"),exact:!0,sidebar:"develop"},{path:"/docs/develop/resources",component:d("/docs/develop/resources","b3f"),exact:!0,sidebar:"develop"},{path:"/docs/develop/routing",component:d("/docs/develop/routing","97c"),exact:!0,sidebar:"develop"},{path:"/docs/develop/tools-and-features/ai-agent-skills",component:d("/docs/develop/tools-and-features/ai-agent-skills","00f"),exact:!0,sidebar:"develop"},{path:"/docs/develop/tools-and-features/bee-dev-mode",component:d("/docs/develop/tools-and-features/bee-dev-mode","e32"),exact:!0,sidebar:"develop"},{path:"/docs/develop/tools-and-features/bee-js",component:d("/docs/develop/tools-and-features/bee-js","6e7"),exact:!0,sidebar:"develop"},{path:"/docs/develop/tools-and-features/buy-a-stamp-batch",component:d("/docs/develop/tools-and-features/buy-a-stamp-batch","965"),exact:!0,sidebar:"develop"},{path:"/docs/develop/tools-and-features/cheatsheets",component:d("/docs/develop/tools-and-features/cheatsheets","31f"),exact:!0,sidebar:"develop"},{path:"/docs/develop/tools-and-features/chunk-types",component:d("/docs/develop/tools-and-features/chunk-types","73c"),exact:!0,sidebar:"develop"},{path:"/docs/develop/tools-and-features/erasure-coding",component:d("/docs/develop/tools-and-features/erasure-coding","2bf"),exact:!0,sidebar:"develop"},{path:"/docs/develop/tools-and-features/feeds",component:d("/docs/develop/tools-and-features/feeds","aa8"),exact:!0,sidebar:"develop"},{path:"/docs/develop/tools-and-features/gateway-proxy",component:d("/docs/develop/tools-and-features/gateway-proxy","520"),exact:!0,sidebar:"develop"},{path:"/docs/develop/tools-and-features/gsoc",component:d("/docs/develop/tools-and-features/gsoc","211"),exact:!0,sidebar:"develop"},{path:"/docs/develop/tools-and-features/introduction",component:d("/docs/develop/tools-and-features/introduction","2ef"),exact:!0,sidebar:"develop"},{path:"/docs/develop/tools-and-features/manifests",component:d("/docs/develop/tools-and-features/manifests","00f"),exact:!0,sidebar:"develop"},{path:"/docs/develop/tools-and-features/pinning",component:d("/docs/develop/tools-and-features/pinning","eaf"),exact:!0,sidebar:"develop"},{path:"/docs/develop/tools-and-features/pss",component:d("/docs/develop/tools-and-features/pss","ac0"),exact:!0,sidebar:"develop"},{path:"/docs/develop/tools-and-features/starting-a-test-network",component:d("/docs/develop/tools-and-features/starting-a-test-network","387"),exact:!0,sidebar:"develop"},{path:"/docs/develop/tools-and-features/store-with-encryption",component:d("/docs/develop/tools-and-features/store-with-encryption","24c"),exact:!0,sidebar:"develop"},{path:"/docs/develop/ultra-light-nodes",component:d("/docs/develop/ultra-light-nodes","cc6"),exact:!0},{path:"/docs/develop/upload-and-download",component:d("/docs/develop/upload-and-download","d8a"),exact:!0,sidebar:"develop"},{path:"/docs/references/awesome-list",component:d("/docs/references/awesome-list","212"),exact:!0,sidebar:"References"},{path:"/docs/references/community",component:d("/docs/references/community","6cd"),exact:!0,sidebar:"References"},{path:"/docs/references/fair-data-society",component:d("/docs/references/fair-data-society","24c"),exact:!0,sidebar:"References"},{path:"/docs/references/faq",component:d("/docs/references/faq","979"),exact:!0,sidebar:"References"},{path:"/docs/references/glossary",component:d("/docs/references/glossary","577"),exact:!0,sidebar:"References"},{path:"/docs/references/smart-contracts",component:d("/docs/references/smart-contracts","68d"),exact:!0,sidebar:"References"},{path:"/docs/references/tokens",component:d("/docs/references/tokens","dd9"),exact:!0,sidebar:"References"}]}]}]},{path:"/",component:d("/","2e1"),exact:!0},{path:"*",component:d("*")}]},6125(e,t,n){"use strict";n.d(t,{o:()=>a,x:()=>s});var r=n(96540),o=n(74848);const a=r.createContext(!1);function s(e){let t=e.children;const n=(0,r.useState)(!1),s=n[0],i=n[1];return(0,r.useEffect)(()=>{i(!0)},[]),(0,o.jsx)(a.Provider,{value:s,children:t})}},22067(e,t,n){"use strict";var r=n(96540),o=n(5338),a=n(80545),s=n(54625),i=n(4784),l=n(38193);const c=[n(10119),n(26134),n(76294),n(51043),n(7767),n(23390),n(68015)];var u=n(35947),d=n(56347),p=n(22831),f=n(74848);function m(e){let t=e.children;return(0,f.jsx)(f.Fragment,{children:t})}var h=n(14563);const g=e=>e.defaultFormatter(e);function b(e){let t=e.children;return(0,f.jsx)(h.AL,{formatter:g,children:t})}function y(e){let t=e.children;return(0,f.jsx)(b,{children:t})}var v=n(5260),w=n(44586),k=n(86025),S=n(6342),x=n(45500),A=n(32131),T=n(2967),C=n(70440),E=n(41463);function _(){const e=(0,w.A)().i18n,t=e.currentLocale,n=e.defaultLocale,r=e.localeConfigs,o=(0,A.o)(),a=r[t].htmlLang,s=e=>e.replace("-","_");return(0,f.jsxs)(v.A,{children:[Object.entries(r).map(e=>{let t=e[0],n=e[1].htmlLang;return(0,f.jsx)("link",{rel:"alternate",href:o.createUrl({locale:t,fullyQualified:!0}),hrefLang:n},t)}),(0,f.jsx)("link",{rel:"alternate",href:o.createUrl({locale:n,fullyQualified:!0}),hrefLang:"x-default"}),(0,f.jsx)("meta",{property:"og:locale",content:s(a)}),Object.values(r).filter(e=>a!==e.htmlLang).map(e=>(0,f.jsx)("meta",{property:"og:locale:alternate",content:s(e.htmlLang)},"meta-og-"+e.htmlLang))]})}function j(e){let t=e.permalink;const n=(0,w.A)().siteConfig.url,r=function(){const e=(0,w.A)().siteConfig,t=e.url,n=e.baseUrl,r=e.trailingSlash,o=(0,d.zy)().pathname;return t+(0,C.Ks)((0,k.Ay)(o),{trailingSlash:r,baseUrl:n})}(),o=t?""+n+t:r;return(0,f.jsxs)(v.A,{children:[(0,f.jsx)("meta",{property:"og:url",content:o}),(0,f.jsx)("link",{rel:"canonical",href:o})]})}function P(){const e=(0,w.A)().i18n.currentLocale,t=(0,S.p)(),n=t.metadata,r=t.image;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(v.A,{children:[(0,f.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,f.jsx)("body",{})]}),r&&(0,f.jsx)(x.be,{image:r}),(0,f.jsx)(j,{}),(0,f.jsx)(_,{}),(0,f.jsx)(E.A,{tag:T.C,locale:e}),(0,f.jsx)(v.A,{children:n.map((e,t)=>(0,f.jsx)("meta",Object.assign({},e),t))})]})}const R=new Map;var $=n(6125),O=n(26988),D=n(205);function L(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{var r,o;const a=null!=(r=null==(o=t.default)?void 0:o[e])?r:t[e];return null==a?void 0:a(...n)});return()=>o.forEach(e=>null==e?void 0:e())}const I=function(e){let t=e.children,n=e.location,r=e.previousLocation;return(0,D.A)(()=>{r!==n&&(!function(e){let t=e.location,n=e.previousLocation;if(!n)return;const r=t.pathname===n.pathname,o=t.hash===n.hash,a=t.search===n.search;if(r&&o&&!a)return;const s=t.hash;if(s){const e=decodeURIComponent(s.substring(1)),t=document.getElementById(e);null==t||t.scrollIntoView()}else window.scrollTo(0,0)}({location:n,previousLocation:r}),L("onRouteDidUpdate",{previousLocation:r,location:n}))},[r,n]),t};function N(e){const t=Array.from(new Set([e,decodeURI(e)])).map(e=>(0,p.u)(u.A,e)).flat();return Promise.all(t.map(e=>null==e.route.component.preload?void 0:e.route.component.preload()))}class F extends r.Component{constructor(e){super(e),this.previousLocation=void 0,this.routeUpdateCleanupCb=void 0,this.previousLocation=null,this.routeUpdateCleanupCb=l.default.canUseDOM?L("onRouteUpdate",{previousLocation:null,location:this.props.location}):()=>{},this.state={nextRouteHasLoaded:!0}}shouldComponentUpdate(e,t){if(e.location===this.props.location)return t.nextRouteHasLoaded;const n=e.location;return this.previousLocation=this.props.location,this.setState({nextRouteHasLoaded:!1}),this.routeUpdateCleanupCb=L("onRouteUpdate",{previousLocation:this.previousLocation,location:n}),N(n.pathname).then(()=>{this.routeUpdateCleanupCb(),this.setState({nextRouteHasLoaded:!0})}).catch(e=>{console.warn(e),window.location.reload()}),!1}render(){const e=this.props,t=e.children,n=e.location;return(0,f.jsx)(I,{previousLocation:this.previousLocation,location:n,children:(0,f.jsx)(d.qh,{location:n,render:()=>t})})}}const B=F,M="__docusaurus-base-url-issue-banner-suggestion-container";function z(e){return"\ndocument.addEventListener('DOMContentLoaded', function maybeInsertBanner() {\n var shouldInsert = typeof window['docusaurus'] === 'undefined';\n shouldInsert && insertBanner();\n});\n\nfunction insertBanner() {\n var bannerContainer = document.createElement('div');\n bannerContainer.id = '__docusaurus-base-url-issue-banner-container';\n var bannerHtml = "+JSON.stringify(function(e){return'\n
    \n

    Your Docusaurus site did not load properly.

    \n

    A very common reason is a wrong site baseUrl configuration.

    \n

    Current configured baseUrl = '+e+" "+("/"===e?" (default value)":"")+'

    \n

    We suggest trying baseUrl =

    \n
    \n'}(e)).replace(/!0===e.route.exact))return R.set(e.pathname,e.pathname),e;const t=e.pathname.trim().replace(/(?:\/index)?\.html$/,"")||"/";return R.set(e.pathname,t),Object.assign({},e,{pathname:t})}((0,d.zy)());return(0,f.jsx)(B,{location:e,children:K})}function Q(){return(0,f.jsx)(G.A,{children:(0,f.jsx)(O.l,{children:(0,f.jsxs)($.x,{children:[(0,f.jsx)(m,{children:(0,f.jsxs)(y,{children:[(0,f.jsx)(H,{}),(0,f.jsx)(P,{}),(0,f.jsx)(U,{}),(0,f.jsx)(Z,{})]})}),(0,f.jsx)(V,{})]})})})}var Y=n(84054);const X=function(e){try{return document.createElement("link").relList.supports(e)}catch(t){return!1}}("prefetch")?function(e){return new Promise((t,n)=>{var r,o;if("undefined"==typeof document)return void n();const a=document.createElement("link");a.setAttribute("rel","prefetch"),a.setAttribute("href",e),a.onload=()=>t(),a.onerror=()=>n();const s=null!=(r=document.getElementsByTagName("head")[0])?r:null==(o=document.getElementsByName("script")[0])?void 0:o.parentNode;null==s||s.appendChild(a)})}:function(e){return new Promise((t,n)=>{const r=new XMLHttpRequest;r.open("GET",e,!0),r.withCredentials=!0,r.onload=()=>{200===r.status?t():n()},r.send(null)})};var J=n(86921);const ee=new Set,te=new Set,ne=()=>{var e,t;return(null==(e=navigator.connection)?void 0:e.effectiveType.includes("2g"))||(null==(t=navigator.connection)?void 0:t.saveData)},re={prefetch:e=>{if(!(e=>!ne()&&!te.has(e)&&!ee.has(e))(e))return!1;ee.add(e);const t=(0,p.u)(u.A,e).flatMap(e=>{return t=e.route.path,Object.entries(Y).filter(e=>e[0].replace(/-[^-]+$/,"")===t).flatMap(e=>{let t=e[1];return Object.values((0,J.A)(t))});var t});return Promise.all(t.map(e=>{const t=n.gca(e);return t&&!t.includes("undefined")?X(t).catch(()=>{}):Promise.resolve()}))},preload:e=>!!(e=>!ne()&&!te.has(e))(e)&&(te.add(e),N(e))},oe=Object.freeze(re);function ae(e){let t=e.children;return"hash"===i.default.future.experimental_router?(0,f.jsx)(s.I9,{children:t}):(0,f.jsx)(s.Kd,{children:t})}const se=Boolean(!0);if(l.default.canUseDOM){window.docusaurus=oe;const e=document.getElementById("__docusaurus"),t=(0,f.jsx)(a.vd,{children:(0,f.jsx)(ae,{children:(0,f.jsx)(Q,{})})}),n=(e,t)=>{console.error("Docusaurus React Root onRecoverableError:",e,t)},s=()=>{if(window.docusaurusRoot)window.docusaurusRoot.render(t);else if(se)window.docusaurusRoot=o.hydrateRoot(e,t,{onRecoverableError:n});else{const r=o.createRoot(e,{onRecoverableError:n});r.render(t),window.docusaurusRoot=r}};N(window.location.pathname).then(()=>{(0,r.startTransition)(s)})}},26988(e,t,n){"use strict";n.d(t,{o:()=>d,l:()=>p});var r=n(96540),o=n(4784);const a=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"path":"/docs","versions":[{"name":"current","label":"Next","isLast":true,"path":"/docs","mainDocId":"concepts/introduction","docs":[{"id":"bee/bee-faq","path":"/docs/bee/bee-faq","sidebar":"bee"},{"id":"bee/installation/build-from-source","path":"/docs/bee/installation/build-from-source","sidebar":"bee"},{"id":"bee/installation/connectivity","path":"/docs/bee/installation/connectivity","sidebar":"bee"},{"id":"bee/installation/docker","path":"/docs/bee/installation/docker","sidebar":"bee"},{"id":"bee/installation/fund-your-node","path":"/docs/bee/installation/fund-your-node","sidebar":"bee"},{"id":"bee/installation/getting-started","path":"/docs/bee/installation/getting-started","sidebar":"bee"},{"id":"bee/installation/hive","path":"/docs/bee/installation/hive","sidebar":"bee"},{"id":"bee/installation/package-manager-install","path":"/docs/bee/installation/package-manager-install","sidebar":"bee"},{"id":"bee/installation/quick-start","path":"/docs/bee/installation/quick-start","sidebar":"bee"},{"id":"bee/installation/set-target-neighborhood","path":"/docs/bee/installation/set-target-neighborhood","sidebar":"bee"},{"id":"bee/installation/shell-script-install","path":"/docs/bee/installation/shell-script-install","sidebar":"bee"},{"id":"bee/working-with-bee/backups","path":"/docs/bee/working-with-bee/backups","sidebar":"bee"},{"id":"bee/working-with-bee/bcrypt","path":"/docs/bee/working-with-bee/bcrypt"},{"id":"bee/working-with-bee/bee-api","path":"/docs/bee/working-with-bee/bee-api","sidebar":"bee"},{"id":"bee/working-with-bee/cashing-out","path":"/docs/bee/working-with-bee/cashing-out","sidebar":"bee"},{"id":"bee/working-with-bee/configuration","path":"/docs/bee/working-with-bee/configuration","sidebar":"bee"},{"id":"bee/working-with-bee/introduction","path":"/docs/bee/working-with-bee/introduction","sidebar":"bee"},{"id":"bee/working-with-bee/logs-and-files","path":"/docs/bee/working-with-bee/logs-and-files","sidebar":"bee"},{"id":"bee/working-with-bee/monitoring","path":"/docs/bee/working-with-bee/monitoring","sidebar":"bee"},{"id":"bee/working-with-bee/node-types","path":"/docs/bee/working-with-bee/node-types","sidebar":"bee"},{"id":"bee/working-with-bee/staking","path":"/docs/bee/working-with-bee/staking","sidebar":"bee"},{"id":"bee/working-with-bee/swarm-cli","path":"/docs/bee/working-with-bee/swarm-cli","sidebar":"bee"},{"id":"bee/working-with-bee/uninstalling-bee","path":"/docs/bee/working-with-bee/uninstalling-bee","sidebar":"bee"},{"id":"bee/working-with-bee/upgrading-bee","path":"/docs/bee/working-with-bee/upgrading-bee","sidebar":"bee"},{"id":"concepts/access-control","path":"/docs/concepts/access-control","sidebar":"concepts"},{"id":"concepts/DISC/disc","path":"/docs/concepts/DISC/","sidebar":"concepts"},{"id":"concepts/DISC/erasure-coding","path":"/docs/concepts/DISC/erasure-coding","sidebar":"concepts"},{"id":"concepts/DISC/kademlia","path":"/docs/concepts/DISC/kademlia","sidebar":"concepts"},{"id":"concepts/DISC/neighborhoods","path":"/docs/concepts/DISC/neighborhoods","sidebar":"concepts"},{"id":"concepts/incentives/bandwidth-incentives","path":"/docs/concepts/incentives/bandwidth-incentives","sidebar":"concepts"},{"id":"concepts/incentives/overview","path":"/docs/concepts/incentives/overview","sidebar":"concepts"},{"id":"concepts/incentives/postage-stamps","path":"/docs/concepts/incentives/postage-stamps","sidebar":"concepts"},{"id":"concepts/incentives/price-oracle","path":"/docs/concepts/incentives/price-oracle","sidebar":"concepts"},{"id":"concepts/incentives/redistribution-game","path":"/docs/concepts/incentives/redistribution-game","sidebar":"concepts"},{"id":"concepts/introduction","path":"/docs/concepts/introduction","sidebar":"concepts"},{"id":"concepts/pss","path":"/docs/concepts/pss","sidebar":"concepts"},{"id":"concepts/what-is-swarm","path":"/docs/concepts/what-is-swarm","sidebar":"concepts"},{"id":"desktop/access-content","path":"/docs/desktop/access-content","sidebar":"desktop"},{"id":"desktop/backup-restore","path":"/docs/desktop/backup-restore","sidebar":"desktop"},{"id":"desktop/configuration","path":"/docs/desktop/configuration","sidebar":"desktop"},{"id":"desktop/install","path":"/docs/desktop/install","sidebar":"desktop"},{"id":"desktop/introduction","path":"/docs/desktop/introduction","sidebar":"desktop"},{"id":"desktop/postage-stamps","path":"/docs/desktop/postage-stamps","sidebar":"desktop"},{"id":"desktop/publish-a-website","path":"/docs/desktop/publish-a-website","sidebar":"desktop"},{"id":"desktop/start-a-blog","path":"/docs/desktop/start-a-blog","sidebar":"desktop"},{"id":"desktop/upload-content","path":"/docs/desktop/upload-content","sidebar":"desktop"},{"id":"develop/act","path":"/docs/develop/act","sidebar":"develop"},{"id":"develop/contribute/introduction","path":"/docs/develop/contribute/introduction","sidebar":"develop"},{"id":"develop/contribute/protocols","path":"/docs/develop/contribute/protocols","sidebar":"develop"},{"id":"develop/dynamic-content","path":"/docs/develop/dynamic-content","sidebar":"develop"},{"id":"develop/files","path":"/docs/develop/files","sidebar":"develop"},{"id":"develop/gateway-proxy","path":"/docs/develop/gateway-proxy","sidebar":"develop"},{"id":"develop/host-your-website","path":"/docs/develop/host-your-website","sidebar":"develop"},{"id":"develop/introduction","path":"/docs/develop/introduction","sidebar":"develop"},{"id":"develop/multi-author-blog","path":"/docs/develop/multi-author-blog","sidebar":"develop"},{"id":"develop/resources","path":"/docs/develop/resources","sidebar":"develop"},{"id":"develop/routing","path":"/docs/develop/routing","sidebar":"develop"},{"id":"develop/tools-and-features/ai-agent-skills","path":"/docs/develop/tools-and-features/ai-agent-skills","sidebar":"develop"},{"id":"develop/tools-and-features/bee-dev-mode","path":"/docs/develop/tools-and-features/bee-dev-mode","sidebar":"develop"},{"id":"develop/tools-and-features/bee-js","path":"/docs/develop/tools-and-features/bee-js","sidebar":"develop"},{"id":"develop/tools-and-features/buy-a-stamp-batch","path":"/docs/develop/tools-and-features/buy-a-stamp-batch","sidebar":"develop"},{"id":"develop/tools-and-features/cheatsheets","path":"/docs/develop/tools-and-features/cheatsheets","sidebar":"develop"},{"id":"develop/tools-and-features/chunk-types","path":"/docs/develop/tools-and-features/chunk-types","sidebar":"develop"},{"id":"develop/tools-and-features/erasure-coding","path":"/docs/develop/tools-and-features/erasure-coding","sidebar":"develop"},{"id":"develop/tools-and-features/feeds","path":"/docs/develop/tools-and-features/feeds","sidebar":"develop"},{"id":"develop/tools-and-features/gateway-proxy","path":"/docs/develop/tools-and-features/gateway-proxy","sidebar":"develop"},{"id":"develop/tools-and-features/gsoc","path":"/docs/develop/tools-and-features/gsoc","sidebar":"develop"},{"id":"develop/tools-and-features/introduction","path":"/docs/develop/tools-and-features/introduction","sidebar":"develop"},{"id":"develop/tools-and-features/manifests","path":"/docs/develop/tools-and-features/manifests","sidebar":"develop"},{"id":"develop/tools-and-features/pinning","path":"/docs/develop/tools-and-features/pinning","sidebar":"develop"},{"id":"develop/tools-and-features/pss","path":"/docs/develop/tools-and-features/pss","sidebar":"develop"},{"id":"develop/tools-and-features/starting-a-test-network","path":"/docs/develop/tools-and-features/starting-a-test-network","sidebar":"develop"},{"id":"develop/tools-and-features/store-with-encryption","path":"/docs/develop/tools-and-features/store-with-encryption","sidebar":"develop"},{"id":"develop/ultra-light-nodes","path":"/docs/develop/ultra-light-nodes"},{"id":"develop/upload-and-download","path":"/docs/develop/upload-and-download","sidebar":"develop"},{"id":"references/awesome-list","path":"/docs/references/awesome-list","sidebar":"References"},{"id":"references/community","path":"/docs/references/community","sidebar":"References"},{"id":"references/fair-data-society","path":"/docs/references/fair-data-society","sidebar":"References"},{"id":"references/faq","path":"/docs/references/faq","sidebar":"References"},{"id":"references/glossary","path":"/docs/references/glossary","sidebar":"References"},{"id":"references/smart-contracts","path":"/docs/references/smart-contracts","sidebar":"References"},{"id":"references/tokens","path":"/docs/references/tokens","sidebar":"References"}],"draftIds":[],"sidebars":{"concepts":{"link":{"path":"/docs/concepts/introduction","label":"concepts/introduction"}},"desktop":{"link":{"path":"/docs/desktop/introduction","label":"desktop/introduction"}},"bee":{"link":{"path":"/docs/bee/installation/getting-started","label":"bee/installation/getting-started"}},"develop":{"link":{"path":"/docs/develop/introduction","label":"develop/introduction"}},"References":{"link":{"path":"/docs/references/smart-contracts","label":"references/smart-contracts"}}}}],"breadcrumbs":true}},"docusaurus-plugin-redoc":{"plugin-redoc-0":{"url":"redocusaurus/plugin-redoc-0.yaml","themeId":"theme-redoc","isSpecFile":true,"normalizeUrl":true,"spec":{"openapi":"3.0.3","info":{"version":"8.1.0","title":"Bee API","description":"API endpoints for interacting with the Swarm network, supporting file operations, messaging, and node management"},"externalDocs":{"description":"Browse the documentation at the Swarm Docs","url":"https://docs.ethswarm.org"},"servers":[{"url":"http://{apiRoot}:{port}/v1","variables":{"apiRoot":{"default":"localhost","description":"Base address of the local bee node main API"},"port":{"default":"1633","description":"Service port provided in bee node config"}}},{"url":"http://{apiRoot}:{port}","variables":{"apiRoot":{"default":"localhost","description":"Base address of the local bee node main API"},"port":{"default":"1633","description":"Service port provided in bee node config"}}}],"paths":{"/grantee":{"post":{"summary":"Create a grantee list","tags":["ACT"],"parameters":[{"in":"header","schema":{"$ref":"#/components/schemas/SwarmPostageBatchId"},"name":"swarm-postage-batch-id","required":true},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmTagParameter"},"name":"swarm-tag","required":false},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmPinParameter"},"name":"swarm-pin","required":false},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmDeferredUpload"},"name":"swarm-deferred-upload","required":false},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmActHistoryAddress"},"name":"swarm-act-history-address","required":false},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmRedundancyLevelParameter"},"name":"swarm-redundancy-level","required":false}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActGranteesCreateRequest"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActGranteesOperationResponse"}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"}}}},"/grantee/{address}":{"get":{"summary":"Get the grantee list","tags":["ACT"],"parameters":[{"in":"path","name":"address","schema":{"$ref":"#/components/schemas/SwarmEncryptedReference"},"required":true,"description":"Grantee list reference"},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmRedundancyLevelParameter"},"name":"swarm-redundancy-level","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicKey"}}}}},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}},"patch":{"summary":"Update the grantee list","description":"Add or remove grantees from an existing grantee list","tags":["ACT"],"parameters":[{"in":"path","name":"address","schema":{"$ref":"#/components/schemas/SwarmEncryptedReference"},"required":true,"description":"Grantee list reference"},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmActHistoryAddress"},"name":"swarm-act-history-address","required":true},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmPostageBatchId"},"name":"swarm-postage-batch-id","required":true},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmTagParameter"},"name":"swarm-tag","required":false},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmPinParameter"},"name":"swarm-pin","required":false},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmDeferredUpload"},"name":"swarm-deferred-upload","required":false},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmRedundancyLevelParameter"},"name":"swarm-redundancy-level","required":false}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActGranteesPatchRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActGranteesOperationResponse"}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"}}}},"/bytes":{"post":{"summary":"Upload data","tags":["Bytes"],"parameters":[{"$ref":"#/components/parameters/SwarmPostageBatchId"},{"$ref":"#/components/parameters/SwarmTagParameter"},{"$ref":"#/components/parameters/SwarmPinParameter"},{"$ref":"#/components/parameters/SwarmDeferredUpload"},{"$ref":"#/components/parameters/SwarmEncryptParameter"},{"$ref":"#/components/parameters/SwarmRedundancyLevelParameter"},{"$ref":"#/components/parameters/SwarmAct"},{"$ref":"#/components/parameters/SwarmActHistoryAddress"}],"requestBody":{"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"OK","headers":{"swarm-tag":{"$ref":"#/components/headers/SwarmTag"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceResponse"}}}},"400":{"$ref":"#/components/responses/400"},"402":{"$ref":"#/components/responses/402"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/bytes/{address}":{"get":{"summary":"Retrieve data by reference","tags":["Bytes"],"parameters":[{"in":"path","name":"address","schema":{"$ref":"#/components/schemas/SwarmReference"},"required":true,"description":"Swarm address reference to content"},{"$ref":"#/components/parameters/SwarmCache"},{"$ref":"#/components/parameters/SwarmRedundancyStrategyParameter"},{"$ref":"#/components/parameters/SwarmRedundancyFallbackModeParameter"},{"$ref":"#/components/parameters/SwarmRedundancyLevelParameter"},{"$ref":"#/components/parameters/SwarmChunkRetrievalTimeoutParameter"},{"$ref":"#/components/parameters/SwarmLookaheadBufferSizeParameter"},{"$ref":"#/components/parameters/SwarmActTimestamp"},{"$ref":"#/components/parameters/SwarmActPublisher"},{"$ref":"#/components/parameters/SwarmActHistoryAddress"}],"responses":{"200":{"description":"Retrieved content specified by reference","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/400"},"default":{"description":"Default response"}}},"head":{"summary":"Retrieve headers containing the content type and length for the reference","tags":["Bytes"],"parameters":[{"in":"path","name":"address","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":true,"description":"Swarm address of chunk"},{"$ref":"#/components/parameters/SwarmActTimestamp"},{"$ref":"#/components/parameters/SwarmActPublisher"},{"$ref":"#/components/parameters/SwarmActHistoryAddress"}],"responses":{"200":{"description":"The chunk exists.","headers":{"Content-Type":{"description":"The MIME type of the resource (e.g., application/octet-stream).","schema":{"type":"string","example":"application/octet-stream"}},"Content-Length":{"description":"The size of the chunk in bytes.","schema":{"type":"integer","example":1024}},"Access-Control-Expose-Headers":{"description":"Headers exposed for CORS.","schema":{"type":"string","example":"Accept-Ranges, Content-Encoding"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"default":{"description":"Default response"}}}},"/chunks":{"post":{"summary":"Upload a chunk","tags":["Chunk"],"parameters":[{"$ref":"#/components/parameters/SwarmTagParameter"},{"in":"header","name":"swarm-postage-batch-id","schema":{"$ref":"#/components/schemas/SwarmPostageBatchId"},"required":false},{"$ref":"#/components/parameters/SwarmPostageStamp"},{"$ref":"#/components/parameters/SwarmAct"},{"$ref":"#/components/parameters/SwarmActHistoryAddress"}],"requestBody":{"description":"Chunk binary data containing at least 8 bytes.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"OK","headers":{"swarm-tag":{"description":"Tag UID from the request `swarm-tag` header if provided.","schema":{"$ref":"#/components/schemas/Uid"}},"swarm-act-history-address":{"$ref":"#/components/headers/SwarmActHistoryAddress"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceResponse"}}}},"400":{"$ref":"#/components/responses/400"},"402":{"$ref":"#/components/responses/402"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/chunks/stream":{"get":{"summary":"Stream chunks for upload","description":"Establishes a WebSocket connection for streaming chunks. Each uploaded chunk receives a binary acknowledgment (`0`). Chunks are sent as binary messages. When a tag is specified, chunks are stored locally and uploaded to the network after the stream closes. Without a tag, chunks are directly uploaded to the network as they arrive.","tags":["Chunk"],"parameters":[{"$ref":"#/components/parameters/SwarmTagParameter"},{"in":"query","name":"swarm-tag","schema":{"$ref":"#/components/schemas/Uid"},"required":false,"description":"Associate upload with an existing Tag UID (use when WebSocket client cannot set custom headers)"},{"in":"header","name":"swarm-postage-batch-id","description":"ID of Postage Batch that is used to upload data with. Optional when chunks include pre-signed postage stamps.","required":false,"schema":{"$ref":"#/components/schemas/SwarmAddress"}}],"responses":{"200":{"description":"Connection established"},"400":{"$ref":"#/components/responses/400"},"default":{"description":"Default response"}}}},"/bzz":{"post":{"summary":"Upload a file or collection of files","description":"Upload single files or collections of files. For a single file, `Content-Type` is optional: when present it is stored as metadata as-is; when absent the server infers a type from the start of the body. To upload a collection, send a multipart request with files in the form data with appropriate headers. Tar files can be uploaded with the `swarm-collection` header to extract and upload the directory structure. Without the `swarm-collection` header, requests are treated as single file uploads. Multipart requests are always treated as collections; use the `swarm-index-document` header to specify a single file to serve.","tags":["BZZ"],"parameters":[{"in":"query","name":"name","schema":{"$ref":"#/components/schemas/FileName"},"required":false,"description":"Filename when uploading single file"},{"$ref":"#/components/parameters/SwarmTagParameter"},{"$ref":"#/components/parameters/SwarmPinParameter"},{"$ref":"#/components/parameters/SwarmEncryptParameter"},{"$ref":"#/components/parameters/ContentTypePreserved"},{"$ref":"#/components/parameters/SwarmCollection"},{"$ref":"#/components/parameters/SwarmIndexDocumentParameter"},{"$ref":"#/components/parameters/SwarmErrorDocumentParameter"},{"$ref":"#/components/parameters/SwarmPostageBatchId"},{"$ref":"#/components/parameters/SwarmDeferredUpload"},{"$ref":"#/components/parameters/SwarmRedundancyLevelParameter"},{"$ref":"#/components/parameters/SwarmAct"},{"$ref":"#/components/parameters/SwarmActHistoryAddress"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"type":"array","items":{"type":"string","format":"binary"}}}}},"application/octet-stream":{"schema":{"type":"string","format":"binary"}},"application/x-tar":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"OK","headers":{"swarm-tag":{"$ref":"#/components/headers/SwarmTag"},"etag":{"$ref":"#/components/headers/ETag"},"swarm-act-history-address":{"$ref":"#/components/headers/SwarmActHistoryAddress"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceResponse"}}}},"400":{"$ref":"#/components/responses/400"},"402":{"$ref":"#/components/responses/402"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/bzz/{address}":{"get":{"summary":"Retrieve a file or index document from a collection","tags":["BZZ"],"parameters":[{"in":"path","name":"address","schema":{"$ref":"#/components/schemas/SwarmReference"},"required":true,"description":"Swarm address of content"},{"$ref":"#/components/parameters/SwarmCache"},{"$ref":"#/components/parameters/SwarmRedundancyStrategyParameter"},{"$ref":"#/components/parameters/SwarmRedundancyFallbackModeParameter"},{"$ref":"#/components/parameters/SwarmRedundancyLevelParameter"},{"$ref":"#/components/parameters/SwarmChunkRetrievalTimeoutParameter"},{"$ref":"#/components/parameters/SwarmLookaheadBufferSizeParameter"},{"$ref":"#/components/parameters/SwarmActTimestamp"},{"$ref":"#/components/parameters/SwarmActPublisher"},{"$ref":"#/components/parameters/SwarmActHistoryAddress"}],"responses":{"200":{"description":"OK","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}},"headers":{"swarm-feed-resolved-version":{"$ref":"#/components/headers/SwarmFeedResolvedVersion"}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"head":{"summary":"Retrieve headers with content type and length for the reference","tags":["BZZ"],"parameters":[{"in":"path","name":"address","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":true,"description":"Swarm address of chunk"},{"$ref":"#/components/parameters/SwarmActTimestamp"},{"$ref":"#/components/parameters/SwarmActPublisher"},{"$ref":"#/components/parameters/SwarmActHistoryAddress"}],"responses":{"200":{"description":"Chunk exists"},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"default":{"description":"Default response"}}}},"/bzz/{address}/{path}":{"get":{"summary":"Retrieve a file from a collection by path","tags":["BZZ"],"parameters":[{"in":"path","name":"address","schema":{"$ref":"#/components/schemas/SwarmReference"},"required":true,"description":"Swarm address of content"},{"in":"path","name":"path","schema":{"type":"string"},"required":true,"description":"Path to the file in the collection."},{"$ref":"#/components/parameters/SwarmRedundancyStrategyParameter"},{"$ref":"#/components/parameters/SwarmRedundancyFallbackModeParameter"},{"$ref":"#/components/parameters/SwarmChunkRetrievalTimeoutParameter"},{"$ref":"#/components/parameters/SwarmRedundancyLevelParameter"},{"$ref":"#/components/parameters/SwarmCache"},{"$ref":"#/components/parameters/SwarmLookaheadBufferSizeParameter"}],"responses":{"200":{"description":"OK","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}},"headers":{"swarm-feed-resolved-version":{"$ref":"#/components/headers/SwarmFeedResolvedVersion"}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/tags":{"get":{"summary":"Get list of tags","tags":["Tag"],"parameters":[{"in":"query","name":"offset","schema":{"type":"integer","minimum":0,"default":0},"required":false,"description":"The number of items to skip before starting to collect the result set."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":1000,"default":100},"required":false,"description":"The numbers of items to return."}],"responses":{"200":{"description":"List of tags","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagsList"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"post":{"summary":"Create Tag","tags":["Tag"],"description":"Tags can be thought of as upload sessions which can be tracked using the tags endpoint. It will keep track of the chunks that are uploaded as part of the tag and will push them out to the network once a done split is called on the Tag. This happens internally if you use the `Swarm-Deferred-Upload` header.","responses":{"201":{"description":"New Tag Info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewTagResponse"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/tags/{id}":{"get":{"summary":"Get Tag information using Uid","tags":["Tag"],"parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/Uid"},"required":true,"description":"Uid"}],"responses":{"200":{"description":"Tag info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewTagResponse"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"delete":{"summary":"Delete Tag information using Uid","tags":["Tag"],"parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/Uid"},"required":true,"description":"Uid"}],"responses":{"204":{"$ref":"#/components/responses/204"},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"patch":{"summary":"Update Total Count and swarm hash for a tag of an input stream of unknown size using Uid","tags":["Tag"],"parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/Uid"},"required":true,"description":"Uid"}],"requestBody":{"description":"Can contain swarm hash to use for the tag","required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Address"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/pins/{reference}":{"parameters":[{"in":"path","name":"reference","schema":{"$ref":"#/components/schemas/SwarmOnlyReference"},"required":true,"description":"Swarm reference of the root hash"}],"post":{"summary":"Pin a root hash by reference","tags":["Pinning"],"parameters":[{"in":"header","schema":{"$ref":"#/components/schemas/SwarmRedundancyLevelParameter"},"name":"swarm-redundancy-level","required":false}],"responses":{"200":{"description":"Pin already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"201":{"description":"New pin with root reference was created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"delete":{"summary":"Unpin a root hash by reference","tags":["Pinning"],"responses":{"200":{"description":"Root hash has been unpinned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"get":{"summary":"Get the pinning status of a root hash","tags":["Pinning"],"responses":{"200":{"description":"The pinned root hash reference","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwarmOnlyReference"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/pins":{"get":{"summary":"Get the list of pinned root hash references","tags":["Pinning"],"responses":{"200":{"description":"List of pinned root hash references","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwarmOnlyReferencesList"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/pins/check":{"get":{"summary":"Validate pinned chunks integrity","description":"Returns a stream of newline-delimited JSON objects (NDJSON), one per pinned reference checked.\\nThe response uses chunked transfer encoding; clients should parse each line as an independent\\n`PinIntegrityResponse` object rather than buffering the body into a single JSON value.\\n","tags":["Pinning"],"parameters":[{"in":"query","name":"ref","schema":{"$ref":"#/components/schemas/SwarmOnlyReference"},"required":false,"description":"Optional reference to check; if not provided, all pinned references are checked"}],"responses":{"200":{"description":"NDJSON stream of integrity results, one object per line","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PinCheckResponse"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/pss/send/{topic}/{targets}":{"post":{"summary":"Send a message using the Postal Service for Swarm","tags":["Postal Service for Swarm"],"parameters":[{"in":"path","name":"topic","schema":{"$ref":"#/components/schemas/PssTopic"},"required":true,"description":"Topic name"},{"in":"path","name":"targets","schema":{"$ref":"#/components/schemas/PssTargets"},"required":true,"description":"Target message address prefix. If multiple targets are specified, only one would be matched."},{"in":"query","name":"recipient","schema":{"$ref":"#/components/schemas/PssRecipient"},"required":false,"description":"Recipient publickey"},{"$ref":"#/components/parameters/SwarmPostageBatchId"}],"responses":{"201":{"description":"Subscribed to topic"},"400":{"$ref":"#/components/responses/400"},"402":{"$ref":"#/components/responses/402"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/pss/subscribe/{topic}":{"get":{"summary":"Subscribe to messages on a topic","tags":["Postal Service for Swarm"],"parameters":[{"in":"path","name":"topic","schema":{"$ref":"#/components/schemas/PssTopic"},"required":true,"description":"Topic name"}],"responses":{"200":{"description":"Establishes a WebSocket subscription for incoming messages on the topic"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/gsoc/subscribe/{address}":{"get":{"summary":"Subscribe to GSOC payloads","tags":["GSOC"],"parameters":[{"in":"path","name":"address","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":true,"description":"Single Owner Chunk address (which may have multiple payloads)"}],"responses":{"200":{"description":"Establishes a WebSocket subscription for incoming messages on the Single Owner Chunk address"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/soc/{owner}/{id}":{"post":{"summary":"Upload a Single Owner Chunk","tags":["Single owner chunk"],"parameters":[{"in":"path","name":"owner","schema":{"$ref":"#/components/schemas/EthereumAddress"},"required":true,"description":"Ethereum address of the chunk owner"},{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/HexString"},"required":true,"description":"Unique identifier for the chunk"},{"in":"query","name":"sig","schema":{"$ref":"#/components/schemas/HexString"},"required":true,"description":"Signature"},{"in":"header","name":"swarm-postage-batch-id","schema":{"$ref":"#/components/schemas/SwarmPostageBatchId"},"required":false,"description":"ID of the postage batch to use. Either this or `swarm-postage-stamp` must be supplied."},{"$ref":"#/components/parameters/SwarmPostageStamp"},{"$ref":"#/components/parameters/SwarmTagParameter"},{"$ref":"#/components/parameters/SwarmPinParameter"},{"$ref":"#/components/parameters/SwarmDeferredUpload"},{"$ref":"#/components/parameters/SwarmAct"},{"$ref":"#/components/parameters/SwarmActHistoryAddress"}],"requestBody":{"required":true,"description":"The SOC binary data, composed of the span (8 bytes) and up to 4KB of payload.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceResponse"}}},"headers":{"swarm-tag":{"description":"Tag UID, returned when an upload session is in use (either because `swarm-tag` was supplied, `swarm-deferred-upload` requested deferred mode, or `swarm-pin` was set).","schema":{"$ref":"#/components/schemas/Uid"}},"swarm-act-history-address":{"$ref":"#/components/headers/SwarmActHistoryAddress"}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"402":{"$ref":"#/components/responses/402"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"get":{"summary":"Retrieve Single Owner Chunk data","tags":["Single owner chunk"],"parameters":[{"in":"path","name":"owner","schema":{"$ref":"#/components/schemas/EthereumAddress"},"required":true,"description":"Ethereum address of the Owner of the SOC"},{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/HexString"},"required":true,"description":"Unique identifier for the chunk data"},{"$ref":"#/components/parameters/SwarmOnlyRootChunkParameter"},{"$ref":"#/components/parameters/SwarmCache"},{"$ref":"#/components/parameters/SwarmRedundancyStrategyParameter"},{"$ref":"#/components/parameters/SwarmRedundancyFallbackModeParameter"},{"$ref":"#/components/parameters/SwarmChunkRetrievalTimeoutParameter"}],"responses":{"200":{"description":"Related Single Owner Chunk data","headers":{"swarm-soc-signature":{"$ref":"#/components/headers/SwarmSocSignature"}},"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/feeds/{owner}/{topic}":{"post":{"summary":"Create a feed root manifest","tags":["Feed"],"parameters":[{"in":"path","name":"owner","schema":{"$ref":"#/components/schemas/EthereumAddress"},"required":true,"description":"Ethereum address of the feed owner"},{"in":"path","name":"topic","schema":{"$ref":"#/components/schemas/HexString"},"required":true,"description":"Topic identifier for the feed"},{"in":"query","name":"type","schema":{"$ref":"#/components/schemas/FeedType"},"required":false,"description":"Feed indexing scheme (default: sequence)"},{"$ref":"#/components/parameters/SwarmPinParameter"},{"$ref":"#/components/parameters/SwarmPostageBatchId"},{"$ref":"#/components/parameters/SwarmAct"},{"$ref":"#/components/parameters/SwarmActHistoryAddress"},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmRedundancyLevelParameter"},"name":"swarm-redundancy-level","required":false,"description":"Redundancy level for the feed manifest upload pipeline and ACT encryption"}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceResponse"}}},"headers":{"swarm-act-history-address":{"$ref":"#/components/headers/SwarmActHistoryAddress"}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"402":{"$ref":"#/components/responses/402"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"get":{"summary":"Retrieve the latest feed update","tags":["Feed"],"parameters":[{"in":"path","name":"owner","schema":{"$ref":"#/components/schemas/EthereumAddress"},"required":true,"description":"Ethereum address of the feed owner"},{"in":"path","name":"topic","schema":{"$ref":"#/components/schemas/HexString"},"required":true,"description":"Topic identifier for the feed"},{"in":"query","name":"at","schema":{"type":"integer"},"required":false,"description":"Timestamp of the update (default: now)"},{"in":"query","name":"after","schema":{"type":"integer"},"required":false,"description":"Start index (default: 0)"},{"in":"query","name":"type","schema":{"$ref":"#/components/schemas/FeedType"},"required":false,"description":"Feed indexing scheme (default: sequence)"},{"$ref":"#/components/parameters/SwarmOnlyRootChunkParameter"},{"$ref":"#/components/parameters/SwarmCache"},{"$ref":"#/components/parameters/SwarmRedundancyStrategyParameter"},{"$ref":"#/components/parameters/SwarmRedundancyFallbackModeParameter"},{"$ref":"#/components/parameters/SwarmChunkRetrievalTimeoutParameter"}],"responses":{"200":{"description":"Latest feed update","headers":{"swarm-soc-signature":{"$ref":"#/components/headers/SwarmSocSignature"},"swarm-feed-index":{"$ref":"#/components/headers/SwarmFeedIndex"},"swarm-feed-index-next":{"$ref":"#/components/headers/SwarmFeedIndexNext"},"swarm-feed-resolved-version":{"$ref":"#/components/headers/SwarmFeedResolvedVersion"}},"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/stewardship/{address}":{"get":{"summary":"Check content availability","tags":["Stewardship"],"parameters":[{"in":"path","name":"address","schema":{"$ref":"#/components/schemas/SwarmReference"},"required":true,"description":"Root hash of content (can be of any type: collection, file, chunk)"},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmRedundancyLevelParameter"},"name":"swarm-redundancy-level","required":false}],"responses":{"200":{"description":"Returns if the content is retrievable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IsRetrievableResponse"}}}},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"put":{"summary":"Re-upload content by reference","tags":["Stewardship"],"parameters":[{"in":"path","name":"address","schema":{"$ref":"#/components/schemas/SwarmReference"},"required":true,"description":"Re-uploads content for specified root hash (can be of any type: collection, file, chunk, etc.)"},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmPostageBatchId"},"name":"swarm-postage-batch-id","required":true,"description":"Postage batch to use for re-upload. The chunks are re-stamped with this batch."},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmRedundancyLevelParameter"},"name":"swarm-redundancy-level","required":false}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/addresses":{"get":{"summary":"Get overlay and underlay addresses of the node","tags":["Connectivity"],"responses":{"200":{"description":"Own node underlay and overlay addresses","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Addresses"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/health":{"get":{"summary":"Get the overall health status of the node","description":"Health Status will indicate node healthiness.\\n\\nIf node is unhealthy please check node logs for errors.\\n","tags":["Status"],"responses":{"200":{"description":"Health Status of node","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}},"default":{"description":"Default response"}}}},"/readiness":{"get":{"summary":"Check if the node is ready to accept traffic","tags":["Status"],"responses":{"200":{"description":"Indicates that node is ready","$ref":"#/components/responses/200"},"400":{"description":"Indicates that node is not ready","$ref":"#/components/responses/400"},"default":{"description":"Default response"}}}},"/balances":{"get":{"summary":"Get balances with all known peers","tags":["Balance"],"responses":{"200":{"description":"Own balances with all known peers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Balances"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/balances/{peer}":{"get":{"summary":"Get the balance with a specific peer","tags":["Balance"],"parameters":[{"in":"path","name":"peer","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":true,"description":"Swarm address of peer"}],"responses":{"200":{"description":"Balance with the specific peer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Balance"}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/blocklist":{"get":{"summary":"Get a list of blocklisted peers","tags":["Connectivity"],"responses":{"200":{"description":"Returns overlay addresses of blocklisted peers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockListedPeers"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/consumed":{"get":{"summary":"Get past due consumption balances with all known peers","tags":["Balance"],"responses":{"200":{"description":"Own past due consumption balances with all known peers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Balances"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/consumed/{peer}":{"get":{"summary":"Get past due consumption balance with a specific peer","tags":["Balance"],"parameters":[{"in":"path","name":"peer","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":true,"description":"Swarm address of peer"}],"responses":{"200":{"description":"Past-due consumption balance with the specific peer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Balance"}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/chequebook/address":{"get":{"summary":"Get the chequebook contract address","tags":["Chequebook"],"responses":{"200":{"description":"Ethereum address of chequebook contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChequebookAddress"}}}}}}},"/chequebook/balance":{"get":{"summary":"Get the balance of the chequebook","tags":["Chequebook"],"responses":{"200":{"description":"Balance of the chequebook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChequebookBalance"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/chunks/{address}":{"get":{"summary":"Retrieve a chunk","tags":["Chunk"],"parameters":[{"in":"path","name":"address","schema":{"$ref":"#/components/schemas/SwarmReference"},"required":true,"description":"Swarm address of chunk"},{"in":"header","schema":{"$ref":"#/components/schemas/SwarmCache"},"name":"swarm-cache","required":false},{"$ref":"#/components/parameters/SwarmActTimestamp"},{"$ref":"#/components/parameters/SwarmActPublisher"},{"$ref":"#/components/parameters/SwarmActHistoryAddress"}],"responses":{"200":{"description":"Retrieved chunk content","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"head":{"summary":"Check if a chunk exists locally","tags":["Chunk"],"parameters":[{"in":"path","name":"address","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":true,"description":"Swarm address of chunk"},{"$ref":"#/components/parameters/SwarmActTimestamp"},{"$ref":"#/components/parameters/SwarmActPublisher"},{"$ref":"#/components/parameters/SwarmActHistoryAddress"}],"responses":{"200":{"description":"Chunk exists"},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"default":{"description":"Default response"}}}},"/envelope/{address}":{"post":{"summary":"Create a postage stamp for a chunk","tags":["Envelope"],"parameters":[{"in":"path","name":"address","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":true,"description":"Swarm address of the chunk to stamp"},{"in":"header","name":"swarm-postage-batch-id","schema":{"$ref":"#/components/schemas/SwarmPostageBatchId"},"required":true}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostEnvelopeResponse"}}}},"400":{"$ref":"#/components/responses/400"},"402":{"$ref":"#/components/responses/402"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/connect/{multi-address}":{"post":{"summary":"Connect to a peer address","tags":["Connectivity"],"parameters":[{"in":"path","allowReserved":true,"name":"multi-address","schema":{"$ref":"#/components/schemas/MultiAddress"},"required":true,"description":"Underlay address of peer"}],"responses":{"200":{"description":"Returns overlay address of connected peer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Address"}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/reservestate":{"get":{"summary":"Get the reserve state","tags":["Status"],"responses":{"200":{"description":"Reserve State","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReserveState"}}}},"default":{"description":"Default response"}}}},"/chainstate":{"get":{"summary":"Get the chain state","tags":["Status"],"responses":{"200":{"description":"Chain State","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChainState"}}}},"default":{"description":"Default response"}}}},"/debugstore":{"get":{"summary":"Get a snapshot of local storage debug info","tags":["Status"],"responses":{"200":{"description":"Local storage debug info","content":{"application/json":{"schema":{"type":"object","properties":{"Upload":{"type":"object","properties":{"TotalUploaded":{"type":"integer"},"TotalSynced":{"type":"integer"},"PendingUpload":{"type":"integer"}}},"Pinning":{"type":"object","properties":{"TotalCollections":{"type":"integer"},"TotalChunks":{"type":"integer"}}},"Cache":{"type":"object","properties":{"Size":{"type":"integer"},"Capacity":{"type":"integer"}}},"Reserve":{"type":"object","properties":{"SizeWithinRadius":{"type":"integer"},"TotalSize":{"type":"integer"},"Capacity":{"type":"integer"},"LastBinIDs":{"type":"array","items":{"type":"integer"}},"Epoch":{"type":"integer"}}},"ChunkStore":{"type":"object","properties":{"TotalChunks":{"type":"integer"},"SharedSlots":{"type":"integer"},"ReferenceCount":{"type":"integer"}}}}}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/node":{"get":{"summary":"Get node information","tags":["Status"],"responses":{"200":{"description":"Information about the node","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Node"}}}},"default":{"description":"Default response"}}}},"/peers":{"get":{"summary":"Get the list of connected peers","tags":["Connectivity"],"responses":{"200":{"description":"Returns overlay addresses of connected peers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Peers"}}}},"default":{"description":"Default response"}}}},"/peers/{address}":{"delete":{"summary":"Disconnect from a peer","tags":["Connectivity"],"parameters":[{"in":"path","name":"address","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":true,"description":"Swarm address of peer"}],"responses":{"200":{"description":"Peer has been disconnected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/pingpong/{address}":{"post":{"summary":"Ping a peer to measure latency","tags":["Connectivity"],"parameters":[{"in":"path","name":"address","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":true,"description":"Swarm address of peer"}],"responses":{"200":{"description":"Returns round trip time for given peer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RttMs"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/settlements/{peer}":{"get":{"summary":"Get settlement amounts sent and received with a peer","tags":["Settlements"],"parameters":[{"in":"path","name":"peer","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":true,"description":"Swarm address of peer"}],"responses":{"200":{"description":"Settlement amounts sent and received with the peer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settlement"}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/settlements":{"get":{"summary":"Get settlements with all known peers and totals","tags":["Settlements"],"responses":{"200":{"description":"Settlements with all known peers and total amount sent or received","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settlements"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/timesettlements":{"get":{"summary":"Get time-based settlements with all known peers and totals","tags":["Settlements"],"responses":{"200":{"description":"Time based settlements with all known peers and total amount sent or received","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settlements"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/topology":{"get":{"summary":"Get the network topology","tags":["Connectivity"],"responses":{"200":{"description":"Swarm topology of the bee node","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BzzTopology"}}}}}}},"/welcome-message":{"get":{"summary":"Get the P2P welcome message","tags":["Connectivity"],"responses":{"200":{"description":"Welcome message","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WelcomeMessage"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"post":{"summary":"Set the P2P welcome message","tags":["Connectivity"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WelcomeMessage"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/chequebook/cashout/{peer}":{"get":{"summary":"Get the last cashout status for a peer","parameters":[{"in":"path","name":"peer","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":true,"description":"Swarm address of peer"}],"tags":["Chequebook"],"responses":{"200":{"description":"Cashout status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwapCashoutStatus"}}}},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"post":{"summary":"Cash out the last cheque for a peer","parameters":[{"in":"path","name":"peer","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":true,"description":"Swarm address of peer"},{"$ref":"#/components/parameters/GasPriceParameter"},{"$ref":"#/components/parameters/GasLimitParameter"}],"tags":["Chequebook"],"responses":{"201":{"description":"Cheque has been cashed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponse"}}}},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/chequebook/cheque/{peer}":{"get":{"summary":"Get the last cheques for a peer","parameters":[{"in":"path","name":"peer","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":true,"description":"Swarm address of peer"}],"tags":["Chequebook"],"responses":{"200":{"description":"The last cheques for the peer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChequePeerResponse"}}}},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/chequebook/cheque":{"get":{"summary":"Get the last cheques for all peers","tags":["Chequebook"],"responses":{"200":{"description":"The last cheques for all peers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChequeAllPeersResponse"}}}},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/chequebook/deposit":{"post":{"summary":"Deposit tokens into the chequebook","parameters":[{"in":"query","name":"amount","schema":{"type":"integer"},"required":true,"description":"Amount of tokens to deposit"},{"$ref":"#/components/parameters/GasPriceParameter"}],"tags":["Chequebook"],"responses":{"200":{"description":"Transaction hash of the deposit transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponse"}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/chequebook/withdraw":{"post":{"summary":"Withdraw tokens from the chequebook","parameters":[{"in":"query","name":"amount","schema":{"type":"integer"},"required":true,"description":"Amount of tokens to withdraw"},{"$ref":"#/components/parameters/GasPriceParameter"}],"tags":["Chequebook"],"responses":{"200":{"description":"Transaction hash of the withdraw transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponse"}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/transactions":{"get":{"summary":"Get list of pending transactions","tags":["Transaction"],"responses":{"200":{"description":"List of pending transactions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingTransactionsResponse"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/transactions/{hash}":{"get":{"summary":"Retrieve transaction information","parameters":[{"in":"path","name":"hash","schema":{"$ref":"#/components/schemas/TransactionHash"},"required":true,"description":"Hash of the transaction"}],"tags":["Transaction"],"responses":{"200":{"description":"Transaction information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionInfo"}}}},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"post":{"summary":"Rebroadcast a transaction","parameters":[{"in":"path","name":"hash","schema":{"$ref":"#/components/schemas/TransactionHash"},"required":true,"description":"Hash of the transaction"}],"tags":["Transaction"],"responses":{"200":{"description":"Hash of the transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponse"}}}},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"delete":{"summary":"Cancel existing transaction","parameters":[{"in":"path","name":"hash","schema":{"$ref":"#/components/schemas/TransactionHash"},"required":true,"description":"Hash of the transaction"},{"$ref":"#/components/parameters/GasPriceParameter"}],"tags":["Transaction"],"responses":{"200":{"description":"Hash of the transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponse"}}}},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/stamps":{"get":{"summary":"Get postage stamps for this node","tags":["Postage Stamps"],"responses":{"200":{"description":"An array of postage stamps","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DebugPostageBatchesResponse"}}}},"404":{"$ref":"#/components/responses/404"},"default":{"description":"Default response"}}}},"/stamps/{batch_id}":{"parameters":[{"in":"path","name":"batch_id","schema":{"$ref":"#/components/schemas/BatchID"},"required":true,"description":"Swarm address of the stamp"}],"get":{"summary":"Get an individual postage batch status","tags":["Postage Stamps"],"responses":{"200":{"description":"Returns an individual postage batch state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DebugPostageBatch"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"default":{"description":"Default response"}}},"patch":{"summary":"Update the label of an existing postage batch","tags":["Postage Stamps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","description":"New label for the postage batch"}},"required":["label"]}}}},"responses":{"200":{"description":"Label updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/stamps/{batch_id}/buckets":{"parameters":[{"in":"path","name":"batch_id","schema":{"$ref":"#/components/schemas/BatchID"},"required":true,"description":"Swarm address of the stamp"}],"get":{"summary":"Get extended bucket data of a batch","tags":["Postage Stamps"],"responses":{"200":{"description":"Returns extended bucket data of the provided batch ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostageStampBuckets"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"default":{"description":"Default response"}}}},"/stamps/{amount}/{depth}":{"post":{"summary":"Buy a new postage batch.","description":"Be aware, this endpoint creates an on-chain transaction and transfers BZZ from the node\'s Ethereum account, directly affecting the wallet balance!\\n","tags":["Postage Stamps"],"parameters":[{"in":"path","name":"amount","schema":{"$ref":"#/components/schemas/BigInt"},"required":true,"description":"Amount of BZZ added that the postage batch will have."},{"in":"path","name":"depth","schema":{"type":"integer"},"required":true,"description":"Batch depth (logarithm) specifying the maximum number of chunks this stamp can cover. Must be greater than the default bucket depth (16)"},{"in":"query","name":"label","schema":{"type":"string"},"required":false,"description":"An optional label for this batch"},{"in":"header","name":"immutable","schema":{"type":"boolean"},"required":false},{"$ref":"#/components/parameters/GasPriceParameter"},{"$ref":"#/components/parameters/GasLimitParameter"}],"responses":{"201":{"description":"Returns the newly created postage batch ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchIDResponse"}}}},"400":{"$ref":"#/components/responses/400"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/stamps/topup/{batch_id}/{amount}":{"patch":{"summary":"Top up an existing postage batch.","description":"Be aware, this endpoint creates an on-chain transaction and transfers BZZ from the node\'s Ethereum account, directly affecting the wallet balance!\\n","tags":["Postage Stamps"],"parameters":[{"in":"path","name":"batch_id","schema":{"$ref":"#/components/schemas/BatchID"},"required":true,"description":"Batch ID to top up"},{"in":"path","name":"amount","schema":{"type":"integer"},"required":true,"description":"Amount of BZZ per chunk to top up to an existing postage batch."},{"$ref":"#/components/parameters/GasPriceParameter"},{"$ref":"#/components/parameters/GasLimitParameter"}],"responses":{"202":{"description":"Returns the postage batch ID that was topped up","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchIDResponse"}}}},"400":{"$ref":"#/components/responses/400"},"402":{"$ref":"#/components/responses/402"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/stamps/dilute/{batch_id}/{depth}":{"patch":{"summary":"Dilute an existing postage batch.","description":"Be aware, this endpoint creates an on-chain transaction and transfers BZZ from the node\'s Ethereum account, directly affecting the wallet balance!\\n","tags":["Postage Stamps"],"parameters":[{"in":"path","name":"batch_id","schema":{"$ref":"#/components/schemas/BatchID"},"required":true,"description":"Batch ID to dilute"},{"in":"path","name":"depth","schema":{"type":"integer"},"required":true,"description":"The new batch depth, which must be greater than the current depth"},{"$ref":"#/components/parameters/GasPriceParameter"},{"$ref":"#/components/parameters/GasLimitParameter"}],"responses":{"202":{"description":"Returns the postage batch ID that was diluted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchIDResponse"}}}},"400":{"$ref":"#/components/responses/400"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/batches":{"get":{"summary":"Get all globally available postage batches","tags":["Postage Stamps"],"responses":{"200":{"description":"An array of all available and valid postage batches","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DebugPostageAllBatchesResponse"}}}},"default":{"description":"Default response"}}}},"/batches/{batch_id}":{"parameters":[{"in":"path","name":"batch_id","schema":{"$ref":"#/components/schemas/BatchID"},"required":true,"description":"ID of the postage batch"}],"get":{"summary":"Get a single globally available postage batch by ID","tags":["Postage Stamps"],"responses":{"200":{"description":"The postage batch state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostageBatchShort"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"default":{"description":"Default response"}}}},"/rchash/{depth}/{anchor1}/{anchor2}":{"get":{"summary":"Get reserve commitment hash with sample proofs","tags":["RChash"],"parameters":[{"in":"path","name":"depth","schema":{"type":"integer","minimum":0,"default":0},"required":true,"description":"The storage depth."},{"in":"path","name":"anchor1","schema":{"$ref":"#/components/schemas/HexString"},"required":true,"description":"The first anchor."},{"in":"path","name":"anchor2","schema":{"$ref":"#/components/schemas/HexString"},"required":true,"description":"The second anchor."}],"responses":{"200":{"description":"Reserve sample response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiRCHashResponse"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/accounting":{"get":{"summary":"Get accounting values for all known peers","tags":["Balance"],"responses":{"200":{"description":"Own accounting associated values with all known peers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeerAccountingData"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/redistributionstate":{"get":{"summary":"Get the node\'s redistribution game status","tags":["RedistributionState"],"responses":{"200":{"description":"Redistribution status info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedistributionStatusResponse"}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/wallet":{"get":{"summary":"Get wallet balance for BZZ and xDAI","tags":["Wallet"],"responses":{"200":{"description":"Wallet balance info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletResponse"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/wallet/withdraw/{coin}":{"post":{"summary":"Withdraw BZZ or xDAI to a whitelisted address","tags":["Wallet"],"parameters":[{"in":"query","name":"amount","required":true,"schema":{"$ref":"#/components/schemas/BigInt"}},{"in":"query","name":"address","required":true,"schema":{"$ref":"#/components/schemas/EthereumAddress"}},{"in":"path","name":"coin","required":true,"schema":{"$ref":"#/components/schemas/WithdrawCoin"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletTxResponse"}}},"description":"OK"},"400":{"$ref":"#/components/responses/400","description":"Amount greater than balance or coin is other than BZZ/xDAI"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/stake/withdrawable":{"get":{"summary":"Get the withdrawable staked amount.","description":"This endpoint fetches any amount that is possible to withdraw as surplus.","tags":["Staking"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWithdrawableResponse"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"delete":{"summary":"Withdraw the extra withdrawable staked amount.","description":"This endpoint withdraws any amount that is possible to withdraw as surplus.","tags":["Staking"],"parameters":[{"$ref":"#/components/parameters/GasPriceParameter"},{"$ref":"#/components/parameters/GasLimitParameter"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StakeTransactionResponse"}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/stake/{amount}":{"post":{"summary":"Deposit an amount for staking.","description":"Be aware, this endpoint creates an on-chain transaction and transfers BZZ from the node\'s Ethereum account, directly affecting the wallet balance.","tags":["Staking"],"parameters":[{"in":"path","name":"amount","schema":{"type":"string"},"required":true,"description":"Amount of BZZ added that will be deposited for staking."},{"$ref":"#/components/parameters/GasPriceParameter"},{"$ref":"#/components/parameters/GasLimitParameter"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StakeTransactionResponse"}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/stake":{"get":{"summary":"Get the staked amount.","description":"This endpoint fetches the total staked amount from the blockchain.","tags":["Staking"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetStakeResponse"}}}},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}},"delete":{"summary":"Withdraw all previously staked amounts.","description":"Be aware, this endpoint can only be called when the contract is paused and undergoing migration to a new contract.","tags":["Staking"],"parameters":[{"$ref":"#/components/parameters/GasPriceParameter"},{"$ref":"#/components/parameters/GasLimitParameter"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StakeTransactionResponse"}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"},"default":{"description":"Default response"}}}},"/loggers":{"get":{"summary":"Get all available loggers.","tags":["Logging"],"responses":{"200":{"description":"Returns an array of all available loggers, also represented in short form in a tree.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoggerResponse"}}}},"400":{"$ref":"#/components/responses/400"},"default":{"description":"Default response"}}}},"/loggers/{exp}":{"get":{"summary":"Get all available loggers that match the specified expression.","parameters":[{"in":"path","name":"exp","schema":{"$ref":"#/components/schemas/LoggerExp"},"required":true,"description":"Regular expression or a subsystem that matches the logger(s)."}],"tags":["Logging"],"responses":{"200":{"description":"Returns an array of all available loggers that matches given expression, also represented in short form in a tree.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoggerResponse"}}}},"400":{"$ref":"#/components/responses/400"},"default":{"description":"Default response"}}}},"/loggers/{exp}/{verbosity}":{"put":{"summary":"Set logger(s) verbosity level.","parameters":[{"in":"path","name":"exp","schema":{"$ref":"#/components/schemas/LoggerExp"},"required":true,"description":"Regular expression or a subsystem that matches the logger(s)."},{"in":"path","name":"verbosity","schema":{"type":"string","enum":["none","error","warning","info","debug","all"]},"required":true,"description":"Verbosity level to apply to the matching logger(s)."}],"tags":["Logging"],"responses":{"200":{"description":"The verbosity was changed successfully."},"400":{"$ref":"#/components/responses/400"},"default":{"description":"Default response"}}}},"/status":{"get":{"summary":"Get the current status snapshot of this node.","tags":["Node Status"],"responses":{"200":{"description":"Returns the current node status snapshot.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusSnapshotResponse"}}}},"400":{"$ref":"#/components/responses/400"},"default":{"description":"Default response."}}}},"/status/peers":{"get":{"summary":"Get the current status snapshot of this node connected peers.","tags":["Node Status"],"responses":{"200":{"description":"Returns the status snapshot of this node connected peers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusPeersResponse"}}}},"400":{"$ref":"#/components/responses/400"},"default":{"description":"Default response."}}}},"/status/neighborhoods":{"get":{"summary":"Get the current neighborhoods status of this node.","tags":["Node Status"],"responses":{"200":{"description":"Returns the neighborhoods status of this node","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusNeighborhoodsResponse"}}}},"400":{"$ref":"#/components/responses/400"},"default":{"description":"Default response."}}}}},"components":{"schemas":{"SwarmPostageBatchId":{"in":"header","name":"swarm-postage-batch-id","description":"ID of Postage Batch that is used to upload data with","required":true,"schema":{"$ref":"#/components/schemas/SwarmAddress"}},"SwarmTagParameter":{"in":"header","name":"swarm-tag","schema":{"$ref":"#/components/schemas/Uid"},"required":false,"description":"Associate upload with an existing Tag UID"},"SwarmPinParameter":{"in":"header","name":"swarm-pin","schema":{"type":"boolean"},"required":false,"description":"Indicates whether the uploaded data should also be locally pinned on this node\\n"},"SwarmDeferredUpload":{"in":"header","name":"swarm-deferred-upload","schema":{"type":"boolean","default":"true"},"required":false,"description":"Indicates whether the uploaded data should be sent to the network immediately or deferred. Default: deferred (true)\\n"},"SwarmActHistoryAddress":{"in":"header","name":"swarm-act-history-address","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":false,"description":"ACT history reference address"},"SwarmRedundancyLevelParameter":{"in":"header","name":"swarm-redundancy-level","schema":{"type":"integer","enum":[0,1,2,3,4]},"required":false,"description":"Add redundancy to the data being uploaded so that downloaders can download it with better UX. 0 value is default and does not add any redundancy to the file.\\n"},"PublicKey":{"type":"string","pattern":"^[A-Fa-f0-9]{66}$","example":"02ab7473879005929d10ce7d4f626412dad9fe56b0a6622038931d26bd79abf0a4"},"ActGranteesCreateRequest":{"type":"object","properties":{"grantees":{"type":"array","items":{"$ref":"#/components/schemas/PublicKey"}}}},"SwarmEncryptedReference":{"type":"string","pattern":"^[A-Fa-f0-9]{128}$","example":"36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f2d2810619d29b5dbefd5d74abce25d58b81b251baddb9c3871cf0d6967deaae2"},"ActGranteesOperationResponse":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/SwarmEncryptedReference"},"historyref":{"$ref":"#/components/schemas/SwarmEncryptedReference"}}},"ProblemDetails":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"reasons":{"type":"array","nullable":true,"description":"List of reasons for the error message.","items":{"type":"string"}}}},"ActGranteesPatchRequest":{"type":"object","properties":{"add":{"type":"array","items":{"$ref":"#/components/schemas/PublicKey"},"description":"List of grantees to add"},"revoke":{"type":"array","items":{"$ref":"#/components/schemas/PublicKey"},"description":"List of grantees to revoke future access from"}}},"SwarmAddress":{"type":"string","pattern":"^[A-Fa-f0-9]{64}$","example":"36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f"},"Uid":{"type":"integer"},"DomainName":{"type":"string","pattern":"^[A-Za-z0-9]+\\\\.[A-Za-z0-9]+$","example":"swarm.eth"},"SwarmReference":{"oneOf":[{"$ref":"#/components/schemas/SwarmAddress"},{"$ref":"#/components/schemas/SwarmEncryptedReference"},{"$ref":"#/components/schemas/DomainName"}]},"ReferenceResponse":{"type":"object","properties":{"reference":{"$ref":"#/components/schemas/SwarmReference"}}},"Duration":{"description":"Time duration in Go time.Duration format (e.g., 5.0018ms)","type":"string","example":"5.0018ms"},"HexString":{"type":"string","pattern":"^([A-Fa-f0-9]+)$","example":"cf880b8eeac5093fa27b0825906c600685"},"FileName":{"type":"string"},"DateTime":{"type":"string","format":"date-time","example":"2020-06-11T11:26:42.6969797+02:00"},"NewTagResponse":{"type":"object","properties":{"uid":{"$ref":"#/components/schemas/Uid"},"address":{"$ref":"#/components/schemas/SwarmAddress","description":"Root reference associated with the tag once the upload is finalized; zero value before that."},"startedAt":{"$ref":"#/components/schemas/DateTime"},"split":{"type":"integer","description":"Number of chunks created by the splitter."},"seen":{"type":"integer","description":"Number of chunks that are already uploaded with same reference and same postage batch. These don\'t need to be synced again."},"stored":{"type":"integer","description":"Number of chunks that were stored locally as they lie in the uploader node\'s neighborhood. This is only applicable for full nodes."},"sent":{"type":"integer","description":"Number of chunks sent on the network to peers as a part of the upload. Chunks could be sent multiple times because of failures or replication."},"synced":{"type":"integer","description":"Number of chunks that were pushed with a valid receipt. The receipt will also show if they were stored at the correct depth."}}},"TagsList":{"type":"object","properties":{"tags":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/NewTagResponse"}}}},"Address":{"type":"object","properties":{"address":{"$ref":"#/components/schemas/SwarmAddress"}}},"Response":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}}},"SwarmOnlyReference":{"oneOf":[{"$ref":"#/components/schemas/SwarmAddress"},{"$ref":"#/components/schemas/SwarmEncryptedReference"}]},"SwarmOnlyReferencesList":{"type":"object","properties":{"references":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/SwarmOnlyReference"}}}},"PinCheckResponse":{"type":"object","properties":{"reference":{"$ref":"#/components/schemas/SwarmOnlyReference"},"total":{"type":"integer"},"missing":{"type":"integer"},"invalid":{"type":"integer"}}},"PssTopic":{"type":"string"},"PssTargets":{"pattern":"^[0-9a-fA-F]{1,6}(,[0-9a-fA-F]{1,6})*$","description":"List of hex string targets that are comma separated and can have maximum length of 6","type":"string"},"PssRecipient":{"type":"string"},"EthereumAddress":{"type":"string","pattern":"^[A-Fa-f0-9]{40}$","example":"36b7efd913ca4cf880b8eeac5093fa27b0825906"},"FeedType":{"type":"string","pattern":"^(sequence|epoch)$"},"IsRetrievableResponse":{"type":"object","properties":{"isRetrievable":{"type":"boolean"}}},"P2PUnderlay":{"type":"string","example":"/ip4/127.0.0.1/tcp/1634/p2p/16Uiu2HAmTm17toLDaPYzRyjKn27iCB76yjKnJ5DjQXneFmifFvaX"},"Addresses":{"type":"object","properties":{"overlay":{"$ref":"#/components/schemas/SwarmAddress"},"underlay":{"type":"array","items":{"$ref":"#/components/schemas/P2PUnderlay"}},"ethereum":{"$ref":"#/components/schemas/EthereumAddress"},"chain_address":{"$ref":"#/components/schemas/EthereumAddress"},"publicKey":{"$ref":"#/components/schemas/PublicKey"},"pssPublicKey":{"$ref":"#/components/schemas/PublicKey"}}},"HealthStatus":{"type":"object","properties":{"status":{"type":"string","enum":["ok","nok","unknown"],"description":"Indicates health state of node * `ok` - node is healthy * `nok` - node is not healthy * `unknown` - health status is unknown\\n"},"version":{"type":"string"},"apiVersion":{"type":"string","default":"0.0.0","description":"The default value is set in case the bee binary was not build correctly."}}},"BigInt":{"description":"Numeric string representing an integer that may exceed `Number.MAX_SAFE_INTEGER` (2^53-1)","type":"string","example":"1000000000000000000"},"Balance":{"type":"object","properties":{"peer":{"$ref":"#/components/schemas/SwarmAddress"},"balance":{"$ref":"#/components/schemas/BigInt"},"thresholdreceived":{"$ref":"#/components/schemas/BigInt"},"thresholdgiven":{"$ref":"#/components/schemas/BigInt"}}},"Balances":{"type":"object","properties":{"balances":{"type":"array","items":{"$ref":"#/components/schemas/Balance"}}}},"BlockListedPeers":{"type":"object","properties":{"peers":{"type":"array","nullable":false,"items":{"type":"object","properties":{"address":{"$ref":"#/components/schemas/SwarmAddress"},"fullNode":{"type":"boolean"},"reason":{"type":"string"},"duration":{"type":"integer","description":"Block duration in seconds"}}}}}},"ChequebookAddress":{"type":"object","properties":{"chequebookAddress":{"$ref":"#/components/schemas/EthereumAddress"}}},"ChequebookBalance":{"type":"object","properties":{"totalBalance":{"$ref":"#/components/schemas/BigInt"},"availableBalance":{"$ref":"#/components/schemas/BigInt"}}},"SwarmCache":{"in":"header","name":"swarm-cache","schema":{"type":"boolean","default":"true"},"required":false,"description":"Indicates whether downloaded data should be cached on the node. Default: cached (true)"},"Hex8Bytes":{"description":"Hexadecimal string representation of 8 bytes","type":"string","pattern":"^([0-9a-fA-F]{16})$","example":"1a2b3c4d5e6f7a8b"},"Signature":{"description":"Hexadecimal string representation of cryptographic signature","type":"string","pattern":"^([0-9a-fA-F]{130})$","example":"1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e"},"PostEnvelopeResponse":{"type":"object","properties":{"issuer":{"$ref":"#/components/schemas/EthereumAddress"},"index":{"$ref":"#/components/schemas/Hex8Bytes"},"timestamp":{"$ref":"#/components/schemas/Hex8Bytes"},"signature":{"$ref":"#/components/schemas/Signature"}}},"MultiAddress":{"type":"string"},"ReserveState":{"type":"object","properties":{"radius":{"type":"integer"},"storageRadius":{"type":"integer"},"commitment":{"type":"integer"},"reserveCapacityDoubling":{"type":"integer"}}},"ChainState":{"type":"object","properties":{"chainTip":{"type":"integer"},"block":{"type":"integer"},"totalAmount":{"$ref":"#/components/schemas/BigInt"},"currentPrice":{"$ref":"#/components/schemas/BigInt"},"minimumValidityBlocks":{"type":"integer"}}},"Node":{"type":"object","properties":{"beeMode":{"type":"string","enum":["light","full","ultra-light","unknown"],"description":"Gives back in what mode the Bee client has been started. The modes are mutually exclusive * `light` - light node; does not participate in forwarding or storing chunks * `full` - full node * `ultra-light` - ultra-light node; a light node with chain disabled * `unknown` - unknown mode\\n"},"chequebookEnabled":{"type":"boolean"},"swapEnabled":{"type":"boolean"}}},"Peers":{"type":"object","properties":{"peers":{"type":"array","nullable":false,"items":{"type":"object","properties":{"address":{"$ref":"#/components/schemas/SwarmAddress"},"fullNode":{"type":"boolean"}}}}}},"RttMs":{"type":"object","properties":{"rtt":{"$ref":"#/components/schemas/Duration"}}},"Settlement":{"type":"object","properties":{"peer":{"$ref":"#/components/schemas/SwarmAddress"},"received":{"$ref":"#/components/schemas/BigInt"},"sent":{"$ref":"#/components/schemas/BigInt"}}},"Settlements":{"type":"object","properties":{"totalReceived":{"$ref":"#/components/schemas/BigInt"},"totalSent":{"$ref":"#/components/schemas/BigInt"},"settlements":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/Settlement"}}}},"PeerMetricsView":{"type":"object","properties":{"lastSeenTimestamp":{"type":"integer","nullable":false},"sessionConnectionRetry":{"type":"integer","nullable":false},"connectionTotalDuration":{"type":"number","nullable":false},"sessionConnectionDuration":{"type":"number","nullable":false},"sessionConnectionDirection":{"type":"string","nullable":false},"latencyEWMA":{"type":"integer","nullable":false},"reachability":{"type":"string"},"healthy":{"type":"boolean"}}},"BzzTopology":{"type":"object","properties":{"baseAddr":{"$ref":"#/components/schemas/SwarmAddress"},"population":{"type":"integer"},"connected":{"type":"integer"},"timestamp":{"type":"string"},"nnLowWatermark":{"type":"integer"},"depth":{"type":"integer"},"reachability":{"type":"string","enum":["Unknown","Public","Private"]},"networkAvailability":{"type":"string","enum":["Unknown","Available","Unavailable"]},"bins":{"type":"object","additionalProperties":{"type":"object","properties":{"population":{"type":"integer"},"connected":{"type":"integer"},"disconnectedPeers":{"type":"array","items":{"type":"object","properties":{"address":{"$ref":"#/components/schemas/SwarmAddress"},"metrics":{"$ref":"#/components/schemas/PeerMetricsView"}}}},"connectedPeers":{"type":"array","items":{"type":"object","properties":{"address":{"$ref":"#/components/schemas/SwarmAddress"},"metrics":{"$ref":"#/components/schemas/PeerMetricsView"}}}}}}}}},"WelcomeMessage":{"type":"object","properties":{"welcomeMessage":{"type":"string"}}},"Cheque":{"type":"object","properties":{"beneficiary":{"$ref":"#/components/schemas/EthereumAddress"},"chequebook":{"$ref":"#/components/schemas/EthereumAddress"},"payout":{"$ref":"#/components/schemas/BigInt"}}},"TransactionHash":{"type":"string","pattern":"^0x[A-Fa-f0-9]{64}$","example":"0x780cb6a37d1946978087896e1e489c37e30fe3e329510fff8d97360f73529f5a"},"SwapCashoutResult":{"type":"object","properties":{"recipient":{"$ref":"#/components/schemas/EthereumAddress"},"lastPayout":{"$ref":"#/components/schemas/BigInt"},"bounced":{"type":"boolean"}}},"SwapCashoutStatus":{"type":"object","properties":{"peer":{"$ref":"#/components/schemas/SwarmAddress"},"lastCashedCheque":{"$ref":"#/components/schemas/Cheque"},"transactionHash":{"$ref":"#/components/schemas/TransactionHash"},"result":{"$ref":"#/components/schemas/SwapCashoutResult"},"uncashedAmount":{"$ref":"#/components/schemas/BigInt"}}},"GasPrice":{"description":"Gas price refers to the amount you\u2019re willing to pay for every unit of gas.","type":"integer"},"GasLimit":{"description":"Gas limit refers to the maximum amount of gas you\u2019re willing to spend on a particular transaction.","type":"integer","minimum":0,"maximum":18446744073709552000},"TransactionResponse":{"type":"object","properties":{"transactionHash":{"$ref":"#/components/schemas/TransactionHash"}}},"ChequePeerResponse":{"type":"object","properties":{"peer":{"$ref":"#/components/schemas/SwarmAddress"},"lastreceived":{"$ref":"#/components/schemas/Cheque"},"lastsent":{"$ref":"#/components/schemas/Cheque"}}},"ChequeAllPeersResponse":{"type":"object","properties":{"lastcheques":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/ChequePeerResponse"}}}},"TransactionInfo":{"type":"object","properties":{"transactionHash":{"$ref":"#/components/schemas/TransactionHash"},"to":{"$ref":"#/components/schemas/EthereumAddress"},"nonce":{"type":"integer"},"gasPrice":{"$ref":"#/components/schemas/BigInt"},"gasLimit":{"type":"integer"},"gasTipCap":{"$ref":"#/components/schemas/BigInt"},"gasTipBoost":{"type":"integer"},"gasFeeCap":{"$ref":"#/components/schemas/BigInt"},"data":{"type":"string"},"created":{"$ref":"#/components/schemas/DateTime"},"description":{"type":"string"},"value":{"$ref":"#/components/schemas/BigInt"}}},"PendingTransactionsResponse":{"type":"object","properties":{"pendingTransactions":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/TransactionInfo"}}}},"BatchID":{"type":"string","pattern":"^[A-Fa-f0-9]{64}$","example":"36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f"},"PostageBatch":{"type":"object","properties":{"batchID":{"$ref":"#/components/schemas/BatchID"},"utilization":{"type":"integer","description":"Raw batch fullness indicator: the highest write count among the `2^bucketDepth` collision buckets of the batch. This is **not** a percentage; one unit corresponds to one chunk written into the fullest bucket. Total batch capacity is `2^depth` chunks, while the fullest bucket caps at `2^(depth - bucketDepth)` chunks, so the fractional usage of the batch is `utilization / 2^(depth - bucketDepth)` (also exposed directly as `utilizationRatio`). When the value reaches `2^(depth - bucketDepth)` the batch is effectively full and any further write to the fullest bucket would overflow it.\\n"},"utilizationRatio":{"type":"number","format":"double","minimum":0,"maximum":1,"description":"Fractional batch fullness in the range `[0, 1]`, computed as `utilization / 2^(depth - bucketDepth)`. A value of `1` means the fullest bucket has reached its capacity and the batch can no longer accept writes that would land in that bucket.\\n"},"usable":{"description":"Indicates whether the batch was discovered by the Bee node and has received sufficient on-chain confirmations","type":"boolean"},"label":{"type":"string"},"depth":{"type":"integer"},"amount":{"$ref":"#/components/schemas/BigInt"},"bucketDepth":{"type":"integer"},"blockNumber":{"type":"integer"},"immutableFlag":{"type":"boolean"},"exists":{"type":"boolean"},"batchTTL":{"type":"integer"}}},"PostageBatchNoIssuer":{"type":"object","properties":{"batchID":{"$ref":"#/components/schemas/BatchID"},"exists":{"type":"boolean"},"batchTTL":{"type":"integer"}}},"DebugPostageBatch":{"anyOf":[{"$ref":"#/components/schemas/PostageBatch"},{"$ref":"#/components/schemas/PostageBatchNoIssuer"}]},"DebugPostageBatchesResponse":{"type":"object","properties":{"stamps":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/DebugPostageBatch"}}}},"StampBucketData":{"type":"object","properties":{"bucketID":{"type":"integer"},"collisions":{"type":"integer"}}},"PostageStampBuckets":{"type":"object","properties":{"depth":{"type":"integer"},"bucketDepth":{"type":"integer"},"bucketUpperBound":{"type":"integer"},"buckets":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/StampBucketData"}}}},"BatchIDResponse":{"type":"object","properties":{"batchID":{"$ref":"#/components/schemas/BatchID"},"txHash":{"$ref":"#/components/schemas/TransactionHash"}}},"PostageBatchShort":{"type":"object","properties":{"batchID":{"$ref":"#/components/schemas/BatchID"},"value":{"$ref":"#/components/schemas/BigInt"},"start":{"type":"integer"},"owner":{"$ref":"#/components/schemas/EthereumAddress"},"depth":{"type":"integer"},"bucketDepth":{"type":"integer"},"immutable":{"type":"boolean"},"batchTTL":{"type":"integer"}}},"DebugPostageAllBatchesResponse":{"type":"object","properties":{"batches":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/PostageBatchShort"}}}},"Seconds":{"description":"Time duration in seconds (Go time.Duration format)","type":"number","example":30.5},"ApiPostageProof":{"type":"object","properties":{"index":{"type":"string"},"postageId":{"type":"string"},"signature":{"type":"string"},"timeStamp":{"type":"string"}}},"ApiSOCProof":{"type":"object","properties":{"chunkAddr":{"type":"string"},"identifier":{"type":"string"},"signature":{"type":"string"},"signer":{"type":"string"}}},"ApiChunkInclusionProof":{"type":"object","properties":{"chunkSpan":{"minimum":0,"type":"integer"},"postageProof":{"$ref":"#/components/schemas/ApiPostageProof"},"proofSegments":{"items":{"type":"string"},"nullable":true,"type":"array"},"proofSegments2":{"items":{"type":"string"},"nullable":true,"type":"array"},"proofSegments3":{"items":{"type":"string"},"nullable":true,"type":"array"},"proveSegment":{"type":"string"},"proveSegment2":{"type":"string"},"socProof":{"items":{"$ref":"#/components/schemas/ApiSOCProof"},"nullable":true,"type":"array"}}},"ApiChunkInclusionProofs":{"type":"object","properties":{"proof1":{"$ref":"#/components/schemas/ApiChunkInclusionProof"},"proof2":{"$ref":"#/components/schemas/ApiChunkInclusionProof"},"proofLast":{"$ref":"#/components/schemas/ApiChunkInclusionProof"}}},"ApiRCHashResponse":{"type":"object","properties":{"durationSeconds":{"$ref":"#/components/schemas/Seconds"},"hash":{"$ref":"#/components/schemas/SwarmAddress"},"proofs":{"$ref":"#/components/schemas/ApiChunkInclusionProofs"}}},"AccountingInfo":{"type":"object","properties":{"balance":{"$ref":"#/components/schemas/BigInt"},"consumedBalance":{"$ref":"#/components/schemas/BigInt"},"thresholdReceived":{"$ref":"#/components/schemas/BigInt"},"thresholdGiven":{"$ref":"#/components/schemas/BigInt"},"currentThresholdReceived":{"$ref":"#/components/schemas/BigInt"},"currentThresholdGiven":{"$ref":"#/components/schemas/BigInt"},"surplusBalance":{"$ref":"#/components/schemas/BigInt"},"reservedBalance":{"$ref":"#/components/schemas/BigInt"},"shadowReservedBalance":{"$ref":"#/components/schemas/BigInt"},"ghostBalance":{"$ref":"#/components/schemas/BigInt"}}},"PeerAccountingData":{"type":"object","properties":{"peerData":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AccountingInfo"}}}},"RedistributionStatusResponse":{"type":"object","properties":{"minimumGasFunds":{"$ref":"#/components/schemas/BigInt"},"hasSufficientFunds":{"type":"boolean"},"isFrozen":{"type":"boolean"},"isFullySynced":{"type":"boolean"},"isHealthy":{"type":"boolean"},"phase":{"type":"string"},"round":{"type":"integer"},"lastWonRound":{"type":"integer"},"lastPlayedRound":{"type":"integer"},"lastFrozenRound":{"type":"integer"},"lastSelectedRound":{"type":"integer"},"lastSampleDurationSeconds":{"type":"number"},"block":{"type":"integer"},"reward":{"$ref":"#/components/schemas/BigInt"},"fees":{"$ref":"#/components/schemas/BigInt"}}},"WalletResponse":{"type":"object","properties":{"bzzBalance":{"$ref":"#/components/schemas/BigInt"},"nativeTokenBalance":{"$ref":"#/components/schemas/BigInt"},"chainID":{"type":"integer"},"chequebookContractAddress":{"$ref":"#/components/schemas/EthereumAddress"},"walletAddress":{"$ref":"#/components/schemas/EthereumAddress"}}},"WithdrawCoin":{"type":"string","enum":["bzz","nativetoken"]},"WalletTxResponse":{"type":"object","properties":{"transactionHash":{"$ref":"#/components/schemas/TransactionHash"}}},"GetWithdrawableResponse":{"type":"object","properties":{"withdrawableAmount":{"$ref":"#/components/schemas/BigInt"}}},"StakeTransactionResponse":{"type":"object","properties":{"txHash":{"$ref":"#/components/schemas/TransactionHash"}}},"GetStakeResponse":{"type":"object","properties":{"stakedAmount":{"$ref":"#/components/schemas/BigInt"}}},"LoggerTreeNode":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/LoggerTreeData"}},"LoggerTreeData":{"type":"object","nullable":true,"properties":{"/":{"$ref":"#/components/schemas/LoggerTreeNode"},"+":{"type":"array","items":{"type":"string"},"description":"The combination of the logger verbosity and its subsystem separated by |.","example":"warning|one/name[0][]>>824634860360"}}},"Logger":{"type":"object","properties":{"logger":{"type":"string"},"verbosity":{"type":"string"},"subsystem":{"type":"string"},"id":{"type":"string"}}},"LoggerResponse":{"type":"object","properties":{"tree":{"$ref":"#/components/schemas/LoggerTreeNode"},"loggers":{"type":"array","items":{"$ref":"#/components/schemas/Logger"}}}},"LoggerExp":{"type":"string","description":"Base64-encoded regular expression or subsystem string","pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$","example":"b25lL25hbWU="},"StatusSnapshotResponse":{"type":"object","properties":{"overlay":{"$ref":"#/components/schemas/SwarmAddress"},"proximity":{"type":"integer"},"beeMode":{"type":"string","enum":["light","full","ultra-light","unknown"]},"reserveSize":{"type":"integer"},"reserveSizeWithinRadius":{"type":"integer"},"pullsyncRate":{"type":"number"},"storageRadius":{"type":"integer"},"connectedPeers":{"type":"integer"},"neighborhoodSize":{"type":"integer"},"requestFailed":{"nullable":true,"type":"boolean"},"batchCommitment":{"type":"integer"},"isReachable":{"type":"boolean"},"lastSyncedBlock":{"type":"integer"},"committedDepth":{"type":"integer"},"isWarmingUp":{"type":"boolean"}}},"StatusPeersResponse":{"type":"object","properties":{"snapshots":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/StatusSnapshotResponse"}}}},"Neighborhood":{"type":"string","description":"Swarm address of a neighborhood in string binary format, usually limited to as many bits as the current storage radius.","example":"011010111"},"StatusNeighborhoodResponse":{"type":"object","properties":{"neighborhood":{"$ref":"#/components/schemas/Neighborhood"},"reserveSizeWithinRadius":{"type":"integer"},"proximity":{"type":"integer"}}},"StatusNeighborhoodsResponse":{"type":"object","properties":{"neighborhoods":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/StatusNeighborhoodResponse"}}}}},"responses":{"200":{"description":"Success"},"204":{"description":"The resource was deleted successfully."},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"402":{"description":"Payment Required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"parameters":{"SwarmPostageBatchId":{"in":"header","name":"swarm-postage-batch-id","description":"ID of Postage Batch that is used to upload data with","required":true,"schema":{"$ref":"#/components/schemas/SwarmAddress"}},"SwarmTagParameter":{"in":"header","name":"swarm-tag","schema":{"$ref":"#/components/schemas/Uid"},"required":false,"description":"Associate upload with an existing Tag UID"},"SwarmPinParameter":{"in":"header","name":"swarm-pin","schema":{"type":"boolean"},"required":false,"description":"Indicates whether the uploaded data should also be locally pinned on this node\\n"},"SwarmDeferredUpload":{"in":"header","name":"swarm-deferred-upload","schema":{"type":"boolean","default":"true"},"required":false,"description":"Indicates whether the uploaded data should be sent to the network immediately or deferred. Default: deferred (true)\\n"},"SwarmEncryptParameter":{"in":"header","name":"swarm-encrypt","schema":{"type":"boolean"},"required":false,"description":"Indicates whether the file should be encrypted\\n"},"SwarmRedundancyLevelParameter":{"in":"header","name":"swarm-redundancy-level","schema":{"type":"integer","enum":[0,1,2,3,4]},"required":false,"description":"Add redundancy to the data being uploaded so that downloaders can download it with better UX. 0 value is default and does not add any redundancy to the file.\\n"},"SwarmAct":{"in":"header","name":"swarm-act","schema":{"type":"boolean","default":"false"},"required":false,"description":"Determines if the uploaded data should be treated as ACT content"},"SwarmActHistoryAddress":{"in":"header","name":"swarm-act-history-address","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":false,"description":"ACT history reference address"},"SwarmCache":{"in":"header","name":"swarm-cache","schema":{"type":"boolean","default":"true"},"required":false,"description":"Indicates whether downloaded data should be cached on the node. Default: cached (true)"},"SwarmRedundancyStrategyParameter":{"in":"header","name":"swarm-redundancy-strategy","schema":{"type":"integer","enum":[0,1,2,3]},"required":false,"description":"Specify the retrieval strategy for redundant data. Values represent: NONE (0), DATA (1), PROX (2), RACE (3). NONE: no prefetching. DATA: prefetch only data chunks. PROX: prefetch chunks near this node. RACE: prefetch all chunks and use the first n to arrive. Multiple strategies can be cascaded if fallback mode is enabled. Default: NONE > DATA > PROX > RACE\\n"},"SwarmRedundancyFallbackModeParameter":{"in":"header","name":"swarm-redundancy-fallback-mode","schema":{"type":"boolean"},"required":false,"description":"Specify if the retrieve strategies (chunk prefetching on redundant data) are used in a fallback cascade. The default is true.\\n"},"SwarmChunkRetrievalTimeoutParameter":{"in":"header","name":"swarm-chunk-retrieval-timeout","schema":{"$ref":"#/components/schemas/Duration"},"required":false,"description":"Specify the timeout for chunk retrieval. The default is 30 seconds.\\n"},"SwarmLookaheadBufferSizeParameter":{"in":"header","name":"swarm-lookahead-buffer-size","schema":{"type":"integer"},"required":false,"description":"Override the lookahead buffer size used during retrieval, in bytes. When unset the node picks 8x or 16x the io.Copy default buffer (32 kB) depending on file size.\\n"},"SwarmActTimestamp":{"in":"header","name":"swarm-act-timestamp","schema":{"type":"integer","format":"int64"},"required":false,"description":"ACT history Unix timestamp"},"SwarmActPublisher":{"in":"header","name":"swarm-act-publisher","schema":{"$ref":"#/components/schemas/PublicKey"},"required":false,"description":"ACT content publisher\'s public key"},"SwarmPostageStamp":{"in":"header","name":"swarm-postage-stamp","description":"Postage stamp for the corresponding chunk in the request. \\\\\\nIt is required if Swarm-Postage-Batch-Id header is missing \\\\\\nIt consists of: \\\\\\n- batch ID - 0:32 bytes \\\\\\n- postage index (bucket and bucket index) - 32:40 bytes \\\\\\n- timestamp - 40:48 bytes \\\\\\n- signature - 48:113 bytes\\n","schema":{"$ref":"#/components/schemas/HexString"}},"ContentTypePreserved":{"in":"header","name":"Content-Type","schema":{"type":"string"},"description":"Single file: trimmed Content-Type is stored as-is or, if omitted or empty, inferred from the first bytes without validating against the body; tar (`swarm-collection`) and multipart collection uploads still need a full-body Content-Type (e.g. `application/x-tar` or `multipart/form-data` with boundary) so the request can be parsed."},"SwarmCollection":{"in":"header","name":"swarm-collection","schema":{"type":"boolean"},"required":false,"description":"Upload file/files as a collection"},"SwarmIndexDocumentParameter":{"in":"header","name":"swarm-index-document","schema":{"type":"string","example":"index.html"},"required":false,"description":"Default file to serve when a directory path is accessed"},"SwarmErrorDocumentParameter":{"in":"header","name":"swarm-error-document","schema":{"type":"string","example":"error.html"},"required":false,"description":"Custom error document to return when a path is not found in the collection"},"SwarmOnlyRootChunkParameter":{"in":"header","name":"swarm-only-root-chunk","schema":{"type":"boolean"},"required":false,"description":"Returns only the root chunk of the content"},"GasPriceParameter":{"in":"header","name":"gas-price","schema":{"$ref":"#/components/schemas/GasPrice"},"required":false,"description":"Gas price for transaction"},"GasLimitParameter":{"in":"header","name":"gas-limit","schema":{"$ref":"#/components/schemas/GasLimit"},"required":false,"description":"Gas limit for transaction"}},"headers":{"SwarmTag":{"description":"Tag UID","schema":{"$ref":"#/components/schemas/Uid"}},"SwarmActHistoryAddress":{"description":"Swarm address reference to the new ACT history entry","schema":{"$ref":"#/components/schemas/SwarmAddress"},"required":false},"ETag":{"description":"The RFC7232 ETag header field in a response provides the current entity-\\ntag for the selected resource. An entity-tag is an opaque identifier for\\ndifferent versions of a resource over time, regardless whether multiple\\nversions are valid at the same time. An entity-tag consists of an opaque\\nquoted string, possibly prefixed by a weakness indicator.\\n","schema":{"type":"string"}},"SwarmFeedResolvedVersion":{"schema":{"type":"string"},"required":false,"description":"Indicates which feed version was resolved (v1 or v2)"},"SwarmSocSignature":{"description":"Attached digital signature of the Single Owner Chunk","schema":{"$ref":"#/components/schemas/HexString"}},"SwarmFeedIndex":{"description":"The index of the found update","schema":{"$ref":"#/components/schemas/HexString"}},"SwarmFeedIndexNext":{"description":"The index of the next possible update","schema":{"$ref":"#/components/schemas/HexString"}}}}}}},"docusaurus-theme-redoc":{"theme-redoc":{"lightTheme":{"typography":{"fontFamily":"var(--ifm-font-family-base)","fontSize":"var(--ifm-font-size-base)","lineHeight":"var(--ifm-line-height-base)","fontWeightLight":"var(--ifm-font-weight-light)","fontWeightRegular":"var(--ifm-font-weight-base)","fontWeightBold":"var(--ifm-font-weight-bold)","headings":{"fontFamily":"var(--ifm-heading-font-family)","fontWeight":"var(--ifm-heading-font-weight)","lineHeight":"var(--ifm-heading-line-height)"},"code":{"fontFamily":"var(--ifm-font-family-monospace)","lineHeight":"var(--ifm-pre-line-height)"}},"sidebar":{"width":"300px","backgroundColor":"#ffffff"},"rightPanel":{"backgroundColor":"#303846"},"colors":{"primary":{"main":"#1890ff"}},"theme":{"prism":{"additionalLanguages":["scala"]}}},"darkTheme":{"typography":{"fontFamily":"var(--ifm-font-family-base)","fontSize":"var(--ifm-font-size-base)","lineHeight":"var(--ifm-line-height-base)","fontWeightLight":"var(--ifm-font-weight-light)","fontWeightRegular":"var(--ifm-font-weight-base)","fontWeightBold":"var(--ifm-font-weight-bold)","headings":{"fontFamily":"var(--ifm-heading-font-family)","fontWeight":"var(--ifm-heading-font-weight)","lineHeight":"var(--ifm-heading-line-height)"},"code":{"fontFamily":"var(--ifm-font-family-monospace)","lineHeight":"var(--ifm-pre-line-height)"}},"sidebar":{"width":"300px","backgroundColor":"rgb(24, 25, 26)","textColor":"#f5f6f7","arrow":{"color":"#f5f6f7"}},"colors":{"text":{"primary":"#f5f6f7","secondary":"rgba(255, 255, 255, 1)"},"gray":{"50":"#FAFAFA","100":"#F5F5F5"},"border":{"dark":"#ffffff","light":"rgba(0,0,0, 0.1)"},"primary":{"main":"#1890ff"}},"schema":{"nestedBackground":"rgb(24, 25, 26)","typeNameColor":"rgba(255, 255, 255, 1)","typeTitleColor":"rgba(255, 255, 255, 1)"},"theme":{"prism":{"additionalLanguages":["scala"]}}},"options":{"scrollYOffset":60,"expandSingleSchemaField":true,"menuToggle":true,"suppressWarnings":true,"requiredPropsFirst":true,"noAutoAuth":true,"expandDefaultServerVariables":true,"searchMaxDepth":10}}}}'),s=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en","translate":false,"url":"https://docs.ethswarm.org","baseUrl":"/"}}}');var i=n(22654);const l=JSON.parse('{"docusaurusVersion":"3.10.1","siteVersion":"0.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"3.10.1"},"docusaurus-plugin-content-blog":{"type":"package","name":"@docusaurus/plugin-content-blog","version":"3.10.1"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"3.10.1"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"3.10.1"},"docusaurus-plugin-svgr":{"type":"package","name":"@docusaurus/plugin-svgr","version":"3.10.1"},"docusaurus-plugin-redoc":{"type":"package","name":"docusaurus-plugin-redoc","version":"2.5.0"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"3.10.1"},"docusaurus-theme-search-algolia":{"type":"package","name":"@docusaurus/theme-search-algolia","version":"3.10.1"},"docusaurus-theme-redoc":{"type":"package","name":"docusaurus-theme-redoc","version":"2.5.1"},"docusaurus-plugin-image-zoom":{"type":"package","name":"plugin-image-zoom","version":"1.1.0"},"docusaurus-plugin-llms":{"type":"package","name":"docusaurus-plugin-llms","version":"0.2.2"},"docusaurus-plugin-client-redirects":{"type":"package","name":"@docusaurus/plugin-client-redirects","version":"3.10.1"},"docusaurus-theme-mermaid":{"type":"package","name":"@docusaurus/theme-mermaid","version":"3.10.1"}}}');var c=n(74848);const u={siteConfig:o.default,siteMetadata:l,globalData:a,i18n:s,codeTranslations:i},d=r.createContext(u);function p(e){let t=e.children;return(0,c.jsx)(d.Provider,{value:u,children:t})}},78478(e,t,n){"use strict";n.d(t,{A:()=>a});n(96540);var r=n(92303),o=n(74848);function a(e){let t=e.children,n=e.fallback;return(0,r.A)()?(0,o.jsx)(o.Fragment,{children:null==t?void 0:t()}):null!=n?n:null}},67489(e,t,n){"use strict";n.d(t,{A:()=>h});var r=n(96540),o=n(38193),a=n(5260),s=n(70440),i=n(36882),l=n(53102),c=n(74848);function u(e){let t=e.error,n=e.tryAgain;return(0,c.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",minHeight:"100vh",width:"100%",maxWidth:"80ch",fontSize:"20px",margin:"0 auto",padding:"1rem"},children:[(0,c.jsx)("h1",{style:{fontSize:"3rem"},children:"This page crashed"}),(0,c.jsx)("button",{type:"button",onClick:n,style:{margin:"1rem 0",fontSize:"2rem",cursor:"pointer",borderRadius:20,padding:"1rem"},children:"Try again"}),(0,c.jsx)(d,{error:t})]})}function d(e){let t=e.error;const n=(0,s.rA)(t).map(e=>e.message).join("\n\nCause:\n");return(0,c.jsx)("p",{style:{whiteSpace:"pre-wrap"},children:n})}function p(e){let t=e.children;return(0,c.jsx)(l.W,{value:{plugin:{name:"docusaurus-core-error-boundary",id:"default"}},children:t})}function f(e){let t=e.error,n=e.tryAgain;return(0,c.jsx)(p,{children:(0,c.jsxs)(h,{fallback:()=>(0,c.jsx)(u,{error:t,tryAgain:n}),children:[(0,c.jsx)(a.A,{children:(0,c.jsx)("title",{children:"Page Error"})}),(0,c.jsx)(i.A,{children:(0,c.jsx)(u,{error:t,tryAgain:n})})]})})}const m=e=>(0,c.jsx)(f,Object.assign({},e));class h extends r.Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){o.default.canUseDOM&&this.setState({error:e})}render(){const e=this.props.children,t=this.state.error;if(t){var n;const e={error:t,tryAgain:()=>this.setState({error:null})};return(null!=(n=this.props.fallback)?n:m)(e)}return null!=e?e:null}}},38193(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>o});const r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document,o={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},5260(e,t,n){"use strict";n.d(t,{A:()=>a});n(96540);var r=n(80545),o=n(74848);function a(e){return(0,o.jsx)(r.mg,Object.assign({},e))}},28774(e,t,n){"use strict";n.d(t,{A:()=>h});var r=n(98587),o=n(96540),a=n(54625),s=n(70440),i=n(44586),l=n(16654),c=n(38193),u=n(63427),d=n(86025),p=n(74848);const f=["isNavLink","to","href","activeClassName","isActive","data-noBrokenLinkCheck","autoAddBaseUrl"];function m(e,t){var n,m,h;let g=e.isNavLink,b=e.to,y=e.href,v=e.activeClassName,w=e.isActive,k=e["data-noBrokenLinkCheck"],S=e.autoAddBaseUrl,x=void 0===S||S,A=(0,r.A)(e,f);const T=(0,i.A)().siteConfig,C=T.trailingSlash,E=T.baseUrl,_=T.future.experimental_router,j=(0,d.hH)().withBaseUrl,P=(0,u.A)(),R=(0,o.useRef)(null);(0,o.useImperativeHandle)(t,()=>R.current);const $=b||y;const O=(0,l.A)($),D=null==$?void 0:$.replace("pathname://","");let L=void 0!==D?(I=D,x&&(e=>e.startsWith("/"))(I)?j(I):I):void 0;var I,N;"hash"===_&&null!=(n=L)&&n.startsWith("./")&&(L=null==(N=L)?void 0:N.slice(1));L&&O&&(L=(0,s.Ks)(L,{trailingSlash:C,baseUrl:E}));const F=(0,o.useRef)(!1),B=g?a.k2:a.N_,M=c.default.canUseIntersectionObserver,z=(0,o.useRef)(void 0),q=()=>{F.current||null==L||(window.docusaurus.preload(L),F.current=!0)};(0,o.useEffect)(()=>(!M&&O&&c.default.canUseDOM&&null!=L&&window.docusaurus.prefetch(L),()=>{M&&z.current&&z.current.disconnect()}),[z,L,M,O]);const U=null!=(m=null==(h=L)?void 0:h.startsWith("#"))&&m,H=!A.target||"_self"===A.target,G=!L||!O||!H||U&&"hash"!==_;k||!U&&G||P.collectLink(L),A.id&&P.collectAnchor(A.id);const W={};return G?(0,p.jsx)("a",Object.assign({ref:R,href:L},$&&!O&&{target:"_blank",rel:"noopener noreferrer"},A,W)):(0,p.jsx)(B,Object.assign({},A,{onMouseEnter:q,onTouchStart:q,innerRef:e=>{R.current=e,M&&e&&O&&(z.current=new window.IntersectionObserver(t=>{t.forEach(t=>{e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(z.current.unobserve(e),z.current.disconnect(),null!=L&&window.docusaurus.prefetch(L))})}),z.current.observe(e))},to:L},g&&{isActive:w,activeClassName:v},W))}const h=o.forwardRef(m)},21312(e,t,n){"use strict";n.d(t,{A:()=>c,T:()=>l});var r=n(96540),o=n(74848);function a(e,t){const n=e.split(/(\{\w+\})/).map((e,n)=>{if(n%2==1){const n=null==t?void 0:t[e.slice(1,-1)];if(void 0!==n)return n}return e});return n.some(e=>(0,r.isValidElement)(e))?n.map((e,t)=>(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e).filter(e=>""!==e):n.join("")}var s=n(22654);function i(e){var t,n;let r=e.id,o=e.message;if(void 0===r&&void 0===o)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return null!=(t=null!=(n=s[null!=r?r:o])?n:o)?t:r}function l(e,t){return a(i({message:e.message,id:e.id}),t)}function c(e){let t=e.children,n=e.id,r=e.values;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");const s=i({message:t,id:n});return(0,o.jsx)(o.Fragment,{children:a(s,r)})}},17065(e,t,n){"use strict";n.d(t,{W:()=>r});const r="default"},16654(e,t,n){"use strict";function r(e){return/^(?:[A-Za-z][A-Za-z\d+.-]*:|\/\/)/.test(e)}function o(e){return void 0!==e&&!r(e)}n.d(t,{A:()=>o,z:()=>r})},86025(e,t,n){"use strict";n.d(t,{Ay:()=>i,hH:()=>s});var r=n(96540),o=n(44586),a=n(16654);function s(){const e=(0,o.A)().siteConfig,t=e.baseUrl,n=e.url,s=e.future.experimental_router,i=(0,r.useCallback)((e,r)=>function(e){let t=e.siteUrl,n=e.baseUrl,r=e.url,o=e.options,s=void 0===o?{}:o,i=s.forcePrependBaseUrl,l=void 0!==i&&i,c=s.absolute,u=void 0!==c&&c,d=e.router;if(!r||r.startsWith("#")||(0,a.z)(r))return r;if("hash"===d)return r.startsWith("/")?"."+r:"./"+r;if(l)return n+r.replace(/^\//,"");if(r===n.replace(/\/$/,""))return n;const p=r.startsWith(n)?r:n+r.replace(/^\//,"");return u?t+p:p}({siteUrl:n,baseUrl:t,url:e,options:r,router:s}),[n,t,s]);return{withBaseUrl:i}}function i(e,t){void 0===t&&(t={});return(0,s().withBaseUrl)(e,t)}},63427(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(96540);n(74848);const o=r.createContext({collectAnchor:()=>{},collectLink:()=>{}});function a(){return(0,r.useContext)(o)}},44586(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(96540),o=n(26988);function a(){return(0,r.useContext)(o.o)}},66588(e,t,n){"use strict";n.d(t,{P_:()=>s,kh:()=>a});var r=n(44586),o=n(17065);function a(e,t){void 0===t&&(t={});const n=(0,r.A)().globalData[e];if(!n&&t.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin.');return n}function s(e,t,n){void 0===t&&(t=o.W),void 0===n&&(n={});const r=a(e),s=null==r?void 0:r[t];if(!s&&n.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin with id "'+t+'".');return s}},92303(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(96540),o=n(6125);function a(){return(0,r.useContext)(o.o)}},205(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(96540);const o=n(38193).default.canUseDOM?r.useLayoutEffect:r.useEffect},36803(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(96540),o=n(53102);function a(){const e=r.useContext(o.o);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}},86921(e,t,n){"use strict";n.d(t,{A:()=>r});function r(e){const t={};return function e(n,r){Object.entries(n).forEach(n=>{let o=n[0],a=n[1];const s=r?r+"."+o:o;var i;"object"==typeof(i=a)&&i&&Object.keys(i).length>0?e(a,s):t[s]=a})}(e),t}},53102(e,t,n){"use strict";n.d(t,{W:()=>s,o:()=>a});var r=n(96540),o=n(74848);const a=r.createContext(null);function s(e){let t=e.children,n=e.value;const s=r.useContext(a),i=(0,r.useMemo)(()=>function(e){let t=e.parent,n=e.value;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}const r=Object.assign({},t.data,null==n?void 0:n.data);return{plugin:t.plugin,data:r}}({parent:s,value:n}),[s,n]);return(0,o.jsx)(a.Provider,{value:i,children:t})}},53886(e,t,n){"use strict";n.d(t,{VQ:()=>b,XK:()=>w,g1:()=>v});var r=n(96540),o=n(48295),a=n(17065),s=n(6342),i=n(70679),l=n(89532),c=n(74848);const u=e=>"docs-preferred-version-"+e,d=(e,t,n)=>{(0,i.Wf)(u(e),{persistence:t}).set(n)},p=(e,t)=>(0,i.Wf)(u(e),{persistence:t}).get(),f=(e,t)=>{(0,i.Wf)(u(e),{persistence:t}).del()};const m=r.createContext(null);function h(){const e=(0,o.Gy)(),t=(0,s.p)().docs.versionPersistence,n=(0,r.useMemo)(()=>Object.keys(e),[e]),a=(0,r.useState)(()=>(e=>Object.fromEntries(e.map(e=>[e,{preferredVersionName:null}])))(n)),i=a[0],l=a[1];(0,r.useEffect)(()=>{l(function(e){let t=e.pluginIds,n=e.versionPersistence,r=e.allDocsData;function o(e){const t=p(e,n);return r[e].versions.some(e=>e.name===t)?{preferredVersionName:t}:(f(e,n),{preferredVersionName:null})}return Object.fromEntries(t.map(e=>[e,o(e)]))}({allDocsData:e,versionPersistence:t,pluginIds:n}))},[e,t,n]);return[i,(0,r.useMemo)(()=>({savePreferredVersion:function(e,n){d(e,t,n),l(t=>Object.assign({},t,{[e]:{preferredVersionName:n}}))}}),[t])]}function g(e){let t=e.children;const n=h();return(0,c.jsx)(m.Provider,{value:n,children:t})}function b(e){let t=e.children;return(0,c.jsx)(g,{children:t})}function y(){const e=(0,r.useContext)(m);if(!e)throw new l.dV("DocsPreferredVersionContextProvider");return e}function v(e){var t;void 0===e&&(e=a.W);const n=(0,o.ht)(e),s=y(),i=s[0],l=s[1],c=i[e].preferredVersionName;return{preferredVersion:null!=(t=n.versions.find(e=>e.name===c))?t:null,savePreferredVersionName:(0,r.useCallback)(t=>{l.savePreferredVersion(e,t)},[l,e])}}function w(){const e=(0,o.Gy)(),t=y()[0];function n(n){var r;const o=e[n],a=t[n].preferredVersionName;return null!=(r=o.versions.find(e=>e.name===a))?r:null}const r=Object.keys(e);return Object.fromEntries(r.map(e=>[e,n(e)]))}},82565(e,t,n){"use strict";n.d(t,{k:()=>a,v:()=>s});var r=n(48295),o=n(53886);function a(e,t){return"docs-"+e+"-"+t}function s(){const e=(0,r.Gy)(),t=(0,r.gk)(),n=(0,o.XK)();return[...Object.keys(e).map(function(r){var o;const s=(null==t?void 0:t.activePlugin.pluginId)===r?t.activeVersion:void 0,i=n[r],l=e[r].versions.find(e=>e.isLast);return a(r,(null!=(o=null!=s?s:i)?o:l).name)})]}},60609(e,t,n){"use strict";n.d(t,{V:()=>l,t:()=>c});var r=n(96540),o=n(89532),a=n(74848);const s=Symbol("EmptyContext"),i=r.createContext(s);function l(e){let t=e.children,n=e.name,o=e.items;const s=(0,r.useMemo)(()=>n&&o?{name:n,items:o}:null,[n,o]);return(0,a.jsx)(i.Provider,{value:s,children:t})}function c(){const e=(0,r.useContext)(i);if(e===s)throw new o.dV("DocsSidebarProvider");return e}},26972(e,t,n){"use strict";n.d(t,{B5:()=>S,Nr:()=>p,OF:()=>y,QB:()=>k,Vd:()=>v,Y:()=>g,fW:()=>w,w8:()=>m});var r=n(96540),o=n(56347),a=n(22831),s=n(48295),i=n(99169),l=n(31682),c=n(53886),u=n(23025),d=n(60609);function p(e){return"link"!==e.type||e.unlisted?"category"===e.type?function(e){if(e.href&&!e.linkUnlisted)return e.href;for(const t of e.items){const e=p(t);if(e)return e}}(e):void 0:e.href}const f=(e,t)=>void 0!==e&&(0,i.ys)(e,t);function m(e,t){return"link"===e.type?f(e.href,t):"category"===e.type&&(f(e.href,t)||((e,t)=>e.some(e=>m(e,t)))(e.items,t))}function h(e,t){switch(e.type){case"category":return m(e,t)||void 0!==e.href&&!e.linkUnlisted||e.items.some(e=>h(e,t));case"link":return!e.unlisted||m(e,t);default:return!0}}function g(e,t){return(0,r.useMemo)(()=>e.filter(e=>h(e,t)),[e,t])}function b(e){let t=e.sidebarItems,n=e.pathname,r=e.onlyCategories,o=void 0!==r&&r;const a=[];return function e(t){for(const r of t)if("category"===r.type){if((0,i.ys)(r.href,n)||e(r.items))return a.unshift(r),!0}else if("link"===r.type&&r.docId&&(0,i.ys)(r.href,n))return o||a.unshift(r),!0;return!1}(t),a}function y(){var e;const t=(0,d.t)(),n=(0,o.zy)().pathname;return!1!==(null==(e=(0,s.vT)())?void 0:e.pluginData.breadcrumbs)&&t?b({sidebarItems:t.items,pathname:n}):null}function v(e){const t=(0,s.zK)(e).activeVersion,n=(0,c.g1)(e).preferredVersion,o=(0,s.r7)(e);return(0,r.useMemo)(()=>(0,l.sb)([t,n,o].filter(Boolean)),[t,n,o])}function w(e,t){const n=v(t);return(0,r.useMemo)(()=>{const t=n.flatMap(e=>e.sidebars?Object.entries(e.sidebars):[]),r=t.find(t=>t[0]===e);if(!r)throw new Error("Can't find any sidebar with id \""+e+'" in version'+(n.length>1?"s":"")+" "+n.map(e=>e.name).join(", ")+'".\nAvailable sidebar ids are:\n- '+t.map(e=>e[0]).join("\n- "));return r[1]},[e,n])}function k(e,t){const n=v(t);return(0,r.useMemo)(()=>{const t=n.flatMap(e=>e.docs),r=t.find(t=>t.id===e);if(!r){if(n.flatMap(e=>e.draftIds).includes(e))return null;throw new Error("Couldn't find any doc with id \""+e+'" in version'+(n.length>1?"s":"")+' "'+n.map(e=>e.name).join(", ")+'".\nAvailable doc ids are:\n- '+(0,l.sb)(t.map(e=>e.id)).join("\n- "))}return r},[e,n])}function S(e){let t=e.route;const n=(0,o.zy)(),r=(0,u.r)(),s=t.routes,i=s.find(e=>(0,o.B6)(n.pathname,e));if(!i)return null;const l=i.sidebar,c=l?r.docsSidebars[l]:void 0;return{docElement:(0,a.v)(s),sidebarName:l,sidebarItems:c}}},23025(e,t,n){"use strict";n.d(t,{n:()=>i,r:()=>l});var r=n(96540),o=n(89532),a=n(74848);const s=r.createContext(null);function i(e){let t=e.children,n=e.version;return(0,a.jsx)(s.Provider,{value:n,children:t})}function l(){const e=(0,r.useContext)(s);if(null===e)throw new o.dV("DocsVersionProvider");return e}},48295(e,t,n){"use strict";n.d(t,{zK:()=>h,vT:()=>d,gk:()=>p,Gy:()=>c,HW:()=>g,ht:()=>u,r7:()=>m,jh:()=>f});var r=n(56347),o=n(66588);const a=e=>e.versions.find(e=>e.isLast);function s(e,t){return[...e.versions].sort((e,t)=>e.path===t.path?0:e.path.includes(t.path)?-1:t.path.includes(e.path)?1:0).find(e=>!!(0,r.B6)(t,{path:e.path,exact:!1,strict:!1}))}function i(e,t){const n=s(e,t),o=null==n?void 0:n.docs.find(e=>!!(0,r.B6)(t,{path:e.path,exact:!0,strict:!1}));return{activeVersion:n,activeDoc:o,alternateDocVersions:o?function(t){const n={};return e.versions.forEach(e=>{e.docs.forEach(r=>{r.id===t&&(n[e.name]=r)})}),n}(o.id):{}}}const l={},c=()=>{var e;return null!=(e=(0,o.kh)("docusaurus-plugin-content-docs"))?e:l},u=e=>{try{return(0,o.P_)("docusaurus-plugin-content-docs",e,{failfast:!0})}catch(t){throw new Error("You are using a feature of the Docusaurus docs plugin, but this plugin does not seem to be enabled"+("Default"===e?"":" (pluginId="+e),{cause:t})}};function d(e){void 0===e&&(e={});return function(e,t,n){void 0===n&&(n={});const o=Object.entries(e).sort((e,t)=>t[1].path.localeCompare(e[1].path)).find(e=>{let n=e[1];return!!(0,r.B6)(t,{path:n.path,exact:!1,strict:!1})}),a=o?{pluginId:o[0],pluginData:o[1]}:void 0;if(!a&&n.failfast)throw new Error("Can't find active docs plugin for \""+t+'" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: '+Object.values(e).map(e=>e.path).join(", "));return a}(c(),(0,r.zy)().pathname,e)}function p(e){void 0===e&&(e={});const t=d(e),n=(0,r.zy)().pathname;if(!t)return;return{activePlugin:t,activeVersion:s(t.pluginData,n)}}function f(e){return u(e).versions}function m(e){const t=u(e);return a(t)}function h(e){return i(u(e),(0,r.zy)().pathname)}function g(e){return function(e,t){const n=a(e);return{latestDocSuggestion:i(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(u(e),(0,r.zy)().pathname)}},76294(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(5947),o=n.n(r);o().configure({showSpinner:!1});const a={onRouteUpdate(e){let t=e.location,n=e.previousLocation;if(n&&t.pathname!==n.pathname){const e=window.setTimeout(()=>{o().start()},200);return()=>window.clearTimeout(e)}},onRouteDidUpdate(){o().done()}}},26134(e,t,n){"use strict";var r=n(71765),o=n(4784);!function(e){const t=o.default.themeConfig.prism.additionalLanguages,r=globalThis.Prism;globalThis.Prism=e,t.forEach(e=>{"php"===e&&n(19700),n(18692)("./prism-"+e)}),delete globalThis.Prism,void 0!==r&&(globalThis.Prism=e)}(r.My)},51107(e,t,n){"use strict";n.d(t,{A:()=>d});var r=n(98587),o=(n(96540),n(34164)),a=n(21312),s=n(73535),i=n(28774),l=n(63427),c=n(74848);const u=["as","id"];function d(e){let t=e.as,n=e.id,d=(0,r.A)(e,u);const p=(0,l.A)(),f=(0,s.v)(n);if("h1"===t||!n)return(0,c.jsx)(t,Object.assign({},d,{id:void 0}));p.collectAnchor(n);const m=(0,a.T)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof d.children?d.children:n});return(0,c.jsxs)(t,Object.assign({},d,{className:(0,o.A)("anchor",f,d.className),id:n,children:[d.children,(0,c.jsx)(i.A,{className:"hash-link",to:"#"+n,"aria-label":m,title:m,translate:"no",children:"\u200b"})]}))}},43186(e,t,n){"use strict";n.d(t,{A:()=>s});n(96540);var r=n(21312);const o="iconExternalLink_nPIU";var a=n(74848);function s(e){let t=e.width,n=void 0===t?13.5:t,s=e.height,i=void 0===s?13.5:s;return(0,a.jsx)("svg",{width:n,height:i,"aria-label":(0,r.T)({id:"theme.IconExternalLink.ariaLabel",message:"(opens in new tab)",description:"The ARIA label for the external link icon"}),className:o,children:(0,a.jsx)("use",{href:"#theme-svg-external-link"})})}},36882(e,t,n){"use strict";n.d(t,{A:()=>En});var r=n(96540),o=n(34164),a=n(67489),s=n(45500),i=n(56347),l=n(21312),c=n(75062),u=n(74848);const d="__docusaurus_skipToContent_fallback";function p(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function f(){const e=(0,r.useRef)(null),t=(0,i.W6)().action,n=(0,r.useCallback)(e=>{e.preventDefault();const t=null!=(n=document.querySelector("main:first-of-type"))?n:document.getElementById(d);var n;t&&p(t)},[]);return(0,c.$)(n=>{let r=n.location;e.current&&!r.hash&&"PUSH"===t&&p(e.current)}),{containerRef:e,onClick:n}}const m=(0,l.T)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function h(e){var t;const n=null!=(t=e.children)?t:m,r=f(),o=r.containerRef,a=r.onClick;return(0,u.jsx)("div",{ref:o,role:"region","aria-label":m,children:(0,u.jsx)("a",Object.assign({},e,{href:"#"+d,onClick:a,children:n}))})}var g=n(17559);const b="skipToContent_fXgn";function y(){return(0,u.jsx)(h,{className:b})}var v=n(6342),w=n(65041),k=n(98587);const S=["width","height","color","strokeWidth","className"];function x(e){let t=e.width,n=void 0===t?21:t,r=e.height,o=void 0===r?21:r,a=e.color,s=void 0===a?"currentColor":a,i=e.strokeWidth,l=void 0===i?1.2:i,c=(e.className,(0,k.A)(e,S));return(0,u.jsx)("svg",Object.assign({viewBox:"0 0 15 15",width:n,height:o},c,{children:(0,u.jsx)("g",{stroke:s,strokeWidth:l,children:(0,u.jsx)("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})})}))}const A="closeButton_CVFx";function T(e){return(0,u.jsx)("button",Object.assign({type:"button","aria-label":(0,l.T)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"})},e,{className:(0,o.A)("clean-btn close",A,e.className),children:(0,u.jsx)(x,{width:14,height:14,strokeWidth:3.1})}))}const C="content_knG7";function E(e){const t=(0,v.p)().announcementBar.content;return(0,u.jsx)("div",Object.assign({},e,{className:(0,o.A)(C,e.className),dangerouslySetInnerHTML:{__html:t}}))}const _="announcementBar_mb4j",j="announcementBarPlaceholder_vyr4",P="announcementBarClose_gvF7",R="announcementBarContent_xLdY";function $(){const e=(0,v.p)().announcementBar,t=(0,w.M)(),n=t.isActive,r=t.close;if(!n)return null;const a=e.backgroundColor,s=e.textColor,i=e.isCloseable;return(0,u.jsxs)("div",{className:(0,o.A)(g.G.announcementBar.container,_),style:{backgroundColor:a,color:s},role:"banner",children:[i&&(0,u.jsx)("div",{className:j}),(0,u.jsx)(E,{className:R}),i&&(0,u.jsx)(T,{onClick:r,className:P})]})}var O=n(22069),D=n(23104);var L=n(89532),I=n(75600);const N=r.createContext(null);function F(e){let t=e.children;const n=function(){const e=(0,O.M)(),t=(0,I.YL)(),n=(0,r.useState)(!1),o=n[0],a=n[1],s=null!==t.component,i=(0,L.ZC)(s);return(0,r.useEffect)(()=>{s&&!i&&a(!0)},[s,i]),(0,r.useEffect)(()=>{s?e.shown||a(!0):a(!1)},[e.shown,s]),(0,r.useMemo)(()=>[o,a],[o])}();return(0,u.jsx)(N.Provider,{value:n,children:t})}function B(e){if(e.component){const t=e.component;return(0,u.jsx)(t,Object.assign({},e.props))}}function M(){const e=(0,r.useContext)(N);if(!e)throw new L.dV("NavbarSecondaryMenuDisplayProvider");const t=e[0],n=e[1],o=(0,r.useCallback)(()=>n(!1),[n]),a=(0,I.YL)();return(0,r.useMemo)(()=>({shown:t,hide:o,content:B(a)}),[o,a,t])}function z(e){let t=e.children,n=e.inert;return(0,u.jsx)("div",Object.assign({className:(0,o.A)(g.G.layout.navbar.mobileSidebar.panel,"navbar-sidebar__item menu")},function(e){return parseInt(r.version.split(".")[0],10)<19?{inert:e?"":void 0}:{inert:e}}(n),{children:t}))}function q(e){let t=e.header,n=e.primaryMenu,r=e.secondaryMenu;const a=M().shown;return(0,u.jsxs)("div",{className:(0,o.A)(g.G.layout.navbar.mobileSidebar.container,"navbar-sidebar"),children:[t,(0,u.jsxs)("div",{className:(0,o.A)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":a}),children:[(0,u.jsx)(z,{inert:a,children:n}),(0,u.jsx)(z,{inert:!a,children:r})]})]})}var U=n(95293),H=n(92303);function G(e){return(0,u.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:24,height:24},e,{children:(0,u.jsx)("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"})}))}function W(e){return(0,u.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:24,height:24},e,{children:(0,u.jsx)("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"})}))}function V(e){return(0,u.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:24,height:24},e,{children:(0,u.jsx)("path",{fill:"currentColor",d:"m12 21c4.971 0 9-4.029 9-9s-4.029-9-9-9-9 4.029-9 9 4.029 9 9 9zm4.95-13.95c1.313 1.313 2.05 3.093 2.05 4.95s-0.738 3.637-2.05 4.95c-1.313 1.313-3.093 2.05-4.95 2.05v-14c1.857 0 3.637 0.737 4.95 2.05z"})}))}const K="toggle_vylO",Z="toggleButton_gllP",Q="toggleIcon_g3eP",Y="systemToggleIcon_QzmC",X="lightToggleIcon_pyhR",J="darkToggleIcon_wfgR",ee="toggleButtonDisabled_aARS";function te(e){switch(e){case null:return(0,l.T)({message:"system mode",id:"theme.colorToggle.ariaLabel.mode.system",description:"The name for the system color mode"});case"light":return(0,l.T)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"});case"dark":return(0,l.T)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"});default:throw new Error("unexpected color mode "+e)}}function ne(e){return(0,l.T)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the color mode toggle"},{mode:te(e)})}function re(){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(G,{"aria-hidden":!0,className:(0,o.A)(Q,X)}),(0,u.jsx)(W,{"aria-hidden":!0,className:(0,o.A)(Q,J)}),(0,u.jsx)(V,{"aria-hidden":!0,className:(0,o.A)(Q,Y)})]})}function oe(e){let t=e.className,n=e.buttonClassName,r=e.respectPrefersColorScheme,a=e.value,s=e.onChange;const i=(0,H.A)();return(0,u.jsx)("div",{className:(0,o.A)(K,t),children:(0,u.jsx)("button",{className:(0,o.A)("clean-btn",Z,!i&&ee,n),type:"button",onClick:()=>s(function(e,t){if(!t)return"dark"===e?"light":"dark";switch(e){case null:return"light";case"light":return"dark";case"dark":return null;default:throw new Error("unexpected color mode "+e)}}(a,r)),disabled:!i,title:te(a),"aria-label":ne(a),children:(0,u.jsx)(re,{})})})}const ae=r.memo(oe),se="darkNavbarColorModeToggle_X3D1";function ie(e){let t=e.className;const n=(0,v.p)().navbar.style,r=(0,v.p)().colorMode,o=r.disableSwitch,a=r.respectPrefersColorScheme,s=(0,U.G)(),i=s.colorModeChoice,l=s.setColorMode;return o?null:(0,u.jsx)(ae,{className:t,buttonClassName:"dark"===n?se:void 0,respectPrefersColorScheme:a,value:i,onChange:l})}var le=n(23465);function ce(){return(0,u.jsx)(le.A,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function ue(){const e=(0,O.M)();return(0,u.jsx)("button",{type:"button","aria-label":(0,l.T)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:()=>e.toggle(),children:(0,u.jsx)(x,{color:"var(--ifm-color-emphasis-600)"})})}function de(){return(0,u.jsxs)("div",{className:"navbar-sidebar__brand",children:[(0,u.jsx)(ce,{}),(0,u.jsx)(ie,{className:"margin-right--md"}),(0,u.jsx)(ue,{})]})}var pe=n(28774),fe=n(86025),me=n(16654),he=n(91252),ge=n(43186);const be=["activeBasePath","activeBaseRegex","to","href","label","html","isDropdownLink","prependBaseUrlToHref"];function ye(e){let t=e.activeBasePath,n=e.activeBaseRegex,r=e.to,o=e.href,a=e.label,s=e.html,i=e.isDropdownLink,l=e.prependBaseUrlToHref,c=(0,k.A)(e,be);const d=(0,fe.Ay)(r),p=(0,fe.Ay)(t),f=(0,fe.Ay)(o,{forcePrependBaseUrl:!0}),m=a&&o&&!(0,me.A)(o),h=s?{dangerouslySetInnerHTML:{__html:s}}:{children:(0,u.jsxs)(u.Fragment,{children:[a,m&&(0,u.jsx)(ge.A,Object.assign({},i&&{width:12,height:12}))]})};return o?(0,u.jsx)(pe.A,Object.assign({href:l?f:o},c,h)):(0,u.jsx)(pe.A,Object.assign({to:d,isNavLink:!0},(t||n)&&{isActive:(e,t)=>n?(0,he.G)(n,t.pathname):t.pathname.startsWith(p)},c,h))}const ve=["className","isDropdownItem"];function we(e){let t=e.className,n=(e.isDropdownItem,(0,k.A)(e,ve));return(0,u.jsx)("li",{className:"menu__list-item",children:(0,u.jsx)(ye,Object.assign({className:(0,o.A)("menu__link",t)},n))})}const ke=["className","isDropdownItem"];function Se(e){let t=e.className,n=e.isDropdownItem,r=void 0!==n&&n,a=(0,k.A)(e,ke);const s=(0,u.jsx)(ye,Object.assign({className:(0,o.A)(r?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:r},a));return r?(0,u.jsx)("li",{children:s}):s}const xe=["mobile","position"];function Ae(e){var t;let n=e.mobile,r=void 0!==n&&n,o=(e.position,(0,k.A)(e,xe));const a=r?we:Se;return(0,u.jsx)(a,Object.assign({},o,{activeClassName:null!=(t=o.activeClassName)?t:r?"menu__link--active":"navbar__link--active"}))}var Te=n(41422),Ce=n(99169),Ee=n(44586);const _e="dropdownNavbarItemMobile_J0Sd",je=["items","className","position","onClick"];function Pe(e,t){return e.some(e=>function(e,t){return!!(0,Ce.ys)(e.to,t)||!!(0,he.G)(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t))}function Re(e){let t=e.collapsed,n=e.onClick;return(0,u.jsx)("button",{"aria-label":t?(0,l.T)({id:"theme.navbar.mobileDropdown.collapseButton.expandAriaLabel",message:"Expand the dropdown",description:"The ARIA label of the button to expand the mobile dropdown navbar item"}):(0,l.T)({id:"theme.navbar.mobileDropdown.collapseButton.collapseAriaLabel",message:"Collapse the dropdown",description:"The ARIA label of the button to collapse the mobile dropdown navbar item"}),"aria-expanded":!t,type:"button",className:"clean-btn menu__caret",onClick:n})}function $e(e){var t;let n=e.items,a=e.className,s=(e.position,e.onClick),l=(0,k.A)(e,je);const c=function(){const e=(0,Ee.A)().siteConfig.baseUrl;return(0,i.zy)().pathname.replace(e,"/")}(),d=(0,Ce.ys)(l.to,c),p=Pe(n,c),f=function(e){let t=e.active;const n=(0,Te.u)({initialState:()=>!t}),o=n.collapsed,a=n.toggleCollapsed,s=n.setCollapsed;return(0,r.useEffect)(()=>{t&&s(!1)},[t,s]),{collapsed:o,toggleCollapsed:a}}({active:d||p}),m=f.collapsed,h=f.toggleCollapsed,g=l.to?void 0:"#";return(0,u.jsxs)("li",{className:(0,o.A)("menu__list-item",{"menu__list-item--collapsed":m}),children:[(0,u.jsxs)("div",{className:(0,o.A)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":d}),children:[(0,u.jsx)(ye,Object.assign({role:"button",className:(0,o.A)(_e,"menu__link menu__link--sublist",a),href:g},l,{onClick:e=>{"#"===g&&e.preventDefault(),h()},children:null!=(t=l.children)?t:l.label})),(0,u.jsx)(Re,{collapsed:m,onClick:e=>{e.preventDefault(),h()}})]}),(0,u.jsx)(Te.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:m,children:n.map((e,t)=>(0,r.createElement)(Mt,Object.assign({mobile:!0,isDropdownItem:!0,onClick:s,activeClassName:"menu__link--active"},e,{key:t})))})]})}const Oe=["items","position","className","onClick"];function De(e){var t;let n=e.items,a=e.position,s=e.className,i=(e.onClick,(0,k.A)(e,Oe));const l=(0,r.useRef)(null),c=(0,r.useState)(!1),d=c[0],p=c[1];return(0,r.useEffect)(()=>{const e=e=>{l.current&&!l.current.contains(e.target)&&p(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}},[l]),(0,u.jsxs)("div",{ref:l,className:(0,o.A)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===a,"dropdown--show":d}),children:[(0,u.jsx)(ye,Object.assign({"aria-haspopup":"true","aria-expanded":d,role:"button",href:i.to?void 0:"#",className:(0,o.A)("navbar__link",s)},i,{onClick:i.to?void 0:e=>e.preventDefault(),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),p(!d))},children:null!=(t=i.children)?t:i.label})),(0,u.jsx)("ul",{className:"dropdown__menu",children:n.map((e,t)=>(0,r.createElement)(Mt,Object.assign({isDropdownItem:!0,activeClassName:"dropdown__link--active"},e,{key:t})))})]})}const Le=["mobile"];function Ie(e){let t=e.mobile,n=void 0!==t&&t,r=(0,k.A)(e,Le);const o=n?$e:De;return(0,u.jsx)(o,Object.assign({},r))}var Ne=n(32131),Fe=n(57485);const Be=["width","height"];function Me(e){let t=e.width,n=void 0===t?20:t,r=e.height,o=void 0===r?20:r,a=(0,k.A)(e,Be);return(0,u.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:n,height:o,"aria-hidden":!0},a,{children:(0,u.jsx)("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"})}))}const ze="iconLanguage_nlXk",qe=["mobile","dropdownItemsBefore","dropdownItemsAfter","queryString"];function Ue(){const e=(0,Ee.A)(),t=e.siteConfig,n=e.i18n.localeConfigs,r=(0,Ne.o)(),o=(0,Fe.Hl)(e=>e.location.search),a=(0,Fe.Hl)(e=>e.location.hash),s=e=>{const t=n[e];if(!t)throw new Error("Docusaurus bug, no locale config found for locale="+e);return t};return{getURL:(e,n)=>{const i=(0,Fe.jy)([o,n.queryString],"append");return""+(e=>s(e).url===t.url?"pathname://"+r.createUrl({locale:e,fullyQualified:!1}):r.createUrl({locale:e,fullyQualified:!0}))(e)+i+a},getLabel:e=>s(e).label,getLang:e=>s(e).htmlLang}}var He=n(40961);function Ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n"docusaurus_tag:"+e)]}function mt(e,t){if(void 0===e)return t;if(void 0===t)return e;const n=e=>"string"==typeof e?[e]:e;return[...n(e),...n(t)]}const ht={button:{buttonText:(0,l.T)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"}),buttonAriaLabel:(0,l.T)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"})},modal:{searchBox:{resetButtonTitle:(0,l.T)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),resetButtonAriaLabel:(0,l.T)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),cancelButtonText:(0,l.T)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"}),cancelButtonAriaLabel:(0,l.T)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"}),clearButtonTitle:(0,l.T)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),clearButtonAriaLabel:(0,l.T)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),closeButtonText:(0,l.T)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"}),closeButtonAriaLabel:(0,l.T)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"}),placeholderText:(0,l.T)({id:"theme.SearchModal.searchBox.placeholderText",message:"Search docs",description:"The placeholder text for the main search input field"}),placeholderTextAskAi:(0,l.T)({id:"theme.SearchModal.searchBox.placeholderTextAskAi",message:"Ask another question...",description:"The placeholder text when in AI question mode"}),placeholderTextAskAiStreaming:(0,l.T)({id:"theme.SearchModal.searchBox.placeholderTextAskAiStreaming",message:"Answering...",description:"The placeholder text for search box when AI is streaming an answer"}),enterKeyHint:(0,l.T)({id:"theme.SearchModal.searchBox.enterKeyHint",message:"search",description:"The hint for the search box enter key text"}),enterKeyHintAskAi:(0,l.T)({id:"theme.SearchModal.searchBox.enterKeyHintAskAi",message:"enter",description:"The hint for the Ask AI search box enter key text"}),searchInputLabel:(0,l.T)({id:"theme.SearchModal.searchBox.searchInputLabel",message:"Search",description:"The ARIA label for search input"}),backToKeywordSearchButtonText:(0,l.T)({id:"theme.SearchModal.searchBox.backToKeywordSearchButtonText",message:"Back to keyword search",description:"The text for back to keyword search button"}),backToKeywordSearchButtonAriaLabel:(0,l.T)({id:"theme.SearchModal.searchBox.backToKeywordSearchButtonAriaLabel",message:"Back to keyword search",description:"The ARIA label for back to keyword search button"})},startScreen:{recentSearchesTitle:(0,l.T)({id:"theme.SearchModal.startScreen.recentSearchesTitle",message:"Recent",description:"The title for recent searches"}),noRecentSearchesText:(0,l.T)({id:"theme.SearchModal.startScreen.noRecentSearchesText",message:"No recent searches",description:"The text when there are no recent searches"}),saveRecentSearchButtonTitle:(0,l.T)({id:"theme.SearchModal.startScreen.saveRecentSearchButtonTitle",message:"Save this search",description:"The title for save recent search button"}),removeRecentSearchButtonTitle:(0,l.T)({id:"theme.SearchModal.startScreen.removeRecentSearchButtonTitle",message:"Remove this search from history",description:"The title for remove recent search button"}),favoriteSearchesTitle:(0,l.T)({id:"theme.SearchModal.startScreen.favoriteSearchesTitle",message:"Favorite",description:"The title for favorite searches"}),removeFavoriteSearchButtonTitle:(0,l.T)({id:"theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle",message:"Remove this search from favorites",description:"The title for remove favorite search button"}),recentConversationsTitle:(0,l.T)({id:"theme.SearchModal.startScreen.recentConversationsTitle",message:"Recent conversations",description:"The title for recent conversations"}),removeRecentConversationButtonTitle:(0,l.T)({id:"theme.SearchModal.startScreen.removeRecentConversationButtonTitle",message:"Remove this conversation from history",description:"The title for remove recent conversation button"})},errorScreen:{titleText:(0,l.T)({id:"theme.SearchModal.errorScreen.titleText",message:"Unable to fetch results",description:"The title for error screen"}),helpText:(0,l.T)({id:"theme.SearchModal.errorScreen.helpText",message:"You might want to check your network connection.",description:"The help text for error screen"})},resultsScreen:{askAiPlaceholder:(0,l.T)({id:"theme.SearchModal.resultsScreen.askAiPlaceholder",message:"Ask AI: ",description:"The placeholder text for Ask AI input"})},askAiScreen:{disclaimerText:(0,l.T)({id:"theme.SearchModal.askAiScreen.disclaimerText",message:"Answers are generated with AI which can make mistakes. Verify responses.",description:"The disclaimer text for AI answers"}),relatedSourcesText:(0,l.T)({id:"theme.SearchModal.askAiScreen.relatedSourcesText",message:"Related sources",description:"The text for related sources"}),thinkingText:(0,l.T)({id:"theme.SearchModal.askAiScreen.thinkingText",message:"Thinking...",description:"The text when AI is thinking"}),copyButtonText:(0,l.T)({id:"theme.SearchModal.askAiScreen.copyButtonText",message:"Copy",description:"The text for copy button"}),copyButtonCopiedText:(0,l.T)({id:"theme.SearchModal.askAiScreen.copyButtonCopiedText",message:"Copied!",description:"The text for copy button when copied"}),copyButtonTitle:(0,l.T)({id:"theme.SearchModal.askAiScreen.copyButtonTitle",message:"Copy",description:"The title for copy button"}),likeButtonTitle:(0,l.T)({id:"theme.SearchModal.askAiScreen.likeButtonTitle",message:"Like",description:"The title for like button"}),dislikeButtonTitle:(0,l.T)({id:"theme.SearchModal.askAiScreen.dislikeButtonTitle",message:"Dislike",description:"The title for dislike button"}),thanksForFeedbackText:(0,l.T)({id:"theme.SearchModal.askAiScreen.thanksForFeedbackText",message:"Thanks for your feedback!",description:"The text for thanks for feedback"}),preToolCallText:(0,l.T)({id:"theme.SearchModal.askAiScreen.preToolCallText",message:"Searching...",description:"The text before tool call"}),duringToolCallText:(0,l.T)({id:"theme.SearchModal.askAiScreen.duringToolCallText",message:"Searching for ",description:"The text during tool call"}),afterToolCallText:(0,l.T)({id:"theme.SearchModal.askAiScreen.afterToolCallText",message:"Searched for",description:"The text after tool call"})},footer:{selectText:(0,l.T)({id:"theme.SearchModal.footer.selectText",message:"Select",description:"The select text for footer"}),submitQuestionText:(0,l.T)({id:"theme.SearchModal.footer.submitQuestionText",message:"Submit question",description:"The submit question text for footer"}),selectKeyAriaLabel:(0,l.T)({id:"theme.SearchModal.footer.selectKeyAriaLabel",message:"Enter key",description:"The ARIA label for select key in footer"}),navigateText:(0,l.T)({id:"theme.SearchModal.footer.navigateText",message:"Navigate",description:"The navigate text for footer"}),navigateUpKeyAriaLabel:(0,l.T)({id:"theme.SearchModal.footer.navigateUpKeyAriaLabel",message:"Arrow up",description:"The ARIA label for navigate up key in footer"}),navigateDownKeyAriaLabel:(0,l.T)({id:"theme.SearchModal.footer.navigateDownKeyAriaLabel",message:"Arrow down",description:"The ARIA label for navigate down key in footer"}),closeText:(0,l.T)({id:"theme.SearchModal.footer.closeText",message:"Close",description:"The close text for footer"}),closeKeyAriaLabel:(0,l.T)({id:"theme.SearchModal.footer.closeKeyAriaLabel",message:"Escape key",description:"The ARIA label for close key in footer"}),poweredByText:(0,l.T)({id:"theme.SearchModal.footer.searchByText",message:"Powered by",description:"The 'Powered by' text for footer"}),searchByText:(0,l.T)({id:"theme.SearchModal.footer.searchByText",message:"Powered by",description:"The 'Powered by' text for footer"}),backToSearchText:(0,l.T)({id:"theme.SearchModal.footer.backToSearchText",message:"Back to search",description:"The back to search text for footer"})},noResultsScreen:{noResultsText:(0,l.T)({id:"theme.SearchModal.noResultsScreen.noResultsText",message:"No results found for",description:"The text when there are no results"}),suggestedQueryText:(0,l.T)({id:"theme.SearchModal.noResultsScreen.suggestedQueryText",message:"Try searching for",description:"The text for suggested query"}),reportMissingResultsText:(0,l.T)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsText",message:"Believe this query should return results?",description:"The text for reporting missing results"}),reportMissingResultsLinkText:(0,l.T)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsLinkText",message:"Let us know.",description:"The link text for reporting missing results"})}},placeholder:(0,l.T)({id:"theme.SearchModal.placeholder",message:"Search docs",description:"The placeholder of the input of the DocSearch pop-up modal"})},gt="4.6.3".startsWith("4.");function bt(e){var t,n;const o=(0,r.useState)(!1),a=o[0],s=o[1],i=function(){const e=(0,pt.c)().algolia.contextualSearch,t=ft();return e?t:void 0}(),l=(0,r.useMemo)(()=>function(e,t){var n;if(!e)return;if(!t)return e;const r=null==(n=e.searchParameters)?void 0:n.facetFilters;return Object.assign({},e,{searchParameters:Object.assign({},e.searchParameters,{facetFilters:mt(r,t)})})}(e.askAi,i),[e.askAi,i]),c=Boolean(l),u=a&>?null==(t=ht.modal)||null==(t=t.searchBox)?void 0:t.placeholderTextAskAi:(null==(n=ht.modal)||null==(n=n.searchBox)?void 0:n.placeholderText)||(null==e?void 0:e.placeholder),d=(0,r.useCallback)(e=>{s(e)},[]);return{canHandleAskAi:c,isAskAiActive:a,currentPlaceholder:u,onAskAiToggle:d,askAi:l,extraAskAiProps:{askAi:l,canHandleAskAi:c,isAskAiActive:a,onAskAiToggle:d}}}const yt=["contextualSearch"],vt=["externalUrlRegex"];let wt=null;function kt(){return wt?Promise.resolve():Promise.all([n.e(2693).then(n.bind(n,92693)),Promise.all([n.e(1869),n.e(8913)]).then(n.bind(n,58913)),Promise.all([n.e(1869),n.e(416)]).then(n.bind(n,90416))]).then(e=>{let t=e[0].DocSearchModal;wt=t})}function St(e){let t=e.hit,n=e.children;return(0,u.jsx)(pe.A,{to:t.url,children:n})}function xt(e){let t=e.state,n=e.onClose;const r=(0,lt.w)();return(0,u.jsx)(pe.A,{to:r(t.query),onClick:n,children:(0,u.jsx)(l.A,{id:"theme.SearchBar.seeAll",values:{count:t.context.nbHits},children:"See all {count} results"})})}function At(e){var t,n,o,a;let s=e.externalUrlRegex,l=(0,k.A)(e,vt);const c=function(e){let t=e.externalUrlRegex;const n=(0,i.W6)();return(0,r.useState)(()=>({navigate(e){(0,he.G)(t,e.itemUrl)?window.location.href=e.itemUrl:n.push(e.itemUrl)}}))[0]}({externalUrlRegex:s}),d=function(e){var t,n;let r=e.contextualSearch,o=(0,k.A)(e,yt);const a=ft(),s=null!=(t=null==(n=o.searchParameters)?void 0:n.facetFilters)?t:[],i=r?mt(a,s):s;return Object.assign({},o.searchParameters,{facetFilters:i})}(Object.assign({},l)),p=function(e){const t=(0,ct.C)();return(0,r.useState)(()=>n=>e.transformItems?e.transformItems(n):n.map(e=>Object.assign({},e,{url:t(e.url)})))[0]}(l),f=function(){const e=(0,Ee.A)().siteMetadata.docusaurusVersion;return(0,r.useCallback)(t=>(t.addAlgoliaAgent("docusaurus",e),t),[e])}(),m=(0,r.useRef)(null),h=(0,r.useRef)(null),g=(0,r.useState)(!1),b=g[0],y=g[1],v=(0,r.useState)(void 0),w=v[0],S=v[1],x=bt(l),A=x.isAskAiActive,T=x.currentPlaceholder,C=x.onAskAiToggle,E=x.extraAskAiProps,_=(0,r.useCallback)(()=>{if(!m.current){const e=document.createElement("div");m.current=e,document.body.insertBefore(e,document.body.firstChild)}},[]),j=(0,r.useCallback)(()=>{_(),kt().then(()=>y(!0))},[_]),P=(0,r.useCallback)(()=>{var e;y(!1),null==(e=h.current)||e.focus(),S(void 0),C(!1)},[C]),R=(0,r.useCallback)(e=>{"f"===e.key&&(e.metaKey||e.ctrlKey)||(e.preventDefault(),S(e.key),j())},[j]),$=function(e){let t=e.closeModal;return(0,r.useMemo)(()=>e=>{let n=e.state;return(0,u.jsx)(xt,{state:n,onClose:t})},[t])}({closeModal:P});return function(e){var t,n=e.isOpen,o=e.onOpen,a=e.onClose,s=e.isAskAiActive,i=e.onAskAiToggle,l=(t=e.keyboardShortcuts,at(at({},st),t));r.useEffect(function(){function e(e){var t;if(n&&"Escape"===e.code&&s)i(!1);else{var r=l["Ctrl/Cmd+K"]&&"k"===(null===(t=e.key)||void 0===t?void 0:t.toLowerCase())&&(e.metaKey||e.ctrlKey),c=l["/"]&&"/"===e.key;("Escape"===e.code&&n||r||!function(e){var t=e.composedPath()[0],n=t.tagName;return t.isContentEditable||"INPUT"===n||"SELECT"===n||"TEXTAREA"===n}(e)&&c&&!n)&&(e.preventDefault(),n?a():document.body.classList.contains("DocSearch--active")||o())}}return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}},[n,o,a,s,i,l])}({isOpen:b,onOpen:j,onClose:P,onInput:R,searchButtonRef:h,isAskAiActive:null!=A&&A,onAskAiToggle:null!=C?C:()=>{}}),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(it.A,{children:(0,u.jsx)("link",{rel:"preconnect",href:"https://"+l.appId+"-dsn.algolia.net",crossOrigin:"anonymous"})}),(0,u.jsx)(tt,{onTouchStart:kt,onFocus:kt,onMouseOver:kt,onClick:j,ref:h,translations:null!=(t=null==(n=l.translations)?void 0:n.button)?t:ht.button}),b&&wt&&m.current&&(0,He.createPortal)((0,u.jsx)(wt,Object.assign({onClose:P,initialScrollY:window.scrollY,initialQuery:w,navigator:c,transformItems:p,hitComponent:St,transformSearchClient:f},l.searchPagePath&&{resultsFooterComponent:$},{placeholder:T},l,{translations:null!=(o=null==(a=l.translations)?void 0:a.modal)?o:ht.modal,searchParameters:d},E)),m.current)]})}function Tt(e){const t=(0,Ee.A)().siteConfig,n=Object.assign({},t.themeConfig.algolia,e);return(0,u.jsx)(At,Object.assign({},n))}n(78478);function Ct(e){return(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(Tt,Object.assign({},e))})}const Et="navbarSearchContainer_Bca1";function _t(e){let t=e.children,n=e.className;return(0,u.jsx)("div",{className:(0,o.A)(n,Et),children:t})}var jt=n(48295),Pt=n(26972);const Rt=["docId","label","docsPluginId"];const $t=["sidebarId","label","docsPluginId"];const Ot=["label","to","docsPluginId"];var Dt=n(53886);const Lt=["mobile","docsPluginId","dropdownActiveClassDisabled","dropdownItemsBefore","dropdownItemsAfter","versions"];function It(e){let t=e.docsPluginId,n=e.configs;return function(e,t){if(t){const n=new Map(e.map(e=>[e.name,e])),r=(t,r)=>{var o;const a=n.get(t);if(!a)throw new Error("No docs version exist for name '"+t+"', please verify your 'docsVersionDropdown' navbar item versions config.\nAvailable version names:\n- "+e.map(e=>""+e.name).join("\n- "));return{version:a,label:null!=(o=null==r?void 0:r.label)?o:a.label}};return Array.isArray(t)?t.map(e=>r(e,void 0)):Object.entries(t).map(e=>{let t=e[0],n=e[1];return r(t,n)})}return e.map(e=>({version:e,label:e.label}))}((0,jt.jh)(t),n)}function Nt(e,t){var n;return null!=(n=t.alternateDocVersions[e.name])?n:function(e){return e.docs.find(t=>t.id===e.mainDocId)}(e)}const Ft={default:Ae,localeDropdown:function(e){let t=e.mobile,n=e.dropdownItemsBefore,r=e.dropdownItemsAfter,o=e.queryString,a=(0,k.A)(e,qe);const s=Ue(),i=(0,Ee.A)().i18n,c=i.currentLocale,d=[...n,...i.locales.map(e=>({label:s.getLabel(e),lang:s.getLang(e),to:s.getURL(e,{queryString:o}),target:"_self",autoAddBaseUrl:!1,className:e===c?t?"menu__link--active":"dropdown__link--active":""})),...r],p=t?(0,l.T)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):s.getLabel(c);return(0,u.jsx)(Ie,Object.assign({},a,{mobile:t,label:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(Me,{className:ze}),p]}),items:d}))},search:function(e){let t=e.mobile,n=e.className;return t?null:(0,u.jsx)(_t,{className:n,children:(0,u.jsx)(Ct,{})})},dropdown:Ie,html:function(e){let t=e.value,n=e.className,r=e.mobile,a=void 0!==r&&r,s=e.isDropdownItem,i=void 0!==s&&s;const l=i?"li":"div";return(0,u.jsx)(l,{className:(0,o.A)({navbar__item:!a&&!i,"menu__list-item":a},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){let t=e.docId,n=e.label,r=e.docsPluginId,o=(0,k.A)(e,Rt);const a=(0,jt.zK)(r).activeDoc,s=(0,Pt.QB)(t,r),i=(null==a?void 0:a.path)===(null==s?void 0:s.path);return null===s||s.unlisted&&!i?null:(0,u.jsx)(Ae,Object.assign({exact:!0},o,{isActive:()=>i||!(null==a||!a.sidebar)&&a.sidebar===s.sidebar,label:null!=n?n:s.id,to:s.path}))},docSidebar:function(e){let t=e.sidebarId,n=e.label,r=e.docsPluginId,o=(0,k.A)(e,$t);const a=(0,jt.zK)(r).activeDoc,s=(0,Pt.fW)(t,r).link;if(!s)throw new Error('DocSidebarNavbarItem: Sidebar with ID "'+t+"\" doesn't have anything to be linked to.");return(0,u.jsx)(Ae,Object.assign({exact:!0},o,{isActive:()=>(null==a?void 0:a.sidebar)===t,label:null!=n?n:s.label,to:s.path}))},docsVersion:function(e){let t=e.label,n=e.to,r=e.docsPluginId,o=(0,k.A)(e,Ot);const a=(0,Pt.Vd)(r)[0],s=null!=t?t:a.label,i=null!=n?n:(e=>e.docs.find(t=>t.id===e.mainDocId))(a).path;return(0,u.jsx)(Ae,Object.assign({},o,{label:s,to:i}))},docsVersionDropdown:function(e){let t=e.mobile,n=e.docsPluginId,r=e.dropdownActiveClassDisabled,o=e.dropdownItemsBefore,a=e.dropdownItemsAfter,s=e.versions,i=(0,k.A)(e,Lt);const c=(0,Fe.Hl)(e=>e.location.search),d=(0,Fe.Hl)(e=>e.location.hash),p=(0,jt.zK)(n),f=(0,Dt.g1)(n).savePreferredVersionName,m=It({docsPluginId:n,configs:s}),h=function(e){var t;let n=e.docsPluginId,r=e.versionItems;return null!=(t=(0,Pt.Vd)(n).map(e=>r.find(t=>t.version===e)).filter(e=>void 0!==e)[0])?t:r[0]}({docsPluginId:n,versionItems:m}),g=[...o,...m.map(function(e){let t=e.version;return{label:e.label,to:""+Nt(t,p).path+c+d,isActive:()=>t===p.activeVersion,onClick:()=>f(t.name)}}),...a],b=t&&g.length>1?(0,l.T)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):h.label,y=t&&g.length>1?void 0:Nt(h.version,p).path;return g.length<=1?(0,u.jsx)(Ae,Object.assign({},i,{mobile:t,label:b,to:y,isActive:r?()=>!1:void 0})):(0,u.jsx)(Ie,Object.assign({},i,{mobile:t,label:b,to:y,items:g,isActive:r?()=>!1:void 0}))}},Bt=["type"];function Mt(e){let t=e.type,n=(0,k.A)(e,Bt);const r=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),o=Ft[r];if(!o)throw new Error('No NavbarItem component found for type "'+t+'".');return(0,u.jsx)(o,Object.assign({},n))}function zt(){const e=(0,O.M)(),t=(0,v.p)().navbar.items;return(0,u.jsx)("ul",{className:"menu__list",children:t.map((t,n)=>(0,r.createElement)(Mt,Object.assign({mobile:!0},t,{onClick:()=>e.toggle(),key:n})))})}function qt(e){return(0,u.jsx)("button",Object.assign({},e,{type:"button",className:"clean-btn navbar-sidebar__back",children:(0,u.jsx)(l.A,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)",children:"\u2190 Back to main menu"})}))}function Ut(){const e=0===(0,v.p)().navbar.items.length,t=M();return(0,u.jsxs)(u.Fragment,{children:[!e&&(0,u.jsx)(qt,{onClick:()=>t.hide()}),t.content]})}function Ht(){const e=(0,O.M)();var t;return void 0===(t=e.shown)&&(t=!0),(0,r.useEffect)(()=>(document.body.style.overflow=t?"hidden":"visible",()=>{document.body.style.overflow="visible"}),[t]),e.shouldRender?(0,u.jsx)(q,{header:(0,u.jsx)(de,{}),primaryMenu:(0,u.jsx)(zt,{}),secondaryMenu:(0,u.jsx)(Ut,{})}):null}const Gt="navbarHideable_m1mJ",Wt="navbarHidden_jGov";function Vt(e){return(0,u.jsx)("div",Object.assign({role:"presentation"},e,{className:(0,o.A)("navbar-sidebar__backdrop",e.className)}))}function Kt(e){let t=e.children;const n=(0,v.p)().navbar,a=n.hideOnScroll,s=n.style,i=(0,O.M)(),d=function(e){const t=(0,r.useState)(e),n=t[0],o=t[1],a=(0,r.useRef)(!1),s=(0,r.useRef)(0),i=(0,r.useCallback)(e=>{null!==e&&(s.current=e.getBoundingClientRect().height)},[]);return(0,D.Mq)((t,n)=>{let r=t.scrollY;if(!e)return;if(r=i?o(!1):r+c{if(!e)return;const n=t.location.hash;if(n?document.getElementById(n.substring(1)):void 0)return a.current=!0,void o(!1);o(!0)}),{navbarRef:i,isNavbarVisible:n}}(a),p=d.navbarRef,f=d.isNavbarVisible;return(0,u.jsxs)("nav",{ref:p,"aria-label":(0,l.T)({id:"theme.NavBar.navAriaLabel",message:"Main",description:"The ARIA label for the main navigation"}),className:(0,o.A)(g.G.layout.navbar.container,"navbar","navbar--fixed-top",a&&[Gt,!f&&Wt],{"navbar--dark":"dark"===s,"navbar--primary":"primary"===s,"navbar-sidebar--show":i.shown}),children:[t,(0,u.jsx)(Vt,{onClick:i.toggle}),(0,u.jsx)(Ht,{})]})}var Zt=n(12181);const Qt=["width","height","className"];function Yt(e){let t=e.width,n=void 0===t?30:t,r=e.height,o=void 0===r?30:r,a=e.className,s=(0,k.A)(e,Qt);return(0,u.jsx)("svg",Object.assign({className:a,width:n,height:o,viewBox:"0 0 30 30","aria-hidden":"true"},s,{children:(0,u.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"})}))}function Xt(){const e=(0,O.M)(),t=e.toggle,n=e.shown;return(0,u.jsx)("button",{onClick:t,"aria-label":(0,l.T)({id:"theme.docs.sidebar.toggleSidebarButtonAriaLabel",message:"Toggle navigation bar",description:"The ARIA label for hamburger menu button of mobile navigation"}),"aria-expanded":n,className:"navbar__toggle clean-btn",type:"button",children:(0,u.jsx)(Yt,{})})}const Jt="colorModeToggle_DEke";function en(e){let t=e.items;return(0,u.jsx)(u.Fragment,{children:t.map((e,t)=>(0,u.jsx)(Zt.k2,{onError:t=>new Error("A theme navbar item failed to render.\nPlease double-check the following navbar item (themeConfig.navbar.items) of your Docusaurus config:\n"+JSON.stringify(e,null,2),{cause:t}),children:(0,u.jsx)(Mt,Object.assign({},e))},t))})}function tn(e){let t=e.left,n=e.right;return(0,u.jsxs)("div",{className:"navbar__inner",children:[(0,u.jsx)("div",{className:(0,o.A)(g.G.layout.navbar.containerLeft,"navbar__items"),children:t}),(0,u.jsx)("div",{className:(0,o.A)(g.G.layout.navbar.containerRight,"navbar__items navbar__items--right"),children:n})]})}function nn(){const e=(0,O.M)(),t=(0,v.p)().navbar.items,n=function(e){function t(e){var t;return"left"===(null!=(t=e.position)?t:"right")}return[e.filter(t),e.filter(e=>!t(e))]}(t),r=n[0],o=n[1],a=t.find(e=>"search"===e.type);return(0,u.jsx)(tn,{left:(0,u.jsxs)(u.Fragment,{children:[!e.disabled&&(0,u.jsx)(Xt,{}),(0,u.jsx)(ce,{}),(0,u.jsx)(en,{items:r})]}),right:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(en,{items:o}),(0,u.jsx)(ie,{className:Jt}),!a&&(0,u.jsx)(_t,{children:(0,u.jsx)(Ct,{})})]})})}function rn(){return(0,u.jsx)(Kt,{children:(0,u.jsx)(nn,{})})}const on=["to","href","label","prependBaseUrlToHref","className"];function an(e){let t=e.item;const n=t.to,r=t.href,a=t.label,s=t.prependBaseUrlToHref,i=t.className,l=(0,k.A)(t,on),c=(0,fe.Ay)(n),d=(0,fe.Ay)(r,{forcePrependBaseUrl:!0});return(0,u.jsxs)(pe.A,Object.assign({className:(0,o.A)("footer__link-item",i)},r?{href:s?d:r}:{to:c},l,{children:[a,r&&!(0,me.A)(r)&&(0,u.jsx)(ge.A,{})]}))}function sn(e){var t;let n=e.item;return n.html?(0,u.jsx)("li",{className:(0,o.A)("footer__item",n.className),dangerouslySetInnerHTML:{__html:n.html}}):(0,u.jsx)("li",{className:"footer__item",children:(0,u.jsx)(an,{item:n})},null!=(t=n.href)?t:n.to)}function ln(e){let t=e.column;return(0,u.jsxs)("div",{className:(0,o.A)(g.G.layout.footer.column,"col footer__col",t.className),children:[(0,u.jsx)("div",{className:"footer__title",children:t.title}),(0,u.jsx)("ul",{className:"footer__items clean-list",children:t.items.map((e,t)=>(0,u.jsx)(sn,{item:e},t))})]})}function cn(e){let t=e.columns;return(0,u.jsx)("div",{className:"row footer__links",children:t.map((e,t)=>(0,u.jsx)(ln,{column:e},t))})}function un(){return(0,u.jsx)("span",{className:"footer__link-separator",children:"\xb7"})}function dn(e){let t=e.item;return t.html?(0,u.jsx)("span",{className:(0,o.A)("footer__link-item",t.className),dangerouslySetInnerHTML:{__html:t.html}}):(0,u.jsx)(an,{item:t})}function pn(e){let t=e.links;return(0,u.jsx)("div",{className:"footer__links text--center",children:(0,u.jsx)("div",{className:"footer__links",children:t.map((e,n)=>(0,u.jsxs)(r.Fragment,{children:[(0,u.jsx)(dn,{item:e}),t.length!==n+1&&(0,u.jsx)(un,{})]},n))})})}function fn(e){let t=e.links;return function(e){return"title"in e[0]}(t)?(0,u.jsx)(cn,{columns:t}):(0,u.jsx)(pn,{links:t})}var mn=n(21122);const hn="footerLogoLink_BH7S";function gn(e){var t;let n=e.logo;const r=(0,fe.hH)().withBaseUrl,a={light:r(n.src),dark:r(null!=(t=n.srcDark)?t:n.src)};return(0,u.jsx)(mn.A,{className:(0,o.A)("footer__logo",n.className),alt:n.alt,sources:a,width:n.width,height:n.height,style:n.style})}function bn(e){let t=e.logo;return t.href?(0,u.jsx)(pe.A,{href:t.href,className:hn,target:t.target,children:(0,u.jsx)(gn,{logo:t})}):(0,u.jsx)(gn,{logo:t})}function yn(e){let t=e.copyright;return(0,u.jsx)("div",{className:"footer__copyright",dangerouslySetInnerHTML:{__html:t}})}function vn(e){let t=e.style,n=e.links,r=e.logo,a=e.copyright;return(0,u.jsx)("footer",{className:(0,o.A)(g.G.layout.footer.container,"footer",{"footer--dark":"dark"===t}),children:(0,u.jsxs)("div",{className:"container container-fluid",children:[n,(r||a)&&(0,u.jsxs)("div",{className:"footer__bottom text--center",children:[r&&(0,u.jsx)("div",{className:"margin-bottom--sm",children:r}),a]})]})})}function wn(){const e=(0,v.p)().footer;if(!e)return null;const t=e.copyright,n=e.links,r=e.logo,o=e.style;return(0,u.jsx)(vn,{style:o,links:n&&n.length>0&&(0,u.jsx)(fn,{links:n}),logo:r&&(0,u.jsx)(bn,{logo:r}),copyright:t&&(0,u.jsx)(yn,{copyright:t})})}const kn=r.memo(wn),Sn=(0,L.fM)([U.a,w.o,D.Tv,Dt.VQ,s.Jx,function(e){let t=e.children;return(0,u.jsx)(I.y_,{children:(0,u.jsx)(O.e,{children:(0,u.jsx)(F,{children:t})})})}]);function xn(e){let t=e.children;return(0,u.jsx)(Sn,{children:t})}var An=n(51107);function Tn(e){let t=e.error,n=e.tryAgain;return(0,u.jsx)("main",{className:"container margin-vert--xl",children:(0,u.jsx)("div",{className:"row",children:(0,u.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,u.jsx)(An.A,{as:"h1",className:"hero__title",children:(0,u.jsx)(l.A,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed",children:"This page crashed."})}),(0,u.jsx)("div",{className:"margin-vert--lg",children:(0,u.jsx)(Zt.a2,{onClick:n,className:"button button--primary shadow--lw"})}),(0,u.jsx)("hr",{}),(0,u.jsx)("div",{className:"margin-vert--md",children:(0,u.jsx)(Zt.bq,{error:t})})]})})})}const Cn="mainWrapper_z2l0";function En(e){const t=e.children,n=e.noFooter,r=e.wrapperClassName,i=e.title,l=e.description;return(0,u.jsxs)(xn,{children:[(0,u.jsx)(s.be,{title:i,description:l}),(0,u.jsx)(y,{}),(0,u.jsx)($,{}),(0,u.jsx)(rn,{}),(0,u.jsx)("div",{id:d,className:(0,o.A)(g.G.layout.main.container,g.G.wrapper.main,Cn,r),children:(0,u.jsx)(a.A,{fallback:e=>(0,u.jsx)(Tn,Object.assign({},e)),children:t})}),!n&&(0,u.jsx)(kn,{})]})}},23465(e,t,n){"use strict";n.d(t,{A:()=>p});var r=n(98587),o=(n(96540),n(28774)),a=n(86025),s=n(44586),i=n(6342),l=n(21122),c=n(74848);const u=["imageClassName","titleClassName"];function d(e){let t=e.logo,n=e.alt,r=e.imageClassName;const o={light:(0,a.Ay)(t.src),dark:(0,a.Ay)(t.srcDark||t.src)},s=(0,c.jsx)(l.A,{className:t.className,sources:o,height:t.height,width:t.width,alt:n,style:t.style});return r?(0,c.jsx)("div",{className:r,children:s}):s}function p(e){var t;const n=(0,s.A)().siteConfig.title,l=(0,i.p)().navbar,p=l.title,f=l.logo,m=e.imageClassName,h=e.titleClassName,g=(0,r.A)(e,u),b=(0,a.Ay)((null==f?void 0:f.href)||"/"),y=p?"":n,v=null!=(t=null==f?void 0:f.alt)?t:y;return(0,c.jsxs)(o.A,Object.assign({to:b},g,(null==f?void 0:f.target)&&{target:f.target},{children:[f&&(0,c.jsx)(d,{logo:f,alt:v,imageClassName:m}),null!=p&&(0,c.jsx)("b",{className:h,children:p})]}))}},41463(e,t,n){"use strict";n.d(t,{A:()=>a});n(96540);var r=n(5260),o=n(74848);function a(e){let t=e.locale,n=e.version,a=e.tag;const s=t;return(0,o.jsxs)(r.A,{children:[t&&(0,o.jsx)("meta",{name:"docusaurus_locale",content:t}),n&&(0,o.jsx)("meta",{name:"docusaurus_version",content:n}),a&&(0,o.jsx)("meta",{name:"docusaurus_tag",content:a}),s&&(0,o.jsx)("meta",{name:"docsearch:language",content:s}),n&&(0,o.jsx)("meta",{name:"docsearch:version",content:n}),a&&(0,o.jsx)("meta",{name:"docsearch:docusaurus_tag",content:a})]})}},21122(e,t,n){"use strict";n.d(t,{A:()=>p});var r=n(98587),o=n(96540),a=n(34164),s=n(92303),i=n(95293);const l={themedComponent:"themedComponent_mlkZ","themedComponent--light":"themedComponent--light_NVdE","themedComponent--dark":"themedComponent--dark_xIcU"};var c=n(74848);function u(e){let t=e.className,n=e.children;const r=(0,s.A)(),u=(0,i.G)().colorMode;return(0,c.jsx)(c.Fragment,{children:(r?"dark"===u?["dark"]:["light"]:["light","dark"]).map(e=>{const r=n({theme:e,className:(0,a.A)(t,l.themedComponent,l["themedComponent--"+e])});return(0,c.jsx)(o.Fragment,{children:r},e)})})}const d=["sources","className","alt"];function p(e){const t=e.sources,n=e.className,o=e.alt,a=(0,r.A)(e,d);return(0,c.jsx)(u,{className:n,children:e=>{let n=e.theme,r=e.className;return(0,c.jsx)("img",Object.assign({src:t[n],alt:o,className:r},a))}})}},41422(e,t,n){"use strict";n.d(t,{N:()=>b,u:()=>u});var r=n(98587),o=n(96540),a=n(205),s=n(53109),i=n(74848);const l=["collapsed"],c=["lazy"];function u(e){let t=e.initialState;const n=(0,o.useState)(null!=t&&t),r=n[0],a=n[1],s=(0,o.useCallback)(()=>{a(e=>!e)},[]);return{collapsed:r,setCollapsed:a,toggleCollapsed:s}}const d={display:"none",overflow:"hidden",height:"0px"},p={display:"block",overflow:"visible",height:"auto"};function f(e,t){const n=t?d:p;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function m(e){let t=e.collapsibleRef,n=e.collapsed,r=e.animation;const a=(0,o.useRef)(!1);(0,o.useEffect)(()=>{const e=t.current;function o(){var t,n;const o=e.scrollHeight,a=null!=(t=null==r?void 0:r.duration)?t:function(e){if((0,s.O)())return 1;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}(o);return{transition:"height "+a+"ms "+(null!=(n=null==r?void 0:r.easing)?n:"ease-in-out"),height:o+"px"}}function i(){const t=o();e.style.transition=t.transition,e.style.height=t.height}if(!a.current)return f(e,n),void(a.current=!0);return e.style.willChange="height",function(){const t=requestAnimationFrame(()=>{n?(i(),requestAnimationFrame(()=>{e.style.height=d.height,e.style.overflow=d.overflow})):(e.style.display="block",requestAnimationFrame(()=>{i()}))});return()=>cancelAnimationFrame(t)}()},[t,n,r])}function h(e){let t=e.as,n=void 0===t?"div":t,r=e.collapsed,a=e.children,s=e.animation,l=e.onCollapseTransitionEnd,c=e.className;const u=(0,o.useRef)(null);return m({collapsibleRef:u,collapsed:r,animation:s}),(0,i.jsx)(n,{ref:u,onTransitionEnd:e=>{"height"===e.propertyName&&(f(u.current,r),null==l||l(r))},className:c,children:a})}function g(e){let t=e.collapsed,n=(0,r.A)(e,l);const s=(0,o.useState)(!t),c=s[0],u=s[1],d=(0,o.useState)(t),p=d[0],f=d[1];return(0,a.A)(()=>{t||u(!0)},[t]),(0,a.A)(()=>{c&&f(t)},[c,t]),c?(0,i.jsx)(h,Object.assign({},n,{collapsed:p})):null}function b(e){let t=e.lazy,n=(0,r.A)(e,c);const o=t?g:h;return(0,i.jsx)(o,Object.assign({},n))}},65041(e,t,n){"use strict";n.d(t,{M:()=>h,o:()=>m});var r=n(96540),o=n(92303),a=n(70679),s=n(89532),i=n(6342),l=n(74848);const c=(0,a.Wf)("docusaurus.announcement.dismiss"),u=(0,a.Wf)("docusaurus.announcement.id"),d=()=>"true"===c.get(),p=e=>c.set(String(e)),f=r.createContext(null);function m(e){let t=e.children;const n=function(){const e=(0,i.p)().announcementBar,t=(0,o.A)(),n=(0,r.useState)(()=>!!t&&d()),a=n[0],s=n[1];(0,r.useEffect)(()=>{s(d())},[]);const l=(0,r.useCallback)(()=>{p(!0),s(!0)},[]);return(0,r.useEffect)(()=>{if(!e)return;const t=e.id;let n=u.get();"annoucement-bar"===n&&(n="announcement-bar");const r=t!==n;u.set(t),r&&p(!1),!r&&d()||s(!1)},[e]),(0,r.useMemo)(()=>({isActive:!!e&&!a,close:l}),[e,a,l])}();return(0,l.jsx)(f.Provider,{value:n,children:t})}function h(){const e=(0,r.useContext)(f);if(!e)throw new s.dV("AnnouncementBarProvider");return e}},95293(e,t,n){"use strict";n.d(t,{G:()=>S,a:()=>k});var r=n(96540),o=n(92303),a=n(89532),s=n(70679),i=n(6342),l=n(74848);function c(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function u(e){return function(e,t){const n=window.matchMedia(e);return n.addEventListener("change",t),()=>n.removeEventListener("change",t)}("(prefers-color-scheme: dark)",()=>e(c()))}const d=r.createContext(void 0),p=(0,s.Wf)("theme"),f="system",m=e=>"dark"===e?"dark":"light",h=e=>null===e||e===f?null:m(e),g=()=>m(document.documentElement.getAttribute("data-theme")),b=e=>{document.documentElement.setAttribute("data-theme",m(e))},y=()=>h(document.documentElement.getAttribute("data-theme-choice")),v=e=>{var t;document.documentElement.setAttribute("data-theme-choice",null!=(t=h(e))?t:f)};function w(){const e=(0,i.p)().colorMode,t=e.defaultMode,n=e.disableSwitch,a=e.respectPrefersColorScheme,s=function(){const e=(0,i.p)().colorMode.defaultMode,t=(0,o.A)(),n=(0,r.useState)(t?g():e),a=n[0],s=n[1],l=(0,r.useState)(t?y():null),c=l[0],u=l[1];return(0,r.useEffect)(()=>{s(g()),u(y())},[]),{colorMode:a,setColorModeState:s,colorModeChoice:c,setColorModeChoiceState:u}}(),l=s.colorMode,d=s.setColorModeState,f=s.colorModeChoice,w=s.setColorModeChoiceState;(0,r.useEffect)(()=>{n&&p.del()},[n]);const k=(0,r.useCallback)(function(e,n){void 0===n&&(n={});const r=n.persist,o=void 0===r||r;if(null===e){const e=a?c():t;b(e),d(e),v(null),w(null)}else b(e),v(e),d(e),w(e);var s;o&&(null===(s=e)?p.del():p.set(m(s)))},[d,w,a,t]);return(0,r.useEffect)(()=>p.listen(e=>{k(h(e.newValue))}),[k]),(0,r.useEffect)(()=>{if(null===f&&a)return u(e=>{d(e),b(e)})},[a,f,d]),(0,r.useMemo)(()=>({colorMode:l,colorModeChoice:f,setColorMode:k,get isDarkTheme(){return"dark"===l},setLightTheme(){k("light")},setDarkTheme(){k("dark")}}),[l,f,k])}function k(e){let t=e.children;const n=w();return(0,l.jsx)(d.Provider,{value:n,children:t})}function S(){const e=(0,r.useContext)(d);if(null==e)throw new a.dV("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},22069(e,t,n){"use strict";n.d(t,{M:()=>m,e:()=>f});var r=n(96540),o=n(75600),a=n(24581),s=n(57485),i=n(6342),l=n(89532),c=n(74848);const u=r.createContext(void 0);function d(){const e=function(){const e=(0,o.YL)();return 0===(0,i.p)().navbar.items.length&&!e.component}(),t=(0,a.l)(),n=!e&&"mobile"===t,s=(0,r.useState)(!1),l=s[0],c=s[1],u=(0,r.useCallback)(()=>{c(e=>!e)},[]);return(0,r.useEffect)(()=>{"desktop"===t&&c(!1)},[t]),(0,r.useMemo)(()=>({disabled:e,shouldRender:n,toggle:u,shown:l}),[e,n,u,l])}function p(e){let t=e.handler;return(0,s.$Z)(t),null}function f(e){let t=e.children;const n=d();return(0,c.jsxs)(c.Fragment,{children:[n.shown&&(0,c.jsx)(p,{handler:()=>(n.toggle(),!1)}),(0,c.jsx)(u.Provider,{value:n,children:t})]})}function m(){const e=r.useContext(u);if(void 0===e)throw new l.dV("NavbarMobileSidebarProvider");return e}},75600(e,t,n){"use strict";n.d(t,{GX:()=>c,YL:()=>l,y_:()=>i});var r=n(96540),o=n(89532),a=n(74848);const s=r.createContext(null);function i(e){let t=e.children;const n=(0,r.useState)({component:null,props:null});return(0,a.jsx)(s.Provider,{value:n,children:t})}function l(){const e=(0,r.useContext)(s);if(!e)throw new o.dV("NavbarSecondaryMenuContentProvider");return e[0]}function c(e){let t=e.component,n=e.props;const a=(0,r.useContext)(s);if(!a)throw new o.dV("NavbarSecondaryMenuContentProvider");const i=a[1],l=(0,o.Be)(n);return(0,r.useEffect)(()=>{i({component:t,props:l})},[i,t,l]),(0,r.useEffect)(()=>()=>i({component:null,props:null}),[i]),null}},24255(e,t,n){"use strict";n.d(t,{b:()=>s,w:()=>i});var r=n(96540),o=n(44586),a=n(57485);function s(){return(0,a.l)("q")}function i(){const e=(0,o.A)().siteConfig,t=e.baseUrl,n=e.themeConfig.algolia.searchPagePath;return(0,r.useCallback)(e=>""+t+n+"?q="+encodeURIComponent(e),[t,n])}},24581(e,t,n){"use strict";n.d(t,{l:()=>i});var r=n(96540),o=n(38193);const a="desktop",s="mobile";function i(e){let t=(void 0===e?{}:e).desktopBreakpoint,n=void 0===t?996:t;const i=(0,r.useState)(()=>"ssr"),l=i[0],c=i[1];return(0,r.useEffect)(()=>{function e(){c(function(e){if(!o.default.canUseDOM)throw new Error("getWindowSize() should only be called after React hydration");return window.innerWidth>e?a:s}(n))}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[n]),l}},17559(e,t,n){"use strict";n.d(t,{G:()=>r});const r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",blogAuthorsListPage:"blog-authors-list-page",blogAuthorsPostsPage:"blog-authors-posts-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",unlistedBanner:"theme-unlisted-banner",draftBanner:"theme-draft-banner",admonitionType:e=>"theme-admonition-"+e},announcementBar:{container:"theme-announcement-bar"},tabs:{container:"theme-tabs-container"},layout:{navbar:{container:"theme-layout-navbar",containerLeft:"theme-layout-navbar-left",containerRight:"theme-layout-navbar-right",mobileSidebar:{container:"theme-layout-navbar-sidebar",panel:"theme-layout-navbar-sidebar-panel"}},main:{container:"theme-layout-main"},footer:{container:"theme-layout-footer",column:"theme-layout-footer-column"}},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:e=>"theme-doc-sidebar-item-category-level-"+e,docSidebarItemLinkLevel:e=>"theme-doc-sidebar-item-link-level-"+e,docCard:{container:"theme-doc-card-container",heading:"theme-doc-card-heading",icon:"theme-doc-card-icon",title:"theme-doc-card-title",description:"theme-doc-card-description"}},blog:{blogFooterTagsRow:"theme-blog-footer-tags-row",blogFooterEditMetaRow:"theme-blog-footer-edit-meta-row"},pages:{pageFooterEditMetaRow:"theme-pages-footer-edit-meta-row"}}},53109(e,t,n){"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}n.d(t,{O:()=>r})},73535(e,t,n){"use strict";n.d(t,{v:()=>s});var r=n(6342);const o="anchorTargetStickyNavbar_Vzrq",a="anchorTargetHideOnScrollNavbar_vjPI";function s(e){const t=(0,r.p)().navbar.hideOnScroll;if(void 0!==e)return t?a:o}},12181(e,t,n){"use strict";n.d(t,{bq:()=>d,MN:()=>u,a2:()=>c,k2:()=>p});var r=n(96540),o=n(21312),a=n(70440);const s="errorBoundaryError_a6uf",i="errorBoundaryFallback_VBag";var l=n(74848);function c(e){return(0,l.jsx)("button",Object.assign({type:"button"},e,{children:(0,l.jsx)(o.A,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again rendering when the React error boundary captures an error",children:"Try again"})}))}function u(e){let t=e.error,n=e.tryAgain;return(0,l.jsxs)("div",{className:i,children:[(0,l.jsx)("p",{children:t.message}),(0,l.jsx)(c,{onClick:n})]})}function d(e){let t=e.error;const n=(0,a.rA)(t).map(e=>e.message).join("\n\nCause:\n");return(0,l.jsx)("p",{className:s,children:n})}class p extends r.Component{componentDidCatch(e,t){throw this.props.onError(e,t)}render(){return this.props.children}}},57485(e,t,n){"use strict";n.d(t,{$Z:()=>s,Hl:()=>i,aZ:()=>l,jy:()=>u,l:()=>c});var r=n(96540),o=n(56347),a=n(89532);function s(e){!function(e){const t=(0,o.W6)(),n=(0,a._q)(e);(0,r.useEffect)(()=>t.block((e,t)=>n(e,t)),[t,n])}((t,n)=>{if("POP"===n)return e(t,n)})}function i(e){const t=(0,o.W6)();return(0,r.useSyncExternalStore)(t.listen,()=>e(t),()=>e(Object.assign({},t,{location:Object.assign({},t.location,{search:"",hash:"",state:void 0})})))}function l(e){return i(t=>null===e?null:new URLSearchParams(t.location.search).get(e))}function c(e){var t;const n=null!=(t=l(e))?t:"",a=function(e){const t=(0,o.W6)();return(0,r.useCallback)((n,r)=>{const o=new URLSearchParams(t.location.search);n?o.set(e,n):o.delete(e),(null!=r&&r.push?t.push:t.replace)({search:o.toString()})},[e,t])}(e);return[n,a]}function u(e,t){const n=function(e,t){const n=new URLSearchParams;for(const r of e)for(const e of r.entries()){const r=e[0],o=e[1];"append"===t?n.append(r,o):n.set(r,o)}return n}(e.map(e=>new URLSearchParams(null!=e?e:"")),t),r=n.toString();return r?"?"+r:r}},31682(e,t,n){"use strict";function r(e,t){return void 0===t&&(t=(e,t)=>e===t),e.filter((n,r)=>e.findIndex(e=>t(e,n))!==r)}function o(e){return Array.from(new Set(e))}function a(e,t){const n={};let r=0;for(const o of e){const e=t(o,r);null!=n[e]||(n[e]=[]),n[e].push(o),r+=1}return n}n.d(t,{$z:()=>a,XI:()=>r,sb:()=>o})},45500(e,t,n){"use strict";n.d(t,{Jx:()=>b,be:()=>m,e3:()=>g});var r=n(96540),o=n(34164),a=n(5260),s=n(36803),i=n(86025),l=n(14563),c=n(74848);function u(e){let t=e.title;const n=(0,l.s$)().format(t);return(0,c.jsxs)(a.A,{children:[(0,c.jsx)("title",{children:n}),(0,c.jsx)("meta",{property:"og:title",content:n})]})}function d(e){let t=e.description;return(0,c.jsxs)(a.A,{children:[(0,c.jsx)("meta",{name:"description",content:t}),(0,c.jsx)("meta",{property:"og:description",content:t})]})}function p(e){let t=e.image;const n=(0,(0,i.hH)().withBaseUrl)(t,{absolute:!0});return(0,c.jsxs)(a.A,{children:[(0,c.jsx)("meta",{property:"og:image",content:n}),(0,c.jsx)("meta",{name:"twitter:image",content:n})]})}function f(e){let t=e.keywords;return(0,c.jsx)(a.A,{children:(0,c.jsx)("meta",{name:"keywords",content:Array.isArray(t)?t.join(","):t})})}function m(e){let t=e.title,n=e.description,r=e.keywords,o=e.image,s=e.children;return(0,c.jsxs)(c.Fragment,{children:[t&&(0,c.jsx)(u,{title:t}),n&&(0,c.jsx)(d,{description:n}),r&&(0,c.jsx)(f,{keywords:r}),o&&(0,c.jsx)(p,{image:o}),s&&(0,c.jsx)(a.A,{children:s})]})}const h=r.createContext(void 0);function g(e){let t=e.className,n=e.children;const s=r.useContext(h),i=(0,o.A)(s,t);return(0,c.jsxs)(h.Provider,{value:i,children:[(0,c.jsx)(a.A,{children:(0,c.jsx)("html",{className:i})}),n]})}function b(e){let t=e.children;const n=(0,s.A)(),r="plugin-"+n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,"");const a="plugin-id-"+n.plugin.id;return(0,c.jsx)(g,{className:(0,o.A)(r,a),children:t})}},89532(e,t,n){"use strict";n.d(t,{Be:()=>u,ZC:()=>l,_q:()=>i,dV:()=>c,fM:()=>d});var r=n(8634),o=n(96540),a=n(205),s=n(74848);function i(e){const t=(0,o.useRef)(e);return(0,a.A)(()=>{t.current=e},[e]),(0,o.useCallback)(function(){return t.current(...arguments)},[])}function l(e){const t=(0,o.useRef)(void 0);return(0,a.A)(()=>{t.current=e}),t.current}class c extends Error{constructor(e,t){var n,o;super(),this.name="ReactContextError",this.message="Hook "+(null!=(n=null==(o=this.stack)||null==(o=o.split("\n")[1])||null==(o=o.match((0,r.A)(/at (?:\w+\.)?(\w+)/,{name:1})))?void 0:o.groups.name)?n:"")+" is called outside the <"+e+">. "+(null!=t?t:"")}}function u(e){const t=Object.entries(e);return t.sort((e,t)=>e[0].localeCompare(t[0])),(0,o.useMemo)(()=>e,t.flat())}function d(e){return t=>{let n=t.children;return(0,s.jsx)(s.Fragment,{children:e.reduceRight((e,t)=>(0,s.jsx)(t,{children:e}),n)})}}},91252(e,t,n){"use strict";function r(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}n.d(t,{G:()=>r})},99169(e,t,n){"use strict";n.d(t,{Dt:()=>i,ys:()=>s});var r=n(96540),o=n(35947),a=n(44586);function s(e,t){const n=e=>{var t;return null==(t=!e||e.endsWith("/")?e:e+"/")?void 0:t.toLowerCase()};return n(e)===n(t)}function i(){const e=(0,a.A)().siteConfig.baseUrl;return(0,r.useMemo)(()=>function(e){let t=e.baseUrl;function n(e){return e.path===t&&!0===e.exact}function r(e){return e.path===t&&!e.exact}return function e(t){if(0===t.length)return;return t.find(n)||e(t.filter(r).flatMap(e=>{var t;return null!=(t=e.routes)?t:[]}))}(e.routes)}({routes:o.A,baseUrl:e}),[e])}},23104(e,t,n){"use strict";n.d(t,{Mq:()=>f,Tv:()=>u,a_:()=>m,gk:()=>h});var r=n(96540),o=n(38193),a=n(92303),s=n(205),i=n(89532),l=n(74848);const c=r.createContext(void 0);function u(e){let t=e.children;const n=function(){const e=(0,r.useRef)(!0);return(0,r.useMemo)(()=>({scrollEventsEnabledRef:e,enableScrollEvents:()=>{e.current=!0},disableScrollEvents:()=>{e.current=!1}}),[])}();return(0,l.jsx)(c.Provider,{value:n,children:t})}function d(){const e=(0,r.useContext)(c);if(null==e)throw new i.dV("ScrollControllerProvider");return e}const p=()=>o.default.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null;function f(e,t){void 0===t&&(t=[]);const n=d().scrollEventsEnabledRef,o=(0,r.useRef)(p()),a=(0,i._q)(e);(0,r.useEffect)(()=>{const e=()=>{if(!n.current)return;const e=p();a(e,o.current),o.current=e},t={passive:!0};return e(),window.addEventListener("scroll",e,t),()=>window.removeEventListener("scroll",e,t)},[a,n,...t])}function m(){const e=d(),t=function(){const e=(0,r.useRef)({elem:null,top:0}),t=(0,r.useCallback)(t=>{e.current={elem:t,top:t.getBoundingClientRect().top}},[]),n=(0,r.useCallback)(()=>{const t=e.current,n=t.elem,r=t.top;if(!n)return{restored:!1};const o=n.getBoundingClientRect().top-r;return o&&window.scrollBy({left:0,top:o}),e.current={elem:null,top:0},{restored:0!==o}},[]);return(0,r.useMemo)(()=>({save:t,restore:n}),[n,t])}(),n=(0,r.useRef)(void 0),o=(0,r.useCallback)(r=>{t.save(r),e.disableScrollEvents(),n.current=()=>{const r=t.restore().restored;if(n.current=void 0,r){const t=()=>{e.enableScrollEvents(),window.removeEventListener("scroll",t)};window.addEventListener("scroll",t)}else e.enableScrollEvents()}},[e,t]);return(0,s.A)(()=>{queueMicrotask(()=>null==n.current?void 0:n.current())}),{blockElementScrollPositionUntilNextRender:o}}function h(){const e=(0,r.useRef)(null),t=(0,a.A)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:n=>{e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),()=>{}}(n):function(e){let t=null;const n=document.documentElement.scrollTop>e;return function r(){const o=document.documentElement.scrollTop;(n&&o>e||!n&&ot&&cancelAnimationFrame(t)}(n)},cancelScroll:()=>null==e.current?void 0:e.current()}}},2967(e,t,n){"use strict";n.d(t,{C:()=>r});const r="default"},70679(e,t,n){"use strict";n.d(t,{Wf:()=>u,Dv:()=>d});var r=n(96540);const o=JSON.parse('{"N":"localStorage","M":""}'),a=o.N;function s(e){let t=e.key,n=e.oldValue,r=e.newValue,o=e.storage;if(n===r)return;const a=document.createEvent("StorageEvent");a.initStorageEvent("storage",!1,!1,t,n,r,window.location.href,o),window.dispatchEvent(a)}function i(e){if(void 0===e&&(e=a),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,l||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),l=!0),null}var t}let l=!1;const c={get:()=>null,set:()=>{},del:()=>{},listen:()=>()=>{}};function u(e,t){const n=""+e+o.M;if("undefined"==typeof window)return function(e){function t(){throw new Error('Illegal storage API usage for storage key "'+e+'".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.')}return{get:t,set:t,del:t,listen:t}}(n);const r=i(null==t?void 0:t.persistence);return null===r?c:{get:()=>{try{return r.getItem(n)}catch(e){return console.error("Docusaurus storage error, can't get key="+n,e),null}},set:e=>{try{const t=r.getItem(n);r.setItem(n,e),s({key:n,oldValue:t,newValue:e,storage:r})}catch(t){console.error("Docusaurus storage error, can't set "+n+"="+e,t)}},del:()=>{try{const e=r.getItem(n);r.removeItem(n),s({key:n,oldValue:e,newValue:null,storage:r})}catch(e){console.error("Docusaurus storage error, can't delete key="+n,e)}},listen:e=>{try{const t=t=>{t.storageArea===r&&t.key===n&&e(t)};return window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)}catch(t){return console.error("Docusaurus storage error, can't listen for changes of key="+n,t),()=>{}}}}}function d(e,t){const n=(0,r.useState)(()=>null===e?c:u(e,t))[0],o=(0,r.useCallback)(e=>"undefined"==typeof window?()=>{}:n.listen(e),[n]);return[(0,r.useSyncExternalStore)(o,()=>n.get(),()=>null),n]}},14563(e,t,n){"use strict";n.d(t,{AL:()=>u,s$:()=>d});var r=n(96540),o=n(44586),a=n(36803),s=n(89532),i=n(74848);const l=e=>{let t=e.title,n=e.siteTitle,r=e.titleDelimiter;const o=null==t?void 0:t.trim();return o&&o!==n?o+" "+r+" "+n:n},c=(0,r.createContext)(null);function u(e){let t=e.formatter,n=e.children;return(0,i.jsx)(c.Provider,{value:t,children:n})}function d(){const e=function(){const e=(0,r.useContext)(c);if(null===e)throw new s.dV("TitleFormatterProvider");return e}(),t=(0,o.A)().siteConfig,n=t.title,i=t.titleDelimiter,u=(0,a.A)().plugin;return{format:t=>e({title:t,siteTitle:n,titleDelimiter:i,plugin:u,defaultFormatter:l})}}},32131(e,t,n){"use strict";n.d(t,{o:()=>s});var r=n(44586),o=n(56347),a=n(70440);function s(){const e=(0,r.A)(),t=e.siteConfig,n=t.baseUrl,s=t.trailingSlash,i=e.i18n.localeConfigs,l=(0,o.zy)().pathname,c=(0,a.Ks)(l,{trailingSlash:s,baseUrl:n}).replace(n,"");return{createUrl:function(e){let t=e.locale,n=e.fullyQualified;const r=function(e){const t=i[e];if(!t)throw new Error("Unexpected Docusaurus bug, no locale config found for locale="+e);return t}(t);return""+(""+(n?r.url:""))+r.baseUrl+c}}}},75062(e,t,n){"use strict";n.d(t,{$:()=>s});var r=n(96540),o=n(56347),a=n(89532);function s(e){const t=(0,o.zy)(),n=(0,a.ZC)(t),s=(0,a._q)(e);(0,r.useEffect)(()=>{n&&t!==n&&s({location:t,previousLocation:n})},[s,t,n])}},6342(e,t,n){"use strict";n.d(t,{p:()=>o});var r=n(44586);function o(){return(0,r.A)().siteConfig.themeConfig}},38126(e,t,n){"use strict";n.d(t,{c:()=>o});var r=n(44586);function o(){return(0,r.A)().siteConfig.themeConfig}},51062(e,t,n){"use strict";n.d(t,{C:()=>i});var r=n(96540),o=n(91252),a=n(86025),s=n(38126);function i(){const e=(0,a.hH)().withBaseUrl,t=(0,s.c)().algolia,n=t.externalUrlRegex,i=t.replaceSearchResultPathname;return(0,r.useCallback)(t=>{const r=new URL(t);if((0,o.G)(n,r.href))return t;const a=""+r.pathname+r.search+r.hash;return e(function(e,t){return t?e.replaceAll(new RegExp(t.from,"g"),t.to):e}(a,i))},[e,n,i])}},12983(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addTrailingSlash=o,t.default=function(e,t){const n=t.trailingSlash,r=t.baseUrl;if(e.startsWith("#"))return e;if(void 0===n)return e;const s=e.split(/[#?]/)[0],i="/"===s||s===r?s:(l=s,c=n,c?o(l):a(l));var l,c;return e.replace(s,i)},t.addLeadingSlash=function(e){return(0,r.addPrefix)(e,"/")},t.removeTrailingSlash=a;const r=n(42566);function o(e){return e.endsWith("/")?e:e+"/"}function a(e){return(0,r.removeSuffix)(e,"/")}},80253(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=function e(t){if(t.cause)return[t,...e(t.cause)];return[t]}},70440(e,t,n){"use strict";t.rA=t.Ks=t.LU=void 0;const r=n(31635);t.LU="__blog-post-container";var o=n(12983);Object.defineProperty(t,"Ks",{enumerable:!0,get:function(){return r.__importDefault(o).default}});var a=n(42566);var s=n(80253);Object.defineProperty(t,"rA",{enumerable:!0,get:function(){return s.getErrorCausalChain}})},42566(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addPrefix=function(e,t){return e.startsWith(t)?e:""+t+e},t.removeSuffix=function(e,t){if(""===t)return e;return e.endsWith(t)?e.slice(0,-t.length):e},t.addSuffix=function(e,t){return e.endsWith(t)?e:""+e+t},t.removePrefix=function(e,t){return e.startsWith(t)?e.slice(t.length):e}},23390(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});r(n(38193)).default.canUseDOM&&(window.Prism=window.Prism||{},window.Prism.manual=!0)},31513(e,t,n){"use strict";n.d(t,{zR:()=>w,TM:()=>C,yJ:()=>f,sC:()=>_,AO:()=>p});var r=n(58168);function o(e){return"/"===e.charAt(0)}function a(e,t){for(var n=t,r=n+1,o=e.length;r=0;p--){var f=s[p];"."===f?a(s,p):".."===f?(a(s,p),d++):d&&(a(s,p),d--)}if(!c)for(;d--;d)s.unshift("..");!c||""===s[0]||s[0]&&o(s[0])||s.unshift("");var m=s.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};var i=n(11561);function l(e){return"/"===e.charAt(0)?e:"/"+e}function c(e){return"/"===e.charAt(0)?e.substr(1):e}function u(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function p(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function f(e,t,n,o){var a;"string"==typeof e?(a=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),a.state=t):(void 0===(a=(0,r.A)({},e)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(i){throw i instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):i}return n&&(a.key=n),o?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=s(a.pathname,o.pathname)):a.pathname=o.pathname:a.pathname||(a.pathname="/"),a}function m(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var a="function"==typeof e?e(t,n):e;"string"==typeof a?"function"==typeof r?r(a,o):o(!0):o(!1!==a)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter(function(e){return e!==r})}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,o):n.push(o),d({action:r,location:o,index:t,entries:n})}})},replace:function(e,t){var r="REPLACE",o=f(e,t,h(),w.location);u.confirmTransitionTo(o,r,n,function(e){e&&(w.entries[w.index]=o,d({action:r,location:o}))})},go:v,goBack:function(){v(-1)},goForward:function(){v(1)},canGo:function(e){var t=w.index+e;return t>=0&&t
    '};function o(e,t,n){return en?n:e}function a(e){return 100*(-1+e)}function s(e,t,n){var o;return(o="translate3d"===r.positionUsing?{transform:"translate3d("+a(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+a(e)+"%,0)"}:{"margin-left":a(e)+"%"}).transition="all "+t+"ms "+n,o}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=o(e,r.minimum,1),n.status=1===e?null:e;var a=n.render(!t),c=a.querySelector(r.barSelector),u=r.speed,d=r.easing;return a.offsetWidth,i(function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),l(c,s(e,u,d)),1===e?(l(a,{transition:"none",opacity:1}),a.offsetWidth,setTimeout(function(){l(a,{transition:"all "+u+"ms linear",opacity:0}),setTimeout(function(){n.remove(),t()},u)},u)):setTimeout(t,u)}),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout(function(){n.status&&(n.trickle(),e())},r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*o(Math.random()*t,.1,.95)),t=o(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always(function(){0===--t?(e=0,n.done()):n.set((e-t)/e)}),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var o,s=t.querySelector(r.barSelector),i=e?"-100":a(n.status||0),c=document.querySelector(r.parent);return l(s,{transition:"all 0 linear",transform:"translate3d("+i+"%,0,0)"}),r.showSpinner||(o=t.querySelector(r.spinnerSelector))&&f(o),c!=document.body&&u(c,"nprogress-custom-parent"),c.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&f(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var i=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),l=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(e,t){return t.toUpperCase()})}function r(t){var n=document.body.style;if(t in n)return t;for(var r,o=e.length,a=t.charAt(0).toUpperCase()+t.slice(1);o--;)if((r=e[o]+a)in n)return r;return t}function o(e){return e=n(e),t[e]||(t[e]=r(e))}function a(e,t,n){t=o(t),e.style[t]=n}return function(e,t){var n,r,o=arguments;if(2==o.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&a(e,n,r);else a(e,o[1],o[2])}}();function c(e,t){return("string"==typeof e?e:p(e)).indexOf(" "+t+" ")>=0}function u(e,t){var n=p(e),r=n+t;c(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=p(e);c(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function p(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function f(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(o="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=o)},35302(e,t,n){var r=n(64634);e.exports=h,e.exports.parse=a,e.exports.compile=function(e,t){return c(a(e,t),t)},e.exports.tokensToFunction=c,e.exports.tokensToRegExp=m;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function a(e,t){for(var n,r=[],a=0,i=0,l="",c=t&&t.delimiter||"/";null!=(n=o.exec(e));){var u=n[0],p=n[1],f=n.index;if(l+=e.slice(i,f),i=f+u.length,p)l+=p[1];else{var m=e[i],h=n[2],g=n[3],b=n[4],y=n[5],v=n[6],w=n[7];l&&(r.push(l),l="");var k=null!=h&&null!=m&&m!==h,S="+"===v||"*"===v,x="?"===v||"*"===v,A=h||c,T=b||y,C=h||("string"==typeof r[r.length-1]?r[r.length-1]:"");r.push({name:g||a++,prefix:h||"",delimiter:A,optional:x,repeat:S,partial:k,asterisk:!!w,pattern:T?d(T):w?".*":s(A,C)})}}return i-1?"[^"+u(e)+"]+?":u(t)+"|(?:(?!"+u(t)+")[^"+u(e)+"])+?"}function i(e){return encodeURI(e).replace(/[\/?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function l(e){return encodeURI(e).replace(/[?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function c(e,t){for(var n=new Array(e.length),o=0;op});var r=n(4784),o=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},r=window.Promise||function(e){function t(){}e(t,t)},a=function(){for(var e=arguments.length,t=Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:{}).target,t=function(){var e={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},t=void 0,n=void 0;if(b.container)if(b.container instanceof Object)t=(e=o({},e,b.container)).width-e.left-e.right-2*b.margin,n=e.height-e.top-e.bottom-2*b.margin;else{var r=(s(b.container)?b.container:document.querySelector(b.container)).getBoundingClientRect(),a=r.width,l=r.height,c=r.left,u=r.top;e=o({},e,{width:a,height:l,left:c,top:u})}t=t||e.width-2*b.margin,n=n||e.height-2*b.margin;var d=y.zoomedHd||y.original,p=i(d)?t:d.naturalWidth||t,f=i(d)?n:d.naturalHeight||n,m=d.getBoundingClientRect(),h=m.top,g=m.left,v=m.width,w=m.height,k=Math.min(Math.max(v,p),t)/v,S=Math.min(Math.max(w,f),n)/w,x=Math.min(k,S),A="scale("+x+") translate3d("+((t-v)/2-g+b.margin+e.left)/x+"px, "+((n-w)/2-h+b.margin+e.top)/x+"px, 0)";y.zoomed.style.transform=A,y.zoomedHd&&(y.zoomedHd.style.transform=A)};return new r(function(n){if(e&&-1===f.indexOf(e))n(w);else{if(y.zoomed)n(w);else{if(e)y.original=e;else{if(!(f.length>0))return void n(w);var r=f;y.original=r[0]}if(y.original.dispatchEvent(c("medium-zoom:open",{detail:{zoom:w}})),g=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,h=!0,y.zoomed=function(e){var t=e.getBoundingClientRect(),n=t.top,r=t.left,o=t.width,a=t.height,s=e.cloneNode(),i=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,l=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;return s.removeAttribute("id"),s.style.position="absolute",s.style.top=n+i+"px",s.style.left=r+l+"px",s.style.width=o+"px",s.style.height=a+"px",s.style.transform="",s}(y.original),document.body.appendChild(v),b.template){var o=s(b.template)?b.template:document.querySelector(b.template);y.template=document.createElement("div"),y.template.appendChild(o.content.cloneNode(!0)),document.body.appendChild(y.template)}if(y.original.parentElement&&"PICTURE"===y.original.parentElement.tagName&&y.original.currentSrc&&(y.zoomed.src=y.original.currentSrc),document.body.appendChild(y.zoomed),window.requestAnimationFrame(function(){document.body.classList.add("medium-zoom--opened")}),y.original.classList.add("medium-zoom-image--hidden"),y.zoomed.classList.add("medium-zoom-image--opened"),y.zoomed.addEventListener("click",d),y.zoomed.addEventListener("transitionend",function e(){h=!1,y.zoomed.removeEventListener("transitionend",e),y.original.dispatchEvent(c("medium-zoom:opened",{detail:{zoom:w}})),n(w)}),y.original.getAttribute("data-zoom-src")){y.zoomedHd=y.zoomed.cloneNode(),y.zoomedHd.removeAttribute("srcset"),y.zoomedHd.removeAttribute("sizes"),y.zoomedHd.removeAttribute("loading"),y.zoomedHd.src=y.zoomed.getAttribute("data-zoom-src"),y.zoomedHd.onerror=function(){clearInterval(a),console.warn("Unable to reach the zoom image target "+y.zoomedHd.src),y.zoomedHd=null,t()};var a=setInterval(function(){y.zoomedHd.complete&&(clearInterval(a),y.zoomedHd.classList.add("medium-zoom-image--opened"),y.zoomedHd.addEventListener("click",d),document.body.appendChild(y.zoomedHd),t())},10)}else if(y.original.hasAttribute("srcset")){y.zoomedHd=y.zoomed.cloneNode(),y.zoomedHd.removeAttribute("sizes"),y.zoomedHd.removeAttribute("loading");var i=y.zoomedHd.addEventListener("load",function(){y.zoomedHd.removeEventListener("load",i),y.zoomedHd.classList.add("medium-zoom-image--opened"),y.zoomedHd.addEventListener("click",d),document.body.appendChild(y.zoomedHd),t()})}else t()}}})},d=function(){return new r(function(e){if(!h&&y.original){h=!0,document.body.classList.remove("medium-zoom--opened"),y.zoomed.style.transform="",y.zoomedHd&&(y.zoomedHd.style.transform=""),y.template&&(y.template.style.transition="opacity 150ms",y.template.style.opacity=0),y.original.dispatchEvent(c("medium-zoom:close",{detail:{zoom:w}})),y.zoomed.addEventListener("transitionend",function t(){y.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(y.zoomed),y.zoomedHd&&document.body.removeChild(y.zoomedHd),document.body.removeChild(v),y.zoomed.classList.remove("medium-zoom-image--opened"),y.template&&document.body.removeChild(y.template),h=!1,y.zoomed.removeEventListener("transitionend",t),y.original.dispatchEvent(c("medium-zoom:closed",{detail:{zoom:w}})),y.original=null,y.zoomed=null,y.zoomedHd=null,y.template=null,e(w)})}else e(w)})},p=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).target;return y.original?d():u({target:e})},f=[],m=[],h=!1,g=0,b=n,y={original:null,zoomed:null,zoomedHd:null,template:null};"[object Object]"===Object.prototype.toString.call(t)?b=t:(t||"string"==typeof t)&&a(t);var v=function(e){var t=document.createElement("div");return t.classList.add("medium-zoom-overlay"),t.style.background=e,t}((b=o({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},b)).background);document.addEventListener("click",function(e){var t=e.target;t!==v?-1!==f.indexOf(t)&&p({target:t}):d()}),document.addEventListener("keyup",function(e){var t=e.key||e.keyCode;"Escape"!==t&&"Esc"!==t&&27!==t||d()}),document.addEventListener("scroll",function(){if(!h&&y.original){var e=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(g-e)>b.scrollOffset&&setTimeout(d,150)}}),window.addEventListener("resize",d);var w={open:u,close:d,toggle:p,update:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e;if(e.background&&(v.style.background=e.background),e.container&&e.container instanceof Object&&(t.container=o({},b.container,e.container)),e.template){var n=s(e.template)?e.template:document.querySelector(e.template);t.template=n}return b=o({},b,t),f.forEach(function(e){e.dispatchEvent(c("medium-zoom:update",{detail:{zoom:w}}))}),w},clone:function(){return e(o({},b,arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}))},attach:a,detach:function(){for(var e=arguments.length,t=Array(e),n=0;n0?t.reduce(function(e,t){return[].concat(e,l(t))},[]):f;return r.forEach(function(e){e.classList.remove("medium-zoom-image"),e.dispatchEvent(c("medium-zoom:detach",{detail:{zoom:w}}))}),f=f.filter(function(e){return-1===r.indexOf(e)}),w},on:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return f.forEach(function(r){r.addEventListener("medium-zoom:"+e,t,n)}),m.push({type:"medium-zoom:"+e,listener:t,options:n}),w},off:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return f.forEach(function(r){r.removeEventListener("medium-zoom:"+e,t,n)}),m=m.filter(function(n){return!(n.type==="medium-zoom:"+e&&n.listener.toString()===t.toString())}),w},getOptions:function(){return b},getImages:function(){return f},getZoomedImage:function(){return y.original}};return w},{themeConfig:d}=r.default,p=function(){if("undefined"==typeof window)return null;const{zoomSelector:e=".markdown img"}=d,{imageZoom:{selector:t=e,options:n}={}}=d;return setTimeout(()=>{u(t,n)},1e3),{onRouteUpdate({location:e,previousLocation:r}){e&&e.hash&&e.hash.length||r&&e.pathname!==r.pathname&&setTimeout(()=>{u(t,n)},1e3)}}}()},6969(e){e.exports&&(e.exports={core:{meta:{path:"components/prism-core.js",option:"mandatory"},core:"Core"},themes:{meta:{path:"themes/{id}.css",link:"index.html?theme={id}",exclusive:!0},prism:{title:"Default",option:"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{title:"Okaidia",owner:"ocodia"},"prism-twilight":{title:"Twilight",owner:"remybach"},"prism-coy":{title:"Coy",owner:"tshedor"},"prism-solarizedlight":{title:"Solarized Light",owner:"hectormatos2011 "},"prism-tomorrow":{title:"Tomorrow Night",owner:"Rosey"}},languages:{meta:{path:"components/prism-{id}",noCSS:!0,examplesPath:"examples/prism-{id}",addCheckAll:!0},markup:{title:"Markup",alias:["html","xml","svg","mathml","ssml","atom","rss"],aliasTitles:{html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",atom:"Atom",rss:"RSS"},option:"default"},css:{title:"CSS",option:"default",modify:"markup"},clike:{title:"C-like",option:"default"},javascript:{title:"JavaScript",require:"clike",modify:"markup",optional:"regex",alias:"js",option:"default"},abap:{title:"ABAP",owner:"dellagustin"},abnf:{title:"ABNF",owner:"RunDevelopment"},actionscript:{title:"ActionScript",require:"javascript",modify:"markup",owner:"Golmote"},ada:{title:"Ada",owner:"Lucretia"},agda:{title:"Agda",owner:"xy-ren"},al:{title:"AL",owner:"RunDevelopment"},antlr4:{title:"ANTLR4",alias:"g4",owner:"RunDevelopment"},apacheconf:{title:"Apache Configuration",owner:"GuiTeK"},apex:{title:"Apex",require:["clike","sql"],owner:"RunDevelopment"},apl:{title:"APL",owner:"ngn"},applescript:{title:"AppleScript",owner:"Golmote"},aql:{title:"AQL",owner:"RunDevelopment"},arduino:{title:"Arduino",require:"cpp",alias:"ino",owner:"dkern"},arff:{title:"ARFF",owner:"Golmote"},armasm:{title:"ARM Assembly",alias:"arm-asm",owner:"RunDevelopment"},arturo:{title:"Arturo",alias:"art",optional:["bash","css","javascript","markup","markdown","sql"],owner:"drkameleon"},asciidoc:{alias:"adoc",title:"AsciiDoc",owner:"Golmote"},aspnet:{title:"ASP.NET (C#)",require:["markup","csharp"],owner:"nauzilus"},asm6502:{title:"6502 Assembly",owner:"kzurawel"},asmatmel:{title:"Atmel AVR Assembly",owner:"cerkit"},autohotkey:{title:"AutoHotkey",owner:"aviaryan"},autoit:{title:"AutoIt",owner:"Golmote"},avisynth:{title:"AviSynth",alias:"avs",owner:"Zinfidel"},"avro-idl":{title:"Avro IDL",alias:"avdl",owner:"RunDevelopment"},awk:{title:"AWK",alias:"gawk",aliasTitles:{gawk:"GAWK"},owner:"RunDevelopment"},bash:{title:"Bash",alias:["sh","shell"],aliasTitles:{sh:"Shell",shell:"Shell"},owner:"zeitgeist87"},basic:{title:"BASIC",owner:"Golmote"},batch:{title:"Batch",owner:"Golmote"},bbcode:{title:"BBcode",alias:"shortcode",aliasTitles:{shortcode:"Shortcode"},owner:"RunDevelopment"},bbj:{title:"BBj",owner:"hyyan"},bicep:{title:"Bicep",owner:"johnnyreilly"},birb:{title:"Birb",require:"clike",owner:"Calamity210"},bison:{title:"Bison",require:"c",owner:"Golmote"},bnf:{title:"BNF",alias:"rbnf",aliasTitles:{rbnf:"RBNF"},owner:"RunDevelopment"},bqn:{title:"BQN",owner:"yewscion"},brainfuck:{title:"Brainfuck",owner:"Golmote"},brightscript:{title:"BrightScript",owner:"RunDevelopment"},bro:{title:"Bro",owner:"wayward710"},bsl:{title:"BSL (1C:Enterprise)",alias:"oscript",aliasTitles:{oscript:"OneScript"},owner:"Diversus23"},c:{title:"C",require:"clike",owner:"zeitgeist87"},csharp:{title:"C#",require:"clike",alias:["cs","dotnet"],owner:"mvalipour"},cpp:{title:"C++",require:"c",owner:"zeitgeist87"},cfscript:{title:"CFScript",require:"clike",alias:"cfc",owner:"mjclemente"},chaiscript:{title:"ChaiScript",require:["clike","cpp"],owner:"RunDevelopment"},cil:{title:"CIL",owner:"sbrl"},cilkc:{title:"Cilk/C",require:"c",alias:"cilk-c",owner:"OpenCilk"},cilkcpp:{title:"Cilk/C++",require:"cpp",alias:["cilk-cpp","cilk"],owner:"OpenCilk"},clojure:{title:"Clojure",owner:"troglotit"},cmake:{title:"CMake",owner:"mjrogozinski"},cobol:{title:"COBOL",owner:"RunDevelopment"},coffeescript:{title:"CoffeeScript",require:"javascript",alias:"coffee",owner:"R-osey"},concurnas:{title:"Concurnas",alias:"conc",owner:"jasontatton"},csp:{title:"Content-Security-Policy",owner:"ScottHelme"},cooklang:{title:"Cooklang",owner:"ahue"},coq:{title:"Coq",owner:"RunDevelopment"},crystal:{title:"Crystal",require:"ruby",owner:"MakeNowJust"},"css-extras":{title:"CSS Extras",require:"css",modify:"css",owner:"milesj"},csv:{title:"CSV",owner:"RunDevelopment"},cue:{title:"CUE",owner:"RunDevelopment"},cypher:{title:"Cypher",owner:"RunDevelopment"},d:{title:"D",require:"clike",owner:"Golmote"},dart:{title:"Dart",require:"clike",owner:"Golmote"},dataweave:{title:"DataWeave",owner:"machaval"},dax:{title:"DAX",owner:"peterbud"},dhall:{title:"Dhall",owner:"RunDevelopment"},diff:{title:"Diff",owner:"uranusjr"},django:{title:"Django/Jinja2",require:"markup-templating",alias:"jinja2",owner:"romanvm"},"dns-zone-file":{title:"DNS zone file",owner:"RunDevelopment",alias:"dns-zone"},docker:{title:"Docker",alias:"dockerfile",owner:"JustinBeckwith"},dot:{title:"DOT (Graphviz)",alias:"gv",optional:"markup",owner:"RunDevelopment"},ebnf:{title:"EBNF",owner:"RunDevelopment"},editorconfig:{title:"EditorConfig",owner:"osipxd"},eiffel:{title:"Eiffel",owner:"Conaclos"},ejs:{title:"EJS",require:["javascript","markup-templating"],owner:"RunDevelopment",alias:"eta",aliasTitles:{eta:"Eta"}},elixir:{title:"Elixir",owner:"Golmote"},elm:{title:"Elm",owner:"zwilias"},etlua:{title:"Embedded Lua templating",require:["lua","markup-templating"],owner:"RunDevelopment"},erb:{title:"ERB",require:["ruby","markup-templating"],owner:"Golmote"},erlang:{title:"Erlang",owner:"Golmote"},"excel-formula":{title:"Excel Formula",alias:["xlsx","xls"],owner:"RunDevelopment"},fsharp:{title:"F#",require:"clike",owner:"simonreynolds7"},factor:{title:"Factor",owner:"catb0t"},false:{title:"False",owner:"edukisto"},"firestore-security-rules":{title:"Firestore security rules",require:"clike",owner:"RunDevelopment"},flow:{title:"Flow",require:"javascript",owner:"Golmote"},fortran:{title:"Fortran",owner:"Golmote"},ftl:{title:"FreeMarker Template Language",require:"markup-templating",owner:"RunDevelopment"},gml:{title:"GameMaker Language",alias:"gamemakerlanguage",require:"clike",owner:"LiarOnce"},gap:{title:"GAP (CAS)",owner:"RunDevelopment"},gcode:{title:"G-code",owner:"RunDevelopment"},gdscript:{title:"GDScript",owner:"RunDevelopment"},gedcom:{title:"GEDCOM",owner:"Golmote"},gettext:{title:"gettext",alias:"po",owner:"RunDevelopment"},gherkin:{title:"Gherkin",owner:"hason"},git:{title:"Git",owner:"lgiraudel"},glsl:{title:"GLSL",require:"c",owner:"Golmote"},gn:{title:"GN",alias:"gni",owner:"RunDevelopment"},"linker-script":{title:"GNU Linker Script",alias:"ld",owner:"RunDevelopment"},go:{title:"Go",require:"clike",owner:"arnehormann"},"go-module":{title:"Go module",alias:"go-mod",owner:"RunDevelopment"},gradle:{title:"Gradle",require:"clike",owner:"zeabdelkhalek-badido18"},graphql:{title:"GraphQL",optional:"markdown",owner:"Golmote"},groovy:{title:"Groovy",require:"clike",owner:"robfletcher"},haml:{title:"Haml",require:"ruby",optional:["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],owner:"Golmote"},handlebars:{title:"Handlebars",require:"markup-templating",alias:["hbs","mustache"],aliasTitles:{mustache:"Mustache"},owner:"Golmote"},haskell:{title:"Haskell",alias:"hs",owner:"bholst"},haxe:{title:"Haxe",require:"clike",optional:"regex",owner:"Golmote"},hcl:{title:"HCL",owner:"outsideris"},hlsl:{title:"HLSL",require:"c",owner:"RunDevelopment"},hoon:{title:"Hoon",owner:"matildepark"},http:{title:"HTTP",optional:["csp","css","hpkp","hsts","javascript","json","markup","uri"],owner:"danielgtaylor"},hpkp:{title:"HTTP Public-Key-Pins",owner:"ScottHelme"},hsts:{title:"HTTP Strict-Transport-Security",owner:"ScottHelme"},ichigojam:{title:"IchigoJam",owner:"BlueCocoa"},icon:{title:"Icon",owner:"Golmote"},"icu-message-format":{title:"ICU Message Format",owner:"RunDevelopment"},idris:{title:"Idris",alias:"idr",owner:"KeenS",require:"haskell"},ignore:{title:".ignore",owner:"osipxd",alias:["gitignore","hgignore","npmignore"],aliasTitles:{gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore"}},inform7:{title:"Inform 7",owner:"Golmote"},ini:{title:"Ini",owner:"aviaryan"},io:{title:"Io",owner:"AlesTsurko"},j:{title:"J",owner:"Golmote"},java:{title:"Java",require:"clike",owner:"sherblot"},javadoc:{title:"JavaDoc",require:["markup","java","javadoclike"],modify:"java",optional:"scala",owner:"RunDevelopment"},javadoclike:{title:"JavaDoc-like",modify:["java","javascript","php"],owner:"RunDevelopment"},javastacktrace:{title:"Java stack trace",owner:"RunDevelopment"},jexl:{title:"Jexl",owner:"czosel"},jolie:{title:"Jolie",require:"clike",owner:"thesave"},jq:{title:"JQ",owner:"RunDevelopment"},jsdoc:{title:"JSDoc",require:["javascript","javadoclike","typescript"],modify:"javascript",optional:["actionscript","coffeescript"],owner:"RunDevelopment"},"js-extras":{title:"JS Extras",require:"javascript",modify:"javascript",optional:["actionscript","coffeescript","flow","n4js","typescript"],owner:"RunDevelopment"},json:{title:"JSON",alias:"webmanifest",aliasTitles:{webmanifest:"Web App Manifest"},owner:"CupOfTea696"},json5:{title:"JSON5",require:"json",owner:"RunDevelopment"},jsonp:{title:"JSONP",require:"json",owner:"RunDevelopment"},jsstacktrace:{title:"JS stack trace",owner:"sbrl"},"js-templates":{title:"JS Templates",require:"javascript",modify:"javascript",optional:["css","css-extras","graphql","markdown","markup","sql"],owner:"RunDevelopment"},julia:{title:"Julia",owner:"cdagnino"},keepalived:{title:"Keepalived Configure",owner:"dev-itsheng"},keyman:{title:"Keyman",owner:"mcdurdin"},kotlin:{title:"Kotlin",alias:["kt","kts"],aliasTitles:{kts:"Kotlin Script"},require:"clike",owner:"Golmote"},kumir:{title:"KuMir (\u041a\u0443\u041c\u0438\u0440)",alias:"kum",owner:"edukisto"},kusto:{title:"Kusto",owner:"RunDevelopment"},latex:{title:"LaTeX",alias:["tex","context"],aliasTitles:{tex:"TeX",context:"ConTeXt"},owner:"japborst"},latte:{title:"Latte",require:["clike","markup-templating","php"],owner:"nette"},less:{title:"Less",require:"css",optional:"css-extras",owner:"Golmote"},lilypond:{title:"LilyPond",require:"scheme",alias:"ly",owner:"RunDevelopment"},liquid:{title:"Liquid",require:"markup-templating",owner:"cinhtau"},lisp:{title:"Lisp",alias:["emacs","elisp","emacs-lisp"],owner:"JuanCaicedo"},livescript:{title:"LiveScript",owner:"Golmote"},llvm:{title:"LLVM IR",owner:"porglezomp"},log:{title:"Log file",optional:"javastacktrace",owner:"RunDevelopment"},lolcode:{title:"LOLCODE",owner:"Golmote"},lua:{title:"Lua",owner:"Golmote"},magma:{title:"Magma (CAS)",owner:"RunDevelopment"},makefile:{title:"Makefile",owner:"Golmote"},markdown:{title:"Markdown",require:"markup",optional:"yaml",alias:"md",owner:"Golmote"},"markup-templating":{title:"Markup templating",require:"markup",owner:"Golmote"},mata:{title:"Mata",owner:"RunDevelopment"},matlab:{title:"MATLAB",owner:"Golmote"},maxscript:{title:"MAXScript",owner:"RunDevelopment"},mel:{title:"MEL",owner:"Golmote"},mermaid:{title:"Mermaid",owner:"RunDevelopment"},metafont:{title:"METAFONT",owner:"LaeriExNihilo"},mizar:{title:"Mizar",owner:"Golmote"},mongodb:{title:"MongoDB",owner:"airs0urce",require:"javascript"},monkey:{title:"Monkey",owner:"Golmote"},moonscript:{title:"MoonScript",alias:"moon",owner:"RunDevelopment"},n1ql:{title:"N1QL",owner:"TMWilds"},n4js:{title:"N4JS",require:"javascript",optional:"jsdoc",alias:"n4jsd",owner:"bsmith-n4"},"nand2tetris-hdl":{title:"Nand To Tetris HDL",owner:"stephanmax"},naniscript:{title:"Naninovel Script",owner:"Elringus",alias:"nani"},nasm:{title:"NASM",owner:"rbmj"},neon:{title:"NEON",owner:"nette"},nevod:{title:"Nevod",owner:"nezaboodka"},nginx:{title:"nginx",owner:"volado"},nim:{title:"Nim",owner:"Golmote"},nix:{title:"Nix",owner:"Golmote"},nsis:{title:"NSIS",owner:"idleberg"},objectivec:{title:"Objective-C",require:"c",alias:"objc",owner:"uranusjr"},ocaml:{title:"OCaml",owner:"Golmote"},odin:{title:"Odin",owner:"edukisto"},opencl:{title:"OpenCL",require:"c",modify:["c","cpp"],owner:"Milania1"},openqasm:{title:"OpenQasm",alias:"qasm",owner:"RunDevelopment"},oz:{title:"Oz",owner:"Golmote"},parigp:{title:"PARI/GP",owner:"Golmote"},parser:{title:"Parser",require:"markup",owner:"Golmote"},pascal:{title:"Pascal",alias:"objectpascal",aliasTitles:{objectpascal:"Object Pascal"},owner:"Golmote"},pascaligo:{title:"Pascaligo",owner:"DefinitelyNotAGoat"},psl:{title:"PATROL Scripting Language",owner:"bertysentry"},pcaxis:{title:"PC-Axis",alias:"px",owner:"RunDevelopment"},peoplecode:{title:"PeopleCode",alias:"pcode",owner:"RunDevelopment"},perl:{title:"Perl",owner:"Golmote"},php:{title:"PHP",require:"markup-templating",owner:"milesj"},phpdoc:{title:"PHPDoc",require:["php","javadoclike"],modify:"php",owner:"RunDevelopment"},"php-extras":{title:"PHP Extras",require:"php",modify:"php",owner:"milesj"},"plant-uml":{title:"PlantUML",alias:"plantuml",owner:"RunDevelopment"},plsql:{title:"PL/SQL",require:"sql",owner:"Golmote"},powerquery:{title:"PowerQuery",alias:["pq","mscript"],owner:"peterbud"},powershell:{title:"PowerShell",owner:"nauzilus"},processing:{title:"Processing",require:"clike",owner:"Golmote"},prolog:{title:"Prolog",owner:"Golmote"},promql:{title:"PromQL",owner:"arendjr"},properties:{title:".properties",owner:"Golmote"},protobuf:{title:"Protocol Buffers",require:"clike",owner:"just-boris"},pug:{title:"Pug",require:["markup","javascript"],optional:["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],owner:"Golmote"},puppet:{title:"Puppet",owner:"Golmote"},pure:{title:"Pure",optional:["c","cpp","fortran"],owner:"Golmote"},purebasic:{title:"PureBasic",require:"clike",alias:"pbfasm",owner:"HeX0R101"},purescript:{title:"PureScript",require:"haskell",alias:"purs",owner:"sriharshachilakapati"},python:{title:"Python",alias:"py",owner:"multipetros"},qsharp:{title:"Q#",require:"clike",alias:"qs",owner:"fedonman"},q:{title:"Q (kdb+ database)",owner:"Golmote"},qml:{title:"QML",require:"javascript",owner:"RunDevelopment"},qore:{title:"Qore",require:"clike",owner:"temnroegg"},r:{title:"R",owner:"Golmote"},racket:{title:"Racket",require:"scheme",alias:"rkt",owner:"RunDevelopment"},cshtml:{title:"Razor C#",alias:"razor",require:["markup","csharp"],optional:["css","css-extras","javascript","js-extras"],owner:"RunDevelopment"},jsx:{title:"React JSX",require:["markup","javascript"],optional:["jsdoc","js-extras","js-templates"],owner:"vkbansal"},tsx:{title:"React TSX",require:["jsx","typescript"]},reason:{title:"Reason",require:"clike",owner:"Golmote"},regex:{title:"Regex",owner:"RunDevelopment"},rego:{title:"Rego",owner:"JordanSh"},renpy:{title:"Ren'py",alias:"rpy",owner:"HyuchiaDiego"},rescript:{title:"ReScript",alias:"res",owner:"vmarcosp"},rest:{title:"reST (reStructuredText)",owner:"Golmote"},rip:{title:"Rip",owner:"ravinggenius"},roboconf:{title:"Roboconf",owner:"Golmote"},robotframework:{title:"Robot Framework",alias:"robot",owner:"RunDevelopment"},ruby:{title:"Ruby",require:"clike",alias:"rb",owner:"samflores"},rust:{title:"Rust",owner:"Golmote"},sas:{title:"SAS",optional:["groovy","lua","sql"],owner:"Golmote"},sass:{title:"Sass (Sass)",require:"css",optional:"css-extras",owner:"Golmote"},scss:{title:"Sass (SCSS)",require:"css",optional:"css-extras",owner:"MoOx"},scala:{title:"Scala",require:"java",owner:"jozic"},scheme:{title:"Scheme",owner:"bacchus123"},"shell-session":{title:"Shell session",require:"bash",alias:["sh-session","shellsession"],owner:"RunDevelopment"},smali:{title:"Smali",owner:"RunDevelopment"},smalltalk:{title:"Smalltalk",owner:"Golmote"},smarty:{title:"Smarty",require:"markup-templating",optional:"php",owner:"Golmote"},sml:{title:"SML",alias:"smlnj",aliasTitles:{smlnj:"SML/NJ"},owner:"RunDevelopment"},solidity:{title:"Solidity (Ethereum)",alias:"sol",require:"clike",owner:"glachaud"},"solution-file":{title:"Solution file",alias:"sln",owner:"RunDevelopment"},soy:{title:"Soy (Closure Template)",require:"markup-templating",owner:"Golmote"},sparql:{title:"SPARQL",require:"turtle",owner:"Triply-Dev",alias:"rq"},"splunk-spl":{title:"Splunk SPL",owner:"RunDevelopment"},sqf:{title:"SQF: Status Quo Function (Arma 3)",require:"clike",owner:"RunDevelopment"},sql:{title:"SQL",owner:"multipetros"},squirrel:{title:"Squirrel",require:"clike",owner:"RunDevelopment"},stan:{title:"Stan",owner:"RunDevelopment"},stata:{title:"Stata Ado",require:["mata","java","python"],owner:"RunDevelopment"},iecst:{title:"Structured Text (IEC 61131-3)",owner:"serhioromano"},stylus:{title:"Stylus",owner:"vkbansal"},supercollider:{title:"SuperCollider",alias:"sclang",owner:"RunDevelopment"},swift:{title:"Swift",owner:"chrischares"},systemd:{title:"Systemd configuration file",owner:"RunDevelopment"},"t4-templating":{title:"T4 templating",owner:"RunDevelopment"},"t4-cs":{title:"T4 Text Templates (C#)",require:["t4-templating","csharp"],alias:"t4",owner:"RunDevelopment"},"t4-vb":{title:"T4 Text Templates (VB)",require:["t4-templating","vbnet"],owner:"RunDevelopment"},tap:{title:"TAP",owner:"isaacs",require:"yaml"},tcl:{title:"Tcl",owner:"PeterChaplin"},tt2:{title:"Template Toolkit 2",require:["clike","markup-templating"],owner:"gflohr"},textile:{title:"Textile",require:"markup",optional:"css",owner:"Golmote"},toml:{title:"TOML",owner:"RunDevelopment"},tremor:{title:"Tremor",alias:["trickle","troy"],owner:"darach",aliasTitles:{trickle:"trickle",troy:"troy"}},turtle:{title:"Turtle",alias:"trig",aliasTitles:{trig:"TriG"},owner:"jakubklimek"},twig:{title:"Twig",require:"markup-templating",owner:"brandonkelly"},typescript:{title:"TypeScript",require:"javascript",optional:"js-templates",alias:"ts",owner:"vkbansal"},typoscript:{title:"TypoScript",alias:"tsconfig",aliasTitles:{tsconfig:"TSConfig"},owner:"dkern"},unrealscript:{title:"UnrealScript",alias:["uscript","uc"],owner:"RunDevelopment"},uorazor:{title:"UO Razor Script",owner:"jaseowns"},uri:{title:"URI",alias:"url",aliasTitles:{url:"URL"},owner:"RunDevelopment"},v:{title:"V",require:"clike",owner:"taggon"},vala:{title:"Vala",require:"clike",optional:"regex",owner:"TemplarVolk"},vbnet:{title:"VB.Net",require:"basic",owner:"Bigsby"},velocity:{title:"Velocity",require:"markup",owner:"Golmote"},verilog:{title:"Verilog",owner:"a-rey"},vhdl:{title:"VHDL",owner:"a-rey"},vim:{title:"vim",owner:"westonganger"},"visual-basic":{title:"Visual Basic",alias:["vb","vba"],aliasTitles:{vba:"VBA"},owner:"Golmote"},warpscript:{title:"WarpScript",owner:"RunDevelopment"},wasm:{title:"WebAssembly",owner:"Golmote"},"web-idl":{title:"Web IDL",alias:"webidl",owner:"RunDevelopment"},wgsl:{title:"WGSL",owner:"Dr4gonthree"},wiki:{title:"Wiki markup",require:"markup",owner:"Golmote"},wolfram:{title:"Wolfram language",alias:["mathematica","nb","wl"],aliasTitles:{mathematica:"Mathematica",nb:"Mathematica Notebook"},owner:"msollami"},wren:{title:"Wren",owner:"clsource"},xeora:{title:"Xeora",require:"markup",alias:"xeoracube",aliasTitles:{xeoracube:"XeoraCube"},owner:"freakmaxi"},"xml-doc":{title:"XML doc (.net)",require:"markup",modify:["csharp","fsharp","vbnet"],owner:"RunDevelopment"},xojo:{title:"Xojo (REALbasic)",owner:"Golmote"},xquery:{title:"XQuery",require:"markup",owner:"Golmote"},yaml:{title:"YAML",alias:"yml",owner:"hason"},yang:{title:"YANG",owner:"RunDevelopment"},zig:{title:"Zig",owner:"RunDevelopment"}},plugins:{meta:{path:"plugins/{id}/prism-{id}",link:"plugins/{id}/"},"line-highlight":{title:"Line Highlight",description:"Highlights specific lines and/or line ranges."},"line-numbers":{title:"Line Numbers",description:"Line number at the beginning of code lines.",owner:"kuba-kubula"},"show-invisibles":{title:"Show Invisibles",description:"Show hidden characters such as tabs and line breaks.",optional:["autolinker","data-uri-highlight"]},autolinker:{title:"Autolinker",description:"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},wpd:{title:"WebPlatform Docs",description:'Makes tokens link to WebPlatform.org documentation. The links open in a new tab.'},"custom-class":{title:"Custom Class",description:"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.",owner:"dvkndn",noCSS:!0},"file-highlight":{title:"File Highlight",description:"Fetch external files and highlight them with Prism. Used on the Prism website itself.",noCSS:!0},"show-language":{title:"Show Language",description:"Display the highlighted language in code blocks (inline code does not show the label).",owner:"nauzilus",noCSS:!0,require:"toolbar"},"jsonp-highlight":{title:"JSONP Highlight",description:"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).",noCSS:!0,owner:"nauzilus"},"highlight-keywords":{title:"Highlight Keywords",description:"Adds special CSS classes for each keyword for fine-grained highlighting.",owner:"vkbansal",noCSS:!0},"remove-initial-line-feed":{title:"Remove initial line feed",description:"Removes the initial line feed in code blocks.",owner:"Golmote",noCSS:!0},"inline-color":{title:"Inline color",description:"Adds a small inline preview for colors in style sheets.",require:"css-extras",owner:"RunDevelopment"},previewers:{title:"Previewers",description:"Previewers for angles, colors, gradients, easing and time.",require:"css-extras",owner:"Golmote"},autoloader:{title:"Autoloader",description:"Automatically loads the needed languages to highlight the code blocks.",owner:"Golmote",noCSS:!0},"keep-markup":{title:"Keep Markup",description:"Prevents custom markup from being dropped out during highlighting.",owner:"Golmote",optional:"normalize-whitespace",noCSS:!0},"command-line":{title:"Command Line",description:"Display a command line with a prompt and, optionally, the output/response from the commands.",owner:"chriswells0"},"unescaped-markup":{title:"Unescaped Markup",description:"Write markup without having to escape anything."},"normalize-whitespace":{title:"Normalize Whitespace",description:"Supports multiple operations to normalize whitespace in code blocks.",owner:"zeitgeist87",optional:"unescaped-markup",noCSS:!0},"data-uri-highlight":{title:"Data-URI Highlight",description:"Highlights data-URI contents.",owner:"Golmote",noCSS:!0},toolbar:{title:"Toolbar",description:"Attach a toolbar for plugins to easily register buttons on the top of a code block.",owner:"mAAdhaTTah"},"copy-to-clipboard":{title:"Copy to Clipboard Button",description:"Add a button that copies the code block to the clipboard when clicked.",owner:"mAAdhaTTah",require:"toolbar",noCSS:!0},"download-button":{title:"Download Button",description:"A button in the toolbar of a code block adding a convenient way to download a code file.",owner:"Golmote",require:"toolbar",noCSS:!0},"match-braces":{title:"Match braces",description:"Highlights matching braces.",owner:"RunDevelopment"},"diff-highlight":{title:"Diff Highlight",description:"Highlights the code inside diff blocks.",owner:"RunDevelopment",require:"diff"},"filter-highlight-all":{title:"Filter highlightAll",description:"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.",owner:"RunDevelopment",noCSS:!0},treeview:{title:"Treeview",description:"A language with special styles to highlight file system tree structures.",owner:"Golmote"}}})},8722(e,t,n){var r=n(28848);const o=n(6969),a=n(98380),s=new Set;function i(e){void 0===e?e=Object.keys(o.languages).filter(e=>"meta"!=e):Array.isArray(e)||(e=[e]);const t=[...s,...Object.keys(r.languages)];a(o,e,t).load(e=>{if(!(e in o.languages))return void(i.silent||console.warn("Language does not exist: "+e));const t="./prism-"+e;delete n.c[n(63157).resolve(t)],delete r.languages[e],n(63157)(t),s.add(e)})}i.silent=!1,e.exports=i},19700(e,t,n){!function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,o,a){if(n.language===r){var s=n.tokenStack=[];n.code=n.code.replace(o,function(e){if("function"==typeof a&&!a(e))return e;for(var o,i=s.length;-1!==n.code.indexOf(o=t(r,i));)++i;return s[i]=e,o}),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var o=0,a=Object.keys(n.tokenStack);!function s(i){for(var l=0;l=a.length);l++){var c=i[l];if("string"==typeof c||c.content&&"string"==typeof c.content){var u=a[o],d=n.tokenStack[u],p="string"==typeof c?c:c.content,f=t(r,u),m=p.indexOf(f);if(m>-1){++o;var h=p.substring(0,m),g=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),b=p.substring(m+f.length),y=[];h&&y.push.apply(y,s([h])),y.push(g),b&&y.push.apply(y,s([b])),"string"==typeof c?i.splice.apply(i,[l,1].concat(y)):c.content=y}}else c.content&&s(c.content)}return i}(n.tokens)}}}})}(n(28848))},18692(e,t,n){var r={"./":8722};function o(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=a,e.exports=o,o.id=18692},63157(e,t,n){var r={"./":8722};function o(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=a,e.exports=o,o.id=63157},98380(e){"use strict";var t=function(){var e=function(){};function t(e,t){Array.isArray(e)?e.forEach(t):null!=e&&t(e,0)}function n(e){for(var t={},n=0,r=e.length;n "));var i={},l=e[r];if(l){function c(t){if(!(t in e))throw new Error(r+" depends on an unknown component "+t);if(!(t in i))for(var s in o(t,a),i[t]=!0,n[t])i[s]=!0}t(l.require,c),t(l.optional,c),t(l.modify,c)}n[r]=i,a.pop()}}return function(e){var t=n[e];return t||(o(e,r),t=n[e]),t}}function o(e){for(var t in e)return!0;return!1}return function(a,s,i){var l=function(e){var t={};for(var n in e){var r=e[n];for(var o in r)if("meta"!=o){var a=r[o];t[o]="string"==typeof a?{title:a}:a}}return t}(a),c=function(e){var n;return function(r){if(r in e)return r;if(!n)for(var o in n={},e){var a=e[o];t(a&&a.alias,function(t){if(t in n)throw new Error(t+" cannot be alias for both "+o+" and "+n[t]);if(t in e)throw new Error(t+" cannot be alias of "+o+" because it is a component.");n[t]=o})}return n[r]||r}}(l);s=s.map(c),i=(i||[]).map(c);var u=n(s),d=n(i);s.forEach(function e(n){var r=l[n];t(r&&r.require,function(t){t in d||(u[t]=!0,e(t))})});for(var p,f=r(l),m=u;o(m);){for(var h in p={},m){var g=l[h];t(g&&g.modify,function(e){e in d&&(p[e]=!0)})}for(var b in d)if(!(b in u))for(var y in f(b))if(y in u){p[b]=!0;break}for(var v in m=p)u[v]=!0}var w={getIds:function(){var e=[];return w.load(function(t){e.push(t)}),e},load:function(t,n){return function(t,n,r,o){var a=o?o.series:void 0,s=o?o.parallel:e,i={},l={};function c(e){if(e in i)return i[e];l[e]=!0;var o,u=[];for(var d in t(e))d in n&&u.push(d);if(0===u.length)o=r(e);else{var p=s(u.map(function(e){var t=c(e);return delete l[e],t}));a?o=a(p,function(){return r(e)}):r(e)}return i[e]=o}for(var u in n)c(u);var d=[];for(var p in l)d.push(i[p]);return s(d)}(f,u,t,n)}};return w}}();e.exports=t},28848(e,t,n){var r=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},o={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=d.reach);x+=S.value.length,S=S.next){var A=S.value;if(t.length>e.length)return;if(!(A instanceof a)){var T,C=1;if(y){if(!(T=s(k,x,e,b))||T.index>=e.length)break;var E=T.index,_=T.index+T[0].length,j=x;for(j+=S.value.length;E>=j;)j+=(S=S.next).value.length;if(x=j-=S.value.length,S.value instanceof a)continue;for(var P=S;P!==t.tail&&(j<_||"string"==typeof P.value);P=P.next)C++,j+=P.value.length;C--,A=e.slice(x,j),T.index-=x}else if(!(T=s(k,0,A,b)))continue;E=T.index;var R=T[0],$=A.slice(0,E),O=A.slice(E+R.length),D=x+A.length;d&&D>d.reach&&(d.reach=D);var L=S.prev;if($&&(L=c(t,L,$),x+=$.length),u(t,L,C),S=c(t,L,new a(p,g?o.tokenize(R,g):R,v,R)),O&&c(t,S,O),C>1){var I={cause:p+","+m,reach:D};i(e,t,n,S.prev,x,I),d&&I.reach>d.reach&&(d.reach=I.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function c(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function u(e,t,n){for(var r=t.next,o=0;o"+a.content+""},!e.document)return e.addEventListener?(o.disableWorkerMessageHandler||e.addEventListener("message",function(t){var n=JSON.parse(t.data),r=n.language,a=n.code,s=n.immediateClose;e.postMessage(o.highlight(a,o.languages[r],r)),s&&e.close()},!1),o):o;var d=o.util.currentScript();function p(){o.manual||o.highlightAll()}if(d&&(o.filename=d.src,d.hasAttribute("data-manual")&&(o.manual=!0)),!o.manual){var f=document.readyState;"loading"===f||"interactive"===f&&d&&d.defer?document.addEventListener("DOMContentLoaded",p):window.requestAnimationFrame?window.requestAnimationFrame(p):window.setTimeout(p,16)}return o}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=r),void 0!==n.g&&(n.g.Prism=r),r.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:r.languages[t]},n.cdata=/^$/i;var o={"included-cdata":{pattern://i,inside:n}};o["language-"+t]={pattern:/[\s\S]+/,inside:r.languages[t]};var a={};a[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:o},r.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(e,t){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:r.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(r),r.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript,function(){if(void 0!==r&&"undefined"!=typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},t="data-src-status",n="loading",o="loaded",a="pre[data-src]:not(["+t+'="'+o+'"]):not(['+t+'="'+n+'"])';r.hooks.add("before-highlightall",function(e){e.selector+=", "+a}),r.hooks.add("before-sanity-check",function(s){var i=s.element;if(i.matches(a)){s.code="",i.setAttribute(t,n);var l=i.appendChild(document.createElement("CODE"));l.textContent="Loading\u2026";var c=i.getAttribute("data-src"),u=s.language;if("none"===u){var d=(/\.(\w+)$/.exec(c)||[,"none"])[1];u=e[d]||d}r.util.setLanguage(l,u),r.util.setLanguage(i,u);var p=r.plugins.autoloader;p&&p.loadLanguages(u),function(e,t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.onreadystatechange=function(){4==r.readyState&&(r.status<400&&r.responseText?t(r.responseText):r.status>=400?n("\u2716 Error "+r.status+" while fetching file: "+r.statusText):n("\u2716 Error: File does not exist or is empty"))},r.send(null)}(c,function(e){i.setAttribute(t,o);var n=function(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||"");if(t){var n=Number(t[1]),r=t[2],o=t[3];return r?o?[n,Number(o)]:[n,void 0]:[n,n]}}(i.getAttribute("data-range"));if(n){var a=e.split(/\r\n?|\n/g),s=n[0],c=null==n[1]?a.length:n[1];s<0&&(s+=a.length),s=Math.max(0,Math.min(s-1,a.length)),c<0&&(c+=a.length),c=Math.max(0,Math.min(c,a.length)),e=a.slice(s,c).join("\n"),i.hasAttribute("data-start")||i.setAttribute("data-start",String(s+1))}l.textContent=e,r.highlightElement(l)},function(e){i.setAttribute(t,"failed"),l.textContent=e})}}),r.plugins.fileHighlight={highlight:function(e){for(var t,n=(e||document).querySelectorAll(a),o=0;t=n[o++];)r.highlightElement(t)}};var s=!1;r.fileHighlight=function(){s||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),s=!0),r.plugins.fileHighlight.highlight.apply(this,arguments)}}}()},2694(e,t,n){"use strict";var r=n(6925);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,s){if(s!==r){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},5556(e,t,n){e.exports=n(2694)()},6925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},22551(e,t,n){"use strict";var r=n(96540),o=n(69982);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n